[Q] mke2fs on acer a200 and mmcblk08p - Android Software/Hacking General [Developers Only]

From adb shell:
mount (This is to check data isn't mounted. If mounted use "umount data")
mke2fs -j -b 4096 /dev/block/mmcblk0p8
tune2fs -O extents,uninit_bg,dir_index -C 1 /dev/block/mmcblk0p8
e2fsck -fy /dev/block/mmcblk0p8
Click to expand...
Click to collapse
When I do the "mke2fs -j -b 4096 /dev/block/mmcblk0p8" command from adb's shell, it takes forever (I let it run for hours). Something I was thinking about, could I simply "rm -rf /dev/block/mmcblk0p8" first, and then run the above commands? Also, should I not add the "-t ext4" option to the mke2fs command?
I am a 20 year user of linux, so I am not clueless to the command line.

kerijan2003 said:
When I do the "mke2fs -j -b 4096 /dev/block/mmcblk0p8" command from adb's shell, it takes forever (I let it run for hours). Something I was thinking about, could I simply "rm -rf /dev/block/mmcblk0p8" first, and then run the above commands? Also, should I not add the "-t ext4" option to the mke2fs command?
I am a 20 year user of linux, so I am not clueless to the command line.
Click to expand...
Click to collapse
I stopped the mke2fs command, and did the following:
"~ # tune2fs -O extents,uninit_bg,dir_index -C 1 /dev/block/mmcblk0p8
tune2fs 1.41.12 (17-May-2010)
Setting current mount count to 1
Please run e2fsck on the filesystem.
~ # e2fsck -fy /dev/block/mmcblk0p8
e2fsck 1.41.12 (17-May-2010)
One or more block group descriptor checksums are invalid. Fix? yes"
It fixed a whole slew of descriptors, and has been at the following for the last two hours:
"Pass 1: Checking inodes, blocks, and sizes"
Does anyone have any ideas?

Related

[Q] What does the option "-s" used for in "make_ext4fs" ?

Hello,
I'm trying to make /system to ext4 image and boot up
I found that in system/extras/ext4_utils/mkuserimg.sh, the command is
make_ext4fs -s -l $SIZE -a $LABEL $OUTPUT_FILE $SRC_DIR
the out image with option "-s" cannot be mounted when bootup
but without the "-s" option, image can be mounted successful
I checked the image diff, the image with "-s" add crc header and spare format, so it definitly cannot be mounted directly , right ?
My question is : what the option "-s" used for ? Am I need this option in my experiment ?
Thanks
As far as i know -s = silent mode "no shell lines displayed during execution"
GchildT said:
As far as i know -s = silent mode "no shell lines displayed during execution"
Click to expand...
Click to collapse
Appriciate your reply
But, are you sure?... the option '-s' indeed pased as 'spare' in source code, and the out image cannot be mounted...
-s is sparse
you need to use the simg2img tool
This is what we do at work (TI)
From: omappedia.org/wiki/Using_EMMC_on_OMAP4_devices
./simg2img system.img system.img.raw
mkdir tmp
sudo mount -t ext4 -o loop system.img.raw tmp/
<<change stuff>>
sudo ./make_ext4fs -s -l 512M -a system system.img.new tmp/
sudo umount tmp
rm -rf tmp
Hope this helps
/chris
PS: The forum won't let me link the URL above
ufgeek said:
-s is sparse
you need to use the simg2img tool
This is what we do at work (TI)
From: omappedia.org/wiki/Using_EMMC_on_OMAP4_devices
./simg2img system.img system.img.raw
mkdir tmp
sudo mount -t ext4 -o loop system.img.raw tmp/
<<change stuff>>
sudo ./make_ext4fs -s -l 512M -a system system.img.new tmp/
sudo umount tmp
rm -rf tmp
Hope this helps
/chris
PS: The forum won't let me link the URL above
Click to expand...
Click to collapse
If you don't mind me asking,
What does simg2img do exactly? and what would be the potential risk if not using -s option?
steeldusk said:
If you don't mind me asking,
What does simg2img do exactly? and what would be the potential risk if not using -s option?
Click to expand...
Click to collapse
I figured it out. simg2img is just a bin file to strip sparsed image and make non-sparsed image, and not using -s just build system without any header. so as long as you can burn image to a right partition, you don't need -s option
make_ext4fs -s -l command
This is how i make my ext4 images. I did not got to test on real device my self yet.
Im building my images from cm source btw. This is the command i use to build recovery: make -j4 recoveryimage
After i build a image i run the make_ext4fs command.(userdata.img and system.img seem to be ext4 build by default for me)
make_ext4fs -s -l 1073741824 -a data out/target/product/m805_892x/userdata.img out/target/product/m805_892x/data
make_ext4fs -s -l 10485760 -a data out/target/product/m805_892x/boot.img out/target/product/m805_892x/data
make_ext4fs -s -l 10485760 -a data out/target/product/m805_892x/recovery.img out/target/product/m805_892x/data
make_ext4fs -s -l 314572800 -a data out/target/product/m805_892x/system.img out/target/product/m805_892x/data
gives:
Creating filesystem with parameters:
Size: 314572800
Block size: 4096
Blocks per group: 32768
Inodes per group: 6400
Inode size: 256
Journal blocks: 1200
Label:
Blocks: 76800
Block groups: 3
Reserved block group size: 23
Created filesystem with 911/19200 inodes and 31635/76800 blocks
Install system fs image: out/target/product/m805_892x/system.img
out/target/product/m805_892x/system.img+out/target/product/m805_892x/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p total size is 126213892
[email protected]:~/ICS$
I my BoardConfig i have this:
BOARD_BOOTIMAGE_PARTITION_SIZE := 10485760
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 10485760
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 314572800
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1073741824
(Google for: build android from source if you dont get what im doing..)
The sizes need to be in bytes it seems.
DD dump you´re partitions and you see the amount of bytes.
Just edding some nice info to a old post
what of for a 128mb phone
ufgeek said:
-s is sparse
you need to use the simg2img tool
This is what we do at work (TI)
From: omappedia.org/wiki/Using_EMMC_on_OMAP4_devices
./simg2img system.img system.img.raw
mkdir tmp
sudo mount -t ext4 -o loop system.img.raw tmp/
<<change stuff>>
sudo ./make_ext4fs -s -l 512M -a system system.img.new tmp/
sudo umount tmp
rm -rf tmp
Hope this helps
/chris
PS: The forum won't let me link the URL above
Click to expand...
Click to collapse
my phone refuses to flash the image and i think its because of its size 145mb. how do i create a system.img for a 12mb internal memory phone
$ make_ext4fs
Expected filename after options
make_ext4fs [ -l <len> ] [ -j <journal size> ] [ -b <block_size> ]
[ -g <blocks per group> ] [ -i <inodes> ] [ -I <inode size> ]
[ -L <label> ] [ -f ] [ -a <android mountpoint> ]
[ -S file_contexts ]
[ -z | -s ] [ -t ] [ -w ] [ -c ] [ -J ]
<filename> [<directory>]
All is very simply
-s sparse (cut empty bytes)
-l len (size image)

Error - ROM memory insufficient space

Hi Guys,
I have an Blu Dash 3.5 D170, but i do not have a system android yet... i've got a little problem:
I'm trying to install a backup system.img I got here, but always fails in writing step because the lack of space in /system
when i use adb shell ls -a /system the result is:
Code:
D:\Android\sdk\platform-tools>adb shell
~ # ls -a /system
ls -a /system
. .. lost+found
~ #
other words, there is nothing inside /system...
When i use "busybox df", results is:
Code:
~ # busybox df
busybox df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 80612 48 80564 0% /dev
/dev/block/mtdblock1 225280 148096 77184 66% /system
/dev/block/mtdblock4 179200 1216 177984 1% /data
/dev/block/mmcblk0p1 3850240 118624 3731616 3% /sdcard
/dev/block/mtdblock2 61440 1192 60248 2% /cache
~ #
I can not understand why occupies 66% of the space is has NOTHING within the directory
I tried using the command "fastboot erase system", and the command says that cleared the system, but it does not clear these 66%
what should I do to fix this?

[Q] How to repair partition on internal storage?

I was trying to get 4.4.2 (Omnirom / CM11.1) on my Xoom.
The only problem I facing is TWRP is asking for password or else it will have problem mounting to cache.
This lead to cannot wipe cache and cannot wipe cache\dalvik.
I search the forum up and down and people comment that the partition is corrupt that TWRP trying to recover it.
So my question is how can I repair or recreate the partition.
What tool should I use?
Even if it is using adb shell, what kind of program I need to push into the phone.
Hope someone can help me out.
I did try to play around like 5 hours.
At first TWRP complaint that cannot mount /cache
Then I try use CWM recovery to wipe cache and dalvik. Then only install TWRP (without big part). Again I wipe cache and dalvik.
Then when I install TWRP (with big part) and no longer complaint cannot mount cache.
But it keep showing update partition details.
When I try to wipe data it will be unsuccessful.
Hope experience people can guide me. Really want to see my motorola xoom (everest) to be on kit kat.
kblade29m said:
I was trying to get 4.4.2 (Omnirom / CM11.1) on my Xoom.
The only problem I facing is TWRP is asking for password or else it will have problem mounting to cache.
This lead to cannot wipe cache and cannot wipe cache\dalvik.
I search the forum up and down and people comment that the partition is corrupt that TWRP trying to recover it.
So my question is how can I repair or recreate the partition.
What tool should I use?
Even if it is using adb shell, what kind of program I need to push into the phone.
Hope someone can help me out.
I did try to play around like 5 hours.
At first TWRP complaint that cannot mount /cache
Then I try use CWM recovery to wipe cache and dalvik. Then only install TWRP (without big part). Again I wipe cache and dalvik.
Then when I install TWRP (with big part) and no longer complaint cannot mount cache.
But it keep showing update partition details.
When I try to wipe data it will be unsuccessful.
Hope experience people can guide me. Really want to see my motorola xoom (everest) to be on kit kat.
Click to expand...
Click to collapse
hello...
same problem on my xoom Wingray
if i find a fix i posted here
Good luck
ankorez said:
hello...
same problem on my xoom Wingray
if i find a fix i posted here
Good luck
Click to expand...
Click to collapse
Same here too... wingray also
As far as I can tell, you didn't follow the directions. Re-start the BigPart process from the beginning, and when TWRP asks you for a password, just ignore that and press the Home icon at the top. Tap the Wipe tab, and there will be two options, Advanced and Format Data, along with the slider at the bottom for a Factory Reset. Tap the Format Data tab, type yes when prompted, and hit enter/return. Then follow the rest of the steps in the BigPart process.
And, please, if you're going to BigPart, just pretend CWM doesn't exist, because all it's going to do is mess things up for you.
Thanks webeougher. I revisit the steps and this time successfully to make it work.
http://forum.xda-developers.com/showthread.php?t=2506997
Step 1 - Preparation
Format MicroSD to Fat32 and copied the following files
- R.A.H._TWRPv2.6.3_BigPart_selinux.zip
- cm-11-20140216-UNOFFICIAL-1501+0100-everest.zip
- pa_gapps-modular-full-4.4.2-20131230-signed.zip
Step 2 - Flash Recovery to TWRP
- Has Android SDK
- Extract R.A.H._TWRPv2.6.3.zip to get recovery.img
- Set Xoom to Fastboot mode by press vol down before dual core logo appeared.
- In command line, type fastboot flash recovery recovery.img
Step 3 - Boot into Recovery
- Set Xoom to Recovery mode by press vol down after dual core logo appeared for 3 seconds.
- Notice at this step you will not have problem mounting to /cache partition.
Step 4 - Create BigPart
Refer to http://forum.xda-developers.com/showthread.php?t=2506997
Go through step by step.
- Use Install to flash R.A.H._TWRPv2.6.3_BigPart_selinux.zip (No Reboot)
- Home - Wipe - Advanced Wipe -> Wipe Dalvik Cache, System, Cache, Data, Internal Storage. Exclude sdcard. (No Reboot)
- Home - Reboot - Recovery -> Don't Install SuperSU (Rebooted into Recovery)
- Home - Wipe - Format Data - Type yes (No Reboot)
- Home - Wipe - Advanced Wipe -> Wipe system and cache (No Reboot)
- Home - Reboot - Recovery -> Don't Install SuperSu (Rebooted into Recovery)
- Home - Mount - Check System and Uncheck System (Just testing only. No Reboot)
Step 5 - Install Rom and Gapps
- Home - Install - cm-11-20140216-UNOFFICIAL-1501+0100-everest.zip and pa_gapps-modular-full-4.4.2-20131230-signed.zip
- Swipe to Flash
- Wipe Dalvik and Cache
- Home - Mount - Reboot - System
- Give 5 - 10 minutes for the installation to complete. Not a boot loop. Just take longer time to finish installation.
Enjoy the CM11 (4.4.2) on Xoom
Troubleshooting:
Just incase if you have problem with partition (Step 3), where you notice TWRP already have with partition
- Flash Clockworkmod Recovery
- Remove SDcard
- Reboot into CWM recovery
- Mount and Storage - Format system, cache, data
- Advanced - Fix Permission
- Flash TWRP Recovery (Back to step 2)
kblade29m said:
Thanks webeougher. I revisit the steps and this time successfully to make it work.
http://forum.xda-developers.com/showthread.php?t=2506997
Step 1 - Preparation
...
Step 2 - Flash Recovery to TWRP
...
Step 3 - Boot into Recovery
...
Step 4 - Create BigPart
...
Step 5 - Install Rom and Gapps
...
Troubleshooting:
Just incase if you have problem with partition (Step 3), where you notice TWRP already have with partition
- Flash Clockworkmod Recovery
- Remove SDcard
- Reboot into CWM recovery
- Mount and Storage - Format system, cache, data
- Advanced - Fix Permission
- Flash TWRP Recovery (Back to step 2)
Click to expand...
Click to collapse
There is almost the same problem with my "UMTS_Everest". I tried to follow all these instructions (includin the "troubleshooting part". But I'm not able to flash another recovery anymore with fastboot nor with TRWP (CWM e.g.) :crying:
I tried also everything, but there is (has never been) no /data-partition anymore and it says "unable to mount /cache" all the time in TWRP
There is no /data-partition visible to mount in TRWP.
Try again. Hope you still can enter fastboot mode.
If you use adb and fastboot, I sure you can get it work.
If you using Windows, make sure usb installed with right driver.
Make device in fastboot mode.
Power + Vol down (hold before motorola logo appear).
Screen will show some text related to fastboot.
When you type "fastboot devices" you able to see your device.
fastboot flash recovery clockwork-recovery.img
fastboot reboot
If you can enter clockworkmod recovery u can format all the mount. To enter recovery.
Power + Vol down (hold after Motorola logo appear for 3 second). When recovery text appeared press Vol up.
Sent from my Nexus 4 using xda app-developers app
kblade29m said:
fastboot flash recovery clockwork-recovery.img
fastboot reboot
Click to expand...
Click to collapse
fastboot flash recovery fastboot flash recovery recovery-Tiamat-R4c-100611-1150-cwm.img
or fastboot flash recovery recovery-clockwork-touch-6.0.3.2-everest.img
sending 'recovery' (5270 KB)...
OKAY [ 0.511s]
writing 'recovery'...
OKAY [ 0.523s]
finished. total time: 1.034s
status done!
Still TWRP
peterkling said:
fastboot flash recovery fastboot flash recovery recovery-Tiamat-R4c-100611-1150-cwm.img
or fastboot flash recovery recovery-clockwork-touch-6.0.3.2-everest.img
sending 'recovery' (5270 KB)...
OKAY [ 0.511s]
writing 'recovery'...
OKAY [ 0.523s]
finished. total time: 1.034s
status done!
Still TWRP
Click to expand...
Click to collapse
Hello,
Ihave the same issue.
You have fixed it ?
How I fixed mine
Hi,
I had the same Problem some weeks ago. After trying to install a newer custom Rom which did not boot I neither was able to wipe dalvik nore had a System Partition anymore.
With big help from HDwally I was able to fix it. The first Thing I did was to install a stock Rom.
For this you have to install the Motorola USB Driver
https://motorola-global-portal-de.custhelp.com/app/answers/detail/a_id/91819
and RSD lite.
http://www.chip.de/downloads/RSD-Lite_49139659.html
You might find a suitable stock Rom here:
http://forum.xda-developers.com/showthread.php?t=1049485
After I installed this my Xoom worked fine again. But I installed a crm after that again following these instructions and I was able to install a custom Rom again.
http://forum.xda-developers.com/showthread.php?t=2506997
I hope you will be able to fix your xoom.
Good luck..
Alexander
onlyage said:
Hi,
I had the same Problem some weeks ago. After trying to install a newer custom Rom which did not boot I neither was able to wipe dalvik nore had a System Partition anymore.
With big help from HDwally I was able to fix it. The first Thing I did was to install a stock Rom.
For this you have to install the Motorola USB Driver
https://motorola-global-portal-de.custhelp.com/app/answers/detail/a_id/91819
and RSD lite.
http://www.chip.de/downloads/RSD-Lite_49139659.html
You might find a suitable stock Rom here:
http://forum.xda-developers.com/showthread.php?t=1049485
After I installed this my Xoom worked fine again. But I installed a crm after that again following these instructions and I was able to install a custom Rom again.
http://forum.xda-developers.com/showthread.php?t=2506997
I hope you will be able to fix your xoom.
Good luck..
Alexander
Click to expand...
Click to collapse
Hello,
thank you, but don't work for me.
is there another solution ?
I still have not solved my problem, there's really no way to fix my xoom
If anyone is still looking, this article explains really well:
http://www.djsmobiles.com/2014/02/h...epartition-upgrade-on-your-motorola-xoom.html
Fuuuq! Did the BigPart partition and forgot to back up my current ROM, so when I attempt to reinstall I don't see my .zip plus when I reboot. I get the OS not installed.
Mz600 / Vzw / CDMA+Wifi
Got mine to work
I know this is a dead thread, but just in case someone comes here looking for help...
I tried all the directions, and couldn't get stuff to mount. always fails. I finally got it. Not sure why this worked...
Flashed TWRP through fastboot.
Then flashed recovery-Tiamat-R4c-100611-1150-cwm.img
formatted each partition and then mounted them
then flashed the R.A.H._TWRPv2.6.3_BigPart_selinux.zip
Then rebooted recovery
Then in TWRP it actually let me format each individual partition one at a time.
Then it let me flash Omni
Not sure why TWRP (regardless of version) would not let me mount. Only CW would. anyways, hope this helps.
stingray (verzion xoom) information
I had trouble getting my cache to mount. kept giving me an error of E:Unable to mount /cache/. After beating my head for about 5-7 hours. I found the post quoted below. I used TWRP recovery and adb sideloaded R.A.H._TWRPv2.6.3_BigPart_selinux.zip b/c I couldn't figure out how to mount the SDCARD to just drag and drop the file in my windows Operating System.
Still nothing. Then I followed the post below under STEP 4 VERY CAREFULLY where it instructed me to format the ENTIRE INTERNAL STORAGE ONLY. Did that, installed R.A.H._TWRPv2.6.3_BigPart_selinux.zip and the cache error went away. Followed the REST of step 4 and FINALLY CM11 ON MY WORE OUT MOTOROLA XOOM VERIZON (STINGRAY) TABLET! GOD SPEED AND HAPPY NEW YEARS!! :good::good:
kblade29m said:
Thanks webeougher. I revisit the steps and this time successfully to make it work.
http://forum.xda-developers.com/showthread.php?t=2506997
Step 1 - Preparation
Format MicroSD to Fat32 and copied the following files
- R.A.H._TWRPv2.6.3_BigPart_selinux.zip
- cm-11-20140216-UNOFFICIAL-1501+0100-everest.zip
- pa_gapps-modular-full-4.4.2-20131230-signed.zip
Step 2 - Flash Recovery to TWRP
- Has Android SDK
- Extract R.A.H._TWRPv2.6.3.zip to get recovery.img
- Set Xoom to Fastboot mode by press vol down before dual core logo appeared.
- In command line, type fastboot flash recovery recovery.img
Step 3 - Boot into Recovery
- Set Xoom to Recovery mode by press vol down after dual core logo appeared for 3 seconds.
- Notice at this step you will not have problem mounting to /cache partition.
Step 4 - Create BigPart
Refer to http://forum.xda-developers.com/showthread.php?t=2506997
Go through step by step.
- Use Install to flash R.A.H._TWRPv2.6.3_BigPart_selinux.zip (No Reboot)
- Home - Wipe - Advanced Wipe -> Wipe Dalvik Cache, System, Cache, Data, Internal Storage. Exclude sdcard. (No Reboot)
- Home - Reboot - Recovery -> Don't Install SuperSU (Rebooted into Recovery)
- Home - Wipe - Format Data - Type yes (No Reboot)
- Home - Wipe - Advanced Wipe -> Wipe system and cache (No Reboot)
- Home - Reboot - Recovery -> Don't Install SuperSu (Rebooted into Recovery)
- Home - Mount - Check System and Uncheck System (Just testing only. No Reboot)
Step 5 - Install Rom and Gapps
- Home - Install - cm-11-20140216-UNOFFICIAL-1501+0100-everest.zip and pa_gapps-modular-full-4.4.2-20131230-signed.zip
- Swipe to Flash
- Wipe Dalvik and Cache
- Home - Mount - Reboot - System
- Give 5 - 10 minutes for the installation to complete. Not a boot loop. Just take longer time to finish installation.
Enjoy the CM11 (4.4.2) on Xoom
Troubleshooting:
Just incase if you have problem with partition (Step 3), where you notice TWRP already have with partition
- Flash Clockworkmod Recovery
- Remove SDcard
- Reboot into CWM recovery
- Mount and Storage - Format system, cache, data
- Advanced - Fix Permission
- Flash TWRP Recovery (Back to step 2)
Click to expand...
Click to collapse
I believe I flashed a 4.1.2 boot.img file a modified rooted version and possibly also reset before a proper flashing in twrp 2.8.6.0. could be one or the other. Both.
No go on any of the suggested fixes.
I'm experiencing same issues.
Specifically, I am unable to mount /data & /cache partitions in TWRP v2.8.6.0 Bigpart Recovery.
I am unable to recover them both through the repair function and Change File System function in TWRP.
Tried all configurations of file system type and sequence of changing the file system types of system, ,data, cache.
The error that appears after attempting to change file system of data, system,cache, all of them is as follows
ERROR: sbin/e2fsk -p /dev/block/mmcblk1p10 process ended with ERROR=8
unable to repair '/data'.
error repairing file system.
I can successfully erase system, boot, userdata, recovery partitions and flash any .img to according partitions with fastboot commands (i.e. fastboot erase cache fastboot flash recovery recovery.img) Although this does not successfully flash anything. Fastboot says it does but recovery remains the same as well as the boot animation which im assuming is in the boot.img file.
I believe im looking for the next viable option which is to rebuild the systems internal data? I dont know via fastboot?
Can anyone help? Could someone explain how to what actually is missing here?
I was successful with e2fsck through adb on my userdata partition and using an alternate superblock. But not I am unsuccessful with it on my cache. These are the only two partions that I am unable to mount in TWRP. I am not even sure if fixing these is proper. I attempted to go in on the /dev/block/platform/sdhci-tegra.3/mmcblkop9 and 10 which are damaged as well I learned when I attempted repair on TWRP on cache.
Code:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6ne2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
by-name/cache
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6n e2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
by-name/cache
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6n e2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
by-name/cache
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6n e2fsck -b /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck -b /dev/block/platform/sdhci-tegra.3/by-name/cache
Invalid non-numeric argument to -b ("/dev/block/platform/sdhci-tegra.3/by-name/c
ache")
~ # ←[6n e2fsck -p 32768 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck -p 32768 /dev/block/platform/sdhci-tegra.3/by-name/cache
Usage: e2fsck [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
[-E extended-options] device
Emergency help:
-p Automatic repair (no questions)
-n Make no changes to the filesystem
-y Assume "yes" to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external_journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list
~ # ←[6n e2fsvk -b 98304 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsvk -b 98304 /dev/block/platform/sdhci-tegra.3/by-name/cache
/sbin/sh: e2fsvk: not found
~ # ←[6n e2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
by-name/cache
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6n e2fsck -b 8193 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck -b 8193 /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
by-name/cache
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6nmke2fs -n /dev/block/platform/sdhci-tegra.3/by-name/cache
mke2fs -n /dev/block/platform/sdhci-tegra.3/by-name/cache
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
32768 inodes, 131072 blocks
6553 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=134217728
4 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304
~ # ←[6ne2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/cache
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform
/sdhci-tegra.3/by-name/cache
/dev/block/platform/sdhci-tegra.3/by-name/cache:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6ne2fsck -p /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck -p /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform
/sdhci-tegra.3/mmcblk0p9
/dev/block/platform/sdhci-tegra.3/mmcblk0p9:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6nmke2fs -n /dev/block/platform/sdhci-tegra.3/mmcblk0p9
mke2fs -n /dev/block/platform/sdhci-tegra.3/mmcblk0p9
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
32768 inodes, 131072 blocks
6553 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=134217728
4 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304
~ # ←[6ne2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
mmcblk0p9
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6ne2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
mmcblk0p9
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6ne2fsck -b 32768 /dev/block/platform/sdhci-tegra.3
e2fsck -b 32768 /dev/block/platform/sdhci-tegra.3
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Is a directory while trying to open /dev/block/platform/sdhci-tegra.3
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6nmke2fs -n /dev/block/platform/sdhci-tegra.3
mke2fs -n /dev/block/platform/sdhci-tegra.3
mke2fs 1.41.14 (22-Dec-2010)
/dev/block/platform/sdhci-tegra.3 is not a block special device.
Proceed anyway? (y,n) y
y
mke2fs: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.
~ # ←[6ne2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p8
e2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p8
e2fsck 1.41.14 (22-Dec-2010)
/dev/block/platform/sdhci-tegra.3/mmcblk0p8: clean, 11/16384 files, 2089/65536 b
locks
~ # ←[6ne2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
mmcblk0p9
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6ne2fsck -n 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck -n 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
Usage: e2fsck [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
[-E extended-options] device
Emergency help:
-p Automatic repair (no questions)
-n Make no changes to the filesystem
-y Assume "yes" to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external_journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list
~ # ←[6ne2fsck -b /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck -b /dev/block/platform/sdhci-tegra.3/mmcblk0p9
Invalid non-numeric argument to -b ("/dev/block/platform/sdhci-tegra.3/mmcblk0p9
")
~ # ←[6ne2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck -b 32768 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
mmcblk0p9
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6nmke2fs -n /dev/block/platform/sdhci-tegra.3
mke2fs -n /dev/block/platform/sdhci-tegra.3
mke2fs 1.41.14 (22-Dec-2010)
/dev/block/platform/sdhci-tegra.3 is not a block special device.
Proceed anyway? (y,n) y
y
mke2fs: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.
~ # ←[6nmke2fs -n /dev/block/platform/sdhci-tegra.3/mmcblk0p9
mke2fs -n /dev/block/platform/sdhci-tegra.3/mmcblk0p9
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
32768 inodes, 131072 blocks
6553 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=134217728
4 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304
~ # ←[6nmke2fs -b 98304 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
mke2fs -b 98304 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
mke2fs: invalid block size - 98304
~ # ←[6nmke2fs -b 98304 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
mke2fs -b 98304 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
mke2fs: invalid block size - 98304
~ # ←[6ne2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck -b 98304 /dev/block/platform/sdhci-tegra.3/mmcblk0p9
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Invalid argument while trying to open /dev/block/platform/sdhci-tegra.3/
mmcblk0p9
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
~ # ←[6n
---------- Post added at 06:30 PM ---------- Previous post was at 06:27 PM ----------
MZ604 US WIFI Can someone pull and send me the partitions files in dev/block/platform/sdhci-tegra.3? Will replacing and overwriting all my mmcblk0, mmcblko9p1, mmcblk0p10, ect. repair the issue of not being able to mount /data & /cache? or would just someone pulling files form this folder in the picture be sufficent. I say this because if i understand correctly the /userdata and /cache are the culprits, that is the root of the damage. Not sure if im making sense but I hope someone has some advice.
Here is a list of all the partitions on MZ604 Motorola Xoom. I obtained a few list using different commands. Take a look.
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Owner>cd c:\adb\adb
c:\adb\adb>adb shell
~ # ←[6nls -l \dev\block\platform\sdchi-tegra.3\by-name
ls -l \dev\block\platform\sdchi-tegra.3\by-name
devblockplatformsdchi-tegra.3by-name: No such file or directory
~ # ←[6nls -l \dev\block
ls -l \dev\block
devblock: No such file or directory
~ # ←[6nls \dev\block
ls \dev\block
devblock: No such file or directory
~ # ←[6nls -al \dev\block
ls -al \dev\block
devblock: No such file or directory
~ # ←[6ncat /proc/partitions
cat /proc/partitions
major minor #blocks name
253 0 98304 zram0
253 1 98304 zram1
179 0 31162368 mmcblk0
179 1 3072 mmcblk0p1
179 2 2048 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 4096 mmcblk0p4
179 5 2048 mmcblk0p5
179 6 12288 mmcblk0p6
179 7 8192 mmcblk0p7
259 0 1048576 mmcblk0p8
259 1 524288 mmcblk0p9
259 2 29525504 mmcblk0p10
~ # ←[6ncat /proc/mounts
cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /tmp tmpfs rw,relatime 0 0
~ # ←[6ncat /proc/mtd
cat /proc/mtd
dev: size erasesize name
~ # ←[6nls -l /dev/block
ls -l /dev/block
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
brw------- root root 7, 0 1970-01-02 14:15 loop0
brw------- root root 7, 1 1970-01-02 14:15 loop1
brw------- root root 7, 2 1970-01-02 14:15 loop2
brw------- root root 7, 3 1970-01-02 14:15 loop3
brw------- root root 7, 4 1970-01-02 14:15 loop4
brw------- root root 7, 5 1970-01-02 14:15 loop5
brw------- root root 7, 6 1970-01-02 14:15 loop6
brw------- root root 7, 7 1970-01-02 14:15 loop7
brw------- root root 179, 0 1970-01-02 14:15 mmcblk0
brw------- root root 179, 1 1970-01-02 14:15 mmcblk0p1
brw------- root root 259, 2 1970-01-02 14:15 mmcblk0p10
brw------- root root 179, 2 1970-01-02 14:15 mmcblk0p2
brw------- root root 179, 3 1970-01-02 14:15 mmcblk0p3
brw------- root root 179, 4 1970-01-02 14:15 mmcblk0p4
brw------- root root 179, 5 1970-01-02 14:15 mmcblk0p5
brw------- root root 179, 6 1970-01-02 14:15 mmcblk0p6
brw------- root root 179, 7 1970-01-02 14:15 mmcblk0p7
brw------- root root 259, 0 1970-01-02 14:15 mmcblk0p8
brw------- root root 259, 1 1970-01-02 14:15 mmcblk0p9
drwxr-xr-x root root 1970-01-02 14:15 platform
brw------- root root 253, 0 1970-01-02 14:15 zram0
brw------- root root 253, 1 1970-01-02 14:15 zram1
~ # ←[6n
c:\adb\adb>
No list told me exactly which partition was my /data and/cache but as you can see when I run the "Repair" function on my Data and Cache in TWRP 2.8.6.0, the log returns an error to which file it is attempting to repair respectively.
Repairing Data using e2fsk . . .
E: /sbin/e2fsk -p /dev/block/mmcblk0p10 process ended with ERROR=8
E: Unable to repair '/data' .
E: Error repairing file system.
E: Unable to mount '/data/' .
So from there I wanted to rebuild them due to the fact that they are indeed corrupt. Since I was unsuccessful using the "Change File System" function and "Format" function in TWRP 2.8.6.0 as well as unsuccessful using "fastboot format userdata' command in Fastboot I decided to use a command in ADB, mke2fs -T ext4 /dev/block/mmcblk0p9 and mke2fs -T ext4 /dev/block/mmcblk0p10. Here is the terminal showing these commands. . .
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Owner>cd c:\adb\adb
c:\adb\adb>adb shell
~ # ←[6nmke2fs -T ext4 /dev/block/mmcblk0p9
mke2fs -T ext4 /dev/block/mmcblk0p9
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
32768 inodes, 131072 blocks
6553 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=134217728
4 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
~ # ←[6nmke2fs -T ext4 /dev/block/mmcblk0p10
mke2fs -T ext4 /dev/block/mmcblk0p10
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1847776 inodes, 7381376 blocks
369068 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
226 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
~ # ←[6nmount /dev/block/mmcblk0p9
mount /dev/block/mmcblk0p9
mount: mounting /dev/block/mmcblk0p9 on /cache failed: Invalid argument
~ # ←[6nmount /data
mount /data
mount: mounting /dev/block/mmcblk0p10 on /data failed: Invalid argument
~ # ←[6nmount /dev/block/mmcblk0p9
mount /dev/block/mmcblk0p9
mount: mounting /dev/block/mmcblk0p9 on /cache failed: Invalid argument
~ # ←[6nmount /data/media
mount /data/media
mount: can't find /data/media in /etc/fstab
~ # ←[6nreboot
reboot
c:\adb\adb>
Indeed neither of them are able to mount. Am I mistaken when i read these logs it says that these "done" but they do not appear to be as the 0's imply.
Still no fix yet
Is it a probable solution to use the sdcard as a mounting point for these partitions ( /data, /cache)? I cant fully understand it yet but Ive seen some people somehow do this with internal memory and stuff with these specific partitons.

mount command problem

I want to mount a file as file system in android.
so far I've done
create 1 MB file:
Code:
dd if=/dev/zero of=/sdcard/my_fs bs=1024 count=1024
format the file as vfat
Code:
losetup /dev/block/loop0 /sdcard/my_fs
mkfs.vfat -v /dev/block/loop0
mount it:
Code:
mount -rw -t vfat /dev/block/loop0 /sdcard/mountpt
but the filesystem is mounted as read only not rw.
when I excute the above commands from adb shell instead of android terminal emulator, it works fine and is mounted as rw.
whats wrong with the mount command? how to mount it as rw?
please help me!
ls -l output is
Code:
drwxr-xr-x root root 1970-01-01 05:30 mountpt

[Kali NetHunter] Chroot won't start

Hello, I have a problem using Kali with my Nexus 5 (Android 6.0.1). I have installed Kali NetHunter and Magisk using TWRP. Every time I try to start chroot in the Kali Chroot Manager, everything goes well until it gives me this error and stops:
[-] sdcard /lib/modules/3.4.0-8.14-Re4son-3.5 doesn't exist or isn't mounted. .
What should I do?
I have the same problem,,,
[+] seems you have kali chroot installed already!
[+] proc was mounted already.
[+] sys was mounted already.
[+] dev was mounted already.
[+] dev/pts was mounted already.
[+] system was mounted already.
[+] ssdcard was mounted already.
[-] sdcard /lib/modules/3.4.0-8.14-Re4son-3.5 doesn't exist or isn't mounted.
<<<< End of Script >>>>
So i think that the problem is with free space,,, you need to have at least 8gb for minimal installation,,,
xNPx3 said:
Hello, I have a problem using Kali with my Nexus 5 (Android 6.0.1). I have installed Kali NetHunter and Magisk using TWRP. Every time I try to start chroot in the Kali Chroot Manager, everything goes well until it gives me this error and stops:
[-] sdcard /lib/modules/3.4.0-8.14-Re4son-3.5 doesn't exist or isn't mounted. .
What should I do?
Click to expand...
Click to collapse
You have to update nethunter.apk through the f-droid store.
If you encounter problems while installing nethunter, download the app from the web store.The url is at the end of the site in the nethunter store under references to find.
Hi guys, I have a Nexus 5 and It wasn't imposible to chroot too, I guess the problem is to not have enough free space in /system, so I decided to reparttition disk with gparted and adb shell command. I set to 8GB /system and it didn't resolve anything because it caused other issues, I think messing with partitions is a gamble.
I attach to you the bash script that resizes Nexus 5, you can modify it like you want. Then only:
1. "adb push repartition.sh /"
2. "adb push parted /"
3. "adb shell"
4. "chmod +x repartition.sh"
5. "./repartition.sh" or "sh repartition.sh"
Reboot and flash the kali rom you like.
WARNING: IT DOESN'T WORKED FOR ME, I THINK I CHOOSE BAD PARTITION SIZES, AND LATER I HAD TO RECOVER THE PHONE WITH STOCK ROM.
# repartition.sh ###############################################
#!/bin/sh
chmod +x parted
./parted /dev/block/mmcblk0 p
umount /data
umount /sdcard
umount /cache
umount /system
./parted /dev/block/mmcblk0 rm 25
./parted /dev/block/mmcblk0 rm 26
./parted /dev/block/mmcblk0 rm 27
./parted /dev/block/mmcblk0 rm 28
./parted /dev/block/mmcblk0 mkpart primary 193MB 10193MB
./parted /dev/block/mmcblk0 mkpart extended 10193MB 10224MB
./parted /dev/block/mmcblk0 mkpart primary 10224MB 11268‬MB
./parted /dev/block/mmcblk0 mkpart primary 11268MB 15.8GB
./parted /dev/block/mmcblk0 p
./parted /dev/block/mmcblk0 name 25 system
./parted /dev/block/mmcblk0 name 26 crypto
./parted /dev/block/mmcblk0 name 27 cache
./parted /dev/block/mmcblk0 name 28 userdata
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p25
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p27
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p28
./parted /dev/block/mmcblk0 p
mount -a
exit
# EOF #####################################################
Good luck mates.

Categories

Resources