Factory Data Reset TWRP - T-Mobile LG G5 Questions & Answers

I followed a root guide on XDA and remember seeing the Factory Data Reset screen when first setting up TWRP. Along the way, I no longer saw that screen when booting into recovery. Today I upgraded to 10D from 10A and flashed a rom, and that screen came back. Why did that happen and what do I have to do to make it go away?

it's possible you're talking about the prompt that asks for password to decrypt data? or the screen that asks if you want to allow system to be remounted rw instead of ro.
if you format data in TWRP it wipes out data encryption and then you'd no longer get the password prompt. of if you selected the option to allow system to be remounted rw then that option may go away until system has been changed.
if you're not talking about either screen I mentioned then I'm not sure what you're talking about.

Related

Stupidly encrypted my Nexus S, how would I go about removing this encryption?

From what I read you need to unroot the phone but I can not find a guide about this. I do not need to remove the encryption right now but I would like to remove it soon so I can flash a new rom.
maybe this? http://forum.xda-developers.com/showpost.php?p=21755219&postcount=11
sean1984 said:
maybe this? http://forum.xda-developers.com/showpost.php?p=21755219&postcount=11
Click to expand...
Click to collapse
That guide is for the Galaxy Nexus. I will look it over later and see if I could possibly use it. At first glance it looks like I can't.
Probably just best to backup all your data (Titanium backup for apps, copy all SDCard contents to your PC) then go intor recovery:
factory/data reset
format /system
format /boot
Flash FULL OTA for your phone
I also stupidly encrypted my phone without realizing that I cannot undo it later on. Now most of my apps force closes very often especially the games that I have installed before encryption.
The phone also heats up very quickly at times. Not sure if it's related to this or not.
I'm just hoping that the next OTA update to either 4.04 or 4.05 would solve these issues. If not, then I'll have to do the whole factory reset thing
Harbb said:
Probably just best to backup all your data (Titanium backup for apps, copy all SDCard contents to your PC) then go intor recovery:
factory/data reset
format /system
format /boot
Flash FULL OTA for your phone
Click to expand...
Click to collapse
Just wanted to say that this worked for me. The one thing I would like to add though is that you will still need to mount the usb storage and format before you are allowed to copy files to the sd card.
Wiping encrypted /sdcard
Luckily, Clockwork can still make the USB interface available. If you're on Windows, you can format the "Removable Disk" device that appears when you use the USB mount option in "mounts and storage" in Clockwork. It only needs a quick format.
Once you're done with that, go back to Clockwork and wipe it. You should be good.

[Q] encrypted tablet, "factory data reset" not working

Hey all. I have a rooted TF700 with CM 10.2 on it. I have encrypted the tablet (via SETTINGS - SECURITY - ENCRYPTION). I'd like to do a "Factory Data Reset" - it's my understanding that this will remove the encryption, along with all my user data. This is what I'd like to do.
However, when I go to SETTINGS - BACKUP & RESET - FACTORY DATA RESET, it doesn't work. It asks me to enter my password, then asks me to 'erase everything', and when I click it, it reboots as if to perform the reset. I get the little android guy after it reboots, then the ASUS screen, then CM boot screen. However, the tablet boots like normal, is still encrypted, and all my user data is still there.
I recently upgraded from CM 10.1 to 10.2 - getting the gapps package to install took several tries for some reason, but eventually it worked. I have clockwork recovery installed, but because the tablet is encrypted I am unable to mount or format the /data partition from clockwork.
Anyone have a clue how I can get the 'Factory data reset' to work, or otherwise decrypt my tablet? Thanks!
Factory reset is done by your recovery. Which recovery (and version) is currently installed? Maybe you need to choose "format data" explicitly in the recovery.
_that said:
Factory reset is done by your recovery. Which recovery (and version) is currently installed? Maybe you need to choose "format data" explicitly in the recovery.
Click to expand...
Click to collapse
I cannot touch (either mount or format) /data from Clockwork recovery because it is encrypted by android. any attempt to do so, and I get an error
"ERROR cannot (mount/format) /data!"
doing the 'Factory Data Reset' from within Android is supposed to decrypt and wipe /data, but that is not working.
I flashed TWRP and got rid of Clockwork recovery - that enabled me to mount /data in recovery (TWRP asks for my password to decrypt /data when TWRP starts), which is something. However, when I go into /data using the terminal I only see the lost+found directory and nothing else?
However, formatting /data from TWRP doesn't work, neither does a reset. They just give me errors.
I then tried abd shell - mke2fs -T ext4 /dev/block/mmcblk0p8
but that gives me a '/dev/block/mmcblk0p8 is apparently in use by the system; will not make a filesystem here!' error, even after unmounting it manually (umount -a)
Next, I tried using TWRP to reinstall CM 10.2. After that, the boot process took 40 minutes or so. Once it came up, there was no user data and cyanogenmod was fresh (yay!) - but the partition is still encrypted - it asks for password during boot, even though the OS has no password lock on it.
In addition, my WIFI is now not working!
anyone have a clue here? I REALLY want to remove the encryption on the /data partition!
I wanted to follow up here with closure. Im not exactly sure WHY what I did worked, but it did, and maybe it can help someone else.
last I left off, I had CM11 installed, but no wifi, and the partition was still encrypted. At this point, I decided to try to downgrade again to CM10.2
Now, when the tablet was booting, it was asking me for my password to decrypt so it can boot. Except now, after loading CM11 and going back to 10.2, the password wasn't working and couldn't boot. I was convinced I was bricked.
I went back into recovery, and reloaded CM11. This time, when it came up asking for my password to decrypt before booting, it worked. So something in CM11 changed the encryption on /data so that CM10.2 couldn't read it anymore.
once I was booted into CM11 (still with no wifi), I went to SETTINGS - BACKUP & RESET - FACTORY DATA RESET again. This time, it worked! Asked for my password, said are you sure, then rebooted. BOOM, /data was no longer encrypted! CM11 came up, and with the fresh /data partition, wifi even worked!
For other reasons (Netflix) Ive since gone back to 10.1, but now /data isn't encrypted, so wiping and flashing is easy and works great now.
It seems there is a bug in CM10.2 (or android) where the FACTORY DATA WIPE doesn't work with encrypted /data partitions, but CM11 was able to do that just fine.

