Forgot pin to decrypt volume on Lineage - General Questions and Answers

Last year I installed LineageOS on a S9+ (now discontinued) and I encrypted the device. Now I have completely forgotten the pin to decrypt it, so it returns a message which states it will wipe all my data after some failed attempts. How to solve this problem before it's too late? Can I reset the attempts count, change the pin or backup the encrypted data?
The good news is I can access TWRP (v3.4.0) recovery mode. I read some tutorials, but I shouldn't remove decryption by cleaning the partition. Unlike normal boot, can I try to decrypt it as many times as I want, until I retrieve the pin, without worrying about my data being automatically erased? What if normal boot won't recognize the correct pin after recovering/changing it from TWRP? Do you know any terminal commands to execute the above tasks?

casxa said:
Last year I installed LineageOS on a S9+ (now discontinued) and I encrypted the device. Now I have completely forgotten the pin to decrypt it, so it returns a message which states it will wipe all my data after some failed attempts. How to solve this problem before it's too late? Can I reset the attempts count, change the pin or backup the encrypted data?
The good news is I can access TWRP (v3.4.0) recovery mode. I read some tutorials, but I shouldn't remove decryption by cleaning the partition. Unlike normal boot, can I try to decrypt it as many times as I want, until I retrieve the pin, without worrying about my data being automatically erased? What if normal boot won't recognize the correct pin after recovering/changing it from TWRP? Do you know any terminal commands to execute the above tasks?
Click to expand...
Click to collapse
Go into TWRP.
Click the file manager.
Now go to data/system and find "locksettings.db" and delete it.
Reboot phone and see if pin is gone. If not.
Beck to TWRP. Back into data/system. And delete all of these and anything else that starts with "locksettings" that I forgot.
"gatekeeper.password.key
-gatekeeper.pattern.key
-locksettings.db
-locksettings.db-shm
-locksettings.db-wa
Reboot and pin should be gone.
Look into these as well.
[Solution] How to Delete Your Android Security PIN & PATTERN
This guide will walk you through deleting your security PIN via several methods. This guide is for those who have forgotten your security PIN and cannot do a Google reset for some reason. Have restored your phone from an old backup that had a...
forum.xda-developers.com
[Tool][Tested]Remove lockscreen password/pin
Hi Guys, I know it's a frustrating situation when your phone reject your lockscreen password. There are some solutions and I had made a flashable zip which will make the task easier for you instead of deleting the files yourself. This has been...
forum.xda-developers.com

andybones said:
Go into TWRP.
Click the file manager.
Now go to data/system and find "locksettings.db" and delete it.
Reboot phone and see if pin is gone. If not.
Beck to TWRP. Back into data/system. And delete all of these and anything else that starts with "locksettings" that I forgot.
"gatekeeper.password.key
-gatekeeper.pattern.key
-locksettings.db
-locksettings.db-shm
-locksettings.db-wa
Reboot and pin should be gone.
Look into these as well.
[Solution] How to Delete Your Android Security PIN & PATTERN
This guide will walk you through deleting your security PIN via several methods. This guide is for those who have forgotten your security PIN and cannot do a Google reset for some reason. Have restored your phone from an old backup that had a...
forum.xda-developers.com
[Tool][Tested]Remove lockscreen password/pin
Hi Guys, I know it's a frustrating situation when your phone reject your lockscreen password. There are some solutions and I had made a flashable zip which will make the task easier for you instead of deleting the files yourself. This has been...
forum.xda-developers.com
Click to expand...
Click to collapse
The /data folder doesn't list any files

casxa said:
The /data folder doesn't list any files
Click to expand...
Click to collapse
That's weird..
Are you rooted?

andybones said:
That's weird..
Are you rooted?
Click to expand...
Click to collapse
Should be. I don't remember any time I unrooted it after Lineage installation. Can I try to install magisk via twrp (even without installing the manager first, since I can't access the os) or will it override the data?

casxa said:
Should be. I don't remember any time I unrooted it after Lineage installation. Can I try to install magisk via twrp (even without installing the manager first, since I can't access the os) or will it override the data?
Click to expand...
Click to collapse
You can flash the Magisk.apk in TWRP and it won't remove any data.
Then do a reboot from TWRP bavk into TWRP and then you should be rooted and should be able to see data/ partition now.
I'd flash the newest 25.2, and you can flash the .apk in TWRP.
Releases · topjohnwu/Magisk
The Magic Mask for Android. Contribute to topjohnwu/Magisk development by creating an account on GitHub.
github.com

andybones said:
You can flash the Magisk.apk in TWRP and it won't remove any data.
Then do a reboot from TWRP bavk into TWRP and then you should be rooted and should be able to see data/ partition now.
I'd flash the newest 25.2, and you can flash the .apk in TWRP.
Releases · topjohnwu/Magisk
The Magic Mask for Android. Contribute to topjohnwu/Magisk development by creating an account on GitHub.
github.com
Click to expand...
Click to collapse
I tried to flash the Magisk apk
Code:
adb sideload Magisk-v25.2.apk
But it had no effect.

