[Q] Internal storage corrupted -- Factory Images do not help - Nexus 7 (2013) Q&A

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.

Related

Unable to mount data & cache

Hi all, got my kindle fire brick. I think my partition is messed up. I bought a factory cable which able me to install twrp and i succefully(i guess) flashed energy ICS. But it prompt me "e:unable to mount '/data" e:unable to mount '/cache". I were to boot to normal boot it will just boot endlessly but i still can access to fff and twrp.i did some research on repartitioning for kindle fire but i need some guidance. Help is much appreciated
Sent from my GT-I9100 using xda app-developers app
Usually this is a fairly bad indication but do this go to the mount section in twrp and make sure there are no checks in the boxes of data and system if so uncheck them, I know you said data and cache but this should have a check in the box then try a reboot also were you previously using cwmr? If so you may have been bitten by the bug a very unsightly one that generally means the death of your kindle unless you know how to repartition around a broken emmc. What did you do prior to this that caused this to happen?
Also energy is not the best for good mounting just saying...
I was using fireparted to backup my partition when my pc suddenly shut down. Thats when everything screws up. Also my data and cache are not able to check or uncheck. I hope theres a kind soul to guide me through this process
Sent from my GT-I9100 using xda app-developers app
If you ask me I would say its toast but maybe someone knows a way to restore factory partitions I know many are looking for a solution for thier parts only kindle....
From what I understand...
Code:
fastboot oem format
...will rewrite your partition table to stock. And as long as you haven't messed with the partition sizes, your data will stay intact.
Enter:
Code:
shell cat /proc/partitions
To get a list of your current partitions and sizes to check to see if they even exist to begin with. And if so, it's likely just a case of broken or missing mountpoints.
Now, whether or not "fastboot oem format" will restore broken or missing mountpoints, I couldn't tell you for sure; I've never had to try it. But in your situation, it probably couldn't hurt to try.
You can also recreate mountpoints manually if needed.
[Edit:] It has just been explained to me that "fastboot oem format" won't do anything about mountpoints.
Assuming you can get into TWRP and run adb shell, execute the following command...
Code:
adb shell parted /dev/block/mmcblk0 unit b print
Note: version 2.2.0 is missing the parted binary, so you'll need to use 2.1.1
This will give you a detailed layout of your storage device and the filesystems for each partition. I'm running from memory here, but the right column should show the filesystem types it sees for that particular partition. For userdata (which is mounted as data) and cache, those should be ext4. If you don't see that, you need to remake those partitions.
Code:
adb shell mke2fs -T ext4 /dev/block/mmcblk0p10
adb shell mke2fs -T ext4 /dev/block/mmcblk0p11
Then you can repeat the parted command above and see if the commands worked. If the commands were successful, you can use the mount command or it's probably easier to just reboot into TWRP and it should do it automatically.
kinfauns said:
Assuming you can get into TWRP and run adb shell, execute the following command...
Code:
adb shell parted /dev/block/mmcblk0 unit b print
Note: version 2.2.0 is missing the parted binary, so you'll need to use 2.1.1
This will give you a detailed layout of your storage device and the filesystems for each partition. I'm running from memory here, but the right column should show the filesystem types it sees for that particular partition. For userdata (which is mounted as data) and cache, those should be ext4. If you don't see that, you need to remake those partitions.
Code:
adb shell mke2fs -T ext4 /dev/block/mmcblk0p10
adb shell mke2fs -T ext4 /dev/block/mmcblk0p11
Then you can repeat the parted command above and see if the commands worked. If the commands were successful, you can use the mount command or it's probably easier to just reboot into TWRP and it should do it automatically.
Click to expand...
Click to collapse
Pardon me for my Noob-ness, are the code to be execute on pc or on TWRP?
dean11 said:
Pardon me for my Noob-ness, are the code to be execute on pc or on TWRP?
Click to expand...
Click to collapse
Step back a bit and figure out how all of these things work together by reading the first 3 posts here...
http://forum.xda-developers.com/showthread.php?t=1552547
It will be a lot easier for you to understand what you are doing and why you are doing them. It will also explain how and where to run the commands.
kinfauns said:
Step back a bit and figure out how all of these things work together by reading the first 3 posts here...
http://forum.xda-developers.com/showthread.php?t=1552547
It will be a lot easier for you to understand what you are doing and why you are doing them. It will also explain how and where to run the commands.
Click to expand...
Click to collapse
OH MY GOOOOD!!!! MY KINDLE IS ALIVE!!!! THANK YOU SO MUCH @kinfauns!
kinfauns said:
Assuming you can get into TWRP and run adb shell, execute the following command...
Code:
adb shell parted /dev/block/mmcblk0 unit b print
Note: version 2.2.0 is missing the parted binary, so you'll need to use 2.1.1
This will give you a detailed layout of your storage device and the filesystems for each partition. I'm running from memory here, but the right column should show the filesystem types it sees for that particular partition. For userdata (which is mounted as data) and cache, those should be ext4. If you don't see that, you need to remake those partitions.
Code:
adb shell mke2fs -T ext4 /dev/block/mmcblk0p10
adb shell mke2fs -T ext4 /dev/block/mmcblk0p11
Then you can repeat the parted command above and see if the commands worked. If the commands were successful, you can use the mount command or it's probably easier to just reboot into TWRP and it should do it automatically.
Click to expand...
Click to collapse
I have the similar situation.
And when I use "parted" to check my kidle partition, there is no cache, and the userdata is ext2.
Number Start End Size File system Name Flags
1 131072B 262143B 131072B xloader
2 262144B 524287B 262144B bootloader
3 524288B 11010047B 10485760B dkernel
4 11010048B 212336639B 201326592B ext4 dfs
5 212336640B 229113855B 16777216B recovery
6 229113856B 296222719B 67108864B ext4 backup
7 296222720B 306708479B 10485760B boot
8 306708480B 311951359B 5242880B ext4 splash
9 311951360B 848822271B 536870912B ext4 system
10 848822272B 849000447B 178176B ext2 userdata
12 2448000000B 7748000255B 5300000256B fat32 media msftres
When I use the mke2fs to change the file system type, it returns this error
Not enough space to build proposed filesystem while setting up superblock.
Please help!
Thank you in advance!
june12 said:
I have the similar situation.
And when I use "parted" to check my kidle partition, there is no cache, and the userdata is ext2.
Number Start End Size File system Name Flags
1 131072B 262143B 131072B xloader
2 262144B 524287B 262144B bootloader
3 524288B 11010047B 10485760B dkernel
4 11010048B 212336639B 201326592B ext4 dfs
5 212336640B 229113855B 16777216B recovery
6 229113856B 296222719B 67108864B ext4 backup
7 296222720B 306708479B 10485760B boot
8 306708480B 311951359B 5242880B ext4 splash
9 311951360B 848822271B 536870912B ext4 system
10 848822272B 849000447B 178176B ext2 userdata
12 2448000000B 7748000255B 5300000256B fat32 media msftres
When I use the mke2fs to change the file system type, it returns this error
Not enough space to build proposed filesystem while setting up superblock.
Please help!
Thank you in advance!
Click to expand...
Click to collapse
I don't know who or what did that to your partition table, but partitions 10-12 are not right. It looks like mke2fs is complaining because your userdata partition is only ~178KB. I'm also a bit concerned that you've extended the media partition as far as you have. You might have some additional problems there.
The easiest way for you to get started on a fix is to get into fastboot mode with FFF and run...
Code:
fastboot oem format
That will bring your partition table back to stock, so you can run those mke2fs commands to remake those filesystems on the two partitions. You'll also have to remake the media partition in parted. You can find some instructions on how to do that here...
http://forum.xda-developers.com/showthread.php?t=1658885
Hey,
My current ROM is fine, but I can't mount data & cache in TWRP.
Nothing happens when I click mount data or mount cache in TWRP 2.6.3.1
I reflashed twrp two times and checked the md5sum.
When I try to backup my rom:
When I try a factory reset:
This is what I tried in fastboot:
Code:
fastboot oem format
...
OKAY [ 0.064s]
finished. total time: 0.065s
fastboot oem idme bootmode 4000
...
OKAY [ 0.081s]
finished. total time: 0.081s
fastboot reboot
rebooting...
finished. total time: -0.000s
adb shell cat /proc/partitions
major minor #blocks name
7 0 8348 loop0
179 0 7553024 mmcblk0
179 1 128 mmcblk0p1
179 2 256 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 196608 mmcblk0p4
179 5 16384 mmcblk0p5
179 6 65536 mmcblk0p6
179 7 10240 mmcblk0p7
179 8 5120 mmcblk0p8
179 9 524288 mmcblk0p9
179 10 1164288 mmcblk0p10
179 11 262144 mmcblk0p11
179 12 5254144 mmcblk0p12
179 64 512 mmcblk0boot1
179 32 512 mmcblk0boot0
254 0 8347 dm-0
The parted command isn't working for me.
I have never repartitioned them as far as I know.
Wha't wrong with my partitions?