[Q] bad scenario

Hello, i am quite panicked about this problem so i will cut to the chase.:crying: I will write down stuff i did in numerical orders.
1. Using TWRP 2.8.6.1, I was curious to try to go to Wipe>Advanced>full wipe (wiping everything). After i did and tried to reboot, it said there is no OS. So i tried flashing my flashable stock rom 4.4.4 in zip form but it didn't boot.
2. So i flashed to stock in fastboot. (For flashing to stock, i used this instructions http://androidforums.com/threads/guide-how-to-flash-a-nexus-factory-image-manually.706533/). After finish flashing, i went to stock recovery and wiped dalvik cache and data.
3. After that, i rebooted and... that when it didn't seem right. Nexus 5 COULD connect to my PC but it only showed "Internal Storage" and nothing else. If i tried to move something to the storage, it would immediately say i can't move it there.
4. So i thought this was because the full wipe i did before and that the system partition got totally wiped. So i used TWRP again but to restore my old nandroid backup.
5. After i flashed my nandroid backup, twrp said this one line that goes in red "unable to mount /firmware. I ignored and rebooted. It still had the problem where i couldn't move anything to my storage by MTP but also adb push. It even couldn't save screenshots and download anything from internet like apk or some sort. When i went into the app called "Zipper", it said 'no sdcard'.
6. I searched through the internet to fix this but i kept failing to solve it. I tried going to TWRP and doing chmod, chmod 755, using these instructions (http://forum.xda-developers.com/google-nexus-5/general/sdcard-problems-upgrading-android-t2938749)
TL;DR : I did a full wipe in TWRP and lost all permissions to read or write. Nandroid backup didn't help. Whatever i flash in twrp, it says "unable to mount /firmware" at the end.
metallikoh said:
Hello, i am quite panicked about this problem so i will cut to the chase.:crying: I will write down stuff i did in numerical orders.
1. Using TWRP 2.8.6.1, I was curious to try to go to Wipe>Advanced>full wipe (wiping everything). After i did and tried to reboot, it said there is no OS. So i tried flashing my flashable stock rom 4.4.4 in zip form but it didn't boot.
2. So i flashed to stock in fastboot. (For flashing to stock, i used this instructions http://androidforums.com/threads/guide-how-to-flash-a-nexus-factory-image-manually.706533/). After finish flashing, i went to stock recovery and wiped dalvik cache and data.
3. After that, i rebooted and... that when it didn't seem right. Nexus 5 COULD connect to my PC but it only showed "Internal Storage" and nothing else. If i tried to move something to the storage, it would immediately say i can't move it there.
4. So i thought this was because the full wipe i did before and that the system partition got totally wiped. So i used TWRP again but to restore my old nandroid backup.
5. After i flashed my nandroid backup, twrp said this one line that goes in red "unable to mount /firmware. I ignored and rebooted. It still had the problem where i couldn't move anything to my storage by MTP but also adb push. It even couldn't save screenshots and download anything from internet like apk or some sort. When i went into the app called "Zipper", it said 'no sdcard'.
6. I searched through the internet to fix this but i kept failing to solve it. I tried going to TWRP and doing chmod, chmod 755, using these instructions (http://forum.xda-developers.com/google-nexus-5/general/sdcard-problems-upgrading-android-t2938749)
TL;DR : I did a full wipe in TWRP and lost all permissions to read or write. Nandroid backup didn't help. Whatever i flash in twrp, it says "unable to mount /firmware" at the end.
Click to expand...
Click to collapse
EDIT: alright i did a mess up. When i flashed the stock, i didn't rename the radio from radio-hammerhead-m8974a-2.0.50.1.16 to radio.img.

not booting after encryption attempt - stuck on cyanogen logo -- phone now restored

I have a phone that was rooted with the original rom (CyanogenOS but not cyanogenmod I think?) and had TWRP 2.8.5.1 installed. I initiated the encryption process and let it run. I returned to it after a couple of hours and found it displaying the cyanogen logo. I waited another 30 minutes before deciding it was stuck. I tried restarting the phone but it would get stuck on the cyanogen logo.
I then booted to recovery and was prompted for the decryption code, but the correct code was rejected. After researching here I concluded that the TWRP version was part of the problem so I flashed version 3.2.1-0
I was then able to boot to TWRP and decrypt the data partition and browse files. Unfortunately it still gets stuck at the cyanogen logo.
I also tried wiping the cache, and wiping and replacing the persist.img.
I'm not very experienced or skilled with these issues. I'm looking for a way to restore the phone to how it was before my encryption attempt; for now I'm abandoning the idea of encrypting the phone.
If it isn't in bad taste or obnoxious to ask this here, I'm willing to pay for help.
edit-0:
I was thinking of using TWRP to backup the decrypted data partition, wiping the encrypted version, then restoring the decrypted version.
It seems like this should restore the pre-encryption state, but am I missing something? Any downside to trying this?
edit-1: a follow-up
I was able to restore the phone by the method proposed above in edit-0
I made a backup with TWRP using a method similar to what's discussed in these threads:
https://forum.xda-developers.com/general/general/twrp-backup-including-internal-storage-t3660479
https://forum.xda-developers.com/android/general/tutorial-create-internal-storage-backup-t3389172
I followed roughly these steps:
1) temporarily rename the "media" folder to "mediabak" from the TWRP file manager
2) confirm size of the "data" partition has increased to expected value after renaming
3) plug in USB drive and mount
4) backup data partition to USB drive
5) make a backup copy of the USB drive to PC
5) wipe the data partition
6) restore the data partition using the backup on the usb drive
7) reboot to TWRP recovery (not a necessary step as far as I can tell)
8) note that at this point apparently TWRP automatically re-creates the "media" directory
9) delete the TWRP-generated "media" directory and rename the "mediabak" to "media"
10) reboot to TWRP recovery and browse restored files to see if things look right
11) reboot phone
Rebooting phone took longer than normal, as I think one would expect.
After lingering for a while the "cyanogen" logo animation disappeared and the message about android updating apps appeared
Phone seems to be working normally.
In retrospect my only exposure to actual data loss the database of Signal app messages. It seems like everything else I could have extracted from file based backups and also directly from the phone after I upgraded to TWRP 3.2.1-0

