Data.img - HD2 Android Q&A, Help & Troubleshooting and Genera

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.

Related

[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).

[Q] SDCARD Problem, need data.img support

Hello all,
I think my SDCard is currently broken and it's quite strange but I can not make partitions anymore.
I am running Typhoon CM7 Rom, and I wanted to know how to create and enable data.img in order to have more internal userspace.
From where must I begin ?? help me please
up... really no one ?
hmm long time ago for me but i think you sd boot should make an data.img by itself but you can also (atleast i had it when i was still on sd) download a data.img file provided by the dev
This is a NAND build, not SD, so there's by default no data.img, and the dev doesn't provide any data.img too =/

[Q] How can I add a small Ext partition to my SD card and fill it with symlinks?

So I am an organization freak, and the root of my SD card had gotten a bit out of control. Not unusual, I know, but having just installed Titanium Media Sync and inKa File Manager, I've been doing a lot more file management and the constant scrolling through crap folders that I'll never need to access is getting old. So I've been trying a bunch of stuff to create what basically amounts to a folder full of shortcuts or symlinks that reference the various folders I need to use.
Now I could just create some sort of MyHome directory on my SD card and store my **** in there, but that doesn't solve the problem of having easy access to some of the folders that need to be in /sdcard, like the Download folder.
So the solution I came up with was to create a folder called 'Home' in the root of my phone. I added a bunch of symbolic links to Music, Photos, Downloads, Documents, etc, and the beauty is I can have stuff scattered all around my SD card and still access them neatly from this one folder. And filter out the crap I don't ever need. Doing this produced the exact effect I was hoping for, and I set it as my Home in InKa File Manager. However it comes with two problems:
First, this folder disappears every time I restart my phone! And second, even if this didn't happen I would still be faced with the folder disappearing every time I installed a new ROM. Oh, and in case it isn't obvious, FAT filesystems don't support symbolic links so this Home folder has to exist somewhere outside of the main SD card.
So, in conclusion: I would like to create a very small partition on my SD card that I have read/write access to, so that I can fill it with symbolic links that will stay put and always re-mount. My problem now is that I'm not familiar enough with the Unix file system or with mounting disks to determine how to make sure this partition gets mounted every time I start my phone. Or, if this happens automatically, where to look for the partition.
Thanks in advance to anyone who can point me in the right direction!! I'm pretty sure I have already created an ext2 partition on my card, by using iPartition on my Mac to place it after the FAT partition. But it won't let me name it so I don't even know where to begin looking for the partition itself.
Why can't you just make a folder called "Home" in /data somewhere? Shouldn't matter where the folder is since you can default your file manager to whatever folder upon opening.
Edit: Just tested it by making a folder /data/Home/
It survived a reboot fine.
Shouldn't be wiped when installing new roms either, as long as they don't wipe data like I know the ACS roms don't. Also if the rom you are flashing backs up and restores your data before flashing like some do, it MIGHT, idk for sure, but might backup this folder as well.
That... totally works. Stays after a reboot too. Thanks! This at least solves one problem and makes the idea totally doable again
Im still curious about a solution to the partition thing though. It would be nice to have a Home folder that was literally always around and that I wouldn't have to worry about even after installing new roms. I know some of them don't wipe data but I would generally Odin when installing a new ROM anyway. Installing Cyanogen for the first time definitely requires that and I feel like I may go back to a stock rom once or twice before CM goes final.
The reason nothing "sticks" when you put it in the root FS if because it is a RAM filesystem, loaded from a file image (zImage) at boot -- it's not a more typical file system in secondary storage like all the other filesystems. This is simply an artifact of how embedded linux systems work.
Sent from my mind using telepathitalk

[Q] redefine WM partition sizes on ROM

Hi guys,
I'm cooking a WM6.1 ROM with a small set of applications using osKitchen Zero v1.33.5. This gives me lots of free space on the user partition. I have been searching for way to redefine the partition sizes and shrink the user data partition, but haven't found any information regarding this.
Does any one know how to do this or is it even possible?
Thanks
jlsaraiva
Any reason to shrink it?
The idea is to use the remaining space to create the android partitions and boot android with haret from the WM partition. Having both WM and Android on NAND.
Well, that's the thing you can't do via ROM. At least I think so. You need some extra storagemanager drivers.
sounds intriguing though at first - moving the ext2-partitions to nand and telling haret to look for them there instead on sd. you'd still have to boot winmo first, but android would be faster. "semi-nand-flash", kinda.
but thinking about it - not enough internal memory for two os on the x1.
Dont think this is possible just yet. Like your thinking of having two os on internal memory but especially with us poor EURO 512mb devices I dont think it could cope. It would also mean a resdign of haret.exe as it looks for android on SD card.
I striped out pretty much all non essential WM parts from the ROM and I get about 400MB of free space on the user data partition, which is enough to have xdandroid.
You would have to boot into WM first, but I wouldn't mind if it ment running everything out of nand.
No need to change haret. It would be just like we have now, running xdandroid out of the sd card. Only need to change the init script on initrd to mount the nand partitons instead of the sd card and change the init script on the rootfs filesystem. Both are not dificult to do. The only issue here is really "to be or not to be" able to resize the user data partition of WM.
jlsaraiva said:
I striped out pretty much all non essential WM parts from the ROM and I get about 400MB of free space on the user data partition, which is enough to have xdandroid.
You would have to boot into WM first, but I wouldn't mind if it ment running everything out of nand.
No need to change haret. It would be just like we have now, running xdandroid out of the sd card. Only need to change the init script on initrd to mount the nand partitons instead of the sd card and change the init script on the rootfs filesystem. Both are not dificult to do. The only issue here is really "to be or not to be" able to resize the user data partition of WM.
Click to expand...
Click to collapse
This could be a nice idea as you could in theory have android running on nand with out the limitations of either magldr or clk. You would be hard pushed to get a sense build running, but a gingerbread version would be cool! I assume you really have to strip down WM to get it to fit?
I remember looking into this a long time ago before magldr came out and found out some registery keys that could run hart.exe and clard.exe for you with out any user input. I'll see if I can digg them up for you!
I removed almost all EXT packages plus some microsoft apps like office, windows live etc...
But all this falls short if we can't resize the WM partitions.
I've been looking into re-partitioning the NAND on my Xperia X1, so I could increase the storage space when using a smaller rom, but I also have not found a way to do it.
I was originally hoping there was an app, either in Windows mobile, or android, that would work as a partition manager, but I have only found apps that will partition SDcards.
Another option I'm thinking of is using a linux partition manager in android, or using a full blown linux on my phone and using a linux partition manager that way.
I've also thought of using mtty, but I don't know any commands that will let me manipulate the partitioning.
I actually have no idea if any of this will work out, I don't know how the whole boot-procedure works, so I don't know if the bootloader expects the WM-rom partition to be at a certain address, or if it just goes to a certain partition, regardless of the starting and ending positions.

[Q] Android on SD (Haret) not loading apps moved to SD

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.

Categories

Resources