[Q] HTC Desire partially broken - Desire Q&A, Help & Troubleshooting

Hello!
While trying to install S2E i managed to partially ruin the functionality of my phone. I have an HTC Desire (GSM) running Cyanogenmod 7.1 stable release. I have S-off, root and ClockworkMod Recovery v5.0.2.0.
(I wanted to install a new SD card. In the process I managed to loose all my previous SD card data and I only have a 2 months old back-up from when I was running a different android version, so that will not be very helpful at recuperating many things, but even without the old SD card my phone was still operating correctly besides being unable to run the apps installed on the card. I presume this issue is unrelated to my current problem.)
Here is how I've think I've broken the phone:
- I used Gparted to format a new 8 GB microSD card (class 6) with 1 GB ext4 partition and a FAT32 partition.
- I installed S2E and checked all the options for the OS to use the external storage on the SD card partition.
- It turned out that my partition was not correctly identified by the OS (probably the issue was with using the built-in card reader of the laptop and not a stand alone USB card reader).
- I booted into Recovery Mode and re-formated the SD card with 1 GB of ext3, 32 GB of Swap and the rest as fat.
- After the restart the boot process took a very long time. When the OS finally booted I practically had a fresh install with none of my old settings available (shortcuts, wallpaper, apps etc.). Even the apps stored on the local memory disappeared (S2E, ROM manager, gmail, market etc.) and my home button no longer works. I am unable to receive phone calls since the phone automatically rejects incoming calls. I see incoming calls in the call log and I can make outgoing calls.
I presumed the issue is with mounting the sd-ext partition, but even if I tried to manually mount it after boot I see no change.
I followed these guides to install parted and use 32fsck to see if the partitions are corrupt. I think I have no problems.
Here are the code reports of running parted:
Code:
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk0: 7965MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 6909MB 6909MB primary fat32 lba
2 6909MB 7933MB 1024MB primary ext3
3 7933MB 7965MB 32.0MB primary linux-swap(v1)
and e2fsck:
Code:
e2fsck /dev/block/mmcblk0p2
e2fsck 1.41.6 (30-May-2009)
sd-ext: clean, 1091/499712 files, 129331/999425 blocks
Here is my fstab as well:
Code:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/mtdblock5 /data yaffs2 rw
/dev/block/mtdblock3 /system yaffs2 rw
/dev/block/mmcblk0p1 /sdcard vfat rw
/dev/block/mmcblk0p2 /sd-ext ext3 rw
I presume that a fresh OS install will fix the issues. However I hope I can recover the settings stored on the ROM if I fix the sd-ext partition issue.
I will appreciate any suggestions you might have.
ps: adb push and fstab pull is working only when phone is in Recovery. If the CM7.1 is booted there is no fstab in /etc.

Had a similar issue sometime ago. Sorry to say couldn't fix it. In fact I would say the amount of time you spend trying to fix that issue will outway a fresh install.
If you can do a full backup still and save it to your pc you could do a fresh install and work on the issue without loss of phone functionality. Just my thoughts...

Thanks for your advice!
I ended up going for a fresh install with CM7.1 and S2E.
Thinks are ok now the only problem I have is that I don't see the 1 GB of available space reported correctly. Something like 152 MB is free and a negative value is reported as the used space. The CM option of using expanded internal storage is dimmed but I am not sure if that should be different.

mindcsrusher said:
Thanks for your advice!
I ended up going for a fresh install with CM7.1 and S2E.
Thinks are ok now the only problem I have is that I don't see the 1 GB of available space reported correctly. Something like 152 MB is free and a negative value is reported as the used space. The CM option of using expanded internal storage is dimmed but I am not sure if that should be different.
Click to expand...
Click to collapse
No problem. Glad you sorted the issue.
I know with a2sd using standard settings won't show the true size of the parition wont be reported. Something to do with the way it works. If it's working well and letting you install apps with no problems I wouldn't worry too much about

Related

Applications to your SD card ?

