Applications to your SD card ? - Hero, G2 Touch Android Development

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.

Related

[Dev Q] mount 2nd ext partition as mmcblk0p3?

Hope this is in the right section, I need help from a developer on this as I don't quite understand what is needed to do this.
I use Gingervillain and the DT a2sd. What I want to do is move my /cache (not dalvik cache but the partition itself) to ext.
I have the commands all ready to do this and that aspect works fine (thanks to help from droidzone).
However, as its sharing the ext partition with DT, when I mount cache there, the apps don't work. Added to which if a market app is downloaded, it downloads the apk to the cache folder I created on ext fine. When it attempts to intall, it fails.
I assume (with my limited knowledge) that there is a conflict here due to multiple mounts on the same partition. I initially thought my mount cache command needed to with the same options that DT mounts, but cant find that reference in his script or the files it calls.
So I have created a 2nd ext partition, but I dont know how to use it. I thought it would automatically be mmcblk0p3, but I cant find it that way using adb.
I know data2ext uses multiple partitions for sqlite etc, but cant for the life of me work this out.
Can anyone point me in the right direction please?
The aim of this is to develop myself a cache2sd solution. I have searched around a lot but can't find one. I thought CM had one but cannot find that either.
Further to this, ls /dev/block lists mmcblk0p3
However,
Code:
busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p3 /system/sd
Returns
Code:
failed: Invalid Argument
but
Code:
busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p2 /system/sd
Works fine.
Does anyone have any idea how I can use the second EXT partition at all or any tips or info please?
format
rootSU said:
Does anyone have any idea how I can use the second EXT partition at all or any tips or info please?
Click to expand...
Click to collapse
format mmcblk0p3 in ext4 format and mount it
susmaz said:
format mmcblk0p3 in ext4 format and mount it
Click to expand...
Click to collapse
Better 2.5 years late than never
Although that would not have been the answer.
Why do you need this 2nd partition??
If i understnad correctly you want the cache on a ext partition, so the play store can download to this partition and than install the apk to intern bzw. The prim ext??

[Q] Question about SD card memory

Hi guys, Im a total noob in this stuff.
But my question is, me SD card has a 1GB EXT3 partition and the rest is FAT32.
I recently flashed LeeDrOiD GB Sens rom and I was wondering when I go to the Menu and I look at the memory available it says I have 119MB available space on the internal storage, shouldn't it be 1GB since the EXT3 partition should also be the internal storage...?
Or am i totally lost in this stuff?
You are totally lost. The ext partition does not extend the internal storage. If you installed a2sd correctly, a symlink to /sd-ext will be created. This forces all apps to install in /sd-ext/data instead of internal memory (/data).
To check if a2sd is working, open terminal emulator and enter these commands:
Code:
su
ls -l /data
In the output you should see this:
Code:
/app -> /sd-ext/app
/app-private-> /sd-ext/app-private
If your rom supports a2sd+, you should also find this:
Code:
/dalvik-cache -> /sd-ext/dalvik-cache
The "->" means "is moved to".
Hmm, okay. Its not working.
This is what I get,
app
app-private
backup
dalvik-cache
...
...
And so on... There is no -> symbol.
Well I just made an EXT3 partition and flashed the new LeeDrOiD HD V3.3.3 - Port - R5 A2SD++. I thought A2SD would install automatically with this ROM.
Is there anything else I need todo so the apps go to the EXT3?
Thank for your reply!
Take a look on the leedroid thread. The dev posted a guide how to get a2sd working.
sorry but i can't write this code,is it a capital i or 1 and does it have spaces between them?
sorry but need the step by step instructions,thnx
Code:
ls -l
ls for list and -l for l(ong). Hope that helps.

[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] HTC Desire partially broken

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

[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