How to format encrypted /data in CWM - Verizon Samsung Galaxy S III

Here's the scenario: say you try out encryption on a ROM, either because your employer makes you or because you want the extra security. What happens when you can root your phone, like we can (easily) with the S3, and you want to flash a different ROM? The problem you will find yourself in very quickly is that you cannot do a successful wipe. You can't format an encrypted /data in CWM or any other recovery. If you cannot format /data, you can't flash a ROM - it fails, because /data is encrypted, and it cannot proceed. It turns out none of the recoveries can format an encrypted /data. You also cannot reverse encryption once you've done it. You're stuck, all because you flipped the switch on encryption.
I found myself in this problem as others have in many other forums (like this one for the GNex) (and another one, more detailed).
I also tried, admittedly somewhat out of desperation, the soft-brick instructions here. That didn't work because Nand Erase All fails. You can flash on top, and luckily you can use your same password to decrypt your /data (which I did) but you're still not going to have a clean ROM. Dirty flashes = lots of problems down the road.
I finally found a simple way to do this and wanted to save anyone else the trouble of digging. You can do it using CWM and adb and a few commands. Credit goes Shawn Webb's blog and utkanos on FreeNode's irc at #cyanogenmod.
Here is how to do this on our Verizon S3:
In CWM, wipe cache
adb shell
mke2fs -t ext4 /dev/block/mmcblk0p15
mount /data
mount /dev/block/mmcblk1p1 /data/media
If adb doesn't work in CWM, reboot recovery. You might need to create /data/media after mounting /data in order to do the last step, which I opted not to do. I hope this saves someone else a few hours of frustration, and I also hope that someday one of our recoveries can handle formatting encrypted data. Until then... I'm just not using encryption, period. There already is a lot of documentation against it, and this is one more reason in my book.

Thanks for this. I fell into the same scenario yesterday but after reading a lot of helpful posts from people like yourself I have managed to solve the issue. Basically I found two ways of doing it, one is as you have suggested and the other is by just replacing the custom recovery with the stock recovery. The SGS3 toolkit available on XDA made the 2nd option just slightly simpler for me and by spending less than 10 mins (excluding time for backups and downloads) the issue was resolved.
Just to share this option to save others from the headache of looking for a solution:
1) Get the toolkit
2) Install drivers as recommended and follow instructions to choose the build, or closest build, for your S3
3) Restore stock recovery with toolkit via ODIN (follow instructions)
4) After rebooting, go into Android and reset to factory settings, this would bring you to the stock recovery and wipe
5) Restore custom recovery with toolkit via ODIN (follow instructions)
6) Restore your system (luckily for me I had a nandroid backup before I encrypted)
Note: I did "lose" my internal sdcard files (pictures/documents). But I backed that up on my external sdcard before starting the process. My sdcard was not encrypted.

kitleon said:
Thanks for this. I fell into the same scenario yesterday but after reading a lot of helpful posts from people like yourself I have managed to solve the issue. Basically I found two ways of doing it, one is as you have suggested and the other is by just replacing the custom recovery with the stock recovery. The SGS3 toolkit available on XDA made the 2nd option just slightly simpler for me and by spending less than 10 mins (excluding time for backups and downloads) the issue was resolved.
Just to share this option to save others from the headache of looking for a solution:
1) Get the toolkit
2) Install drivers as recommended and follow instructions to choose the build, or closest build, for your S3
3) Restore stock recovery with toolkit via ODIN (follow instructions)
4) After rebooting, go into Android and reset to factory settings, this would bring you to the stock recovery and wipe
5) Restore custom recovery with toolkit via ODIN (follow instructions)
6) Restore your system (luckily for me I had a nandroid backup before I encrypted)
Note: I did "lose" my internal sdcard files (pictures/documents). But I backed that up on my external sdcard before starting the process. My sdcard was not encrypted.
Click to expand...
Click to collapse
You just saved my month. Drop me a message if I can get you a beer via paypal for this.
Cheers!

THANKS!
olm3ca said:
Here's the scenario: say you try out encryption on a ROM, either because your employer makes you or because you want the extra security. What happens when you can root your phone, like we can (easily) with the S3, and you want to flash a different ROM? The problem you will find yourself in very quickly is that you cannot do a successful wipe. You can't format an encrypted /data in CWM or any other recovery. If you cannot format /data, you can't flash a ROM - it fails, because /data is encrypted, and it cannot proceed. It turns out none of the recoveries can format an encrypted /data. You also cannot reverse encryption once you've done it. You're stuck, all because you flipped the switch on encryption.
I found myself in this problem as others have in many other forums (like this one for the GNex) (and another one, more detailed).
I also tried, admittedly somewhat out of desperation, the soft-brick instructions here. That didn't work because Nand Erase All fails. You can flash on top, and luckily you can use your same password to decrypt your /data (which I did) but you're still not going to have a clean ROM. Dirty flashes = lots of problems down the road.
I finally found a simple way to do this and wanted to save anyone else the trouble of digging. You can do it using CWM and adb and a few commands. Credit goes Shawn Webb's blog and utkanos on FreeNode's irc at #cyanogenmod.
Here is how to do this on our Verizon S3:
In CWM, wipe cache
adb shell
mke2fs -t ext4 /dev/block/mmcblk0p15
mount /data
mount /dev/block/mmcblk1p1 /data/media
If adb doesn't work in CWM, reboot recovery. You might need to create /data/media after mounting /data in order to do the last step, which I opted not to do. I hope this saves someone else a few hours of frustration, and I also hope that someday one of our recoveries can handle formatting encrypted data. Until then... I'm just not using encryption, period. There already is a lot of documentation against it, and this is one more reason in my book.
Click to expand...
Click to collapse
Just wanted to say thanks very much for this. I'd tried the method of reloading the stock ROM as described by a previous poster, but this way worked.
I did run into a small issue I was wondering if you could shed some light on. When I entered "mount /data", I got the following:
Code:
~ # mount /data
mount: mounting /dev/block/mmcblk0p37 on /data failed: Invalid argument
I bullied ahead and entered the last line "mount /dev/block/mmcblk1p1 /data/media" and got this:
Code:
~ # mount /dev/block/mmcblk1p1 /data/media
mount: mounting /dev/block/mmcblk1p1 on /data/media failed: No such file or directory
However after doing this, I was able to perform a complete wipe of /data using CWM and load a new ROM without issue.
I'd curious to know what might be causing these Invald argument responses.
My Device: HTC One (GSM)
Thanks again! :laugh:

olm3ca said:
Here is how to do this on our Verizon S3:
In CWM, wipe cache
adb shell
mke2fs -t ext4 /dev/block/mmcblk0p15
mount /data
mount /dev/block/mmcblk1p1 /data/media
If adb doesn't work in CWM, reboot recovery. You might need to create /data/media after mounting /data in order to do the last step, which I opted not to do. I hope this saves someone else a few hours of frustration, and I also hope that someday one of our recoveries can handle formatting encrypted data. Until then... I'm just not using encryption, period. There already is a lot of documentation against it, and this is one more reason in my book.
Click to expand...
Click to collapse
I'm trying to follow your instructions but fail at finding out my mount points.
Sorry for the noob question, but who do I find out what the mount points of internal and external SD card are on my device (Samsung Galaxy S4 Mini International 4G)? I found this post
stackoverflow. /questions/6824463/how-to-get-all-the-mount-point-information-for-android-device
which seems to include the answer but I don't know what tool / software they use. I'm no programmer.
My phone is encrypted and doesn't turn on, it doesn't accept my password saying it's wrong, though I know it's correct. OS is Cyanogenmod 10.1 stable. Booting into CWM v6.0.3.7 is possible though.
I appreciate everyone's help.
Stephan

Related

[Q] Enrcyption Support for ClockWorkMod Recovery