Hi guys,
sorry because this has probably been answered somewhere but I couldn't find it ....
So here it goes: I just installed Modaco's ROM and it works perfectly. Now I would like my apps to install directly on the SD card.
What I understand is that I need to create a EXT3 partition but I don't know what the hell that means, nor how to do it.
I just put my SD card in the hero, didn't format anything ....
Dould you give a step by step guide ? On how to create that EXT3 partition, how to use A2SD afterwards ? Also, what to do with the currently installed applications ?
Thanks
Geeum
Dould you give a step by step guide ?
Click to expand...
Click to collapse
http://androidandme.com/2009/08/news/how-to-manually-partition-your-sd-card-for-android-apps2sd/
how to use A2SD afterwards?
Click to expand...
Click to collapse
Just use MoDaCo's custom ROMs. (It will do it automatically)
can app2sd work with official ROMs not rooted?
Hi guys I finally partitioned my sdcard to have an ext3 partition.
I thought A2SD was automatic but apparently applications don't go to the sdcard: my phone memory has changed after I installed an app ...
Here is what I get if I type the 'print' command on parted
Code:
(parted) print
print
print
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk0: 8166MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 7110MB 7110MB primary fat32 lba
2 7110MB 8134MB 1024MB primary ext3
3 8134MB 8166MB 32.3MB primary linux-swap(v1)
So I DO have ext3. Then I found this post that explains how to check if A2SD is working:
Thanks! Here is my way to check if a2sd is working:
Check if the ext3 partition exists (please see androidandme.com for details):
Code:
# mount | grep mmcblk0p2
mount | grep mmcblk0p2
/dev/block/mmcblk0p2 on /system/sd type ext3 (rw,noatime,nodiratime,errors=continue,data=ordered)
Compare available/used space on mmcblk0p2:
Code:
adb shell
# df
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98520 0 98520 0% /dev
tmpfs 4096 0 4096 0% /sqlite_stmt_journals
/dev/block/mtdblock3 174080 153460 20620 88% /system
/dev/block/mtdblock5 169728 27240 142488 16% /data
/dev/block/mtdblock4 133120 1160 131960 1% /cache
/dev/block/mmcblk0p2 468331 11767 431579 3% /system/sd
Now install an app from the market (as suggested by fleming222) and again run "df". Compare the available (or used) space on /dev/block/mmcblk0p2 with the first "df".
Click to expand...
Click to collapse
This is what I get (I can see on the first line that my ext3 is not listed ... weird)
Code:
/ # mount | grep mmcblk0p2
mount | grep mmcblk0p2
/ # df
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98508 0 98508 0% /dev
/dev/block/mtdblock4 133120 1496 131624 1% /cache
HELP !
By the way I'm running MODACO's 2.6 custom ROM ...
Geeum said:
By the way I'm running MODACO's 2.6 custom ROM ...
Click to expand...
Click to collapse
The best way to do it if your not too good with the adb commands is to install the AMON recovery image for Hero.
It has all the options to create the correct sd card partitions from the recovery mode, then just install your custom rom and everything should work.
You will need to format your sd card so you may want to create a backup of it. And I would suggest that you wipe the phone clean as well. Once you install the modaco rom it automatically moves all of your apps to the sd card.
The link for the recovery image is here:
http://forum.xda-developers.com/showthread.php?t=561124
You will also need Instant Root (http://neilandtheresa.co.uk/Android/), which you should install first, it is an .apk file so you will need a file manager for your phone. It should pop up with a notification "instant root was successfully" or along those lines. (If you have a problem installing Instant Root make sure Settings>Applications>Unknown Sources is checked)
You should then place the AMON recovery image onto the sdcard making sure it is not put into any folders (root).
Instant root then allows for root access with adb shell using the following 2 commands:
1) adb shell
then
2) su
the icon should change from a $ to #.
Now flash the recovery image with the following command:
flash_image recovery /sdcard/recovery-RA-HERO-v1.2.3.img
That should do it, remove the usb and battery and once you have replaced the battery boot into recovery mode.
I ran the following commands in this order from recvoery mode:
- Wipe data + cache (factory reset)
- Wipe ext partition on SD-card
- Wipe Dalvik-cache on SD-card (NOT on /data !) [email protected] ALWAYS WORK
- Partition SD-card : 500MB Ext2, 32MB Swap, remaining Fat32
- Convert ext2 to ext3
- Installed ROM
Hope this helps
Hi and thanks for your reply. I finally sorted my problem, I was typing the commands from the recovery console, and now my ext3 shows:
Code:
# mount | grep mmcblk0p2
mount | grep mmcblk0p2
/dev/block/mmcblk0p2 on /system/sd type ext3 (rw,noatime,nodiratime,errors=conti
nue,data=ordered)
I checked the space with df, and I can see it changing when installing apps.
However, so does the 'internal memory of the phone' in the settings panel; it keeps getting smaller as I install apps
Why is that ?
really want to do this but i find it all to hard and confusing
Geeum said:
I checked the space with df, and I can see it changing when installing apps.
However, so does the 'internal memory of the phone' in the settings panel; it keeps getting smaller as I install apps
Why is that ?
Click to expand...
Click to collapse
I think this is inevitable as the app uses some part of the phone memory for cache files etc (I am not 100% certain on this, just saw it written in an older post on the same topic).
I do not know if this is a coincidence but for some reason I have tried partitioning manually (the way your doing it) in the past and have recently used the AMON recovery image for partitioning instead. I notice that the recovery image tends to use less of the internal storage for each installed app, I don't know why but you could try it out yourself.
guys, i am using modaco's 2.6 rom. so if i just create partitions this custom rom will automatically install newly installed apps to the sd card. right?
but what if i already got many apps installed? will those be deleted while creating partitions?
is there any way so that i can backup the whole application folder and restore after creating partitions?
cheers
apparently if you do ext2 + swap + fat32, you can't do a Nandroid backup (it keeps giving errors). anyone got similar issues?
kazuni said:
apparently if you do ext2 + swap + fat32, you can't do a Nandroid backup (it keeps giving errors). anyone got similar issues?
Click to expand...
Click to collapse
is it so? if so then that wud be a disaster.

[Q] Borked Desire upgrade from official Froyo to Leedroid Gingerbread

