Hi ! My phone (OnePlus3T) had its battery die a couple of hours ago and after putting to charge, I am stuck in a TWRP bootloop every time I try to boot it. I have no idea what is actually going on… Are there method to get it working again without having my data wiped ?
Yes, it’s called a “dirty flash”.
If you open the ROM zip file, you can see which partition is included
But be aware that your device is in a unknown state, so we can’t assume anything about data …
You should first backup your documents (“media” partition), and maybe “data” partition (please see here, select only “data” for backup).
Oh ! I forgot to ask : is your device single-side (A) or double-side A/B device ?
If A/B instructions may vary, and unfortunately I don’t know much about that
OK, so I flashed a recent version of /e/ (0.16) with the adb sideload command, without doing a data wipe first.
It unfortunately stayed in the loop it was first. To be precise, the sequence it starts on is the following :
I haven’t found out whether a Oneplus3T is one-side or double-side. I am though contemplating following a fresh install procedure with full data wipe like here : https://doc.e.foundation/devices/oneplus3/install
I am not seeing why this abnormal behaviour appeared and why the dirty flash bettered anything
Hi, thanks for the following up !
I’m afraid that I no longer know which version was I using… I installed first the 0.13 but now the 0.16 is downloadable and I recall a major update I did a couple of onths ago…
I am now roaming forums in order to be sure to what extent data are backed up with a TWRP backup : namely concerning data associated with apps, contacts, sms etc…
Happy you’ve kinda brought your device back to /e/
But I can’t understand why your backup leads to boot-looping
About partial restore from TWRP : yes, but it’s not easy …
Anyway I’m afraid that your apps are gone for now
I’ll try to :
reinstall some apps with their defaults
take a TWRP backup of “working” Data partition
with TWRP restore “bad” Data
tar some directories (the list is to be established), store tar file outside of Data
restore back “working” Data
untar backups
cross everything, reboot to system …
For tar files storage you could use /data/media (mount it first), as this is a different filesystem .
For example (assuming you created the directory) /data/media/0/Backups/
I think we may also extract files directly from TWRP backup files using Windows + WinRAR …
So we can target some directories to focus on
I’ll try to come back with a list, later.
To put files back to your phone, it is quite simple
One example here with com.android.dialer.
Once you have completed a security TWRP backup just stay in TWRP and have adb ready.
First, note the owners & permissions :
That’s something we’ll have to put back after restore.
You can also record it for every file using ls -alR
I’ll delete the “factory” directory to avoid side effects, then exit adb shell and upload our backup directory :
One could also try to escape the painful owner & permissions steps, having them set while restoring the directory
Let’s try with tar !
First, extract data.ext4 file within Windows, using WinRAR (if splitted archive, choose the right one).
Note about splitted archive : search recovery.log file for “data.ext4”
What happened here ?
We could extract our directory, however TWRP archive has been made with leading / and a relocation path (/data instead of /data/data), and ToyBox tar doesn’t support relocation using -C option (at least on my TWRP, may vary).
So files get extracted using the path stored in archive, and we had to move the directory to it’s correct place.
Note that owners & permissions have been restored !
Don’t forget to delete archive file, once all restores done
Thank you so much for your didactic reply ! It’s on point as I was orienting myself more towards the Win10 + Winrar solution than Linux+cmd lines (Im having trouble with my Ubuntu partitions also haha)
An idea came to my mind : the battery died while I was using the NewPipe app (Youtube client). What if a corrupted file on the app directory created the bug ? Could deleting the directory virtually solve at once this bug ?
About your idea : I feel really sorry, I should come first with a fsck of Data partition
I’ve never seen a Data partition filesystem getting corrupted, but of course that can happen.
A delete might not have solved the problem, but a check would definitively have worth a try !