Uninstalled Updates to Android System Intelligence and Now Stuck in Infinite Boot? - General Questions and Answers

Hi, I'm kinda at my wit's end with this problem that I'm currently facing and would very much appreciate some help. For some background, I'm on a Oneplus 7 Pro running stock firmware (OOS 11.0.7.1). I originally was planning on installing a Magisk module to spoof my device (Pixelify) to gain Pixel features. I noticed that one of the features was patching over the Android System Intelligence. It didn't work out the way I was expecting and I decided to uninstall the module. That went fine, but I wanted to make sure I was on the correct version of Android System Intelligence as well, so afterwards, I went into settings and "uninstalled all updates" to the app, which I assumed would have reset that particular app back to the version that originally shipped with the device.
Now, here's where the problem began. I restarted my device and I ended up sitting on the boot animation screen for over 20 mins. At that point, I knew something was wrong as it still hadn't booted into the system yet. I went into TWRP and decided to do a full reflash of the ROM (without wiping my data) and reflashed magisk as well. No luck either, still stuck at the infinite boot. So I went a step further and dirty flashed again without reinstalling magisk to see if it might have been any other modules not playing nice. Of course, that didn't work either and I'm still currently bootlooping. It's been going for the past 3 hours now...
In any case, would anyone have any suggestions on what I can do without doing a full wipe? I have access to TWRP and decrypting works fine. All of my files seem intact at the moment and from what I see, the ROM is has installed mostly fine, just something is causing it to hang during boot. Is there any way I can view the code running in the background during boot to see what's causing it to hang? Or maybe some other potential solution that I could try?

HunterBlade said:
Hi, I'm kinda at my wit's end with this problem that I'm currently facing and would very much appreciate some help. For some background, I'm on a Oneplus 7 Pro running stock firmware (OOS 11.0.7.1). I originally was planning on installing a Magisk module to spoof my device (Pixelify) to gain Pixel features. I noticed that one of the features was patching over the Android System Intelligence. It didn't work out the way I was expecting and I decided to uninstall the module. That went fine, but I wanted to make sure I was on the correct version of Android System Intelligence as well, so afterwards, I went into settings and "uninstalled all updates" to the app, which I assumed would have reset that particular app back to the version that originally shipped with the device.
Now, here's where the problem began. I restarted my device and I ended up sitting on the boot animation screen for over 20 mins. At that point, I knew something was wrong as it still hadn't booted into the system yet. I went into TWRP and decided to do a full reflash of the ROM (without wiping my data) and reflashed magisk as well. No luck either, still stuck at the infinite boot. So I went a step further and dirty flashed again without reinstalling magisk to see if it might have been any other modules not playing nice. Of course, that didn't work either and I'm still currently bootlooping. It's been going for the past 3 hours now...
In any case, would anyone have any suggestions on what I can do without doing a full wipe? I have access to TWRP and decrypting works fine. All of my files seem intact at the moment and from what I see, the ROM is has installed mostly fine, just something is causing it to hang during boot. Is there any way I can view the code running in the background during boot to see what's causing it to hang? Or maybe some other potential solution that I could try?
Click to expand...
Click to collapse
When you removed the magisk module and uninstalled the updates, did you boot into TWRP and wipe your cache and dalvik cache(but not factory reset or wipe data partition)? If you didn't wipe cache or dalvik, try booting into TWRP and wipe cache and dalvik cache(but DO NOT factory reset). To wipe cache and dalvik cache, boot into TWRP and sekect the Wipe option, then select "advanced wipes", you'll see a list of partitions, select only the cache and dalvik partitions(do not select any other partitions) then swipe the slider to initiate the wipe, when it finishes, reboot your device, it might take 10 or 20 minutes to boot because it has to rebuild the cache and dalvik cache with the new changes that you've made.
Generally, when making changes to the system partition, booting into recovery after making the changes and wiping cache is required in order for the device to load the system with the changes that were made instead of continiung to load cached data from before the changes were made, this tends to cause issues because the device is loading cached data that it can't use or understand anymore. Also, reflashing your ROM without wiping cache and dalvik cache would not solve this issue. You should do this any time you add/remove/modify/delete/uninstall/edit anything at all in the system partition, even if you only changed one tiny thing, you still need to boot into recovery then wipe cache and dalvik cache then reboot to apply the changes. This is not required when changing things in the user partition but it is absolutely vital that you do it when changing anything involved in the system partition.

