april update via ota with magisk - Google Pixel 2 XL Questions & Answers

Is it safe to take the ota with magisk or do I have to unroot and flash stock recovery?
I am on stock room and custom kernel atm

EnIXmA said:
Is it safe to take the ota with magisk or do I have to unroot and flash stock recovery?
I am on stock room and custom kernel atm
Click to expand...
Click to collapse
Hello, as Magisk changes boot image it will fail... The safetest method I think will be to download factory image, unzip, remove -w from flash-all.bat and then execute it... Then root again...

What did you do for the previous months updates?
You need to download the system image for the April update. You will need to extract the zip. Once you so that. Open up the flash. Bat file and erase the -w from the text then re-save it. Make sure you have twrp and your kernel stored locally on your phone. Reboot bootloader and run the .bat file. This process will not wipe your phone. After it's installed it will reboot your phone. Reboot bootloader and flash twrp.img through ADB. From there flash twrp.zip and your choice of kernel. Let your device reboot, then reboot into twrp and flash Magisk.
This should work as long as this update doesn't break twrp like February did. As always, you do this at your own risk.

MacTheRipperr said:
What did you do for the previous months updates?
You need to download the system image for the April update. You will need to extract the zip. Once you so that. Open up the flash. Bat file and erase the -w from the text then re-save it. Make sure you have twrp and your kernel stored locally on your phone. Reboot bootloader and run the .bat file. This process will not wipe your phone. After it's installed it will reboot your phone. Reboot bootloader and flash twrp.img through ADB. From there flash twrp.zip and your choice of kernel. Let your device reboot, then reboot into twrp and flash Magisk.
This should work as long as this update doesn't break twrp like February did. As always, you do this at your own risk.
Click to expand...
Click to collapse
Thanks. I bought the phone 2 weeks ago with the March security patch

Related

Systemless root, custom boot.img, no longer applies?

Hi guys, the last time I rooted my 5X was a very long time ago when I did a "traditional" root by using a modified boot.img. I checked out Heisenberg's guide to rooting thread and I no longer see references to systemless root or modified boot.img files. Is the current rooting method no longer requiring these things? Is the only root now systemless? I would like to update to the most recent stock rom and then re-root. Thanks.
When you install SuperSU (through TWRP) it will detect your nexus 5x needs systemless root and on the fly it will patch your boot.img (and backup your original boot.img to /data).
It will also install /data/su.img which is a mountable image containing SuperSUs main files.
If you do a factory reset, it will wipe out /data (and thus su.img) so you'll lose root, but you will still have the patched boot.img (meaning dm-verity verifying of /system and /vendor is disabled, /data is not forceencrypt, and some se contexts were adjusted)
To reinstall root in the case of factory reset, just reinstall SuperSU-*.zip. It will complain that it can't restore your boot.img (because it was also wiped out by the factory reset) but by that time everything has been installed to get root back so it'll just work.
Also, one other thing, you need to actually install twrp.img into the recovery partition (fastboot flash recovery twrp.img) rather than just taking the shortcut of doing fastboot boot twrp.img or twrp won't be able to decrypt your /data partition.
Thanks @sfhub. So sounds like the answer is yes SuperSU will only install the systemless root if you're on the 5x.
Is there anything else I would need to do in order to finalize the "systemless" portion of the root?
I.e. delete the /data/SU.img or something?
also - is there a way to know if my root is "systemless" or not? does the systemless route not have a supersu application installed?
Since I have the traditional root, ie using an old modified boot.img, should I just wipe my device and flash the newest firmware from adb? I'd like to keep everything in tact a go stock rooted on newest software but I'm worried I will brick my phone going from the traditional root to systemless method. Thoughts?
SeriesOfTubes said:
Since I have the traditional root, ie using an old modified boot.img, should I just wipe my device and flash the newest firmware from adb? I'd like to keep everything in tact a go stock rooted on newest software but I'm worried I will brick my phone going from the traditional root to systemless method. Thoughts?
Click to expand...
Click to collapse
You probably have systemless root already. The modified boot image was required until CF make it so SuperSU patched the boot on install. Anyway, thats kind of irrelevant now that you plan on updating.
The quickest way to update is to to flash the latest factory images. This is done in fastboot mode and with the tool called, you guessed it, fastboot. ADB and fastboot are not the same thing. ADB only works when booted up or in recovery. Fastboot only works in... fastboot mode. :good:
You can update without losing any of your installed application or data. To do this you need to edit one line in the flash-all.bat file (Windows) or the flash-all.sh file (Linux/Mac). This flash-all file is located in the tarball that contains the factory images. You simply need to remove the -w near the end of this file. So from...
this:
Code:
fastboot -w update image-bullhead-xxx##x.zip
to this:
Code:
fastboot update image-bullhead-xxx##x.zip
That way userdata is not wiped when you run the flash-all file.
To re-root I suggest you follow the guide HERE. Note that flashing the factory images will wipeout either of the root styles you may have at the moment.
EDIT: Obviously you need to reflash TWRP to flash SuperSU or any other flashable zip. If you aren't interested in Android Pay, you dont need to follow the instructions in the link i posted above. Simply flash the latest SuperSU.
EDIT 1: If you want to decript, might as well do it straight away. No sense in setting everything up that then wiping it out. Remember this is done by formatting data. You can do it just after flashing TWRP from within TWRP. Note wiping data and formatting data are two separate things.
Good luck.
Thanks for all the help, you guys are awesome.

