Skip to content

v2.5.2: the Root page flashes only the phone the image was made on - #25

Merged
ifoknr merged 2 commits into
masterfrom
fix-root-target
Oct 15, 2026
Merged

ifoknr merged 2 commits into
masterfrom
fix-root-target

Conversation

@ifoknr

@ifoknr ifoknr commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

The bug
RootUI.toBootloader had two faults:

  • it skipped restarting the phone whenever any device was already in fastboot;
  • it then took 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.PickFastbootSerial accepts:

    • this serial; or
    • a single device that was not in fastboot before (some phones show another serial in fastboot).

    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 bootloader without -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:

    • FBE0SAMPLE01 stays in fastboot the whole time.
    • The fake adb's reboot bootloader adds FBE0SAMPLE02 next to it.
    • The step checks that the flash went to -s FBE0SAMPLE02 exactly 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.

ifoknr and others added 2 commits October 15, 2026 14:26
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.
@ifoknr
ifoknr merged commit 6c73b9a into master Oct 15, 2026
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

Successfully merging this pull request may close these issues.

1 participant