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

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.

Related

How to format encrypted /data in CWM

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

[Q] Move /data to SD card

I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Binero said:
I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Click to expand...
Click to collapse
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Jason Hyunwoo said:
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Click to expand...
Click to collapse
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Binero said:
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Click to expand...
Click to collapse
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Jason Hyunwoo said:
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Click to expand...
Click to collapse
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Binero said:
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Click to expand...
Click to collapse
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Jason Hyunwoo said:
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Click to expand...
Click to collapse
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Binero said:
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Click to expand...
Click to collapse
or you could edit look at other *.rc files!
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
sndsnd said:
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
Click to expand...
Click to collapse
I want to mount my sd card to my /data. That simply creates a symbolic link.
Jason Hyunwoo said:
or you could edit look at other *.rc files!
Click to expand...
Click to collapse
There is only 2 rc files, and one of them is specific to my recovery image.

[GUIDE] Convert /data to f2fs with TWRP 2.8.+ [TF700T]

Prerequisites:
You need to be on the 10.6.1.14.10 bootloader
You need to know how to flash a recovery
Some background reading on f2fs: http://en.wikipedia.org/wiki/F2FS
Step 1:
Backup all your data off the tablet because it will get wiped!!
Step 2:
Install a recovery that supports conversion to the f2fs file system
You can use the official TWRP 2.8.x from here:
http://forum.xda-developers.com/tra...overy-kang-twrp-tf700t-2-8-x-xarea51-t3049395
Do not use TWRP 2.8.5 - it has a bug with the f2fs conversion - or 2.8.6 for that matter. It has another bug: won't reboot to anything from recovery...
For Transformer users I would highly recommend to install @lj50036 TWRP Kang version from here:
http://forum.xda-developers.com/tra...overy-kang-twrp-tf700t-2-8-x-xarea51-t3049395
His Kang TWRP allows you to format/convert/backup external partitions or entire cards which will come in very handy for data2sd or rom2sd users.
It even supports the dock SD!
Step 3
Flash your chosen recovery in fastboot and reboot.
Optional but recommened
Since you are at it anyway I would recommend you format your /data partition before you convert to f2fs. The TWRP build-in "Format data" option does a "a secure erase" which trims and wipes every single block. A great way to start with a fresh and clean data partition. This process takes time - could be upwards of 60 minutes - do not interrupt it!!! You find the option under the Wipe menu
Step 4:
Enter TWRP, choose Wipe > Advanced Wipe
To Convert INTERNAL /data to f2fs
Check the box for "data"
Tap "change or repair file system"
Tap "Change file system"
Tap "F2FS"
Swipe the button
DATA2SD/ROM2SD users only:
To Convert EXTERNAL /data to f2fs (with lj's Kang TWRP TF700T only - official TWRP does not support this)
Check the box for Ext/data
Proceed as above
Step 5
Go back to TWRP Home screen, and reflash your ROM - which you have stored somewhere you did NOT wipe with the preceding steps!! Like: your microSD
Notes:
With /data on f2fs you need to run your ROM with a kernel that supports that file system. Read the OP of your ROM thread
Convert ONLY /data to f2fs. Do NOT convert /system (or anything else for that matter)
If you forma /data back to ext4 for any reason it will take up to 90 minutes. Do not interrupt it!!!
DATA2SD/ROM2SD ONLY
If you have the official TWRP installed and do not want to flash lj's Kang TWRP, you can - as always - use the data2sd1.zip/rom2sd1zip to have TWRP act on your external partitions.
MINE ......
Cool!
berndblb said:
Convert EXTERNAL /data to f2fs (lj's Kang TWRP TF700T only)
Check the box for Ext/data
Proceed as above
5. Step
Go back to TWRP Home screen, and reflash your ROM - which you have stored somewhere you did NOT wipe with the preceding steps!!
Click to expand...
Click to collapse
Convert EXTERNAL /data to f2fs
-- > ??? Is this a folder or a partition as stated in " post #2 Using GParted to setup a micro SD for ROM2SD or DATA2SD support"
reflash your ROM - which you have stored somewhere you did NOT wipe with the preceding steps!!
--> ??? It must be on external, I presume?
Where could it be located? If on external i suppose it is on:
--> ??? 14. FAT 32 : Size 16GB – this will be /dev/sdc1 in gparted and will be your sdcard for storage in Android
eRPeeX said:
Convert EXTERNAL /data to f2fs
-- > ??? Is this a folder or a partition as stated in " post #2 Using GParted to setup a micro SD for ROM2SD or DATA2SD support"
Click to expand...
Click to collapse
It's the second partition if you are running data2sd/rom2sd
data2sd:
1. partition fat32 = your microSD storage
2. partition f2fs (or ext4) = /data
rom2sd
1. partition fat32 = microSD storage
2. partition f2fs or ext4 = /data
3. partition ext4 = /system
[*]reflash your ROM - which you have stored somewhere you did NOT wipe with the preceding steps!!
--> ??? It must be on external, I presume?
Click to expand...
Click to collapse
The fat32 partition on the microSD (or just plain microSD if you don't run data2sd/rom2sd) is probably the safest place, yes.
Where could it be located? If on external i suppose it is on:
--> ??? 14. FAT 32 : Size 16GB – this will be /dev/sdc1 in gparted and will be your sdcard for storage in Android
Click to expand...
Click to collapse
Yes
berndblb said:
It's the second partition if you are running data2sd/rom2sd
data2sd:
1. partition fat32 = your microSD storage
2. partition f2fs (or ext4) = /data
rom2sd
1. partition fat32 = microSD storage
2. partition f2fs or ext4 = /data
3. partition ext4 = /system
The fat32 partition on the microSD (or just plain microSD if you don't run data2sd/rom2sd) is probably the safest place, yes.
Yes
Click to expand...
Click to collapse
So for f2fs you always need a Gparted formatted SD.
f2fs only on internal /Data is not possible?
Sure it is. Read step 4
I just only converted Internal /data to f2fs.
Flashed beta 4.
Seems to be possible to have f2fs only on internal.
eRPeeX said:
f2fs only on internal /Data is not possible?
Click to expand...
Click to collapse
berndblb said:
Sure it is. Read step 4
Click to expand...
Click to collapse
eRPeeX said:
I just only converted Internal /data to f2fs.
Flashed beta 4.
Seems to be possible to have f2fs only on internal.
Click to expand...
Click to collapse
Where does it say you can't????????????????
Edit: Ahhh! I see where your thinking went off track. You thought you had to convert both internal and external data for f2fs to work, right?
Nope - external data only concerns data2sd/rom2sd users. Edited OP to make that clear - I hope.
berndblb said:
Where does it say you can't????????????????
Edit: Ahhh! I see where your thinking went off track. You thought you had to convert both internal and external data for f2fs to work, right?
Nope - external data only concerns data2sd/rom2sd users. Edited OP to make that clear - I hope.
Click to expand...
Click to collapse
Yes, you could read my mind.
Just thought I'd share my experience, in case someone else makes the same mistake I did ...
I put the card into my computer and ran gparted to create the partitions. I fiddled with it for a while, resizing partitions while trying to decide how much space to allocate to each and what format to use for /data. I ended up with what graphically looked like the right layout:
I---sdcard---II--------------data--------------II---system---I
The rom2sd install seemed to go fine (Crombi-kk at the time). However I couldn't get it to boot.
Turns out in my fiddling I managed to get the second two partition table entries switched - partition 1 was fine, partition 2 pointed to the rightmost block graphically, parition 3 pointed to the middle block. I don't really know whether it was the installer or TWRP that got confused, or if it installed ok but the boot got confused.
In any case, deleting the partitions and re-creating them in order worked.
I have Zombi-X on a TF700T. I picked the F2FS option during install but didn't realize I had to have the /data partition formatted to F2FS first. So I'd like to minimize my update time. Can you tell me if this is how to proceed?
I have TWRP 2.8.4.0 already installed,
When you say backup data do you mean do a TWRP backup of the system/data/boot or just the /data section?
Or do you mean copy files to an SD card or PC?
I would then do the "optional" format of the /data partition using the existing data format ext4.
Then choose Wipe > Advanced Wipe
Check the box for "data"
Tap "change or repair file system"
Tap "Change file system"
Tap "F2FS"
Swipe the button
"Go back to TWRP Home screen, and reflash your ROM"
Do I have to do this? I don't want to change anything, the original install had F2FS enabled?
If I do have to do it, do you mean TWRP "restore" the ROM backup (system/boot/data) or actually TWRP
"install" the ROM zip file?
Then I would TWRP "restore" the /data backup and the tablet would work like it did before the reformat or would I have to reinstall apps, photos etc.?
Thanks for your help.
The easiest would be if you nandroid system/boot/data to your microSD. You gotta have it off internal storage. Nothing in internal /data will survive a format.
Then do the formatting and convert to f2fs
Restore your nandroid
You may get a warning from TWRP that the nandroid is off a different file system but you can safely ignore it.
Now, I do not quite remember where in Aroma the f2fs option was, but I think it's on that page about data journaling... So I'm not sure what selecting that option in Aroma actually does and if it gets implemented when the preinit script finds an ext4 partition instead.
But you can try it. Just restore the nandroid, pay attention during boot and read the script under the penguins.
If then your nandroid doesn't run as expected, reflash the rom with the same options, then restore only data from the nandroid you made earlier (during restore just uncheck boot and system). That also would give you an identical installation to what you have now.
berndblb said:
The easiest would be if you nandroid system/boot/data to your microSD. You gotta have it off internal storage. Nothing in internal /data will survive a format.
Then do the formatting and convert to f2fs
Restore your nandroid
You may get a warning from TWRP that the nandroid is off a different file system but you can safely ignore it.
Now, I do not quite remember where in Aroma the f2fs option was, but I think it's on that page about data journaling... So I'm not sure what selecting that option in Aroma actually does and if it gets implemented when the preinit script finds an ext4 partition instead.
But you can try it. Just restore the nandroid, pay attention during boot and read the script under the penguins.
If then your nandroid doesn't run as expected, reflash the rom with the same options, then restore only data from the nandroid you made earlier (during restore just uncheck boot and system). That also would give you an identical installation to what you have now.
Click to expand...
Click to collapse
Perfect, thanks. I will let you know my results. Might be a few days away.
IIRC the option is to turn on/off data journaling (one or two "l"s?) on ext2/3/4 partitions, with a final option of "f2fs user" where journalling is unnecessary. But it will not automatically format to f2fs in any case.
Hello. Yesterday I rebuilt my TF700 from the ground up. My intent was to get to Zombi-Rom with data2sd, to get a performant system. Here's what I did:
- started with twrp 2.8.6.x and Zombi-Rom beta 6, internal data, nice but laggy
- created two partitions on my samsung class 10 microSD card using gparted: 1. FAT32 at approx 4GB, 2. F2FS at approx 24GB
- flashed lj's kang twrp 2.8.6.1 recovery to replace 'standard' twrp 2.8.6.x
- formatted internal data using the kang twrp to f2fs (but it only took a second?) (I think this step was unnecessary, I meant to go to data2sd...)
- i *think* i formatted the new f2fs partition on the ext sdcard again using kang twrp, but don't recall. Rem: it was formatted f2fs by gparted already...I may have assumed I didn't need to do it again.
- flashed Zombi-Pop Android 5.1 beta 6, choosing the only kernel which has _that in the name
-- choosing f2fs
-- choosging data2sd (the ultimate goal of the exercise - get rid of TF700's awful lags/freezes)
-- choosing overclock (said it was required since _that kernel is selected)
-- choosing rest of default options
However I find performance is worse? I am sure I have done something wrong.
I have no data to protect or worry about tryig to restore. Before I do it all over again, do the steps above look correct, or am I making a mistake somewhere?
Thanks in advance.
Some people - me among them - have reported that data2sd doesn't work that well with ZOMBi-POP anymore. I do not get any performance improvement out of it with the same card that did well on other roms.
Could also be just your specific card - hard to tell.
I see no mistakes in your procedure but did you at any point do the secure erase the "Format Data" option provides? Read the "Optional but recommended" section in the OP.
Try different kernels. I like the Omni kernel best so far.
So my advice is: format internal data, then convert it to f2fs again, flash the rom with the omni kernel and all tweaks.
My TF700 runs very well with those options but it's still slower than my TF701 or my HTC M8 (there's actually no comparison to the latter..) and it always will be.
This is a what - almost 3 year old device now. These roms improve it by 300% but nothing will turn the TF700 into a smooth-as-silk-under-any-circumstances device....
berndblb said:
Some people - me among them - have reported that data2sd doesn't work that well with ZOMBi-POP anymore. I do not get any performance improvement out of it with the same card that did well on other roms.
Could also be just your specific card - hard to tell.
I see no mistakes in your procedure but did you at any point do the secure erase the "Format Data" option provides? Read the "Optional but recommended" section in the OP.
Try different kernels. I like the Omni kernel best so far.
So my advice is: format internal data, then convert it to f2fs again, flash the rom with the omni kernel and all tweaks.
My TF700 runs very well with those options but it's still slower than my TF701 or my HTC M8 (there's actually no comparison to the latter..) and it always will be.
This is a what - almost 3 year old device now. These roms improve it by 300% but nothing will turn the TF700 into a smooth-as-silk-under-any-circumstances device....
Click to expand...
Click to collapse
Same here Bernd - I see no improvements with data2sd anymore on zombi-pop.
I think we got internal running as sweet as can be
Bernd and dags,
thanks for the input, and again for all the great work to get it running the way you and your teammates have. Wish I had your know-how. At any rate I re-built it as originally posted and it's now working well. Backed that up and am trying it on internal today.
One more, maybe trivial question - the version of Nova Launcher says 'mod'. I can't install any other wallpaper with it. (I use Nova all the time, never seen this before.) Do you know if there something in the mod that makes it the default zombi-rom wallpaper or nothing?

[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

[Q] How do I successfully Convert /data to F2FS from Ext4

Ok guys, just as the title states; I am having no luck in converting my /data filesystem to F2FS using TWRP versions 2.7.0.0 - 2.8.7.0 and its f***ing killing me as every other aspect of the tablet works flawlessly. I have modified many tablets/phones and I most definitely know what I am doing so hit me with whatever you've got and I will understand perfectly.
I am on the latest version of the bootloader and its unlocked
TWRP .2.8.7.0 recovery
flashed omni 5.1 and changed /data from ext3 to ext4
All diagnostic access points (Fastboot etc) work perfect and I've also enabled NVFLASH and have brickproofed myself using flatline.
Anytime I go to Repair/Change and choose F2FS for /data it simply fails and says the following
"Unable to wipe /data"
"Unknown MTP message Type 1"
"Error changing filesystem"
This has been for "EVERY" version of TWRP from 2.7 to Current 2.8.7.0 every time I try and I am about to break this thing over my leg.
I do not ever post unless I have done due diligence and combed/searched through the the forum using any string and phrase I can think of relating to the topic. All instructions which involve changing to F2FS within every post related to the topic have failed me. Absolutely ANY help on this would be GREATLY appreciated!!
i will share with you my experience with flashing the tf300t and formatting. everithing went smooth... just a lot of preparation...
firstly i flashed twrp 2.8.x.x from kang
http://forum.xda-developers.com/transformer-tf300t/development/recovery-twrp-t3046479
than i copyed all needed files to my external SD card:
image file katkiss 5.1 #25
superSu
gapps image file
and K.A.T tool apk
device buttery must be full..
After being sure that i have everything on my sd card i entered twrp recovery and went to wipe everything exept of external sd card.
second i went to format /data to f2fs file system
third i flashed Katkiss image
fourth SuperSU for root access
fifth gapps
sixth wipe delvick/cache
Everyything went smooth as silk... hope that this helps you..

Categories

Resources