twrp - Huawei Mate 9 Questions & Answers

Does Format Data in twrp wipe the system partition or will I be fine to format data from twrp? I'm wanting to do this because I've read that doing this will remove encryption

Newrooter22 said:
Does Format Data in twrp wipe the system partition or will I be fine to format data from twrp? I'm wanting to do this because I've read that doing this will remove encryption
Click to expand...
Click to collapse
It only wipes /data.
Though, if you use TWRP by Pretoriano80 there's no point as that has decryption.
If you still want to continue you need to Format Data, 'reboot recovery', then remove fileencryption flag in /vendor/etc/fstab.hi3660. (you can pull this file using adb, edit on computer then push it back using adb.).
If you don't edit fstab your phone will re-encrypt on next boot to system.
You will also have to flash Public and HW zip for your firmware as these will be gone (system update ability and themes are stuff that will be gone if you don't flash these.)

Related

F2FS on stock

i wanted to know if it is possible to format our system partition as f2fs and have it work our data partition on kitkat is already f2fs so are we able to do it to system? in twrp i attempted this by fro matting to f2fs but when restoring system it reformats system as ext 4 is there away around this? on twrps website there is a command to keep a the file system it is "tw_rm_rf – uses rm –rf instead of formatting system and data partitions, this option is used to prevent changes to the file system settings such as file system type, " i found it here http://www.teamw.in/twrp2-reference-guide would this help to do this? i don't know where to put this command in though
Edit: on a sidenote i formatted cache as f2fs and it booted
Edit 2: i looked at it again and cache was reformatted back to ext4
billycar11 said:
i wanted to know if it is possible to format our system partition as f2fs and have it work our data partition on kitkat is already f2fs so are we able to do it to system? in twrp i attempted this by fro matting to f2fs but when restoring system it reformats system as ext 4 is there away around this? on twrps website there is a command to keep a the file system it is "tw_rm_rf – uses rm –rf instead of formatting system and data partitions, this option is used to prevent changes to the file system settings such as file system type, " i found it here http://www.teamw.in/twrp2-reference-guide would this help to do this? i don't know where to put this command in though
Edit: on a sidenote i formatted cache as f2fs and it booted
Edit 2: i looked at it again and cache was reformatted back to ext4
Click to expand...
Click to collapse
Did you ever succeed in getting stock "DATA" partition to F2FS? I couldn't restore my backup and phone wouldn't boot anymore.. so went back to EXT4..
Maybe @djvita knows something, I think he has been experimenting a bit with F2FS..
StefanGA said:
Did you ever succeed in getting stock "DATA" partition to F2FS? I couldn't restore my backup and phone wouldn't boot anymore.. so went back to EXT4..
Maybe @djvita knows something, I think he has been experimenting a bit with F2FS..
Click to expand...
Click to collapse
yes i was able to get only the data partition to f2fs no other partition will stay another format once it boots it reformats or when restoring system in twrp it will restore the system partition as ext 4
billycar11 said:
yes i was able to get only the data partition to f2fs no other partition will stay another format once it boots it reformats or when restoring system in twrp it will restore the system partition as ext 4
Click to expand...
Click to collapse
interesting.. how did you do it? I did it in TWRP 2.8.1.0 via advanced wipe and after that got stuck on the motorola bootlogo..
That is the same thing I did but after whipeing I restored my data partition. I think the reason you got stuck in a bootloop is because you did not clear dalvic and cache or you do not have the kit Kat boot loader
billycar11 said:
That is the same thing I did but after whipeing I restored my data partition. I think the reason you got stuck in a bootloop is because you did not clear dalvic and cache or you do not have the kit Kat boot loader
Click to expand...
Click to collapse
I tried it again.. this time it worked.. I rebooted after format directly back into recovery and was then able to restore my data from ext4 to f2fs.. not sure, why it didn't work the first time around, but thanks for checking back!

failed to mount /data

SOLVED
I rooted my s7 and installed twrp. I tried to do a nandroid backup in twrp and got the message that it couldn't mount /data. It turns out that by not performing the data format step in http://forum.xda-developers.com/galaxy-s7/development/recovery-official-twrp-herolte-t3333770 TWRP couldn't access /data. I did the steps over again and all was well.
kettir said:
I've rooted my s7 and installed twrp. I tried to do a nandroid backup in twrp and got the message that it couldn't mount /data.
I do have root, twrp does run when I boot into recovery. However, whether I select to allow modifications to system or not, twrp does not see the internal sd card.
I followed these instructions to root: http://forum.xda-developers.com/galaxy-s7/development/recovery-official-twrp-herolte-t3333770
However, I did not do step 10:
Only if you want internal storage or data to work in TWRP:
Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".
WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone!
Go to [Reboot] -> [Recovery].
Is this the reason that I can't access internal storage? If it is, I can go ahead and do the format data thing. I just would like to know if that is probably the reason I'm having this problem. NOTE: The phone is not encrypted so far as I know.
Click to expand...
Click to collapse
Internal data is encrypted nevertheless. Only a format will remove this encryption and it is the only way that you can make a TWRP backup of this data.
Bright.Light said:
Internal data is encrypted nevertheless. Only a format will remove this encryption and it is the only way that you can make a TWRP backup of this data.
Click to expand...
Click to collapse
Frag. Well, in that case, I've already installed TWRP, so presumably I can just boot to TWRP, swipe right to enable changes, format data, flash supersu, and then flash dm-verity and force encryption disabler. Then go through the setup again.
If I could have my way, someone would disable the security deal with writing to the SD card, the phone could be purchased pre-rooted, and I wouldn't have to worry about bricking my phone every time I flash something.
Rant over.
@kettir: You're exactly right!
btw: The security deal is not over when you root your phone. 'I still haven't found what I'm looking for' is a very precise song for this problem.
I had the same issues and succesfully used the sequence proposed by Kettir:
- Enable OEM unlock
- ODIN: Install TWRP
- TWRP: Wipe -> Format data
- TWRP: flash supersu
- TWRP: flash dm-verity and force encryption disabler

Disable encryption protection?

Hi Guys
Im having trouble flashing new Roms to my S7. When I enter TWRP recovery, it shows my device as 0MB and it doesnt picK up any files. I looked into this and read that Encryption should be disabled on the handset. I followed instructions to do this and noticed that there is no option for Encryption Protection. Its not there!
I disabled any passwords and Pin numbers to erase decryption and it still didnt work!
last resort was to try a factory reset and the device restarted to recovery and failed as TWRP recovery cant find any mounted devices due to the encryption crap.
Any help appreciated.
Chris
scientificharmony said:
Hi Guys
Im having trouble flashing new Roms to my S7. When I enter TWRP recovery, it shows my device as 0MB and it doesnt picK up any files. I looked into this and read that Encryption should be disabled on the handset. I followed instructions to do this and noticed that there is no option for Encryption Protection. Its not there!
I disabled any passwords and Pin numbers to erase decryption and it still didnt work!
last resort was to try a factory reset and the device restarted to recovery and failed as TWRP recovery cant find any mounted devices due to the encryption crap.
Any help appreciated.
Chris
Click to expand...
Click to collapse
Hi mate
Seems like you did not format your data partition during TWRP installation.........
Try flashing your custom rom from the External SD card......your data partition has all your app , files , passwords, photos...there is still a chance that there it may be a incompatibility issue between your apps and the new rom....that is why they recommend a factory reset when flashing a new custom rom
MAX 404 said:
Hi mate
Seems like you did not format your data partition during TWRP installation.........
Try flashing your custom rom from the External SD card......your data partition has all your app , files , passwords, photos...there is still a chance that there it may be a incompatibility issue between your apps and the new rom....that is why they recommend a factory reset when flashing a new custom rom
Click to expand...
Click to collapse
hi mate
thanks for your reply. I dont have an external SD card
Is there any other way of sorting this? I am downloading a stock rom as we speak.
scientificharmony said:
hi mate
thanks for your reply. I dont have an external SD card
Is there any other way of sorting this? I am downloading a stock rom as we speak.
Click to expand...
Click to collapse
Hi
TWRP can not handle Samsung encryption . if you wish to use TWRP and have access to the Data partition ( internal SD card) you need to format it so the encryption is disabled ( you lose all your apps , data and user configuration AKA factory reset) , you can have TWRP and data encryption but mods and roms have to be flashed from external memories also you will not have available MTP in recovery or factory reset from it.
There is no way to disable data encryption without format data.....
Ok, I got a friends SD card and placed the Rom on there. I can now see the Rom but the trouble is, TWRP wont let me wipe Dalvik / data / system / cache as it wont mount the storage....
can I still apply the ROM?
Unable to restart your device. The integrity verification has failed. You need to reset your device to factory default settings. This will erase all of your data.
scientificharmony said:
Unable to restart your device. The integrity verification has failed. You need to reset your device to factory default settings. This will erase all of your data.
Click to expand...
Click to collapse
That is why I point it out " factory reset is recommended when flashing custom rom" if you wish to flash a custom rom you will have to format your data partition and flash the data verify file........
MAX 404 said:
That is why I point it out " factory reset is recommended when flashing custom rom" if you wish to flash a custom rom you will have to format your data partition and flash the data verify file........
Click to expand...
Click to collapse
I have tried to format/wipe data. TWRP keeps saying it failed as it cant mount the storage.
I tried flashing the stock rom via odin and it also failed as it goes to recovery to wipe data and it fails again as it cant mount storage.
scientificharmony said:
I have tried to format/wipe data. TWRP keeps saying it failed as it cant mount the storage.
I tried flashing the stock rom via odin and it also failed as it goes to recovery to wipe data and it fails again as it cant mount storage.
Click to expand...
Click to collapse
How did you flash the stock rom...which files did you use?
Wipe data is not enough you have to Wipe / FORMAT DATA and type yes....
1 To get rid of encryption, go to "wipe", format data (TWRP) (keyboard will pop up) then type "yes" and format it, then reboot to recovery
2. After flashing this, hit wipe, full wipe (this will clean all internal memory and your data will be lost
3 you can test if encryption is still enabled, if TWRP shows error about not mounting data your phone is still encrypted
Sent from my SM-G930F using XDA-Developers mobile app
Josh Smith10 said:
1 To get rid of encryption, go to "wipe", format data (TWRP) (keyboard will pop up) then type "yes" and format it, then reboot to recovery
2. After flashing this, hit wipe, full wipe (this will clean all internal memory and your data will be lost
3 you can test if encryption is still enabled, if TWRP shows error about not mounting data your phone is still encrypted
Sent from my SM-G930F using XDA-Developers mobile app
Click to expand...
Click to collapse
What version of TWRP are you guys using and what version Super SU?
Delete

How do you backup with TWRP given the issues caused by dm-verity?

I have a J710DM/DS. I flashed the latest version of TWRP (TWRP for j7xelte - 3.0.2.1) with no problems.
But when I try to do a backup (to the external SD card), I get the expected "failed to mount /data" errors that result from dm-verity.
TWRP's website talks about this and mentions that some versions have a "System Image" option, but I don't see it on my phone.
So how do I properly do a backup?
This is nothing to do with dm-verity, it's encryption.
Format DATA to remove encryption and then install the boot patch.
My builds of TWRP have image backup, but not sure if I've compiled a j710 version.
ashyx said:
This is nothing to do with dm-verity, it's encryption.
Format DATA to remove encryption and then install the boot patch.
My builds of TWRP have image backup, but not sure if I've compiled a j710 version.
Click to expand...
Click to collapse
Thanks for the information.
What boot patch?
Edit:
Also, what's the recommended way to format DATA? If TWRP can't even mount it, can it even format it?
Haphim said:
Thanks for the information.
What boot patch?
Edit:
Also, what's the recommended way to format DATA? If TWRP can't even mount it, can it even format it?
Click to expand...
Click to collapse
FORMAT *not* WIPE. You don't need to mount to FORMAT.
To disable forced encryption and mount internal storage:
(Note this MUST be flashed after SuperSU if you intend to root)
1. Boot to Twrp
2. Format Data partition using FORMAT DATA button under Wipe options.
(Note: This will wipe the internal storage)
3. Check DATA is mountable.
4. Install SuperSU (if root is required)
5. Install boot image patch below.
6. Reboot
Boot image patch
no-verity-no-encrypt_ashyx
ashyx said:
FORMAT *not* WIPE. You don't need to mount to FORMAT.
To disable forced encryption and mount internal storage:
(Note this MUST be flashed after SuperSU if you intend to root)
1. Boot to Twrp
2. Format Data partition using FORMAT DATA button under Wipe options.
(Note: This will wipe the internal storage)
3. Check DATA is mountable.
4. Install SuperSU (if root is required)
5. Install boot image patch below.
6. Reboot
Boot image patch
no-verity-no-encrypt_ashyx
Click to expand...
Click to collapse
Thank you so much for elaborating!
Quick follow-up: I have already flashed SuperSU previously. Will I need to flash it again after formatting DATA?
Haphim said:
Thank you so much for elaborating!
Quick follow-up: I have already flashed SuperSU previously. Will I need to flash it again after formatting DATA?
Click to expand...
Click to collapse
You will need to reflash supersu.
Quick, but vital question:
Does flashing "no-verity-no-encrypt_ashyx" mean that I can now safely restore a full system backup?
Haphim said:
Quick, but vital question:
Does flashing "no-verity-no-encrypt_ashyx" mean that I can now safely restore a full system backup?
Click to expand...
Click to collapse
If you made a backup of an unencrypted data partition then you can restore if /data is mountable.
If you are not restoring /data then it doesn't matter.
Thank you so much for helping me understand all of this. You're the best!

Encryption Unsucessful Fix

I am trying to install an Oreo based ROM lineage os 15.1
Currently data partition is ext4
Latest Twrp installed
But still whenever I try to install any Oreo ROM I get encryption unsuccessful message and even after factory reset with yes I get stuck on same thing again and again and if I try to change recovery after installing ROM the phone gets stuck in boot loop can anyone please help to solve this problem
I think this will solve ur issue
Yup I have also the same problem first of all do all these steps I think it resolve your issue:-
1. Go to settings of TWRP and reboot recovery.
2. Now format all the internal storage if u have important files in internal storage skip this step
3. After that go to advanced wipe and select system and data one by one and change its format to ext4.
4. Now advanced wipe everything.
5. Thats all now you can install lineage 15.1
I did the same and its working properly in my phone.
This problem occurs due to change of format of data to f2f so convert it to EXT4 and its fine
when you did advanced wipe to evertything is data, cache, system, etc? i already did this but still saying me that my phone was encrypted and i have to unlock with the pin or my account but i get a loop even if i put the correct user and password.
Udgam Tiwari said:
Yup I have also the same problem first of all do all these steps I think it resolve your issue:-
1. Go to settings of TWRP and reboot recovery.
2. Now format all the internal storage if u have important files in internal storage skip this step
3. After that go to advanced wipe and select system and data one by one and change its format to ext4.
4. Now advanced wipe everything.
5. Thats all now you can install lineage 15.1
I did the same and its working properly in my phone.
This problem occurs due to change of format of data to f2f so convert it to EXT4 and its fine
Click to expand...
Click to collapse
Normal procedure. Fastboot boot command
Boot to TWRP.
Reboot to TWRP through reboot menu.
Factory reset.
Advanced wipe: change data file format to ext4
Reboot to TWRP through reboot menu again.
Wipe, format data.
Now wipe system, cache and dalvik.
Reboot to TWRP again.
Flash rom.
Gapps.
Magisk if wanted.
Wipe dalvik and cache.
Reboot and enjoy
Murkroow said:
when you did advanced wipe to evertything is data, cache, system, etc? i already did this but still saying me that my phone was encrypted and i have to unlock with the pin or my account but i get a loop even if i put the correct user and password.
Click to expand...
Click to collapse
Bro I already mentioned first of all you have to Factory reset but it will wipe all your data from internal storage so do have a back up for that. Encryption issue can only resolved by factory reset.
Check out my video
​It helped many people hope it helps you.
https://m.youtube.com/watch?v=Ov_Eq268_4U

Categories

Resources