Just ran a manual format of /data/ in twrp terminal cmd when do i know its done? PLZ - General Questions and Answers

i ran this command.
mke2fs -T ext4 /dev/block/mmcblk0p44
right now the screen says Writing superblocks and filesystem account information : 0/201(a bunch of rectangles here) (a bunch more rectangles)done
does the done at the end mean it's done? the reason i'm confused is the developer that recommended this command to format an encrypted drive said it would take hours... but it stopped there and appears to be doing nothing now? is it done or should i wait longer?
the reason i'm confused is formats are usually fast because they just rewrite the partition table i thought? or is this a full format where it writes 0's to the entire drive?
plz answer if anyone knows how to tell when this format is done. i can post entire log of format if needed.

KronicSkillz said:
i ran this command.
mke2fs -T ext4 /dev/block/mmcblk0p44
right now the screen says Writing superblocks and filesystem account information : 0/201(a bunch of rectangles here) (a bunch more rectangles)done
does the done at the end mean it's done? the reason i'm confused is the developer that recommended this command to format an encrypted drive said it would take hours... but it stopped there and appears to be doing nothing now? is it done or should i wait longer?
the reason i'm confused is formats are usually fast because they just rewrite the partition table i thought? or is this a full format where it writes 0's to the entire drive?
plz answer if anyone knows how to tell when this format is done. i can post entire log of format if needed.
Click to expand...
Click to collapse
nevermind i got brave and ran the regular format on /data/ and its all good. by the way this is how you can format an encrypted drive in twrp (since you will get a mounting error from usual wipe method). MAKE SURE you use the proper partition address though, the one that i have here is for LG G3 d852 only.
download a parition information app to check the address of your data partition before you try this command.
this is similar to doing a hard reset on a stock device, when you reboot it will look similar to a fresh install with some acceptions. note: every device is different i cannot guarantee anything

Related

[INFO] Clarification: reformatting ext partition

