Development [DEV][EOL] Vbmeta Patcher, Devinfo Patcher, and Boot Image Tool

Search This thread

capntrips

Senior Member
Aug 29, 2020
212
395
OnePlus 6T
Google Pixel 6
After a clean flash of the March update with the flash tool, I tried to take the April OTA with Magisk 24.3 stable, but it bootlooped 3 times (Google logo only, it never made it to G logo with the progress bar) then rolled back to the March slot.

If anyone successfully takes the delta OTA, please share what version of Magisk you used.
 

shoey63

Recognized Contributor
After a clean flash of the March update with the flash tool, I tried to take the April OTA with Magisk 24.3 stable, but it bootlooped 3 times (Google logo only, it never made it to G logo with the progress bar) then rolled back to the March slot.

If anyone successfully takes the delta OTA, please share what version of Magisk you used.
Failed on 24305 - straight to fastboot.
Restarted 3 times to switch back to March slot.
Tried again with 24301 (Alpha) which worked last month - success.
Note: modules and zygisk disabled.
 

Attachments

  • 24301.apk
    10.5 MB · Views: 7
  • Like
Reactions: capntrips

capntrips

Senior Member
Aug 29, 2020
212
395
OnePlus 6T
Google Pixel 6
Magisk 24306 (release notes) is now available on the canary channel, and I can confirm that it is works for taking the April OTA.

If anyone has trouble with the April (or May, when the time comes) OTA, after having gone through the process several times here, I'll share the commands to grab the appropriate logs:

If you get far enough for adb to connect before it bootloops, you can run the following:

Code:
adb shell su -c dmesg > dmesg.log
adb logcat > logcat.log

Once you reboot back to the bootloader, rollback to your previous slot:

Code:
fastboot --set-active=a
fastboot continue

Once you boot back into the previous, slot, run the following to grab your ramoops:

Code:
adb shell su -c cp /sys/fs/pstore/console-ramoops-0 /sdcard/Download
adb pull /sdcard/Download/console-ramoops-0

Then post the files to the issue on the Magisk Github.

Depending on how far you get into booting the new version, you may be unable to rollback to the previous slot. It'll ask you to factory reset, but you can just manually flash the update to avoid wiping your data.
 
Last edited:

capntrips

Senior Member
Aug 29, 2020
212
395
OnePlus 6T
Google Pixel 6

Unfortunately, it appears I'm not logging the stacktrace. I added it to the error screen and made it selectable, for ease in sharing:

v1.0.0-alpha04-exceptions

The first 10 or so lines should be plenty.

Wait...is this only for Pixel 6? I directly checked from github, then came here...

I have tested it on both a Pixel 6 and a Pixel 5a. I tried to make the apps device agnostic, but they have had no testing outside of Pixels. The vbmeta format should theoretically be the same, though there maybe some variation in locating things between devices, which I'm guessing is the issue here.
 

capntrips

Senior Member
Aug 29, 2020
212
395
OnePlus 6T
Google Pixel 6
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Have you tried updating your phone over the air with the new Magisk v25?
    Yes, I installed the June update OTA via System Update after updating to 25001, and it worked without an issue. I have rebooted a few times since, and I never lost root.
  • 29
    The original purpose of these three apps was to help deal with the changes in Android 12 when taking an OTA. Most of the functionality has been superseded by the newest builds of Magisk.

    Vbmeta Patcher is still useful when migrating from Magisk builds before 23016, and Boot Image Tool can still be used for downloading backups of newly installed boot images or restoring missing backups for Magisk.

    I'll leave the links and descriptions below, but future development of these apps is unlikely.

    Vbmeta Patcher screenshot
    Devinfo Patcher screenshot
    Boot Image Tool screenshot


    Vbmeta Patcher is an Android app that toggles the disable flags of the vbmeta partitions.

    Devinfo Patcher is an Android app that marks the inactive slot as successful on devices with a valid devinfo partition.

    Boot Image Tool is an Android app that helps juggle boot images for OTAs.
    1. Uninstall -> Restore Images in the Magisk app.
    2. Take the OTA in System Update. Do NOT reboot.
    3. Install -> Install to Inactive Slot in the Magisk app.
    4. Reboot (NOT in System Update).

    Latest Updates

    2022-05-01 Boot Image Tool v1.0.0-alpha03
    2021-11-19 Devinfo Patcher v1.0.0-alpha02
    2021-11-19 Vbmeta Patcher v1.0.0-alpha04
    10
    I made a new build of Magisk that will detect the vbmeta partition, set KEEPVBMETAFLAGS, and AVBv2 sign the boot image after patching. This allows you to root without patching vbmeta or wiping data.

    It also has the updated bootctl binary, so you can flash to the inactive slot after an OTA.

    I updated the related pull request, but it will remain in draft status until it is compatible with all of the possible algorithm types.

    The steps to take an OTA with this will be:
    1. Restore Images in the Magisk app.
    2. Take the OTA in System Update. Do NOT reboot.
    3. Install Magisk to the Inactive Slot in the Magisk app.
    4. Reboot (NOT in System Update).
    If you're taking the OTA on with vbmeta patched with disable flags, you'll have to restore vbmeta in Vbmeta Patcher, first. After that, vbmeta will remain stock.

    Edit: I pulled the build, patching vbmeta is not required since 23016.
    8
    Devinfo Patcher has been released. See the OP for usage details.

    Until there is movement on the Magisk end, you'll have to use my builds of Magisk to enable flashing to the inactive slot.

    As I noted previously, I would rather not maintain ongoing builds of Magisk, so depending on what, if anything, ends up in Magisk in the near future, I may make an all-in-one tool. In that case, I imagine I'll stop developing the individual apps, but I'll leave up the final builds of each, if that happens.
    8
    I made a new build of Magisk that will patch and restore the vbmeta partition on Magisk install and uninstall. It also includes the bootctl binary from the previous release. I made a draft pull request (closed in favor of #5018) to start the process of getting this into mainline.

    Once all of the backups are in place, the steps to take an OTA with this will be:
    1. Restore Images in the Magisk app (which will also restore the stock vbmeta partition from backup).
    2. Take the OTA in System Update. Do NOT reboot.
    3. (optional, but recommended) Direct Install Magisk in the Magisk App (which will also patch and backup the vbmeta partition in the active slot).
    4. Install Magisk to the Inactive Slot in the Magisk App (which will also patch and backup the vbmeta partition in the inactive slot, mark the inactive slot as active, and mark it as successful during the first boot).
    5. Reboot (NOT in System Update).
    The first time you restore images, you'll have to restore vbmeta in Vbmeta Patcher. After that, Magisk will keep backups of the stock images.

    Note: This is now obsolete. Recent builds no longer a need to patch the vbmeta partition.
    6
    Any address to donate to?
    I look at it as my contribution back to the community. If you really want to make a monetary contribution, I suggest Code.org or EFF.