Kranchan 3 Posted February 26, 2020 Share Posted February 26, 2020 I'm unable to install updates on my phone. When it fails it just says "Install fail. Reason: 20" I rooted it via Magisk with the intent of using AdAway and Greenify. I have heard that AdAway's modification of the hosts file can cause update issues but even after rolling back to the default I can't install the update. Quote Link to post Share on other sites
tdm 2,322 Posted February 26, 2020 Share Posted February 26, 2020 The AdUps updater is provided to the OEM as a binary package so I can't say for sure what reason 20 is. However, I can say that any modification to the system or vendor partition will cause an update to fail. This includes even mounting the partition read/write once. The only way to get back to a state where OTA updates will succeed is to replace your modified partition with a pristine, bit-for-bit copy. Reading behind your fail dialog it looks like you are on 2019-12-03 right now. The fastboot package for that is probably floating around somewhere. If not, let me know and I can provide it for you. When you get it, simply flash your system image and you should be good again: fastboot flash system system.img If you have modified both slots: fastboot flash system_a system.img fastboot flash system_b system.img Similarly for vendor, if that's been modified. Quote Link to post Share on other sites
Kranchan 3 Posted February 26, 2020 Author Share Posted February 26, 2020 So what you're saying is I need to unroot my phone? What nonsense. Are there any third party apps that can force it to install? Quote Link to post Share on other sites
tdm 2,322 Posted February 26, 2020 Share Posted February 26, 2020 6 minutes ago, Kranchan said: So what you're saying is I need to unroot my phone? What nonsense. Are there any third party apps that can force it to install? If you want to run stock, you play by the rules of stock. The only way to install updates with a modified system partition is for someone else to provide the data to flash manually via fastboot. I haven't personally seen any factory packages provided since the 2019-12-03 release. If you want to root your phone and be freed from this nonsense, don't run stock. Lineage is coming along nicely and Sailfish is supposed to be rather good as well. Quote Link to post Share on other sites
david 929 Posted February 26, 2020 Share Posted February 26, 2020 (edited) I could not find 20191203 anywhere when I did this, so I had to do one OTA first and then use the boot image from that, from what someone shared, to give magisk something to patch that matched the current image. The trick, @Kranchan, is that you have to let Magisk manager patch the boot image, so it has a backup copy. Then, later, when you want to do an OTA, use the MM feature to disable Magisk, which will put the backed up image back. Don't reboot. Do the OTA. Again, don't reboot. Have MM copy the patched version back. Now reboot. I am not positive, but if you can get a 20191203 boot image from somewhere, I think if you flash it, boot (yes, you will lose root temporarily), use MM to patch 20191203, then flash that patch image, then do what I said above, you might be okay. Alternately, unroot with MM, do the OTA, then do the above. The point being, if you follow the right steps going forward, you won't have to reroot every time. https://www.thecustomdroid.com/install-ota-update-rooted-android-device-guide/ Edited February 26, 2020 by david 1 Quote Link to post Share on other sites
Kranchan 3 Posted February 26, 2020 Author Share Posted February 26, 2020 Well I don't have that boot image nor do I know where to get it so I guess I'll just never update. Problem solved. Quote Link to post Share on other sites
david 929 Posted February 26, 2020 Share Posted February 26, 2020 4 minutes ago, Kranchan said: Well I don't have that boot image nor do I know where to get it so I guess I'll just never update. Problem solved. I think that one came from the factory, not from an OTA, hence why it is missing. Is there a reason you can't unroot temporarily? @tdm, does your EDL tool allow for extracting the images from a stock phone? Quote Link to post Share on other sites
EskeRahn 5,455 Posted February 26, 2020 Share Posted February 26, 2020 9 minutes ago, Kranchan said: Well I don't have that boot image nor do I know where to get it so I guess I'll just never update. Problem solved. Well you could follow the guide here, and do OTA from that (of course wiping everything). And then use David's model moving forward with future OTAs. Quote Link to post Share on other sites
Kranchan 3 Posted February 26, 2020 Author Share Posted February 26, 2020 Does unrooting it wipe everything or will all of my apps and data still be there? Because if it's the former I just don't have the energy. Quote Link to post Share on other sites
tdm 2,322 Posted February 26, 2020 Share Posted February 26, 2020 2 minutes ago, david said: I think that one came from the factory, not from an OTA, hence why it is missing. Is there a reason you can't unroot temporarily? @tdm, does your EDL tool allow for extracting the images from a stock phone? I could extract images from the current stock and make a EDL package and/or a fastboot package. But I've been rather busy and quite honestly it's not a priority. The only use I have for stock is extracting vendor blobs for the Lineage build... 😄 1 Quote Link to post Share on other sites
david 929 Posted February 26, 2020 Share Posted February 26, 2020 (edited) 14 minutes ago, Kranchan said: Does unrooting it wipe everything or will all of my apps and data still be there? Because if it's the former I just don't have the energy. Unrooting shouldn't wipe the data partition, which is where your apps and data reside. If you do the "start from scratch" approach that @EskeRahn mentioned, then you will lose it all. Regardless of the method, would recommend backing up data/apps first, just in case. UPDATE: I *think* there is a way to modify the flash all script to not wipe /data. So there might be a way to start over and not lose data. But since you aren't stuck in a boot loop or something, I don't think that path is needed. Edited February 26, 2020 by david Quote Link to post Share on other sites
david 929 Posted February 26, 2020 Share Posted February 26, 2020 6 minutes ago, tdm said: I could extract images from the current stock and make a EDL package and/or a fastboot package. But I've been rather busy and quite honestly it's not a priority. The only use I have for stock is extracting vendor blobs for the Lineage build... 😄 😁 I didn't mean you doing it. I was curious if the published tool could do it. Then, someone who has stock and no OTAs could extract it. But, in reality, I don't think it buys much. Someone who has rooted on 20191203 with Magisk, has to unroot temporarily anyway, so they might as well just do the next OTA and use the boot image available online for that one or for the final one, and then reroot using the method that is OTA safe. For those who are on 20191203 stock, and who have not rooted, then they can just do one OTA first. @Kranchan, if you want the boot images needed, I can find the links. Quote Link to post Share on other sites
david 929 Posted February 27, 2020 Share Posted February 27, 2020 (edited) This post from @Ilrilan has the link: If you do one OTA after your 20191203 image, then you would use the 20191210 image to do the special root process. Then you could test the process to get the final OTA. Alternatively, you can do 2 OTAs and then do the special root process with the 20200106 image file. But you won't be able to test if it allows OTAs until fxtec releases the next one. Edited February 27, 2020 by david Quote Link to post Share on other sites
elvissteinjr 359 Posted February 27, 2020 Share Posted February 27, 2020 I suggest reading up on what Magisk does and why. With great power comes great responsibility and it doesn't sound like you exactly knew what you were doing. You can get by fine with rooting stock, but modifying the system partition for real will break delta updates as OTAs are, so even if they'd allow it, it would not be a great idea. 3 Quote Link to post Share on other sites
zurvan2 125 Posted February 27, 2020 Share Posted February 27, 2020 13 hours ago, tdm said: If you want to root your phone and be freed from this nonsense, don't run stock. Lineage is coming along nicely and Sailfish is supposed to be rather good as well. Do Lineage and/or Sailfish have OTA updates that work while rooted? I've always been under the assumption that stock + rooted is the simplest to maintain, but perhaps I've drawn incorrect conclusions. Quote Link to post Share on other sites
tdm 2,322 Posted February 27, 2020 Share Posted February 27, 2020 25 minutes ago, zurvan2 said: Do Lineage and/or Sailfish have OTA updates that work while rooted? I've always been under the assumption that stock + rooted is the simplest to maintain, but perhaps I've drawn incorrect conclusions. Lineage has a persist facility that is used by gapps, the su package, etc. I haven't run Sailfish yet, but my understanding is that it's more like a traditional Linux distro than Android. So it surely has root facilities built-in. 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.