I'm posting this because I am seeing lots of confusion in this area.
Most of the guides found on this forum as well as answers given in the q/a section pertaining to this give the following advice for formatting/wiping a ext parition:
Code:
rm -rf /system/sd/*
Although this may fix a lot of problems it does not really reformat the partion.
"rm -rf" just means "remove(delete) --recursively(subfolders as well) --force(don't ask if ok)". This only deletes the files by removing the inode entries from the filesystem table.
To truly reformat and ensure there are no remnants on the partition you need to make a new filesystem on that partition. This will build a new inode table completely instead of just removing entries in the table.
Enter recovery console (filesystem should NOT be mounted when formatted)
Code:
mke2fs /dev/block/mmcblk0p2 #for ext2 partitions
mke2fs -j /dev/block/mmcblk0p2 #for ext3 partitions
"mke2f2" means "make extended2 filesystem"
"-j" means "add a journal"(ext2+journal=ext3)
Hope this helps
Printing this out right now this is a keeper
Thankyou
Thanks buddy...printing now...
Ok, even though I am just begining at Linux I do understand the difference here between the 2 methods (its like the quick format option under windows). My question is, does it matter? Can you explain why the quick method may be detramental or unsafe.
Thanks for the advice dumfuq, but what if you have a ext4 partition?
Total Noob:
I've just been removing the partition and creating a new one.. is that just as effective (obviously the longer route)?
Also, how would you go about reformatting a linux-swap partition? Again, I've just been removing and recreating every time I flash.. I realize this isn't the fastest way.
Thanks a lot. This is very helpful.
Baldyman1966 said:
Ok, even though I am just begining at Linux I do understand the difference here between the 2 methods (its like the quick format option under windows). My question is, does it matter? Can you explain why the quick method may be detramental or unsafe.
Click to expand...
Click to collapse
I don't think just deleting the files is detrimental or unsafe...its just not formatting. For the most part it doesn't matter but if you want a fresh filesystem make a new one.
Thanks for the advice dumfuq, but what if you have a ext4 partition?
Click to expand...
Click to collapse
It should be
Code:
mke2fs -T ext4 /dev/block/mmcblk0p2
But I haven't tried it
I've just been removing the partition and creating a new one.. is that just as effective (obviously the longer route)? Also, how would you go about reformatting a linux-swap partition? Again, I've just been removing and recreating every time I flash.. I realize this isn't the fastest way
Click to expand...
Click to collapse
Yup...just as effective.
For swap
Code:
mkswap /dev/block/mmcblk0p3
But I don't think it is usually necessary to remake the swap after the initial creation (could be wrong on that though and I guess it can't really hurt)
This thread should be listed in the "Informative Links" sticky
simliarly, how would you go about removing the entire ext3 partition, so reclaim that 500mb back into the fat32? i have a htc magic and no longer need apps2sd, so having a ext partition isnt neccesary in my case. i rather use that extra 500mb for media and storage.
is there a special command to do this? i dont want to reformat the entire card since i have a lot of stuff on my fat32. i was hoping there was an easy way. thanks for any advice!
NguyenHuu said:
simliarly, how would you go about removing the entire ext3 partition, so reclaim that 500mb back into the fat32? i have a htc magic and no longer need apps2sd, so having a ext partition isnt neccesary in my case. i rather use that extra 500mb for media and storage.
is there a special command to do this? i dont want to reformat the entire card since i have a lot of stuff on my fat32. i was hoping there was an easy way. thanks for any advice!
Click to expand...
Click to collapse
Not really.
To do this you have to modify the partition table. Personally I would just back up the data, use fdisk (available in recovery console) to delete old and create new partitions, use windows to format the new fat32 partition created with fdisk, and then restore the data.
However since you don't want to reformat, you could try using gparted(or even parted for that matter) to remove the ext3 partition and resize the fat32. Still probably want to backup first though. There are a few tutorials already that walk you through adding an ext3 partition without losing your fat32. It shouldn't be to hard to follow one of them and tweak the commands to remove ext3 and expand the fat32.
thanks for all the advice, i have removed the ext partitions and resize my fat32 successful without data lost. i backed up just in case too. thanks.

[Q] [ZTE V970M] Formatting [email protected] as ext4 and moving /data to it. Possible?

Hey guys
Recently I've got a ZTE V970M (MT6577) phone and so far it's awesome. However, some people have been asking for a way to extend the /data partition because some games are heavy 'n stuff. That's alright.
There is a method which resizes the partitions by altering the MBR on the EMMC and that way the /data partition ends up with 2GB (from [email protected]) + 512MB (the assigned for /data), but I want to do something different, without having to edit the MBR that way. Dunno, it's fishy imo.
My idea was to format [email protected] (which comes in vfat) as ext4 and then editing init.rc and change the partition mount points from [email protected] to [email protected]
If I do that without formatting, the phone boots but it asks for an encryption key. Reading on the net, it's not asking for an encryption key, it's the fallback mode for when it can't mount the /data partition and then it believes it's encrypted, but it isn't.
If I format the [email protected] to ext4 (mke2fs -T ext4 /dev/block/mmcblk0p6), parted shows it's on ext4 and all that shiz, but the phone seems to disconnect itself from ADB once it finishes booting, and hangs in bootloop. Since I can't ADB it, I don't know wtf is going on with the phone. Something tells me I'm close to reaching the goal though.
Looking on the net I found this useful link -> http://blog.kangkang.org/index.php/archives/242 which talks about extending /data the way I want to do (for the Tegra2 one, but it shouldn't matter). However, Chinese isn't my main or secondary language (lol) and google translate does an horrible job at translating it.
So, anyone got ideas on how to extend such partition? I just want to swap the normal /data partition with the internal SDcard partition, so in theory if I format it to ext4 and swap the mount points it should work, it's just a swap, but why it isn't?
Any ideas are greatly appreciated!
Thanks in advance!
- DARKGuy
I hate bumping but, nobody yet? I've seen this being done in other phones... any ideas?
I can't believe no one has an idea yet... come on, this is XDA... wtf is up?
Yeah, I wanna know this too. If formatting the EMMC on my Note1 to anything other that the FAT32 will help?

[GUIDE] Repartition your gpt partitioned device after custom rom install(Huawei Y6)

This guide was written for the Huawei y6 with a gpt partition table, mounts that use partition names not numbers and the userdata partition is the last one on disk however with a little adaption this should work for most gpt devices.
If you are unsure if your system uses partition names for the mount system look in /fstab."hardware" to see if your devices are labelled in the following manner. "/dev/block/bootdevice/by-name/system".
If the fstab file does not exist all is not lost look in your root directory at the .rc files for the command mounting system.
If you are unsure ask in the thread before doing anything. Better to ask than be stuck with a brick.
This guide covers modification to only system and userdata partitions but if you use great care the basics covered here will allow for modification to other partitions as long as you understand the risk and know that backups are your friend.
If you are unable to follow instructions and end up with a bricked device that is your own fault and attempts to blame me will be laughed at.
I obtained the attached parted binary from here
So you have flashed a custom ROM and without all the OEM bloatware you now have some unused free space in your system partition just sitting there gathering dust.
You are stuck with this space... Wrong.
You can repartition your device with a little paitence, time and work.
Read along if you are curious about how to get the space you deserve.
Prerequisites:
Free space (Duh).
The ability to follow instructions and to read ALL steps before you start so you know what your plan is.
An unlocked bootloader which you already have if you flashed a custom ROM.
A custom recovery (twrp preferred).
Parted binary (see attachment at the bottom of this post).
A computer with adb installed and working (there are many guides out there if you don't have it, Google is your friend).
A calculator (well I'm sure your computer has one but just so you know).
Some knowledge using terminal commands.
Risk of Bricking your device:
Low if you backup and can double check typing and calulations.
High if you can't do one of the above.
Because parted does not allow resizing of ext4 partitions you must delete partitions you want to change then recreate them.
All steps must be performed while in recovery because you are going to have to unmount any partition before you can change it.
Step 1:
Boot into recovery and make a backup. You MUST do this otherwise you will have nothing to restore.
Step 2:
Plug your device into your computer.
Copy the parted binary into your working directory on your PC.
Open your Command Prompt (Windows) or Terminal (Linux) and navigate to where adb is installed and you also put parted, or if you have adb in your PATH just go to where parted is.
Run
Code:
~ # adb devices
to ensure your device is present.
Run
Code:
~ # adb root
to get root priviliges.
Run
Code:
~ # adb push parted /sbin/parted
/sbin is in your devices PATH so you don't have to worry about typing /parted.
Run
Code:
~ # adb shell
Run
Code:
~ # chmod 755 /sbin/parted
If you get an error about a read only file system run
Code:
mount -o remount,rw /
then try again.
Step 3: Now you need to do some homework to find your sector size, sector count and how much free space you have available.
DO NOT shrink your filesystem to smaller than you need to operate. I always add at LEAST 50 mb to the used space however I recommend you think for the future, are you planning on restoring to stock?, are you planning on flashing OpenGAPPS?, are you planning on moving third party apps into the system?, are you planning on adding media or custom boot animations to the system?
So in the case below I would not make the partition any smaller than 800 MB.
Code:
~ # df
Filesystem Size Used Free Blksize
/system 1.2G 748.5M 441.8M 4096
/data 5.2G 3.5G 1.6G 4096
/cache 147.2M 4.7M 142.5M 4096
Now issue the following command to get your disks sector size in bytes remember to note this down.
Code:
~ # blockdev --getss /dev/block/mmcblk0
512
Time to use parted.
Issue the following commands to get some info on your current partitions.
"unit s" tells parted to show sectors instead of blocks, bytes etc.
Code:
~ # parted /dev/block/mmcblk0
(parted) unit s
(parted) print
Number Start End Size File system Name Flags
22 876562s 1191132s 314571s ext4 cache
23 1191133s 3990839s 2799707s ext4 system
24 3990840s 15269854s 11279015s ext4 userdata
Remember to not the partition number as you will need it later.
Remember to note your partition name with exact case, if you changed "system" to "System" you will have problems.
Also note the start sector of your system partition for the later steps.
Also note the end sector number for your userdata partition for the later steps.
Now get your calulator ready.
Some things to keep in mind here are that the number of sectors times sector size is the size of your partition in bytes and your starting sector must be 1 after the end of the previous partition.
So the following equation will give you the numbers you need.
Desired size in MB * 1024 * 1024 / Sector Size = Number of sectors
Starting sector + Number of sectors - 1 = Last Sector
If you want a 1.1 Gb partition, you have 512 byte sectors and the starting sector is 1191133 you would then use the following equation.
1100 * 1024 * 1024 / 512 = 2252800
1191133 + 2252800 - 1 = 3443932
Step 4:
Now using the info you have gathered you can change your partitions.
So I would issue the following commands to delete, create and name the system partition with the size I want.
Code:
(parted) rm 23
(parted) mkpart 23 ext4 1191133 3443932
(parted) name 23 system
Now to resize the data partition.
You need to start with the first available sector after the end of system and end with the last available sector noted earlier.
Code:
(parted) rm 24
(parted) mkpart 24 ext4 3443933 15269854
(parted) name 24 userdata
Now that your partitions are all done you can exit parted with the following.
Code:
(parted) quit
Step 5:
Now restore the backup you made earlier.
If you get an error restoring which usually only happens if you have altered partition numbers just reboot back into recovery and restore then so the kernel gets to update its own info.
Reboot.
Congratulations you now have repartitioned your device.
Don't forget to thank this post if you are grateful.
Is there anything diferent to do about moderm mmcblkop14(/firmware)? I want to reduce it to 100 mb but i noticed its blocksize it's different from the others (others =4096, firmware=16384). I saw in your pictures you reduce it, so i will try it to do that. I have a nandroid so i hope this try works.
OK, i should probably been the first idiot to bricked his phone by reading a tutorial.
I need some help. I was trying to make this extra space and i have a few problems during the process.
First of all, in my case i have a partition 23 called cust, exactly the same in size with the cache. So i started with the cache calculating and then the other 3( 23 cust, 24 system, 25 userdata). For that moment i already made my nandroid, buy for some stupid reason I saved to my pc.
My problems came when i began with step 4. When i tried to put the cache it told me that it can't do it because it was in use. So i twrp y put on mount and desmounted that partition and then i could keep going. Same thing happened with Data partition, i did the same.
Finally, i did it all the tutorial, just needed to restore as it said in step 5 because i didn't have it in my phone. So i tried with adb push but nothing and i couldn't mount again those partition with twrp. Then, in a desperate move, i tried to reflash my cm rom, so i did that. And later, it bootloop with te huawei logo and i can´t flash a rom o restore my nandroid. It doesn't read a sdcard.
And now, when i see the script in twrp (sorry i don't know how is the name, i talking about the center botton in twrp) it appears in red "unable to mont '/data', '/system', '/cache'.
I don't know what to do, really, i need a hand.
beatLeo said:
OK, i should probably been the first idiot to bricked his phone by reading a tutorial.
I need some help. I was trying to make this extra space and i have a few problems during the process.
First of all, in my case i have a partition 23 called cust, exactly the same in size with the cache. So i started with the cache calculating and then the other 3( 23 cust, 24 system, 25 userdata). For that moment i already made my nandroid, buy for some stupid reason I saved to my pc.
My problems came when i began with step 4. When i tried to put the cache it told me that it can't do it because it was in use. So i twrp y put on mount and desmounted that partition and then i could keep going. Same thing happened with Data partition, i did the same.
Finally, i did it all the tutorial, just needed to restore as it said in step 5 because i didn't have it in my phone. So i tried with adb push but nothing and i couldn't mount again those partition with twrp. Then, in a desperate move, i tried to reflash my cm rom, so i did that. And later, it bootloop with te huawei logo and i can�´t flash a rom o restore my nandroid. It doesn't read a sdcard.
And now, when i see the script in twrp (sorry i don't know how is the name, i talking about the center botton in twrp) it appears in red "unable to mont '/data', '/system', '/cache'.
I don't know what to do, really, i need a hand.
Click to expand...
Click to collapse
Ok this is difficult because of your wording but it sounds like data, system and cache no longer exist.
Is your device the y6?
Do you have adb access?
Did you finish recreating the partitions?
Did you manage to name them if so?
Are you able to use recovery?
If you have adb can use please issue the following code, if you don't have adb can you please use twrp, advanced, terminal command to issue it.
Code:
ls /dev/block/bootdevice/by-name/
and let me know if it shows your cache, userdata and system.
DestructoSphere said:
Ok this is difficult because of your wording but it sounds like data, system and cache no longer exist.
Is your device the y6?
Do you have adb access?
Did you finish recreating the partitions?
Did you manage to name them if so?
Are you able to use recovery?
If you have adb can use please issue the following code, if you don't have adb can you please use twrp, advanced, terminal command to issue it.
Code:
ls /dev/block/bootdevice/by-name/
and let me know if it shows your cache, userdata and system.
Click to expand...
Click to collapse
- Yes, my device is Y6 (SCL-L03).
- Seems that i don't have access to adb, because in cmd show me "offline" device.
-Yes, i fineshed with that, but couldn't do the restore of backup.
- I did all step 4.
- Yes, i'm using twrp.
I put the code with twrp... and here it says not found.
Any ideas? I hope you could help me.
beatLeo said:
Ok this is difficult because of your wording but it sounds like data, system and cache no longer exist.
Is your device the y6?
Do you have adb access?
Did you finish recreating the partitions?
Did you manage to name them if so?
Are you able to use recovery?
If you have adb can use please issue the following code, if you don't have adb can you please use twrp, advanced, terminal command to issue it.
- Yes, my device is Y6 (SCL-L03).
- Seems that i don't have access to adb, because in cmd show me "offline" device.
-Yes, i fineshed with that, but couldn't do the restore of backup.
- I did all step 4.
- Yes, i'm using twrp.
I put the code with twrp... and here it says not found.
Any ideas? I hope you could help me.
Click to expand...
Click to collapse
You need to put a space between ls and the /
DestructoSphere said:
You need to put a space between ls and the /
Click to expand...
Click to collapse
ups, ok, i did that and i see all the partitions including cache, cust, system and userdata. Please, what is next?
beatLeo said:
ups, ok, i did that and i see all the partitions including cache, cust, system and userdata. Please, what is next?
Click to expand...
Click to collapse
Ok I suspect maybe the filesystems never got created.
Can you run
Code:
df
this will show you the currently mounted partitions free space.
Output will look something like this
Code:
Filesystem Size Used Free Blksize
/dev 442.6M 60.0K 442.5M 4096
/system 1.2G 948.5M 241.8M 4096
/data 5.2G 2.8G 2.4G 4096
/cache 147.2M 176.0K 147.0M 4096
/persist 3.9M 776.0K 3.1M 4096
/firmware 99.8M 46.8M 52.9M 2048
If you dont see data or cache they never got mounted at twrp start, system is not mounted by default.
Then if data is not listed try
Code:
mount -t ext4 /dev/block/bootdevice/by-name/userdata /data
Remember to have spaces between arguments.
Or try system by replacing "userdata" with "system" and "/data" with "/system"
If you get an error trying to mount please do the following referring to the attached screenshots.
In twrp, go to "wipe", "advanced wipe". Then select one of the partitions and select "repair or change filesystem".
This should give you info about the partition.
If you wish to reformat it select "change filesystem" then select "ext4" and swipe to confirm.
Now retry the mount command and hopefully it will succeed.
Do this for each partition then retry your backup/flash.
Hopefully this works, good luck.
Thanks for your help. At first i couldn't see cache or data partition. I did what you told me, and i made cache to appears with df command. System too. But i couldn't made the same with the userdata partition. I tried to repair but it didn't work.
Is there another way to remount that partition?
A question apart: what was that "cust" partiton i've got and you didn't in your images posted in cm12.1 post? Because i recalculated it too.
beatLeo said:
Thanks for your help. At first i couldn't see cache or data partition. I did what you told me, and i made cache to appears with df command. System too. But i couldn't made the same with the userdata partition. I tried to repair but it didn't work.
Is there another way to remount that partition?
A question apart: what was that "cust" partiton i've got and you didn't in your images posted in cm12.1 post? Because i recalculated it too.
Click to expand...
Click to collapse
Hi,
Does twrp show the userdatas partition filesystem type? Like in my previous screenshot cache is shown as ext4.
If not can you try change filesystem instead of the repair option and choose ext4.
I removed my cust partition altogether as I had no use for it.
DestructoSphere said:
Hi,
Does twrp show the userdatas partition filesystem type? Like in my previous screenshot cache is shown as ext4.
If not can you try change filesystem instead of the repair option and choose ext4.
I removed my cust partition altogether as I had no use for it.
Click to expand...
Click to collapse
Yes, it shows current file system: ext4. I tried repair and change file system but nothing. When i'm trying to use "mount -t ext4 /dev/..." it says "failed: invalid argument"
What else could i do?
I really appeciate your help man.
P.S: Sorry, i don't know why the screenshot looks not vertical.
beatLeo said:
Yes, it shows current file system: ext4. I tried repair and change file system but nothing. When i'm trying to use "mount -t ext4 /dev/..." it says "failed: invalid argument"
What else could i do?
I really appeciate your help man.
P.S: Sorry, i don't know why the screenshot looks not vertical.
Click to expand...
Click to collapse
Ok for some reason filesystem seems to have issues.
Can you please try
Code:
mkfs.ext2 -j /dev/block/bootdevice/by-name/userdata
to manually format it?
Remember spaces before and after -j option.
DestructoSphere said:
Ok for some reason filesystem seems to have issues.
Can you please try
Code:
mkfs.ext2 -j /dev/block/bootdevice/by-name/userdata
to manually format it?
Remember spaces before and after -j option.
Click to expand...
Click to collapse
It says mkfs.ext2: lseek: Value too large for define data type
beatLeo said:
Ok for some reason filesystem seems to have issues.
Can you please try
It says mkfs.ext2: lseek: Value too large for define data type
Click to expand...
Click to collapse
As far as I know that happens when you break some size limit.
How big did you make your userdata partition? Maybe you had a typo so I'm thinking you may want to run through the guide again to check but first can you let me know what you get if you write
Code:
blockdev --getsize64 /dev/block/bootdevice/by-name/userdata
DestructoSphere said:
As far as I know that happens when you break some size limit.
How big did you make your userdata partition? Maybe you had a typo so I'm thinking you may want to run through the guide again to check but first can you let me know what you get if you write
Code:
blockdev --getsize64 /dev/block/bootdevice/by-name/userdata
Click to expand...
Click to collapse
it says 5465161216
beatLeo said:
As far as I know that happens when you break some size limit.
How big did you make your userdata partition? Maybe you had a typo so I'm thinking you may want to run through the guide again to check but first can you let me know what you get if you write
it says 5465161216
Click to expand...
Click to collapse
Ok the number seems ok.
Can you please try using parted again with the guide to delete then recreate the partition making sure to specify the filesystem.
Hopefully that works but if not I think you need to rewrite the partition table a start again.
If it doesn't work can you please post the output from
Code:
parted
unit s
print free
DestructoSphere said:
Ok the number seems ok.
Can you please try using parted again with the guide to delete then recreate the partition making sure to specify the filesystem.
Hopefully that works but if not I think you need to rewrite the partition table a start again.
If it doesn't work can you please post the output from
Code:
parted
unit s
print free
Click to expand...
Click to collapse
Hi DestructoSphere,
tried to do that, but remember i can't get to adb so i can't find a way to paste the parted file into de sbin. Any ideas about that?
beatLeo said:
Ok the number seems ok.
Can you please try using parted again with the guide to delete then recreate the partition making sure to specify the filesystem.
Hopefully that works but if not I think you need to rewrite the partition table a start again.
If it doesn't work can you please post the output from
Hi DestructoSphere,
tried to do that, but remember i can't get to adb so i can't find a way to paste the parted file into de sbin. Any ideas about that?
Click to expand...
Click to collapse
In twrp can you mount mtp or usb storage and copy it to sdcard then twrp filemanager to copy to sbin?
Ok, i tried with a sdcard, but i couldn't either. It didn't recognize my sdcard. And i don't have an otg's usb.
But in twrp's cmd showed "mtp enabled". Could this means that i have to mounted the sd partition? If that is a yes, could you please write me the code ?
beatLeo said:
Ok, i tried with a sdcard, but i couldn't either. It didn't recognize my sdcard. And i don't have an otg's usb.
But in twrp's cmd showed "mtp enabled". Could this means that i have to mounted the sd partition? If that is a yes, could you please write me the code ?
Click to expand...
Click to collapse
Hi DestructoSphere, i finally resolve this. It was a lot simplier than you ever thought. I tried changing to ext2 my data partion, and then change it again to ext4 and that's how it works again.
Take a look into my partitions. But i still want to reduce to 100mb the modem 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.

Unable to create second partition on SD card

I've been trying to partition my SD card, but all steps I take to try and diagnose why I am unable to partition the card is getting me nowhere.
Initially, I used gparted on my laptop to partition the SD card with a v-fat partition and a f2fs partition, both primary partitiond. This was when I found out that no matter what I do the second partition on the SD card, it doesn't seem like the format actually takes. Whatever tool I use complete the partitioning and formatting steps successfully by all appearances but it doesn't seem like the partition is ever actually formatted. What I mean by that is that no matter what the second partition is it never mounts. I get an invalid argument error or bad super blocks and so forth. I can make the first partition anything I want: fat, v-fat, f2fs, ext4 and so forth and that will mount in my terminal without issue, but no matter what I do the 2nd partition always fails to mount. I've also noticed that blkid never has any fs info for the second partition. It gives me the partition UUID and that's all, while the first partition has both part UUID & fs UUID.
I've even gone so far as to just recently get a brand new SD card thinking that perhaps the first SD card was corrupted but I'm still getting the exact same behavior. Also of note is that in gparted when I try to create a secondary partition, I'm unable to mount the second partition so I don't think it has anything to do with my device. I've tried using fdisk, gdisk, parted in the terminal and I've tried using extended partitions and logical partitions and only primary partitions. I've done this before in the past so I know that it is possible.
It almost seems like the SD cards that I have are simply not capable of being partitioned in any way but it's strange that I now have two 512 GB SD cards and they're both giving the exact same behavior so I'm thinking that I'm missing something obvious. Any help anyone could provide as far as trying to figure this out or debug what's going on what I'm doing wrong would be greatly appreciated.
Thanks,
Ryan
only the first partition is mounted from vold. that is normal behaviour on every device. if you want have all partitions mounted automatically install LineageOS.
furthermore, although sdcardfs supports ext4, f2fs, for file transfer via USB MTP afaik fat32, exfat or ntfs is required.
what do you need f2fs partition for? maybe I can point you to workaround.
aIecxs said:
only the first partition is mounted from vold. that is normal behaviour on every device. if you want have all partitions mounted automatically install LineageOS.
furthermore, although sdcardfs supports ext4, f2fs, for file transfer via USB MTP afaik fat32, exfat or ntfs is required.
what do you need f2fs partition for? maybe I can point you to workaround.
Click to expand...
Click to collapse
I don't need anything to mount automatically. I'm saying I can't manually mount these partitions. I also don't need f2fs, that was just an example. I've tried multiple partitions that are just fat, ext4 and many other combinations. Under no partition scheme can I get anything other than the first partition to mount--using the mount command as root.
can you please try gdisk binary from here
https://forum.xda-developers.com/t/...-on-qmobile-z8-with-bricked-dead-emmc.3712171
please post the result of partitioning and formatting.
if you're interested in alternative solution, you can actually format the whole MicroSD card as exfat, and create ext4 partition image on top as regular file. I have done that for my mothers Huawei for Link2SD because it doesn't support adoptable storage.
aIecxs said:
can you please try gdisk binary from here
https://forum.xda-developers.com/t/...-on-qmobile-z8-with-bricked-dead-emmc.3712171
please post the result of partitioning and formatting.
if you're interested in alternative solution, you can actually format the whole MicroSD card as exfat, and create ext4 partition image on top as regular file. I have done that for my mothers Huawei for Link2SD because it doesn't support adoptable storage.
Click to expand...
Click to collapse
I have tried with gdisk but I can try with that specific version and report back. I understand we can create imaged file systems, but one of the main reasons I do this is that I find fat partitions are fickle and can easily be corrupted where the whole partition requires wiped. By having a non fat partition I use that as a better backup option where I find it's easier to recover data in case of corruption or other issues. For such use, being tied to the fat FS would still incur the possibility of data loss so that doesn't work for my purpose.
Thanks and I'll report back,
Ryan
oh I wouldn't rely on f2fs for backups it still has bugs and there are no recovery tools for f2fs
https://forum.xda-developers.com/t/4550931
https://android.stackexchange.com/q/250389
alecxs said:
oh I wouldn't rely on f2fs for backups it still has bugs and there are no recovery tools for f2fs
https://forum.xda-developers.com/t/4550931
https://android.stackexchange.com/q/250389
Click to expand...
Click to collapse
Thanks for the suggestion to use gdisk. I downloaded the version you linked, but I still get the same behavior. I believe it is related to the fact that only the first partition gets a filesystem UUID in blkid. I'm not sure what this means, but it seems clear that the second filesystem isn't being properly created no matter what I do.
that's strange, especially the fact you tried on PC too. on the phone, can you create partitions inside a blank disk image just for double check to rule out kernel issue?
I'll give that a try and report back
alecxs said:
that's strange, especially the fact you tried on PC too. on the phone, can you create partitions inside a blank disk image just for double check to rule out kernel issue?
Click to expand...
Click to collapse
Yeah I'm able to create an image, partition it into a vfat & ext4, then mount both of those partitions.
can you dd the file into mmcblk1 for testing purposes?
alecxs said:
can you dd the file into mmcblk1 for testing purposes?
Click to expand...
Click to collapse
Sorry this isn't clear to me. What am I using to dd into the partition, and do you mean mmcblk1p1/2? As mmcblk1 is the whole disk.
Thanks,
Ryan
yes, I meant the whole disk you created a test file that contains MBR or GPT and two partitions including UUIDs and file systems? If you dd it into the mmcblk1 it should create 1:1 copy of that disk image with two partitions including partition table.
Well I'll be:
Code:
/dev/block/mmcblk1p2 on /data/data/com.termux/files/home/i2 type ext4 (rw,relatime,seclabel) /dev/block/mmcblk1p1 on /data/data/com.termux/files/home/i2 type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Code:
/dev/block/mmcblk1p2 23M 46K 23M 1% /data/data/com.termux/files/home/i2 /dev/block/mmcblk1p1 4.9M 0 4.9M 0% /data/data/com.termux/files/home/i1
I can possibly use gparted to just resize those! Any thoughts on what was going on, why this method worked? Hrmm looks like resizing fat could be a challenge, but this certainly gets me closer!
there is also parted binary you can use on phone
I have it and I'm playing around with it, thanks for all your help

Categories

Resources