Droidriven said:
When you removed the magisk module and uninstalled the updates, did you boot into TWRP and wipe your cache and dalvik cache(but not factory reset or wipe data partition)? If you didn't wipe cache or dalvik, try booting into TWRP and wipe cache and dalvik cache(but DO NOT factory reset). To wipe cache and dalvik cache, boot into TWRP and sekect the Wipe option, then select "advanced wipes", you'll see a list of partitions, select only the cache and dalvik partitions(do not select any other partitions) then swipe the slider to initiate the wipe, when it finishes, reboot your device, it might take 10 or 20 minutes to boot because it has to rebuild the cache and dalvik cache with the new changes that you've made.
Generally, when making changes to the system partition, booting into recovery after making the changes and wiping cache is required in order for the device to load the system with the changes that were made instead of continiung to load cached data from before the changes were made, this tends to cause issues because the device is loading cached data that it can't use or understand anymore. Also, reflashing your ROM without wiping cache and dalvik cache would not solve this issue. You should do this any time you add/remove/modify/delete/uninstall/edit anything at all in the system partition, even if you only changed one tiny thing, you still need to boot into recovery then wipe cache and dalvik cache then reboot to apply the changes. This is not required when changing things in the user partition but it is absolutely vital that you do it when changing anything involved in the system partition.
Click to expand...
Click to collapse
Thanks for the response! Unfortunately, I already wiped the dalvik cache after I reflashed my ROM yesterday and it didn't end up being able to boot. Since the OnePlus 7 Pro is an a/b device, there's no other cache partition to wipe.
I ended up leaving it to run on the boot animation screen until it ran out of battery (just to see what would happen). Besides for the phone becoming burning hot to the touch, it just stayed at that screen for another hour or 2 before it finally ran out of battery. This leads me to believe that it's definitely doing something in the background at that time, but just not sure what.
Edit: Just for some extra context, I also created a flashable zip of the latest OEM version of the Android System Intelligence APK and flashed it to system/app through twrp. Since I'm not able to boot to unlock my device, I thought this was the only way to install the app. In any case, it didn't make a difference either. Not sure if this means maybe the APK wasn't the issue or if this just didn't install the app the way I was expecting. No error codes when flashing the zip though.

HunterBlade said:
Thanks for the response! Unfortunately, I already wiped the dalvik cache after I reflashed my ROM yesterday and it didn't end up being able to boot. Since the OnePlus 7 Pro is an a/b device, there's no other cache partition to wipe.
I ended up leaving it to run on the boot animation screen until it ran out of battery (just to see what would happen). Besides for the phone becoming burning hot to the touch, it just stayed at that screen for another hour or 2 before it finally ran out of battery. This leads me to believe that it's definitely doing something in the background at that time, but just not sure what.
Edit: Just for some extra context, I also created a flashable zip of the latest OEM version of the Android System Intelligence APK and flashed it to system/app through twrp. Since I'm not able to boot to unlock my device, I thought this was the only way to install the app. In any case, it didn't make a difference either. Not sure if this means maybe the APK wasn't the issue or if this just didn't install the app the way I was expecting. No error codes when flashing the zip though.
Click to expand...
Click to collapse
Use TWRP to create a backup of your device in its current state, then try to extract the data from the backup, if the data is intact, it can be restored once you get the device working. If your data is intact in the backup, you can do a full system and data wipe via TWRP then reflash your ROM then restore the data that you want restored. This "should" get you back to where you want to be. Be careful, be certain of what you do at every step or you may end up losing data or not being able to get it to work while at the same time be able to keep your previous data.

