[SOLVED]ClockWorkMod recovery commands used - Android Q&A, Help & Troubleshooting

Hey guys,
Does anybody know what commands the ClockWorkMod recovery uses to generate backup images? Like when you browse to your /mnt/sdcard/Clockworkmod/backups/ directory and see your *.img files, what command is used to generate that file? I know in linux you can use dd and cat (block partition) > *.img and that would generate it, but i want to know the exact command used by ClockWorkMod recovery.
Thanks all for your time!
ANSWER: mkyaffs2image

Bumpy bump bump bump :/

HELOO!?!?!?!?!!??

I take it you're looking to replicate the functionality of the nandroid backup? If so this thread contains a script to do so.
If you want to find out for some other reason, I suggest you examine the script and/or CWM source files.

Bloved said:
I take it you're looking to replicate the functionality of the nandroid backup? If so this thread contains a script to do so.
If you want to find out for some other reason, I suggest you examine the script and/or CWM source files.
Click to expand...
Click to collapse
THANK YOU VERY MUCH FOUND MY ANSER
mkyaffs2image is the command used to generate an image file from your partitions thanks! no i can make my app

Related

[How-To] Extracting/Accessing Recovery/Nandroid backup (.img) files

Actually this info is already present on other device forums but is unavailable @X10 forum. So I thought I will put it up here,
* If the MODS feel this thread is redundant please delete it *
Nandroid backups files (.img) created via Recovery are yaffs file system images. A tool called Unyaffs can be used to extract the files within these images (data.img / cache.img / system.img).
linux users can d/l the source code from: http://code.google.com/p/unyaffs/downloads/list
and compile using:
Code:
gcc -o unyaffs unyaffs.c
for windows users:
you can download the attached rar file and extract it...
usage:
1) copy the compiled unyaffs file/exe (along with cygwin1.dll) to a new directory
2) copy the nandroid backup image (data.img / cache.img / system.img) into that directory
3) go to terminal/command prompt, change directory to where those files are and execute:
e.g. for system.img
Code:
unyaffs system.img
the contents of the .img file will be extracted in that directory
there is also an app in the market YaffsExpert with which you can extract the .img files using phone
Inspired from:
guide at EVO 4G forums http://forum.xda-developers.com/showthread.php?t=890508
Extracting files from a nandroid backup using unyaffs http://bit.ly/gTLFkc
How to extract the files of Nandroid backup on Windows @ androidforums.com http://bit.ly/fT7udF
xlnt
+1 nice post! very useful info for any Android owner, anyone ever backed up with nandroid or xRecovery and felt like they forgot something from one of their earlier backups...? This is what you need
Pretty nice and useful. I actually was tinkering around with these files the other day as I contemplated running either Z's Froyo Beta 4 OR J's GB
Thank you. It is very useful.
Great topic! Thanks
now i don't have to google for this thanx...
How To Repack Files?
Will this check for the md5?
velnens123 said:
How To Repack Files?
Click to expand...
Click to collapse
i didnt follow...
do u want to place/add/remove files to make ur own yaffs img?
mohdameer said:
Will this check for the md5?
Click to expand...
Click to collapse
this will just extract the contents of nandroid/recovery backups...
u can use md5summer or similar progs to check md5 sums..
i searched a tool like this... thank for this HOW TO!
DooMLoRD said:
this will just extract the contents of nandroid/recovery backups...
u can use md5summer or similar progs to check md5 sums..
Click to expand...
Click to collapse
thanks. the reason i asked was that, everytime i try any rom from z, i get md5 error while restoring old backup. after extensive search in this forum and loosing my sms messages, i found a way. using adb shell, then using "busybox md5sum" i was able to generate the correct md5 hashes or whatever its called then restore the xrecovery backups. if i use the md5sum directly from the adb shell then xrecovery gives me mismatch.
may be z can look into this. i beleive the md5 mismatches are caused due to different md5sum command in adb shell and in busybox.
mohdameer said:
thanks. the reason i asked was that, everytime i try any rom from z, i get md5 error while restoring old backup. after extensive search in this forum and loosing my sms messages, i found a way. using adb shell, then using "busybox md5sum" i was able to generate the correct md5 hashes or whatever its called then restore the xrecovery backups. if i use the md5sum directly from the adb shell then xrecovery gives me mismatch.
may be z can look into this. i beleive the md5 mismatches are caused due to different md5sum command in adb shell and in busybox.
Click to expand...
Click to collapse
no need... the problem is with blanks /spaces " " in ur file name/ folder name... check that... if u have renamed the backups (folder name) and have space in it u will get md5 error... spaces in folder names are not supported...
no didnt change a single thing. even the filename which is the default timestamp.
Which version of recovery is that? Sounds maybe messed up. Using latest version helps.. just a thought
mohdameer said:
no didnt change a single thing. even the filename which is the default timestamp.
Click to expand...
Click to collapse
dude thanks a lot.it was useful
MrHassell said:
Which version of recovery is that? Sounds maybe messed up. Using latest version helps.. just a thought
Click to expand...
Click to collapse
i am using the latest one.
mohdameer said:
i am using the latest one.
Click to expand...
Click to collapse
xRecovery v0.3 Recovery
or
FreeXperia Recovery
DooMLoRD said:
xRecovery v0.3 Recovery
or
FreeXperia Recovery
Click to expand...
Click to collapse
xRecovery v0.3 Recovery
i didnt knew there was a different freexperia one.
i downloaded from z xrecovery thread , the unified one.
sorry if i am hijacking this thread in wrong direction. i found the solution as i mentioned earlier.
DooMLoRD said:
Actually this info is already present on other device forums but is unavailable @X10 forum. So I thought I will put it up here,
* If the MODS feel this thread is redundant please delete it *
Nandroid backups files (.img) created via Recovery are yaffs file system images. A tool called Unyaffs can be used to extract the files within these images (data.img / cache.img / system.img).
linux users can d/l the source code from: http://code.google.com/p/unyaffs/downloads/list
and compile using:
Code:
gcc -o unyaffs unyaffs.c
for windows users:
you can download the attached rar file and extract it...
usage:
1) copy the compiled unyaffs file/exe (along with cygwin1.dll) to a new directory
2) copy the nandroid backup image (data.img / cache.img / system.img) into that directory
3) go to terminal/command prompt, change directory to where those files are and execute:
e.g. for system.img
Code:
unyaffs system.img
the contents of the .img file will be extracted in that directory
there is also an app in the market YaffsExpert with which you can extract the .img files using phone
Inspired from:
guide at EVO 4G forums http://forum.xda-developers.com/showthread.php?t=890508
Extracting files from a nandroid backup using unyaffs http://bit.ly/gTLFkc
How to extract the files of Nandroid backup on Windows @ androidforums.com http://bit.ly/fT7udF
Click to expand...
Click to collapse
Thank you very much!

