[Q] Can IMG Files be edited? - HD2 Android Q&A, Help & Troubleshooting and Genera

Hi All, i have a HD2 Leo, with Android installed on a memory card. this has been working fine, but i have recently, re-configured my exchange email account and the calendar no longer syncs, but does on other handsets, so i think i need to edit the "USERDATA.IMG" File that is on the Android files.
Does anyone know how to edit this file?

if you have any file manager that can access root, the userdata.img contents are the ones arouns the system folder. So when you're viewing root contents, the System folder is your system.img and almost everything else is the contents of the Userdata.img
but you'll have to look for a long time to find the settings you want. My advice is to back up everything and start over with a new userdata.img

MJMSRI said:
Hi All, i have a HD2 Leo, with Android installed on a memory card. this has been working fine, but i have recently, re-configured my exchange email account and the calendar no longer syncs, but does on other handsets, so i think i need to edit the "USERDATA.IMG" File that is on the Android files.
Does anyone know how to edit this file?
Click to expand...
Click to collapse
You need the unpackbootimg binary, which will extract it; then you can use mkbootimg binary to make it into an img file
I have this compiled already in http://cyanogenmod.arif-ali.co.uk/tools

Related

Please help cannot get Android system.sqsh to run from SD card

I ran everything listed below that I got from another post, but I cannot get android to run when I use the system.sqsh file. I can get it to work from the system.img file but I want to run 1.6 and I cannot find one in the .img format. What am I doing wrong?
Instructions for booting android.
Files to download:
basefiles-xxxx.zip
default.txt
haret.exe
system-xxxx.img or system-xxxx.sqsh
resources.zip
updated zImage-xxxx
updated rootfs-xxxx.img
If you are updating clear the root of your sdcard of any old android related files by moving them to a seperate folder or deleting them. If you are changing system images make sure you rename or backup your old data.img it might not be compatible with new or different builds.
Copy all files to the root of your sdcard.
Extract the basefiles.zip and resources.zip (resources.zip is not needed for donut) to the root of your sdcard.
Rename any updated files to there short names. For example if you downloaded zImage-24-10-09 rename it zImage etc...
Edit your default.txt for your panel type and resolution. There are comments in the file that will guide you.
Correct resolutions for different builds:
Donut/Tattoo: mddi.width=240 mddi.height=320 lcd.density=120
Ion/Cupcake: mddi.width=320 mddi.height=427 lcd.density=160 (this is the most common and can be adjusted)
Hero/Rogers: mddi.width=320 mddi.height=480 lcd.density=160
Rename the system image that you downloaded to system.img or system.sqsh depending on what file extension is already there. For example if you downloaded system-08-08-09.img rename it system.img. If you downloaded system-tmo-ota-drc92.sqsh rename it to system.sqsh.
After everything is setup execute haret.exe and tap run.
Any other questions post them in the correct xda thread for the build you are running.
Which build are you trying? Ion/cupcake should be 240x320 also.
I am using system-tmo-ota-drc92.sqsh, and I get this error when trying. The error I get is Failed to find system.img on SD Card /bin/sh: can't access tty; job control t/ #
tomp8588 said:
I am using system-tmo-ota-drc92.sqsh, and I get this error when trying. The error I get is Failed to find system.img on SD Card /bin/sh: can't access tty; job control t/ #
Click to expand...
Click to collapse
put everything into a folder called android on your sdcard make sure your rename system-tmo-ota-drc92.sqsh to system.sqsh
Thanks it worked great. I have been trying to figure this out for a couple of days.
I had the same problem...thanks jamezelle

How can I extract contacts from Android files ?

