[Q] Android on SD (Haret) not loading apps moved to SD - HD2 Android Q&A, Help & Troubleshooting and Genera

I have been running my HTC HD2 with Froyo android on SD card for a few years now (Haret), without issue, but sometimes it boots and fails to load the list of apps that are moved to sd. This may be random, but seems to happen more after I have used Google Play to install a new app. I can cure the problem by restoring a full backup of my sd card, but I would like to know why this happens and if there might be a quicker cure than having to restore a full backup..... which takes quite a while. If I reboot the system several times, sometimes the full app list will appear again, but not very often.
Would appreciate any thoughts or advice as to why this happens.
Thanks, Tony

If you are running Android off your sd card, why are you bothering to move apps to sd (Which are already there)?

Marvlesz said:
If you are running Android off your sd card, why are you bothering to move apps to sd (Which are already there)?
Click to expand...
Click to collapse
Not quite sure what the answer is to your question, but I was struggling for internal memory so it was suggested that I use titanium backup to move everything to SD. The result freed up over 80mb of internal memory and everything worked fine. The system boots from SD card.
Tony

What I'm saying is, if your android is Haret based, that means your data (i.e. what's filling up your "internal") is stored in either a data.img or is stored in an ext partition on your sd card. (Depending on whether you're running a pure SD or a NativeSD build.
But on either of these cases, you should not have problems with storage because:
*On the pure SD version, you have a data.img file on your sdcard whose size is set by you. The data.img acts as your Internal.
*On the NativeSD version, the whole ROM is located on your ext partition whose size is yet again, determined by you. The whole ext partition acts as your internal. (If I'm not mistaken)
I suggest that you back up your apps (and everything important) and if
1- You are on a pure sd ROM, delete the "data.img" file and edit the "startup.txt" file, edit the data section to your liking.
2- You are on a NativeSD ROM, make a NANdroid backup through recovery, format and resize the ext partition to a bigger one, and then restore the backup. (If that doesn't work, simply flash the ROM from the beginning and then restore your previously backed up stuff).

Marvlesz said:
What I'm saying is, if your android is Haret based, that means your data (i.e. what's filling up your "internal") is stored in either a data.img or is stored in an ext partition on your sd card. (Depending on whether you're running a pure SD or a NativeSD build.
But on either of these cases, you should not have problems with storage because:
*On the pure SD version, you have a data.img file on your sdcard whose size is set by you. The data.img acts as your Internal.
*On the NativeSD version, the whole ROM is located on your ext partition whose size is yet again, determined by you. The whole ext partition acts as your internal. (If I'm not mistaken)
I suggest that you back up your apps (and everything important) and if
1- You are on a pure sd ROM, delete the "data.img" file and edit the "startup.txt" file, edit the data section to your liking.
2- You are on a NativeSD ROM, make a NANdroid backup through recovery, format and resize the ext partition to a bigger one, and then restore the backup. (If that doesn't work, simply flash the ROM from the beginning and then restore your previously backed up stuff).
Click to expand...
Click to collapse
Thanks for your post,
I do have a "data.img" file and also a startup.txt, the contents of which I have listed below:
-------
set mtype 2524
set ramaddr 0x11800000
set ramsize 0x1e400000
set KERNEL zImage
set initrd initrd.gz
set initrd_offset 0x00a00000
set cmdline "rel_path=desire_z nand_boot=0"
boot
-------
This means nothing to me, would you recommend any changes? I am using a 32GB SD card. The data.img file is 524,288K in size.
I have never altered anything on the system since I installed it 3 years ago, apart from installing apps and widgets etc.
Thanks
TonyBB

Brookbond said:
Thanks for your post,
I do have a "data.img" file and also a startup.txt, the contents of which I have listed below:
-------
set mtype 2524
set ramaddr 0x11800000
set ramsize 0x1e400000
set KERNEL zImage
set initrd initrd.gz
set initrd_offset 0x00a00000
set cmdline "rel_path=desire_z data_size=512 nand_boot=0"
boot
-------
This means nothing to me, would you recommend any changes? I am using a 32GB SD card. The data.img file is 524,288K in size.
I have never altered anything on the system since I installed it 3 years ago, apart from installing apps and widgets etc.
Thanks
TonyBB
Click to expand...
Click to collapse
I see you haven't set one before, which means a data.img will be created in the default value (512MB). I have added what needs to be added where it needs to be added in the quote, find it in BOLD RED. Instead of 512, type the number of MB you want. (e.g. 2048 = 2GB, personally I think 2GB is more than enough, but it all depends on you)
The next time you boot android, it's going to take much longer to create this new data.img, so be patient.
P.S: After you finish all this, I recommend moving ALL apps back to where they belong, on the internal. Because as I said before, there is no need to move apps to SD anymore .

Marvlesz said:
I see you haven't set one before, which means a data.img will be created in the default value (512MB). I have added what needs to be added where it needs to be added in the quote, find it in BOLD RED. Instead of 512, type the number of MB you want. (e.g. 2048 = 2GB, personally I think 2GB is more than enough, but it all depends on you)
The next time you boot android, it's going to take much longer to create this new data.img, so be patient.
P.S: After you finish all this, I recommend moving ALL apps back to where they belong, on the internal. Because as I said before, there is no need to move apps to SD anymore .
Click to expand...
Click to collapse
I deleted DATA.IMG and edited the startup.txt as follows:
----
set mtype 2524
set ramaddr 0x11800000
set ramsize 0x1e400000
set KERNEL zImage
set initrd initrd.gz
set initrd_offset 0x00a00000
set cmdline "rel_path=desire_z data_size=2048 nand_boot=0"
boot
----
After doing this, the system fails to start and appears to reset before booting back into Windows mobile 6.5
I have a backup, so nothing is lost, but it seems like it wont create a new bigger DATA.IMG file, and refuses to boot too.
The whole contents of the boot folder (DESIRE_Z) are as follows:
DATA.IMG (512 M)
system.ext2 (390 M)
startup.txt (192 b)
zImage (2.4 M)
INITRD.GZ (484.9 k)
HARET.EXE (158.5 k)
CLRCAD.EXE (4.0 k)
Maybe this might help to diagnose what it going wrong or to indentify the problem?
Thanks
Tony

Brookbond said:
I deleted DATA.IMG and edited the startup.txt as follows:
----
set mtype 2524
set ramaddr 0x11800000
set ramsize 0x1e400000
set KERNEL zImage
set initrd initrd.gz
set initrd_offset 0x00a00000
set cmdline "rel_path=desire_z data_size=2048 nand_boot=0"
boot
----
After doing this, the system fails to start and appears to reset before booting back into Windows mobile 6.5
I have a backup, so nothing is lost, but it seems like it wont create a new bigger DATA.IMG file, and refuses to boot too.
The whole contents of the boot folder (DESIRE_Z) are as follows:
DATA.IMG (512 M)
system.ext2 (390 M)
startup.txt (192 b)
zImage (2.4 M)
INITRD.GZ (484.9 k)
HARET.EXE (158.5 k)
CLRCAD.EXE (4.0 k)
Maybe this might help to diagnose what it going wrong or to indentify the problem?
Thanks
Tony
Click to expand...
Click to collapse
What do you mean by "fails to start"? How long did you leave it for? Also what do you mean by "appears to reset before booting back into Windows mobile 6.5"? Does it auto restarts by itself or do you pull the battery?

Marvlesz said:
What do you mean by "fails to start"? How long did you leave it for? Also what do you mean by "appears to reset before booting back into Windows mobile 6.5"? Does it auto restarts by itself or do you pull the battery?
Click to expand...
Click to collapse
I left it until it reset itself and rebooted back to WM6.5, about 45 seconds.
When I start booting into android it normally starts with a green htc logo that stays onscreen for about 30 seconds, at the end of this 30 seconds the screen goes blank (black), the unit vibrates and the white boot screen for windows mobile appears (just the same as when powering up with the power button, after a power cycle). Normally after the green htc logo disappears, an animation appears for about 1.5 minutes, but its not getting that far in the boot process before it crashes and resets/reboots back into WM6.5
Repeating the process gave the same results three times.
After the failed boot, I checked to see if a new DATA.IMG file had been created, but there was no such file. I was'nt expecting to see one because I was expecting it to take quite some time, but it didn't.
Tony

Brookbond said:
I left it until it reset itself and rebooted back to WM6.5, about 45 seconds.
When I start booting into android it normally starts with a green htc logo that stays onscreen for about 30 seconds, at the end of this 30 seconds the screen goes blank (black), the unit vibrates and the white boot screen for windows mobile appears (just the same as when powering up with the power button, after a power cycle). Normally after the green htc logo disappears, an animation appears for about 1.5 minutes, but its not getting that far in the boot process before it crashes and resets/reboots back into WM6.5
Repeating the process gave the same results three times.
After the failed boot, I checked to see if a new DATA.IMG file had been created, but there was no such file. I was'nt expecting to see one because I was expecting it to take quite some time, but it didn't.
Tony
Click to expand...
Click to collapse
Hmm, that's weird. The "fade to black then reset" is usually associated with an incompatible radio, can you confirm that? (Although your ROM booted just fine previously).
Just to be on the safe side, could you flash radio 2.15? (Make sure it's a .50 if you have tmo).
I'm not exactly sure what's the issue here, your set up seems just fine. (And your ROM's previous booting proves this)
If all fails, you can download an already created and empty data.img, and try using it.
Refer to the following for more information:
http://forum.xda-developers.com/showthread.php?t=737826
Or, give this app a shot (If it actually works, should make things a lot easier):
http://forum.xda-developers.com/showthread.php?t=824154

Marvlesz said:
Hmm, that's weird. The "fade to black then reset" is usually associated with an incompatible radio, can you confirm that? (Although your ROM booted just fine previously).
Just to be on the safe side, could you flash radio 2.15? (Make sure it's a .50 if you have tmo).
I'm not exactly sure what's the issue here, your set up seems just fine. (And your ROM's previous booting proves this)
If all fails, you can download an already created and empty data.img, and try using it.
Refer to the following for more information:
http://forum.xda-developers.com/showthread.php?t=737826
Or, give this app a shot (If it actually works, should make things a lot easier):
http://forum.xda-developers.com/showthread.php?t=824154
Click to expand...
Click to collapse
The radio is currently 2.15.50.14, that should be OK yes??
Do you think it could be related to the format of the SD card? Currently FAT32, Allocation Unit Size 32 kilobytes
I might try doing the whole thing over again from a clean backup.....
I thought it was a bit odd having to move things to SD when I was running from SD in the first place, but doing it did free up the internal memory I had available using the current restriction.
If you have any further thoughts, I would be interested and I will check out the links.
UPDATE:
Well it looks like TopoResize has done the job. Using TopoResize I modified the DATA.IMG from my backup (stored on the pc) and upped its size to 1,917,912K (That was the nearest the software would go to 2GB without going over) and I am sure that would be more than enough for me. I then copied the modified file over to the SD card in my HD2 and booted it into Android. The phone booted successfully and is now reporting 1.36GB free internal storage, (It used to report around 75Mb ). This seems to suggest the job has been successful.
I think I just read that Android can only support up to a 2GB DATA.IMG file, is that correct?
I will now have to get the system to see all my apps by restoring a full backup and then I will have to copy the DATA.IMG back into the working system and move all the apps back to internal....
It looks like I am in business
I will report back once more when I have done the complete job (I will have to do this later because I have other things to do today). Can I thank you once again for your help and advice, as without your initial comment, I had never thought I would be able to increase the size of DATA.IMG and allow me to leave everything in internal memory. I had no idea! THANK YOU!
If you have any other tips about the HD2 running android the way I do, I would be interested to hear them.
Many thanks
Tony

Brookbond said:
UPDATE:
Well it looks like TopoResize has done the job. Using TopoResize I modified the DATA.IMG from my backup (stored on the pc) and upped its size to 1,917,912K (That was the nearest the software would go to 2GB without going over) and I am sure that would be more than enough for me. I then copied the modified file over to the SD card in my HD2 and booted it into Android. The phone booted successfully and is now reporting 1.36GB free internal storage, (It used to report around 75Mb ). This seems to suggest the job has been successful.
I think I just read that Android can only support up to a 2GB DATA.IMG file, is that correct?
I will now have to get the system to see all my apps by restoring a full backup and then I will have to copy the DATA.IMG back into the working system and move all the apps back to internal....
It looks like I am in business
I will report back once more when I have done the complete job (I will have to do this later because I have other things to do today). Can I thank you once again for your help and advice, as without your initial comment, I had never thought I would be able to increase the size of DATA.IMG and allow me to leave everything in internal memory. I had no idea! THANK YOU!
If you have any other tips about the HD2 running android the way I do, I would be interested to hear them.
Many thanks
Tony
Click to expand...
Click to collapse
Great that you got it all sorted out. I don't know about the 2GB thing, the last time I used an SD rom was ... I don't even remember .. maybe the early builds where we had that speed glitch or something, but it could be true. But why bother? I doubt you will ever fill that 2GB (Unless you go about downloading each and every app in the store )
If you need any further help, just post it. You're welcome, I'm glad I could help.

Related

Android ROM

Hey guys,
I'm going to try making an Android ROM. It will be a bare-bones WM ROM with the necessary Android files built in.
It will run Haret at start up, but you have the choice to not run it if you don't choose to. (in case Android acts up).
I'm booting up Android right now from my ROM (not SD card).
I'll let you guys know how it goes
PLEASE REPLY WITH THE SIZE OF YOUR DATA IMAGE!!!!
awesome, sounds good.
I'm definitely game. Let us know when you've got it up!
How big is everyone's data file?
i just wanna be clear on what you're doing here. so, you could take your SD card out and still run android, correct?
regardless, this isn't really an android ROM. it's just a slim windows ROM. the only speed-up i could see, would be when winmo is loading up. once haret begun, it should be the same speed as we're currently used to.
data.img is 128mb.
128 MB here
128 Mb for me!
Okay, I think they are all set to 128MB, and then say how much is free. Right now it has space for the 128MB.
I am going to make it copy the files from the SD card to /Program Files/Android, and then have Haret start (with the option to run or not).
I am not seeing a super large speed boost, but it is a little faster, and seems to be more stable.
craig0r said:
i just wanna be clear on what you're doing here. so, you could take your SD card out and still run android, correct?
Click to expand...
Click to collapse
Correct
craig0r said:
regardless, this isn't really an android ROM. it's just a slim windows ROM. the only speed-up i could see, would be when winmo is loading up. once haret begun, it should be the same speed as we're currently used to.
Click to expand...
Click to collapse
It is a little faster (since it isn't using the SD card), and is a lot more stable for me.
Would it be feasible to run a script in WinMo to check to see if there is a newer version of the android files and prompt to update them if the files are newer?
what filesystems are you using for the system and data? Are you using file-backed storage or direct access to the memory device? You won't see as much of a speedup if you are using file-backed storage...
You also will want to modify initrd to change the memory settings, I can do that for you if you like...
derekwilkinson said:
Hey guys,
I'm going to try making an Android ROM. It will be a bare-bones WM ROM with the necessary Android files built in.
It will run Haret at start up, but you have the choice to not run it if you don't choose to. (in case Android acts up).
I'm booting up Android right now from my ROM (not SD card).
I'll let you guys know how it goes
PLEASE REPLY WITH THE SIZE OF YOUR DATA IMAGE!!!!
Click to expand...
Click to collapse
Are you putting a yaffs2 partition on the nand flash for data or using a loop mounted file on top of tfat. How about the system image? There should be a significant speedup from using the nand flash. Also, how are you passing the partition information to the kernel?
craig0r said:
regardless, this isn't really an android ROM. it's just a slim windows ROM. the only speed-up i could see, would be when winmo is loading up. once haret begun, it should be the same speed as we're currently used to.
Click to expand...
Click to collapse
True, it isn't an android rom... but most of the slowness we're experiencing is due to a slow bus interface to the SD card, and slow write speeds to the SD.
If properly accessing the internal memory, there should be significant speed increases.
EDIT: By the way, if you are just using an ext2 data.img sitting on the tfat partition, you are likely to see bad things happen to your internal memory.
ext2 doesn't do wear leveling, and the internal flash controllers also don't do wear leveling. TFAT is set up to do it, but if you are just reading it as FAT, it won't do it... you want to access the memory directly and set up a yaffs2 partition.
vilord said:
what filesystems are you using for the system and data? Are you using file-backed storage or direct access to the memory device? You won't see as much of a speedup if you are using file-backed storage...
You also will want to modify initrd to change the memory settings, I can do that for you if you like...
Click to expand...
Click to collapse
Honestly, I just made a super small ROM so it could run the Android files more stable (since it isn't on the SD card).
How can I have direct access to the memory device?
well to start, how do you get to the files now?
I'm going to guess that you turned on kernel support for the internal memory, which makes it show up like a block device, then you are mounting the windows TFAT userdata partition, then mounting system.img and data.img as loop.
What you would do for direct access isn't all that different...
Right now you have a *very* small windows rom, which leaves a large space for userdata. You'd need to force the tool to leave an open space at the end of the flash, then you'd use a linux tool to mkfs.yaffs in that open space. It is similar to a hard disk (with a different partition table), except that you want to use yaffs or jffs2 to enable wear leveling.
vilord said:
well to start, how do you get to the files now?
I'm going to guess that you turned on kernel support for the internal memory, which makes it show up like a block device, then you are mounting the windows TFAT userdata partition, then mounting system.img and data.img as loop.
What you would do for direct access isn't all that different...
Right now you have a *very* small windows rom, which leaves a large space for userdata. You'd need to force the tool to leave an open space at the end of the flash, then you'd use a linux tool to mkfs.yaffs in that open space. It is similar to a hard disk (with a different partition table), except that you want to use yaffs or jffs2 to enable wear leveling.
Click to expand...
Click to collapse
I took a Vogue ROM, stripped everything out, and copied the Android files from my SD card to the device.
Did you change the initrd and zImage at all? I would think you'd need to change them to tell the loader to look at the internal memory instead of looking at the SD card...
soo when will this rom be ready? also will the base system be winmo 6.1 or 6.5?
fixxxer2008 said:
soo when will this rom be ready? also will the base system be winmo 6.1 or 6.5?
Click to expand...
Click to collapse
When I get everything running as fast as possible.
I'm about to write the scripts to make everything work easier
(like copy your current default.txt and data images to the device so you keep your data) and maybe automatic updates (haven't decided how i'll make it work yet).

[Android] ext2 and haret questions

Would someone write a tutorial on installing Android on ext2? I thought I understood how it works, but realized I was only booting from haret, and not installing onto the ext2 partitions I had made. I went back and reread a lot of the old threads, but find it hard to figure out when to push vol down or hit end. Also, I prefer to boot into 320 x 480 so I can see the whole Market. This makes the print so tiny, I'm not sure what I'm seeing. (I did manage to get it on to my ext2 partition, I think. How do I know for sure.) Thirdly, the choices when booting are different, depending on whether you want to install for the first time or not. So, could someone tell us what the correct selections are if you are:
1. Installing onto ext2 partitions for the first time.
2. Just wanting to change resolution.
3. Wanting to change builds completely from say, Donut to Eclair.
Also, I understand that you can backup your data.img. But how do you go about reusing it if you are wanting to go back to a version of Android you've used in the past?
Lastly, if you are moving from, say Donut to Eclair, (moving to a completely different build), must you use a backup app to take your apps, settings, ringers, wallpapers and so on, to the new build?
If someone would write a tutorial addressing these questions, I'd be forever grateful and I'd imagine it would help those who want to try Android for the first time. Having all this information in one place would really help.
Thank you so much.
Not a pro by any means, I am still trying to figure everything out myself but here is how I understand it...
To install on ext2, you need to partition your SDcard into 3 partitions, 1 FAT32 and 2 ext2. When you run haret, it will detect the partitions and ask you to "upgrade". If you choose yes, it will install on the ext2 partition. If you choose to back up your data, it will create a backup of your data.img file and then upgrade. If you press End, you have the option to wipe the data file before you install.
You can verify if it installed to the ext2 partitions by browsing your SDcard. You should not see a data.img file on your FAT32 partition and you should see a backupsystem folder with the system.sqsh file in it.
If you want to change the resolution, all you need to do is change it in your default.txt or startup.txt file.
Don't have any advice going from one build to another as I normally just wipe my data file and start over to ensure I am starting clean.
Thanks, it helped me too...
But; I made 2 partitions, 1 Fat32 and 1 EXT2. I'm running haret now, he didn't ask anything about updating... Now it hangs on a black screen, but the backlight is still on. I didn't see any linux penguin neither like the last times (without ext2).

Very slow on SDCard with partitions

I will apologize if this has been asked before. But I have been search for while and still have no clue.
The situation is: I normally run android with haret on sdcard without partition. (Thanks to all the developers). Every build is very fast except the most recent mssmison eclair (the new way). So, I tried to run the mssmison eclare on sdcard with partitions. It turns out to be even slower. I then tried most of the other releases which were fast without partition. All of them became very slow on partitions.
I guess it is possibly because I have a sd card without any "class x" label, (maybe class 2). But anyway, shouldn't android be faster with partitions than w/o?
or is there something related to permission fix?
Here is my settings:
Htc vogue
3 partitions: fat32+ext2(system)+ext2(data), I also tried fat32+ext2(system)+ext2(data)+swap, all very slow
Thanks
make sure you are choosing the right options in the installer. if you have system.img and data.img in your /andboot folder, then you are not running off the ext2 partitions and choosing the wrong default install location options.
tatnai said:
make sure you are choosing the right options in the installer. if you have system.img and data.img in your /andboot folder, then you are not running off the ext2 partitions and choosing the wrong default install location options.
Click to expand...
Click to collapse
After install , I have no sytem or data in my /andboot or /android folder. The system is renamed and moved to a backup folder by the installer. with the new way, I can choose where to put the system and data, "system on sdcard" and "data on sdcard", which are default, are selected.
Yes I also noticed that Eclair wasn't running fast even though I was using two Ext2 partitions. I didn't notice any speed difference between having the files stored directly in the android folder as opposed to Ext2.
definitely thought I noted a speed increase running on ext2 instead of regular sd card.
i really wana know which partition is better ext 2 3 or 4? n also if u can move songs etc to the partitioned space??

Data.img

I was wondering how do you change the data.img. A lot of roms come with 1gb and 512mb data.img files so I was wondering how do change them do you just put them in place of the root.fs because thats the only other data.img I can see in my rom.
The data.img file is created by Android the first time you boot a ROM. At a basic level (ie my level!) it defines your free memory size (how much space you have to fill with Apps). You can define what size data.img you want in the startup.txt of most builds (512Mb, 1Gb, etc).
I haven't come across any builds with a data.img already included, although I have been using Bangsters for some time.
If you want to change it, just delete it and when you re-boot a new one will be created. Make sure you backup all your settings and apps though as it will wipe all this. Titanium backup is a free app in Marketplace.
If you want to copy one across, then just overwrite your existing one and re-boot. I've done that with previous builds.

[Q] How can I tell if my partitioned SD is being used properly?

Thank you to anyone who can assist with this. I have tried searching the other threads for an answer, but have been unsuccessful.
My configuration is as follows...I partitioned my SD as follows:
1st - PRIMARY - FAT32 (Approx 10GB)
2nd - PRIMARY - EXT2 (2GB)
3rd - PRIMARY - SWAP (2GB)
I extracted and copied the Desire_DL folder (new v4.0) to the newly created FAT32 partition.
I then extracted and copied the Desire_DL and Update_DL folders (from the bugfix.DLZ4.0 patch). I also changed the config.txt.sd to config.txt (though I made no edits).
I rebooted the phone, and once in WM 6.5 I loaded booted Android. Everything booted OK, but I am not sure if it is utilizing the 2nd & 3rd partitions, or if it is just running on the FAT32 partition only. I'd like to ensure I am getting the best performance I can out of the build, so how do I check to see if everything is configured properly and using these partitions?
open MiniTool and see if it uses them.. It says how much it uses. As long as you don't have data_img=1 then it can't remember anything if it doesn't use them.
Thanks for the repsonse.
I used mintool to partition the SD card originally, but how do I use it to see if the partitions are being utilized?
Also, the default settings of the config.txt includes a line that reads: data_img=1
Should I delete that line to force it to utilize the other partitions?
ccrobin said:
Thanks for the repsonse.
I used mintool to partition the SD card originally, but how do I use it to see if the partitions are being utilized?
Also, the default settings of the config.txt includes a line that reads: data_img=1
Should I delete that line to force it to utilize the other partitions?
Click to expand...
Click to collapse
plz see http://forum.xda-developers.com/showpost.php?p=11398763&postcount=3602
set the data_img=0 to use the ext4 ! no need for data.img anymore

Categories

Resources