chenxiaolong / avbroot

Sign (and root) Android A/B OTAs with custom keys while preserving Android Verified Boot
GNU General Public License v3.0
436 stars 41 forks source link

How to replace the partition when rooting a device with init_boot #281

Closed dumet12138 closed 1 month ago

dumet12138 commented 1 month ago

For devices shipped with Android 13 or higher, the ramdisk is in init_boot. If I manually patch init_boot, how do I need to replace the partition? Should I use --prepatched or --replace to replace a partition

chenxiaolong commented 1 month ago

If your patches are for enabling root access, use --prepatched. If you're editing other files in the ramdisk that are unrelated to root access, use --replace (avbroot will apply the root patches for you in this scenario.)