[Q] How to decompile/recompile atrix img files? - Atrix 4G Q&A, Help & Troubleshooting

I would like to know how to decompile/recompile the HKTW 2.3.4 img files to mess around with them...any help would be greatly appreciated...
I'm using windows 7 64bit, and would like instructions using windows but if it's better/easier done using linux, I can easily setup an Ubuntu system...
Now that the Atrix is unlocked, i would like to try my hand at some rom building...hopefully someone can point me in the right direction...Thanks!

Use ext2explorer to mount *.img file and then You can access to directory and file structure inside .img file..
http://sourceforge.net/projects/ext2read/files/Ext2Read%20ver%202.0/ext2explore%202.0%20beta/

Hi,
If you are going to be doing anything extensive like a rom, you might as well bite the bullet and get linux installed. Android is linux based, so you are better off using the same system to develop for it.
ext2explorer is OK in a pinch, but you have to save files to look at them, and it crashes every now and again. Also, you can't preserve the file ownership and permissions.
How to access atrix image files:
mount -o loop -t ext3 atrixexample.img mountpointdirectory
do stuff
umount mountpointdirectory
Cheers!

Thanks guys!
NFHimself, that makes a lot of sense, definitely gonna try that out, thanks a lot

Related

[Q] [SOLVED]A little help here please.

Hello all.
Well, here is my problem. I was searching for some theme to change the "colors" of the menu of my device. SInce i couldn't find one, i just started to read a lot, and try to do it myself.
Well, I followed the instructions... and finally got my framework-res. The only problem was that the size of the file was lower thatn the original one. Anyway, I just went to root explorer, took my new framework-res.apk and replaced it on framework folder in internal storage.
The problem is that now my device won't start, I mean... it's stuck on the samsung logo, doing the animation over and over and over. Well I tried to get to the original framework-res, but I don't know how since I cannot replace things because I can't use a file explorer.
I searched some themes on the forum, thinking that maybe the framework-res would be replaced for the new one, and then it would work. Well it doesnt.
I have kph rom, and tried with "Dark simplify theme" and "circle battery kph" couse it's supposed to be stock theme with the circle battery...
Now, I dont know what to do, I dont know how to make an update.zip myself (I tried searching and learning but i just don understand).
I think i would reflash my system but, My internal partition was transformed to ext4 with cf-root, and I read a lot that If i want to flash any other rom, I have to change it to rfs first, but i can't do it couse i can't get to the ext4manager application.
So any ideas? please?
Thanks in advance.
ps: okay, i was a little desesperated when I wrote this (i still am). I searched for some with ext4 compatiblity. I have just tried gingerReal now. It's working. I'm gonna change the internal storage to rfs again, and flash kph.
Bootloop is really common here
you don;t need to reflash, if you have working framework-res.apk you just need to raplace it..
copy framework-res.apk to your sdcard
connect your phone to computer when in recovery
mount system partition using CWM
then using adb follow this command
adb shell
su
cd /sdcard
cp framework-res.apk /system/framework/
reboot
done
also if you reflash your ace using odin to stock one, ext4 partition automatically reverted to rfs
seilent said:
Bootloop is really common here
you don;t need to reflash, if you have working framework-res.apk you just need to raplace it..
copy framework-res.apk to your sdcard
connect your phone to computer when in recovery
mount system partition using CWM
then using adb follow this command
adb shell
su
cd /sdcard
cp framework-res.apk /system/framework/
reboot
done
also if you reflash your ace using odin to stock one, ext4 partition automatically reverted to rfs
Click to expand...
Click to collapse
Hi thanks for the answer. About the adb, that is supossed to be used in a pc, right? (sorry I never used it, i have just used terminal emulator in the device itself). I mean, I enter cmd, write adb shell and i'm in? (i have already installed sdk and all the neccesary things)
About the ext4 to rfs, well thanks! nice to know that ahaha . I have already flashed kph again, so it's all working now. But the next time, I'll do what you say. I guess I already know about adb shell, but I dont know how to use it (i get easily confuse when it comes to apply commands). Well, that's what I love of all of this. You screw things up, you get really nervous, but then you know you can solve it and it is the best ahaha.
Thank you!.