Hello,
i have just installed the official stock ICS 4.0.3 Rom to my Nexus S and everything was really fine... until i tried to root it. As someone who tries to take security seriously, i immediately encrypted the device using the tools provided by ics (works ok).
but unfortunatly it's now not possible anymore to mount /sdcard while in recovery, which makes rooting and installing updates impossible (or is there any other way? eg. fastboot?).
therefore my question: will clockworkmod recovery support ics encrypted devices in the (near) future? i know its gonna be a p.i.a. to type a password with only the volume buttons, but hey
i like the encryption and would like to keep it, but not beeing able to use recovery like before is a big drawback...
greetings
Georg
Same for me.
Hope to see encryption support in clockworkmod soon.
I bought Rom manager premium even if I never flash from rm just to support the developers... hope they will be able to get it sorted out
Op -- I'm interested in this for when my phone (EVO 3D) finally gets ICS. Will you post an update to this thread if you hear anything?
BTW, with TWRP getting touchscreen support, it can't be too much longer before CWM gets touchscreen since I think the guys in TWRP were going to start contributing to CWM, from what I've heard anyway. So that would solve the password typing problem.
Georg, thanks for asking this question as I've been wondering the same exact thing. Hopefully we'll get a good answer soon.
Alternatives for ClockworkMod Recovery
I encrypted my device (the Exchange account I added required it) n... now I cant do anything in recovery ... it wont mount the drive ... any suggestions for a replacement ...
thanks ...
mrosensweig said:
I encrypted my device (the Exchange account I added required it) n... now I cant do anything in recovery ... it wont mount the drive ... any suggestions for a replacement ...
thanks ...
Click to expand...
Click to collapse
Its because the way encryption works you have to boot and enter code, that's the whole point, no recovery can do it atm
Sent from my ice cream powered Nexus S
small update:
nothing new on the subject, but i didnt check out the new touch recovery (anyone tried it yet?).
in the mean time i went back to an unencrypted CM9...
I didn't read anything about encryption so did not upgraded to the touch recovery yet
you should lock the bootloader if someone is nagging you
jomir said:
small update:
nothing new on the subject, but i didnt check out the new touch recovery (anyone tried it yet?).
in the mean time i went back to an unencrypted CM9...
Click to expand...
Click to collapse
Jomir, what was the procedure you used to get back to CM9? Is it possible to repartition, erasing the encrypted partitions so a new rom can be flashed? How?
Thx,
rmsilva
rmsilva123 said:
Jomir, what was the procedure you used to get back to CM9? Is it possible to repartition, erasing the encrypted partitions so a new rom can be flashed? How?
Thx,
rmsilva
Click to expand...
Click to collapse
Restore a backup or do a clean install(format boot, system, cache and data)
Sent from my ice cream powered Nexus S
DarkhShadow said:
Restore a backup or do a clean install(format boot, system, cache and data)
Sent from my ice cream powered Nexus S
Click to expand...
Click to collapse
Thanks for the reply, DarkhShadow. The problem is that CWM can't wipe or format these partitions, since it can't mount /sdcard (which is encrypted). If I could only access the external sdcard from within CWM, I could just wipe everything and then install a new rom. But since it can't mount /sdcard, I can't access sd-ext. nvflash is not an option, since my TF101 is B90. Is there a way to either restore the stock recovery (overwrite CWM) or boot from the external SD so I can run a script such as "super wipe full" (http://forum.xda-developers.com/showthread.php?t=1245892)? Maybe there's a way to run the wipe script through adb? If I can just format the partitions (which is what the script does), then CWM would be able to mount /sdcard and, consequently, the external SD and I can flash a new rom (such as revolution HD 3.0.1).
Thanks,
rmsilva
Honestly idk then, try a factory reset on phone(ie booted up) and then maybe it will be unencrypted?
Sent from my ice cream powered Nexus S
The funny thing is that stock recovery on an encrypted phone can write to the disk, but only from a warm reboot (perhaps the kernel stays resident?).
When I say write to disk I say apply the leaked OTA update, 4.0.4 for the VZ Gnex. And correct me if I am wrong, it's writing and mounting the disk, no?
Anyhow, this is done from stock recovery which is open source. So you ask yourself, why can't Koush support mounting the disk from a warm recovery state reboot? Maybe he doesn't know this?
DarkhShadow said:
Its because the way encryption works you have to boot and enter code, that's the whole point, no recovery can do it atm
Sent from my ice cream powered Nexus S
Click to expand...
Click to collapse
rmsilva123 said:
Jomir, what was the procedure you used to get back to CM9? Is it possible to repartition, erasing the encrypted partitions so a new rom can be flashed? How?
Thx,
rmsilva
Click to expand...
Click to collapse
i did a factory reset (from the settings menu), installed recovery per adb/fastboot and installed cm9 from sdcard in recovery.
Use tmpfs to install a new ROM in crypted system
Hello Everyone
To flash a new ROM you can do as follows:
boot in Recovery
format cache partition
from your PC use adb to mount /sdcard as tmpfs:
adb shell mount -t tmpfs none /sdcard​
put your ROM on the (fake) sdcard
adb push <your rom> /sdcard​
use the recovery to flesh the ROM as usual
This worked form me.
Sorry to be late...
What about a nandroid backup or restore? How big is /cache?
orcruin said:
Hello Everyone
To flash a new ROM you can do as follows:
boot in Recovery
format cache partition
from your PC use adb to mount /sdcard as tmpfs:
adb shell mount -t tmpfs none /sdcard​
put your ROM on the (fake) sdcard
adb push <your rom> /sdcard​
use the recovery to flesh the ROM as usual
This worked form me.
Sorry to be late...
Click to expand...
Click to collapse
Sorry I didn't try with a nandroid backup but I think it is too big to fit the device memory...
You can backup data inside the sd partiton (phone up and running, just to don't lose data...), boot into recovery, format sdcard partition, mount it, put the backup in the sdcard and after install the nandroid backup...
I think that it could work but I am not sure. If after formatting the sdcard you can mount it, the task is done. You can put the backup on it using adb push and flash using recovery.
If you try please give me some news.
Regards
orcruin said:
Hello Everyone
To flash a new ROM you can do as follows:
boot in Recovery
format cache partition
from your PC use adb to mount /sdcard as tmpfs:
adb shell mount -t tmpfs none /sdcard​
put your ROM on the (fake) sdcard
adb push <your rom> /sdcard​
use the recovery to flesh the ROM as usual
This worked form me.
Sorry to be late...
Click to expand...
Click to collapse
I'm kind of a noob when it comes to adb. What is that process doing exactly? How big is the fake sdcard? I want to make sure I understand all the implications before I dive in. Of course I need HTC to release a ICS ROM first. ;-)
thx1200 said:
I'm kind of a noob when it comes to adb. What is that process doing exactly? How big is the fake sdcard? I want to make sure I understand all the implications before I dive in. Of course I need HTC to release a ICS ROM first. ;-)
Click to expand...
Click to collapse
First it formats the cache partition. Then mount the /sdcard so that you can access it from your pc. After you mount the /sdcard, you can put your rom zip into it. After the zip has been transferred into /sdcard, you can flash the zip as usual.
Since nexus s doesn't have sdcard slot, it mounts the internal storage as '/sdcard' to treat it like a sdcard, thus 'fake' sdcard. The 'fake' sdcard is around 13GB.

[Q] TF101 Installing Custom ROM on Encrypted device

I recently managed to successfully root my TF101.
I installed CWM (Via ROM Manager) and downloaded CM9
I boot into CWM and attempt to do a nandroid...can't find path.
I attempt to just install from SDCard...can't find path
Realization (and research) hits that CWM can't see the external sd, and the system doesn't see it as SDCARD but EXT-.
CWM can't see the internal SDCard because apparently on the Tablet the ICS encryption locks that down (but doesn't on my EVO since the SC Card isn't part of the internal storage)
I attempt to perform a factory data wipe to clear out the encrtyption , but upon reboot CWM loads. I try to perform the boot-launcher data wipe, but then CWM loads.
I try to use CWM to factory reset but since it can see the damned SDCard because of the encryption, no dice.
My machine is not bricked, as I can still boot into the previous install but I can't seem unable to format the thing to install CM9.
What to do, and thanks.
It has been said multiple times before DO NOT USE ROM MANAGER.
Either use Thing O Doom's peri to install a different CWM or Gnufabio's Recovery installer or NVFlash a rom to completely wipe. And don't use encryption there is no point 99% of the time
I didn't check here first, which is obviously what was my first mistake.
Will any of those recoveries be able to access and format the SD Card area?
Also, I use encryption as I do have sensitive things on my machine that I don't want exposed in case the machine is stolen. First time I've ever had it give me a problem, as the phone encrypts differently.
Team roug's recovery has internal and external sd support and i think the encryption is an ics/tegra 2 bug more than anything
Ok, so I managed to get the new recovery on via Thing O Doom's peri. And I was able to install Revolver via the ext card...but upon boot I was prompted for my encryption pin and got the message that android was updating...My Build number is now Revolver but everything is the same as it was. I still can't factory wipe this damned thing.
Upon request to wipe, it boots back to recovery and says formatting data and cache, data wipe failed.
Tis site states http ://0xfeedface.org/blog/lattera/2012-06-04/installing-cm9-encrypted- android-tablet
The dilemma
When you encrypt your Android device, the /data partition is what gets encrypted. The partition in full is encrypted and cannot be mounted within CWM. CWM also cannot perform a wipe, since it cannot mount the /data partition. And CWM cannot mount the external SD card. This is our dilemma. No access to the internal SD. No access to the external SD. No way to perform a wipe and format the internal SD from CWM.
The Solution
What we need to do, then, is use adb while the tablet is in recovery mode to reformat the internal SD card, thereby removing the encryption. On the US Transformer Prime, the internal SD card is at /dev/block/mmcblk0p8. The partition for our spare SD card will be at /dev/block/mmcblk1p1. You will need to replace those device entries for any other device you might attempt this on. After formatting the internal SD card, we will mount it and then mount the external SD card at /data/media:
In CWM, wipe cache
adb shell
mke2fs -t ext4 /dev/block/mmcblk0p8 # Warning: This can take a while. Be patient.
mount /data
mount /dev/block/mmcblk1p1 /data/media
Now go back to CWM on your device, then go ahead and flash your CM9 and gapps zips like normal. You now have CM9 installed! The /data partition is not encrypted. If you do not need to flash any other ROMs (unlikely if you're reading this article), feel free to re-encrypt your device.
Click to expand...
Click to collapse
I don't know the block numbers for the TF01
you need to undo the encryption before you can wipe anything
You can't. Hence my problem. I cannot mount,delete, or format the SDCard. It sounds like the process in the above post is the solution, but I don't know how to find out what block numbers the tf101 uses.
If you don't mine losing your data NVflashing a rom will resolve all the problems
Yep nvflash will do the trick otherwise as the solution you found yourself explains
Use adb in recovery ( in other words hook it up on a pc ) for this you will need android sdk runnin on your pc
More info about adb u can find here
http://forum.xda-developers.com/showthread.php?t=1751439&highlight=adb+help
Good luck
Thanks to all, I have resolved my issue!
I had to download the stock rom, extract the blob, and use Wheelie for PC to NVFlash everthing abck to stock. I was then able to update over OTA, and use the excellent Thing O Doom's peri to re-root and flash the working recovery.
There should be several items in the Root FAQ up top, such as:
If you are encrypted and going to root, factory reset to get rid of the encryption FIRST since the encryption locks down the SDCARD partition (Unlike on the phone)and none of the recoveries can access it to mount. DON"T use ROM manage on the TF101 and always, always check XDA first.
:good:
darthrater said:
Thanks to all, I have resolved my issue!
I had to download the stock rom, extract the blob, and use Wheelie for PC to NVFlash everthing abck to stock. I was then able to update over OTA, and use the excellent Thing O Doom's peri to re-root and flash the working recovery.
There should be several items in the Root FAQ up top, such as:
If you are encrypted and going to root, factory reset to get rid of the encryption FIRST since the encryption locks down the SDCARD partition (Unlike on the phone)and none of the recoveries can access it to mount. DON"T use ROM manage on the TF101 and always, always check XDA first.
:good:
Click to expand...
Click to collapse
That FAQ is sadly pretty outdated, I wish I could liberate the OP
Glad all is working now though.

[SOLVED] Decryption Unsuccessful and a currently bricked M8

I previously ran LolliGPE but was long overdue for an update. I downloaded the latest version and copied the image to my phone and flashed the ROM. I decided to go try a dirty install first to see if I could keep everything I had, since I had already been running a previous version and after reviewing the changelog did not see anything recommending to wipe clean. After installing successfully, Android asked me to enter my password to decrypt my data (I don't recall ever encrypting my data?), and so I did. It then told me that my password was right, but the data was corrupt, and presented me a button to reset my phone. The button redirected me to recovery and automatically attempted to wipe /data and then re-mount it, but the wipe failed. I rebooted again with the same issue, same failed attempt to wipe. I went to install the zip again, and this time do a full wipe, but it was unable to mount my phone's storage nor my SD card. I am not able to mount either at all now.
What's the best course of action? I'd like to retain as much as I can and avoid wiping all of the internal storage clean. Is there a simpler fix to this or am I doomed?
HBOOT: 3.19.0.0000
RADIO: 1.09.20.0926
OS: 3.28.605.4
EDIT: For anyone else having a problem like this that at least wants to get their data back, here's what you should do (I assume you know how to work with Linux!):
Make sure you have the latest version of TWRP and ADB.
Boot the phone into recovery mode and connect the phone to your computer via USB
Run "ls -al /dev/block/platform/msm_sdcc.1/by-name" and check the output. Make a note of the partition marked "userdata" - for me, it was /dev/block/mmcblk0p48.
Either: simply use adb pull to copy this file to your computer (this will require about 26 gigs of space), or attempt to mount the file. To use adb pull, execute "adb pull /dev/block/<ID> ./data" (ID being what you marked down). Your data partition will be copied to /data. To mount, use "mount -t ext4 /dev/block/<ID> /userdata". Whatever's left of your data will be on your phone's new /userdata folder.
Use ADB to pull what files you want from /userdata. If you pulled the partition, skip this step.
If you copied the files you wanted over, you're done. If you pulled the entire partition, you're going to want to try and mount it. On Windows, there are various tools to mount Linux partitions, a quick Google will find some good ones. However, if the data is corrupt, it will not work. I recommend attempting to repair the partition on linux, with the command "e2fsck -f -y /path/to/data", replacing the path to your data file as necessary. Once done, run "mount -t ext4 /path/to/data /mnt/data", replacing the paths as necessary.
Once mounted, you can access your data wherever it was mounted. If e2fsck appeared to fix many errors, chances are most of your data will be in the lost+found folder, and you'll need to sort through this yourself. If you're lucky, then your data will be intact and readily usable. Internal SD card data is located at ./media/0.
To fix the partitions and get Android back up and running, you need to install the latest firmware, format your data in TWRP, factory reset, and then flash a ROM again. Here's what I did to do that, without an SD card. If you have an SD card, simply copy your ROM zip to the SD card and skip the final steps:
Make sure you have the latest version of TWRP and ADB, and download the latest copy of the firmware (check the development forum here).
Boot the phone (doesn't matter to what) and run adb reboot bootloader. When your phone reboots, double-check by running fastboot reboot-bootloader.
Put your phone in RUU mode with fastboot oem rebootRUU. The phone will restart and the HTC logo will come up.
Wait a couple seconds, then run fastboot flash zip firmware.zip, where firmware.zip is the firmware you want to flash.
The first time you do this, it will fail saying something like "FAILED (remote: 90 hboot pre-update! please flush image again immediately)". Ignore this, run the last command again: fastboot flash zip firmware.zip
The progress bar will appear and begin filling. Wait until fastboot is finished flashig it (the progress bar may not fill completely), wait an extra 5 seconds or so, and then do fastboot reboot.
The phone will reboot. Android will still be messed up, but you can verify the partitions are in working order by checking adb shell cat /proc/emmc.
Once you know the partitions are working, get back into TWRP/recovery: adb reboot recovery
Format /data and wipe /cache, /data, dalvik/art cache, etc (factory reset). You will lose the contents of your internal storage and everything else.
If you don't have the ROM zip on an sd card, make sure the zip is in the same directory as adb and run adb push rom.zip /sdcard/rom.zip, where rom.zip is the ROM. You can also copy it to the external sd by swapping /sdcard/rom.zip with /external_storage/rom.zip.
Once copied, reboot into recovery and flash the zip. Back to normal!
Update:
It's a firmware problem. Apparently there was a new firmware update that the ROM uses that I don't have. mmcblk0p42 was changed to "vzw_logger" (which I don't have), making mmcblk0p49 userdata instead of previously mmcblk0p48. The data partition it expects to be /data is /cache. Got this information by comparing 'cat /proc/emmc' with information of the latest version I found here.
Is there a way to fix this that allows me to preserve the contents of my internal storage (/sdcard)? Can I just flash an older version of the ROM to backup my data?
Klayderpus said:
Update:
It's a firmware problem. Apparently there was a new firmware update that the ROM uses that I don't have. mmcblk0p42 was changed to "vzw_logger" (which I don't have), making mmcblk0p49 userdata instead of previously mmcblk0p48. The data partition it expects to be /data is /cache. Got this information by comparing 'cat /proc/emmc' with information of the latest version I found here.
Is there a way to fix this that allows me to preserve the contents of my internal storage (/sdcard)? Can I just flash an older version of the ROM to backup my data?
Click to expand...
Click to collapse
I posted a warning about this change in the general section early on. For you to have the partition changes means you are on the newer firmware which doesn't match what you posted above for os. You very likely at this point have nothing left to salvage. Are you on the latest twrp?
dottat said:
I posted a warning about this change in the general section early on. For you to have the partition changes means you are on the newer firmware which doesn't match what you posted above for os. You very likely at this point have nothing left to salvage. Are you on the latest twrp?
Click to expand...
Click to collapse
I am on the latest TWRP, yes. Since this post, I've actually been making good progress in getting the data partition back, or so I think. I've been using dd to copy /dev/block/mntblk0p48 to an image file, but got stuck when I reached the FAT32 limit, so I re-formatted my SD card, except now it's read-only.
Klayderpus said:
I am on the latest TWRP, yes. Since this post, I've actually been making good progress in getting the data partition back, or so I think. I've been using dd to copy /dev/block/mntblk0p48 to an image file, but got stuck when I reached the FAT32 limit, so I re-formatted my SD card, except now it's read-only.
Click to expand...
Click to collapse
If you Dd the entire data partition it's gonna be almost 25 gigs. If you can't mount data in twrp and find anything usable when browsing via adb in twrp there's probably not anything usable in there.
dottat said:
If you Dd the entire data partition it's gonna be almost 25 gigs. If you can't mount data in twrp and find anything usable when browsing via adb in twrp there's probably not anything usable in there.
Click to expand...
Click to collapse
I did a DD before while in ADB and it only got to about 1.3 gigs, but after running the image through e2fsck I actually found some images and downloads. I think there's usable stuff in there and I'd like to at least try to get it. There's family pictures and stuff on there that have some value to me. My SD card is 32 gigs so I could probably do it if anything for the hell of it.
Do you happen to know how I can get the SD card mounted? mount -o rw,remount /dev/block/mmcblk1p1 [some dir] is what I've been trying, but I've been getting either Read only filesystem or Invalid argument.
I might be a little crazy
Klayderpus said:
I did a DD before while in ADB and it only got to about 1.3 gigs, but after running the image through e2fsck I actually found some images and downloads. I think there's usable stuff in there and I'd like to at least try to get it. There's family pictures and stuff on there that have some value to me. My SD card is 32 gigs so I could probably do it if anything for the hell of it.
Do you happen to know how I can get the SD card mounted? mount -o rw,remount /dev/block/mmcblk1p1 [some dir] is what I've been trying, but I've been getting either Read only filesystem or Invalid argument.
I might be a little crazy
Click to expand...
Click to collapse
Its already mounted.. Just boot into TWRP while connected to your PC. Open cmd prompt in your adb directory.
adb shell
cd sdcard
ls
See if your internal SD card contents are listed.
dottat said:
Its already mounted.. Just boot into TWRP while connected to your PC. Open cmd prompt in your adb directory.
adb shell
cd sdcard
ls
See if your internal SD card contents are listed.
Click to expand...
Click to collapse
TWRP lists the internal SD card as being size 0 under Mount -> Select Storage and /sdcard is empty. I re-formatted my external SD card to make a full size image but that's what wasn't mounting.
Klayderpus said:
TWRP lists the internal SD card as being size 0 under Mount -> Select Storage and /sdcard is empty. I re-formatted my external SD card to make a full size image but that's what wasn't mounting.
Click to expand...
Click to collapse
Did you try the repair option for /data listed under wipe in TWRP?
dottat said:
Did you try the repair option for /data listed under wipe in TWRP?
Click to expand...
Click to collapse
Doesn't work. There's a couple of messages about not being able to mount /data and then:
Code:
Repairing Data using e2fsck...
E:Unable to repair '/data'.
E:Error repairing file system.
Klayderpus said:
Doesn't work. There's a couple of messages about not being able to mount /data and then:
Code:
Repairing Data using e2fsck...
E:Unable to repair '/data'.
E:Error repairing file system.
Click to expand...
Click to collapse
try this
adb shell
mount -t ext4 /dev/block/mmcblk0p49 /userdata
df
show me the output of df...
and if to be sure of which firmware you are on.. reboot recovery... and do the following....
adb shell
mount -t ext4 /dev/block/mmcblk0p48 /userdata
df
and show me that DF
I got all of my data back successfully. I'm updating the OP with the steps I did to get it back.
What's the next step? Change firmware? I have a local copy of what I needed from the phone, so anything's game now.
edit: /dev/block/mmcblk0p48 for me is userdata, 49 does not exist. Both mounts fail.
Code:
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 933044 24 933020 0% /dev
tmpfs 933044 20 933024 0% /tmp
/dev/block/mmcblk0p47 1030828 16464 1014364 2% /cache
/dev/block/mmcblk1p1 30647232 12 29090436 0% /external_sd
/dev/block/mmcblk1p1 30647232 12 29090436 0% /and-sec
Klayderpus said:
I got all of my data back successfully. I'm updating the OP with the steps I did to get it back.
What's the next step? Change firmware? I have a local copy of what I needed from the phone, so anything's game now.
edit: /dev/block/mmcblk0p48 for me is userdata, 49 does not exist. Both mounts fail.
Code:
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 933044 24 933020 0% /dev
tmpfs 933044 20 933024 0% /tmp
/dev/block/mmcblk0p47 1030828 16464 1014364 2% /cache
/dev/block/mmcblk1p1 30647232 12 29090436 0% /external_sd
/dev/block/mmcblk1p1 30647232 12 29090436 0% /and-sec
Click to expand...
Click to collapse
I would say update firmware. Since you confirmed blk48 as user data I know you don't have lollipop firmware.
I posted a firmware zip that contains the newest twrp which is compatible with lollipop in tigerstowns firmware thread. You can use that to update.
Then wipe and reinstall whatever Rom you want to use.
I fixed it this morning by updating firmware and will update the OP with the rest of the steps for the Googlers. Thanks again.
Klayderpus said:
EDIT: For anyone else having a problem like this that at least wants to get their data back, here's what you should do (I assume you know how to work with Linux!):
Make sure you have the latest version of TWRP and ADB.
Boot the phone into recovery mode and connect the phone to your computer via USB
Run "ls -al /dev/block/platform/msm_sdcc.1/by-name" and check the output. Make a note of the partition marked "userdata" - for me, it was /dev/block/mmcblk0p48.
Either: simply use adb pull to copy this file to your computer (this will require about 26 gigs of space), or attempt to mount the file. To use adb pull, execute "adb pull /dev/block/<ID> ./data" (ID being what you marked down). Your data partition will be copied to /data. To mount, use "mount -t ext4 /dev/block/<ID> /userdata". Whatever's left of your data will be on your phone's new /userdata folder.
Use ADB to pull what files you want from /userdata. If you pulled the partition, skip this step.
If you copied the files you wanted over, you're done. If you pulled the entire partition, you're going to want to try and mount it. On Windows, there are various tools to mount Linux partitions, a quick Google will find some good ones. However, if the data is corrupt, it will not work. I recommend attempting to repair the partition on linux, with the command "e2fsck -f -y /path/to/data", replacing the path to your data file as necessary. Once done, run "mount -t ext4 /path/to/data /mnt/data", replacing the paths as necessary.
Once mounted, you can access your data wherever it was mounted. If e2fsck appeared to fix many errors, chances are most of your data will be in the lost+found folder, and you'll need to sort through this yourself. If you're lucky, then your data will be intact and readily usable. Internal SD card data is located at ./media/0.
[/LIST]
Click to expand...
Click to collapse
I have a laptop running Ubuntu: where do I run the "ls -al /dev/block..." command? As in what folder do I need to be in? The phone only appears in an mtp capacity...
EDIT: I figured that out but now I am stuck at "adb pull /dev/block/<ID> ./data". My ID was mmcblk0p28 but the command returns "Bash: mmcblk0p28: no such file or directory exists"
EDIT 2: Got that command to work but the file is too large to write (My disk is FAT32 ). So I then tried the mount command but again got "no such file or directory exists".
Same Issue "Decryption Unsuccessful"
I was trying to apply the OTA update for 5.1 on my M8 converted to GPE 5.01, but had to update to the stock recovery, and found myself in the same situation with the "Decryption Unsuccessful" message.
Following Klayderpus' steps to recover, but I'm running into a few issues:
1) Windows not Ubuntu so some (many) of the commands do not apply.
2) The device is not responding to adb, although it was prior to the "upgrade". Fastboot is working.
3) TWRP was not on the device, in fact I never could get to the recovery after trying to install the stock recovery when I converted to GPE 5.01 many months ago
I have a fresh nandroid backup, so I am just trying to get the device running. Being without the phone is causing me great pain....
I upgraded the firmware to 4.16 and did the factory reset from the stock 4.16 recovery. The phone boots back to the "Decryption Unsuccessful" message.
I am not sure, but I think the next step for me to try is to install the GPE ROM from graffixnyc from the microSD card (need to find/buy that little SD adaptor)
Any help would be greatly appreciated!!
========================
Update;
Recovery does not see the SD card , so I won't be able to install from there.
I'll try flashing TWRP recover to see if that will show the contents of the external card
========================
Update 2:
TWRP does see the external card, but the install failed as it is unable to mount /data and /storage.
I'm out of ideas....HELP!!
========================
Update 3
I noticed the "factory reset" in HBOOT and thought I'd try that instead of the "Wipe" in TWRP, but only made things worse.
Now the phone comes up to the "Decryption Unsuccessful" where I can then take the reset to get it into TWRP recover
TWRP comes up directly into a screen where it's "Running OpenRecovery Script" and then reboots.
I'm going to quit now, as I am only making matters worse.....
========================
Update 4
I got TWRP to quit whatever it was doing.
Now, In TWRP > Wipe > Advanced Wipe, I cannot wipe or repair the Data partition. I see a message "Could not mount /data unable to find crypto footer". Trying to wipe the Davlik Cache fails, "Unable to mount /data, " Unable to mount storage".
========================
version-bootloader: 3.19.0.0000
version-baseband: 1.25.214500021.06G
version-main: 4.16.401.10
modelid: 0P6B12000
cidnum: 11111111
========================
I've bricked the phone and it looks permanent.
I found another thread where everyone was solving this issue running this command "mke2fs -T ext4 /dev/block/mmcblk0p8" in TWRP. I failed to notice that it was not an M8 device thread. The phone won't boot at all, and windows sees it as a usb drive.
Haste makes waste
Do you still have fastboot?
Check out the RUU collection here and grab what apllies to your device:
http://forum.xda-developers.com/ver...zw-m8-master-ruu-firmware-collection-t2946473
Make sure you use the HTC fastboot.exe from post 3
highplains914drifter said:
I was trying to apply the OTA update for 5.1 on my M8 converted to GPE 5.01, but had to update to the stock recovery, and found myself in the same situation with the "Decryption Unsuccessful" message.
Following Klayderpus' steps to recover, but I'm running into a few issues:
1) Windows not Ubuntu so some (many) of the commands do not apply.
2) The device is not responding to adb, although it was prior to the "upgrade". Fastboot is working.
3) TWRP was not on the device, in fact I never could get to the recovery after trying to install the stock recovery when I converted to GPE 5.01 many months ago
I have a fresh nandroid backup, so I am just trying to get the device running. Being without the phone is causing me great pain....
I upgraded the firmware to 4.16 and did the factory reset from the stock 4.16 recovery. The phone boots back to the "Decryption Unsuccessful" message.
I am not sure, but I think the next step for me to try is to install the GPE ROM from graffixnyc from the microSD card (need to find/buy that little SD adaptor)
Any help would be greatly appreciated!!
========================
Update;
Recovery does not see the SD card , so I won't be able to install from there.
I'll try flashing TWRP recover to see if that will show the contents of the external card
========================
Update 2:
TWRP does see the external card, but the install failed as it is unable to mount /data and /storage.
I'm out of ideas....HELP!!
========================
Update 3
I noticed the "factory reset" in HBOOT and thought I'd try that instead of the "Wipe" in TWRP, but only made things worse.
Now the phone comes up to the "Decryption Unsuccessful" where I can then take the reset to get it into TWRP recover
TWRP comes up directly into a screen where it's "Running OpenRecovery Script" and then reboots.
I'm going to quit now, as I am only making matters worse.....
========================
Update 4
I got TWRP to quit whatever it was doing.
Now, In TWRP > Wipe > Advanced Wipe, I cannot wipe or repair the Data partition. I see a message "Could not mount /data unable to find crypto footer". Trying to wipe the Davlik Cache fails, "Unable to mount /data, " Unable to mount storage".
========================
version-bootloader: 3.19.0.0000
version-baseband: 1.25.214500021.06G
version-main: 4.16.401.10
modelid: 0P6B12000
cidnum: 11111111
========================
I've bricked the phone and it looks permanent.
I found another thread where everyone was solving this issue running this command "mke2fs -T ext4 /dev/block/mmcblk0p8" in TWRP. I failed to notice that it was not an M8 device thread. The phone won't boot at all, and windows sees it as a usb drive.
Haste makes waste
Click to expand...
Click to collapse
If you have fastboot do the following commands
Fastboot oem task 28
Fastboot oem task 29
Then try to flash your rom or ruu.
dottat said:
If you have fastboot do the following commands
Fastboot oem task 28
Fastboot oem task 29
Then try to flash your rom or ruu.
Click to expand...
Click to collapse
No Fastboot, nothing. Device was charged, but now acts as if the battery is dead. the Power button does nothing even after a long press.
Bad day...
Klayderpus said:
I previously ran LolliGPE but was long overdue for an update. I downloaded the latest version and copied the image to my phone and flashed the ROM. I decided to go try a dirty install first to see if I could keep everything I had, since I had already been running a previous version and after reviewing the changelog did not see anything recommending to wipe clean. After installing successfully, Android asked me to enter my password to decrypt my data (I don't recall ever encrypting my data?), and so I did. It then told me that my password was right, but the data was corrupt, and presented me a button to reset my phone. The button redirected me to recovery and automatically attempted to wipe /data and then re-mount it, but the wipe failed. I rebooted again with the same issue, same failed attempt to wipe. I went to install the zip again, and this time do a full wipe, but it was unable to mount my phone's storage nor my SD card. I am not able to mount either at all now.
What's the best course of action? I'd like to retain as much as I can and avoid wiping all of the internal storage clean. Is there a simpler fix to this or am I doomed?
HBOOT: 3.19.0.0000
RADIO: 1.09.20.0926
OS: 3.28.605.4
EDIT: For anyone else having a problem like this that at least wants to get their data back, here's what you should do (I assume you know how to work with Linux!):
Make sure you have the latest version of TWRP and ADB.
Boot the phone into recovery mode and connect the phone to your computer via USB
Run "ls -al /dev/block/platform/msm_sdcc.1/by-name" and check the output. Make a note of the partition marked "userdata" - for me, it was /dev/block/mmcblk0p48.
Either: simply use adb pull to copy this file to your computer (this will require about 26 gigs of space), or attempt to mount the file. To use adb pull, execute "adb pull /dev/block/<ID> ./data" (ID being what you marked down). Your data partition will be copied to /data. To mount, use "mount -t ext4 /dev/block/<ID> /userdata". Whatever's left of your data will be on your phone's new /userdata folder.
Use ADB to pull what files you want from /userdata. If you pulled the partition, skip this step.
If you copied the files you wanted over, you're done. If you pulled the entire partition, you're going to want to try and mount it. On Windows, there are various tools to mount Linux partitions, a quick Google will find some good ones. However, if the data is corrupt, it will not work. I recommend attempting to repair the partition on linux, with the command "e2fsck -f -y /path/to/data", replacing the path to your data file as necessary. Once done, run "mount -t ext4 /path/to/data /mnt/data", replacing the paths as necessary.
Once mounted, you can access your data wherever it was mounted. If e2fsck appeared to fix many errors, chances are most of your data will be in the lost+found folder, and you'll need to sort through this yourself. If you're lucky, then your data will be intact and readily usable. Internal SD card data is located at ./media/0.
To fix the partitions and get Android back up and running, you need to install the latest firmware, format your data in TWRP, factory reset, and then flash a ROM again. Here's what I did to do that, without an SD card. If you have an SD card, simply copy your ROM zip to the SD card and skip the final steps:
Make sure you have the latest version of TWRP and ADB, and download the latest copy of the firmware (check the development forum here).
Boot the phone (doesn't matter to what) and run adb reboot bootloader. When your phone reboots, double-check by running fastboot reboot-bootloader.
Put your phone in RUU mode with fastboot oem rebootRUU. The phone will restart and the HTC logo will come up.
Wait a couple seconds, then run fastboot flash zip firmware.zip, where firmware.zip is the firmware you want to flash.
The first time you do this, it will fail saying something like "FAILED (remote: 90 hboot pre-update! please flush image again immediately)". Ignore this, run the last command again: fastboot flash zip firmware.zip
The progress bar will appear and begin filling. Wait until fastboot is finished flashig it (the progress bar may not fill completely), wait an extra 5 seconds or so, and then do fastboot reboot.
The phone will reboot. Android will still be messed up, but you can verify the partitions are in working order by checking adb shell cat /proc/emmc.
Once you know the partitions are working, get back into TWRP/recovery: adb reboot recovery
Format /data and wipe /cache, /data, dalvik/art cache, etc (factory reset). You will lose the contents of your internal storage and everything else.
If you don't have the ROM zip on an sd card, make sure the zip is in the same directory as adb and run adb push rom.zip /sdcard/rom.zip, where rom.zip is the ROM. You can also copy it to the external sd by swapping /sdcard/rom.zip with /external_storage/rom.zip.
Once copied, reboot into recovery and flash the zip. Back to normal!
Click to expand...
Click to collapse
Hey
I have a HTC one m7 verizon & same problem storage decryption failed. See my case here in below post. And please tell me if anything possible. Please......
http://forum.xda-developers.com/verizon-htc-one/help/storage-encryped-htc-one-m7-vzw-s-t3279869

To CM13 users. DO NOT USE ENCRYPTION. details and fix if you've already done inside

just fyi. cm13 has no option to decrypt once you've encrypted it, twrp cannot mount encrypted drives (atleast most of the time i've heard a few say it can that's why i tried it but 2.8.7.0 doesn't even ask for a password or try to decrypt in my case)
so pretty much once you encrypt your stuck with the rom you have unless you have this magical twrp that asks for decrypt password.
also to make things worse, twrp can't format and cm13 changes the sdcard path so although it sees the external sd it can't flash files from it (atleast on g3)
so the only way to fix is to boot into android, backup your internal storage to sdcard or computer
reboot into twrp run a manual format on /data/ from terminal command, then reboot, copy your twrp backup to internal sd, go back to recovery and flash backup, then copy internal sdcard files back to internal drive (from sd or computer backup)
the command to format is the following
mke2fs -T ext4 /dev/block/mmcblkXpXX (NOTE: REPLACE THE XpXX with the proper values for your device) you can find these values by asking in your device forums, or downloading a partition info app that will tell you and i'm sorry i can't remember the one i used, but this is the best way to be sure because even diff device variants sometimes have diff partition tables based on phone provider.
*edit* just for personal peace of mind i remind everyone that every device is diff and i cannot guarantee positive results but this 100% worked for me everything is back to normal.
I did this a few months back and ended up flashing factory images via adb and starting all over again which sucked
Very useful information. :good:
TWRP v3.0.0 can use the adopted storage device (encrypted SD card) now.
Seems it's been fixed because I am successfully using cm13 with twrp 3.0, albeit with visible performance loss.
I just want to say thanks a lot for this. I can once again mount my /data partition.

[Nook HD/HD+] REPIT: enlarge /system and /data partitions without wiping your data

you can now use REPIT to increase the size of the /system partition on the Nook HD/HD+ to 1 GiB to support the newest roms with gapps. while you do this, you can optionally also add 0.5 GiB of free space to /data. the extra space is repurposed from partitions that go unused in custom roms.
see the details here:
https://github.com/Lanchon/REPIT/issues/59
full doc for REPIT is here, please read it:
https://github.com/Lanchon/REPIT
additionally, this note can be interesting for users and rom developers alike:
https://github.com/Lanchon/REPIT/issues/56
this is for Nook HD+ only, but HD owners can request a port of REPIT by following the instruction in the doc page.
UPDATE: a port request was submitted by BultoPaco and now REPIT supports the Nook HD too.
thanks!
Lanchon said:
you can now use REPIT to increase the size of the /system partition on the Nook HD+ to 1 GiB to support the newest roms with gapps. while you do this, you can optionally also add 0.5 GiB of free space to /data. the extra space is repurposed from partitions that go unused in custom roms.
see the details here:
https://github.com/Lanchon/REPIT/issues/59
full doc for REPIT is here, please read it:
https://github.com/Lanchon/REPIT
additionally, this note can be interesting for users and rom developers alike:
https://github.com/Lanchon/REPIT/issues/56
this is for Nook HD+ only, but HD owners can request a port of REPIT by following the instruction in the doc page.
thanks!
Click to expand...
Click to collapse
This is great. Would also be helpful if you included information on how to go to stock partition layout, but big thanks indeed.
ajislav said:
This is great. Would also be helpful if you included information on how to go to stock partition layout, but big thanks indeed.
Click to expand...
Click to collapse
added to the github note.
Following the guide \https://github.com/Lanchon/REPIT/issues/59 to increase /data,
"you can also add approximately 0.5 GiB to /data"
Does it make difference if the Ovation is 16gb or 32gb model
king200 said:
Following the guide \https://github.com/Lanchon/REPIT/issues/59 to increase /data,
"you can also add approximately 0.5 GiB to /data"
Does it make difference if the Ovation is 16gb or 32gb model
Click to expand...
Click to collapse
this was made and tested with the 16GB version. in all other devices REPIT has been smart enough to adapt to these differences automatically. it should work with the 32GB version. but if there's anything strange or too different, REPIT will bail instead of messing up your device.
Ext4 only?
Mine returns an error not able to read superblock on data even if I am only trying to expand system. my data and cache are f2fs. Is that the problem? I'll cut/paste the log here when I'm back on my ovation.
This with the 3.0.2 twrp currently in experimental folder
Update: OK, went back and reread the general instructions. Looks like doesn't work for f2fs. I did convert cache to ext4 and set data=same, but still returned error.
Using Android 7 and latest TWRP on Nook HD+. Downloaded repit file zip, renamed as per instructions & downloaded delete stock rom zip. Flashed delete stock rom in twrp w/o problems. Flashed renamed repit file and Got error 1 after flashing. Told to reboot and flash from tmp folder and also got error 1. The error related to unable to reload partition table and unable to mount all partitions. Info from file manager shows using 5.11 GB out of 27.01 GB of internal storage
Any ideas???.
I just did this today.
I tried to flash lanchon-repit-XXXXXXXX-factory=same-system=1G-cache=112M+wipe-data=same-ovation.zip using twrp, but it gave me errors. I tried to follow the instructions to flash the file from the /tmp folder that it has copied, but it still gave me errors about /emmc partition not able to be umounted. I tried this a few times according to instructions posted on github but still no-go.
This is how I got around the issue:
I went into TWRP's Advanced menu and open up Terminal. Then I did
umount -a
There will be some errors that some partition cannot be umounted (eg. /tmp). I ignored that.
Now, I flashed the REPIT script again from /tmp folder. This will now run the script, but at the end, it will fail with the error about not being able to write /etc/fstab file. I ignored that (Android's file is /fstab.ovation).
Then I went ahead and flashed a cm13 build as usual. After rebooting into cm13, I opened up terminal and then did a df. I could see that /system partition had then expanded to 1034136 1-K blocks, which was roughly 1GB. Hoping that the partition will stay, I then flashed a gapps package, and it went through. On rebooting, I found that about 73% of the /system partition was used (it was around 55% without gapps). So, everything seems to look good.
Hope that helps.
tsoheq said:
I just did this today.
I tried to flash lanchon-repit-XXXXXXXX-factory=same-system=1G-cache=112M+wipe-data=same-ovation.zip using twrp, but it gave me errors. I tried to follow the instructions to flash the file from the /tmp folder that it has copied, but it still gave me errors about /emmc partition not able to be umounted. I tried this a few times according to instructions posted on github but still no-go.
This is how I got around the issue:
I went into TWRP's Advanced menu and open up Terminal. Then I did
umount -a
There will be some errors that some partition cannot be umounted (eg. /tmp). I ignored that.
Now, I flashed the REPIT script again from /tmp folder. This will now run the script, but at the end, it will fail with the error about not being able to write /etc/fstab file. I ignored that (Android's file is /fstab.ovation).
Then I went ahead and flashed a cm13 build as usual. After rebooting into cm13, I opened up terminal and then did a df. I could see that /system partition had then expanded to 1034136 1-K blocks, which was roughly 1GB. Hoping that the partition will stay, I then flashed a gapps package, and it went through. On rebooting, I found that about 73% of the /system partition was used (it was around 55% without gapps). So, everything seems to look good.
Hope that helps.
Click to expand...
Click to collapse
I tried following this unsuccessfully - any chance of an idiot's walkthrough?
I got as far as running the report file from tmp with no errors but when trying to flash Pico gapps I'm told it runs out of space. so close and yet I'm too thick to know what I'm doing wrong
gascomm said:
I tried following this unsuccessfully - any chance of an idiot's walkthrough?
I got as far as running the report file from tmp with no errors but when trying to flash Pico gapps I'm told it runs out of space. so close and yet I'm too thick to know what I'm doing wrong
Click to expand...
Click to collapse
What was the partition size when you do a "df" in a terminal? If it did expand, then the df command should show you the expanded /system partition size.
prsa01 said:
Mine returns an error not able to read superblock on data even if I am only trying to expand system. my data and cache are f2fs. Is that the problem? I'll cut/paste the log here when I'm back on my ovation.
This with the 3.0.2 twrp currently in experimental folder
Update: OK, went back and reread the general instructions. Looks like doesn't work for f2fs. I did convert cache to ext4 and set data=same, but still returned error.
Click to expand...
Click to collapse
f2fs partitions cannot be resized without wiping on planet earth. if there exists an f2fs resize tool, only aliens have it.
you can can wipe data (not recommended) or you can flash the standard repit to simply grow /system with /cache if you want. /data will not be enlarged of course.
f2fs on /cache is stupid, don't ever do it!!! only /data should be f2fs.
acr123 said:
Using Android 7 and latest TWRP on Nook HD+. Downloaded repit file zip, renamed as per instructions & downloaded delete stock rom zip. Flashed delete stock rom in twrp w/o problems. Flashed renamed repit file and Got error 1 after flashing. Told to reboot and flash from tmp folder and also got error 1. The error related to unable to reload partition table and unable to mount all partitions. Info from file manager shows using 5.11 GB out of 27.01 GB of internal storage
Any ideas???.
Click to expand...
Click to collapse
this has been explained to death now, read the REPIT docs for the solution. create a github issue WITH THE REQUIRED INFO (as detailed in the docs) if you need official support.
tsoheq said:
I just did this today.
I tried to flash lanchon-repit-XXXXXXXX-factory=same-system=1G-cache=112M+wipe-data=same-ovation.zip using twrp, but it gave me errors. I tried to follow the instructions to flash the file from the /tmp folder that it has copied, but it still gave me errors about /emmc partition not able to be umounted. I tried this a few times according to instructions posted on github but still no-go.
This is how I got around the issue:
I went into TWRP's Advanced menu and open up Terminal. Then I did
umount -a
There will be some errors that some partition cannot be umounted (eg. /tmp). I ignored that.
Now, I flashed the REPIT script again from /tmp folder. This will now run the script, but at the end, it will fail with the error about not being able to write /etc/fstab file. I ignored that (Android's file is /fstab.ovation).
Then I went ahead and flashed a cm13 build as usual. After rebooting into cm13, I opened up terminal and then did a df. I could see that /system partition had then expanded to 1034136 1-K blocks, which was roughly 1GB. Hoping that the partition will stay, I then flashed a gapps package, and it went through. On rebooting, I found that about 73% of the /system partition was used (it was around 55% without gapps). So, everything seems to look good.
Hope that helps.
Click to expand...
Click to collapse
you didn't need to reflash system of course, REPIT keeps the data as explained in the docs. glad it worked.
btw, it is enough to follow the docs about unmounting partitions using the TWRP UI.
gascomm said:
I tried following this unsuccessfully - any chance of an idiot's walkthrough?
I got as far as running the report file from tmp with no errors but when trying to flash Pico gapps I'm told it runs out of space. so close and yet I'm too thick to know what I'm doing wrong
Click to expand...
Click to collapse
read the docs, everything is there. you can't be helped if you don't provide the REPIT log. (that is also stated in the docs, btw.)
Can confirm this works on 32gb ovation. Just finished after a bit of fighting. As always, YMMV but this was the process I followed:
Ran the delete file. Success.
Ran the resize file, errors.
Ran the resize file from tmp, errors.
Ran "umount -a" from terminal then reran resize from tmp, errors.
I found both my data and cache partitions were f2fs. Formatted both back to ext4 since f2fs cannot be resized. This was easy for me as I had all the important stuff backed up but be sure to back your data up before doing this, it will wipe the partition.
After the wipe I loaded one file on to the data drive, the renamed resize file.
Tried running the resize file. Unmount errors and the run from tmp message.
Went into terminal, ran "umount -a" 3 times. The first I got several errors, the second and third only one.
Went into tmp and ran the file. After realizing the process was working and was going to take a while, I plugged up the charger (wall, not pc) and let it set overnight.
Came back this morning to one error, the fstab error. No unmount errors though.
Remounted the drives in twrp and ran "df" in terminal. 1gb system.
Rebooted and ran through the setup
Reloaded my roms/gapps folder manually via USB
Rebooted to TWRP and ran opengapps pico. Completed succesfully.
Rebooted and had play store in apps. Logged into gapps.
Thank you Lanchon, this helps bring life back to an old love.
asksmity said:
Can confirm this works on 32gb ovation. Just finished after a bit of fighting. As always, YMMV but this was the process I followed:
Ran the delete file. Success.
Ran the resize file, errors.
Ran the resize file from tmp, errors.
Ran "umount -a" from terminal then reran resize from tmp, errors.
I found both my data and cache partitions were f2fs. Formatted both back to ext4 since f2fs cannot be resized. This was easy for me as I had all the important stuff backed up but be sure to back your data up before doing this, it will wipe the partition.
After the wipe I loaded one file on to the data drive, the renamed resize file.
Tried running the resize file. Unmount errors and the run from tmp message.
Went into terminal, ran "umount -a" 3 times. The first I got several errors, the second and third only one.
Went into tmp and ran the file. After realizing the process was working and was going to take a while, I plugged up the charger (wall, not pc) and let it set overnight.
Came back this morning to one error, the fstab error. No unmount errors though.
Remounted the drives in twrp and ran "df" in terminal. 1gb system.
Rebooted and ran through the setup
Reloaded my roms/gapps folder manually via USB
Rebooted to TWRP and ran opengapps pico. Completed succesfully.
Rebooted and had play store in apps. Logged into gapps.
Thank you Lanchon, this helps bring life back to an old love.
Click to expand...
Click to collapse
you are welcome!
lol! why not read the docs???
if you wanted to change the file system in /data to ext4 all you needed was to change:
-cache=32M+wipe-data=max
to:
-cache=32M+wipe-data=max+wipe
which is the same as:
-cache=32M+wipe+ext4-data=max+wipe+ext4
given that ext4 is the default fs for /data and /cache.
using -data=max+wipe would have been so much faster than moving a huge empty partition around!!! it would have finished the operation in around a minute. not to mention adding less wear and tear to the emmc of your aging device.
the file system in /cache was never a problem, you did not need to change it back to ext4. you were using -cache=32M+wipe which means that REPIT would resize/move the partition without keeping its contents (wiping) and without regard for the previous file system type and state (ie, whether it had errors, etc).
if you wanted to enlarge /data AND ALSO KEEP /DATA AS F2FS, all you needed was to change:
-cache=32M+wipe-data=max
to:
-cache=32M+wipe-data=max+wipe+f2fs
f2fs cannot be resized, but it can be moved/resized while wiping. (ie, the partition can be recreated from scratch with the new size, if data retention is not required.) this is all explained in the docs, seriously lol...
https://github.com/Lanchon/REPIT#partition-types
using an f2fs /cache partition is dumb and completely useless. all who have f2fs /cache are adviced to change /cache back to ext4 and leave it that way.
regarding the umount stuff, maybe your TWRP has an issue, but i'm willing to bet that if you followed instructions to the letter, you wouldn't have needed all that. the guy that requested the ovation port of repit (look for the github issue (closed now)) and first ran the test version did not have any of this issues. the TWRP he used is documented in the port request.
anyway, thank you very much for documenting what worked for you!
Lanchon said:
you are welcome!
lol! why not read the docs???
if you wanted to change the file system in /data to ext4 all you needed was to change:
-cache=32M+wipe-data=max
to:
-cache=32M+wipe-data=max+wipe
which is the same as:
-cache=32M+wipe+ext4-data=max+wipe+ext4
given that ext4 is the default fs for /data and /cache.
using -data=max+wipe would have been so much faster than moving a huge empty partition around!!! it would have finished the operation in around a minute. not to mention adding less wear and tear you the emmc of your aging device.
the file system in /cache was never a problem, you did not need to change it back to ext4. you were using -cache=32M+wipe which means that REPIT would resize/move the partition without keeping its contents (wiping) and without regard for the previous file system type and state (ie, whether it had errors, etc).
if you wanted to enlarge /data AND ALSO KEEP /DATA AS F2FS, all you needed was to change:
-cache=32M+wipe-data=max
to:
-cache=32M+wipe-data=max+wipe+f2fs
f2fs cannot be resized, but it can be moved/resized while wiping. (ie, the partition can be recreated from scratch with the new size, if data retention is not required.) this is all explained in the docs, seriously lol...
https://github.com/Lanchon/REPIT#partition-types
using an f2fs /cache partition is dumb and completely useless. all who have f2fs /cache are adviced to change /cache back to ext4 and leave it that way.
regarding the umount stuff, maybe your TWRP has an issue, but i'm willing to bet that if you followed instructions to the letter, you wouldn't have needed all that. the guy that requested the ovation port of repit (look for the github issue (closed now)) and first ran the test version did not have any of this issues. the TWRP he used is documented in the port request.
anyway, thank you very much for documenting what worked for you!
Click to expand...
Click to collapse
Very good info above!
I could have done that as well, and probably should have. But there was conformation in the thread that the options I renamed to worked. So for me being a "part timer" I wanted to make sure that I was not the reason for the issue (ie: fat fingering an extra letter in one of the options or misplacing an option). I have a bad habit of screwing things up.
As a recommendation, it might be a good idea to include some of these sample options in you main thread and explain what they do. I know I know, docs docs docs but it helps us roughians and would probably keep the issue posts down.
Thanks again for the tool and the feedback!
I read all the docs and used Lanchon's tip above to wipe /data and retain f2fs file structure. Got an error running it from my SD card but, when I ran it from the internal tmp folder (as instructed), it worked perfectly. Thank you @Lanchon! I'm going to request a Hummingbird version so I can have both of my Nooks optimized?
Sent from my Nook HD using Tapatalk
Is this supposed to provide more space for Gapps? I ran this and it worked with no errors, but I can't install any different sized gapps than nano.
EDIT: nano is still too big too.
Jazviper said:
Is this supposed to provide more space for Gapps? I ran this and it worked with no errors, but I can't install any different sized gapps than nano.
EDIT: nano is still too big too.
Click to expand...
Click to collapse
read:
https://github.com/Lanchon/REPIT/issues/56
tl;dr: you can fix this by pressing the resize partition button on twrp.

Categories

Resources