If I saved all my Android files on my computer from a previous build, can I somehow get the contacts out of them files ? perhaps there's a file that contains all contacts ?
log into your gmail and extract them that way
That's the weird part, for some reason the number I'm looking for wasn't logged by Gmail, and that's why with the current build I didn't have his number imported as the rest.
The contacts are stored in a SQLite3 database file so the file format is ".db"
The development tool Android Debug Bridge (ADB) can be used to extract the file from an EMULATOR
ADB can also extract the file from a phone but it must be rooted first AND the ADB drivers must be installed on your machibe as well
(Rooting is NOT for beginners though)
The contacts.db file is stored in the protected system memory, the file path is:
data/data/com.android.providers.contacts/databases/contacts.db
itsme_4ucz said:
The contacts are stored in a SQLite3 database file so the file format is ".db"
The development tool Android Debug Bridge (ADB) can be used to extract the file from an EMULATOR
ADB can also extract the file from a phone but it must be rooted first AND the ADB drivers must be installed on your machibe as well
(Rooting is NOT for beginners though)
The contacts.db file is stored in the protected system memory, the file path is:
data/data/com.android.providers.contacts/databases/contacts.db
Click to expand...
Click to collapse
If I understood correctly this file should be in the SD card, but I cannot find one, nor the directory /com.android.providers.contacts/ .
Your phone doesnt think its on the sdcard. It thinks its on the phone itself.
For my adb uses I use a program called android commander. It will allow you to navigate to that file.
Try using root explorer app, it will get you there...
My issue is not with the contacts on my working phone system, but on the files I copied before I've change to a new build. I thought there may be a chance it's on one of those files, but it sound much complicated then that.
If you don't want to try itsme_4ucz's solution, why not copy the files back to your phone and sync again with Gmail?
Because for some reason the build didn't load, that was the reason why I switched builds in the first place.
I don't want to root my phone for that, I'm pretty noob
I could be wrong, but...
Wouldn't that file be in the data.img file system image? If so, you can mount that file in Linux, or most likely Windows, then browse to the location mentioned above.
That'll at least get you there, but you still have to get the data out. Perhaps copy that one to the phone's current file system. If not, I'm sure someone will come up with something if the above posts don't work.

[GUIDE] Extract files from Nandroid backups