[Q] Xperia Firmware & Rooting

Hi,
I'm considering buying the Xperia-S but I have no information about Sony's policy in modding & tweaking. I don't plan to install custom kernels / recoveries / rom's initially & would only want to root the device & maybe customise it a little.
How good is Sony's support in updates & How easy is it to stay close to stock & still be rooted ?
I was browsing the development subforum & came across the thread with the stock firmware at : http://forum.xda-developers.com/showthread.php?t=1527319.
I downloaded Xperia_S_(LT26)_6.0.A.3.62_1252-0023.rar & LT26i_6.0.A.3.62_NCB World.ftf. I've extracted both the files & managed to get the system.sin files but I dont know how to browse / extract them.
I found a link to an old utility 'Xperia ROM Manager' which comes with mkyaffs.exe, SIN2IMG.exe & unyaffs.exe but I'm stuck as I cant get the output from the sin to img to mount in linux.
Any pointer in the right direction would help. Thank You.
Snmjm said:
Any pointer in the right direction would help. Thank You.
Click to expand...
Click to collapse
Yes, not to create new topic and continue discussion in the right thread.
I'm Sorry to have offended you but which is the right thread for a question like this ?
I thought posting something on the dev thread would be wrong & the thread with the utilities ( mkyaffs.exe, SIN2IMG.exe & unyaffs.exe) wasn't in the Xperia S forums but a year old thread for other SE devices.
Hey.
Use our FreeXperia/CM sin2img converter. It works better than the windows tools.
https://github.com/defer/semc-xperia-tools/blob/master/sin2img.py
After that extract the partitions, but its not yaffs its ext4. So if you are running linux system you can simply mount with:
mount -o loop system.img /home/yourname/folderwhereitgetsmounted
Have fun
Thank You so much.
I'm new to Xperia but not to android. I know how to root my desire-hd & a little about theming. Is there a wiki where general information about Xperia is available ?
Right, I am sorry for the above. I focused more on you topic name, rather than post itself. I apoligize.
Snmjm said:
Thank You so much.
I'm new to Xperia but not to android. I know how to root my desire-hd & a little about theming. Is there a wiki where general information about Xperia is available ?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1526866
No worries.
Bin4ry said:
Hey.
Use our FreeXperia/CM sin2img converter. It works better than the windows tools.
https://github.com/defer/semc-xperia-tools/blob/master/sin2img.py
After that extract the partitions, but its not yaffs its ext4. So if you are running linux system you can simply mount with:
mount -o loop system.img /home/yourname/folderwhereitgetsmounted
Have fun
Click to expand...
Click to collapse
I am getting the below error when running the script with system.sin from .62 firmware
Code:
Traceback (most recent call last):
File "sin2img.py", line 52, in <module>
convert (sin, img)
File "sin2img.py", line 28, in convert
bt = sinfile.read(2)
File "D:\Python32\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 130: character maps to <undefined>
I tried it in linux & it worked. Maybe you can try it using a live cd or install linux in a vm
Bin4ry said:
Hey.
Use our FreeXperia/CM sin2img converter. It works better than the windows tools.
https://github.com/defer/semc-xperia-tools/blob/master/sin2img.py
After that extract the partitions, but its not yaffs its ext4. So if you are running linux system you can simply mount with:
mount -o loop system.img /home/yourname/folderwhereitgetsmounted
Have fun
Click to expand...
Click to collapse
Hi, i have debian installed, how can i use sin2img.py? i mean, what commands and what packages do i need to make it work? because i only get "command not found" error
Yakandu said:
Hi, i have debian installed, how can i use sin2img.py? i mean, what commands and what packages do i need to make it work? because i only get "command not found" error
Click to expand...
Click to collapse
use your python path, for example i'm using redhat and my python path is /usr/bin/python, then the command is
# /usr/bin/phyton sin2img.py system.sin system.img