Miroslav's CM11 flashing methods

Hello friends,
I have tried to flash every update of the Miroslav's rom unsuccessfuly. These are the metods I have tried:
SWETNES METHOD: ...Format system partition FIRST then flash ROM, then format cache, then do a FACTORY RESET (format data). First boot takes almost 10 min so be patient...
Click to expand...
Click to collapse
NOTZIPPY METHOD: ...After flash and reboot my phone did not get past the cm logo, I noticed a lot of errors in logcat , so I reboot into recovery and formatted cache and rebooted again, them ROM booted
Click to expand...
Click to collapse
MR.201 METHOD: ...factory reset then just flash the rc1 rom. gaaps is not needed as miroslav already added light gaaps...
Click to expand...
Click to collapse
_CRASS_ METHOD:
As for installing here is exactly what I did:
1) soft reboot to recovery
2) backuped everything through clockwork recovery
3) cleared cache
4) cleared dalvic
5) factory reset
6) install miroslav rom
7) rebooted...it got stuck on the CM logo
8) After about 10 minutes of no go I pulled battery
9) booted to clockwork recovery
10) factory reset
11) installed miroslav rom
12) installed latest kitkat gapps from CM website
13) rebooted
14) after 3-4 minutes I was in the pin screen of CM
Click to expand...
Click to collapse
LILOWEK METHOD: ...There was no rhyme or reason of why it installed. I simply installed it with gapps. No go. Format, clear all cache, install with gapps. Still the same. Did it again, and this time it went through. It booted in about 3 minutes. I suggest if you are having problems installing it to boot to just do it over and over as it will likely take at some point...
Click to expand...
Click to collapse
_CRASS_ METHOD ON RC2:
Installed it today.
Wiped factory data.
Wiped cache
Wiped dalvic
installed miroslav rom
installed gapps
and it booted right away.
Click to expand...
Click to collapse
REALYPSSD METHOD:
It took 2 tries:
Wiped System
Wiped factory data.
Wiped cache
Wiped dalvic
installed miroslav rom
installed gapps
Doing that didn't work, waited 15-20 minutes, was stuck at the CM logo.
Then I tried without flashing GAPPS, and it worked. I flashed GAPPS after I'd initially booted up once.
Click to expand...
Click to collapse
After I tried all these methods, I only softbricked the phone and had to unbrick it. I have a LG NITRO HD P930 and I use Philz Touch 6.19.3. SWETNES user suggest to use CWM 6.0.1.5 because he says CWM 6.0.4.5 has a lot of bugs, and MIROSLAV says he uses CWM 6.0.4.8 (I can't find it)
Also I want to know if in case I flash it successfuly, the rom MUST boot inmediatly first to LG logo then to CM logo or I have to wait watching the LG logo booting over and over for some minutes??
Any comments, suggestions?
Thank you guys.
I am having the same issue as OP
You did not try my suggestion Try flashing the rom then the gapps with adb sideload after wiping everything.
i use philztouch cwm and have had no problem flashing 4.3/4.4 roms with it. i also rooted my n what not when it was on ICS. i think the option in developer section to update cwm wich gave me the newest 6.0.4.8 i think but have been using philztouch till now.
Ive only wiped everything and flashed rom with no problems so far
Thank you for your comments.
Truepeace said:
You did not try my suggestion Try flashing the rom then the gapps with adb sideload after wiping everything.
Click to expand...
Click to collapse
Yeah, I noticed your method but I am kinda stupid and realy dont get clear the steps. I found this guide to flash via sideload and I wonder if it will work with philz touch:
http://android-revolution-hd.blogspot.mx/2013/12/ow-to-use-adb-sideload.html
xxAirwickxx said:
i use philztouch cwm and have had no problem flashing 4.3/4.4 roms with it. i also rooted my n what not when it was on ICS. i think the option in developer section to update cwm wich gave me the newest 6.0.4.8 i think but have been using philztouch till now.
Ive only wiped everything and flashed rom with no problems so far
Click to expand...
Click to collapse
So you recomend Philz Touch?
chortiman said:
Thank you for your comments.
Yeah, I noticed your method but I am kinda stupid and realy dont get clear the steps. I found this guide to flash via sideload and I wonder if it will work with philz touch:
http://android-revolution-hd.blogspot.mx/2013/12/ow-to-use-adb-sideload.html
So you recomend Philz Touch?
Click to expand...
Click to collapse
Maybe you got the same case as I am. Try to use CWM touch 6.0.1.5 . Then factory reset, format /system , then flash the rom. Loading might take several minute(mine was 10 min) then it will boot up properly. I already use philztouch,cwm 6.0.4.5,latest twrp but all of them not working for me in flashing this rom.
Here, I include the attachment for cwm touch 6.0.1.5 in case you're wondering where you want to find it.put it in the root of your sd card.
Then just run adb . Next, run the following command in the adb cmd :
adb shell
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p13
Best of luck, not all guide work for many people and devices
chortiman said:
Thank you for your comments.
Yeah, I noticed your method but I am kinda stupid and realy dont get clear the steps. I found this guide to flash via sideload and I wonder if it will work with philz touch:
http://android-revolution-hd.blogspot.mx/2013/12/ow-to-use-adb-sideload.html
So you recomend Philz Touch?
Click to expand...
Click to collapse
I wonder if this has to do with the way the phones r "unbricked" ? But personally yes I say latest philztouch. Worked great for me. I have latest cwm installed right now 6.0.4.9 & I can't backup so I'll be going back to philztouch.
Another try
I would try hereric's unbricking guide.
Start on step 9, and instead of flashing the provided KDZ use the v10i , download it at lg-phone-firmware.com/index.php?id_mod=17
Good luck
xxAirwickxx said:
I wonder if this has to do with the way the phones r "unbricked" ? But personally yes I say latest philztouch. Worked great for me. I have latest cwm installed right now 6.0.4.9 & I can't backup so I'll be going back to philztouch.
Click to expand...
Click to collapse
Well, I have used the latest philz and it has not worked for me so I will try using CWM 6.0.1.5. And well, it is very complicated to me that stuff about the unbricking because of the "baseband" and other things I dont understand and everybody mentions. I am beginning to believe that it HAS to be flashed over an specific baseband, or am I getting it wrong?
Mr.201 said:
Maybe you got the same case as I am. Try to use CWM touch 6.0.1.5 . Then factory reset, format /system , then flash the rom. Loading might take several minute(mine was 10 min) then it will boot up properly. I already use philztouch,cwm 6.0.4.5,latest twrp but all of them not working for me in flashing this rom.
Here, I include the attachment for cwm touch 6.0.1.5 in case you're wondering where you want to find it.put it in the root of your sd card.
Then just run adb . Next, run the following command in the adb cmd :
adb shell
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p13
Best of luck, not all guide work for many people and devices
Click to expand...
Click to collapse
I will try with this CWM 6.0.1.5. Thank you very much for the download So, with this method I can flash the RC3 directly? the 10 minutes you mention are with the LG Logo screen booting up over and over?
danilo96 said:
I would try hereric's unbricking guide.
Start on step 9, and instead of flashing the provided KDZ use the v10i , download it at lg-phone-firmware.com/index.php?id_mod=17
Good luck
Click to expand...
Click to collapse
The link you provide mention a P936 and mine is a P930. If I install this, will the phone work allright? As I was saying to xxAirwickxx, is it necesary to install this previously to flash the miroslav's rom???
Thank to every one for helping me to get a stable rom in my phone. I really apreciate it. :good:
chortiman said:
Well, I have used the latest philz and it has not worked for me so I will try using CWM 6.0.1.5. And well, it is very complicated to me that stuff about the unbricking because of the "baseband" and other things I dont understand and everybody mentions. I am beginning to believe that it HAS to be flashed over an specific baseband, or am I getting it wrong?
I will try with this CWM 6.0.1.5. Thank you very much for the download So, with this method I can flash the RC3 directly? the 10 minutes you mention are with the LG Logo screen booting up over and over?
The link you provide mention a P936 and mine is a P930. If I install this, will the phone work allright? As I was saying to xxAirwickxx, is it necesary to install this previously to flash the miroslav's rom???
Thank to every one for helping me to get a stable rom in my phone. I really apreciate it. :good:
Click to expand...
Click to collapse
It's not necessary, but the KDZ provided is not the most recent build of the GB, the v10i is most recent.
There's no problema flashing it, there is the p930, the p935 and the p936 which are all variants of the same phone, 930 is for america 935 for canada and 936 for europe i believe.
I couldn't install SphinX , always got bootloop or it booted but some system apps like phone didn't start...
Try that and you will probably succed
also , i use PhillZ and i have no problema :laugh:
In order to flash via sideload, I use this guide very easy once you install everything (android sdk and components)
http://forum.xda-developers.com/showthread.php?t=2318497
I tried hard and failed miserably
Well, its been a while since I started this thread. I tried the adb sideload, tried the CWM 6.0.1.5, tried a clean flash (factory reset, format system), waited boot loops for over 30 minutes and nothing. I did not flash KDZ v10i because that process has been always a pain to me. I will get back to CM 10.1.3 + Wind kernel + adreno drivers (the most stable configuration I know) and wait and see if miroslav fix this issue.
Thank you all for your time.
Yeah,I have tried all this methods but no luck......Just got the LG logo bootloop everytime!!(btw,my phone is su640)
I think people have changed there partition sizes in the past that is why the rom is failing to flash - here is mine and I can flash it
adb shell su -c "df"
Filesystem Size Used Free Blksize
/dev 383.8M 128.0K 383.6M 4096
/sys/fs/cgroup 383.8M 12.0K 383.8M 4096
/mnt/asec 383.8M 0.0K 383.8M 4096
/mnt/obb 383.8M 0.0K 383.8M 4096
/mnt/fuse 383.8M 0.0K 383.8M 4096
/system 662.3M 537.7M 124.6M 4096
/cache 157.6M 6.7M 151.0M 4096
/data 2.2G 935.6M 1.2G 4096
/persist 7.9M 4.9M 3.0M 4096
/mpt 15.8M 10.5M 5.3M 1024
/tombstones 71.9M 68.3M 3.7M 4096
/firmware 64.0M 22.8M 41.2M 16384
/modem 199.8M 27.7M 172.0M 4096
/mnt/media_rw/sdcard0 29.7G 16.9G 12.8G 32768
/mnt/secure/asec 29.7G 16.9G 12.8G 32768
Thanks for helping figure that out.
Sent from my LG-P930 using Tapatalk 2
Finally it works!
After having my su640 kdz(30D/4.1.2),I'm finally succeeded!:victory:
notzippy said:
I think people have changed there partition sizes in the past that is why the rom is failing to flash - here is mine and I can flash it
adb shell su -c "df"
Filesystem Size Used Free Blksize
/dev 383.8M 128.0K 383.6M 4096
/sys/fs/cgroup 383.8M 12.0K 383.8M 4096
/mnt/asec 383.8M 0.0K 383.8M 4096
/mnt/obb 383.8M 0.0K 383.8M 4096
/mnt/fuse 383.8M 0.0K 383.8M 4096
/system 662.3M 537.7M 124.6M 4096
/cache 157.6M 6.7M 151.0M 4096
/data 2.2G 935.6M 1.2G 4096
/persist 7.9M 4.9M 3.0M 4096
/mpt 15.8M 10.5M 5.3M 1024
/tombstones 71.9M 68.3M 3.7M 4096
/firmware 64.0M 22.8M 41.2M 16384
/modem 199.8M 27.7M 172.0M 4096
/mnt/media_rw/sdcard0 29.7G 16.9G 12.8G 32768
/mnt/secure/asec 29.7G 16.9G 12.8G 32768
Click to expand...
Click to collapse
Was able to flash Miro's cm11 Final with this method. Worked first time like a charm.
(My post explaining what I did)
http://forum.xda-developers.com/showthread.php?p=55404877
Sent from my LG-P930 using Tapatalk 2

Not enough free space on /system to apply patches

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.

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