Will I lose root if I accept the latest OTA?

Running stock image with root, is it usually safe to take ota's?
You will receive error when installing the OTA. Unroot and then update, or... since you already have the bootloader unlocked (for rooting) you can flash from a PC the latest factory image (with the -w removed form the flash-all.bat script).
If you use magisk, you can go into it and select uninstall and restore images. Do not reboot your phone. Install the OTA and once you're at step to, go into magisk and select install and select the OTA option. Wait for the update to finish and reboot. Afterwards you're rooted and updated.
severedsnake said:
Running stock image with root, is it usually safe to take ota's?
Click to expand...
Click to collapse
Magisk Uninstall never worked for me for some reason.
Download OTA to PC
Boot into TWRP
ADB Sideload OTA
reboot
powerdown
Boot into TWRP again
flash Magisk.zip
Done
You can even flash the OTA.zip in twrp as well. When done, just fastboot into twrp, flash the twrp installer zip, then kernel, then magisk, reboot, done :good:

flashing stock factory image without -w flag

Hi there. I wanted to go back to stock ROM, but with TWRP, caesium kernel and root/magisk. Right now I am on a custom ROM. So I wanted to backup with swift backup pro, TWRP. Then flash stock image to both slots / full wipe. Then boot to TWRP with fastboot, flash TWRP zip and kernel plus magisk, reboot TWRP and flash my debloater script. Then next month flash the factory image without the -w flag in the batch, and repeat the process above to have kernel and root. Am I missing something? Is the planned process proper? Or did I plan wrong steps?
I think you're fine, except an OTA will be more efficient the second time around.
Backup.
Connect P2XL to PC and Flash stock image to both slots.
Boot into TWRP using fastboot.
Install TWRP to the recovery ramdisk (as of TWRP 3.3.0-0).
Flash Magisk.
Flash your (unnecessary IMHO) debloater script.
Boot.
Enjoy the device until the next update, then...
Download a full OTA to the device.
Boot into TWRP.
Install the OTA.
Install TWRP to the recovery ramdisk (as of TWRP 3.3.0-0).
Flash Magisk.
Boot.
As of the release of TWRP 3.3.0-0 zip files are no longer available for installing TWRP to boot.img. TWRP will install itself into the boot.img by selecting "Install Image", then selecting "Install to recovery ramdisk".
Thanks, Sir.
OTA does not overwrite TWRP then?
Or flash OTA, boot to TWRP, flash TWRP as image, kernel & magisk? I guess I'll decrypt before flashing OTA?
An OTA will overwrite both TWRP and Magisk since it flashes a stock boot image. However, you are installing the OTA using TWRP and thus have TWRP resident in memory, so as long as you do not reboot you can flash TWRP to the ramdisk and then flash Magisk.
Strephon Alkhalikoi said:
An OTA will overwrite both TWRP and Magisk since it flashes a stock boot image. However, you are installing the OTA using TWRP and thus have TWRP resident in memory, so as long as you do not reboot you can flash TWRP to the ramdisk and then flash Magisk.
Click to expand...
Click to collapse
Thanks again, Sir.

Question How can reinstall stock ROM over TWRP recovery?