I have seen this asked a few times recently so I figured I would try to put together a quick and easy guide to extracting files from Nandroid backups. This guide only covers Windows, I assume if you are running Linux you can download unyaffs and compile/run it without my assistance. If you are adventurous you can install cygwin and compile unyaffs on your own (or download it at any number of sites across the internet), however I have included all the files needed to extract the files from the img files.
1. Download unyaffs along with the cygwin1.dll
2. Extract the files to a new folder.
3. Copy the system.img file from the ROM or your Nandroid backup to the folder you extracted unyaffs.exe and cygwin1.dll to.
4. Open a command prompt and cd to the folder containing the three files. If you are on Windows 7 you can just navigate there with Windows Explorer and in the URL bar type cmd to open a comman prompt in that location.
5. Type unyaffs system.img
You have now extracted all the files from the system partition of your Nandroid backup. The APKs are in the /app folder and some apps require library files that can be found in the /lib folder. For example: Swype.apk requires that libSwypeCore.so be in the lib folder for it to work properly.
I get an "end of image" message and no folder is created with the extracted files.
I am trying to recover some photos from my Gallery, which I presume is in data.img - but no matter what I try to extract, I get "end of image"
any ideas?
Is the system.img the only thing you can open with this or can you open the data.img or the wimax.img also?
Lock-N-Load said:
I get an "end of image" message and no folder is created with the extracted files.
I am trying to recover some photos from my Gallery, which I presume is in data.img - but no matter what I try to extract, I get "end of image"
any ideas?
Click to expand...
Click to collapse
Your photos should be on your MicroSD card, not on one of the system partitions. Look in SDCARD:\DCIM\100ANDRO, your photos should be there.
cruise350 said:
Is the system.img the only thing you can open with this or can you open the data.img or the wimax.img also?
Click to expand...
Click to collapse
I want to know this also
Seems to work ok for me for data.img and system.img, but not wimax.img or boot.img.
Yep, I tried that too...worked.
Is there a command to repack the system or data image after you have unpacked and played around with them???
I am pretty sure that my issue is within the data file...I removed what I think caused the problem but how do I repack it all to put it on the sd card and try it out?
thanks
Does anyone know a command to repack the files???
Worked for me.
Pretty much my whole family has Evo's. theyre all rooted too thanks to me but in my experimenting, i lost the 4G keys to mines. so i troubleshooted. i put Amen Ra's recovery on my brothers phone, and nandroid'ed only the wimax. put the entire folder for that backup on my sdcard on the spot where u would find ur backups, ran Amen Ra on my Evo. and bam. working 4G. u just cant use them at the sametime cuz it interfears.
Oh ok cool.
Is there anyway to pack the files on windows
I want to see if my phone will boot now that I got rid of some programs I believe to be causing it to bootloop
Stupid question. Don't mind me.
Awesome this works Thanks allot
how can I extract /data/system to then package back as either
* SBF
or
* update.zip
to write to another identical phone?
re
http://forum.xda-developers.com/showthread.php?p=17217163#post17217163
ubuntu fyi
I've extracted *.smg files from a SBF Rom File. I'm willing to extract Stock Apk's from it.
Now, my Unyaffs is in the same folder of the SMG files such as cygwin1.dll, however when i try to execute "unyaffs cg39.smg" I receive the following:
8 [main] unyaffs 5960 handle_exceptions: Exception: STATUS_ACCESS_VIOLATIO
N
2790 [main] unyaffs 5960 open_stackdumpfile: Dumping stack trace to unyaffs.e
xe.stackdump
the log says:
Exception: STATUS_ACCESS_VIOLATION at eip=004010B0
eax=444E1A20 ebx=0000001A ecx=FFFFFFE4 edx=00801322 esi=0040130E edi=610E21A0
ebp=0022EE88 esp=0022EE50 program=C:\Motorola\unaffys\teste-extracted\unyaffs.exe, pid 4708, thread main
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame Function Args
0022EE88 004010B0 (0022EEE9, 00000000, 00000000, 00401333)
0022EEB8 004013AF (00000002, 00800180, 00800090, 610A5E22)
0022EFA8 61004DD2 (0022EFC0, FFFFFFFF, 77A651CE, 00000000)
0022FF58 6100594F (00000000, 00000000, 00000000, 00000000)
End of stack trace
I've tried to regsrv32 the DLL and also receveid error as a invalid Dll. Does anyone have an idea?
I'm looking for stock Phone, Contacts and the keyboard apk, by the way, anyone knows the keyboard apk file?
thanks
Thanks
Sent from my PC36100 using Tapatalk 2
hi guys,exist a new link for this tool or another tool for open .img files?
thanks in advance

[Q] Need help modifying system.img

Hello everybody... I was off for a few weeks and now when I'm back I suddenly felt like doing something new... and when i was looking into some folders that i had from my Android SDK i noticed something named system.img in my level 8 android platform... previously i was enthusiastic to install first google apps in virtual android in my windows then try to install a Custom ROM such az OxyGen or CM7.0.3.... so i guessed that system image must contain the files to do this... over a lot of search i found the tool to extract it.. I extracted it with UnYaffs... the i injected(!) the google apps APK from the latest zip (20110613) file... and something i wondered about is that you can extract from an Yaffs archive but you cannot create one in Windows.. SO I FIRED UP MY UBUNTU....(!!!) and created the image... then transferred it to windows made a backup of the original system.img and replaced mine... before that having all my virtual android machines deletd(I mean wiped from my system!!!)...As normal i created a AVD(Android Virtual Device) from my modified platform... everything went right and it created successfully but when I was starting my AVD everything suddenly changed into bad... It's stuck on the TEXT saying ANDROID... i mean the first text not the second graphic that is Android's name in iron like gray-blue color....
I don't know what has caused the problem.. anyone got his hand dirty on this system.img file?
I guess it might be from that it must be Yaffs1 but i created a Yaffs2 archive... didn't I??? but since I haven't got any Yaffs1 archive maker for ubuntu I can't test...
And I'm sure that the system.img is created fully and not partly... because I UnYaffs-ed it many times and the files do contain in it...
AnY HeLp??