casxa said:
I tried to flash the Magisk apk
Code:
adb sideload Magisk-v25.2.apk
But it had no effect.
Click to expand...
Click to collapse
Curious why sideload instead of just hitting install button?
But can you Screenshot me what is shows in the TWRP file manager.
(after the successful flash of Magisk, you'd need at least 1 reboot from TWRP to TWRP before taking effect)

andybones said:
Curious why sideload instead of just hitting install button?
But can you Screenshot me what is shows in the TWRP file manager.
(after the successful flash of Magisk, you'd need at least 1 reboot from TWRP to TWRP before taking effect)
Click to expand...
Click to collapse
Even that method didn't work. I put the apk (renamed to zip) and clicked on "Install" and rebooted. Nothing.
The file manager still shows nothing inside data folder.

casxa said:
Even that method didn't work. I put the apk (renamed to zip) and clicked on "Install" and rebooted. Nothing.
The file manager still shows nothing inside data folder.
Click to expand...
Click to collapse
Very strange, it should flash as .apk.
But I can't think of any reason why nothing is showing in /data.
Sorry man.
Hopefully someone with more experience can help out.

Related

Help!!! (STUCK IN REBOOT LOOP)

So long story short I got myself in a reboot loop. I have an unlocked bootloader and TWRP installed on my MHA-L29C636B110 and it's always rebooting itself until it reaches back to Huawei eRecovery. I tried everything I could by factory resetting on TWRP, reflashing SuperSU and data files, and still end up in constant reboot loops until I reach eRecovery. Please someone help me resolve this issue!
Did you try wipe+reflash the Rom?
If your afraid you'll lose data just backup using twrp and then use helium once your set to restore apps and data from the backup.
IronSingh said:
Did you try wipe+reflash the Rom?
If your afraid you'll lose data just backup using twrp and then use helium once your set to restore apps and data from the backup.
Click to expand...
Click to collapse
I can't seem to find a ROM for MHA-L29C636B110. Also I don't have a SD card so if I do find the ROM, do I just flash it on TWRP? I tried everything I could think of and it always leads me back to reboot loop to eRecovery
Ben_Li said:
I can't seem to find a ROM for MHA-L29C636B110. Also I don't have a SD card so if I do find the ROM, do I just flash it on TWRP? I tried everything I could think of and it always leads me back to reboot loop to eRecovery
Click to expand...
Click to collapse
Which SuperSU did you install?
And did you decrypt first if the supersu you're installing needs decryption?
If you didn't 'Format Data' in TWRP and SuperSU removes encryption you're trying to boot with an encrypted /data partition which doesn't decrypt.
Ben_Li said:
I can't seem to find a ROM for MHA-L29C636B110. Also I don't have a SD card so if I do find the ROM, do I just flash it on TWRP? I tried everything I could think of and it always leads me back to reboot loop to eRecovery
Click to expand...
Click to collapse
Do you want to install custom Rom or do you want stock Rom. If you want stock Rom why did you root?
Also as ante0 asked did you decrypt?
ante0 said:
Which SuperSU did you install?
And did you decrypt first if the supersu you're installing needs decryption?
If you didn't 'Format Data' in TWRP and SuperSU removes encryption you're trying to boot with an encrypted /data partition which doesn't decrypt.
Click to expand...
Click to collapse
So at first, I flash the SuperSU files and data files from here: https://forum.xda-developers.com/mate-9/how-to/guide-how-to-root-mate-9-decrypt-data-t3569986. It worked perfectly fine and my storage was decrypted. But then i got into another issue so I rebooted into twrp, wiped, format data, and installed the files again (SuperSU and both data files) from the same link above. If my phone is already decrypted, and I wiped and format the data, I only need to flash SuperSU and the data files? I'm lost and this is a new phone.
Can you please give me a step by step rundown of what I need to do to get my phone back working. Again, the phone is a MHA-L29C636B110 with the bootloader unlocked, TWRP 3.1.0-1-hi3660 installed. Whenever I flash something or even factory reset it reboots for a while and then goes back to eRecovery.
IronSingh said:
Do you want to install custom Rom or do you want stock Rom. If you want stock Rom why did you root?
Also as ante0 asked did you decrypt?
Click to expand...
Click to collapse
At first everything went well and I decrypted the data. I wanted a custom ROM but I knew it would be a lot of work and I could get into a lot of problems. But then the SuperSU kept giving me the notification that the binary needs to be updated. So I downloaded the SuperSU v2.46 update on the Chainfires website and gave me a bootloop. I then went back to TWRP, wiped, format data, and sideload flashed the SuperSU files and both data files from: https://forum.xda-developers.com/mate-9/how-to/guide-how-to-root-mate-9-decrypt-data-t3569986 which ended up giving me a reboot loop back to eRecovery.
Ok
Do This.
nicenice00 said:
If your Model is MHA-L29 you can try this.
Load and Exract to SD card .
Push Power button and vol+/vol- to recovery mode.
I think it can help you. (Sorry, my english isn't good)
drive.google.com/open?id=0B9GG_Oe0gQDyUWlCS3lTRm5IOUE
Click to expand...
Click to collapse
Download the file extract it to your internal Storage.
So there should be a Folder in your /sdcard folder named dload and there should be update.app file in that folder.
while you are in TWRP you can simply do adb push /dload /sdcard/dload from command line
Ben_Li said:
So at first, I flash the SuperSU files and data files from here: https://forum.xda-developers.com/mate-9/how-to/guide-how-to-root-mate-9-decrypt-data-t3569986. It worked perfectly fine and my storage was decrypted. But then i got into another issue so I rebooted into twrp, wiped, format data, and installed the files again (SuperSU and both data files) from the same link above. If my phone is already decrypted, and I wiped and format the data, I only need to flash SuperSU and the data files? I'm lost and this is a new phone.
Can you please give me a step by step rundown of what I need to do to get my phone back working. Again, the phone is a MHA-L29C636B110 with the bootloader unlocked, TWRP 3.1.0-1-hi3660 installed. Whenever I flash something or even factory reset it reboots for a while and then goes back to eRecovery.
Click to expand...
Click to collapse
what did you wipe (Other than tapping the 'Format Data' button)?
If dload update doesn't fix it, as mentioned above, you could (You should!!) update to B181 using this: https://forum.xda-developers.com/mate-9/how-to/guide-mate-9-flash-update-package-t3593108
Download HWOTA_2017050101_Base.zip, HWOTA_2017050101_Windows.zip (if you're on Windows), HWOTA_2017050101_Linux.zip (If you're on Linux) and HWOTA_2017050101_MHA.zip.
Extract all to the same folder.
MHA-L29C636B181 firmware: http://update.hicloud.com:8180/TDS/data/files/p3/s15/G1366/g104/v85049/f2/full/update.zip
MHA-L29C636B181 public data zip: http://update.hicloud.com:8180/TDS/...49/f2/full/public/update_data_full_public.zip
MHA-L29C636B181 hw data zip: http://update.hicloud.com:8180/TDS/...hw_spcseas/update_full_MHA-L29_hw_spcseas.zip
Place update.zip, public zip and hw zip in HWOTA/update/ folder.
Rename update_data_full_public.zip to update_data_public.zip
Rename update_full_MHA-L29_hw_spcseas.zip to update_all_hw.zip
Run update.bat if windows, ./update.sh from terminal if Linux.
Put phone in Download mode (Vol down+power+usb plugged in).
Select Same Brand Update when it asks.
Select Script Update Directory when it asks.
If all went well you should be on B181.
IronSingh said:
Ok
Do This.
Download the file extract it to your internal Storage.
So there should be a Folder in your /sdcard folder named dload and there should be update.app file in that folder.
while you are in TWRP you can simply do adb push /dload /sdcard/dload from command line
Click to expand...
Click to collapse
So there is a file named TWRP in the /sdcard when I am on TWRP. So I move the dload.rar into the /sdcard/TWRP then flash it? I apologize if this sounds stupid I want clear specifications so I won't fall under any more problems
No you have to extract dload on your computer the move that folder to the phone.
This will Restock your device and lock it.
If you don't want to do that, I suggest you download RomAur from here
Download the following files
RomAur B182 v1.5
KangVip Framework for v1.5
L29C636 Data Files B181
Then copy them to your Internal or External Drive
Then follow from Step 7
7 - Make a FULL Wipe if come from another FW, before installing the ROM on TWRP(DALVIK-CACHE,CACHE,DATA,SYSTEM)
8 - Install Rom
9 - Install Data Files
10 - Reboot
11 - Install KangVip - Optional
12 - Enjoy
IronSingh said:
No you have to extract dload on your computer the move that folder to the phone.
This will Restock your device and lock it.
If you don't want to do that, I suggest you download RomAur from here
Download the following files
RomAur B182 v1.5
KangVip Framework for v1.5
L29C636 Data Files B181
Then copy them to your Internal or External Drive
Then follow from Step 7
7 - Make a FULL Wipe if come from another FW, before installing the ROM on TWRP(DALVIK-CACHE,CACHE,DATA,SYSTEM)
8 - Install Rom
9 - Install Data Files
10 - Reboot
11 - Install KangVip - Optional
12 - Enjoy
Click to expand...
Click to collapse
THANK YOU SO MUCH IT WORKED! In all honestly, I cannot thank you enough as I've had issues with this phone for the past 3 days and it's been messing with my head. Again, thank you so much for helping me out today! You are a great member of this wonderful community
Ben_Li said:
THANK YOU SO MUCH IT WORKED! In all honestly, I cannot thank you enough as I've had issues with this phone for the past 3 days and it's been messing with my head. Again, thank you so much for helping me out today! You are a great member of this wonderful community
Click to expand...
Click to collapse
Just out of curiosity did you get the custom Rom or did you go stock?
It's no problem,I was once where you are. I wanst born with knowledge someone shared it with me and the least I can do is share it back.
I flashed the custom ROM. I tried it at first but I didn't wipe the system. This time I did and it worked like a charm thank you for everything I look forward using this device for the next few years
You can done follow link .
https://forum.xda-developers.com/mate-9/how-to/guide-rebrand-chinese-al00-mate9-to-t3554656
newyesor said:
You can done follow link .
https://forum.xda-developers.com/mate-9/how-to/guide-rebrand-chinese-al00-mate9-to-t3554656
Click to expand...
Click to collapse
Everything was fix thank you though
That link is a good way for comeback .
Sorry guys i have same problem but with L09, can someone give me files for L09 ?
Thanks a lot

Unable to create folder /data/media/0/TWRP/BACKUPS

I've read a few posts that seem similar but nothing too recent. I'm trying to backup what I have now so I can flash another ROM but it keeps failing. I even used es file manager with root and created the folder needed and gave it root permissions but it still fails in TWRP to backup.
Switch on „mount namespace separation“ in super su
jeffrimerman said:
I've read a few posts that seem similar but nothing too recent. I'm trying to backup what I have now so I can flash another ROM but it keeps failing. I even used es file manager with root and created the folder needed and gave it root permissions but it still fails in TWRP to backup.
Click to expand...
Click to collapse
Are you decrypted? Else you won't be able to back up.
alexS123 said:
Switch on „mount namespace separation“ in super su
Click to expand...
Click to collapse
Thanks guys, I was wondering about if I'm decrypted or not. How do I check? It's probably a dumb question =/. I ended up installing another ROM and it uses Magisk baked into it so I don't see an option for mount namespace separation. Maybe I can attempt to backup now just to see if it works with this ROM or maybe it's not decrypted still. For some odd reason it refused to let me install Facebook, or Facebook Messenger from the play store and one of my apps won't start. It just tries to start then crashes. I downloaded a couple "updates" from a site that says they are stock ROMs. "update_full_hw_usa.zip" is 544 mb and "update" is 1.72gb. I'm thinking of going back to stock but that would probably lock the bootloader and erase twrp right?
Edit: I tried to back up again but it does the same thing. I did notice it also says "failed to unmount /DATA". It might have said that before.
Edit: I see under security the encrypt phone section. At the bottom the "Encrypt Phone" button is faded out and above it I see "Charge your battery and try again" and "Plug in your charger and try again" so I'm not too sure but guessing that means I'm not encrypted but it is faded out so maybe it is?
jeffrimerman said:
Thanks guys, I was wondering about if I'm decrypted or not. How do I check? It's probably a dumb question =/. I ended up installing another ROM and it uses Magisk baked into it so I don't see an option for mount namespace separation. Maybe I can attempt to backup now just to see if it works with this ROM or maybe it's not decrypted still. For some odd reason it refused to let me install Facebook, or Facebook Messenger from the play store and one of my apps won't start. It just tries to start then crashes. I downloaded a couple "updates" from a site that says they are stock ROMs. "update_full_hw_usa.zip" is 544 mb and "update" is 1.72gb. I'm thinking of going back to stock but that would probably lock the bootloader and erase twrp right?
Edit: I tried to back up again but it does the same thing. I did notice it also says "failed to unmount /DATA". It might have said that before.
Edit: I see under security the encrypt phone section. At the bottom the "Encrypt Phone" button is faded out and above it I see "Charge your battery and try again" and "Plug in your charger and try again" so I'm not too sure but guessing that means I'm not encrypted but it is faded out so maybe it is?
Click to expand...
Click to collapse
Go to twrp, advanced, file manager. Browse to /data/app and see if you see normal folders or randomly named folders. If the latter you are encrypted.
Same if you tap install then try to install from internal sd.
ante0 said:
Go to twrp, advanced, file manager. Browse to /data/app and see if you see normal folders or randomly named folders. If the latter you are encrypted.
Same if you tap install then try to install from internal sd.
Click to expand...
Click to collapse
Thank you. I should have checked that before I put another ROM. I did see randomly named folders when I connect it to my laptop but I can't remember when but I bet it was in that folder. I ended up within TWRP formatting data I think but it did have my type "yes" and said it would eliminate encryption, then I installed the new ROM. I should check and see if the new ROM has encryption. So far data on the root drive isn't encrypted and data in the android folder isnt' encrypted when I check with my laptop.
Edit: It's backing up so must not be encrypted. I check using the file manager in twrp and can see all the files in data. Thanks for you help. I guess if I had sensitive info on my phone then it would be something to do but I don't have a need to encrypt.
jeffrimerman said:
Thank you. I should have checked that before I put another ROM. I did see randomly named folders when I connect it to my laptop but I can't remember when but I bet it was in that folder. I ended up within TWRP formatting data I think but it did have my type "yes" and said it would eliminate encryption, then I installed the new ROM. I should check and see if the new ROM has encryption. So far data on the root drive isn't encrypted and data in the android folder isnt' encrypted when I check with my laptop.
Edit: It's backing up so must not be encrypted. I check using the file manager in twrp and can see all the files in data. Thanks for you help. I guess if I had sensitive info on my phone then it would be something to do but I don't have a need to encrypt.
Click to expand...
Click to collapse
If you did format data again now, flash the data files supplied by your rom. (Public and Hw data) else you will have problems with themes and stuff.
If you didn't format data now, disregard this message
ante0 said:
Are you decrypted? Else you won't be able to back up.
Click to expand...
Click to collapse
You can take a backup using this thread
https://forum.xda-developers.com/on...overy-unofficial-twrp-touch-recovery-t3861482
mansi0312 said:
You can take a backup using this thread
https://forum.xda-developers.com/on...overy-unofficial-twrp-touch-recovery-t3861482
Click to expand...
Click to collapse
That's for OPO6.

[Q]How to encrypt internal storage (Android O)?

Hi all!
Today i had to reset my phone (Magisk's fault) and therefore i installed Android O (with Funky Huawei -> should be a clean installation).
Bootloader is unlocked, TWRP and SuperSU is installed, but the internal storage is encrypted... TWRP file explorer shows random hashed files in internal storage and TWRP backup is not possible (createTarFork() ... Error: 255).
How can i decrypt my internal storage?
Is there also a decrypted boot image like before?
Hope anyone can help me...
Best regards,
Florian
So I went back to Nougat and B198 to encrypt the data partition...
But I am still interested in encrypting Android 8 for future updates.
Is there a way o do yet?
htcdesire-hd said:
So I went back to Nougat and B198 to encrypt the data partition...
But I am still interested in encrypting Android 8 for future updates.
Is there a way o do yet?
Click to expand...
Click to collapse
Yes. /vendor/etc/fstab.hi3660
Open file in a text editor (root enabled) and change:
'fileencryption=aes-256-xts:aes-256-cts' to 'encryptable'
Save file. Now you should be able to decrypt. You can remove verity and avb flags as well in that fstab.
To encrypt again, add the fileencryption flag back again and reboot.
ante0 said:
Yes. /vendor/etc/fstab.hi3660
Open file in a text editor (root enabled) and change:
'fileencryption=aes-256-xts:aes-256-cts' to 'encryptable'
Save file. Now you should be able to decrypt. You can remove verity and avb flags as well in that fstab.
To encrypt again, add the fileencryption flag back again and reboot.
Click to expand...
Click to collapse
can i make it? is it neccessary? And im running oreo b361, if i want to make decyript, will i format my phone?
mavera said:
can i make it? is it neccessary? And im running oreo b361, if i want to make decyript, will i format my phone?
Click to expand...
Click to collapse
Yes, no, partially.
You do need root. Decrypting, in my opinion, is not necessary. It's only good if you want to backup /data (I'd use titanium backup). Decrypt will format /data, which essentially is your phone. That's where all userdata is kept (all playstore apps, data, etc etc) so I would back those up using titanium backup or Huawei backup, then copy sdcard as well.
@ante0 thank you for your answer!
I made the experience that root apps are not working properly (changes in data partition are not permanently and will be lost after a reboot) when the data partition is not decrypted...
htcdesire-hd said:
@ante0 thank you for your answer!
I made the experience that root apps are not working properly (changes in data partition are not permanently and will be lost after a reboot) when the data partition is not decrypted...
Click to expand...
Click to collapse
Hmm. Then something else is wrong. Data is only encrypted, but it's not protected by avb or verity, so it shouldn't revert at all.
What were you changing if you remember?
ante0 said:
Hmm. Then something else is wrong. Data is only encrypted, but it's not protected by avb or verity, so it shouldn't revert at all.
What were you changing if you remember?
Click to expand...
Click to collapse
E.g. I removed the WhatsApp shutter sound file (/system/media/audio/ui/camera_click.otg) but after rebooting with encryption the file was there again and with decryption everything worked... This happened about a year ago and therefore I have always been decrypting until now...
Is there a disadvantage if the phone is decrypted?
htcdesire-hd said:
E.g. I removed the WhatsApp shutter sound file (/system/media/audio/ui/camera_click.otg) but after rebooting with encryption the file was there again and with decryption everything worked... This happened about a year ago and therefore I have always been decrypting until now...
Is there a disadvantage if the phone is decrypted?
Click to expand...
Click to collapse
/system is protected by verity though, if you didn't remove the verity flag it does revert things.
No real disadvantage. You still need to unlock bootloader after updating (might not be needed when you go oreo to oreo, my bootloader stayed intact when I went from B329 to b361), which requires formatting data. So you still need to redo the decryption when you update.
ante0 said:
/system is protected by verity though, if you didn't remove the verity flag it does revert things.
No real disadvantage. You still need to unlock bootloader after updating (might not be needed when you go oreo to oreo, my bootloader stayed intact when I went from B329 to b361), which requires formatting data. So you still need to redo the decryption when you update.
Click to expand...
Click to collapse
Ok thank you for your answer! I will try to remove verity flag and keep the phone encrypted, when Oreo is officially released.
EDIT:
I upgraded to Android 8 and rooted my Mate 9 and everything seems to work now. I did not test the decryption so far...
ante0 said:
Yes. /vendor/etc/fstab.hi3660
Open file in a text editor (root enabled) and change:
'fileencryption=aes-256-xts:aes-256-cts' to 'encryptable'
Save file. Now you should be able to decrypt. You can remove verity and avb flags as well in that fstab.
To encrypt again, add the fileencryption flag back again and reboot.
Click to expand...
Click to collapse
My device is rooted, but i can not write into system partition ("/system/app mover" app shows an error that it can't remound /system)...
How can i enable writing to the /system partition?
By removing the verity flag in fstab? How do i manage to do that?
ante0 said:
Yes. /vendor/etc/fstab.hi3660
Open file in a text editor (root enabled) and change:
'fileencryption=aes-256-xts:aes-256-cts' to 'encryptable'
Save file. Now you should be able to decrypt. You can remove verity and avb flags as well in that fstab.
To encrypt again, add the fileencryption flag back again and reboot.
Click to expand...
Click to collapse
Hi ante0,
As I am total noob on this matter, just one question to make sure:
Do I remove the whole fileencryption=....-cts part and replace it with the text encryptable?
Regards,
Dioky said:
Hi ante0,
As I am total noob on this matter, just one question to make sure:
Do I remove the whole fileencryption=....-cts part and replace it with the text encryptable?
Regards,
Click to expand...
Click to collapse
Yes.
wait,check,fileencryption=aes-256-xts:aes-256-cts
Should say
wait,check,encryptable
Or you can just remove it so it just says
wait,check
Troubles again and sweet victory
ante0 said:
Yes.
wait,check,fileencryption=aes-256-xts:aes-256-cts
Should say
wait,check,encryptable
Or you can just remove it so it just says
wait,check
Click to expand...
Click to collapse
It worked, but I ran into trouble again: bootloop.
This time it was my bad because I forgot to re-flash update_data_public.zip and update_all_hw.zip after the Format Data... :cyclops:
When I realised the mistake I made, I tried to make up for it by TWRP-flashing both files.
During flashing I got a few errors in red text that frightend me.
In hindsight I should have neglected them, but I tried to reflash and from that on I ran into trouble.
Because I wanted to have a nice clean install, I decided to return to base and reflash the whole stock ROM with HWOTA8 procedure.
Next I started to look around on the net for another more experiences. That led my to the German Firedance1961.
He wrote an elegant script for the latest Oreo build 363, which automates some tweaks during the flashing process.
As ante0 suggested, that script indeed does leave blank after 'wait,check'
It adds a GPS tweak, SuperSU v2.82, Busybox, AdAway, some theme-options and decrypts DATA partition that stays decrypted after reboot. All in one go.
The process for those interested:
Needed:
Unlocked bootloader.
Steps:
1. Put update_data_public.zip and update_all_HW.zip from the L09/L29B363 ROM together with the Firedance FSTAB-mod script in the root of your external SD-card;
2. Flash TWRP 3.2.1-0 Oreo with Fastboot
3. Boot into TWRP and perform Format DATA. STAY IN TWRP and return to TWRP Install menu;
4. Now flash in this order:
I. update_data_public.zip;​II. updata_all_hw.zip;​You'll see some red errors during the process. Don't worry.
III. Firedance FSTAB-mod script.​From this moment on you can backup DATA partition in TWRP.
5. Wipe cache and Dalvic
6. Reboot, done.
Regards,
will try that Firedance, got same problem with encryption
Firedance FSTAB-mod script - link is dead or file removed.

How to backup & restore Android 9/P/Pie with TWRP?

Because on https://twrp.me/google/googlepixel.html it says:
Decrypting Android 9.0 Pie when using a PIN / pattern / password does not work yet. We do not have an ETA for fixing decrypt. Restoring a backup made with an alpha using RC1 may result in loss of data including internal storage. If you need your backups from those versions, restore the backup using alpha2, then install RC1 and run a new backup with RC1.
Click to expand...
Click to collapse
I just flashed the official Android 9/P/Pie release (it did not fix the randomly dying microphone issue) and I want to do a full nandroid backup before I take my Pixel into UBreakIFix for a $0-80 fix because they require a locked bootloader and factory reset.
So do nandroid backups work or not?
SOLVED!
Answering my own question...
roirraW "edor" ehT said:
Since internal storage, where user apps and user and system app data are stored can't be decrypted, you'd definitely have to at least disable the pin/pattern/password, although you should confirm that doing so makes the storage readable in TWRP - it should.
Click to expand...
Click to collapse
According to this person, you must disable pin/pattern/password in order to decrypt the file system and allow nandroid backup & restore.
However, I just did a fastboot boot TWRP.img and it prompted me with my unlock pattern, and then it said "Data successfully decrypted". I checked, and I have access to the filesystem, and it even mounted to my connected laptop. So I'm testing this out. Backups completed successfully. I'll be trying a restore soon.
Archangel said:
The overwhelming response to what areas to tick when you back up has been system, boot, vendor and data,,,no images just the partitions. But that struggle is still on going LOL.
Click to expand...
Click to collapse
Backup & restore these 4 partitions (no images):
System, Boot, Vendor, and Data
(Note: for system and vendor you have to uncheck "mount system as readonly")
UPDATE:
Restoring my System and Vendor TWRP backups caused boot to hang at the G logo with an endless progress bar below the G.
However, doing a fastboot flash of System and Vendor factory images then restoring only my TWRP Data backup successfully restored my phone!
Except for one issue: fingerprints don't work. I think I may have screwed myself here by not disabling pin/pattern/password when I did the backup. For some reason TWRP had no problem decrypting then. But now, trying to restore, TWRP can't decrypt unless I disable pin/pattern/pass. It wont let me delete my old fingerprints or set new ones. Trying to unlock with fingerprint, it either doesn't respond at all or says "Fingerprint hardware not available"
UPDATE 2:
Followed instructions to clear the fingerprint data: [Guide] Delete fingerprint profils via TWRP. Everything is perfectly restored now! (Note: if you disable pin/pattern/pass before backup, you shouldn't need to do this)

Backup and Restore - a Hybrid Method (Android 9)

I am developing this method because TWRP will not restore correctly ever since I upgraded my bootloader from U2 to U4.
Boot and Data will restore but System will not, so I do the following.
Backup
1. Use TWRP to backup Boot and Data and reboot
2. Use a root explorer to copy /system/app to external sd
3. Copy /system/priv-app to external sd
Debloat by deleting apps from these 2 backup files
Restore
1. Boot into TWRP and install system.img (extract from ap section of downloaded firmware for stock) or install UPie
2. Restore Boot and Data as usual
3. Go to Advanced - File Manager
4. Delete /system/system/app and /system/system/priv-app
5. Copy and paste backup app files to /system/system
6. Reboot
Note: TWRP has its own system which holds the ROM system as a sub directory.
If anyone can think of another system directory which I can backup and restore please let me know.
physwizz said:
I am developing this method because TWRP will not restore correctly ever since I upgraded my bootloader from U2 to U4.
Boot and Data will restore but System will not, so I do the following.
Backup
1. Use TWRP to backup boot and Data and reboot
2. Use a root explorer to copy /system/app to external sd
3. Copy /system/priv-app to external sd
Debloat by deleting apps from these 2 backup files
Restore
1. Boot into TWRP and install system.img
2. Restore boot and Data as usual
3. Go to Advanced - File Manager
4. Delete /system/system/app and /system/system/priv-app
5. Copy and paste backup app files
6. Reboot
Note: TWRP has its own system which holds the ROM system as a sub directory.
Click to expand...
Click to collapse
This is great. I have issues that caused my settings app to show extra and weird options after a restore from TWRP in the past. But since then I've updated to a new TWRP but haven't done any restoring because of what the previous one did. Hope this works when I need it to.
Jeremy_J7 said:
This is great. I have issues that caused my settings app to show extra and weird options after a restore from TWinRP in the past. But since then I've updated to a new TWRP but haven't done any restoring because of what the previous one did. Hope this works when I need it to.
Click to expand...
Click to collapse
I think the system settings are stored in /data
I'll add it to the list.
physwizz said:
I think the system settings are stored in /data
I'll add it to the list.
Click to expand...
Click to collapse
Test it before you add to the list, can't be giving these people false information bro ?
Jeremy_J7 said:
Test it before you add to the list, can't be giving these people false information bro
Click to expand...
Click to collapse
True
I debloated from here
https://forum.xda-developers.com/galaxy-a20/development/debloat-samsung-a20-variants-t4070957
Then I added the updated camera from Ultimate Pie.
My app folders are here
https://mega.nz/file/dtkkES5L#YfHwWC3rlswwYUeA_cdUESCMQo8rvq8k8n20N-oc-8w
Alright will take a look, is this bootloader specific?
Jeremy_J7 said:
Alright will take a look, is this bootloader specific?
Click to expand...
Click to collapse
Not sure.
If it doesn't work it might reboot into recovery and then you need to copy and paste your own /app and /priv-app folders back in place.
@jajk
Try this
@physwizz My appetite for being screwed by Samsung and the dirty traps they lay is severely diminished. Since going to U4, I can't reliably get TWRP to work without triggering the evil red text screen of death.... I have been watching what is happening with the work on custom kernels and Ultimate Pie ROMs but definitive information on what is actually working reliably or not is very patchy..... one person will say "Yep, this definitely works" the other will say "nope can't even boot"... almost like some people don't even own this phone or have not actually tried what they are promoting or are unable to follow instructions properly....
So....starting from stock U4, I can root and install TWRP, magisk and dmverity no problems at all but after going back into the O.S and attempting to reboot into recovery a 2nd time....bang! Samsung screws me!!!! The question is.....is there a custom kernel for U4 and above that truly removes all of Samsung's dirty tricks (security features) and a custom ROM that also holds no hidden surprises?
jajk said:
@physwizz My appetite for being screwed by Samsung and the dirty traps they lay is severely diminished. Since going to U4, I can't reliably get TWRP to work without triggering the evil red text screen of death.... I have been watching what is happening with the work on custom kernels and Ultimate Pie ROMs but definitive information on what is actually working reliably or not is very patchy..... one person will say "Yep, this definitely works" the other will say "nope can't even boot"... almost like some people don't even own this phone or have not actually tried what they are promoting or are unable to follow instructions properly....
So....starting from stock U4, I can root and install TWRP, magisk and dmverity no problems at all but after going back into the O.S and attempting to reboot into recovery a 2nd time....bang! Samsung screws me!!!! The question is.....is there a custom kernel for U4 and above that truly removes all of Samsung's dirty tricks (security features) and a custom ROM that also holds no hidden surprises?
Click to expand...
Click to collapse
If you're talking about the red text that talks about 'official binaries' when booting after you flash TWRP (FRP LOCK) then there's a very easy fix.
@physwizz Yes the evil red text...but it is not after flashing TWRP, it is only if you try to go back into TWRP.
I already know of one easy fix... called don't buy Samsung. All this wouldn't be a problem if manufacturers could resist the temptation to "monetize" private data but that ain't going to happen anytime soon in this dog eat dog world.....
jajk said:
@physwizz Yes the evil red text...but it is not after flashing TWRP, it is only if you try to go back into TWRP.
I already know of one easy fix... called don't buy Samsung. All this wouldn't be a problem if manufacturers could resist the temptation to "monetize" private data but that ain't going to happen anytime soon in this dog eat dog world.....
Click to expand...
Click to collapse
I got that because i was using old data
solved by doing a clean install
The data was then good in future
@physwizz Went through the Samsung dance from scratch, installed UltimatePie4, rebooted into Ultimate Pie no problems, completed the initial setup.....rebooted and back to red text of death!!!
Yes, I did all the format /data etc.... it is not a procedural problem on my part but my phone has always given me more grief than you appear to have - something is different
jajk said:
@physwizz Went through the Samsung dance from scratch, installed UltimatePie4, rebooted into Ultimate Pie no problems, completed the initial setup.....rebooted and back to red text of death!!!
Yes, I did all the format /data etc.... it is not a procedural problem on my part but my phone has always given me more grief than you appear to have - something is different
Click to expand...
Click to collapse
You didn't restore old data?
Clean install?
@physwizz Did nothing but complete the initial setup after install and rebooted.....all started from a clean install of U4, then rooted and TWRP from your tar file, then installed new ROM with data freshly formatted i.e. absolutely no messing around with the stock ROM or custom ROM through the entire process and never getting to the point of rebooting into TWRP which triggered the previous red text of death.....
jajk said:
@physwizz Did nothing but complete the initial setup after install and rebooted.....all started from a clean install of U4, then rooted and TWRP from your tar file, then installed new ROM with data freshly formatted i.e. absolutely no messing around with the stock ROM or custom ROM through the entire process and never getting to the point of rebooting into TWRP which triggered the previous red text of death.....
Click to expand...
Click to collapse
What does red writing say?
@physwizz Writing says "You have just been screwed by Samsung yet again" or something about official binaries which is the same thing....
jajk said:
@physwizz Writing says "You have just been screwed by Samsung yet again" or something about official binaries which is the same thing....
Click to expand...
Click to collapse
I've had that twice
1. When I forced reboot before UPie was finished installing
2 when I didn't wipe caches , data and system before installing UPie
Could also be Samsung Conspiracy Theorist Detection Program (SCTDP) lol

Categories

Resources