-
Notifications
You must be signed in to change notification settings - Fork 174
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
Use self.is_adb_detectable() to prevent build_info from None #923
Conversation
The logic is still trying to access |
The difference is that we can only use build_info when the device is detectable. Otherwise, the build_info is None. Here is the context:
That's why it is not in bootloader but still trying to access build_info Hence, I come up with two solutions
WDYT? |
Are you meaning you are initializing an We assume each |
Partially correct. There is the android device, but it is not detectable by adb or fastboot (even not in rom recovery mode and need ftdi commands to bring it back).
We will use some other recover scripts/tools to bring it back to fastboot or android and then use Android device. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @minghsikang)
tests/lib/mock_android_device.py
line 90 at r1 (raw file):
installed_packages=None, instrumented_packages=None, detectable=True,
Renaming this to adb_detectable
will be more accurate?
I see. I think in Mobly repo this change makes sense to prevent using a None as a dict. But for your usage, sounds like it would make more sense to first recover the device and then initialize |
Totally agree. |
…is not in bootloader. The logic now is trying to use build_info when it is not in bootloader, but if the device isn't detectable in neither adb nor fastboot, the exception occurs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @minghsikang)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @mhaoli and @minghsikang)
tests/lib/mock_android_device.py
line 90 at r1 (raw file):
Previously, mhaoli (Minghao Li) wrote…
Renaming this to
adb_detectable
will be more accurate?
Done.
It seems need your help to resolve the comment. |
The logic now is trying to use build_info when it is not in bootloader, but if the device isn't detectable in neither adb nor fastboot, the exception occurs.
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)