Custom dumps

can anyone tell me where can i get dumps so that i can modify it?
Azharkanorwala said:
can anyone tell me where can i get dumps so that i can modify it?
Click to expand...
Click to collapse
Could you be more specific? Dumps of what?
I want dumps from which i want to cook my own rom and apply mods to it, but cant find it for my galaxy note. help is appreciated
Backup using cwm then copy it from sdcard extract backup w/ winrar
But which file is needed in this, i have attached a screenshot of it
You can also just attach your phone to your computer, and type "adb pull /system" in the command prompt

[Q][NVFLASH]Gain root on stock system image

Hi all, researcher and enthusiast,
I own a complete backup of all partition of the LG P990 with stock ICS, made it with nvflash with a command like this,
Code:
nvflash -r -read <-partition number-> my_partition.img
for all the partition listed in the partition table.
I guess that in someone of that raw image file, (outputted by nvflash), is located the entry system partition, (PartitionId=23 for the LG P990 ICS partition layout).
It's easy for every linux user to mount the raw image file, simply with 'mount' utility.
Browsing them we can find as already hypothesized the entrie android system partition!
If I copying in it the 'su' executable compiled for my platform, it could work?
Yes. Simple as that. Just be careful with permissions.
There's a topic I made on the ancient v28g time with stock v28g rooted system, on dev section. There you'll find useful info.
Do not say "thanks"; just press it under here.
louiscypherbr said:
Yes. Simple as that. Just be careful with permissions.
There's a topic I made on the ancient v28g time with stock v28g rooted system, on dev section. There you'll find useful info.
Do not say "thanks"; just press it under here.
Click to expand...
Click to collapse
Thanks! I'll have a close look to your work now, for others that consider this stuff interesting, louiscypherbr's work is here:
http://forum.xda-developers.com/showthread.php?t=2010671
Nice job!
louiscypherbr said:
Yes. Simple as that. Just be careful with permissions.
Click to expand...
Click to collapse
Ok louis, but the partition23 image file after adding su binary or other things is bigger than the previous that we had read with nvflash, right?
If I flash back it with
--bl fastboot.bin --download 23 image.img
how can this work..?
In the part table is write that have been reserved 536.870.912 bytes for the partiton 23, but we want flash an img file bigger than that size (because we added some stuff), this not causes problem?
And what do you mean for careful?
The extracted file is a dd partition image, meaning it's extracted byte by byte. So it includes the empty space, which you can see with "df" command after mounting it.
You can add files that fit in that position and it will be ok when flashed.
Do not say "thanks"; just press it under here.
Stupid thing! You're right!
And, what you mean for careful with perm?
The su binary should be have the setuid bit set in addition to the obvious x, is this enough?
Have you compiled su by yourself...?
louiscypherbr said:
There's a topic I made on the ancient v28g time with stock v28g rooted system, on dev section. There you'll find useful info.
Click to expand...
Click to collapse
Where have you found the executable of su packed in your v28g louis...???
Hey, sorry for being far from this.
What I was talking about permissions is that you should keep su permissions/owner. I did this just copying the su from a rooted Rom zip to /system/xbin and pasting inside your loop mounted /system with file manager (I'm kde fan, so I used dolphin, the kde graphical file manager, but you can use any other as well).
Sent from my LG-P990 using xda app-developers app

[Q] Create a Flashable Zip Out Of a Nandroid Backup of /System

Hi, I've gathered some resources for creating my Touchwiz 4.0 rom but I need to know how to make a flashable zip from a nandroid backup of /system.
How would I do this?
Another question while I'm here.. I get this error when using kitchen: Imgur Link , any suggestions?
DamnTarget said:
Hi, I've gathered some resources for creating my Touchwiz 4.0 rom but I need to know how to make a flashable zip from a nandroid backup of /system.
How would I do this?
Another question while I'm here.. I get this error when using kitchen: Imgur Link , any suggestions?
Click to expand...
Click to collapse
You don't need nandroid backup
Just need /system partition
Connect your device to PC
Go to platform-tools folders where you have installed adb.
Make a folder system in this folder.
Open Command Prompt in that folder and type
Code:
adb pull /system system
It will take some time.
When it's completed. What you have to do is replace the system folder in any ROMs flashable zip and modify it's updater-script to suit your needs
Thanks for taking the time to answer my question!

[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