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

Search This thread

capntrips

Senior Member
Aug 29, 2020
216
412
OnePlus 6T
Google Pixel 6

Well that happened earlier in the process than I expected. See if this resolves it for you:

v1.0.0-alpha04-simplified-paths

If not, let me know where you can find the paths to your vbmeta partitions on your device and if you have an fstab file somewhere in your /vendor/etc folder.

Mine is Samsung Device. A52s.

I should note that I know little about Samsung devices. I'm going to assume you have a means of flashing a clean copy of your vbmeta partition if something goes wrong.
 

capntrips

Senior Member
Aug 29, 2020
216
412
OnePlus 6T
Google Pixel 6
vbmeta - /dev/block/bootdevice/by-name/
vbmeta_system - /dev/block/bootdevice/by-name/

Also attached vbmeta.img & vbmeta_system.img with fstab files.

I assume you got a new exception? Can you post the stacktrace?

To confirm, neither /dev/block/by-name/vbmeta_a nor /dev/block/by-name/vbmeta_b exist?

Can you give me the output of each of these:

Code:
getprop ro.boot.fstab_suffix
getprop ro.boot.hardware
getprop ro.boot.hardware.platform

One of those should be qcom. Was fstab.qcom in /vendor/etc? If not, was it in any of /odm/etc, /, or /first_stage_ramdisk?

Also, what is the output of getprop ro.boot.slot_suffix?
 

theghostkill

Member
Jul 15, 2017
42
6
I assume you got a new exception? Can you post the stacktrace?

Also got an popup error Failed to get magic
To confirm, neither /dev/block/by-name/vbmeta_a nor /dev/block/by-name/vbmeta_b exist?
No, A52s doesn't have slots. So, only vbmeta and not any of _a or _b
Can you give me the output of each of these:

Code:
getprop ro.boot.fstab_suffix
default
Code:
getprop ro.boot.hardware
qcom
Code:
getprop ro.boot.hardware.platform
no output - empty

ro.board.platform := lahaina
One of those should be qcom. Was fstab.qcom in /vendor/etc? If not, was it in any of /odm/etc, /, or /first_stage_ramdisk?
fstab.qcom and two other files in that zip was in vendor/etc
not in odm/etc
there is first_stage_ramdisk folder
Also, what is the output of getprop ro.boot.slot_suffix?
no output - empty
 
Last edited:

capntrips

Senior Member
Aug 29, 2020
216
412
OnePlus 6T
Google Pixel 6
log4

vbmeta is in /dev/block/bootdevice/by-name as well as in /dev/block/by-name

Are you able to run any of the following in a root shell:

Code:
dd if=/dev/block/by-name/vbmeta bs=4 count=1 status=none
busybox dd if=/dev/block/by-name/vbmeta bs=4 count=1 status=none
/data/adb/magisk/busybox dd if=/dev/block/by-name/vbmeta bs=4 count=1 status=none

If so, do any of them output AVB0? Note that dd it doesn't print a newline after output, so it may print before the prompt.
 

theghostkill

Member
Jul 15, 2017
42
6
Are you able to run any of the following in a root shell:

Code:
dd if=/dev/block/by-name/vbmeta bs=4 count=1 status=none
busybox dd if=/dev/block/by-name/vbmeta bs=4 count=1 status=none
/data/adb/magisk/busybox dd if=/dev/block/by-name/vbmeta bs=4 count=1 status=none

If so, do any of them output AVB0? Note that dd it doesn't print a newline after output, so it may print before the prompt.
Yes, for first and third command, getting AVB0 at the beginning of the new line

For second getting this -
Code:
/system/bin/sh: busybox: inaccessible or not found
 

capntrips

Senior Member
Aug 29, 2020
216
412
OnePlus 6T
Google Pixel 6
Don't know what you mean by this

For example, if I issue the above command for one of the slots on a Pixel 5a, it looks like this:

Code:
barbet:/ $ su
barbet:/ # dd if=/dev/block/by-name/vbmeta_a bs=4 count=1 status=none
AVB0barbet:/ #

At first glance, it appears that there was no output, but the last line is AVB0barbet, rather than just barbet.

In any case, I took a closer look at the previous stacktrace, and I think I figured out the problem:

v1.0.0-alpha04-allow-non-ab2

Edit: I'm fading fast, so it may be morning before I make any additional replies.
 

theghostkill

Member
Jul 15, 2017
42
6
For example, if I issue the above command for one of the slots on a Pixel 5a, it looks like this:

Code:
barbet:/ $ su
barbet:/ # dd if=/dev/block/by-name/vbmeta_a bs=4 count=1 status=none
AVB0barbet:/ #

At first glance, it appears that there was no output, but the last line is AVB0barbet, rather than just barbet.

In any case, I took a closer look at the previous stacktrace, and I think I figured out the problem:

v1.0.0-alpha04-allow-non-ab2

Edit: I'm fading fast, so it may be morning before I make any additional replies.
Yes, for first and third command, getting AVB0 at the beginning of the new line like yours AVB0barbet:/

For second getting this -
Code:
/system/bin/sh: busybox: inaccessible or not found
 

theghostkill

Member
Jul 15, 2017
42
6
For example, if I issue the above command for one of the slots on a Pixel 5a, it looks like this:

Code:
barbet:/ $ su
barbet:/ # dd if=/dev/block/by-name/vbmeta_a bs=4 count=1 status=none
AVB0barbet:/ #

At first glance, it appears that there was no output, but the last line is AVB0barbet, rather than just barbet.

In any case, I took a closer look at the previous stacktrace, and I think I figured out the problem:

v1.0.0-alpha04-allow-non-ab2

Edit: I'm fading fast, so it may be morning before I make any additional replies.
Yes, the app is working now. Thank you for giving your time.
 
  • Like
Reactions: capntrips

bzz11g

Senior Member
Oct 17, 2010
139
66
OnePlus 5
Google Pixel 6
Hi @capntrips ! Have you tried updating your phone over the air with the new Magisk v25?
I updated my phone before it became available, but on our local forum people write that the root did not appear after the update and that they had to patch the kernel and install it via fastboot on PC
 

shoey63

Recognized Contributor
Got my first "device corrupted" and stuck on Google splash screen after updating 13 beta 3 to beta 4 OTA using latest Magisk canary. Forced a couple of reboots holding power button to get back to the working slot. (I reinstalled Magisk to active and inactive slots before rebooting so I still have root)
Corrupt message gone.
Beta 2 to Beta 3 was flawless. Anyone manage it OTA?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 30
    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.