0 mb in TWRP internal storage

I searched for an answer and noticed it's a common issue. I am trying to flash a kernel on to my already flashed rom. I was wondering if there is a more current fix. More importantly, how can this be avoided in the future. Thank you guys!
Its caused by a bug/error with either the filesystem or encryption.
Did you wipe data after flashing the new ROM? Data from stock usually doesn't work with custom ROMs.
Do you have a PIN/password on Android?
Are you using the latest build of TWRP?
Press the menu button at the bottom of the screen in TWRP and post what the error message is in the red text.
It's caused by no root access
djhulk2 said:
It's caused by no root access
Click to expand...
Click to collapse
Something is probably wrong with the data partition. TWRP should always have root access.
Try in TWRP:
Wipe > Format Data > Slide to format
This will erase the data partition, so backup everything to a PC in Android first if needed. It should allow TWRP to mount /data again.
KemikalElite said:
Something is probably wrong with the data partition. TWRP should always have root access.
Try in TWRP:
Wipe > Format Data > Slide to format
This will erase the data partition, so backup everything to a PC in Android first if needed. It should allow TWRP to mount /data again.
Click to expand...
Click to collapse
I've debated on doing this. I'm not worried about losing pictures texts etc as they're backed up.
I read that it essentially leaves the device with no OS. If that's wrong please let me know!
I have found that if I choose Slot A and reboot system it reboots me in to TWRP. If I choose Slot B it runs the OS like normal (except I still have issues using Facebook and it's services).
The ROM works and I can perform all the custom mods on it. I just want to flash a kernel and the problem persists. 0 mb in storage.
It's trial and error at this point. Fail fast fail forward. I have another phone I can use but I love the OnePlus. Any help will be appreciated!
https://andi34.github.io/faq/faq_twrp.html
I'm not willing to risk it until I know how to get the custom ROM on to the storage to flash it.
Yes formating by typing in yes will wipe it all,everything including pictures, with no rom on it at all. If u choose to do that, don't close twrp. Instead you should be able mount after wards, once mounted transfer the magisk zip, twrp, and your custom rom(has to be 1.5gb not 200mb through magisk). Flash magesik, install ram disk twrp, install rom. That was a method I've done before but if u want to keep everything there is other way
fastboot boot twrp.img, that command boots twrp if u have it or don't, installing to ram disk makes it permant...this boot command is just a one time thing each time. It's what I do when new firmware update, I loose root but I regain it each time
Never heard of formating data removing the OS, that would be if you wipe the system and normal wipe is like a factory data reset and therefore will not wipe your phone of the OS
djhulk2 said:
Yes formating by typing in yes will wipe it all,everything including pictures, with no rom on it at all. If u choose to do that, don't close twrp. Instead you should be able mount after wards, once mounted transfer the magisk zip, twrp, and your custom rom(has to be 1.5gb not 200mb through magisk). Flash magesik, install ram disk twrp, install rom. That was a method I've done before but if u want to keep everything there is other way
fastboot boot twrp.img, that command boots twrp if u have it or don't, installing to ram disk makes it permant...this boot command is just a one time thing each time. It's what I do when new firmware update, I loose root but I regain it each time
Click to expand...
Click to collapse
I attempted to format. It said
"failed to mount /data (device or resource busy)
"unable to mount storage"
Try this in recovery, sometimes its known to work.
Wipe > Advanced Wipe > Check Data and press Repair or Change File System > Change File System > Change it to EXT2.
Repeat the same process selecting Ext4
Wipe > Advanced Wipe > Check Data and press Repair or Change File System > Change File System > Change it to back to EXT4.
Try formatting data after this.
drey4211 said:
I attempted to format. It said
"failed to mount /data (device or resource busy)
"unable to mount storage"
Click to expand...
Click to collapse
Since you dont care about the data on the phone I would just do 1 of 2 things. 1st I would reflash twrp on to you phone if that doesn't work then I would just grab the fastboot ROM and just flash your phone back to full stock reroot and install twrp from scratch. I would not try to start repairing partitions. I wouldn't want to worry about screwing up the EFS partition
Well in an update, I formatted the
Storage and now I'm stuck in bootloader screen. It's unlocked but I'm having a hard time flashing a ROM through adb.
I use the twrp version 3.3.1-2
Best would be to just use fast command to boot it
But it should be under wipe/format data/then type in yes
That was what I was trying to have you avoid. If your can boot to fastboot download the fastboot ROM I told you to and run the flash-all.bat file. If your on 9.5.8 make sure you use the fastboot ROM of the same version. Do not flash azip of a different version firmware like 9.5.7.
It happens to me any time I'm in twrp and flash a rom then reflash twrp. It doesn't matter if I flash Magisk or not the issue always happens. What I do is use a USB C flash drive and plug it in when I want to flash/backup a rom. This way I can always access it. After flashing any rom then booting I'm always able to access my internal storage again. It seems like a bug in twrp.
The strange part is when this bug happens your files are encrypted in a 0 folder but you can still copy from your PC to your internal storage while in twrp.
I essentially soft bricked my device. Called OnePlus and they got me up and running. That's awesome that they have that service!
Are you removing all security? Pattern, pin and fingerprints? Are you decrypted? Never had an issue with flashing a ROM causing these issues which is why I'm asking. Something you've done at some point is causing this
I'm not sure what that was. Ironically enough I am now stuck in TWRP boot loop. Hopefully I can figure this out otherwise I have to call oneplus again.
I will admit I may not know everything but it's trial and error. I don't have anyone to really teach me this so I try to read the forums and learn. You guys have been great!
ajsmsg78 said:
It happens to me any time I'm in twrp and flash a rom then reflash twrp. It doesn't matter if I flash Magisk or not the issue always happens. What I do is use a USB C flash drive and plug it in when I want to flash/backup a rom. This way I can always access it. After flashing any rom then booting I'm always able to access my internal storage again. It seems like a bug in twrp.
The strange part is when this bug happens your files are encrypted in a 0 folder but you can still copy from your PC to your internal storage while in twrp.
Click to expand...
Click to collapse
I've the same issue.. did you find a fix? So annoying

Categories

Resources