How to extract boot.img for Magisk 14 ? - Sony Xperia XZ Premium Guides, News, & Discussion

https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Add boot image file patch feature - you can patch boot images without root!

Related

[BOOT] Magisk 14.4 Rooted boot image for Android 8.1 Development Preview 1

Here is a Magisk Rooted boot image for 8.1 Development preview.
Instructions:
fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
https://drive.google.com/file/d/10vclwNQUUbgGyUJLvXGD3pnTZtoX98vg/view?usp=sharing
How to create your own:
This method does not need root, and also does not require a custom recovery.
Download Magisk Manager from here
Press Install > Install > Patch Boot Image File, and select your stock boot image file
Magisk Manager will now patch your boot image, and store it in [Internal Storage]/MagiskManager/patched_boot.img
Flash the patched boot image to your device and reboot. VoilĂ !
Click to expand...
Click to collapse

Troubles with stock image while uninstalling Magisk

Hi there.
I'm trying to update my phone to Oreo January patch, I'm currently with December patch that is such bugged. Well as I read I have to download the update and before installing it I have to uninstall Magisk restoring the boot image and then after the update installing the boot image of Magisk again, I tried to flash the ROM with MiFlash saving the user data to solve it, and I did it but all my data just gone I don't know why, well the thing is that I updated, I thought, and then I flashed the patched boot image of Magisk in fastboot mode, and there is where I missed the boot image and I lost the update maybe...
Is there an option to flash JUST the boot image and not all the ROM or put the stock boot image just into a Magisk folder to have it?
If you install magisk using magisk manager, it will backup your original boot image and when you uninstall magisk, it will restore your boot image.
If you want to manually flash your boot image, you can do that in fastboot mode.
Code:
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
You can get your stock boot image from the rom files that you used in MiFlash tool. (boot image is inside that rom folder/zip file)
In miflash, you need to make sure you select the"save user data" option in the lower right corner. The file it will use is the "flash all except storage" file. Then, don't flash magisk. Update, them worry about rooting.
RavinduSha said:
If you install magisk using magisk manager, it will backup your original boot image and when you uninstall magisk, it will restore your boot image.
If you want to manually flash your boot image, you can do that in fastboot mode.
Code:
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
You can get your stock boot image from the rom files that you used in MiFlash tool. (boot image is inside that rom folder/zip file)
Click to expand...
Click to collapse
Hey, thanks for your answer, I manually flashed my boot image to update my phone to January Update but it didn't work, when I try to install the update it says "Couldn't install the update, try again later"
Any idea to solve this?

[Q] OTA Update with Root; is it this hard?