[Q] to Developers, How to Preroot.

Hi developers, i know sometimes i can be too insistent but, i really want to learn how to make those prerooted system.iso to help the comunity (Specially the spanish comunity, we have an spanish version of XDA for the people that does not understand english).
I've been searching a lot on google and this forum but i cant find anithing.
I would like to know at least where to look to find this info, what i need to know or some links to read. (Note: im not a developer, just a user wanting to learn xD)
Thanks in advance.
PD: I assume OTA rootkeeper doesnt work when flashing an .ftf
Sorry for repost, i found something, i know i have to make an .img from our system partition (i dont know how) then unpack the .img, then add superuser.apk and correct permissions and then repack the img.
oh, and i found this: http://www.mobi-forum.de/handys-sma...npack-repack-system-image-and-add-root-to-it/
as i understand is something like...
extract system.img from the device (dont know if we can do this from the system.sin, and dont know how)
extraxt system.img to a folder (dont know if this is an ext4 or yaffs2 partition but i can extract with ext2eplore but it seems that if you extract system.img on windows you lose all permissions so.. need linux?)
include superuser and correct permissions
include binaries and correct permissions
include or delete other apps and correct permissions
take that system folder to an .img
flash (yay! i know how to do it!)
so.. i know what must i do, but i dont know how to do it.
im not dev. im not a linux user but i learn fast
I would like to learn how to make prerooted images too. I've been looking for information about it but I haven't found anything
Any help will be appreciated
Just look in the Development section, and PM the people who are posting the pre-rooted images.
I have more info:
extract system.img ···> i think we can do that with sin2img (it extracts to yaffs partition, but i cant extract it with unyaffs)
extraxt system.img to a folder ···> We need linux to do this, im ussing Ubuntu for my first time and i downloaded:
These files for ext4 extracting and packing
These files to unyaff
But i have some errors line "command not found" with ext4 extractors, and "exceptions or corruptions" with unyaffs (it seems sin2img does not work properly)
include superuser and correct permissions
include binaries and correct permissions
include or delete other apps and correct permissions
take that system folder to an .img
I have similary problem.I cannot unpack system.img.So I cannot get root to my office firmware.If you have any progress,please tell me.Thanks.
well i found this, but when using unyaffs it gives me an error like "system.img not suported or corrupted"
http://wikiwiki.jp/knot/?SK17i-en
Yakandu said:
well i found this, but when using unyaffs it gives me an error like "system.img not suported or corrupted"
http://wikiwiki.jp/knot/?SK17i-en
Click to expand...
Click to collapse
system.img for XS is ext4, not yaffs.

[Q] Help on unpack repack ext4 system image

Does any one know how can I unpack and repack ext4 system images using cygwin? can you give me the complete and understandable tutorials on it? I have tried all of the tutorials here in XDA, but it seems that I can't follow the right way. Please to someone, extend a helping hand on me.
Try this software it has helped me a lot
Nice Tool but i need something similar for userdata, or maybe the cygwin command to pack a folder in a sp_tool flushable img.

[Q] How to Extract data from .Backup file ? - Created with android system recovery