Tonight I decided to try an upgrade on my rooted Desire with ClockwordMod installed. I originally had the official Froyo ROM and downloaded the latest Leedroid Gingerbread ROM to give it a go.
All was going swimmingly until on reboot it took far longer than the expected 20 minutes or so to boot.
I pulled the battery and now the phone is stuck in a reboot loop at the 'Leedroid Android' splash screen.
I get the impression something may have gone wrong with the ext3 alignment patch somehow as I can't mount my sdcard to either reflash the leedroid ROM or revert back to the official ROM.
The output of parted from a terminal window shows the following:
Code:
/sbin # parted /dev/block/mmcblk0 print
parted /dev/block/mmcblk0 print
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk0: 3942MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
2 10.8kB 3942MB 3942MB primary
So it looks like I've somehow lost my file system on my sdcard.
Anyone have any suggestions as to the quickest fix out of this?
Just realised this is in the wrong section... could a mod move please?
Try reformat the SD card with a 100% size FAT32 partition (use a card reader to do that, had this bug one time, i couldnt resize with the phone as a card reader). I recommend you this software (windows) : MiniTool Partition Wizard Home Edition
Search it on google. use this video if you dont know how to use it :http://www.youtube.com/watch?v=aCV7Eu1pjWQ
Just create a partition FAT32, Primary, set the size, and a ext3, primary, set the leaving size (max 1.5gb) apply and wait
Once it's done, you can repart the SD card with FAT+ ext3
put files on your sd card.
I flashed the first time with the zip alignment patch, had the same bug than you, retried after full wipe without the patch, juste rom and reboot, and everything was ok.
so wipe and reflash
tell us if it works
Thanks! Before I wipe completely as a last resort, is there any alternative way of recovering what's on the SD card? Unfortunately the last backup I made of its contents is over a month old...

[Q] Getting ext3/4 partition for InsertCoin ROM...

Quick summary:
Recently got new SanDisk 16GB MicroSD and used CWM 5.0.2.0 to create a 1024mb ext partition. It says "successful" but I don't think it really did successfully create the ext partition. Tried to partition manually using 'parted' with no luck.
Any ideas/suggestions on how to partition properly?
Gory details...
Using HTC Desire GSM that is already S-OFF-ed and running InsertCoin 1.0.8 (on old 2GB sd card).
With arrival of new SD card I thought great, upgrade to InsertCoin 1.1.1 (was going to go for 1.1.3 but saw that it had a couple of problems)
Done it all before, easy enough I thought...
* Swap SD Cards
* Format SD with 1024mb ext, 0mb swap via CWM (originally using older than v5)
* Wipe settings, wipe cache, wipe dalvik cache
* Put Insertcoin zip onto sd card
* Install & reboot
Then it hung...forever on reboot (forever being 30min+)
Tried the above couple of times (eg. upgrade CWM) etc... and even tried putting the old 1.0.8 on - but still nothing just hung on boot screen. Put old SD card back in, and everything worked again (lost settings etc, but it booted up into Android)
So I started investigating and ended up looking into the partitioning of the new SD card....
Here is the output of "print" from "parted"
Code:
Model: SD (sd/mmc)
Disk /dev/block/mmcblk0: 16.3GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 15.3GB 15.3GB primary fat32 lba
2 15.3GB 16.3GB 1024MB primary
(note the missing 'ext3' under file system for partition 2)
So I then upgraded to latest CWM (as per their website) then tried the partition again... same result as above.
Then I went and followed manual partitioning tutorials (eg. http://forum.xda-developers.com/showthread.php?t=534714, and a couple of others on the web) and still "print" gave the above output.
With the manual partitioning, I thought, maybe it's just silently not showing ext2 but it really is ext2, will just upgrade it to ext3 and see if it'll show ext3...
So I ran "sdparted --upgradefs ext3" (for some reason upgrade_fs could not be found)... and that failed, giving:
Code:
checking script requirements...done
unmounting all partitions...done
you have chosen to upgrade /dev/block/mmcblk0p2 to ext3.
this action will NOT delete any data from sdcard.
do you want to continue? (Y/n) Y
adding journaling to /dev/block/mmcblk0p2.../sbin/e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p2
/sbin/tune2fs: Bad magic number in super-block while trying to open /dev/block/mmcblk0p2
Couldn't find valid filesystem superblock.
done
So, now all I can think of is for whatever reason, the ext partition isn't being created properly on my sd card, thus the reason it is hanging on boot screen (read somewhere that if you don't have an ext partition, it will never get past boot screen).
Reason I believe the ext partition isn't being created properly is because in all tutorials they all have "ext2 or ext3" in the output. Even more so, checking my old SD card I get the following:
Code:
Model: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk0: 2003MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 979MB 979MB primary fat32 lba
2 979MB 2003MB 1024MB primary ext3
(Note: old SD card has ext3... this was partitioned using CWM)
Am I missing something super obvious? or doing something wrong?
How am I meant properly create an ext3 partition (and make sure it has been created) on the SD card?
Any help would be greatly appreciated!!!
Thanks!!!
pyko
ps. not sure if this fits in this forum... but it is a question regarding my htc desire...
Try using Gparted, not parted.
gparted as in: http://gparted.sourceforge.net/
ie. a standalone application to partition the sdcard?
Indeed
10char
Or you can use this: http://www.partitionwizard.com/free-partition-manager.html You can create EXT4 partition without changing cluster size (which is why I ditched EaseUS).
Terepin said:
Or you can use this: <URL Removed for the sake of Humanity> You can create EXT4 partition without changing cluster size (which is why I ditched EaseUS).
Click to expand...
Click to collapse
or you can read my Sig
Gparted is the way forward, never fails ;-)
Sent from my HTC Desire using Tapatalk
Ok, it seems like using gparted failed
* Downloaded ISO, burnt to cd, booted up into gparted
* deleted all partitions on sd card
* allocated partition 1 as primary, fat32 (15gb)
* allocated partition 2 as primary, ext3 (1gb)
* apply
gparted went along it's merry way and said everything was created etc - but afterwards it shows a yellow triangle/exclamation "warning" icon next to ext3 partition.
Doing a check fails (error shows the same magic number problem as above) and that partition then becomes "unknown".
I tried formatting to each (ext2, ext3, ext4) but going back to parted and checking via 'print' none of them showed 'ext2/3/4 in the FileSystem column'
Note... ext3/4 both showed yellow warning icon, ext2 didn't (it seemed fine, but still didn't show up as ext2 in parted->print)
Any more ideas what is going on?
ps. using a mac, so can't use partitionwizard.
pps. took a screenshot whilst in gparted... but can't find the screenshot!
If you had a Windows pc I would recommend using h2testw.exe to run tests on the card. It would ascertain if there is a fault on it. I dont know if mac users have a wine equivelant to run .exe's?
Pulled out my old dell laptop and ran the check..
Indeed it seems like the disk is corrupted
Code:
The media is likely to be defective.
1.8 GByte OK (3808784 sectors)
13.3 GByte DATA LOST (28072432 sectors)
Details:56 KByte overwritten (112 sectors)
0 KByte slightly changed (< 8 bit/sector, 0 sectors)
13.3 GByte corrupted (28072320 sectors)
56 KByte aliased memory (112 sectors)
First error at offset: 0x00000000743c2000
Expected: 0x00000000743c2000
Found: 0x00000003ccef0000
H2testw version 1.3
Writing speed: 5.24 MByte/s
Reading speed: 6.27 MByte/s
H2testw v1.4
Is there a way I can fix it? This is a new disk btw
Where did you buy it?
That result to me makes me think its a fake. That its really a 2GB card rebranded and faked to look like a 16GB.
I ordered it from: http://www.crazysales.com.au/
In fact, sometime last year, I ordered both my HTC Desire and a 16GB SD card from them and both worked fine. Until couple months back the SD card suddenly died (completely dead - nothing would recognise it) so I asked for warranty.
After ~1mth, finally got the new replacement card (ie the one discussed in this thread). I guess so far, it seems to be a fake...
ps. the new replacement that they sent to me was not in its original packaging - it was simply placed in the case that I used to send the dead card.
I use 4EXTRecovery and works fine from recovery, easy and fast.
Not sure if that will help me unfortunately I do believe rootSU is right - it is actually a 2GB card made to look like a 16GB card.. the tests seem to indicate that, and I pulled in ~4GB worth of data to the card, the first ~1.8GB worked just fine and then afterwards all the files were corrupt.
Sent an email to crazysales ... now just waiting to see their response...
That is why you always should buy from trustworthy retailers.

