Question OTA update while retaining magisk - Google Pixel 6 Pro

I would like to install the latest Google OTA update but also keep root.
I heard you can do the following to retain root:
Open magisk
Click on "uninstall magisk"
You will then be asked if you want to "completely uninstall" or (restore image). You will choose to restore image
This restored image allows you to update your phone and you still retain root AS LONG AS YOU DON'T RESTART. So you do just that, you update and DON'T restart
After the update go back to magisk manager and press install. You will be asked how you want to install it (patch boot image, direct install etc). Select inactive slot.
Reset phone and enjoy!
But I walk against a wall against at step 3
Magisk never backed up my original boot image as I flashed it through fastboot. Where do I place the original image for magisk to find it? And what will my file have to be called? Magisk is probably looking for a certain file name
Then I also have a problem with step 5. I only get the option to direct install and patch boot image. I am not given the option to install it in an inactive slot.
What do you guys do to update your phone? Install it manually through fastboot? I would just prefer to skip the fastboot part going on. I just the commands so rarely that I always forget them and always have to look them up xD. Just seeing if this community know something I don't

Related

updating rooted phone

So if I download the most current factory images to updated a rooted phone...is this the correct method?
I will NOT wipe date, will wipe cache though and flash:
vendor
system
recovery (optional only if you want stock recovery)
boot (if you want stock kernel)
I dont flash userdata unless I want to lose everything right?
I want to keep my phone the same, but update to current security patches.
and then obviously re-root after all of this if you want to be back rooted.
Does this sound right?
thanks
Ok that doesnt work. So I am doing something wrong and not knowing something...I would appreciate if someone can help.
I have nexus 5x with 7.0...but not the most recent, I am on Octobers updated version.
I have TWRP installed and rooted.
I booted to fastboot and flashed newest:
vendor.img
bootloader.img
system.img
radio.img
erased cache with "fastboot erase cache"
and it just boots to google screen.
I had to restore backup to get phone to work right.
how can I update my system?
thanks
I also like to keep a rooted phone up to date with the newest builds/security updates of stock Android...here's what I do:
Download the OTA zip from Google, and get the Flashfire app (by developer Chainfire) to install it.
After opening Flashfire...
- Tap the + symbol and select "Flash Zip or OTA"
- navigate to and select the OTA zip file
- Check "Restore boot and recovery images" option (I first tried to install without this, but it's necessary for OTAs). The "Mount /system read/write" option is always checked by default for me.
- Under the EverRoot setting, check "Inject SuperSU" so you'll stay rooted after the update.
- Under the Reboot setting, check the "Preserve recovery" option...this backs up TWRP and restores it after the OTA is installed.
Hit the Flash button and away you go...takes a few minutes for the process to finish...and you're all set :good:
IcedDog said:
I also like to keep a rooted phone up to date with the newest builds/security updates of stock Android...here's what I do:
Download the OTA zip from Google, and get the Flashfire app (by developer Chainfire) to install it.
After opening Flashfire...
- Tap the + symbol and select "Flash Zip or OTA"
- navigate to and select the OTA zip file
- Check "Restore boot and recovery images" option (I first tried to install without this, but it's necessary for OTAs). The "Mount /system read/write" option is always checked by default for me.
- Under the EverRoot setting, check "Inject SuperSU" so you'll stay rooted after the update.
- Under the Reboot setting, check the "Preserve recovery" option...this backs up TWRP and restores it after the OTA is installed.
Hit the Flash button and away you go...takes a few minutes for the process to finish...and you're all set :good:
Click to expand...
Click to collapse
just for future reference, i want to update when stable 7.x hits
can i skip from 6.0.1 (march probably?) all the way to 7.1.x?
i have xposed and tons of modifying modules (probably on system) installed, are those going to be wiped?
IcedDog said:
I also like to keep a rooted phone up to date with the newest builds/security updates of stock Android...here's what I do:
Download the OTA zip from Google, and get the Flashfire app (by developer Chainfire) to install it.
After opening Flashfire...
- Tap the + symbol and select "Flash Zip or OTA"
- navigate to and select the OTA zip file
- Check "Restore boot and recovery images" option (I first tried to install without this, but it's necessary for OTAs). The "Mount /system read/write" option is always checked by default for me.
- Under the EverRoot setting, check "Inject SuperSU" so you'll stay rooted after the update.
- Under the Reboot setting, check the "Preserve recovery" option...this backs up TWRP and restores it after the OTA is installed.
Hit the Flash button and away you go...takes a few minutes for the process to finish...and you're all set :good:
Click to expand...
Click to collapse
Have you done this with a non-stock kernel like elemental-x?
I dont mind having to reflash the kernel after the update, but I am just trying to avoid bootloops after restoring.

Nexus 7 2013 Wifi: Can you root Marshmallow without losing your data

I reinstalled the factory image to my Nexus 7 from Google's website. without any issue using ADB. My bootlogger is still unlocked.
I recall when I rooted my KitKat using TWRP, I didn't have to wipe out my data, it rooted just fine.
Now, I am uncertain if this is the case with Marshmallow as I have loaded all my 150+ apps (manually) back onto my tablet .
Also, what's the best site/link for rooting to Marshmallow. It's been quite sometime since I rooted. I just want to make sure I follow the sequence correctly.
Thanks
Gaining root access is very simple.
Flash twrp with fastboot.
Then from twrp flash the su zip of your choice, phh's superuser or SuperSU.
That's it. No loss of data. Of course make a nandroid first just in case of any problem.
Edit: In your other thread that you link to this one in (didn't see it earlier) you may not have needed the clean install. Either flashing the boot.img and system.img for that os version with fastboot OR deleting the "-w" from the flash-all script in the factory image would have kept your apps/data. Just for future reference if you choose to stay on 6.0.1 and something goes wrong.
I think there is some confusion and there are different variations on how to flash to TWRP. What is the most recommended flash process?
Michael Carleone said:
I think there is some confusion and there are different variations on how to flash to TWRP. What is the most recommended flash process?
Click to expand...
Click to collapse
I just did this the other night, though I did go from one MM build to another.
1a) Grab the factory image from Google in ZIP form from the developer site
1b) Grab the latest version of TWRP for the 2013 N7 Wifi (flo) from their website
1c) Grab an appropriate super user app flash-able from TWRP. I prefer SuperSU, but the choice is yours. Make sure it supports systemless installation, as traditional SU installs can run afoul of Marshmallow's new integrity checks. (Yes, there are permissive kernels available, but I prefer to stay as stock as possible)
2) Unpack ZIP from 1a into a folder on your PC. I tend to drop a minimal copy of fastboot/adb into the folder to make things easy, but you can just use whatever is in the path.
3) You can choose to use the batch file or not, but if you do, remember to remove the -w from the fastboot command that flashes the OS image unless you want truly clean install. I personally prefer to flash the bootloader separately, then flash the system, rather than using the batch file, but they are equivalent. The tablet will automatically restart after the image is uploaded.
4) Kick back and relax while all your apps get recompiled. When it finally comes up, make sure everything is working okay.
5) Copy your SU flashable image to the tablet. If you have ADB debugging turned on, you may have to toggle MTP mode in developer options to re-enable it.
6) After everything is nice and stable, and everything you need is on the tablet already, reboot to bootloader.
7) Flash the TWRP image from 1b using 'fastboot flash recovery twrp_<version>.img'
8) Reboot into your shiny new recovery and install the SU package from 1c
9) Reboot again into the new, newly rooted, system and verify SU works.
10) Enjoy!

