<div dir="auto">Also I am finding someone is using my <a href="mailto:sunkistinthesun@yahoo.com">sunkistinthesun@yahoo.com</a> account to download with a ghost remote attached to this android and then sending all data in a bk format. </div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 22, 2018, 07:12 Debian Bug Tracking System <<a href="mailto:owner@bugs.debian.org">owner@bugs.debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Your message dated Mon, 22 Oct 2018 19:08:18 +0800<br>
with message-id <<a href="mailto:17513746-f8dc-a4f5-1742-a1b260c08444@gmail.com" target="_blank" rel="noreferrer">17513746-f8dc-a4f5-1742-a1b260c08444@gmail.com</a>><br>
and subject line Closing this as already fixed<br>
has caused the Debian Bug report #800661,<br>
regarding android-tools-fastboot: fastboot flash fails with bad file descriptor because file handle was closed prematurely<br>
to be marked as done.<br>
<br>
This means that you claim that the problem has been dealt with.<br>
If this is not the case it is now your responsibility to reopen the<br>
Bug report if necessary, and/or fix the problem forthwith.<br>
<br>
(NB: If you are a system administrator and have no idea what this<br>
message is talking about, this may indicate a serious mail system<br>
misconfiguration somewhere. Please contact <a href="mailto:owner@bugs.debian.org" target="_blank" rel="noreferrer">owner@bugs.debian.org</a><br>
immediately.)<br>
<br>
<br>
-- <br>
800661: <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800661" rel="noreferrer noreferrer" target="_blank">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800661</a><br>
Debian Bug Tracking System<br>
Contact <a href="mailto:owner@bugs.debian.org" target="_blank" rel="noreferrer">owner@bugs.debian.org</a> with problems<br>
<br><br><br>---------- Forwarded message ----------<br>From: Ronald <<a href="mailto:ronald.niederhagen@gmail.com" target="_blank" rel="noreferrer">ronald.niederhagen@gmail.com</a>><br>To: Debian Bug Tracking System <<a href="mailto:submit@bugs.debian.org" target="_blank" rel="noreferrer">submit@bugs.debian.org</a>><br>Cc: <br>Bcc: <br>Date: Fri, 02 Oct 2015 10:29:12 +0200<br>Subject: android-tools-fastboot: fastboot flash fails with bad file descriptor because file handle was closed prematurely<br>Package: android-tools-fastboot<br>
Version: 4.2.2+git20130529-5.1<br>
Severity: important<br>
<br>
<br>
Dear Maintainer,<br>
<br>
   * What led up to the situation?<br>
root@debian-rn1# fastboot flash recovery 407recov.img<br>
sending 'recovery' (3660 KB)...<br>
FAILED (command write failed (Bad file descriptor))<br>
finished. total time: 0.000s<br>
oot@debian-rn1# fastboot reboot<br>
rebooting...<br>
<br>
finished. total time: 0.002s<br>
root@debian-rn1# <br>
<br>
   * What exactly did you do (or not do) that was effective (or<br>
     ineffective)?<br>
I looked into the source and found that "usb_close()" is called before the write command thus starting with NULL file handel.<br>
The reason "fastboot reboot" works is that it is done in one command. It doesn't arrive at<br>
the point where it tries to use the usb connection again.<br>
<br>
   * Here is the fix which I applied to protocol.c<br>
<br>
diff protocol.c ../../../orig/android-tools/core/fastboot/protocol.c <br>
64c64<br>
<         if((r > 0) && (r < 4)) {<br>
---<br>
>         if(r < 4) {<br>
102c102<br>
< //        usb_close(usb);<br>
---<br>
>         usb_close(usb);<br>
<br>
This avoids premature closing of the file handle to the usb connection.<br>
0 return value of usb_read() is legid.<br>
The "unknown status code" is probably not necessarily a reason to stop and close the handle.<br>
<br>
Interestingly enough: usb_osx.c does nothing, hence a primature close of the handle doesn't harm.<br>
I guess this is the reason why osx users never found that issue.<br>
<br>
<br>
   * What was the outcome of this action?<br>
"fastboot flash" and "fastboot reboot" both work as expected.<br>
<br>
<br>
-- System Information:<br>
Debian Release: 8.2<br>
  APT prefers stable-updates<br>
  APT policy: (500, 'stable-updates'), (500, 'stable')<br>
Architecture: amd64 (x86_64)<br>
<br>
Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)<br>
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)<br>
Shell: /bin/sh linked to /bin/dash<br>
Init: systemd (via /run/systemd/system)<br>
<br>
Versions of packages android-tools-fastboot depends on:<br>
ii  libc6        2.19-18+deb8u1<br>
ii  libselinux1  2.3-2<br>
ii  zlib1g       1:1.2.8.dfsg-2+b1<br>
<br>
android-tools-fastboot recommends no packages.<br>
<br>
android-tools-fastboot suggests no packages.<br>
<br>
-- no debconf information<br>
<br><br><br>---------- Forwarded message ----------<br>From: "殷啟聰 | Kai-Chung Yan" <<a href="mailto:seamlikok@gmail.com" target="_blank" rel="noreferrer">seamlikok@gmail.com</a>><br>To: <a href="mailto:800661-close@bugs.debian.org" target="_blank" rel="noreferrer">800661-close@bugs.debian.org</a><br>Cc: <br>Bcc: <br>Date: Mon, 22 Oct 2018 19:08:18 +0800<br>Subject: Closing this as already fixed<br>Closing this bug as it's already fixed, although the bug system seems to be unable to handle the situation where a binary package has been hijacked?<br>
<br>
</blockquote></div>