[BETA 0.2.1][04.01.12] ICS for Desire help

Hello guys,
I have installed the above rom by Sandvold, rom is running well. I have intermediate technical skills but have been out of it for a bit. The rom is working well, no issues, but the rom thread mentions a lot about apps2sd, etc, and running scripts. My appps allocation is as follows, 99mb used and 49mb free. Should I be doing something to dalvik cache, running a script to allocate more space or ensuring everything is installed on the SD card. I am posting here becuase they dont like posts such as this in that thread. I would appreciate a small tutorial about this situation please i.e. what I shlould be doing after installing the rom so that i can get maximum space free on my phone.
many thanks in advance.
moghm said:
Hello guys,
I have installed the above rom by Sandvold, rom is running well. I have intermediate technical skills but have been out of it for a bit. The rom is working well, no issues, but the rom thread mentions a lot about apps2sd, etc, and running scripts. My appps allocation is as follows, 99mb used and 49mb free. Should I be doing something to dalvik cache, running a script to allocate more space or ensuring everything is installed on the SD card. I am posting here becuase they dont like posts such as this in that thread. I would appreciate a small tutorial about this situation please i.e. what I shlould be doing after installing the rom so that i can get maximum space free on my phone.
many thanks in advance.
Click to expand...
Click to collapse
After flashing the ROM reboot into RECOVERY and flash amarullz script.
Goodwin_TJ said:
After flashing the ROM reboot into RECOVERY and flash amarullz script.
Click to expand...
Click to collapse
And make sure your SD card has a FAT32-partiton with rest available space and an EXT4-partition with at least 512 MB, better 1 - 2 GB. If you configure(d) your SD card with GParted, check that both partitions are primary.
moghm said:
I would appreciate a small tutorial about this situation please i.e. what I shlould be doing after installing the rom so that i can get maximum space free on my phone.
Click to expand...
Click to collapse
I had the same problem as you do, and I found a script that made it work for me at least.
First off I wiped the whole phone clean, including the SD Card.
After that I formated the SD card like this (3965 MB card)
0 - 2909 fat32
2909 - 3933 ext4
3933 - 3965 linux-swap
How you do this is by going into the phone with ADB and do the following (Im using Windows7 so I used commandpromt):
Open commandprompt and type in "adb shell" (Assuming you have the requirments for this).
Once in you should se somethine like this "~ #" or "/ #". After this you type "parted /dev/block/mmcblk0"
This will give a prompt like this "<parted>", here you can type "print" and and see the exact size of your SDcard in MB and your current partitioning.
Decide how you want to partion your card (I used 1024 MB ext4 partion for my apps)
Remove your current partitions with "rm 1" where the 1 stand for the partition number. You should see thoose numbers when you type in "print"
When you removed all you can begin to create the new partitions by doing this:
mkpartfs primary fat32 0 2909
mkpartfs primary ext2 2909 3933 (You have to creat a ext2 partion first and then "upgrade it" to an ext4)
mkpartfs primary linux-swap 3933 3965
Type "print" again to make sure you have the correct sizes and all partitions you want, if you have then type "quit"
Now you have to "upgrade" the ext2 partition to an ext4. This you have to do in 2 steps.
First from ext2 to ext3. In the "/ #" promt type the following: "tune2fs -j /dev/block/mmcblk0p2" where the 2 is for partition number 2. After this you should have a ext3 partition instead of a ext2.
From ext3 to ext4 you do this:
"tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2"
"e2fsck -fpDC0 /dev/block/mmcblk0p2"
Now when you have the partitions right you can move on to installing the ROM on the phone.
First you should download the old files that is in the bottom of this thread http://forum.xda-developers.com/showpost.php?p=10692249&postcount=1299
Extract the zip folder and send over the "A2SDKillerV5.zip" and "Data2SDInstallerV5_aosp.zip" to your SDcard.
From recovery install the ROM. When it is done, move back to the menu and do not reboot. Instead install the "A2SDKillerV5.zip" and when that is done reboot the phone and make sure it boots correctly. Take the "on first start" guide but do not login to your google-account. And do now download any apps or even go into market. After this reboot into recovery mode again.
When back in recovery mode, install the "Data2SDInstallerV5_aosp.zip". When its done you can reboot and you should have ~1GB to install apps on (Or whatever size you choosed)
Hope this will help you as much as it did to me
Kind regards Cykelstyre
CykelStyre said:
I had the same problem as you do, and I found a script that made it work for me at least.
First off I wiped the whole phone clean, including the SD Card.
After that I formated the SD card like this (3965 MB card)
0 - 2909 fat32
2909 - 3933 ext4
3933 - 3965 linux-swap
How you do this is by going into the phone with ADB and do the following (Im using Windows7 so I used commandpromt):
Open commandprompt and type in "adb shell" (Assuming you have the requirments for this).
Once in you should se somethine like this "~ #" or "/ #". After this you type "parted /dev/block/mmcblk0"
This will give a prompt like this "<parted>", here you can type "print" and and see the exact size of your SDcard in MB and your current partitioning.
Decide how you want to partion your card (I used 1024 MB ext4 partion for my apps)
Remove your current partitions with "rm 1" where the 1 stand for the partition number. You should see thoose numbers when you type in "print"
When you removed all you can begin to create the new partitions by doing this:
mkpartfs primary fat32 0 2909
mkpartfs primary ext2 2909 3933 (You have to creat a ext2 partion first and then "upgrade it" to an ext4)
mkpartfs primary linux-swap 3933 3965
Type "print" again to make sure you have the correct sizes and all partitions you want, if you have then type "quit"
Now you have to "upgrade" the ext2 partition to an ext4. This you have to do in 2 steps.
First from ext2 to ext3. In the "/ #" promt type the following: "tune2fs -j /dev/block/mmcblk0p2" where the 2 is for partition number 2. After this you should have a ext3 partition instead of a ext2.
From ext3 to ext4 you do this:
"tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2"
"e2fsck -fpDC0 /dev/block/mmcblk0p2"
Now when you have the partitions right you can move on to installing the ROM on the phone.
First you should download the old files that is in the bottom of this thread http://forum.xda-developers.com/showpost.php?p=10692249&postcount=1299
Extract the zip folder and send over the "A2SDKillerV5.zip" and "Data2SDInstallerV5_aosp.zip" to your SDcard.
From recovery install the ROM. When it is done, move back to the menu and do not reboot. Instead install the "A2SDKillerV5.zip" and when that is done reboot the phone and make sure it boots correctly. Take the "on first start" guide but do not login to your google-account. And do now download any apps or even go into market. After this reboot into recovery mode again.
When back in recovery mode, install the "Data2SDInstallerV5_aosp.zip". When its done you can reboot and you should have ~1GB to install apps on (Or whatever size you choosed)
Hope this will help you as much as it did to me
Kind regards Cykelstyre
Click to expand...
Click to collapse
Much easier to install 4ext recovery.
I know I probably shouldn't be doing this but: When I was running a Gingerbread Rom the stock player found my music on my SD card. When moving to this rom, it refuses to find ANY music in the card. Downloaded some third party players like Poweramp etc and still it refuses to find my music. Don't know what to do now (Trivial I know but I really want to play around with the ICS rom but I do listen to music a lot so it's a hinderence that it doesn't work)
Zenamez said:
I know I probably shouldn't be doing this but: When I was running a Gingerbread Rom the stock player found my music on my SD card. When moving to this rom, it refuses to find ANY music in the card. Downloaded some third party players like Poweramp etc and still it refuses to find my music. Don't know what to do now (Trivial I know but I really want to play around with the ICS rom but I do listen to music a lot so it's a hinderence that it doesn't work)
Click to expand...
Click to collapse
Is that with the latest one, 3.4?
I had the same problem with 3.3, but its ok with 3.4. I have my music back.
When going from 3.3 to 3.4 I cleaned the folders on my sdcard. I dont know if that helped, maybe worth a try though. Heres what I did
Mount usb in recovery, deleting all folders except the ones I wanted to keep, ie music, pictures, titanium backup etc
Full wipe
Install rom
My music came back
I thought that ROM had A2SD built in and you just needed to run an adb command to enable it?
I've flashed this ROM & followed the instruction in running the script in the command prompt rebooted all's well here!