[HELP] Retrieving TWRP data [SOLVED]

Hello, I would like to know how I could extract backed up TWRP data on my computer? maybe because the data was large TWRP split it into two files : data.ext4.win000 and data.ext4.win001 (sizes 1.5 and 1.2 GB)
How I got there:
I've been using XenonHD rom for quite a while, and this rom uses koush's superuser app.
I noticed there was a newer version on the market so I installed it; however it appears the one used by the rom developer was modified and therefore had a different package name: I ended up with two superuser apps, one of them asking to update the binaries, which I did.
After that the phone got stuck and rebooted two or three times before being stuck indefinitely at 'updating app' message right after the bootanimation. I tried:
- to wipe dalvik cache but it was still stuck;
- I reflashed the rom + gapps but it was still stuck;
- then I went to the /data/app/ folder (via TWRP) and deleted the superuser app i installed from market, as well as the corresponding data in /data/data, wiped cache and dalvik again: still the same...
-the I decided to make a backup via TWRP : one of the whole system, and one of Data partition only;
- then I realised I couldn't transfer it to my computer in TWRP, so I finally made a factory reset, re-flashed the rom+gapps, and then (it worked) copied my backup to the computer
now; how can I retrieve the data of my apps only, as I guess it is the system data that is messed up?
Of course I tried to restore the Data backup in twrp and it got stuck again the same way....
any help greatly appreciated!
You could try appextractor on the play store
Sent from my Nexus 4 using xda app-developers app
forvrknight said:
You could try appextractor on the play store
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
It didn't work for me...
I finally got my data back by this tricky procedure (there might be an easier way but google+xda was not my friend on this one, I tried ext2explore and ext4explore, linux_reader, Andoird_ICS_JB_ext4_unpacker and maybe some more without success)
I renamed the two files:
data.ext4.win000 renamed as data.ext4.tar.001
data.ext4.win001 renamed as data.ext4.tar.002
Unzipping the first one with 7zip recreates a .tar archive named data.ext4.tar, which is not really a tar archive (extracting it will only give a very few files, for me it only included the image files of my custom bootanimation)
On this file I used AccessData FTK Imager, which would recognise the 'evidence' as a tar file and would allow you to export the data, however this is only the data contained originally in the first file (data.ext4.win000) (although the reconstructed archive was the right size, for me 2.7GB, the part extracted by this software was only 1.5GB)
To recover the second part, simply rename the second file (initially data.ext4.win001) into data.7z and then extract. (this does not work with the first file, all you would get is again a very few files, for me it looked like the content of a single apk file)
All you have to do now is to merge the two data folders and voilà
I could then retrieve my sms mms messages by retrieving the file smsmms.db (and eventually smsmms.db-journal) located in /data/data/com.android.providers.telephony/databases, and putting them on the phone in the same folder
I could also retrieve my phone call logs by retrieving the files contacts2.db (and eventually contacts2.db-journal) located in /data/data/com.android.providers.contacts/databases, and putting them on the phone in the same folder
Hope it helps someone someday
For some reason replacing the data folder of a particular app does not always work, I have to investigate a bit or maybe start fresh with a new rom and try again
asim0 said:
It didn't work for me...
I finally got my data back by this tricky procedure (there might be an easier way but google+xda was not my friend on this one, I tried ext2explore and ext4explore, linux_reader, Andoird_ICS_JB_ext4_unpacker and maybe some more without success)
I renamed the two files:
data.ext4.win000 renamed as data.ext4.tar.001
data.ext4.win001 renamed as data.ext4.tar.002
Unzipping the first one with 7zip recreates a .tar archive named data.ext4.tar, which is not really a tar archive (extracting it will only give a very few files, for me it only included the image files of my custom bootanimation)
On this file I used AccessData FTK Imager, which would recognise the 'evidence' as a tar file and would allow you to export the data, however this is only the data contained originally in the first file (data.ext4.win000) (although the reconstructed archive was the right size, for me 2.7GB, the part extracted by this software was only 1.5GB)
To recover the second part, simply rename the second file (initially data.ext4.win001) into data.7z and then extract. (this does not work with the first file, all you would get is again a very few files, for me it looked like the content of a single apk file)
All you have to do now is to merge the two data folders and voilà
I could then retrieve my sms mms messages by retrieving the file smsmms.db (and eventually smsmms.db-journal) located in /data/data/com.android.providers.telephony/databases, and putting them on the phone in the same folder
I could also retrieve my phone call logs by retrieving the files contacts2.db (and eventually contacts2.db-journal) located in /data/data/com.android.providers.contacts/databases, and putting them on the phone in the same folder
Hope it helps someone someday
For some reason replacing the data folder of a particular app does not always work, I have to investigate a bit or maybe start fresh with a new rom and try again
Click to expand...
Click to collapse
It actually helped me, thanks a lot!
Two Questions
asim0 said:
On this file I used AccessData FTK Imager,
Click to expand...
Click to collapse
This is a 4.6 Gigs professional software. If TWRP can read this type of file there must be a smaller tool available for this.
Can you please let me know of any other toll which would do the same?
asim0 said:
All you have to do now is to merge the two data folders and voilà
Click to expand...
Click to collapse
For the 2nd file do we need to follow the same procedure like 'evidence' and stuff?
Thanks, I am desperate to read some information from TWRP backup and cannot wait 6 days while the 4.6 Gigs of ISO will download.
pi_yush said:
This is a 4.6 Gigs professional software. If TWRP can read this type of file there must be a smaller tool available for this.
Can you please let me know of any other toll which would do the same?
For the 2nd file do we need to follow the same procedure like 'evidence' and stuff?
Thanks, I am desperate to read some information from TWRP backup and cannot wait 6 days while the 4.6 Gigs of ISO will download.
Click to expand...
Click to collapse
These files (at least the ones produced by TWRP2 on my phone) are just standard gzipped tar archives. The tar command has supported this format for at least 20 years. You can extract with a command like this:
Code:
tar xvfz data.ext4.win000
tar xvfz data.ext4.win001
number_thirty_two said:
These files (at least the ones produced by TWRP2 on my phone) are just standard gzipped tar archives. The tar command has supported this format for at least 20 years. You can extract with a command like this:
Code:
tar xvfz data.ext4.win000
tar xvfz data.ext4.win001
Click to expand...
Click to collapse
Thanks number_thirty_two, I copyed thes to a folder I named untar in my home folder of CYGWIN, and extracted my system files perfectly
C:\cygwin\home\carl\untar\
system.ext4.win000
system.ext4.win001
tar xvfz system.ext4.win000
tar xvfz system.ext4.win001
Apologies for resurrecting this, but does anyone know how to extract them if they were compressed as .comp files?
asim0 said:
It didn't work for me...
I finally got my data back by this tricky procedure (there might be an easier way but google+xda was not my friend on this one, I tried ext2explore and ext4explore, linux_reader, Andoird_ICS_JB_ext4_unpacker and maybe some more without success)
I renamed the two files:
data.ext4.win000 renamed as data.ext4.tar.001
data.ext4.win001 renamed as data.ext4.tar.002
Unzipping the first one with 7zip recreates a .tar archive named data.ext4.tar, which is not really a tar archive (extracting it will only give a very few files, for me it only included the image files of my custom bootanimation)
On this file I used AccessData FTK Imager, which would recognise the 'evidence' as a tar file and would allow you to export the data, however this is only the data contained originally in the first file (data.ext4.win000) (although the reconstructed archive was the right size, for me 2.7GB, the part extracted by this software was only 1.5GB)
To recover the second part, simply rename the second file (initially data.ext4.win001) into data.7z and then extract. (this does not work with the first file, all you would get is again a very few files, for me it looked like the content of a single apk file)
All you have to do now is to merge the two data folders and voil
Click to expand...
Click to collapse

Categories

Resources