Reload backup files to enable OTA updates again? - Moto E4 Questions & Answers

I flashed my phone with Magisk and noverify. But I did take a backup before doing it and I have the backup files. If I restore the files, can my phone be updated with OTA updates again? any specific order I should restore my files?

davejames500 said:
I flashed my phone with Magisk and noverify. But I did take a backup before doing it and I have the backup files. If I restore the files, can my phone be updated with OTA updates again? any specific order I should restore my files?
Click to expand...
Click to collapse
Probably will require more work:
- restore stock recovery if you flashed TWRP (better to boot image)
- reverse effects of no-verity
In the end you'll probably find it easier to reload stock via RSD Lite. There are other threads that discuss techniques and cautions. Not for the faint of heart.

Related

[GUIDE] Easily switch between last updated stock (OTA support) and custom software

If you regularly install/test custom firmwares, ROMs and mods on your HTC One, it can be quite annoying and time-consuming if you want to go back to the latest stock software with official manufacturer OTA support (for example, to check if the latest official OTA update has been released for your region). Flashing the RUU is arguably the easiest and fastest way, but many of us have only older RUU's available which means having to download some quite big OTA updates every time. To avoid this inconvenience, i've done some research about the various methods to return to the latest stock version as hassle-free and as quickly as possible and i've come up with the following solution. This idea is not ground-breaking and might not be new to some (or most) of you, but i believe this guide should be useful for "noobs" or those who never thought of or didn't know how to handle OTAs and also to find the easiest and fastest way to swap any custom software (ROM/firmware) on your HTC One with the last 100% stock installation right before you flashed a custom recovery.
The procedure described below tries to eliminate the need to look for and flash stock firmware and stock ROMs uploaded by others, which may not necessarily exactly match with the original stock software of your phone especially since there exists dozens of HTC One variants. Using downloaded stock firmware/ROM from others might cause incompatibilities, degradation in performance, lost of signal, poor reception, etc. Ideally, you want to be able to flash whatever ROM/firmware and at any time, if you wish, you should be able to switch back to your own stock ROM and firmware. This is usually done by flashing your RUU (Rom Update Utility) according to your phone's MID and CID. However, most of you would need to go through an annoying and time-consuming update process to download several OTAs before finally reaching the current latest stock version. But here's a solution!
Minimum requirements:
1. Your HTC One's bootloader must be unlocked.
If your device is already S-OFF and if you relocked/locked your bootloader, then you can unlock the bootloader without having to use the official htcdev website. Just follow this guide to set the Bootloader as UNLOCKED: http://forum.xda-developers.com/showthread.php?t=2497712
2. You need to find your device's RUU (decrypted is even better as it allows going through the process faster) or your 100% stock software backup (firmware and ROM). If you made a nandroid backup after unlocking the Bootloader, it won't work since some data was wiped from your phone's memory during the unlocking process from the official htcdev website.
It's advised to use the RUU to restore which is specifically designed for a set of devices according to their MID and CID, rather than trying your luck at finding a compatible stock firmware and ROM for your HTC One variant. Here's a thread with a collection of RUUs and stock firmware/ROMs: http://forum.xda-developers.com/showthread.php?t=2428276
3. Your device should be S-OFF.
This is not an absolute requirement but S-OFF makes the whole procedure much easier. For the purpose of this guide, it will be assumed that your device is S-OFF.
Advantages of this method:
1. You will save time by being able to restore back to the latest 100% stock version very quickly (some OTA updates are around 400 MB which can take some time to download). You will only have to download the OTA's one time and then back up these OTA's to use later for updating/restoring your stock software.
2. You won't need an internet connection to update to your last stock version backup. The update process to previously downloaded (and backed up) OTA's will not require an internet connection. However, you will have to download any newer OTA's if available.
3. You will not have to rely on other sources to find your latest stock firmware and stock ROM. Therefore, you can be certain that you're getting a perfectly matching firmware and ROM for your specific HTC One model (the restored firmware and ROM will be exactly as if you never tampered with your device, with official manufacturer OTA support).
4. You will not have to downgrade if using an older RUU or older stock firmware/ROM, and then have to update it again via OTA. Your HTC One will be restored to 100% stock with the same software version just before you flashed a custom firmware/ROM.
5. If you absolutely need to run the RUU to go back to 100% stock, then you will not have to run the RUU process more than once (which will wipe all your nandroid backups as well as all your data, assuming you have a decrypted RUU, otherwise you will have to run the RUU twice only).
Procedure:
To summarize, if you want to go back to 100% stock using the method in this guide, all you will have to do is restore your nandroid backup and flash the firmware from the latest OTA. You will then get stock software with full OTA support within a few minutes from a custom installation. The method itself consists of handling official OTAs and extracting the most recent firmware in order to restore. But you will need a starting point where your device is 100% stock and able to receive and install official OTAs from the manufacturer. Let's assume that your HTC One is 100% stock. Whatever means you used to reach 100% stock, you will need it again. So, keep that RUU (preferably try to find your decrypted RUU zip) or stock files handy.
Check if you have any OTA update available:
No update available
If no OTA updates are available for your device, you can flash your custom recovery and then do a nandroid backup (very important). Then, you can root, flash a custom ROM and if you're S-OFF, you can even flash custom firmware.
Going back to stock: if you want to check for OTA availability at any time or you just want to go back to 100% stock, the easiest and safest way is to run your RUU. But if you found your decrypted RUU zip, you can go back to stock even faster; first restore your nandroid backup and then extract firmware.zip from the decrypted RUU zip and flash it. That's it. You're now back to 100% stock. You can check if there are any available OTAs and then go back to using custom ROMs again if you like.
Update available
Here is the more interesting part of this guide:
1. You will need the original firmware.zip file for your current stock software version. If you ran the RUU to go back to stock, extract rom.zip (follow this guide: http://forum.xda-developers.com/showthread.php?t=2497614) and then extract firmware.zip from the decrypted RUU rom.zip file. If the RUU rom.zip is not decrypted, it will give you an extraction error about all the files contained within being corrupt. In that case, you should try to find a decrypted version of the same RUU or decrypt it yourself (requires Linux, as decrypting an RUU is currently not possible on other OS). Use Winrar/Winzip to open the firmware.zip and extract recovery.img and place it in your adb folder.
2. Check for software update in the Settings menu. If you get OTA update notification, accept it. Note the file size of the OTA download, as it'll be useful to easily identify it later when searching in your device's internal memory. Let it download but do not install it. Select the option "Install Later" when prompted.
3. In the Settings menu, disable fastboot and enable USB Debugging.
4. Flash custom recovery. Root your device. Boot up to Android.
5. Install ES File Explorer from the Play Store (it's free) and give it root permission from its settings. Use ES File Explorer to search for the OTA on your phone. I found Root Explorer to be much faster at searching files although it's a paid app. You will usually find the downloaded OTA in your /sdcard/Download/ folder or /data/data/com.android.providers.downloads/cache/ folder. The OTA will have the keyword "OTA" in its filename and it will be a single zip file. You can also confirm that it's the OTA file by its file size from the earlier OTA pop-up notification. If you still can't find your OTA zip, you can search for "OTA" or "zip" through ES File Explorer or Root Explorer (much faster). Then go through the search results. Here's the original filename of one of my OTA's: OTA_M7_U_JB_50_S_HTC_Europe_2.24.401.2-1.29.401.2_R_P_release_325145_signedn3pctn48i51c9iue.zip. When you've found the OTA, copy it using ES File Explorer to the /sdcard/ location on your phone. Then plug in a USB cable to your HTC One and copy the OTA to a safe place on your PC hard drive.
6. Now, connect your phone via USB, reboot and go to your bootloader. We'll be flashing recovery.img from step 1. Use command "fastboot erase cache" then "fastboot flash recovery recovery.img" and finally "fastboot reboot". Now, you have 100% stock again with OTA support. The SuperUser/SuperSU app will still be visible on your phone but it won't work since the su binary will have been wiped during the stock recovery restore process.
7. Check for OTA software update again from the Settings menu. Install the downloaded file through the update notification menu. But if the update re-downloads, cancel it. Instead, you can manually flash it by copying the OTA zip to the phone's internal memory (don't have to rename the OTA zip but for simplicity, rename it to update.zip) and go to your Bootloader. Select Recovery using the Power button and then press the Power and Volume Up buttons to load the stock recovery menu. Then, select 'apply from phone storage' and navigate the menu as you would in a custom recovery to find update.zip and select it to install. It will follow the official update procedures and will reboot a few times before going back to your homescreen. Check attachments below for the stock recovery menu and options.
8. When your phone reboots, check for OTA again. If update is found, download it but choose "Install Later".
9. Then, just follow the same steps above; 4 through 8. Redo the same steps to copy the OTA to your PC and extract firmware.zip. The principle is that you should backup all the successive OTAs until there are no more updates available. The very last OTA's firmware.zip is the most important file. Keep it separately from the other firmwares. You should also save the previous complete OTA zips to be able to update quickly if you ever need to run RUU again.
10. After you've made a backup for the last OTA zip file, check for software update and install the already download OTA zip through the normal update notification menu. If the OTA update re-downloads, cancel it and do a manual flash for the OTA update that you saved previously, as explained in step 7. Note that an official OTA will update both the firmware and ROM.
11. Then, flash a custom recovery and make a complete nandroid backup to secure your last updated stock ROM. Copy the nandroid backup to your PC. Keep the nandroid backup and the last firmware.zip file (extracted from the last downloaded OTA zip file) safely as these two files are the only ones you will need to restore quickly back to 100% stock with OTA support, unless you were to run the RUU, in which case, you'll have to install all the OTA zip files successively.
12. Now, you can flash whatever you like on your HTC One. If you're S-OFF, you can flash custom firmware as well.
Going back to stock: if you want to check quickly if any OTA's are available or just want to easily go back to 100% stock software, all you have to do is first, restore the last nandroid backup of the stock ROM and then flash the firmware.zip from the last OTA update that you downloaded. That's it. Now, you can check and update easily to any new OTA that might have been released while your device was on custom ROM/firmware. Obviously, you can also backup any available OTA's, by following the same steps above.
I will probably expand this guide further if there is any interest in it.
If this guide was helpful to you, just press the "THANKS" button!
Hi, I found the guide useful, specially now with the upcoming 4.4 OTA. I'm confused thou, I heard you can't apply an OTA having a custom recovery, is this true? If so, shouldn't you have to flash stock recovery after loading a nandroid backup from recovery to be able to receive OTA's?
Arjen_Arg said:
Hi, I found the guide useful, specially now with the upcoming 4.4 OTA. I'm confused thou, I heard you can't apply an OTA having a custom recovery, is this true? If so, shouldn't you have to flash stock recovery after loading a nandroid backup from recovery to be able to receive OTA's?
Click to expand...
Click to collapse
You need to have 100% stock ROM and stock recovery in order to successfully apply an official OTA update. In order words, if you have custom recovery, you won't be able to update. You need to flash in the following order: stock nandroid backup, stock recovery, then download/install any new OTA.

Cannot update to 4.4.2 via otg.

I am having problems installing the 4.4.2 update via OTA. I am on rooted 4.4 android KRT16S build.
I have rooted.
I have installed xposed framework.
I have installed twrp recovery.
OTA update stucks on twrp and nothing happens.
I have tried the following things :
1) Uninstalled xposed framework and tried installing 4.4.2
2) flashed the zip instead of OTA, twrp says failed.
3) enabled survival mode in superuser app.
4) I have also tried flashing KRT16S first which installs successfully on twrp and then 4.4.2 which again fails.
My point is starting this thread is to know exactly what to do when an OTA updates comes so that you can successfully update to the latest android version and also retain your data back.
Sent from my Nexus 7 using Tapatalk
OTAs are meant only for 100% stock.
The fact that they can occasionally be installed on a non-stock ROM (or when using a non-stock recovery) is purely happenstance - not evidence that anyone should have an expectation of a similar success on a device with arbitrary modifications.
It really is just that simple.
Which means, no matter what, I'll have to start from scratch again? Install 4.4 images with data wipe and then install 4.4.2 via OTA or flashable zip, followed by all customization and data restore by TB??
Only solution?
Sent from my Nexus 7 using Tapatalk
There is no need for a wipe, you can also install boot.img and system.img by fastboot and root your device again afterwards. In that case you will keep your data.
Sent from my Nexus 7 using xda app-developers app
neo1691 said:
Which means, no matter what, I'll have to start from scratch again? Install 4.4 images with data wipe and then install 4.4.2 via OTA or flashable zip, followed by all customization and data restore by TB??
Only solution?
Click to expand...
Click to collapse
There are possibly 8 or 10 different ways to go about this:
[A] Don't worry about minor OTA updates - recently they don't seem to be very compelling.
Dirty-restore only the system and boot images from a Nandroid backup of the near-factory ROM corresponding to the same base ROM you are using. You DO make nandroid backups before you start modifying things, don't you?
[C] Use a well-supported dev ROM and wait for the dev to update the ROM to the new release base. Then, just dirty-flash the ROM (if the dev says that is OK). (Obviously, dirty-flashing is not a good idea between ROMs that are wildly different in origin.)
[D]* Treat it like you would any other ROM install. Launcher configuration backup, TiBu Backup, Nandroid Backup, (custom recovery) "factory reset", new ROM install, (root kit install if needed), TiBu restore, Launcher configuration restore.
[E] Attempt OTA install, inspect failures in /cache/recovery/recovery.log, hand-revert files back to factory**. Rinse and repeat.
[F] Pick apart the OTA installer and repackage your own version of the OTA zip to remove the parts that cause failure - both the individual checks and the corresponding file patch operations.
[G] Find a "flashable stock" ROM that matches the same base version as your current ROM and dirty-flash it. Obviously this nukes any of your customizations. Also note that if that the dev did something like "zipalign" or odexing/deodexing of the stock ROM, it is unlikely that the OTA will succeed - even though the ROM is close to identical in function to the factory ROM, the files have been diddled and so the OTA will fail.
[H] If you think the near-stock mods you have made are "minor", you could attempt a "dirty flash" of just the "system.img" and "boot.img" files from the factory images. This would mean avoiding the use of "fastboot erase" of anything and attempting a "fastboot -w update my-custom-image-nakasi-XXXX.zip" where your custom .zip file only has the boot.img and system.img files in it (remove recovery.img, userdata.img from the .zip archive and also check the "android-info.txt" file to see that it is consistent). I have not personally tried this; if you are going to try it, I would back up your entire device as a safety precaution.
* The Google factory image install instructions show a complete wipe of the userdata partition; this is fundamentally different than most ROM installs (potentially requiring hours of waiting on backup/restores of the "sdcard" area).
** Obviously, you need a source of factory original files. Yet another reason to make nandroid backups before beginning ANY customizations. You can dig them out of nandroid backups - for instance, TWRP ".win" files are just tarballs. Or get familiar with simg2img (or here), loopback mounts, and so forth. You can find older versions of Google factory images on oldblue910's site http://www.randomphantasmagoria.com/
OTA Installation Notes:
[size=+1]1 - OTA installation is a PATCHING process.[/size]
[size=+1]2 - OTA preliminary checks are STOP-ON-FIRST-FAIL.[/size]
[size=+1]3 - OTA installs are ALL OR NOTHING.[/size]
1) The patching process for any individual file that will be updated is like this:
[prior factory file] + [OTA patch file] ===>>> [replacement file]
From the above diagram, it is apparent that "replacement file" needs both the original (factory) file plus the OTA-delivered patching file. The patching process cannot succeed unless an exact version of the original file - down to the very last byte - is present on on the device and in it's original location. The reason things are done this way is that the patch (.p) files are typically much smaller than the originals - so it saves the carriers bandwidth to roll out updates this way to lots of customers. The OTAs do not contain replacement files! They only contain patching (.p) files! Even "blob" files such as boot images are updated this way (so, generally, having a custom kernel will also cause an OTA fail).
2 & 3) The OTAs are quite conservative in their checking; they don't do something like this:
check file1... patch file1... check file2... patch file2... ...
but rather do this:
check file1... check file2... ... check fileN... patch file1... patch file2... ... patch fileN
If any of the checks fail, the process stops immediately without running any further checks This is a good thing - if it didn't happen this way, the OTA could get partially through and then fail - and then it would be impossible to repeat the OTA because all the successfully patched files would no longer be the original versions; and you would have a ROM in a screwed up (inconsistent) state.
So, in light of those above observations, it is apparent that:
- usually it is safe to attempt an OTA install on a modified ROM. If any file (to be modified) is missing or altered, a preliminary file check (SHA-1 hash computation) will fail and nothing will be modified. It is a good thing that the OTA install process is conservative this way.
- this explains why sometimes OTAs succeed on lightly modified stock ROMs: it just happens that whatever files the device owner/user fooled with are not in the group of files to be patched by the OTA. But that's no guarantee for the next OTA that comes down the pike, nor the one after that....
- if there are several file checks that are going to fail as a result of user modification, when the OTA runs, you will only be shown the error for the first file that fails - instead of a list of all files which are screwed up. That means that if you thought you were going to hand-patch things, you might have to iterate the process (OTA-fail... hand-patch... OTA-fail... hand-patch...) several times. If you were going to go down that road, the amount of effort needed to get things back to an OTA-friendly state might be quite significant. The only alternative to avoiding this is to inspect the "updater-script" that the OTA uses, and manually go through every file mentioned in the OTA and compute the SHA1 hashes yourself (using the program "sha1sum"). At least then you would know ahead of time which files/blobs are going to cause a failure.
- Note that the the SHA-1 checksums require that the files be identical to the factory originals down to the very last bit and byte. If you used a "flashable factory image" where the dev decided to do something like "zipalign" the .apk files, or add or remove .odex files, an OTA isn't going to work correctly. The files don't just need to be identical in function, they need to be identical down to the last bit and byte.
So now you can see why you observe lazy rooters perpetually returning to this forum asking, "can anybody get me a copy of file such-and-such from version XYZ of the stock ROM?". They are trying to hand-revert their existing ROM so that an OTA will succeed. And the fact that they are asking that question means that they failed to make a (nandroid) backup of their near-factory ROM. If they had done that, they would have the file(s) in question, and -morover- they would also have the option of running a TiBu backup & nandroid backup, restoring the original (factory/near-factory) ROM, taking the OTA, repairing root, and restoring TiBu backups... and then re-applying their customizations. But failing to take a nandroid backup means that they have NEITHER
Well, hand-reverting a ROM so an OTA will succeed may not be "starting from scratch", but it could be quite a bit of effort, yes? You have to undo things by hand to get back to "close enough" to factory state so that you can get the OTA to work. And usually the OTA stomps on permissions of /system/{x}bin/su so that re-rooting is necessary (or else you involve yourself with some dumb "root saver app" ahead of time). And then re-apply the customizations that intersected the OTA causing its' failure(s). All of that takes time. Less time than biting the bullet and just making backups? Hard to say. But one approach paints you into a corner, and the other provides maximum repair/restore flexibility.
I get it that backups take time, and performing TiBu backup/restores takes time too. And if you don't use a launcher that allows configuration saves/restores, even more time wasted there re-configuring things to "the way they were". But really, there's no excuse for not making Nandroid backups - and copying them off the tablet for safe keeping. You can always delete them later if you don't use them.
whew. i'm done.
bftb0 said:
There are possibly 8 or 10 different ways to go about this:
Dirty-restore only the system and boot images from a Nandroid backup of the near-factory ROM corresponding to the same base ROM you are using. You DO make nandroid backups before you start modifying things, don't you?
[/0QUOTE]
Thanks for the awesome reply. I appreciate the time you spent in giving me such a concise and precise reply to my question.
So I have the nandroid backup ->
1) I will flash 4.4, with full wipe and update to 4.4.2
2) Flash twrp and root.
3) Restore my data from my old nandroid backup.
Click to expand...
Click to collapse
neo1691 said:
So I have the nandroid backup ->
1) I will flash 4.4, with full wipe and update to 4.4.2
2) Flash twrp and root.
3) Restore my data from my old nandroid backup.
Click to expand...
Click to collapse
Hmmm. By that do you mean a nandroid restore of /data only on top of a fresh (full wipe) install and OTA update? That's a bit unusual - if any changes occurred in the total count or naming of pre-installed system .apks, that could lead to UID mismatch problems. Also, sometimes OTAs do removal/cleanup of things in /data ... you ought to look in the updater-script (OTA .zip file META-INF/com/google/android/updater-script) to see if any of that is going on. That's why both AnDiSa and I suggested methods that leave the data in place during the OTA update.
I guess what I am saying is that what you are proposing *might* succeed but it's a little bit nonstandard. (It prevents the OTA process from cleaning anything up in /data. Admittedly, that's a little unusual, but I think I have observed it in the past.)
Whatever you do, take a full Nandroid of where you are now; if things get screwed up you can always go back to your current setup and try a different approach.
Thanks a lot for all your invaluable inputs. Too much for me to work on now. I'll report what happens.
Sent from my Nexus 7 using Tapatalk
I am ready to do a dirty wipe. But I am not able to find the boot.img and system.img in the zip of KRT16O.
It is the 4.4 base.
It has a folder called patch which contains boot.img.p , but no system.img
There should be Bootloader.IMG and another tgz. If you extract this tgz you will find boot.img, system.img, data.img.
Be careful to not mix up bootloader.img and boot.img.
Sent from my Nexus 7 using xda app-developers app
---------- Post added at 04:59 PM ---------- Previous post was at 04:58 PM ----------
... one question: are you sure you have the Google Factory Image?
Sent from my Nexus 7 using xda app-developers app
You were right, I was looking in the wrong file,
So extracted the real factory image and there was another zip in that which contained the respective files!! Lets see what I can do now!
Solved!!
Okay. I am now on 4.4.2!! Cheers!!
But dirty flashing didn't worked for me!
I flashed the system.img and boot.img from 4.4 base, and then tried flashing 4.4.1. It worked. But flashing 4.4.2 zip failed just like before.
So after that I took a backup of my sd card and did a full flash of 4.4 base. (KRTO) and then updated to 4.4.2>flashed twrp>waited for OTA>installed OTA from twrp. Worked like a charm.
Now the challenge lies in restoring the data back completely. I have a nandroid backup and TiBu. Guess I will be usin TiBu!!
This thread will be an excellent guide for people facing me problem update OTA over rooted stock rom!
Thanks everyone for their help and support!! Cheers
@neo1691
happy holidays indeed!
The nice thing about nandroids is that you can jump back and forth between two ROMs if necessary.
For instance, suppose you forgot to do TiBu in the prior ROM - no problem! Just make a nandroid of the current (new) ROM, restore the prior Nandroid, do the TiBu backup, restore the (new) ROM nandroid, and then perform the TiBu restores. Easy-peasy.
Backups are awesome. Make 'em often - you can always toss them after a while if you aren't going to use them.
Cheers.. Thanks again everyone
Sent from my Nexus 7 using Tapatalk