I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
looking for the same
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
me too looking for the same thing ..how to extract from or decompile .backup file which we get thru recovery.
hi loverboyritesh :: i and you are in same position.. but some advaaanced users are here that we are telling rumors and lies.. dont worry bro.. even i'm trying to get solution.. will tel you after geeing one.. Still no one can tell me hoe to extract .BACKUP file..
same
i am looking for how to reinstall .backup myself so i can have my original rom install.
but i have notice my .backup is 700+mb while custom rom is 200+mb
do you know how to?
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
same here. dunno how to open and extract the files from a .backup file. hoping you know already
siiingkeeet said:
same here. dunno how to open and extract the files from a .backup file. hoping you know already
Click to expand...
Click to collapse
Nope.. Still i'm having that file but no one knew
reena0307 said:
Nope.. Still i'm having that file but no one knew
Click to expand...
Click to collapse
been searching for 5 days now :<
not a single answer found on google and forums
cant even post a new thread yet. just joined
hope someone will drop by this thread
still no solution?
got same problem here
Got a bootloop issue with an ASUS MeMo Pad 7 HD and I've booted in recovery <3e> to make a backup.
I've got a userdata_YYYYMMDD_HHMMSS.backup. I tried opening it with a bunch of tools like unyaffs, abe (Android backup extractor), going live on the file using linux tools (open as 7zip, zip, rar, tar, tar.gz, gz, bz2 , mount as iso, ext4 and so on....)
Still no luck :-/
Only clue is that the file seems compressed. During the backup under recovery, it told me 3600MB to backup and the file userdata_xxxxxxxx_xxxxxx.backup show only 2.61GB
I did this backup 3 time to ensure there were no corruption during the write process from the pad and did again the same "tests" to open the file...Not better.
If any dev' have any clue of the file format, I'd be glad to help
It doesn't seem to be a valid unix img file. Tried mounting it to no avail. When it's restored by the recovery it also extracts the individual files because i fails on one in my case and stops the entire restore... I tried unzipping it, changed extension to ,jar, .tar, .zip, etc., none of them are recognised...amazing for a standard android feature to find so little info about it
Any solution?
I called Alcatel's technical service today and they told me that you can use the backup file only from the phone. Mine gives me the following error when I try to restore it: Error Magic header
If anyone knows how to unpack the backup file I would be more than grateful.
It's a 512 byte header in front of a "tar.gz"
hexdump -C userdata_xxxxxxxx_yyyyyy.backup | less​showed the magical zip header "1f8b0800 00000000" at offset 0x200
So, skipping 512 bytes, the rest can be gunzip | tar
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv​
Sir ektoric what d u mean on ur post?
Sorry cant understand it..
Can u please d a step by step procedure? Please...pls...plss
Thanks in advance...
Steps?
@ektoric sir im a noob in this... Can u show a step by step procedure?
@killen00 sorry, I assume you have a linux machine (or have access to one). The command is actually all there is to it.
Code:
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv
If you don't have a linux machine available, might I suggest one of the many distros of your choice, most of which have LiveCDs which you can run without installing.
script for gunzip method
maybe on xda it is common sense, but for me it was necessary to know, that these stock android recovery extracted files can be restored with nandroid custom recovery, if you simply repack them into tar archive.
i put this two command lines in a dirty shell script (extract + repack as tar).
thanks to ektoric figuring out his gunzip method!
edit: notamamasboy's mount method added (but not tested yet). if script not works come back few days later, download again and check version, maybe it has changed meanwhile.
with this you're able to transfer data of non-rooted phone to (rooted) similar one.
this is useful in case touchscreen is broken, you haven't custom recovery installed, usb-debugging is disabled and connecting usb-otg-mouse doesn't work.
tested on my Archos 50 b Oxygen (Mediatek MT6582).
it works for me, feel free to improve, port to busybox and publish. no support. use at own risk.
edit: bckp2cwm.sh is deprecated it is FOR JELLY BEAN ONLY (no selinux support)
a newer (selinux) version bckp2win.sh for TWRP you can find here:
http://forum.xda-developers.com/showthread.php?t=3775129
How did you go about determining the magic number found at 0x200? My hexdump output does not have that magic number (1f 8b) in any instance. Leads me to believe my backup is not a tar file. Any suggestions then?
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
ektoric said:
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
Click to expand...
Click to collapse
Even more peculiarly, two backups were created a .backup and a .backup2, I wonder if combining with cat I can get somewhere...

Categories

Resources