Stuck in bootloop to TWRP after my battery died

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

Would you mind to try the former version, which was working fine ?

If it still won’t work, I can’t see anything but complete format of Data partition :frowning:

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’ve tried installing 13 / 15 / 16 already… without success

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…

Daily update :
I did the factory reset and the rom flashing worked flawlessly. However, trying to recover the backup brought back the bug…

Consequently, any of my apps, sms, contacts, mms data is not back…

I am wondering whether there is a way to do a partial recover from a TWRP backup file, which would solve my trouble.

Happy you’ve kinda brought your device back to /e/ :slight_smile:
But I can’t understand why your backup leads to boot-looping :frowning:

About partial restore from TWRP : yes, but it’s not easy …
Anyway I’m afraid that your apps are gone for now :frowning:
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 :wink: .
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 …

If you’re ok with this, I can dig into :

  • try extracting with WinRAR
  • establish a list ok well-known directories
1 Like

I could open archive and extract files from a TWRP backup, using WinRAR (Windows 10) :slight_smile:

So this post will focus on using Windows to restore data.

Data image may be a single file or split parts :
image image

If splitted, each file is independent, so I’ll suggest to extract them all in the same temporary directory.

Don’t be abused by the “ext4” extension, WinRAR can open the archive and extract files :

Interesting places are \data and \user_de\0 .

Also, WinRAR displays sizes, that can be a first-level filtering of interesting things :

Once extracted, the databases can be opened using the tools described here.
Example with DB Browser and com.android.dialer database :

So we can target some directories to focus on :slight_smile:
I’ll try to come back with a list, later.

To put files back to your phone, it is quite simple :slight_smile:
One example here with com.android.dialer.

Once you have completed a security TWRP backup :wink: just stay in TWRP and have adb ready.
First, note the owners & permissions :
image
That’s something we’ll have to put back after restore.
You can also record it for every file using ls -alR :wink:

I’ll delete the “factory” directory to avoid side effects, then exit adb shell and upload our backup directory :
image

We’ll have to arrange owners & permissions :wink: :
image

image

(continued)

One could also try to escape the painful owner & permissions steps, having them set while restoring the directory :wink:

Let’s try with tar ! :smiley_cat:

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” :wink:

Then upload it to your phone :

And extract our directory :
image

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 ! :partying_face:

Don’t forget to delete archive file, once all restores done :wink:

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)

I expected the process to be fairly simpler than this, with an easy Cut&Replace of the different folders haha
I have been also puzzled about the “taring” and “untaring” vocables, which I came across for example in this post (French) : https://www.phonandroid.com/forum/threads/resolu-restaurer-une-save-de-mes-applis-sms-etc-par-twrp.185492/

Your explanations clarifies it fairly !

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 ?

Thanks ! I’ll be happy if it can help :slight_smile:

About your idea : I feel really sorry, I should come first with a fsck of Data partition :sob:
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 !

1 Like

Im interested in this lead ! I am not really familiar with this command, I came across this solution :

https://android.stackexchange.com/questions/88277/corrupted-data-partition
The interesting comment is :

May I ask if it sounds ok to you ?

1 Like

Sounds good, indeed ! :slight_smile:

Tried it for you on my testing device :slight_smile:
Boot in TWRP, then :

  1. get mounted devices path : /data is /dev/block/dm-0 (also mounted on /sdcard)
  2. unmounted twice (/data and /sdcard)
  3. check : ok ! Let’s run e2fsck :
    a. -c stands for “check for bad blocks”
    b. -f to use the Force
    c. -v to get some info
    d. -z is useless, no e2undo provided by my TWRP …
  4. why not ?
  5. bullhead mode :smiley:

Rebooted into System after that, everything ok :slight_smile:

You can also use something like e2fsck -n -f /dev/... to dry run (help with e2fsck --help).

1 Like

So I tried your recommendations with the following results displayed :slight_smile:

Unfortunately, this did not solved the bug at all…

I am now diving back into the procedure using Winrar, crossing fingers to deal with it successfully

Sorry to read that :frowning:

I can help with restore, but not before next week …
In the meantime, could you please send me privately the recovery.log file of your TWRP backup ?

Sure thing ! I did not manage to find the DM feature in this forum though, if there is one…
I can edit this post adding temporarily my personal email if you want ?

Click on the forum member’s username >> Message

1 Like

@pebcak thank you, it is not appearing in my device unfortunately, it would have been simple :

nor does the Message button appear in the User’s page…

I have every single piece of blocking disabled (in-browser or add-ons). Tried in Waterfox, Firefox and Brave.
No button found.

Could my profile settings be the cause ? Or my new-user status perhaps?
@smu44 PMing me can let us continue in private maybe.

That’s odd!
:thinking:

PM sent, as requested :slight_smile:
I hope you will get it !

Maybe you have to be member of e_user to send PM …
image

@manoj, could you please help with this ?

1 Like

Pl can you try again and check if you see the option to send PM shows up for you.

2 Likes

It’s working now, thanks @manoj once more ! :smile_cat: