Status Update
Comments
tn...@google.com <tn...@google.com> #2
What do you see when you do: `adb reboot && adb wait-for-device` (this is a commonly used pattern and will continue to be supported - adb will block until the device initializes).
adb usage (for most cases, including `devices`) does *not* require root (root would be needed only when you need to do specialized tasks like push. The behavior of `adb devices` should not be contingent on root.
You might also want to see what gets reported (in response to `adb devices`) after doing `adb unroot`.
If there's still any residual questions, I'll need to look at the host/server logs (and possibly the device logs) - you can attach those to this bug.
sp...@google.com <sp...@google.com> #3
Same behavior is observed after running adb root when root is not already acquired.
note that adb root
re-starts the adbd running on the device. so the common element here -- if you're all talking to the same device(s) -- might be "there's a problem with the usb stack on the devices we're talking to, that means they don't come back when adbd restarts".
sp...@google.com <sp...@google.com> #4
I have the same issue and I've actually found the problem and have a tested fix.
In usb_linux.cpp, where the following code is:
unsigned char length = bufptr[0];
unsigned char type = bufptr[1];
A corsair usb device results in a type
and length
of both 0, even though all processing in the code is correct. It has several good descriptors, eventually followed by a length and type of 0, before bufptr gets to the full descriptor length. Therefore, this code loops indefinitely, and plugging in new devices is never found.
The fix is simple:
@@ -292,6 +292,9 @@ static void find_usb_device(const std::string& base,
device->iSerialNumber, zero_mask, max_packet_size);
break;
}
+ } else if (length == 0) {
+ D("interface descriptor has wrong size");
+ break;
} else {
bufptr += length;
}
Description
Currently, with
android.lintOptions.textReport true
, lint will output results to stdout when theAndroidLintTask
(e.g.,lintDebug
) runs, but there will be no such output if the task is up-to-date, which might mislead users to think that there are no lint issues.The desired behavior is for lint to output issues to stdout even if the task is up-to-date (or not to output anything if there are no issues - see Issue 158259845 ).
A possible fix would be to add a new lightweight task which would never be up-to-date and would only print the text report. I.e., change the lint build flow from this:
lintAnalyzeDebug
->lintDebug
to this:
lintAnalyzeDebug
->lintReportDebug
->lintDebug
where the new
lintReportDebug
task is the oldlintDebug
task, and the newlintDebug
is the lightweight task that is never up-to-date.Rejected alternative:
I considered modifying Issue 189877657
AndroidLintCopyReportTask
to print out the text report, but that task will not run ifAndroidLintTask
is up-to-date. In fact, we can consider adding that task's functionality to the new lightweight lint task to properly fixPS - Thanks to Tor for noticing this issue :)