TWRP Serious problem after failed restore: unable to decrypt storage

yelti

Senior Member
Aug 21, 2009
75
2
0
So today I wanted to try something as I had issues with an app.
I made a full nandroid backup with twrp.
After setting up my phone and try the new app I wanted to restore to the old situation.
When restoring I got the error
createTarFork() process ended with ERROR: 255
After a reboot, no decryption password is asked, all files and folders have strange names.
As a result the phone doesn't boot any more except into recovery.

I'm on oxigen os 9.0.8, latest twrp.
Any clues on how I can fix this.
Phone is a brick now...
 

strongst

Forum Moderator
Staff member
Sep 18, 2007
11,636
8,591
253
prolific location
prolific-page.com
So today I wanted to try something as I had issues with an app.
I made a full nandroid backup with twrp.
After setting up my phone and try the new app I wanted to restore to the old situation.
When restoring I got the error
createTarFork() process ended with ERROR: 255
After a reboot, no decryption password is asked, all files and folders have strange names.
As a result the phone doesn't boot any more except into recovery.

I'm on oxigen os 9.0.8, latest twrp.
Any clues on how I can fix this.
Phone is a brick now...
Some treads below yours is the possible solution https://forum.xda-developers.com/oneplus-5/help/createtarfork-process-error255-t3727673

And: you should always remove pin/security before restore or before backup ;)
 

yelti

Senior Member
Aug 21, 2009
75
2
0
Some treads below yours is the possible solution https://forum.xda-developers.com/oneplus-5/help/createtarfork-process-error255-t3727673

And: you should always remove pin/security before restore or before backup ;)
Thx,

I checked but not really my situation.
I don't have the 999 users issue.
I have made a screenshot of my /sdcard folder:

* it seem that my picture is not comming through, so a link to it imgur
Hopes this sheds some light.

What I got from those threads:
My backup was pretty large, 22GB.
I think I will try to flash the stock rom and see where that gets me.
 
Last edited:

yelti

Senior Member
Aug 21, 2009
75
2
0
Thx,

I checked but not really my situation.
I don't have the 999 users issue.
I have made a screenshot of my /sdcard folder:

* it seem that my picture is not comming through, so a link to it imgur
Hopes this sheds some light.

What I got from those threads:
My backup was pretty large, 22GB.
I think I will try to flash the stock rom and see where that gets me.
So I tried a sideload of the factory images.
Flashing is successfull, next I reboot the phone.
It shows me the oneplus logo and reboots to recovery.

I tried installing the stock recovery, but then when I try to sideload the firmware, the usb device is not recognized.
 

yelti

Senior Member
Aug 21, 2009
75
2
0
I have an idea, but I don't know if is doable.
I would want to backup the data partition, (adb pull /dev/block/sda13 data_encrypted.img).
Next I would wipe the phone completely, setup encryption with the same pincode.
Next I would like to restore the old data, but I don't know how.
I hope this way I will ask to decrypt my data partition again.
Anyone an idea?
 

yelti

Senior Member
Aug 21, 2009
75
2
0
So an update:

I dumped the data and recovery partition.
Code:
adb pull /dev/block/sda13 data_encrypted.img

adb pull /dev/block/sde22 recovery.img
5494 KB/s (67108864 bytes in 11.927s)
Next I wiped the data partition, phone started normally.
I encrypted the phone again with the same pin code.
Next I tried a nandroid backup and restore while the phone was encrypted, no issues there.

Next I flashed an older recovery to the phone.
Now the test to restore the recovery from the image.
On the phone with an adb sheel:
Code:
dd of=/dev/block/sde22 | nc -l -p 9999
On the pc:
Code:
adb forward tcp:9999 tcp:9999
nc 127.0.0.1 9999 < recovery.img
On the phone I get a lot of data on the screen and the message
Code:
8+0 records in
8+0 records out
4096 bytes transferred in 64.155 secs (63 bytes/sec)
First thing I noticed: number of bytes transferred where not the same as the original recovery.
Next I dumped the recovery partition again to disk and compared the md5 hashes, not the same.
Rebooted the phone and it did not go into recovery.
So this process did not work.

Any ideas?
 

yelti

Senior Member
Aug 21, 2009
75
2
0
So, It didn't work with netcat, so I did the following:
connect an usb-c to usb-a coverter to the phone, and connected the external drive with the "bad" image on it.
Then dd-ed the image to the data partition.
When I rebooted the phone, it didn't ask for a pin code and the file and folders where gibbirish again.
So I was back to the starting position.

I'm affraid my data is lost forever :s.