apply OTA to rooted phone?

i have an unlocked rooted but otherwise stock G4P and it has an OTA but fails to install. Is there a full ROM I can apply which won't wipe? Or some other way which is not involving a full wipe?
nigelhealy said:
i have an unlocked rooted but otherwise stock G4P and it has an OTA but fails to install. Is there a full ROM I can apply which won't wipe? Or some other way which is not involving a full wipe?
Click to expand...
Click to collapse
I tried, failed, and eventually gave up. I haven't had the motivation to do a full wipe/flash, but I tried everything else I could think of before giving up.
hp420 said:
I tried, failed, and eventually gave up. I haven't had the motivation to do a full wipe/flash, but I tried everything else I could think of before giving up.
Click to expand...
Click to collapse
Did you tryied reinstall the full stock rom & recovery (through Fastboot) without wipe?
rafaelrgi said:
Did you tryied reinstall the full stock rom & recovery (through Fastboot) without wipe?
Click to expand...
Click to collapse
I had a twrp backup of my system partition, which I restored, then fastboot flashed the stock kernel, and wiped caches. Safetynet passed, but the ota would not flash. It said there was an unexpected change in the system, or something to that affect.
I'm not aware of any true, untouched flashable rom zip available. I suppose it wouldn't take long to make one, I just didn't have one available to me.
hp420 said:
I had a twrp backup of my system partition, which I restored, then fastboot flashed the stock kernel, and wiped caches. Safetynet passed, but the ota would not flash. It said there was an unexpected change in the system, or something to that affect.
I'm not aware of any true, untouched flashable rom zip available. I suppose it wouldn't take long to make one, I just didn't have one available to me.
Click to expand...
Click to collapse
To install the OTA update the stock recovery is required, and Twrp is a custom recovery.... after restore the backup you should reinstall the stock recovery before apply the OTA.
rafaelrgi said:
To install the OTA update the stock recovery is required, and Twrp is a custom recovery.... after restore the backup you should reinstall the stock recovery before apply the OTA.
Click to expand...
Click to collapse
sorry, didn't see you were asking about fastboot. no, I didn't flash the factory image. I didn't want to go that far and didn't really care enough to do a full wipe
Have you tried Magisk? Could potentially work
hp420 said:
I had a twrp backup of my system partition, which I restored, then fastboot flashed the stock kernel, and wiped caches. Safetynet passed, but the ota would not flash. It said there was an unexpected change in the system, or something to that affect.
I'm not aware of any true, untouched flashable rom zip available. I suppose it wouldn't take long to make one, I just didn't have one available to me.
Click to expand...
Click to collapse
A TWRP backup restore doesn't fix the issue. You have to reflash SYSTEM , BOOT(if modified), RECOVERY(if modified), and OEM through fastboot. That is a "block flash," instead of TWRP, which is "file based restore."
apply OTA to rooted phone
Could someone please give me this zip ota moto g4 play I need this file since I thank you.
VR25 said:
A TWRP backup restore doesn't fix the issue. You have to reflash SYSTEM , BOOT(if modified), RECOVERY(if modified), and OEM through fastboot. That is a "block flash," instead of TWRP, which is "file based restore."
Click to expand...
Click to collapse
What about other partitions :
gpt, bootloader, adspso, modem
Must they be restored ?
Just after OTA, is it possible to make a raw image backup with TWRP in R/O mode ?
hamelg said:
What about other partitions :
gpt, bootloader, adspso, modem
Must they be restored ?
Just after OTA, is it possible to make a raw image backup with TWRP in R/O mode ?
Click to expand...
Click to collapse
You only need to restore SYSTEM, OEM, BOOT AND RECOVERY images. That's all you'll ever need. NEVER touch other partitions, unless you are upgrading.
To make RAW image backups of SYSTEM and OEM partitions, use terminal in TWRP
Or "adb shell" from your computer (running as root)
adb shell
ls -al /dev/block/platform/soc/7824900.sdhci/by-name
This command will give you the names of the SYSTEM and OEM partitions of your device, Moto G4 Plus. For example, for Moto Z Play (my device), they are mmcblk0p53 and mmcblk0p51 respectively.
So, the commands would be (again, that's an example for MOTO Z PLAY):
Backup
dd if=/dev/block/mmcblk0p53 of=/sdcard/system.img
dd if=/dev/block/mmcblk0p51 of=/sdcard/oem.img
Restore
dd if=/sdcard/system.img of=/dev/block/mmcblk0p53
dd if=/sdcard/oem.img of=/dev/block/mmcblk0p51
Thanks much VR25.
With your help, I have successfully applied the latest OTA
hamelg said:
Thanks much VR25.
With your help, I have successfully applied the latest OTA
Click to expand...
Click to collapse
Confused. The VR25 guidance is when you had taken a full backup when stock, how to restore back to stock to then apply the OTA. You are describing how to apply the OTA on a rooted device without a pre-rooted backup?
You don't need backups to apply the latest OTA.
Get the stock corresponding to your device.
flash LOGO, SYSTEM, OEM, BOOT AND RECOVERY images.
Apply November OTA
Apply February OTA
I did that without wiping my data.
If you want to avoid reset to stock & apply all OTAs, you must have a binary backup of system partition, not a file based backup (see comment #8).
I asked about this issue here :
https://forum.xda-developers.com/showpost.php?p=72029402&postcount=55
hamelg said:
You don't need backups to apply the latest OTA.
Get the stock corresponding to your device.
flash LOGO, SYSTEM, OEM, BOOT AND RECOVERY images.
Apply November OTA
Apply February OTA
I did that without wiping my data.
If you want to avoid reset to stock & apply all OTAs, you must have a binary backup of system partition, not a file based backup (see comment #8).
I asked about this issue here :
https://forum.xda-developers.com/showpost.php?p=72029402&postcount=55
Click to expand...
Click to collapse
Where is the stock for my device
Where is the OTA for my device
My device is the USA unlocked G4P XT1607
nigelhealy said:
Where is the stock for my device
Where is the OTA for my device
My device is the USA unlocked G4P XT1607
Click to expand...
Click to collapse
Exactly this question, but then the XT1602. Flashed the stock parts, but no message of an OTA and they are nowhere to be found. Or does anyone have latest stock version full ROM?
TheEvilVirus said:
Exactly this question, but then the XT1602. Flashed the stock parts, but no message of an OTA and they are nowhere to be found. Or does anyone have latest stock version full ROM?
Click to expand...
Click to collapse
Yeah, others were just saying too high a level to not actually helpful. As I did this last week I'll tell you now is as step by step as I can to actually try to be helpful.
Firstly you need to know you will wipe data, there's no avoiding it, that I could find so backup everything, that can be a mix of TWRP backup of data to SDCARD external, USB OTG, or Titanium backup to online / SD / OTG. In my case I prefer to simply install everything and configure everything from scratch.
Follow this guide to return to stock.
In my case I'm on Ubuntu Linux desktop, fastboot got a "no permissions" type message so I had to sudo in front.
The stock for your device, well look at your device Status page now before you start, Settings -> About Phone -> it says Software Channel "retus" so when I go to the list of ROMs in the above guide go to mirrors.lolinet.com - firmware - moto - harpia - official - then I went to Retus, you'd go to a different one probably.
Note these are old stock ROMs I think from September so there have been one or two updates since then.
Follow the step by step guide, basically lots of fastboot commands.
The step where it says fastboot oem lock it bawks and say fastboot oem lock begin and that will do another wipe, so given a later fastboot oem unlock would do a 3rd wipe I didn't do the oem lock, I left mine unlocked and that worked fine.
Let it boot, setup, you will then be in an old stock ROM, then if it doesn't offer to do an update, go into Settings, System Updates, and trigger it to look. It will then download and apply a stock OTA ontop of the stock ROM. In my case it was 1 OTA, 1 update, then that that complete. You then are on stock current ROMs.
Then root and whatever you want.
But note, to get to the impending N OTA, you'll probably have to right back to the top here because your rooted Moto G4 Play will likely refuse the future OTA as the system is modified, so you'd have to repeat, return to an old stock ROM and then let it go through the 1 or 2 or 3 OTAs to get to that future release.
Hence you'd be doing the return to stock twice.
If the mirrors could be updated to newer stocks it would bypass the OTA. My other phone - the OnePlus3T they offer mirrors of full ROMs, they are far easier to use because if you are rooted you download the full ROM not just the delta incremental of the change of the OTA, and then you can flash in recovery the full ROM and it ignores the system state, and no wiping of data. The fact the mirror site is out of date is causing the need to wipe so the OTAs work on an unmodified system.
Fortunately I have multiple phones so I can use another for the few hours this all takes.
works great, I just flash it and without wiping data
hamelg said:
You don't need backups to apply the latest OTA.
Get the stock corresponding to your device.
flash LOGO, SYSTEM, OEM, BOOT AND RECOVERY images.
Apply November OTA
Apply February OTA
I did that without wiping my data.
If you want to avoid reset to stock & apply all OTAs, you must have a binary backup of system partition, not a file based backup (see comment #8).
I asked about this issue here :
https://forum.xda-developers.com/showpost.php?p=72029402&postcount=55
Click to expand...
Click to collapse
works great and finally my phone can upgrade the OTA updates:laugh::good:
VR25 said:
To make RAW image backups of SYSTEM and OEM partitions, use terminal in TWRP
Or "adb shell" from your computer (running as root)
...
Restore
dd if=/sdcard/system.img of=/dev/block/mmcblk0p53
dd if=/sdcard/oem.img of=/dev/block/mmcblk0p51
Click to expand...
Click to collapse
Here is time to apply the may OTA MPIS24.241-15.3-21.
I restored the vanilla system.img MPIS24.241-15.3-16 with dd, but it didn't work. The OTA failed with the error "system partition has unexpected content" because the sha1sum was incorrect.
Here is the solution :
Before restoring with dd, you must check "Mount System partition read only" is enable in the MOUNT menu of TWRP.
With TWRP 3.1, you need no more to use dd. Now, the feature "system image backup" is available

[Guide]How to get an update if unlocked and rooted, but otherwise on stock EMUI

I just bought the Honor 8 and immediately unlocked and rooted it via Magik. Of course not long after that, I get a notification that there is an update available. You obviously cannot update the phone by simply pressing the "update" button since we have a non-stock recovery. I did a fair amount of research to find out how I could get the update and I wanted to share what I found. All of this information is out there already, but generally speaking it is spread out in many different threads. Hopefully these directions can help someone else.....
First, the usual disclosures.....
Code:
I am not responsible for bricked devices, dead SD cards,
thermonuclear war, or you getting fired because the alarm app failed. Please
do some research if you have any concerns about features included in this GUIDE
before flashing it! YOU are choosing to make these modifications, and if
you point the finger at me for messing up your device, I will laugh at you.
1) Make a NANDroid backup using TWRP: if the new update locks the phone, you will need this backup to restore data after unlocking it
2) Unroot your phone: honestly I did not do this step myself because I simply didn't think about it. The update process worked for me without unrooting but I am also using Magik which doesn't alter the system files. To ensure success I would definitely recommend you unroot. You will have to reroot the phone after the update regardless if you unrooted or not, so you aren't saving any steps by keeping root at this point. If you have used a different root method besides Magik, you must unroot prior to attempting an upgrade.
3) Obtain stock recovery.img file: the update won't work with TWRP as your recovery, so we need to flash the original Huawei recovery to replace TWRP. If you already have a copy of the stock recovery skip to step 4. If you are like me you don't have a copy of the stock recovery image on hand and we will need to extract it from the stock ROM image. Using a computer (not your phone) download the stock ROM image for your device. This website seems to have a list of recent versions and it is where I downloaded the L14 B389 version that I used.
Download the Huawei Update Extractor software and unzip the folder on the computer. Open the HuaweiUpdateExtractor app and use the software to extract the "Recovery.img" file. Here is a Youtube video showing how to do this. Please note, although the video shows several files being extracted you only need to extract the "Recovery.img" file for our use. Move the stock recovery image to your ADB folder so you can flash it in step 4.
4) Flash the stock recovery image: use the stock recovery file and flash it to recovery using the same instructions as you used to flash TWRP in the first place. If you need a refresher, look at section 2 (parts 1-5) of the first post in this thread. Just make sure you substite the name of the stock recovery image instead of the TWRP.img
5) Reboot into system
6) Install Update: go to the Settings - System Update menu on your phone. In the upper right corner, click on the three dots and it will bring up a menu where you can choose "Download latest full update". Click on this. This will start the update process by downloading the full ROM and not just the smaller update package. For me the package size was approaching 2gb, so make sure you are ready to handle that size transfer. After the download is complete, start the update process. I was nervous at first, but everything went fine. If for some reason the update fails, I would reboot and try again. I did have one failure, but I cannot explain if it was a bad download, or something I did wrong (like not unrooting the phone prior to attempting the update). It worked fine the second attempt.
7) Reboot: the phone will reboot and you should check the status to make sure you are on the latest version.
8) Flash TWRP recovery: I read where people said full updates would lock your phone and you would have to start from scratch unlocking it (and therefore wiping all data). This was not the case for me and this update using this method. I was simply able to flash TWRP again. You should be a rock star at flashing recoveries by now so get to it and flash TWRP again. If your phone is locked, then read the note at the bottom of this post.
9) Reboot into system
10) Flash Magik zip: reboot into recovery and flash Magik zip to get SuperSU.
11) Install Magik modules: reboot into system. Reinstall any Magik modules you use as they don't get carried over from the previous installation.
12) Enjoy your updated phone
If for some reason the full update did lock the phone, then you will need to unlock it again before you can flash TWRP. You have already done this before, so use whatever method was successful for you. Obviously this will fully wipe your phone. After flashing TWRP and Magik, I would make a backup of that raw "stock" image just in case this next step doesn't work. After making the backup, you can try to restore just the data partition of the NANDroid backup you made in step 1 (click restore in TWRP, select the backup made in step 1 but deselect everything except the "data" partition before starting the restore process.) I have never done this, but I have read it will recover all your data (apps, etc) without affecting the system partition and therefore it won't mess up the upgrade. I would not recommend doing this if going from Marshmallow to Nugget or Nugget to Oreo however. In those cases, it is better to simple start fresh and redownload all of your apps.
Thank you for this thread.
Hello sic,
I am having the same issue with my Huawei GR-5 2017 and like you, I have my fair share of researching for weeks now and I was really happy to stumble on this thread.
Before I start with the process, I have a few questions for you. I hope you could help me (even though this thread is half a year ago).
Can you elaborate steps 1 and 2 or could you provide me a link on how to do those?
I got xposed installed im on emui 8 i also tried flashfire but it only turns the phone off.. Ist it eneugh to uninstall xposed? And can i get the recovery img from fullota? And must i restore images in magisk? I will try it without xposed installed. And a theory: is the information abaut bootloader unlock stored in a partition like oeminfo? If it is we could restore oeminfo.

TWRP cannot restore. Stuck with 34.4.A.0.252 from Emma

I've posted a few things about this. Trying to pull it together here.
Got phone back to stock F5321 34.3.A.0.252 Customized NOBA 1304-9586 R6D User-live
I still cannot restore via twrp ( 3.2.2 ). I get a missing modem file?
unable to find file system (first period)
Error opening modem_fs1.emmc.win no such file.
I've tried both magisk and supersu flashable. Both do not work. They also break something where I have to reflash with emma to get it to even boot again. If I don't it just sits at the sony screen.
Literally all I need to do is restore a telegam conversation. Can't do this without root. ( need to pull from full twrp backup via titanium). I'd really like to Just restore the whole twrp backup but i cant get that to work.
Can anyone point me to an easy root or getting twrp to actually restore this?
Full story here: https://forum.xda-developers.com/x-compact/help/how-to-7-1-t3824192
j1tters said:
I've posted a few things about this. Trying to pull it together here.
Got phone back to stock F5321 34.3.A.0.252 Customized NOBA 1304-9586 R6D User-live
I still cannot restore via twrp ( 3.2.2 ). I get a missing modem file?
unable to find file system (first period)
Error opening modem_fs1.emmc.win no such file.
I've tried both magisk and supersu flashable. Both do not work. They also break something where I have to reflash with emma to get it to even boot again. If I don't it just sits at the sony screen.
Literally all I need to do is restore a telegam conversation. Can't do this without root. ( need to pull from full twrp backup via titanium). I'd really like to Just restore the whole twrp backup but i cant get that to work.
Can anyone point me to an easy root or getting twrp to actually restore this?
Full story here: https://forum.xda-developers.com/x-compact/help/how-to-7-1-t3824192
Click to expand...
Click to collapse
You won't be able to flash something like SuperSU or Magisk without a cuatom kernel, because of Sony kernel security. Any modification to system will prevent boot. To root, you need to fastboot a custom boot img with security disabled. You can find one here - https://forum.xda-developers.com/x-compact/how-to/stock-8-0-root-recovery-t3747479. Follow instructions in op, and make sure to download the right version for your fw, then flash the same version of TWRP you made the backup with.

Categories

Resources