Updating from OB9 to OB20 (Pie)

Can someone tell me how I can safely update from open beta 9 to open beta 20 while maintaining root. I just want to make sure if there are any extra steps since open beta 9 was before the treble update. I am rooted with magisk.
also can anyone share updated twrp links or links for anything else I need if possible. Thanks
I heard that, I followed the guide in the development section and got and error when trying to flash it. I'm on TWRP 3.2.3-1 as well.
Yes, everything is fine, I have root. It took me a while, because of TWRP. The only problem is, that while you can get magisk, twrp will get overwritten by stock and I could not prevent it.
Process:
1. Install stock recovery (from here: https://www.androidfilehost.com/?fid=674106145207488252) in fastboot (fastboot flash recovery filename.img)
2. Install the new open beta
3. Download magisk on your phone
4. Install TWRP by codeworkx (from here: https://forum.xda-developers.com/oneplus-5t/development/recovery-twrp-3-2-1-0-oreo-8-0-8-1-t3729673) in fastboot and boot to twrp immediately.
5. Install magisk from within TWRP's first boot
6. After reboot twrp will most likely get overwritten by stock recovery, but we don't care as we have magisk already.
7. Profit.
@jazzgott so is there no way for me to reinstall twrp after updating? How will I update to new versions after?
@jccspeed
1. flash twrp via fastboot (pc, usb cable and phone and everything in need for this needed)
2. after flashing the recovery, turn off your phone, this is important.. do NOT boot your phone into the OS after flashing.. turn it off (chose power off with your volume keys within the fastboot mode and press the standby button once shortly)
3. hold volume down und power button at the same time until you see the "boot loader unlocked" warning stuff.. keep it pressed there for 2 or 3 more seconds. then let loose of these buttons.
4. you should now be in TWRP. congratulations.
if you now flash magisk, you will keep twrp as long as you keep magisk installed. you can freely boot into the OS and still have TWRP installed. How ever, if you don't install magisk and boot into your OS, your OS will overwrite TWRP with stock recovery.
forgot to mention: please use codeworkx pie twrp. its the one I have installed and have gotten into no problems so far.
@jazzgott @moeq123
Does this method erase the user data? I am encrypted and rooted(magisk). I want to preserve all my data.
@ajithpoison
at first I want to mention something important: always do a full backup.
if you unroot your phone (say, if you uninstall magisk using the uninstall.zip from within the magisk app itself and reboot) you should be able to update to open beta 20 via system update settings (where you need to choose a .zip file for the update.. so you need to download the open beta 20 rom from onceplus website).
(please verify that you are on stock recovery after the uninstalling magisk and reboot process. do this by booting into recovery with the power and volume down method. if you don't know how, google how to boot into recovery for your device)
This updating process should not erase your user data at all.
But be aware, that, if you want to go back to stable releases, you have to wipe everything.. so your user data will be erased if you choose to go back to stable releases.
if you want root and twrp back again, follow my instructions mentioned above.
@moeq123
Let me explain my situation in brief.
I am on the open beta channel. I am rooted(magisk) and I have the official TWRP and I am encrypted.
This is how I update everytime:
1. Download the zip
2. Reboot to recovery
3. Wipe cache and dalvik
4. Install update.zip
5. Install Magisk
6. Wipe cache and dalvik again
7. Reboot
This time, the above method will not work due to the compatibility thingy. I want to preserve app data. There are specific apps which I use and I don't want to lose those app's data. Previously I used titanium backup to take backup of app data. I am not sure whether backing up the app data and then restoring it will work since I am upgrading from oreo to pie. Is there any definite way to backup and restore app data after upgrading to pie?
I am summing up the method which I have to follow now. Correct me if I am wrong.
There are two methods which I know as of now.
Method 1:
The official method given by FunkWizard which involves deleting the compatibility.zip for which some users have reported ERROR 7.
Method 2:
1. Download Magisk & OB20 and have it in internal storage and switch off the phone.
2. Install stock recovery via fastboot.
3. Install the new open beta via stock recovery and switch off.
4. Install TWRP by codeworkx and boot to recovery
5. Install magisk from within TWRP's first boot
6. Clear cache and dalvik
7. Reboot to system and Profit.
(Will TWRP remain as a recovery after following all this or will it get overwritten by the stock recovery?)
@moeq123
Nevermind. I have got it to work without losing any data. I followed all the steps which were in the post by @funkwizard who put up the OP5T OB20 Official update post. It worked well except for one thing. The magisk manager did not show up even after installing magisk through the recovery. (I use BluSpark recovery). So I did a manual installation of the magisk manager apk and everything worked fine. I did not lose any data and so far no bugs.

Recovering from a bad magisk module on 7.2.2

so I've installed magisk on 7.2.2 by creating a patched boot.img and flashing via fastboot.
All nice, until I installed a module that ended in bootloop.
I managed to recover by flashing the original boot.img, but I end up with no magisk/no root, and no means to uninstall the module, So if i reflash magisk, I end up with the bootloop.
Is there a new recovery compatible with 7.2.2 or anyone knows a way out of this?
There is no twrp for 7.2.2 yet. You can either delete /data/adb/magisk.img and install all your modules again
or
copy it to your phone while in recovery, rename the original (assuming you have magisk on your phone), copy it to the same location as above, flash the attachment to mount it, remove module from /magisk/, reboot to recovery (don't reboot to system!), cut the file off of the phone and rename the original back to magisk.img, you can then boot your phone.
thecoolkid said:
There is no twrp for 7.2.2 yet. You can either delete /data/adb/magisk.img and install all your modules again
or
copy it to your phone while in recovery, rename the original (assuming you have magisk on your phone), copy it to the same location as above, flash the attachment to mount it, remove module from /magisk/, reboot to recovery (don't reboot to system!), cut the file off of the phone and rename the original back to magisk.img, you can then boot your phone.
Click to expand...
Click to collapse
problem is I can't flash anything as I don't have a custom recovery.
do you mean flash the zip you posted via stock recovery? will it flash? what does it do? where does it go?
thanks
xd4d3v said:
problem is I can't flash anything as I don't have a custom recovery.
do you mean flash the zip you posted via stock recovery? will it flash? what does it do? where does it go?
thanks
Click to expand...
Click to collapse
I meant flash it on your phone, the second solution involves a second device as a surrogate. The zip just mounts magisk image to /magisk/ so you can browse it manually.
thecoolkid said:
I meant flash it on your phone, the second solution involves a second device as a surrogate. The zip just mounts magisk image to /magisk/ so you can browse it manually.
Click to expand...
Click to collapse
Sorry mate, not following you, why do I need a phone?
I'd be happy deleting magisk.img on the shield and loosing magisk config, but I can't access it without root or recovery.
xd4d3v said:
Sorry mate, not following you, why do I need a phone?
I'd be happy deleting magisk.img on the shield and loosing magisk config, but I can't access it without root or recovery.
Click to expand...
Click to collapse
Ok, I researched a little and the only thing that comes to mind, that isn't wiping the whole data position, is downgrading to 7.1 firmware and installing twrp. After you fix your issues you can update again.
yeah, good one, I was considering that as well, might try flashing just boot.img and blob from 7.1 and trying TWRP, then reflashing 7.2.
wish me luck
Heres an easier way, create a blank .disable_magisk file and place it in /data/cache
Then reboot, this will force magisk to start with "Magisk Core Only Mode" , which means magisk hide and modules will be disabled.
Then you can disable "magisk core only mode" when booted up, so modules and magiskhide is enabled again.
Then uninstall the module that is being the issue.
mLgz0rn said:
Heres an easier way, create a blank .disable_magisk file and place it in /data/cache
Then reboot, this will force magisk to start with "Magisk Core Only Mode" , which means magisk hide and modules will be disabled.
Then you can disable "magisk core only mode" when booted up, so modules and magiskhide is enabled again.
Then uninstall the module that is being the issue.
Click to expand...
Click to collapse
You need root or TWRP for that. I was thinking about it too, but he has no access to twrp in the new update and can't boot with root.
thecoolkid said:
You need root or TWRP for that. I was thinking about it too, but he has no access to twrp in the new update and can't boot with root.
Click to expand...
Click to collapse
You only need to use the developer boot without patching magisk to it, then through adb create a file there.
You can get root access through adb which allows you to create a file there
That's a brilliant idea. So the developer image allows root via adb?
xd4d3v said:
That's a brilliant idea. So the developer image allows root via adb?
Click to expand...
Click to collapse
Yep, hence why they call it "rooted" even though its not it dosnt have the su binaries by default, its more like unlocked compared to the ota builds.
You should be able to do the command "adb root" and then enter shell with root access.
I can't remember but you might need to do "adb disable-verity" and reboot before you can put stuff into the root partition "/system", "/data/cache" and so on.
Just remember when you patch the boot image with magisk again, you either first need to do "adb enable-verity" and then patch with "preserve avb 2.0/dm-verity" checked in magisk or keep dm-verity disabled then patch with "preserve avb 2.0/dm-verity" unchecked, else you gonna end up in a boot loop.

[SM-A520F][8.0] Problems installing Root with A5 2017

Today I've installed the stock firmware version of Android Oreo 8.0 (the December Update) with Odin.
After that I've installed the TWRP also with Odin, the 3.2.3 version.
Then I wanted to root the devide so I start with the installation of Magisk (because I need to hide the root form some apps like Netflix), but it keeps failing with the ERROR 1. I've searched in this forum but none of the solutions worked. One solution requires the boot.img of the rom, but I can only get a boot.img.lz4 from the AP md5 file which i have no idea how to use.
Then I tried to install SuperSU (v2.82 SR5 version). I followed a guide but once I finished the flash of RMM State Bypass and SuperSU I rebooted only to be locked out of my phone. A message informed me that the integrity of the phone could not be checked (or something like that) and so I had to re-flash the stock firmware and the recovery with Odin.
Am I missing something? Am I doing something wrong? And where can I find the boot.img from the stock firmare?
I hope somebody can help me because I spent a lot of hours looking for a solution without having a working result...
lolovato said:
Today I've installed the stock firmware version of Android Oreo 8.0 (the December Update) with Odin.
After that I've installed the TWRP also with Odin, the 3.2.3 version.
Then I wanted to root the devide so I start with the installation of Magisk (because I need to hide the root form some apps like Netflix), but it keeps failing with the ERROR 1. I've searched in this forum but none of the solutions worked. One solution requires the boot.img of the rom, but I can only get a boot.img.lz4 from the AP md5 file which i have no idea how to use.
Then I tried to install SuperSU (v2.82 SR5 version). I followed a guide but once I finished the flash of RMM State Bypass and SuperSU I rebooted only to be locked out of my phone. A message informed me that the integrity of the phone could not be checked (or something like that) and so I had to re-flash the stock firmware and the recovery with Odin.
Am I missing something? Am I doing something wrong? And where can I find the boot.img from the stock firmare?
I hope somebody can help me because I spent a lot of hours looking for a solution without having a working result...
Click to expand...
Click to collapse
Try again and redownload magisk.
Also, did you wipe data?
iloveoreos said:
Try again and redownload magisk.
Also, did you wipe data?
Click to expand...
Click to collapse
I tried re-downloading Magisk (the latest and the version before) but nothing changed.
Yes I wiped the data.
I've added that I'm working on a A5 2017 SM-A520F.
lolovato said:
I tried re-downloading Magisk (the latest and the version before) but nothing changed.
Yes I wiped the data.
I've added that I'm working on a A5 2017 SM-A520F.
Click to expand...
Click to collapse
Hmm, did you reinstall stock firmware on it and try again? Error 1 happens when the zip is corrupted. What version of TWRP are you using, 3.2.3-0?
Um, did you flash no-verity 6.0.zip? https://forum.xda-developers.com/sa...velopment/recovery-galaxy-a5-a7-2017-t3815931
iloveoreos said:
Hmm, did you reinstall stock firmware on it and try again? Error 1 happens when the zip is corrupted. What version of TWRP are you using, 3.2.3-0?
Um, did you flash no-verity 6.0.zip? https://forum.xda-developers.com/sa...velopment/recovery-galaxy-a5-a7-2017-t3815931
Click to expand...
Click to collapse
I'm using 3.2.3-1.
I've tried to reflash with Odin the whole stock firmware, then I flashed the TWRP recovery 3.2.3-1 (I redownloaded every file), I entered the recovery and I flashed the no-verity 6.0.zip, only to be once againt cut out from my phone with the same message as yesterday saying that the integrity of the phone could not be checked and that I need to restore the phone.
I really don't understand what is going wrong...
I think I've made it? I don't know what I did differently this time, I'll post the solution here if someone needs it:
0a. MAKE A BACKUP OF YOUR DATA!
0b. Put in your SD-Card the version of Magisk you want to install and the no-verity-opt-encrypt-x.x zip file.
1. Flash the stock firmware with Odin, when the PASS! message appears and the phone starts to reboot unplug the device and quickly re-enter in download mode.
2. Flash the TWRP recovery with Odin, when the PASS! message appears and the phone starts to reboot unplug che devide and quickly enter in recovery mode.
3. In recovery click Wipe and select Format Data. Then go back, click Install and select from the SD-Card the no-verity-opt-encrypt-x.x zip file.
4. Reboot your phone to system, configure the devide (account, ecc.).
5. Turn-off the phone and go in recovery, click Install and select from the SD-Card the Magisk zip.
6. Reboot your phone to system, install Magisk Manager and you're done!
TWRP and no-verity-opt-encrypt zip file: click.
Magisk zip and Magisk Manager: click.
lolovato said:
I think I've made it? I don't know what I did differently this time, I'll post the solution here if someone needs it:
0a. MAKE A BACKUP OF YOUR DATA!
0b. Put in your SD-Card the version of Magisk you want to install and the no-verity-opt-encrypt-x.x zip file.
1. Flash the stock firmware with Odin, when the PASS! message appears and the phone starts to reboot unplug the device and quickly re-enter in download mode.
2. Flash the TWRP recovery with Odin, when the PASS! message appears and the phone starts to reboot unplug che devide and quickly enter in recovery mode.
3. In recovery click Wipe and select Format Data. Then go back, click Install and select from the SD-Card the no-verity-opt-encrypt-x.x zip file.
4. Reboot your phone to system, configure the devide (account, ecc.).
5. Turn-off the phone and go in recovery, click Install and select from the SD-Card the Magisk zip.
6. Reboot your phone to system, install Magisk Manager and you're done!
TWRP and no-verity-opt-encrypt zip file: click.
Magisk zip and Magisk Manager: click.
Click to expand...
Click to collapse
That is how you are supposed to do it.

Categories

Resources