I feel like I'm overthinking this, and doing it so much more difficult than it should be. I have stock ROM, patched boot (with Magisk), and unlocked bootloader. When I try using the default update from my phone's "check update", it'll show "Installation Failed" error. This error still occurs with clean boot file as well.
So I had to do the following steps to actually get the update, and I feel like I'm over-complicating things:
1) Download SIDELOAD update from Essential and put it into the platform-tools directory (named OTAUpdate.zip for this post's purpose).
2) Download STOCK of the corresponding version here and pull out HYP, RPM, and BOOT files.
3) Remove PIN, enable USB debugging, and boot into bootloader:
adb reboot bootloader
4) Flash TWRP:
fastboot flash boot_a twrp-3.2.3-0-mata.img
fastboot flash boot_b twrp-3.2.3-0-mata.img
5) Flash old HYP and RPM from pre September 2018 patches (so TWRP touchscreen works):
fastboot flash hyp_a hyp_old
fastboot flash hyp_b hyp_old
fastboot flash rpm_a rpm_old
fastboot flash rpm_b rpm_old
6) Boot into TWRP:
fastboot reboot recovery
7) Go into: Advanced -> ADB Sideload -> Swipe to Start Sideload
8) Sideload the update on command prompt:
adb sideload OTAUpdate.zip
9) Boot into Bootloader:
adb reboot bootloader
10) Flash the new HYP, RPM, and Boot:
fastboot flash hyp_a hyp.mbn
fastboot flash hyp_b hyp.mbn
fastboot flash rpm_a rpm.mbn
fastboot flash rpm_b rpm.mbn
fastboot flash boot_a boot
fastboot flash boot_b boot
11) Copy over the boot file from Step 2 to the phone, and rename to boot.img.
12) Install/open Magisk Manager, then:
Install -> Install -> Patch Boot Image File -> Select the boot.img from Step 11
13) Copy the patched_boot.img file back to the platform-tools directory on PC.
14) Reboot into bootloader.
adb reboot bootloader
15) Flash the patched boot file:
fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
16) Reboot.
fastboot reboot
17) Open Magisk Manager and check if all is okay. Then add PIN and disable USB debugging mode.
Click to expand...
Click to collapse
What am I doing wrong // what is a more simpler method?
Printerscape said:
What am I doing wrong // what is a more simpler method?
Click to expand...
Click to collapse
Assumption: You have TWRP recovery installed.
Download the OTA zip from Essential website to the internal phone storage
*Optional* Remove lockscreen security (PIN/Password/Pattern)
Ensure that you have TWRP zip and Magisk zip files on internal phone storage
Reboot to TWRP recovery
Install OTA zip, and then TWRP zip.
Reboot back to OS, to ensure that everything is loaded properly and device is up to date
Reboot back to recovery and then install Magisk
Reboot and all should be good.
You could probably amalgamate the last 3 steps and install Magisk right after TWRP but I like to ensure that the OTA worked.
You could also add in the step to perform a TWRP backup before flashing the OTA zip, if you wish.
goofball2k said:
Assumption: You have TWRP recovery installed.
Download the OTA zip from Essential website to the internal phone storage
*Optional* Remove lockscreen security (PIN/Password/Pattern)
Ensure that you have TWRP zip and Magisk zip files on internal phone storage
Reboot to TWRP recovery
Install OTA zip, and then TWRP zip.
Reboot back to OS, to ensure that everything is loaded properly and device is up to date
Reboot back to recovery and then install Magisk
Reboot and all should be good.
You could probably amalgamate the last 3 steps and install Magisk right after TWRP but I like to ensure that the OTA worked.
You could also add in the step to perform a TWRP backup before flashing the OTA zip, if you wish.
Click to expand...
Click to collapse
But when I flash TWRP by itself to boot (TWRP-3.2.3-0-mata.img), touch doesn't work, thus I have to flash the older hyp/rpm files.
If you have that problem, this img could be used to boot from, then you can flash the OTA and twrp zip file.
https://drive.google.com/open?id=1YxJJj96Web0ikHXdHf_zboZT_KSYl7Nj
If you have Magisk, it's even easier than others have said. Before taking the Ota, have Magisk Manager uninstall Magisk. It should restore the stock boot image. If you started with a patched boot image, this won't work though. Magisk backs up the stock boot image when you install Magisk either in TWRP or when you have it patch the boot image manually.
Then take the OTA. Before restarting, go back to Magisk Manager and install Magisk again, use the Direct method. If it says it was successful, reboot and you should be good.

Magiks boot img

Does the device supports magisk boot.img patch?

BAH-W09 boot loop after Magisk patched boot.img

My friend give me a Huawei Mediapad with lastest stock rom EMUI 5.1.3 and Android 7.0 installed. I want to root it with Magisk. After successful unlock bootloader, flash twrp, than I tried to flash Magisk 25.2 under twrp. The flash process output some permission denied error with /data/... path, but return success result. After reboot, it enter the boot loop. Then, I boot to recovery and try to uninstall Magisk, but not success. I need to recover it by flash the original boot.img from fastboot to make it boot again. Next, I tried to patch the boot.img under Magisk Manager. This time, I got the patched boot.img and flash it again in fastboot mode. It's the same result. All the patched boot.img by using differnt patch options are not boot successfully. Any procedures to make root successul on this rom?

Categories

Resources