d 27 Posted December 10, 2019 Share Posted December 10, 2019 A few days ago, I flashed a patched boot image to boot_a. I used the image from here and patched it with the Magisk app. It worked wonderfully, I had root and the phone would pass safety net checks. After flashing the patched boot image, I backed up boot_b. Today I got the OTA notification and switched to slot b using fastboot --set-active=b and then rebooted and tried installing the OTA, I got the following error message: Install fail Reason: 20 Magisk is not active on slot b, so why can't I install the update? 1 Quote Link to post Share on other sites
mcdinner 375 Posted December 10, 2019 Share Posted December 10, 2019 Maybe the OTA tries to switch to the other slot by itself. What happens if you switch to slot a before starting the update ? Quote Link to post Share on other sites
d 27 Posted December 10, 2019 Author Share Posted December 10, 2019 The same thing happens. I just tried restoring the backup from slot b to slot a, but it didn't change anything. Quote Link to post Share on other sites
mcdinner 375 Posted December 10, 2019 Share Posted December 10, 2019 Maybe this tutorial helps. https://topjohnwu.github.io/Magisk/tutorials.html#ota-installation Would like to help more but no pro1 yet to try ;( 1 Quote Link to post Share on other sites
d 27 Posted December 10, 2019 Author Share Posted December 10, 2019 Ah, damn. While reading your link I remembered that I've used Adaway and thus modified a system file. That is probably why the OTA fails. Thank you! Quote Link to post Share on other sites
mcdinner 375 Posted December 10, 2019 Share Posted December 10, 2019 Oo, adaway is enough to kill OTA? Think I have not used stock Rom in such a long time that I forgot all problems. 😄 Quote Link to post Share on other sites
d 27 Posted December 10, 2019 Author Share Posted December 10, 2019 Magisk does not modify any system files, but adaway modifies a hosts file, so the integrity checks fail. At least that's how I understand it. I'll be restoring the factory rom and then installing the OTA updates to slot a. Quote Link to post Share on other sites
david 929 Posted December 10, 2019 Share Posted December 10, 2019 Is the OTA not available offline too? Quote Link to post Share on other sites
mcdinner 375 Posted December 10, 2019 Share Posted December 10, 2019 1 minute ago, david said: Is the OTA not available offline too? Asked that two times and got no answer 😕 2 Quote Link to post Share on other sites
elvissteinjr 359 Posted December 10, 2019 Share Posted December 10, 2019 (edited) From what I've read, for AdAway to work nicely you just need to enable "systemless hosts" in Magisk Manager and not change the target hosts file. Edited December 10, 2019 by elvissteinjr 2 4 Quote Link to post Share on other sites
d 27 Posted December 10, 2019 Author Share Posted December 10, 2019 (edited) 1 hour ago, elvissteinjr said: From what I've read, for AdAway to work nicely you just need to enable "systemless hosts" in Magisk Manager and not change the target hosts file. Yeah, I definitely need to do that next time. edit: I messed up and had to do a factory reset. Edited December 10, 2019 by d 1 Quote Link to post Share on other sites
Craig 1,435 Posted December 11, 2019 Share Posted December 11, 2019 I just gave adaway a try with the systemless hosts magisk module installed, hopefully I can still get OTAs. Will let you know shortly.. Quote Link to post Share on other sites
zurvan2 125 Posted December 12, 2019 Share Posted December 12, 2019 On 12/11/2019 at 4:05 AM, Craig said: I just gave adaway a try with the systemless hosts magisk module installed, hopefully I can still get OTAs. Will let you know shortly.. I tried it today without luck. Followed the instructions here: https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md (really just uninstall in Magisk, then try to install the OTA.) Same error as above. 😞 Quote Link to post Share on other sites
david 929 Posted December 12, 2019 Share Posted December 12, 2019 3 minutes ago, zurvan2 said: I tried it today without luck. Followed the instructions here: https://github.com/topjohnwu/Magisk/blob/master/docs/tutorials.md (really just uninstall in Magisk, then try to install the OTA.) Same error as above. 😞 Are you saying that even after uninstalling Magisk completely, you couldn't get the OTA to install? Did you reboot the phone after uninstalling Magisk? Quote Link to post Share on other sites
david 929 Posted December 12, 2019 Share Posted December 12, 2019 The methods used by people in this thread might be applicable here. I obviously haven't tried any of them, since I don't have my Pro1 yet: https://forum.xda-developers.com/mi-a1/help/foolproof-ota-update-magisk-installed-t3779275 Quote Link to post Share on other sites
Craig 1,435 Posted December 12, 2019 Share Posted December 12, 2019 I'm will have to wait for a new OTA to be released before I can test, as I applied 10December update before I rooted. 1 Quote Link to post Share on other sites
zurvan2 125 Posted December 12, 2019 Share Posted December 12, 2019 39 minutes ago, david said: Are you saying that even after uninstalling Magisk completely, you couldn't get the OTA to install? Did you reboot the phone after uninstalling Magisk? No, because the instructions say *not* to reboot the phone. If you're going to flash using fastboot, you may as well just flash the new version rather than doing an OTA, I guess. (although flashable versions of updates are always hard to find) 1 Quote Link to post Share on other sites
david 929 Posted December 12, 2019 Share Posted December 12, 2019 40 minutes ago, zurvan2 said: No, because the instructions say *not* to reboot the phone. If you're going to flash using fastboot, you may as well just flash the new version rather than doing an OTA, I guess. (although flashable versions of updates are always hard to find) I wasn't suggesting flashing using fastboot. I just meant rebooting so that Magisk is completely gone from memory and the phone is in its normal pre-Magisk state. Regarding flashing with fastboot, I may have missed it, but I don't think they have made the firmware available as a flashable form, except the original firmware that the earliest phones shipped with. 1 Quote Link to post Share on other sites
Craig 1,435 Posted December 12, 2019 Share Posted December 12, 2019 (edited) The only thing you need to flash is the modified boot.img, and boot.img has probably not changed in the updates since the zip we were provided. If/when an update changes that, I guess we'll need another root solution or another flashall from fxtec, or maybe it won't matter anyway and we can keep using the old boot.img regardless. Edited December 12, 2019 by Craig 1 Quote Link to post Share on other sites
zurvan2 125 Posted December 14, 2019 Share Posted December 14, 2019 On 12/12/2019 at 4:00 PM, david said: I wasn't suggesting flashing using fastboot. I just meant rebooting so that Magisk is completely gone from memory and the phone is in its normal pre-Magisk state. This *did* work in a later test with no other changes. Quote Link to post Share on other sites
david 929 Posted December 14, 2019 Share Posted December 14, 2019 56 minutes ago, zurvan2 said: This *did* work in a later test with no other changes. The OTA downloaded and installed fine? What was the sequence of steps? Quote Link to post Share on other sites
zurvan2 125 Posted December 14, 2019 Share Posted December 14, 2019 Fully restore to stock. erase user data. (basically, should be the same as starting with a fresh phone) flash magisk (I used the image provided on the thread about magisk) fastboot flash boot magisk_patched.img boot to android install magisk manager verify root works reboot to bootloader, flash default boot.img: fastboot flash boot boot.img reboot to android apply OTA update So root alone isn't enough to prevent the OTA, or is at least reversible. When I extend step 5 to "restore everything" then the OTA doesn't work in step 8. There must be something I'm using that's modifying something that I'm not aware of. I'll keep trying to narrow this down, but it's probably just something modifying /system, which obviously could prevent the OTA from working. 2 Quote Link to post Share on other sites
david 929 Posted December 14, 2019 Share Posted December 14, 2019 Thanks for those steps. I am also wondering if A/B partitioning is coming into play at all here and creating variability in your testing, depending on the state of each partition and which partition you are on when you try the OTA. Quote Link to post Share on other sites
zurvan2 125 Posted December 14, 2019 Share Posted December 14, 2019 Something I did managed to modify the system partition despite my being careful not to. This resulted in the OTA not being able to be applied, even after returning the boot partition to stock. I *was* able to apply the OTA in this state by applying the *just* the system image in addition. This let me apply the OTA. I was then able to re-root using this patched magisk and had root before/after applying the OTA update. Be forewarned that there are *multiple* OTA updates, and they will be applied in order, so make sure you check for new updates before re-rooting. 1 Quote Link to post Share on other sites
david 929 Posted December 14, 2019 Share Posted December 14, 2019 12 minutes ago, zurvan2 said: Something I did managed to modify the system partition despite my being careful not to. This resulted in the OTA not being able to be applied, even after returning the boot partition to stock. I *was* able to apply the OTA in this state by applying the *just* the system image in addition. This let me apply the OTA. I was then able to re-root using this patched magisk and had root before/after applying the OTA update. Be forewarned that there are *multiple* OTA updates, and they will be applied in order, so make sure you check for new updates before re-rooting. Thanks for the information. And you re-flashed the system partition like this? fastboot flash system_a system.img fastboot flash system_b system.img Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.