Hello.
How can I please reinstall the stock rom via TWRP recovery without data loss, or how can I reinstall it via the Miflash tool?
I have a bootloop and would like to try reinstalling rom. Thanks
basically what u can do is flash stock rom using mi flash tool. ensure that down to the bottom u click save user data. and i think u should be fine flashing the stock rom and preserving your data in that sense. after flashing wait and let the device reboot for itself it usually takes a couple mins
TormentedHeart said:
basically what u can do is flash stock rom using mi flash tool. ensure that down to the bottom u click save user data. and i think u should be fine flashing the stock rom and preserving your data in that sense. after flashing wait and let the device reboot for itself it usually takes a couple mins
Click to expand...
Click to collapse
I have already managed to boot into the system, in TWRP Recovery I wipe dalvik.
But I need root and I must to patch the boot.img again via Magisk. And then I must flash patched boot.img via ADB back to the mobile, but I'm afraid I'll go back to the bootloop.
Any other options to do root or avoid bootloop?
Thanks
jkmaxfli said:
I have already managed to boot into the system, in TWRP Recovery I wipe dalvik.
But I need root and I must to patch the boot.img again via Magisk. And then I must flash patched boot.img via ADB back to the mobile, but I'm afraid I'll go back to the bootloop.
Any other options to do root or avoid bootloop?
Thanks
Click to expand...
Click to collapse
Stupid question but did you extracted boot.img before or after update? Maybe you flashed patched boot.img from previous update to last update? That would cause bootloop
Greenspoof said:
Stupid question but did you extracted boot.img before or after update? Maybe you flashed patched boot.img from previous update to last update? That would cause bootloop
Click to expand...
Click to collapse
It's not a stupid question.
The update was displayed on my phone, downloaded, installed, restarted and booted into the system, everything is fine.
Then I had to download the update manually from the Internet and extract the boot.img. and I then patched it via Magisk and flashed it back to the mobile via ADB, and then a bootloop occurred.
jkmaxfli said:
I have already managed to boot into the system, in TWRP Recovery I wipe dalvik.
But I need root and I must to patch the boot.img again via Magisk. And then I must flash patched boot.img via ADB back to the mobile, but I'm afraid I'll go back to the bootloop.
Any other options to do root or avoid bootloop?
Thanks
Click to expand...
Click to collapse
basically to root its just best to flash the official magisk zip via twrp. it patches the boot img during the process. and u wont get bootloop

Question Poco F3: Is it possible to root keeping stock MIUI and OTA updates?

