I've seen a lot of threads detailing how to create an Ext4 partition using Gparted but if you don't want to download the image and would rather do it all on your phone, here's how:
This entire procedure should take less than 5min so you can go back to messing with your phone in other ways.
REQUIRES:
CLOCKWORK MOD RECOVERY
ADB
FINGERS
I am not responsible for any damage done to your phone doing this process. =.=
1. Download the zip file provided.
2. Extract the zip file to the same folder you have ADB in. (You should now have a folder named ext4 in the same folder you have ADB)
3. Reboot the phone into MAGDLR. Then select the option to boot into the recovery.
4. Make sure that /system/ is mounted using the option to mount partition in Clockwork Recovery.
5. Open a command (cmd) prompt and cd into your folder with ADB.
6. Run these commands in the command prompt. (Commands are in BOLD)
adb push ext4 /system/etc/
adb shell
parted /dev/block/mmcblk0
print (make note of the total size of your partition here)
resize 1 0 xxxx (where xxxx is the size you want for your FAT32 partition. It should equal total size of your partition that you gleaned from print minus 1024 for the ext4 partition you're about to set up)
mkpartfs primary ext2 xxxx yyyy (where xxxx is where your previous partition ended and yyyy is the total size of your sdcard)
.... (Let it do its thing. Shouldn't take more than a minute)
print (Make sure that everything is correct: You have a fat32 partition running from 0 to xxxx and an ext2 partition running from xxxx to the total size of your partition)
quit
Now to utilize the two files we previously pushed to /system/etc/
chmod 777 /system/etc/tune2fs
chmod 777 /system/etc/e2fsck
/system/etc/tune2fs -j /dev/block/mmcblk0p2 <- You now have ext3
/system/etc/tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2 (Note: CAsE SEnSitiVE)
/system/etc/e2fsck -fpDC0 /dev/block/mmcblk0p2 (Note: CAsE SEnSitiVE) <- You now have ext4
7. You can check that it's truly ext4 by:
parted /dev/block/mmcblk0
print (It should now read that you have a FAT32 and an ext4 partition.)
quit
You're all done! Now you have a 1GB ext4 partition for all your data and apps. If you know what you're doing, these same steps can be modified so that you have two ext4 partitions if you'd like. You can also alter the size of your ext4 partition to something smaller if you don't have that many apps to install or have a smaller SDcard (512MB should be sufficient in most cases, 1GB is slightly overkill IMO)
i will try with my HD2. I need more space to install app on sd not on phone. Thanks so much
Hi, I follow your instruction but when I get a "Permision deined" error when I type in the following commond
/system/etc/tune2fs -j /dev/block/mmcblk0p2
Can you please help?
Many many thanks!!
justj said:
Hi, I follow your instruction but when I get a "Permision deined" error when I type in the following commond
/system/etc/tune2fs -j /dev/block/mmcblk0p2
Can you please help?
Many many thanks!!
Click to expand...
Click to collapse
Crap. I forgot a step. You have to type
chmod 777 /system/etc/tune2fs
chmod 777 /system/etc/e2fsck
prior to using those files. That should fix the permission denied error.
I've edited the OP to reflect the changes, thanks for pointing that out.
Thanks man
Thanks Bro I have successfully make ext4 and I am enjoying my new Rom
Using HTC Desire runnymede 5.0
Amazing. I will keep it for future reference, although I partitioned my SD with CWM recovery and Gparted.
What kind of partition is made when using CWM? I made a 1GB partition on my card that way, and it works great. But I've heard good things about having it as ext4. How does this guide reflect the fact that I already have an SD-EXT on my card that's not necessarily ext4?
Thanks!
please help
please help me i cant get it to work... its same with /system mounted and unmounted...not even one 3rd app is working for me on my win 7 64x when i want to create ext4 this is my last hope. card is brand new 8gb ultra speed its working fine so cant be problem there. it seems like chmod 777 will delete that file..
Code:
C:\Users\OgziR\Desktop\adt-bundle-windows-x86_64-20130522\sdk\platform-tools>adb
push ext4 /system/etc/
push: ext4/tune2fs -> /system/etc/tune2fs
push: ext4/e2fsck -> /system/etc/e2fsck
2 files pushed. 0 files skipped.
1573 KB/s (603400 bytes in 0.374s)
C:\Users\OgziR\Desktop\adt-bundle-windows-x86_64-20130522\sdk\platform-tools>adb
shell
~ # /system/etc/tune2fs -j /dev/block/mmcblk0p2
/system/etc/tune2fs -j /dev/block/mmcblk0p2
/sbin/sh: /system/etc/tune2fs: Permission denied
~ # chmod 777 /system/etc/tune2fs
chmod 777 /system/etc/tune2fs
~ # /system/etc/tune2fs -j /dev/block/mmcblk0p2
/system/etc/tune2fs -j /dev/block/mmcblk0p2
/sbin/sh: /system/etc/tune2fs: not found
~ #
Hye... I have 2 question...
My phone is a HTC HD2 running an NexusHD2.ICS.CM9.HWA.V2.3 ROM... The cmd prompt cant seem so fine my device. Do have any advice on this???
Secondly, what do i do with the ext4.zip file??? I mean, do it extract it, or put in same folder with ADB??
Btw, i am Super Noob on this, so i apologize if my question offends anyone... 1000 apologizes...
OK, first of all, do you have adb installed correctly? If cmd prompt can't find your device that is the most likely problem.
As for what to do with ext4.zip, you need to extract it to your adb folder.
Sent from my Vivid 4G using xda app-developers app
**IMPORTANT**
Read this thoroughly before you attempt any of it. The steps found herein will wipe out any data remaining on the partition for which it's used. If a partition has lost it's formatting, chances are the data is lost anyway, so there's not much more you can lose. This should be thought of as a last resort. Do not attempt this until you have tried everything else.
In many cases, just wiping the affected partition in recovery is enough to fix the problem. If not, continue reading.
If it's your sdcard that needs to be mounted, there is one thing you can try that might work in most cases.
Code:
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] echo /dev/block/mmcblk0p12 >> /sys/devices/platform/usb_mass_storage/lun0/file
Your computer will probably respond that the volume/device needs formatted before using it. This will erase everything left on the sdcard, as will anything else you attempt in this thread.
* Choose a quick format (if possible) and format it as "fat32", block size "4096".
If that doesn't work...
You'll have to reset your partition table, just in case (this step is optional but it doesn't hurt to do it anyway).
You'll need to be in fastboot:
Code:
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] idme bootmode 4002
[COLOR=Gray]~ #[/COLOR] reboot
(*COTR recovery doesn't have idme so you'll have to use the recovery itself to reboot into the bootloader)
Once in fastboot, enter the following commands...
Code:
[COLOR=Gray]$[/COLOR] fastboot oem format
[COLOR=Gray]$[/COLOR] fastboot oem idme bootmode 5001
[COLOR=Gray]$[/COLOR] fastboot reboot
With your partition table reset, it's time to print your partition table for reference.
For this, your device must be booted into recovery.
To print your partition table:
Code:
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR=Gray](parted)[/COLOR] print
This will print the layout of your partitions 1-12. It should look something like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you receive an error stating that parted can't be found, you need to find and download it and enter the following commands, or update your recovery...
Code:
[COLOR=Gray]$[/COLOR] adb push /path/to/parted /sbin/parted
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] chown 0.0 /sbin/parted
[COLOR=Gray]~ #[/COLOR] chown 755 /sbin/parted
(*replace "/path/to/parted" with the full path to the parted binary downloaded to your computer)
Once you have your partition table printed out, copy and save it to a text file for later use.
When looking at the partition table, pay close attention to the file systems of the system, userdata, cache and media partitions. System, data and cache, should have an "ext4" formatting, while media should have a "fat32" formatting. The partitions that are missing the proper formatting are the ones you need to focus on because they need to be removed and repartitioned.
----------------------------------------------------------------------------------------------------------------------------------------
NEVER MESS WITH ANYTHING OTHER THAN SYSTEM, DATA, CACHE AND MEDIA!!!
----------------------------------------------------------------------------------------------------------------------------------------
The following, are the steps to repartition the system, data, and cache partitions. Media (sdcard) will have it's own steps so don't get them mixed up. These same steps will be used for each of the system data and cache partitions except you'll substitute the variables (in green) with the values for that particular partition. Be careful NOT to get the any of numbers mixed up or confused or you could potentially do serious damage to your device.
Code:
[COLOR=Gray]$[/COLOR] abd shell
[COLOR=Gray]~ #[/COLOR] umount [COLOR=SeaGreen]"directory_name"[/COLOR] [COLOR=Red]<---- This command is to make sure the volume isn't already mounted. If you get an error, it just means there is no volume mounted. Disregard.[/COLOR]
[COLOR=Gray]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR=Gray](parted)[/COLOR] rm [COLOR=SeaGreen]"partition_number"[/COLOR]
[COLOR=Gray](parted)[/COLOR] mkpart primary [COLOR=SeaGreen]"startblock" "endblock"[/COLOR]
[COLOR=Gray](parted)[/COLOR] name [COLOR=SeaGreen]"partition_number" "partition_name"[/COLOR]
[COLOR=Gray](parted)[/COLOR] quit
[COLOR=Gray]~ #[/COLOR] mke2fs -t ext4 /dev/block/mmcblk0p[COLOR=SeaGreen]"partition_number"[/COLOR]
[COLOR=Gray]~ #[/COLOR] mount [COLOR=SeaGreen]"directory_name"[/COLOR]
The values for the previous command variables are as follows...
SYSTEM
-------------------------------
"partition_number"= 9
"directory_name" = /system
"partition_name" = system
"startblock" = 312
"endblock" = 849
DATA
-------------------------------
"partition_number"= 10
"directory_name" = /data
"partition_name" = userdata
"startblock" = 849
"endblock" = 2041
CACHE
-------------------------------
"partition_number"= 11
"directory_name" = /cache
"partition_name" = cache
"startblock" = 2041
"endblock" = 2309
For example, in order to fix the DATA partition, the commands would be written like this...
Code:
[COLOR=Gray]$[/COLOR] abd shell
[COLOR=Gray]~ #[/COLOR] umount /data
[COLOR=Gray]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR=Gray](parted)[/COLOR] rm 10
[COLOR=Gray](parted)[/COLOR] mkpart primary 849 2041
[COLOR=Gray](parted)[/COLOR] name 10 userdata
[COLOR=Gray](parted)[/COLOR] quit
[COLOR=Gray]~ #[/COLOR] mke2fs -t ext4 /dev/block/mmcblk0p10
[COLOR=Gray]~ #[/COLOR] mount /data
The following are the steps to repartition the media (sdcard) partition.
Code:
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] umount /sdcard [COLOR=Red]<----Same as before. If you receive an error on this command, just disregard it.[/COLOR]
[COLOR=Gray]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR=Gray](parted)[/COLOR] rm 12
[COLOR=Gray](parted)[/COLOR] mkpartfs primary fat32 2309 7690
[COLOR=Gray](parted)[/COLOR] rm 12
[COLOR=Gray](parted)[/COLOR] mkpart primary 2309 7690
[COLOR=Gray](parted)[/COLOR] name 12 media
[COLOR=Gray](parted)[/COLOR] quit
[COLOR=Gray]~ #[/COLOR] mount /sdcard
Once again, any partitions on which these commands are used, will lose any data left on them, but chances are it's your only option. Pay very close attention to what you are doing and be very cautious of typos. Accidentally entering /dev/block/mmcblk0p2' instead of "/dev/block/mmcblk0p12" will brick your device, to the point of needing to pull the back cover off and shorting it...well...let's just say you don't want to have to do that.
Afterwards you should be able to mount the effected partitions in recovery.
Be careful, and good luck.
Refrences:
http://forum.xda-developers.com/showpost.php?p=26285877&postcount=12
http://forum.xda-developers.com/showthread.php?t=1651413
http://forum.xda-developers.com/showthread.php?t=1497900
Thanks to kinfauns for showing me that it isn't always necessary to create an "ext2" file system first and then convert it to "ext4", and for showing me how to get rid of the pesky msftres flags.
Great work, sticky and Thank You.
Thank you bigjoe2675 and thank you soupmagnet for you fine work!!
soupmagnet said:
**IMPORTANT**
Read this thoroughly before you attempt any of it. The steps found herein will wipe out any data remaining on the partition for which it's used. If a partition has lost it's formatting, chances are the data is lost anyway, so there's not much more you can lose. This should be thought of as a last resort. Do not attempt this until you have tried everything else.
In many cases, just wiping the affected partition in recovery is enough to fix the problem. If not, continue reading.
If it's your sdcard that needs to be mounted, there is one thing you can try that might work in most cases.
Code:
[COLOR="Gray"]$[/COLOR] adb shell
[COLOR="Gray"]~ #[/COLOR] echo /dev/block/mmcblk0p12 >> /sys/devices/platform/usb_mass_storage/lun0/file
Your computer will probably respond that the volume/device needs formatted before using it. This will erase everything left on the sdcard, as will anything else you attempt in this thread.
* Choose a quick format (if possible) and format it as "fat32", block size "4096".
If that doesn't work...
You'll have to reset your partition table, just in case (this step is optional but it doesn't hurt to do it anyway).
You'll need to be in fastboot:
Code:
[COLOR="Gray"]$[/COLOR] adb shell
[COLOR="Gray"]~ #[/COLOR] idme bootmode 4002
[COLOR="Gray"]~ #[/COLOR] reboot
(*COTR recovery doesn't have idme so you'll have to use the recovery itself to reboot into the bootloader)
Once in fastboot, enter the following commands...
Code:
[COLOR="Gray"]$[/COLOR] fastboot oem format
[COLOR="Gray"]$[/COLOR] fastboot oem idme bootmode 5001
[COLOR="Gray"]$[/COLOR] fastboot reboot
With your partition table reset, it's time to print your partition table for reference.
For this, your device must be booted into recovery.
To print your partition table:
Code:
[COLOR="Gray"]$[/COLOR] adb shell
[COLOR="Gray"]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR="Gray"](parted)[/COLOR] print
This will print the layout of your partitions 1-12. It should look something like this:
View attachment 1421197
If you receive an error stating that parted can't be found, you need to find and download it and enter the following commands, or update your recovery...
Code:
[COLOR="Gray"]$[/COLOR] adb push /path/to/parted /sbin/parted
[COLOR="Gray"]$[/COLOR] adb shell
[COLOR="Gray"]~ #[/COLOR] chown 0.0 /sbin/parted
[COLOR="Gray"]~ #[/COLOR] chown 755 /sbin/parted
(*replace "/path/to/parted" with the full path to the parted binary downloaded to your computer)
Once you have your partition table printed out, copy and save it to a text file for later use.
When looking at the partition table, pay close attention to the file systems of the system, userdata, cache and media partitions. System, data and cache, should have an "ext4" formatting, while media should have a "fat32" formatting. The partitions that are missing the proper formatting are the ones you need to focus on because they need to be removed and repartitioned.
----------------------------------------------------------------------------------------------------------------------------------------
NEVER MESS WITH ANYTHING OTHER THAN SYSTEM, DATA, CACHE AND MEDIA!!!
----------------------------------------------------------------------------------------------------------------------------------------
The following, are the steps to repartition the system, data, and cache partitions. Media (sdcard) will have it's own steps so don't get them mixed up. These same steps will be used for each of the system data and cache partitions except you'll substitute the variables (in green) with the values for that particular partition. Be careful NOT to get the any of numbers mixed up or confused or you could potentially do serious damage to your device.
Code:
[COLOR="Gray"]$[/COLOR] abd shell
[COLOR="Gray"]~ #[/COLOR] umount [COLOR="SeaGreen"]"directory_name"[/COLOR]
[COLOR="Gray"]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR="Gray"](parted)[/COLOR] rm [COLOR="SeaGreen"]"partition_number"[/COLOR]
[COLOR="Gray"](parted)[/COLOR] mkpart primary [COLOR="SeaGreen"]"startblock" "endblock"[/COLOR]
[COLOR="Gray"](parted)[/COLOR] name [COLOR="SeaGreen"]"partition_number" "partition_name"[/COLOR]
[COLOR="Gray"](parted)[/COLOR] quit
[COLOR="Gray"]~ #[/COLOR] mke2fs -t ext4 /dev/block/mmcblk0p[COLOR="SeaGreen"]"partition_number"[/COLOR]
[COLOR="Gray"]~ #[/COLOR] mount [COLOR="SeaGreen"]"directory_name"[/COLOR]
The values for the previous command variables are as follows...
SYSTEM
-------------------------------
"partition_number"= 9
"directory_name" = /system
"partition_name" = system
"startblock" = 312
"endblock" = 849
DATA
-------------------------------
"partition_number"= 10
"directory_name" = /data
"partition_name" = userdata
"startblock" = 849
"endblock" = 2041
CACHE
-------------------------------
"partition_number"= 11
"directory_name" = /cache
"partition_name" = cache
"startblock" = 2041
"endblock" = 2309
For example, in order to fix the DATA partition, the commands would be written like this...
Code:
[COLOR="Gray"]$[/COLOR] abd shell
[COLOR="Gray"]~ #[/COLOR] umount /data
[COLOR="Gray"]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR="Gray"](parted)[/COLOR] rm 10
[COLOR="Gray"](parted)[/COLOR] mkpart primary 312 849
[COLOR="Gray"](parted)[/COLOR] name 10 userdata
[COLOR="Gray"](parted)[/COLOR] quit
[COLOR="Gray"]~ #[/COLOR] mke2fs -t ext4 /dev/block/mmcblk0p9
[COLOR="Gray"]~ #[/COLOR] mount /data
The following are the steps to repartition the media (sdcard) partition.
Code:
[COLOR="Gray"]$[/COLOR] adb shell
[COLOR="Gray"]~ #[/COLOR] umount /sdcard
[COLOR="Gray"]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR="Gray"](parted)[/COLOR] rm 12
[COLOR="Gray"](parted)[/COLOR] mkpartfs primary fat32 2309 7690
[COLOR="Gray"](parted)[/COLOR] rm 12
[COLOR="Gray"](parted)[/COLOR] mkpart primary 2309 7690
[COLOR="Gray"](parted)[/COLOR] name 12 media
[COLOR="Gray"](parted)[/COLOR] quit
[COLOR="Gray"]~ #[/COLOR] mount /sdcard
Once again, any partitions on which these commands are used, will lose any data left on them, but chances are it's your only option. Pay very close attention to what you are doing and be very cautious of typos. Accidentally entering /dev/block/mmcblk0p2' instead of "/dev/block/mmcblk0p12" will brick your device, to the point of needing to pull the back cover off and shorting it...well...let's just say you don't want to have to do that.
Afterwards you should be able to mount the effected partitions in recovery.
Be careful, and good luck.
Refrences:
http://forum.xda-developers.com/showpost.php?p=26285877&postcount=12
http://forum.xda-developers.com/showthread.php?t=1651413
http://forum.xda-developers.com/showthread.php?t=1497900
Thanks to kinfauns for showing me that it isn't always necessary to create an "ext2" file system first and then convert it to "ext4", and for showing me how to get rid of the pesky msftres flags.
Click to expand...
Click to collapse
The first method doesn't work, so as you said, i'l have to boot into fastboot.
But it says "idme not found"
Please help.
Noob.
I have attached some pics for more information.
A guide for getting into fastboot:
http://forum.xda-developers.com/showthread.php?t=1668159
[edit:] BTW This guide is for the Kindle Fire. On other devices your partition layout will likely be different. Try the forums for your particular device.
"That's a special kind of stupid. The kind that makes me laugh."
I didnt use this guide (although I read it all and was about to go this route) big thanks!
Got a question though , at one point I had (i guess temp root privelidges) because I sideloaded but in root explorer I didnt have su , anyway , in KFU there was a section that said you could change mount to write , although thats nots root , would I have been able to use the adb to push commands to the kindle? I wanted to get into the file explorer and just use usb mass storage to put files in and maybe gain root that way ?
*I realize :"That's a special kind of stupid. The kind that makes me laugh."but I thought Id ask anyway!!!
Vintage144 said:
I didnt use this guide (although I read it all and was about to go this route) big thanks!
Got a question though , at one point I had (i guess temp root privelidges) because I sideloaded but in root explorer I didnt have su , anyway , in KFU there was a section that said you could change mount to write , although thats nots root , would I have been able to use the adb to push commands to the kindle? I wanted to get into the file explorer and just use usb mass storage to put files in and maybe gain root that way ?
*I realize :"That's a special kind of stupid. The kind that makes me laugh."but I thought Id ask anyway!!!
Click to expand...
Click to collapse
LOL that does make me laugh, but not for reasons you'd think. Actually the USB mass storage is only the sdcard (media) partition. Mounting the sdcard to USB or side loading apps only gives you access to the sdcard, which you already have write permissions for anyway. You can't cross over to other partitions without mounting them first and you need to be the root user to do that. With the sdcard being secluded from the system partition, in order to get root permissions you need to be the root user or have write permissions on the system partition, at least temporarily.
On the original Kindle Fire you can get that through custom recovery, which has root permissions, or through some exploit found in Gingerbread. That's what makes Pokey9000's 'fbmode' so slick. It gives users access to fastboot, which in turn gives them access to flash a custom recovery and gain root permissions (KFU uses this) long enough to write SU and Superuser.apk to the system partition, eliminating the need for an exploit in Gingerbread.
These days, root exploits in Android are few and far between and they are getting patched pretty regularly, so the ability to install and boot onto custom recovery is pretty valuable. I imagine that's why Amazon used OMAP HS on the second generation devices in an (obviously feeble) attempt to patch such a gaping hole in their security.
The only reason. I say this , is because on my a500 I have a microsd card that I can transfer files to and from (granted I have root) however I had access to android folders ,I just thought as a last resort I could gain access that way,
I've noticed something funny on xda ,99% of people who have problems here have the same response "my friends device isn't working" I'm betting that means there device and instead of actually reading all the material available they just read one post and tried whatever the op said not realizing there's a process to everything the devs do and reason why we must follow directions! Writing can you fix my fubar is bs ,there's tons of info in hear ya just gotta look for it
Sent from my SAMSUNG-SGH-I717 using xda app-developers app
Well I tried all this. At the beginning it worked. But on every reboot or use, its just doesn't reconise the sdcard anymore.
format/reinstall/ play with it 10 minute/freeze/sd card cant read
format/reinstall/play with it 5 minuts/freeze/sdcant read
etc
at the end nothing's working.
On my last attemp I put the original rom.
Amazone give me a new one. sd card has probably bad sector.
---- Is there a way to prevent this trouble ?? ---
thanks
oVeRdOsE. said:
Well I tried all this. At the beginning it worked. But on every reboot or use, its just doesn't reconise the sdcard anymore.
format/reinstall/ play with it 10 minute/freeze/sd card cant read
format/reinstall/play with it 5 minuts/freeze/sdcant read
etc
at the end nothing's working.
On my last attemp I put the original rom.
Amazone give me a new one. sd card has probably bad sector.
---- Is there a way to prevent this trouble ?? ---
thanks
Click to expand...
Click to collapse
One way to check to see if your sdcard has bad sectors is with the following command:
Code:
adb shell dd if=/sdcard of=/dev/null
If it doesn't respond for more than 10 minutes, then you probably have bad sectors. But I'm guessing that might not the case since you are able to format it in the first place. Are you playing a game or something when this happens?
Sent from my KFHD using Tapatalk 2
Looking for an opinion
Hey there, very well written post.
My situation is regarding my Nexus Q. I attempted to flash a CM10.1 rom to it and something went wrong. I have it back to stock, but I think my partitions need to be reset, and was hoping someone could advise me based on my screenshot. While in Recovery, I get told that the SD Card only has 15mb of space, and it cannot mount /cache to perform a logcat. I notice from the OP screenshot that most of the other partions have ext4 beside but mine do not.
Should I follow your guide to re partition my unit?
Cheers
HomeR365 said:
Hey there, very well written post.
My situation is regarding my Nexus Q. I attempted to flash a CM10.1 rom to it and something went wrong. I have it back to stock, but I think my partitions need to be reset, and was hoping someone could advise me based on my screenshot. While in Recovery, I get told that the SD Card only has 15mb of space, and it cannot mount /cache to perform a logcat. I notice from the OP screenshot that most of the other partions have ext4 beside but mine do not.
Should I follow your guide to re partition my unit?
Cheers
Click to expand...
Click to collapse
Probably, but with GREAT discernment. You need to learn about your device's partitions and what they're for. And you definitely need to learn what the commands are doing so you understand what's going on. I wouldn't suggest just trying it out and hoping for the best.
This is awesome. Thanks so much. Bookmarked for future reference after spending hours on this.
stuck in orange logo boot
Hello, total noob here. Ok i rooted my kindle fire. rebooted and it started with kindle fire logo in blue color. Then I connect to my pc it showed it got connected.I put in new zip of cynogenmod jelly bean. All good rebooted with kindle fire logo orange color. No google apps, now i connect it to PC and it wont show kindle. So i downloaded the Gapps directly in kindle. rebooted for recovery but it rebooted to jelly bean. Blue kindle fire wont show up. I need to get into TWRP so that I can install Gaapps. trying for three days. read many posted. holding power button for 20 secs till it shuts down. then connecting usb to PC it restart but with orange fire logo. Added some lines 4000 or 4001 under tools menu in utility folder, run the cmd from the tools folder.... nothing changed. tried. RAN KFU again and it shows status offline, rooted no, and boot menu unkwon. Ran ADB straight shows waiting for device. So my question is how can I get back to recovery or blue logo where I can go and reset or reinstall or atleast install just Gaaps. tried install just random games APKs. It wont let it install. Please Help. Dont know much linux or DOS either.
thanks this help alot thanks a million
sir i have a arise rowdy t1+ phone its board is sp6820gb_7620 and cpu id is 8810 cpu frequency is 1ghz and ram is 512mb with mali 300 gpu,
android version is 2.3.6 and kernal version is 2.6.35.7 [email protected] #7, software version is mocordroid2.3.6.w12.20_p20.01_20130715.130506, hardware version is 1.1.0. my problem is that my phone has only 128 mb of internal memory and when i tried to edit vold.fstab to swap its memory with memory card it stopped detecting sd card when turned on but when in recovery mode sd is shown present, i think its very similar to karbonn a1+ in hardware and software part so can you please help me with my phone?
thank you so much !!!!!!!! its awesome
nitingoel2 said:
sir i have a arise rowdy t1+ phone its board is sp6820gb_7620 and cpu id is 8810 cpu frequency is 1ghz and ram is 512mb with mali 300 gpu,
android version is 2.3.6 and kernal version is 2.6.35.7 [email protected] #7, software version is mocordroid2.3.6.w12.20_p20.01_20130715.130506, hardware version is 1.1.0. my problem is that my phone has only 128 mb of internal memory and when i tried to edit vold.fstab to swap its memory with memory card it stopped detecting sd card when turned on but when in recovery mode sd is shown present, i think its very similar to karbonn a1+ in hardware and software part can you please help me with my phone?
Click to expand...
Click to collapse
This is a kindle fire forum friend
Sent from my Amazon Kindle Fire using Tapatalk
soupmagnet said:
**IMPORTANT**
Read this thoroughly before you attempt any of it. The steps found herein will wipe out any data remaining on the partition for which it's used. If a partition has lost it's formatting, chances are the data is lost anyway, so there's not much more you can lose. This should be thought of as a last resort. Do not attempt this until you have tried everything else.
In many cases, just wiping the affected partition in recovery is enough to fix the problem. If not, continue reading.
If it's your sdcard that needs to be mounted, there is one thing you can try that might work in most cases.
Code:
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] echo /dev/block/mmcblk0p12 >> /sys/devices/platform/usb_mass_storage/lun0/file
Your computer will probably respond that the volume/device needs formatted before using it. This will erase everything left on the sdcard, as will anything else you attempt in this thread.
* Choose a quick format (if possible) and format it as "fat32", block size "4096".
If that doesn't work...
You'll have to reset your partition table, just in case (this step is optional but it doesn't hurt to do it anyway).
You'll need to be in fastboot:
Code:
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] idme bootmode 4002
[COLOR=Gray]~ #[/COLOR] reboot
(*COTR recovery doesn't have idme so you'll have to use the recovery itself to reboot into the bootloader)
Once in fastboot, enter the following commands...
Code:
[COLOR=Gray]$[/COLOR] fastboot oem format
[COLOR=Gray]$[/COLOR] fastboot oem idme bootmode 5001
[COLOR=Gray]$[/COLOR] fastboot reboot
With your partition table reset, it's time to print your partition table for reference.
For this, your device must be booted into recovery.
To print your partition table:
Code:
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR=Gray](parted)[/COLOR] print
This will print the layout of your partitions 1-12. It should look something like this:
View attachment 1421197
If you receive an error stating that parted can't be found, you need to find and download it and enter the following commands, or update your recovery...
Code:
[COLOR=Gray]$[/COLOR] adb push /path/to/parted /sbin/parted
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] chown 0.0 /sbin/parted
[COLOR=Gray]~ #[/COLOR] chown 755 /sbin/parted
(*replace "/path/to/parted" with the full path to the parted binary downloaded to your computer)
Once you have your partition table printed out, copy and save it to a text file for later use.
When looking at the partition table, pay close attention to the file systems of the system, userdata, cache and media partitions. System, data and cache, should have an "ext4" formatting, while media should have a "fat32" formatting. The partitions that are missing the proper formatting are the ones you need to focus on because they need to be removed and repartitioned.
----------------------------------------------------------------------------------------------------------------------------------------
NEVER MESS WITH ANYTHING OTHER THAN SYSTEM, DATA, CACHE AND MEDIA!!!
----------------------------------------------------------------------------------------------------------------------------------------
The following, are the steps to repartition the system, data, and cache partitions. Media (sdcard) will have it's own steps so don't get them mixed up. These same steps will be used for each of the system data and cache partitions except you'll substitute the variables (in green) with the values for that particular partition. Be careful NOT to get the any of numbers mixed up or confused or you could potentially do serious damage to your device.
Code:
[COLOR=Gray]$[/COLOR] abd shell
[COLOR=Gray]~ #[/COLOR] umount [COLOR=SeaGreen]"directory_name"[/COLOR] [COLOR=Red]<---- This command is to make sure the volume isn't already mounted. If you get an error, it just means there is no volume mounted. Disregard.[/COLOR]
[COLOR=Gray]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR=Gray](parted)[/COLOR] rm [COLOR=SeaGreen]"partition_number"[/COLOR]
[COLOR=Gray](parted)[/COLOR] mkpart primary [COLOR=SeaGreen]"startblock" "endblock"[/COLOR]
[COLOR=Gray](parted)[/COLOR] name [COLOR=SeaGreen]"partition_number" "partition_name"[/COLOR]
[COLOR=Gray](parted)[/COLOR] quit
[COLOR=Gray]~ #[/COLOR] mke2fs -t ext4 /dev/block/mmcblk0p[COLOR=SeaGreen]"partition_number"[/COLOR]
[COLOR=Gray]~ #[/COLOR] mount [COLOR=SeaGreen]"directory_name"[/COLOR]
The values for the previous command variables are as follows...
SYSTEM
-------------------------------
"partition_number"= 9
"directory_name" = /system
"partition_name" = system
"startblock" = 312
"endblock" = 849
DATA
-------------------------------
"partition_number"= 10
"directory_name" = /data
"partition_name" = userdata
"startblock" = 849
"endblock" = 2041
CACHE
-------------------------------
"partition_number"= 11
"directory_name" = /cache
"partition_name" = cache
"startblock" = 2041
"endblock" = 2309
For example, in order to fix the DATA partition, the commands would be written like this...
Code:
[COLOR=Gray]$[/COLOR] abd shell
[COLOR=Gray]~ #[/COLOR] umount /data
[COLOR=Gray]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR=Gray](parted)[/COLOR] rm 10
[COLOR=Gray](parted)[/COLOR] mkpart primary 849 2041
[COLOR=Gray](parted)[/COLOR] name 10 userdata
[COLOR=Gray](parted)[/COLOR] quit
[COLOR=Gray]~ #[/COLOR] mke2fs -t ext4 /dev/block/mmcblk0p10
[COLOR=Gray]~ #[/COLOR] mount /data
The following are the steps to repartition the media (sdcard) partition.
Code:
[COLOR=Gray]$[/COLOR] adb shell
[COLOR=Gray]~ #[/COLOR] umount /sdcard [COLOR=Red]<----Same as before. If you receive an error on this command, just disregard it.[/COLOR]
[COLOR=Gray]~ #[/COLOR] parted /dev/block/mmcblk0
[COLOR=Gray](parted)[/COLOR] rm 12
[COLOR=Gray](parted)[/COLOR] mkpartfs primary fat32 2309 7690
[COLOR=Gray](parted)[/COLOR] rm 12
[COLOR=Gray](parted)[/COLOR] mkpart primary 2309 7690
[COLOR=Gray](parted)[/COLOR] name 12 media
[COLOR=Gray](parted)[/COLOR] quit
[COLOR=Gray]~ #[/COLOR] mount /sdcard
Once again, any partitions on which these commands are used, will lose any data left on them, but chances are it's your only option. Pay very close attention to what you are doing and be very cautious of typos. Accidentally entering /dev/block/mmcblk0p2' instead of "/dev/block/mmcblk0p12" will brick your device, to the point of needing to pull the back cover off and shorting it...well...let's just say you don't want to have to do that.
Afterwards you should be able to mount the effected partitions in recovery.
Be careful, and good luck.
Refrences:
http://forum.xda-developers.com/showpost.php?p=26285877&postcount=12
http://forum.xda-developers.com/showthread.php?t=1651413
http://forum.xda-developers.com/showthread.php?t=1497900
Thanks to kinfauns for showing me that it isn't always necessary to create an "ext2" file system first and then convert it to "ext4", and for showing me how to get rid of the pesky msftres flags.
Click to expand...
Click to collapse
Now, I get the error that the sdcard isn't mounted in root explorer, but I can still find all of the contents of the sdcard under /storage/emulated/0. Is there any reason for this? I was thinking of simply copying everything to a new folder named sdcard (because the old folder turned into a file with a filesize of -1 bytes) but then the newly created folder had the same problem. Whenever I tapped on it it gave me the same error, "The SD card in't mounted". I'm on a Nexus 4, any help?
Cannot solve this issue
I've had it with messing this for my 1st gen kindle fire, for the last 5 weeks I've been trying to unbrick it and nothing works. I can connect to the device using Super ADB Tool but trying to load anything produces the and I get "- exec '/system/bin/sh' failed" messages using the command prompt.
Q&A for [HACK] Grow your data partition
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [HACK] Grow your data partition. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
killerskincanoe said:
Directly from Andrew Dodds g+ " IT HAS BEGUN.
The first phase of Find 7a/7s LVM testing is here.* See linked post for details.* (Sorry to disappoint, but the first phase is "make sure we don't break existing configurations")
Once this phase is complete, the remaining list is:
Fix up the remaining TWRP issues (make RECOVERY_SDCARD_ON_DATA runtime instead of compile-time)
Make user-friendly conversion processes
Once things are solid on Find 7, I'll work on Find 5 and N1."
Stay thirsty my friends. Good things ahead
Sent from my A0001 using Tapatalk
Click to expand...
Click to collapse
Any update ?
abuthabet87 said:
Any update ?
Click to expand...
Click to collapse
I'm working on it, got a base for the find5 on the omni gerrit already. Though far from usable
Sent from my One X+
2 questions
Is this Hack [suficient] safe, or should I wait for LVM?
If i do a full backup of my current system (colorOS 1.0.9i Stable) and after the hack, restore the ROM, will my phone be exactly the same than before but with 4GB for apps?
Thanks for the great work
LVM needs ALOT of work right now :/
I'm trying to do this, but after enter in parted [parted /dev/block/mmcblk0] when i try to do "rm 29", i get "can't remove 29: no such file or directory
I'm doing the "on your phone" commands in TWRP command line., is that correct?
I'm running stable colorOS 1.0.9i
Guys, After I exit parted shell, I can't execute mke2fs/tune2fs commands! I get:
/sbin/sh: mke2fs: not found
though I can find them (mke2fs and tune2fs) inside /sbin/ after I cd into it!
How can I solve this ?
Edit:
Solved ... I just rebooted into recovery again.
I did it It works hehehe
Thank you very much for this amazing instructions.
I had some difficulties while executing some of the instructions, but I did some search and tried unplugging then plugging the cable or rebooting into recovery again when the shell was giving me a hard time, and everything is back as it was except now I have 4GB internal storage !!
Does this have to be done while the phone is running ColorOS? I started the procedure on my 16GB phone, running CM11, but didn't get too far.
There is no /sbin. Found tune2fs and mke2fs in /system/bin. No parted there.
From PC over USB, copied parted to Download directory.
On phone, opened a Terminal, then 'su root'.
Remounted /system/bin rw: 'mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system'
Copied parted from Download to system/bin.
chmod 755 /system/bin/parted
Most of the umount commands fail.
Started 'parted /dev/block/mmcblk0'
Fails on first 'rm 29' because it is not unmounted.
I gave up there.
Interesting, automated repartioning:
www <dot> youtube <dot> com / watch?v=2CoTIojZGlI
Shame it doesn't have a 4GB option.
@Redfoox (in dev thread), did you push mke2fs and tune2fs at the beginning of the procedure or did you use the ones already included in TWRP?
I got this error?
Code:
/sbin # mke2fs -t ext4 -m 0 -L userdata /dev/block/mmcblk0p20
/sbin/sh: mke2fs: not found
The command also does not work in TWRP!
Anyone any idea what I should do now?
---------- Post added at 02:40 PM ---------- Previous post was at 02:36 PM ----------
Vashiru said:
@Redfoox (in dev thread), did you push mke2fs and tune2fs at the beginning of the procedure or did you use the ones already included in TWRP?
Click to expand...
Click to collapse
I did push the mke2fs and tune2fs at the beginning. Probably shouldn't have done that?
I have to wait each post for 4 minutes to post a new one
I've tried doing that during my second attempt, but got stuck at exactly the same point.
The fact that it shows mke2fs: not found tells me that you have both pushed it and CHModded it.
Push the files again, this time don't CHMod them and try it from the TWRP Terminal Emulator (from ADB shell just gives you permission denied but I didn't try it from TWRP that time).
If that doesn't work try CHModding them from TWRP. If that also doesn't work I'm out of a clue. All you could do at that point is use the last resort method (saved my device 2 times) and try the procedure again without pushing the files first.
Tried it and it gives the same errors. Cannot even chmod it through the terminal emulator.
I will go for the last resort method than
Too bad. Alright, feel free to ask questions if you run into trouble when you try again.
It worked i have 4GB now!
The only thing now is that my wifi does not work and I did do the following:
Code:
# Restore /persist partition
mount -t ext4 /dev/block/mmcblk0p29 /sdcard
# On computer
adb push mmcblk0p21_persist_ext4.img /sdcard/
# On phone
dd if=mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
output of terminal:
Code:
/sdcard # dd if=mmcblk0p21_persist_ext4.img of=/dev/block/mmcblk0p21
16384+0 records in
16384+0 records out
8388608 bytes (8.0MB) copied, 3.260498 seconds, 2.5MB/s
Any idea how to restore this? I even redid this step without succes.
---------- Post added at 07:21 PM ---------- Previous post was at 06:27 PM ----------
Got it working now. I had tot install modem 4.2.
Nice, enjoy the 4 GB!
Please help guys this is turning out to be a really frustrating experience...T___T
How are you guys even pulling this off... T___T
My adb works when the phone is booted but after "adb reboot recovery" and once in TWRP it cant see the device... and hence i cant proceed with the commands in Adb shell when the phone is connected and in twrp. i am running Liquidsmooth rom but i went back to the original rom to try this.
I'm able to execute
" chmod 755 /sbin/parted /sbin/mke2fs /sbin/tune2fs
umount /cache
umount /sdcard"
But not these ...
"umount /emmc
umount /data"
It says file or Directory not found.
then when i enter parted with the next command "parted /dev/block/mmcblk0"
I enter into parted, but cant see any of the following
"# rm sdcard
rm 29
# 28 thru 23 are reserved
rm 28
rm 27
rm 26
rm 25
# rm recovery
rm 24
# rm misc
rm 23
# rm cache
rm 22
# rm persist
rm 21
# rm data/emmc
rm 20
# now, re-create partitions but data is bigger
mkpart primary 1325 5421
name 20 userdata
mkpart primary 5421 5430
name 21 persist
mkpart primary 5430 5967
name 22 cache
mkpart primary 5967 5968
name 23 misc
mkpart primary 5968 5979
name 24 recovery
mkpart primary 5979 6012
name 25 reserve1
mkpart primary 6012 6019
name 26 reserve2
mkpart primary 6019 6028
name 27 reserve3
mkpart primary 6028 6062
name 28 reserve4
mkpart primary 6062MB 100%
name 29 sdcard
# exit parted shell
q"
Now i'm totally clueless on how to proceed further... Would appreciate if you guys can shed a bit more clarity... This is really turning out to be a frustrating experience. Please guys...
Going back to Liquidsmooth to use my phone ... will again reinstall original os tomorrow and try again. :crying:
OK, so I got TWRP running sweet and now following the improved descriptions in main thread post #34.
Got stuck here, all before has been ok:
mke2fs -t ext4 -m 0 -L persist /dev/block/mmcblk0p21
Message back is:
Could not stat /dev/block/mmcblk0p21 --- no such file or directory
The device apparently does not exist; did you specify it correctly?
Now what?
EDIT - think I have it sorted. I didn't scroll down enough in the post #34 windows and missed some 'parted' commands!
EDIT - 'adb shell' had quit, and it wouldn't connect again. Tried to reboot TWRP to recovery, but it didn't recover, now stuck at Oppo text logo, can't connect by adb, doesn't respond to power button. Bricked.
EDIT - was able to access the phone by fastboot only, not adb. Flashed TWRP recovery again, it rebooted and took quite a while, now it is stuck at the cyanogenmod 12 boot up spinning arrow for 10+ minutes, maybe it will recover eventually. If not, I'll try to reflash CM12 too.
Hello
Today was the third try to get this thing working ^^
But somehow i cant get past the first command.
Every time i try to unmount things like /cache or /dev umount only returns "invalid argument.
I never pushed the files from the zip. TWRP 2.8.3.0 is used.
I tried to attach a screenshot to help, but im too new to do that -.-
Thanks in advance