Repository navigation
v2.5.2: the Root page flashes only the phone the image was made on - #25
Merged
Merged
Conversation
The Root page did not restart the phone when any device was already in fastboot, and then took the first fastboot device it found. With a second phone sitting in fastboot, the patched image was written to that phone while the confirmation named this one. - toBootloader always restarts this phone by its serial (adb -s), unless that serial is already in fastboot, and accepts only that serial, or a single device that was not in fastboot before (some phones show another serial there). A device that was already in fastboot is never used; when the phone cannot be told apart it gives up with a message. Boot once uses the same path. - RootHelper.PickFastbootSerial holds that choice, with tests. - USB check restarts the one usable adb phone by its serial; with none or several it says so instead of running adb without -s. - CI: the fake adb's reboot bootloader makes the phone appear in the fake fastboot next to the phone already there, and the root step checks the flash went to FBE0SAMPLE02 only. - Version 2.5.2, release notes in Arabic and English.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
RootUI.toBootloaderhad two faults:serials[0].With a second phone sitting in fastboot, the patched image was written to that phone, while the confirmation named this one. Boot once used the same path.
The fix
The phone is always restarted by its serial (
adb -s SERIAL reboot bootloader), unless that serial is already in fastboot.RootHelper.PickFastbootSerialaccepts:A device that was already in fastboot is never used. If the phone cannot be told apart, the app stops with the existing "did not show up" message instead of guessing.
USB check now restarts the one usable adb phone by its serial. With none or several connected, it says so instead of running
adb reboot bootloaderwithout-s. The new strings are in English and Arabic.Tests
4 new unit tests for
PickFastbootSerial. All 251 Core tests pass.CI root step, which models the bug scenario:
reboot bootloaderadds FBE0SAMPLE02 next to it.-s FBE0SAMPLE02exactly once, never to FBE0SAMPLE01, and that the phone was restarted by its serial.With the old code this step would flash FBE0SAMPLE01.
Version 2.5.2. The release notes are in Arabic and English.