Hi there!! Is it possible to root the Poco F3, keeping stock MIUI and still get OTA updates, without any problem (no data loss, no app auth removal, etc)
With rooted stock rom, you still get OTA updates. The smaller incremental OTA update will refuse to install, and the phone will download the full rom instead. Once the full update installed, you will have to apply root again (eg. flash the patched boot.img from the new update).
kurtschmeichel said:
With rooted stock rom, you still get OTA updates. The smaller incremental OTA update will refuse to install, and the phone will download the full rom instead. Once the full update installed, you will have to apply root again (eg. flash the patched boot.img from the new update).
Click to expand...
Click to collapse
In case you're using Magisk, would you flash the OTA update and magisk in TWRP?
What about internal data, and 2FA or banking apps? Do I need to re-authorize everything after OTA update?
I found this video
which shows that you could OTA update by "disabling magisk" for a moment. Is this procedure good?
As said, I let the phone update itself automatically. Since the smaller incremental update will not work, the phone will ask to download the bigger (±3 GB) updater. Once downloaded, it will overwrite the previously patched (rooted) boot.img.
So, when the update has finished and the phone has rebooted, you won't have root access anymore. In order to restore root access, you will have to flash a new patched boot.img.
There are different ways. I always use fastboot on my Mac. On a mac or pc, download the fastboot or recovery file of the new update that was just installed. Extract boot.img from that file. Send the file to the phone and patch it with Magisk. Send the patched boot.img back to the mac or pc and flash it to the phone (both a and b partitions) with fastboot.
Yeah, the only problem really is that, the boot-partition gets replaced with an update. So with every update you have to re-flash the patched boot.img
Magisk can patch TWRP Backups too, you can then restore the patched Boot-partition in TWRP!
So this is what I do to get Root again after an Update:
1. Boot into Fastboot Mode
2. Boot into TWRP SKKK
3. Backup Boot-partition
4. Boot Android
5. Open Magisk & patch /sdcard/TWRP/Backups/boot.emmc.win
6. Rename /Downloads/magisk_patched_xxx.img to "boot.emmc.win"
7. Move (and replace, when asked) to /sdcard/TWRP/Backups/boot.emmc.win
8. Boot TWRP SKKK and restore patched Boot
cyanGalaxy said:
Yeah, the only problem really is that, the boot-partition gets replaced with an update. So with every update you have to re-flash the patched boot.img
Magisk can patch TWRP Backups too, you can then restore the patched Boot-partition in TWRP!
So this is what I do to get Root again after an Update:
1. Boot into Fastboot Mode
2. Boot into TWRP SKKK
3. Backup Boot-partition
4. Boot Android
5. Open Magisk & patch /sdcard/TWRP/Backups/boot.emmc.win
6. Rename /Downloads/magisk_patched_xxx.img to "boot.emmc.win"
7. Move (and replace, when asked) to /sdcard/TWRP/Backups/boot.emmc.win
8. Boot TWRP SKKK and restore patched Boot
Click to expand...
Click to collapse
Thanks so much!
What about for the OTA procedure instead?
lillo9546 said:
Thanks so much!
What about for the OTA procedure instead?
Click to expand...
Click to collapse
Yup my instructions are for updates!
Unfortunately there is no "automatic way" to regain Root after an Update, at least AFAIK.
If you mean you want the small incremental updates to work, I'm not sure due to the altered Boot-partition. Might be best to use the Full Updates. ^^
You could also just flash Magisk.apk in TWRP or OrangeFox because it's also a Flashable ZIP-file, instead of manually having to patch Boot-partition.
I personally haven't done that in a long while, and the official FAQ-page of Magisk says, that that method is outdated and unsupported now, but apparently still works!
I forgot to mention OrangeFox in my previous post, but seems like a newer, better Custom Recovery than TWRP. You can also use that instead of TWRP. But make sure to use the latest Beta instead of Stable from the official Website because only the Beta can view /data (Android 12 Encryption Support). Stable TWRP also doesn't yet support A12 Encryption, only TWRP SKKK (Beta-version).
cyanGalaxy said:
Yeah, the only problem really is that, the boot-partition gets replaced with an update. So with every update you have to re-flash the patched boot.img
Magisk can patch TWRP Backups too, you can then restore the patched Boot-partition in TWRP!
So this is what I do to get Root again after an Update:
1. Boot into Fastboot Mode
2. Boot into TWRP SKKK
3. Backup Boot-partition
4. Boot Android
5. Open Magisk & patch /sdcard/TWRP/Backups/boot.emmc.win
6. Rename /Downloads/magisk_patched_xxx.img to "boot.emmc.win"
7. Move (and replace, when asked) to /sdcard/TWRP/Backups/boot.emmc.win
8. Boot TWRP SKKK and restore patched Boot
Click to expand...
Click to collapse
Can i do this procedure to dirty flash miui updates?
1. Boot twrp using Power button + Volume Up
2. Flash the ota update zip.
3. Reboot.
Can i do this?
gigavolthavoc07 said:
Can i do this procedure to dirty flash miui updates?
1. Boot twrp using Power button + Volume Up
2. Flash the ota update zip.
3. Reboot.
Can i do this?
Click to expand...
Click to collapse
Yes but make sure to use a Full OTA zip, not an incremental update zip. (the ZIP files in range of ~1-3 GB, not the ~300 MB incremental update-files)
cyanGalaxy said:
Yes but make sure to use a Full OTA zip, not an incremental update zip. (the ZIP files in range of ~1-3 GB, not the ~300 MB incremental update-files)
Click to expand...
Click to collapse
thanks man
Which custom recovery is MIUI OTA enabled?
I can't find it in Orangefox, show me!
Dirt.
orangefox version: [email protected] . 1_1_A12
user2332 said:
Which custom recovery is MIUI OTA enabled?....
Click to expand...
Click to collapse
Probably none. There is no point in trying to do that.
If you say so, I'll believe it. Thank you very much! I don't even bother with it anymore.
my way is to backup stock boot vendor_boot dtbo from twrp before flashing twrp and whenever i want to ota update i restore the backup and reboot
magisk will be gone
twrp will be gone
i start the ota update, it'll flash the small incremental update instead of using the entire 3gb rom

Categories

Resources