[Q] Error formatting /data! Error formatting /cache!

Using CWM 5.0.2.0, when I try to format /data, I get:
Error formatting /data!
When I try to format /cache, I get:
Error formatting /cache!
This all started because I decided to try Albinoman's AOSP 4.2 ROM. This is what happened:
1. Booted into CWM 5.0.2.0, made a nandroid backup of stock GB ROM.
2. Installed Albinoman's ROM using CWM, wiped /cache and /data.
3. Booted Albinoman's ROM, no problems. Decided I wanted to backup and restore some apps in the old ROM using Titanium Backup.
4. Restored nandroid backup of stock ROM. When it rebooted, all was well.
5. Used Titanium Backup to back up my apps.
6. Installed Albinoman's ROM again.
7. Cleared /data, it was fine. Cleared /cache. Stuck at "formatting" for half an hour.
8. Rebooted back to recovery and tried it again. Couldn't find E:.
9. Tried letting it boot. Stuck on the boot animation for 30-minutes.
10. Wipe everything and re-flash. Tried again. Still stuck on boot animation.
11. Manually unmount and tried to format /data and /cache, and I get the error messages.
I had installed Convert2Ext4_no_data_limit_normal_dalvik.zip to the stock ROM about 4-months ago, not sure if that makes a difference or not.
When I search, it looks like the news is bad... most people that had this error gave up and believed it to be hardware NAND failure. Anything I can do to confirm or rule out NAND failure?
UPDATE: Managed to flash RUU, but results were interesting. It worked and it boots, home screen is blank (no HTC widgets), and apps I'd installed are still there. Clear Storage and Factory Reset does not get rid of them! I can manually uninstall apps, but when I reboot, they come back. I guess the /data must be stuck in some kind of read-only state.
GnatGoSplat said:
Using CWM 5.0.2.0, when I try to format /data, I get:
Error formatting /data!
When I try to format /cache, I get:
Error formatting /cache!
This all started because I decided to try Albinoman's AOSP 4.2 ROM. This is what happened:
1. Booted into CWM 5.0.2.0, made a nandroid backup of stock GB ROM.
2. Installed Albinoman's ROM using CWM, wiped /cache and /data.
3. Booted Albinoman's ROM, no problems. Decided I wanted to backup and restore some apps in the old ROM using Titanium Backup.
4. Restored nandroid backup of stock ROM. When it rebooted, all was well.
5. Used Titanium Backup to back up my apps.
6. Installed Albinoman's ROM again.
7. Cleared /data, it was fine. Cleared /cache. Stuck at "formatting" for half an hour.
8. Rebooted back to recovery and tried it again. Couldn't find E:.
9. Tried letting it boot. Stuck on the boot animation for 30-minutes.
10. Wipe everything and re-flash. Tried again. Still stuck on boot animation.
11. Manually unmount and tried to format /data and /cache, and I get the error messages.
I had installed Convert2Ext4_no_data_limit_normal_dalvik.zip to the stock ROM about 4-months ago, not sure if that makes a difference or not.
When I search, it looks like the news is bad... most people that had this error gave up and believed it to be hardware NAND failure. Anything I can do to confirm or rule out NAND failure?
UPDATE: Managed to flash RUU, but results were interesting. It worked and it boots, home screen is blank (no HTC widgets), and apps I'd installed are still there. Clear Storage and Factory Reset does not get rid of them! I can manually uninstall apps, but when I reboot, they come back. I guess the /data must be stuck in some kind of read-only state.
Click to expand...
Click to collapse
Did you reflash the Convert2Ext4 mod after you flashed the new rom? See this thread and read the top part after 'IMPORTANT:' There is a link in there to the old thread as well with a lot of info.
I did try that, but my /data and /cache are still unable to be written to, wiped, or formatted.
e2fsck won't touch /data, it has a superblock error. It finds errors on /cache and appears to be fixing them, but when I re-run it, the same errors are still there.
GnatGoSplat said:
I did try that, but my /data and /cache are still unable to be written to, wiped, or formatted.
e2fsck won't touch /data, it has a superblock error. It finds errors on /cache and appears to be fixing them, but when I re-run it, the same errors are still there.
Click to expand...
Click to collapse
Since you flashed the RUU, did you install an EXT4 compatible kernel or are you using the stock kernel? Maybe try restoring your working nandroid backup, then run the .zip to revert Convert2Ext4. Or even better, if you have a nandroid from before you installed the EXT4 mod.
DaggerDave said:
Since you flashed the RUU, did you install an EXT4 compatible kernel or are you using the stock kernel? Maybe try restoring your working nandroid backup, then run the .zip to revert Convert2Ext4. Or even better, if you have a nandroid from before you installed the EXT4 mod.
Click to expand...
Click to collapse
Wiping /data and /cache are enough to revert the mod.
Sent from my Galaxy Nexus using Tapatalk 2
Uggh, definitely doesn't sound so good. Since the RUU won't work, I'd say check out this thread:
http://forum.xda-developers.com/showthread.php?t=2123966
Yep, my partitions are no longer EXT4. #1 is EXT3 and #2 is EXT2. I guess that means Convert2Ext4 is no longer in play and the problem is unrelated.
Here is my parted:
Code:
parted /dev/block/mmcblk0 print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7944MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext3
2 797MB 1007MB 210MB primary ext2
3 1007MB 7944MB 6937MB primary fat32 lba
Yeah, I read that thread and it didn't sound encouraging! I get pretty much the same errors.
Even rm 1 and rm 2 don't remove the partitions. It's like they're read-only. I'm using the parted from CWM 5.0.2.0. Should I use a different one?
Also when I try e2fsck on it:
Code:
~ # e2fsck -pf /dev/block/mmcblk0p1
e2fsck -pf /dev/block/mmcblk0p1
/dev/block/mmcblk0p1: recovering journal
e2fsck: unable to set superblock flags on /dev/block/mmcblk0p1
~ # e2fsck -pf /dev/block/mmcblk0p2
e2fsck -pf /dev/block/mmcblk0p2
/dev/block/mmcblk0p2: Unconnected directory inode 34817 (/???)
/dev/block/mmcblk0p2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
~ # e2fsck -f /dev/block/mmcblk0p2
e2fsck -f /dev/block/mmcblk0p2
e2fsck 1.41.6 (30-May-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Unconnected directory inode 34817 (/???)
Connect to /lost+found<y>? y
yes
Pass 4: Checking reference counts
Inode 2 ref count is 2, should be 3. Fix<y>? yes
Inode 34817 ref count is 3, should be 2. Fix<y>? y
yes
Pass 5: Checking group summary information
Block bitmap differences: +274 +(449--510) +(645--701) -(139524--139541) -(139
85--139800)
Fix<y>? yes
Free blocks count wrong for group #0 (7919, counted=7799).
Fix<y>? y
yes
Free blocks count wrong for group #17 (7934, counted=7929).
Fix<y>? yes
Free blocks count wrong (198324, counted=198199).
Fix<y>? y
yes
Free inodes count wrong for group #17 (2048, counted=2045).
Fix<y>? yes
Directories count wrong for group #17 (0, counted=1).
Fix<y>? y
yes
Free inodes count wrong (51189, counted=51186).
Fix<y>? yes
/dev/block/mmcblk0p2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p2: 14/51200 files (14.3% non-contiguous), 6601/204800 blocks
When I tried it without the -p is when it looks above like it's fixing something, but it really didn't fix anything because it does the same thing when I try e2fsck again (as if it's read-only).
Is MMCBLK0 one physical NAND chip? If so, how come I can read/write/erase the /emmc with no problems? Isn't that just another partition on the same NAND disk?
If /data and /cache are really bad, is there any possible way to do an equivalent of a low-level format on the NAND and repartition?
Is booting CWM 5.0.2.0 and using adb shell supposed to have root privileges?
I can't modify the partition table using either parted or fdisk. I even tried zeroing the partitions using dd if=/dev/zero of=/dev/block/mmcblk0p1, p2, and even the whole of mmcblk0, but nothing actually gets written.
Since it seems like the NAND is probably irreparably borked, can I approach this problem from a different angle?
Can I partition my sdcard with an ext3 and ext2 partition, and tell Android to use those as /data and /cache respectively?
What in Android maps /dev/block/mmcblk0p1 to /data and /dev/block/mmcblk0p2 to /cache, and can I change those to point to partitions on sdcard?
Or is that hard-coded into the kernel?
GnatGoSplat said:
Since it seems like the NAND is probably irreparably borked, can I approach this problem from a different angle?
Can I partition my sdcard with an ext3 and ext2 partition, and tell Android to use those as /data and /cache respectively?
What in Android maps /dev/block/mmcblk0p1 to /data and /dev/block/mmcblk0p2 to /cache, and can I change those to point to partitions on sdcard?
Or is that hard-coded into the kernel?
Click to expand...
Click to collapse
It is hard coded into the kernel. To get root in adbshell try typimg su. This seems to be happening to more and more people as these phones get up there in age.
GnatGoSplat said:
Since it seems like the NAND is probably irreparably borked, can I approach this problem from a different angle?
Can I partition my sdcard with an ext3 and ext2 partition, and tell Android to use those as /data and /cache respectively?
What in Android maps /dev/block/mmcblk0p1 to /data and /dev/block/mmcblk0p2 to /cache, and can I change those to point to partitions on sdcard?
Or is that hard-coded into the kernel?
Click to expand...
Click to collapse
The answer is yes to both actually. Thrle boot.img would need to be customized. The best way is a flashable zip in recovery. Data and cache would need to be wiped manually ad recovery will not pick this up. Expect poorer performance though as SD cards tend to be slower than built in storage.
Sent from my Galaxy Nexus using Tapatalk 2
Thanks! So it sounds like the way to make this work is to compile a custom kernel? I don't know the first thing about it, but I think I could learn.
This is only in the kernel, so I could flash any 3rd party D-Inc ROM and just flash my customized kernel and it will see /data and /cache on the sdcard?
I could probably get one of those fast Class 10 cards if it turns out this is too slow, but I do recall changing vold.fstab once to fool Android into seeing /emmc as /sdcard and the /emmc (as /sdcard) didn't benchmark all that much faster than a real sdcard. I'm assuming /data and /cache are the same speed as /emmc since they're on the same mmcblk0 device, so I'm thinking maybe sdcard performance would be acceptable.
This actually sounds like it could be a better long-term solution than replacing the motherboard because no telling if a new motherboard will fail soon too.
The motherboard should be reliable. Emmc may die. Especially considering how old current dincs are.
I was talking about the boot.img which is not ROM independent and kernels aren't always either. Best idea is a flashable zip to modify the ram disk but I need the partition names if you decide to do it. I recommend keeping cache and data in the same order.
Also there would need to be a flashable wipe script to wipe data and cache.
Sent from my Galaxy Nexus using Tapatalk 2
Sorry, I wasn't very clear. By motherboard failing, I was assuming NAND is soldered to the motherboard, and if that's the case, ruined NAND = ruined motherboard. I had thought maybe I could buy a DInc with smashed LCD and good motherboard and just swap into mine (because mine is MINT condition), but I thought if I do that, I could very well end up in the same place as I'm in now and using sdcard would be more of a guarantee I wouldn't have to worry about this again.
I think I understand, the boot.img and kernel aren't exactly the same thing, but the kernel is part of boot.img? Or is it only the RAMDisk that needs changed, or both? You mentioned partition names, are you offering to make these modifications for me?
By same order, do you mean because mmcblk0p1 is /data, mmcblk0p2 is /cache, and mmcblkp3 is /emmc, I should partition my sdcard the same way with data 1st, cache 2nd, and sdcard 3rd?
Should I partition it with the phone, PC, or does it matter? Should the sizes of the new /data and /cache be the same size as original, or is there any reason I should make them larger?
Could I wipe the new /data and /cache simply by booting into Recovery and using adb shell and format them?
Also, the commands I was issuing in adb shell were from booting into CWM Recovery. Is it possible that mode can't write because I didn't login as root using the su command? I hadn't thought that would be the problem seeing as how the RUU and Android itself can't write to /data and /cache and other people managed to fix partition problems without needing to run su.
GnatGoSplat said:
Sorry, I wasn't very clear. By motherboard failing, I was assuming NAND is soldered to the motherboard, and if that's the case, ruined NAND = ruined motherboard. I had thought maybe I could buy a DInc with smashed LCD and good motherboard and just swap into mine (because mine is MINT condition), but I thought if I do that, I could very well end up in the same place as I'm in now and using sdcard would be more of a guarantee I wouldn't have to worry about this again.
I think I understand, the boot.img and kernel aren't exactly the same thing, but the kernel is part of boot.img? Or is it only the RAMDisk that needs changed, or both? You mentioned partition names, are you offering to make these modifications for me?
By same order, do you mean because mmcblk0p1 is /data, mmcblk0p2 is /cache, and mmcblkp3 is /emmc, I should partition my sdcard the same way with data 1st, cache 2nd, and sdcard 3rd?
Should I partition it with the phone, PC, or does it matter? Should the sizes of the new /data and /cache be the same size as original, or is there any reason I should make them larger?
Could I wipe the new /data and /cache simply by booting into Recovery and using adb shell and format them?
Also, the commands I was issuing in adb shell were from booting into CWM Recovery. Is it possible that mode can't write because I didn't login as root using the su command? I hadn't thought that would be the problem seeing as how the RUU and Android itself can't write to /data and /cache and other people managed to fix partition problems without needing to run su.
Click to expand...
Click to collapse
The NAND is likely soldered to the motherboard, so you're right about that.
To answer your first question, yeah, the kernel is part of the boot.img. The other part is the RAMdisk which is the only thing that needs to be changed.
Partition it in the same order. Probably parted via adb shell. 100MB for cache and at least 750MB for data. Sizes don't matter too much but you want enough.
adb shell has root access automatically in recovery. The issue is hardware most likely so your proposed workaround may be the only option.
First plan of attack is to find the partition names which would be mmcblk1p1 and mmcblk1p1 if you partition the sdcard the same way as the ROM is partitioned. Ideally you need to be able to fix the partitions themselves. I'll try to give more info later.
I copied the partition sizes from mmcblk0, so here's what I have on my 16GB SD card:
Code:
Model: SD SA16G (sd/mmc)
Disk /dev/block/mmcblk1: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext2
2 797MB 1007MB 210MB primary ext2
3 1007MB 16.0GB 15.0GB primary fat32 lba
mmcblk1p1 for /data
mmcblk1p2 for /cache
mmcblk1p3 for /sdcard
Will that work? I couldn't get mmcblk1p1 to show up as ext3. I did use mke2fs -j /dev/block/mmcblk1p1 to format it and I've read ext3 = ext2+journal, so I guess the fact it's not saying "ext3" under filesystem is okay?
GnatGoSplat said:
I copied the partition sizes from mmcblk0, so here's what I have on my 16GB SD card:
Code:
Model: SD SA16G (sd/mmc)
Disk /dev/block/mmcblk1: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext2
2 797MB 1007MB 210MB primary ext2
3 1007MB 16.0GB 15.0GB primary fat32 lba
mmcblk1p1 for /data
mmcblk1p2 for /cache
mmcblk1p3 for /sdcard
Will that work? I couldn't get mmcblk1p1 to show up as ext3. I did use mke2fs -j /dev/block/mmcblk1p1 to format it and I've read ext3 = ext2+journal, so I guess the fact it's not saying "ext3" under filesystem is okay?
Click to expand...
Click to collapse
You would be correct. Yes, that's fine.
Thanks, what should be my next steps?
GnatGoSplat said:
Thanks, what should be my next steps?
Click to expand...
Click to collapse
I'll have to find time to make scripts that will modify the ramdisk, unless you can just extract it and make the changes yourself.
That would be great, I really appreciate all the help so far.
Do you think ramdisk is the only place a change will need to be made?
I was trying to see if I could figure out how to extract ramdisk from boot.img and found a perl script, but I haven't gotten around to playing with it.

Categories

Resources