Droidriven said:
Use TWRP to create a backup of your device in its current state, then try to extract the data from the backup, if the data is intact, it can be restored once you get the device working. If your data is intact in the backup, you can do a full system and data wipe via TWRP then reflash your ROM then restore the data that you want restored. This "should" get you back to where you want to be. Be careful, be certain of what you do at every step or you may end up losing data or not being able to get it to work while at the same time be able to keep your previous data.
Click to expand...
Click to collapse
Just finished backing up my data through TWRP and and did a full reformat of my device. After reflashing my ROM, I was back up and running! So thanks for the tip! However, after restoring the data partition, I realized that the issue was with the data partition specifically rather than on the system side as I had the same problem again. So I cleared the data partition again but kept data/media (internal storage) intact, and just like that, the device booted just fine this time.
Would you have any suggestions on what I could do to to troubleshoot the data partition? I have some important app info that I need to get the data back from.
Or if not, do you know how to capture logs from a failed boot?

HunterBlade said:
Just finished backing up my data through TWRP and and did a full reformat of my device. After reflashing my ROM, I was back up and running! So thanks for the tip! However, after restoring the data partition, I realized that the issue was with the data partition specifically rather than on the system side as I had the same problem again. So I cleared the data partition again but kept data/media (internal storage) intact, and just like that, the device booted just fine this time.
Would you have any suggestions on what I could do to to troubleshoot the data partition? I have some important app info that I need to get the data back from.
Or if not, do you know how to capture logs from a failed boot?
Click to expand...
Click to collapse
Logs from logcat do not persist through reboot. You need to look at your last_kmsg file, kmsg persists after reboot and it should capture the issue. If you have important app data, it should have been stored in data/media in your Android/(name of app) folder and your apps should be in data/data/app folder.
In the future, I recommend booting into TWRP and creating a backup before you make any kind of changes to your device, then, if the change causes an issue you can just boot into TWRP and restore the backup, this will put you back to what you had right before you made the change. Then you can troubleshoot what caused the issue and find a solution to how to apply your change without causing the issue again.

