Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use "bugreport xx.zip" with a mobile phone with adbkit #117

Open
qkmaosjtu opened this issue Sep 8, 2019 · 4 comments
Open

Can't use "bugreport xx.zip" with a mobile phone with adbkit #117

qkmaosjtu opened this issue Sep 8, 2019 · 4 comments

Comments

@qkmaosjtu
Copy link

I set up a adbkit environment on my local PC, there are three devices in my adb connect:
image
Actually,8B2Y0T3LX and localhost:54321 are one device.
When I run

adb -s 8B2Y0T3LX bugreport hello.zip

, the command run successfully;
image
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.

image
If I adb shell into localhost:54321, bugreport can runs successfully:
image
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
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@qkmaosjtu
Copy link
Author

qkmaosjtu commented Sep 8, 2019

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.

@siva-kranthi
Copy link

Facing same issue. Any update on this

@jupe
Copy link

jupe commented Nov 24, 2023

any news? Any workaround solutions for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants