Not enough free space on /system to apply patches - Nexus 7 (2013) Q&A

Just want to give everyone a heads up, when attempting to apply OTA updates to my Nexus 7 2013, I was getting the error: "Not enough free space on /system to apply patches". The error was showing up in the recovery log and I was really confused. I tried reflashing various versions, but still all OTA updates would fail with the same error.
TL;DR: Turns out it was the cache, read on for the fix.
I found the following in the OTA update script:
"apply_patch_space(56661556) || abort("Not enough free space on /system to apply patches.");"
So I assumed that I should have at least 56 MB free in "/system"
Doing df would show this:
Code:
f:\AndroidADT\sdk\platform-tools>adb shell df
Filesystem Size Used Free Blksize
/dev 903.4M 56.0K 903.3M 4096
/sys/fs/cgroup 903.4M 12.0K 903.4M 4096
/mnt 903.4M 0.0K 903.4M 4096
/system 827.8M 819.5M [B]8.3M[/B] 4096
/cache 31.5M 4.2M 27.3M 4096
/data 26.4G 7.9G 18.5G 4096
/persist 14.5M 4.2M 10.2M 4096
/storage 903.4M 0.0K 903.4M 4096
/mnt/runtime/default/emulated: Permission denied
/storage/emulated 26.4G 7.9G 18.5G 4096
/mnt/runtime/read/emulated: Permission denied
/mnt/runtime/write/emulated: Permission denied
I didn't, and I couldn't figure out why.
The answer was, after much searching, is that the error message is wrong.
I found this here (ok, so I can't post links, just Google for "edify_generator.py")
Code:
def CacheFreeSpaceCheck(self, amount):
"""Check that there's at least 'amount' space that can be made
available on [B]/cache[/B]."""
self.script.append(('apply_patch_space(%d) || abort("Not enough free space '
'on [B]/system[/B] to apply patches.");') % (amount,))
Notice that the comment talks about /cache, while the error is showing /system.
Turns out my /cache was formatted incorrectly. All I had to do was reboot into the bootloader and then format the cache.
Code:
adb reboot bootloader
...wait for bootloader to start...
fastboot format cache
I just wanted to post this somewhere because I've been Googling for a while now and I've seen others get this error with no solution.
Oh, and the reason why it got into this messed up state is because I did:
Code:
fastboot flash cache cache.img
This was using the official images from Google. So don't ever do that

When you say cache was formatted "incorrectly", had you converted it to f2fs or something?

Thank you very much AlexPi, I can finally receive OTAs and avoid the hassle of flashing a new image, specially now that they are releasing more images with minor bug fixes for the same Android version (there are now 3 images for 6.0.0). I had one OTA of only 2 MB in size and I didn't want to flash a new image just because of this minor change.
I just enter (stock) recovery mode and selected "wipe cache" and it worked just fine after that, so it wasn't even necessary any USB data cable to execute adb and fastboot commands.
By the way, the error message was indeed wrong and it was already fixed.

Thanks. I also flashed the cache partition because I remember that it was effectively the same as wiping the cache. I guess that is not correct.

Related

113MB of bad blocks on /data...can i be helped???

Edit: summary of what ive tried and failed with.
Wipe all userdata from cwm and amon recovery ... no effect.
erase_image from cwm ... no effect.
fastboot erase ... no effect.
fastboot erase -w ... no effect.
RUU ... no effect.
cat zero to mtd ... no effect.
dd zero to mtd ... no effect.
flash_image (image edited with hex editor to contain only zero's) ... no effect.
fastboot oem task 28 ... no effect.
fastboot oem task 29 ... no effect.
fastboot flash hboot (different partition tables) ... no effect.
I'm out of ideas.
Original post:
Even after clearing all userdata from recovery and erasing userdata from fastboot i am missing over 100mb from /data, but there are no files there taking up the space.
How can i reclaim this space, is it corrupted??? How do i check for (and fix) a corrupt filesystem on android?
I'm thinking of flashing a new HBOOT, oxygen table, but if it's corrupt will it screw it up or fix it?
Below was done from recovery and fastboot and shows the problem, look at how much space is in use on data after wipe.
Code:
[email protected]:~$ sudo su
[email protected]:/home/mercianary# adb shell
/ # mount -a
mount: mounting /dev/block/mmcblk0p2 on /sd-ext failed: No such file or directory
/ # df -hm
Filesystem Size Used Available Use% Mounted on
tmpfs 203.2M 0 203.2M 0% /dev
/dev/block/mtdblock4 95.0M 1.1M 93.9M 1% /cache
/dev/block/mtdblock3 145.0M 132.6M 12.4M 91% /system
/dev/block/mtdblock5 197.6M 187.5M 10.2M 95% /data
/dev/block/mmcblk0p1 3.7G 3.4G 302.9M 92% /sdcard
[B]/ # #wipe all userdata from recovery (amonra 2.0.0)[/B]
/ # mount -a
mount: mounting /dev/block/mmcblk0p2 on /sd-ext failed: No such file or directory
/ # df -hm
Filesystem Size Used Available Use% Mounted on
tmpfs 203.2M 0 203.2M 0% /dev
/dev/block/mtdblock3 145.0M 132.6M 12.4M 91% /system
/dev/block/mtdblock4 95.0M 1.2M 93.8M 1% /cache
[B]/dev/block/mtdblock5 197.6M 113.3M 84.4M 57% /data[/B]
/dev/block/mmcblk0p1 3.7G 3.3G 378.5M 90% /sdcard
/ # reboot bootloader
[B][email protected]:/home/mercianary# fastboot erase userdata
erasing 'userdata'... OKAY[/B]
[email protected]:/home/mercianary# #into recovery again
[email protected]:/home/mercianary# adb shell
/ # mount -a
mount: mounting /dev/block/mmcblk0p2 on /sd-ext failed: No such file or directory
/ # df -hm
Filesystem Size Used Available Use% Mounted on
tmpfs 203.2M 0 203.2M 0% /dev
/dev/block/mtdblock4 95.0M 1.2M 93.8M 1% /cache
/dev/block/mtdblock3 145.0M 132.6M 12.4M 91% /system
[B]/dev/block/mtdblock5 197.6M 113.3M 84.4M 57% /data[/B]
/dev/block/mmcblk0p1 3.7G 3.3G 378.5M 90% /sdcard
/ # ls /data
lost+found
/ # du /data
2 /data/lost+found
4 /data
I'm using
CM7
amonra recovery 2.0.0
N1 Boot table
Any help troubleshooting this would be great, thanks.
did you wipe the /data/ partition in mounts & storage in recovery? try that if not, also try flashing a stock ruu, it will revert and changes made to the MTD Partitions
that was the first thing i tried, no luck. it erased fine but space was still missing
I dont particularly want to flash a RUU or another HBOOT untill i know what's wrong because if there's 100mb of bad nand on my phone i can imagine flashing a RUU or HBOOT going very wrong and leaving me with a very pretty paperweight.
I tried flashing some different hboots, problem still there, it just moves round a bit....
on the original boot table the space is missing on system and data..about 10mb or 20mb on system, the rest on data.
on oxygen and n1 boot table its just missing on data.
I cant seem to reclaim this space
anyone know how to check the disk for errors?
thats bad news, sounds like you may have some corrupt blocks
AndroHero said:
thats bad news, sounds like you may have some corrupt blocks
Click to expand...
Click to collapse
just a few, only 897 of them the phone is still working, so i suppose i'm kinda lucky.
I think i may have screwed it up a few weeks ago when i was messing around with cat, dd, fastboot and flash_image. I remember when i finished messing around i tried to restore my nand backup back on it but it failed, looking back it must have been because it didnt fit anymore due to the bad blocks. This must have been when the corruption occured.
Is it normal to have this many bad blocks? i've never seen more than a few, i'm hoping they aren't actually bad and it just thinks they are because of something stupid i did, is there anything i can do to remove the bad block flag (if there is one???) and then try again?
Code:
/sdcard/badblock # flash_image userdata mtd5.img
mtd: MEMGETBADBLOCK returned 1 at 0x00000000 (errno=0)
mtd: MEMGETBADBLOCK returned 1 at 0x00020000 (errno=0)
mtd: MEMGETBADBLOCK returned 1 at 0x00040000 (errno=0)
mtd: MEMGETBADBLOCK returned 1 at 0x00060000 (errno=0)
mtd: MEMGETBADBLOCK returned 1 at 0x00080000 (errno=0)
mtd: not writing bad block at 0x00000000
mtd: not writing bad block at 0x00020000
mtd: not writing bad block at 0x00040000
...
edited because it put the post over the 30,000 character limit!
...
mtd: not writing bad block at 0x0c520000
mtd: not writing bad block at 0x0c540000
mtd: not writing bad block at 0x0c560000
mtd: not writing bad block at 0x0c580000
error writing userdata: No space left on device
/sdcard/badblock #
That's way too high. NAND blocks usually fail at once and in the same area but not that many at once unless it be software error or a major stressor placed on them. It may be faulty bad block management defuncting those cells. If you could somehow find a way to Secure Erase the NAND, it could help. NAND cells sometimes work fine after this and cell state becomes reset so all those marked bad will be recycled back in use to test. The reason why they can sometimes spring back to perfect retention after a SE is academically quite known.
------------------------------
- Sent via HTC Desire -
I guess that you should use an RUU as it should format nand. If it does not the update wikl fail which mesns that your bad block could never be recoverd. Keep in mind to use RUU and not a PB.img i believe it is safer as long as it comed to bricking the phone. I know that some pvt 1 boards had some bad blocks on nands but never so muny( if it is a pvt1) . Regards
Sent from my LeeDroided Desire HD
I decided to flash a ruu, that was scary, it failed the first time writing /system but successfully recovered itself and worked on the second attempt.
Available space on /data after RUU, 58.44MB not good
looks loke it didnt work, time to re root and get apps2sd, data2sd and the n1 boot table, lets see how i get on with 110MB missing from data, at least it will be fun
mate now that you used the RUU, why don't you return it to HTC for repairs? tell them that it happened whileattempting to update.
mercianary said:
I decided to flash a ruu, that was scary, it failed the first time writing /system but successfully recovered itself and worked on the second attempt.
Available space on /data after RUU, 58.44MB not good
looks loke it didnt work, time to re root and get apps2sd, data2sd and the n1 boot table, lets see how i get on with 110MB missing from data, at least it will be fun
Click to expand...
Click to collapse
mariosraptor said:
mate now that you used the RUU, why don't you return it to HTC for repairs? tell them that it happened whileattempting to update.
Click to expand...
Click to collapse
That's what I was planning to do but I decided against it for several reasons.
I'm not feeling lucky, I dont think I will get away with it this time.
With the nature of the problem I can imagine whoever gets their hands on it at HTC will look into what's happened and discover my warranty's void...paranoid I know.
It doesn't help that there is no RUU for orange UK branded desires, I have to use a dodgy method to unroot (restoring an old backup, removing superuser and su then updating OTA.)
I'm happy with the way it is at the moment, who knows, I might drop it under my car at some point in the near future
anyone know anything about performing a low level format or clearing the bad block map so i can start a fresh???
PS...turns out the stock orange rom doesn't even fit on /system because its missing 10MB of space...damn you orange bloatware...damn you to hell!!!
PPS...Bump.
Get in contact with a dev. I am sure they will help you out to access and do a secure wipe on your memory. Way beyond me for sure

PLEASE HELP! can't mount /cache/!

I've been trying to install custom roms for a few days. Now I finally got one to work. But There is still one mega problem. I can't install or download anything from anywhere. Reason is probably that the cache is f'ed.
When I installed rom I alway got:
E:Can't mount /dev/block/mmcblk1p24 (invalid argument)
Error mounting /cache/!
Skipping format...
Cache wipe complete.
E:Can't mount /dev/block/mmcblk1p24 (invalid argument)
.
.
.
I tried fixing permissions, wiping dalvin cache and wiping data/factory and still the cache wouldn't mount!!!
Now when a rom finaly worked, I couldn't download any apps, because of cache issue. So I went to see what permissions the cache folder had, and it had all permissions.
What should I do now???
sventibolt said:
I've been trying to install custom roms for a few days. Now I finally got one to work. But There is still one mega problem. I can't install or download anything from anywhere. Reason is probably that the cache is f'ed.
When I installed rom I alway got:
E:Can't mount /dev/block/mmcblk1p24 (invalid argument)
Error mounting /cache/!
Skipping format...
Cache wipe complete.
E:Can't mount /dev/block/mmcblk1p24 (invalid argument)
.
.
.
I tried fixing permissions, wiping dalvin cache and wiping data/factory and still the cache wouldn't mount!!!
Now when a rom finaly worked, I couldn't download any apps, because of cache issue. So I went to see what permissions the cache folder had, and it had all permissions.
What should I do now???
Click to expand...
Click to collapse
It would be interesting to see how it's trying to mount the cache partition and what argument it's invalid. On a linux system this information can usually be found in a file called fstab in the /etc folder. I looked for a similar file on my Defy but haven't found one yet (I would need to make a thorough search to find that file) but if I remember well, on android emulator I saw file with a similar name, having the same content as a normal fstab file.
When I'll get home, I'll make a more thorough analysis on my Defy and if I will find something I'll post here my findings in order to help you fix the issue you're having.
FIXED!!! I used adb shell to format the CACHE: partition. It had errors! Now all is working!
The same problem
sventibolt said:
FIXED!!! I used adb shell to format the CACHE: partition. It had errors! Now all is working!
Click to expand...
Click to collapse
Can you explain how have you solved this error? I have the same problem!!! What is the shell command? Thanks!!!
Or you can wipe the cache in recovery, either stock or custom
mys_721tx said:
Or you can wipe the cache in recovery, either stock or custom
Click to expand...
Click to collapse
I've got the same problem and that hasn't worked for me. I'd also like to know how to wipe the cache using adb shell.
I've found the solutions:
in console:
> adb shell
$ su
(press ok when ask for permission on a device)
# format CACHE:
# exit
$ exit
but for me doesn't work
when I try "format CACHE:" I receive:
Code:
blk: partition "" size 1975545856 not a multiple of io_buffer_size 524288
mke2fs -m 0 -j -L cache /dev/block/mmcblk1p24 184467440
blk_format_ext2: failed to exec "/sbin/mke2fs_static": error -1
mke2fs 1.40.8 (13-Mar-2008)
mke2fs: Filesystem larger than apparent device size.
Proceed anyway? (y,n) y
y
Warning: 256-byte inodes not usable on older systems
Filesystem label=cache
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
11534336 inodes, 46116860 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
1408 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
mke2fs: Invalid argument while zeroing block 46116832 at end of filesystem
Writing inode tables: 2/1408
Could not write 8 blocks in inode table starting at 65538: Invalid argument
blk_format_ext2: mke2fs returned 1
W:format: error formatting "CACHE:"
Any ideas? Please help
nero84 said:
I've found the solutions:
in console:
> adb shell
$ su
(press ok when ask for permission on a device)
# format CACHE:
# exit
$ exit
but for me doesn't work
when I try "format CACHE:" I receive:
Code:
blk: partition "" size 1975545856 not a multiple of io_buffer_size 524288
mke2fs -m 0 -j -L cache /dev/block/mmcblk1p24 184467440
blk_format_ext2: failed to exec "/sbin/mke2fs_static": error -1
mke2fs 1.40.8 (13-Mar-2008)
mke2fs: Filesystem larger than apparent device size.
Proceed anyway? (y,n) y
y
Warning: 256-byte inodes not usable on older systems
Filesystem label=cache
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
11534336 inodes, 46116860 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
1408 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
mke2fs: Invalid argument while zeroing block 46116832 at end of filesystem
Writing inode tables: 2/1408
Could not write 8 blocks in inode table starting at 65538: Invalid argument
blk_format_ext2: mke2fs returned 1
W:format: error formatting "CACHE:"
Any ideas? Please help
Click to expand...
Click to collapse
I did the same as you with the same result, but followed it up by booting into recovery and then wiping the cache from there. That appears to have sorted the problem out. I can use the market again and when I'm in recovery the mount error problem has disappeared.
tim440 said:
I did the same as you with the same result, but followed it up by booting into recovery and then wiping the cache from there. That appears to have sorted the problem out. I can use the market again and when I'm in recovery the mount error problem has disappeared.
Click to expand...
Click to collapse
Which version of cwm have you install?
I use the v3.0.2.8 (the last one I think), installed by 2ndInit Recovery Installer v1.7
nero84 said:
Which version of cwm have you install?
I use the v3.0.2.8 (the last one I think), installed by 2ndInit Recovery Installer v1.7
Click to expand...
Click to collapse
Older than that I think. I'll have to check later. I did it in Stock Recovery anyway.
tim440 said:
Older than that I think. I'll have to check later. I did it in Stock Recovery anyway.
Click to expand...
Click to collapse
Ok...I'll try with Stock Recovery soon. For now i've had used only the Custom Recovery
EDIT: I can't use the Stock Recovery. If I tap on the right corner of the screen nothing happen
EDIT2: just press both volume-up AND volume-down at the same time (once you are in the Stock Recovery)...wipe all...and then WORK AGAIN!!!!!! Thank you so much!!!!!
tim440 said:
I did the same as you with the same result, but followed it up by booting into recovery and then wiping the cache from there. That appears to have sorted the problem out. I can use the market again and when I'm in recovery the mount error problem has disappeared.
Click to expand...
Click to collapse
Tks mates. It solve my prob like this too.
My short problem historic:
I bought a German Defy (2.1); I upgrade it with a bad Brazilian 2.2; I fixed with a good Brazilian retail 2.2 version (that Ifound in this forum) and I just fixed my last issue formatting the CACHE, exactly the same way (including the format error and the after cache wipe)
Cheers.

[Q] Internal storage corrupted -- Factory Images do not help

Hi,
I'm posting this Q&A thread as a desperate attempt to figure out what's wrong with my N7 2013.
The problem/symptoms:
After flashing the factory image for 4.4.4 and rebooting, the Camera and Gallery app will crash. This happens after I press the start button on the Android welcome setup screen (after it takes me to the wifi settings). This will happen every single time I try flashing the 4.4.4 factory image.
If I choose to ignore that, the Play Store app will repeatedly crash. No, force closing the app, erasing data, and reopening it will not change anything.
I can't install apps through the Play Store (because of the repeated crashes) but I can flash them with an update.zip created through TitaniumBackup.
I've installed apps such as QuickPic, DiskUsage, and SolidExplorer because they all require access to the internal storage for their functionality. None of these apps can actually access the internal storage.
I can't take and save screenshots.
However, I can look at how much free space I supposedly have via Android settings. The 'storage' screen does show that I have ~12 GB of space remaining (on a 16 GB device).
Luckily, I can access the bootloader and flash as many factory images as I would like to without any issues. I can flash custom recoveries and install ROMs and run those ROMs but I still have identical issues as if I were running the Stock 4.4.4 factory image ROM.
Unusually, the Lollipop (5.0.2) factory image and all Lollipop ROMs that I've tried will never make it past the bootanimation (after thirty minutes of waiting).
I can push zip files just fine in recovery through ADB.
It seems like there's a partition issue that won't be fixed by simply flashing the factory image. Either that or my eMMC is partially broken. I'm all out of ideas.
Running df in adb shell returns this:
Filesystem Size Used Free Blksize
/dev 902.9M 128.0K 902.8M 4096
/sys/fs/cgroup 902.9M 12.0K 902.9M 4096
/mnt/asec 902.9M 0.0K 902.9M 4096
/mnt/obb 902.9M 0.0K 902.9M 4096
/system 827.8M 275.6M 552.2M 4096
/cache 551.7M 9.8M 541.9M 4096
/data 128.0M 53.8M 74.2M 4096
pastebin(.)com/49XuL97d
Could someone suggest any other steps I can take?
Try to use the Fastboot erase functions. Boot into the Bootloader and use these fastboot commands (hitting ENTER after each line):
fastboot erase system -w
fastboot erase boot
fastboot erase recovery
fastboot erase system
fastboot erase userdata
fastboot erase cache
(This will erase everything on your device including the entire OS in the System partition.)
Then copy the extracted factory image you want to use into the same fastboot directory and use the flash-all command in fastboot to re-install the OS along with all other partitions (boot, recovery, etc.)
Followed your instructions. On first boot, the camera and gallery did not crash until I opened them myself. Same with play store app. Still crashes.

Stuck in the bootloop after flashing data.img on Pixel C device.

Hi,
I am stuck in the bootloop after flashing data.img on Pixel C device.
I have done the following steps and have serached around in 100s of forums before posting this. Please bear with me.
My bootloader is unlocked and I have flashed my boot partition with dragon-boot-encryptable-rooted-01092016-1.img so that the data is not encrypted by default.
I have a freshly booted up (new setup) device with default apps installed. I installed one app so that the /data partition contains something. I am firing all commands as root on Ubuntu 14
I then flashboot into TWRP recovery so that I can access root shell through adb. This is not flashing the TWRP recovery, just booting into it.
#adb reboot bootloader
#fastboot boot twrp-3.0.0-0-dragon-ryu-02112016-1.img
#adb shell
~ # whoami
root
~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 1420244 20 1420224 0% /dev
tmpfs 1420244 20 1420224 0% /tmp
/dev/block/mmcblk0p6 396744 452 388100 0% /cache
/dev/block/mmcblk0p7 55453060 304032 55132644 1% /data
/dev/block/mmcblk0p7 55453060 304032 55132644 1% /sdcard
Now, I am interested only in taking image backup of my /data partition which is at /dev/block/mmcblk0p7. I confirmed this by:
/dev/block/platform/700b0600.sdhci/by-name # ls -l
...
lrwxrwxrwx 1 root root 20 Oct 16 07:38 UDA -> /dev/block/mmcblk0p7
...
Now, I fire the make_ext4fs command to create the image.
~#umount /sdcard (optional)
~ # make_ext4fs -s -l 55453060K -a data mydata.img /data
SELinux: Loaded file_contexts contexts from /file_contexts.
Creating filesystem with parameters:
Size: 56783933440
Block size: 4096
Blocks per group: 32768
Inodes per group: 8176
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 13863265
Block groups: 424
Reserved block group size: 1024
Created filesystem with 11/3466624 inodes and 263660/13863265 blocks
mydata.img is created. I do an adb pull on my Ubuntu and fetch the mydata.img and /file_contexts
#adb pull /file_contexts
#adb pull /mydata.img
# du *
20 file_contexts
140888 mydata.img
Now, I convert the mydata.img into raw image file with simg2img.
#./simg2img mydata.img mydata.img.raw
#ls -lrt
-rw-r--r-- 1 root root 17261 Oct 16 13:17 file_contexts
-rw-r--r-- 1 root root 144267780 Oct 16 13:18 mydata.img
-rw-r--r-- 1 root root 56783933440 Oct 16 13:21 mydata.img.raw
Now, I create a directory and mount my raw image into that directory.
#mkdir phonedata
#mount -t ext4 mydata.img.raw phonedata/
I navigate into phonedata and verify the contents. I can see that the app I installed in avaialable under /data/data.
Then, I re-create the image from phonedata mount using make_ext4fs, or I can use the mydata.img fetch by adb pull too.
If I re-create the image, I give file_contexts(fetched) as the -S option to make_ext4fs. One doubt here, if I am re-creating the sparse image, what value should be passed to -l paramtere now?
I got to fastboot and fire these commands.
#fastboot format userdata
#fastboot format data
#fastboot format cache
#fastboot flash data mydata.img { I am confused between data and userdata, which is the correct one. This is mydata.img from adb pull }
#fastboot flash vendor vendor.img { I read in one forum that vendor should be flashed again on a nexus device }
#fastboot reboot
All things take smoothly. When the tab reboot, it shows Google logo, then android flash animation, then it shows 'Android is starting', and then goes back to flash animation. That is, it's stuck in bootloop.
Kindly let me know if there is something with these steps. Or is there is any alternate way to do the same thing. My problem statement is, I need a flashable data.img. I can create TWRP backup and recovery fine, but that's not my requirement.
Thanks!
Edit 1:
I should add, at this point, if I hard boot to fastboot and do a fastboot format userdata followed by fastboot reboot, I am able to boot to device and perform new device setup.
I can also flash system,boot,vendor,recovery and cache.img and perform new device setup normally. This should mean my fastboot/adb are working fine.
Ummmmm
Did you try with smaller sparse image size ?
make_ext4fs -s -l 30000M -a data mydata.img /data
The sparse will grow until max partition size.
Did you play with "img2simg" as well ? (not simg2img)
img2simg mydata.img.raw mydata.img

Help with /dev/block/mmcblkxxx (HTC Desire 816)

The problem started when I flashed the philz touch recovery, and used the "Clear for new rom" in the wipe menu. I then proceeded to try to install two different roms unsuccessfully, as well as trying two different recoveries, and they always return the same error:
Code:
Mount:failed to mount /dev/block/mmcblk0p6
This is a strange error, since using the df command returns the following results:
Code:
tmpfs 683452 160 683292 0% /dev
tmpfs 683452 652 682800 0% /tmp
/dev/block/mmcblk0p42
273948 4408 269540 2% /cache
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /data
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /sdcard
/dev/block/mmcblk1p1 15540224 4846896 10693328 31% /external_sd
If I am understanding this correctly, the ROM should be installed on mmcblk0p44 since it is the internal drive and always has been, not mmcblk0p6, and I don't see why it needs access to mmcblk0p6.
I tried a method of repairing the filesystem using a mkfs.ext4 file, found in a blog.
I then used the following commands after putting the mkfs file in /tmp:
Code:
chmod 777 /tmp/mkfs.ext4
/tmp/mkfs.ext4 -b 4096 -O ^huge_file,^dir_nlink,^ext_attr,^resize_inode,^extra_isize -m 0 /dev/block/mmcblk0p37
After this, I managed to get a ROM to report installing successfully, but when I booted the phone, it got stuck in a boot loop which was better than the immediate booting to recovery, and am now getting the same error again, and I can't boot the phone at all, it just goes into recovery.
I have tried to restore from previous backups, with no luck.
Can anyone help?
jacobjake683 said:
The problem started when I flashed the philz touch recovery, and used the "Clear for new rom" in the wipe menu. I then proceeded to try to install two different roms unsuccessfully, as well as trying two different recoveries, and they always return the same error:
Code:
Mount:failed to mount /dev/block/mmcblk0p6
This is a strange error, since using the df command returns the following results:
Code:
tmpfs 683452 160 683292 0% /dev
tmpfs 683452 652 682800 0% /tmp
/dev/block/mmcblk0p42
273948 4408 269540 2% /cache
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /data
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /sdcard
/dev/block/mmcblk1p1 15540224 4846896 10693328 31% /external_sd
If I am understanding this correctly, the ROM should be installed on mmcblk0p44 since it is the internal drive and always has been, not mmcblk0p6, and I don't see why it needs access to mmcblk0p6.
I tried a method of repairing the filesystem using a mkfs.ext4 file, found in a blog.
I then used the following commands after putting the mkfs file in /tmp:
Code:
chmod 777 /tmp/mkfs.ext4
/tmp/mkfs.ext4 -b 4096 -O ^huge_file,^dir_nlink,^ext_attr,^resize_inode,^extra_isize -m 0 /dev/block/mmcblk0p37
After this, I managed to get a ROM to report installing successfully, but when I booted the phone, it got stuck in a boot loop which was better than the immediate booting to recovery, and am now getting the same error again, and I can't boot the phone at all, it just goes into recovery.
I have tried to restore from previous backups, with no luck.
Can anyone help?
Click to expand...
Click to collapse
Could you please provide me with the mkfs.ext4 binary? The link in that blog has expired.
I'm also having problems with my partitions and can't flash anything. I can't relock the bootloader either.
If you have stock recovery installed on your phone, you should relock the bootloader. Then run the ruu. That should fix the problem.
Thanks in advance.
uhm said:
Could you please provide me with the mkfs.ext4 binary? The link in that blog has expired.
I'm also having problems with my partitions and can't flash anything. I can't relock the bootloader either.
If you have stock recovery installed on your phone, you should relock the bootloader. Then run the ruu. That should fix the problem.
Thanks in advance.
Click to expand...
Click to collapse
Sorry, but I do not have the file anymore due to the fact that I have gone through various hard drive formats and I don't seem to have it on the HTC anymore.
No problem. Thanks for your reply.

Categories

Resources