adbkit
adbkit copied to clipboard
Can't use "bugreport xx.zip" with a mobile phone with adbkit
I set up a adbkit environment on my local PC, there are three devices in my adb connect:
Actually,8B2Y0T3LX and localhost:54321 are one device.
When I run
adb -s 8B2Y0T3LX bugreport hello.zip
, the command run successfully;
But when I run
adb -s localhost:54321 bugreport hello.zip
error occurred:
Failed to get bugreportz version: 'bugreportz -v' returned '1.1' (code 0).
If the device does not run Android 7.0 or above, try 'adb bugreport' instead.
If I adb shell into localhost:54321, bugreport can runs successfully:
So maybe there is any str or other params were added in adbkit commands? I read adb source code and find where the error occurs: https://android.googlesource.com/platform/system/core/+/refs/tags/android-8.1.0_r3/adb/bugreport.cpp
if (status != 0 \|\| bugz_version.empty()) {
--
| D("'bugreportz' -v results: status=%d, stdout='%s', stderr='%s'", status,
| bugz_output.c_str(), bugz_version.c_str());
| if (argc == 1) {
| // Device does not support bugreportz: if called as 'adb bugreport', just falls out to
| // the flat-file version.
| fprintf(stderr,
| "Failed to get bugreportz version, which is only available on devices "
| "running Android 7.0 or later.\nTrying a plain-text bug report instead.\n");
| return SendShellCommand("bugreport", false);
| }
|
| // But if user explicitly asked for a zipped bug report, fails instead (otherwise calling
| // 'bugreport' would generate a lot of output the user might not be prepared to handle).
| fprintf(stderr,
| "Failed to get bugreportz version: 'bugreportz -v' returned '%s' (code %d).\n"
| "If the device does not run Android 7.0 or above, try 'adb bugreport' instead.\n",
| bugz_output.c_str(), status);
| return status != 0 ? status : -1;
| }
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.
Some update: Wether the process of "Battery Status" on stf hosted Battery Status Management Services of the device? I shell into a device and generate a bugreport but it can't be analysis by Battery Historian. There seems not BATTERY_CHARGER_STATUS in the bugreport.
Facing same issue. Any update on this
any news? Any workaround solutions for this?