Droidriven said:
Logs from logcat do not persist through reboot. You need to look at your last_kmsg file, kmsg persists after reboot and it should capture the issue. If you have important app data, it should have been stored in data/media in your Android/(name of app) folder and your apps should be in data/data/app folder.
In the future, I recommend booting into TWRP and creating a backup before you make any kind of changes to your device, then, if the change causes an issue you can just boot into TWRP and restore the backup, this will put you back to what you had right before you made the change. Then you can troubleshoot what caused the issue and find a solution to how to apply your change without causing the issue again.
Click to expand...
Click to collapse
Yeah, lesson learned with that. I'm just glad I was able to backup my data in TWRP, which means I should theoretically be able to extract them back out again if I really need them. But back to the topic, I did check my last_kmsg file and it was unfortunately empty.
What I did do though was since I still have access to my recovery, I pushed my PC's adb keys to my device to be able to execute the command and grab a logcat during boot.
Could you by any chance take a look at the file (it's a onedrive preview link) to see if you might be able to notice the issue? I'm going into the territory of Googling everything and I was just completely lost when I looked at the file as I have no idea which errors actually matter and which ones don't. Thanks in advance!

HunterBlade said:
Yeah, lesson learned with that. I'm just glad I was able to backup my data in TWRP, which means I should theoretically be able to extract them back out again if I really need them. But back to the topic, I did check my last_kmsg file and it was unfortunately empty.
What I did do though was since I still have access to my recovery, I pushed my PC's adb keys to my device to be able to execute the command and grab a logcat during boot.
Could you by any chance take a look at the file (it's a onedrive preview link) to see if you might be able to notice the issue? I'm going into the territory of Googling everything and I was just completely lost when I looked at the file as I have no idea which errors actually matter and which ones don't. Thanks in advance.
Click to expand...
Click to collapse
Too many errors for me to volunteer my time to figure out.
All I can say is, at each line that reports an error, it states the error then lists the service(s) or app(s) that are involved in or effected by that error, everything listed after the error all the way down the list to the next error are related to that error.
Do a Google search for each error and the name of the package that immediately follows that error.

Droidriven said:
Too many errors for me to volunteer my time to figure out.
All I can say is, at each line that reports an error, it states the error then lists the service(s) or app(s) that are involved in or effected by that error, everything listed after the error all the way down the list to the next error are related to that error.
Do a Google search for each error and the name of the package that immediately follows that error.
Click to expand...
Click to collapse
No worries, totally understandable. I think Titanium Backup might actually be my saving grace, as it's able to read TWRP files as well. So all I have to do is run my backup through that and have it directly restore my data. In any case, appreciate the advice you've given so far!

you might probably found a fix but you're supposed to put the other os in the internal storage and not the micro sd card since it wont detect bootable drives just like on a pc and if u didnt install the os on the sd card then you can search for a boot unlocker which can unlock your phone from the infinite boot based on your phone and os
have a good day

Related

Android Optimizing Apps even after factory reset

Its been a while now, the issue probably triggered when I tried to set up multirom and install Marshmallow a few months back. I do not run multirom anymore, and even if I do a clean install (factory reset), when the phone first boots, it shows the "Android is starting" screen with "Optimizing x of 136" and takes a good 5 minutes. Why is this happening? After a factory reset I have no apps installed! I have deleted the multirom folder as well as the sdcard/Android/data folder, in case its picking up the app data in these folders to optimize. Is there something I'm missing?
Because when you flash a ROM or factory reset your device, Dalvik / ART cache gets wiped. While optimizing apps it gets created again...
I think goldengargoyle is baffled why there are 136 apps for optimization, when he erased all his data, including apps. This actually annoys me also, should't there be only a few(10-30) default apps to optimize?
goldengargoyle did you figure it out? I did the same now and i was not expecting to have 140+ apps optimizing ...
goldengargoyle said:
Its been a while now, the issue probably triggered when I tried to set up multirom and install Marshmallow a few months back. I do not run multirom anymore, and even if I do a clean install (factory reset), when the phone first boots, it shows the "Android is starting" screen with "Optimizing x of 136" and takes a good 5 minutes. Why is this happening? After a factory reset I have no apps installed! I have deleted the multirom folder as well as the sdcard/Android/data folder, in case its picking up the app data in these folders to optimize. Is there something I'm missing?
Click to expand...
Click to collapse
To truly ensure the issue is fixed, back up what you need from the phone and fastboot flash a stock rom (preferably one of the last builds), let it boot then, go though the set up as you typically would, transfer the rom and other things you would like to flash to the phone, fastboot flash TWRP and finally, flash whatever you transferred.

Oneplus 6 bootloop after upgrade to 9.0.4 (+failed to restore the nandroid backup!)

So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Thank you for making the time writing this, it is relief to hear that you figure this out. Will try this first in the morning.
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
This guide can also be used to restore from other roms;
b217260 said:
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
Click to expand...
Click to collapse
What did you do?
---------- Post added at 02:14 PM ---------- Previous post was at 02:13 PM ----------
petran07 said:
This guide can also be used to restore from other roms;
Click to expand...
Click to collapse
I guess so. I never had to use a backup to restore on a custom ROM yet.
tabletalker7 said:
What did you do?
Click to expand...
Click to collapse
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
b217260 said:
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
Click to expand...
Click to collapse
It's my bad. I always store my backups on an SD card with my OTG card reader. I forget others don't think like I do sometimes
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Had faced this many times. ...after trying diff options and failed Qualcome MSM method works perfectly.
Yep, You cant restore data i think as it being already formated as per knowd based on your steps above on diff posts
ahacker said:
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
Click to expand...
Click to collapse
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
tabletalker7 said:
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
Click to expand...
Click to collapse
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
ahacker said:
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
Click to expand...
Click to collapse
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
tabletalker7 said:
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
Click to expand...
Click to collapse
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
ahacker said:
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
Click to expand...
Click to collapse
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
tabletalker7 said:
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
Click to expand...
Click to collapse
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
ahacker said:
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
Click to expand...
Click to collapse
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
tabletalker7 said:
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
Click to expand...
Click to collapse
-It is as horrible as not being able to restore a full backup. No more, no less.
-Twrp has an ability to encrypt your backups, with your experience you must know this.
-You are suggesting someone to switch to iphone only because they point out that the things are wrong or dont add up.
-It is quite a common knowlege that you get good security out of encryption if you make things explicit and clear. And not how you may think it is. Cause you don't seem to know where the keys are stored for the data partition. Obviousely, because the phone eventually decrypts your data, the keys must be stored somewhere or derived from you swipe pattern.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
Following these instructions seems to be the only way of restoring a nandroid backup (at least for my Op6 bought on AliExpress from China). Important: step 1 wipes your sdcard, so the backup you want to restore must be on otg usb stick.
After spending many hours I managed to restore a backup at least once. Fortunately for me I have no plans of upgarding Android and will likely forever stick with the following set:
1) 5.1.11-OREO-OnePlus6Oxygen_22_OTA_015_all_1808102118_770880-FASTBOOT.zip (found here)
2) twrp-3.2.3-x_blu_spark_v9.85_op6.img + twrp-3.2.3-x_blu_spark_v9.85_op6.zip (found here)
3) Magisk-v18.1.zip (found here)
My plan is to fully debloat the phone and then I will keep everything unchanged for years, because nowadays updates are more about twisting your arms than giving you usefull features. I almost got to that state, but one little glitch forced me to roll back and the whole hell with the Nandoid backups on Op6 started.
PS: It's very interesting what is really going on with this A/B system. There must be a storage where the encryption keys are stored (if it is the encryption that does prevent the phone from restoring. Which I doubt because Twrp sees the files fine). There also probbaly stored what slot is used. That information does not get captured by the Nandroid backup.
(Btw, It seems that blu_spark Twrp is really NOT encrypting your backups with the passwod you supply. Official Twrp does. I have plenty of old encypted backups, from wich I could not extract any personal data (/data/data folder) but yesterday I could extract my private information from a backup done by blu_spark Twrp. This is serious iussue. I'll double check and will post if confirmed.)
Not confirmed, I was looking at unencrypoted file.

TWRP backup restore stuck in bootloop and different exotic issues (1913 Europe)

After my experiment of trying out Beta 3 of Android Q failed apocaliptical I tried to restore the backup I made minutes before. But no matter what I do, I keep getting:
- bootloops (straight rebooting after showing the unlocked bootloader warning)
- restart into recovery
- Oxygen OS loading animation stuck and animation being very slow
- not getting it anymore but had it yesterday in the early stages of my disaster management: Qualcomm Crash POST
Despite that the backup was generated succesfully (at least thats what TWRP said)
I tried almost every guide out there.
- switching to rm -rf
- restoring only data, only boot, only system and a mix of those
- flashing the OTA before restoring backup
- uninstalling magisk und reinstallating magisk (with and without separate reboots)
-multiple wipes of single partitions and data formatting
The only good thing is that I don't get the 255 error anymore I had at the beginng, allthough I don't really know anymore how I did it.
At the end I am only able to restore everything with the MSNTOOL out there.
Is there any golden hint to get the data the be restored? The backup of /data is critical as there my authenticator and banking data are in there.
Thank you in advance
Edit: As I am slowly getting fed up with OnePlus and the problems (proximity sensor, adaptive brightness, whatspps microphone, twrp issues, lacking tech guides if at all) I thought about migrating to Pixel 5. Is it possible to migrate the data partition? Or are all backup partitions strictily device specific?
anphex said:
After my experiment of trying out Beta 3 of Android Q failed apocaliptical I tried to restore the backup I made minutes before. But no matter what I do, I keep getting:
- bootloops (straight rebooting after showing the unlocked bootloader warning)
- restart into recovery
- Oxygen OS loading animation stuck and animation being very slow
- not getting it anymore but had it yesterday in the early stages of my disaster management: Qualcomm Crash POST
Despite that the backup was generated succesfully (at least thats what TWRP said)
I tried almost every guide out there.
- switching to rm -rf
- restoring only data, only boot, only system and a mix of those
- flashing the OTA before restoring backup
- uninstalling magisk und reinstallating magisk (with and without separate reboots)
-multiple wipes of single partitions and data formatting
The only good thing is that I don't get the 255 error anymore I had at the beginng, allthough I don't really know anymore how I did it.
At the end I am only able to restore everything with the MSNTOOL out there.
Is there any golden hint to get the data the be restored? The backup of /data is critical as there my authenticator and banking data are in there.
Thank you in advance
Edit: As I am slowly getting fed up with OnePlus and the problems (proximity sensor, adaptive brightness, whatspps microphone, twrp issues, lacking tech guides if at all) I thought about migrating to Pixel 5. Is it possible to migrate the data partition? Or are all backup partitions strictily device specific?
Click to expand...
Click to collapse
Try, booting into twrp... Format data. Type yes to format. Restore. Should boot.
@soka said:
Try, booting into twrp... Format data. Type yes to format. Restore. Should boot.
Click to expand...
Click to collapse
I did just exactly that on stock 10.0.0.11 to no avail, the TWRP restore went through fine but upon system reboot the phone stayed on the bootloader unlocked warning for about two minutes, then it rebooted straight into stock recovery.
It's beyond my understanding yet how the user data partition can cause the whole system to effing die.
My only hunch is that it has something to do with Magisk I had installed during the backup (encryption was disabled btw). But as I said I already tried running Magisk installer and uninstaller on different occasions with the same result. Also the only thing that should happen is that after restore and reboot the phone should tell me that Magisk isn't installed anymore.
Edit: So for now I reverted to full stock 10.0.11 and for the sake of experimenting I made a backup with system, boot and data of this stock rom and restored it succesfully. When I restore my actual data backup I get the same old restart and then it throws me back into TWRP. Is there any log I can check to see what's happening there?
Sorry for double post, but I think this might be very interesting for people with a similar problem as this seems to be very common with OnePlus phones.
So I found a very dirty and hacky way to get a least my most importants app running in the state they had during my backup I was trying to restore. Here's what I did, without any guarantee it might work for you or be stable in the end.
Code:
1. Revert the phone to a clean stock rom and update to the latest stable version (at the time of writing 10.0.11), it should be fully factory reset, aka like new. I am not sure but it may be necessary that you install the apps you want to restore first since the I am not sure the partition we use later contains the app AND the data too.
2. Unlock bootloader and flash latest TWRP, may it be official or mauronofio's
3. Make a backup of that current stock data partition
4. Restore data partition from your actual needed twrp backup (if it ends with 255, try to format data partition before in TWRP)
5. With the TWRP file manager navigate to the /data/data folder and copy everything to an external storage (I chose USB)
6. Restore the stock data partition
7. Now again with the TWRP file manager navigate to the /data/data folder on your external storage (should be /usbstorage) and search for the apps you need to restore (probably banking apps, authenticator, etc.), the name will be something like com.google.authenticator2.
8. Copy the folder of any needed app into the /data/data folder on your phone. Best you do it one by one just to make sure.
Now you can reboot to system. The apps should be fully restored. In my case it worked with Google Authenticator, Blizzard Authenticator, Consorbank Secure Plus (shows undefined error yet), Hue Pro. Maybe I will try more.
Edit: Consorsbank Secure Plus as you might guess is a tan generation banking app. When entering the pin when opening the app it shows "An error has occured". Dunno why, maybe a security checksum error or something. I found com.android.keychain and copied for the sake of trying too but it didn't help.
If you have any questions, suggestions or improvements, feel free to post!

oneplus 6 LineageOS 17 -> 18 . Failed TWRP Restore (255)

Greetings,
I had lineageos 17 on my one+6 and after making a twrp backup and making sure i had all my files that i wanted i took the plunge and upgraded to lineage 18.
This would have been great except that I didnt actually have all the files I wanted. I critically forgot to make a manual separate backup of signal messenger. I need to get the history of signal messenger back. The only way i can think to do this, is to restore the twrp backup i made before upgrading and then making a backup with signal messenger app and then restoring the signal backup in lineage 18.
I attempted to restore my TWRP backup. When I made the TWRP backup I had checked ALL the boxes and saw no errors on the screen. When i attempted to restore i checked all the boxes on the screen and got what appears to be a fairly common error (255) when attempting to restore data (not sd/usb).
After, when i went to reboot twrp notified me that there was no OS installed. I rebooted anyway. I ended up stuck in a bootloader loop. I then downloaded
10.3.6-OnePlus6Oxygen_22.J.48_OTA_048_all_2010042239_c0c1fee2ee-FASTBOOT.zip
Click to expand...
Click to collapse
Then i unzipped that file and typed in the linux terminal:
fastboot -w update images.zip
Click to expand...
Click to collapse
I now have a working phone again.
I would like to know how do i restore the TWRP recovery image that I made at the beginning of the whole process. I'm pretty sure if I can do that I can then make a new Signal backup and be fine.
While doing lots of trouble shooting for the last 36 hours or so, it seems relevant to mention that my phone used to require I enter a PIN in order to use it, and I had to enter that same PIN in TWRP before I made the backup. The temporary OxygenOS I installed to just have a working phone number for work does not have a pin.
I have never had any success restoring TWRP backups so I eventually gave up relying on them after the 4th failed attempt.
But I distinctly remember reading this piece of advice:
0. Copy the TWRP backups onto a separate storage (I assume you have already done that)
1. Install the original ROM that is present in the backup; don't restore the System partition
2. Once installation has completed, restore only the Data partition and ignore all the rest such as cache, system, boot, etc.
3. Reboot
Personally, I have never tried it. But just from reading it, it seems like it may just work. Or it might not.
adeklipse said:
I have never had any success restoring TWRP backups so I eventually gave up relying on them after the 4th failed attempt.
But I distinctly remember reading this piece of advice:
0. Copy the TWRP backups onto a separate storage (I assume you have already done that)
1. Install the original ROM that is present in the backup; don't restore the System partition
2. Once installation has completed, restore only the Data partition and ignore all the rest such as cache, system, boot, etc.
3. Reboot
Personally, I have never tried it. But just from reading it, it seems like it may just work. Or it might not.
Click to expand...
Click to collapse
I appreciate the reply.
It's the data partition that's throwing this 255 error, which it seems to have something to do with it being encrypted i'd guess? In the future, is it possible to just dd the whole thing somehow?
karenmcd said:
I appreciate the reply.
It's the data partition that's throwing this 255 error, which it seems to have something to do with it being encrypted i'd guess? In the future, is it possible to just dd the whole thing somehow?
Click to expand...
Click to collapse
Have you tried wiping the /data partition from TWRP's Advance Wipe?
karenmcd said:
Greetings,
I had lineageos 17 on my one+6 and after making a twrp backup and making sure i had all my files that i wanted i took the plunge and upgraded to lineage 18.
This would have been great except that I didnt actually have all the files I wanted. I critically forgot to make a manual separate backup of signal messenger. I need to get the history of signal messenger back. The only way i can think to do this, is to restore the twrp backup i made before upgrading and then making a backup with signal messenger app and then restoring the signal backup in lineage 18.
I attempted to restore my TWRP backup. When I made the TWRP backup I had checked ALL the boxes and saw no errors on the screen. When i attempted to restore i checked all the boxes on the screen and got what appears to be a fairly common error (255) when attempting to restore data (not sd/usb).
After, when i went to reboot twrp notified me that there was no OS installed. I rebooted anyway. I ended up stuck in a bootloader loop. I then downloaded
Then i unzipped that file and typed in the linux terminal:
I now have a working phone again.
I would like to know how do i restore the TWRP recovery image that I made at the beginning of the whole process. I'm pretty sure if I can do that I can then make a new Signal backup and be fine.
While doing lots of trouble shooting for the last 36 hours or so, it seems relevant to mention that my phone used to require I enter a PIN in order to use it, and I had to enter that same PIN in TWRP before I made the backup. The temporary OxygenOS I installed to just have a working phone number for work does not have a pin.
Click to expand...
Click to collapse
For what I know you need your device to be decrypted to restore from custom recovery.
I've had some luck in similar situations using Titanium Backup to extract an app and data from TWRP backup.
Your mileage may vary.

Backup methods, .win versus .img, when to use each type?

When I used payload dumper on the OTA for this device I ended up with 34 .img files. When I used TWRP to backup all the partitions from the OxygenOS I end up with 12 .win files. When I used dd commands to get copies of boot_a & boot_b and persist, I end up with .img files. When I used dd commands to get EFS backup I ended up with modemst1.bin and modemst2.bin.
I have all these back ups now but I'm not sure which type of file to use and when.
I have TWRP and Lineage on my 8T and they're working great. But I'd like to now restore OxygenOS, install the latest OTA, re-install TWRP, then install a newer version of Lineage. There's a good chance I'll slip up and have to recover my phone at some point and I'd like to know first if I'm better off trying to get TWRP booted and then restoring all the .win backups, or if I should just flash all the .img files from the payload dumper.
Can anyone offer some tips or explain the difference?
Look in TWRP thread. It mentions what partitions to backup (and restore) when changing ROMs.
Look in TWRP thread. It mentions what partitions to backup (and restore) when changing ROMs.
Click to expand...
Click to collapse
I've read through that thread and made a lot of notes, but I guess I'm just wondering at this point, since we have a fully-functional TWRP is it the case that as long as I have the .win files from the TWRP backup of boot, dtbo, super and data partitions that should be all I need?
Persist.img & Modemst1/2.bin & boot_a/b.img can be discarded? Or would you keep these on hand for other reasons?
FakeGemstone said:
I've read through that thread and made a lot of notes, but I guess I'm just wondering at this point, since we have a fully-functional TWRP is it the case that as long as I have the .win files from the TWRP backup of boot, dtbo, super and data partitions that should be all I need?
Persist.img & Modemst1/2.bin & boot_a/b.img can be discarded? Or would you keep these on hand for other reasons?
Click to expand...
Click to collapse
Persist and modem images presumably contain IMEI information, so better keep them somewhere safe. Boot_a/b.img can be discarded.
It's starting to make sense. Thank you for your explanation.
My phone had Lineage and TWRP installed and was running great, but I wanted to try out the backup and restore option of TWRP. So I backed up /data then used TWRP to restore the OxygenOS to the version I was using right before I installed Lineage. I restored OxygenOS to both slots and also I formatted /data.
After doing an minimal setup on OxygenOS, taking a quick look around to see if everything looked okay and rebooting to system a couple of times, I used TWRP to install LineageOS again. That seemed to work fine. I did minimal setup, took a look around, rebooted a couple of times, so far; so good.
I then followed the instructions from theincognito on Steps for backing up and restoring data in TWRP to restore the data partition:
It seemed to work fine, except I was never presented with a blank screen (a clue?) and the phone just booted to system normally. My apps and settings appeared to be restored BUT the 3-button system navigation icons (home/back/switchapps) were missing. So whenever I navigated away from the home screen there was no way to get back except to reboot the phone. It didn't matter if I switched to 2-button navigation or gesture navigation, none of it worked. So I guess the navigation options are all apps and those apps malfunctioned when /data was restored. Also, I could not enable Advanced Restart for the Power Menu. That's probably a system app, too. I didn't have a password on the phone at any time, or a SIM card installed. I know the TL;DR instructions in post #3 say that you should just reboot to system again if you have this problem, but doing so didn't fix the problem for me. I must have made a mistake at some point.
I ended up wiping the phone, doing a clean install of Lineage and setting up the apps and preferences the old-fashioned way.
I'd like to try this again to see if I can get it to work. Does anyone have suggestions of what went wrong?
Should I have tried restoring /data a second time before giving up and wiping the phone?
Does the fact I didn't get the expected blank screen after restoring /data have any significance?
Did the problem more likely originate with the backup process or the restore process?
Oh boy, it just dawned on me... Should I have also restored the backup of Boot/dtbo/Super? I assumed those wouldn't change if you were restoring to the exact same version of Lineage so I didn't bother with it.
I stumbled across a trick to get the restored data backup working again. I went to Settings --> Apps & Notifications --> App Info. Then I selected the option "Show System" from the list at the top with the 3 vertical dots. From the list of apps I selected 3-button navigation and then selected "force stop". After that, I rebooted and all the settings that were missing before were magically back in place, and both the Status Bar and the Navigation Bar were functioning and configured just the way I had them when I did the backup. I don't know anything about how system apps work so I can't explain why this helped, but I tested it twice with fresh installations of LineageOS and it worked exactly the same both times.
I should add that between this post and the one above from February 1st, I have re-installed Oxygen OS many times using old and new OTA zips, and installed Lineage OS several times, first on one slot then the other. And each time I've restored various back ups of LineageOS system files and LineageOS data files following the instructions, but always the result was a partial restoration of user configurations and missing status and navigation bars. I wonder that I'm the only person who found that booting twice after a data restore didn't bring back those menus. But hopefully if it happens to someone else they'll find this post and know what to do.

Categories

Resources