Related
I flashed my phone to JF 1.5 and in the process some how managed to screw up my sd card and lost all my apps. i did do a nandroid backup of jf 1.41 so i ahve those img files. I tried to restore to that to recover everything but it wont boot past the g1 logo. I tried downgrading firmware to 1.43 (couldnt find 1.41) and using the same restore for nandroid and still wouldnt boot. I also tried jsut applying the user data img to see if i could jsut grab that and it fialed on both firmware revisions 1.5 , 1.43.
In the end im stuck with a backup i cant use, the only thing i need off of it is the apps. I read that you can use the emulator to mount it but i couldnt figure that out. I also looked at yaffs extractor from the google code site but i wasnt quite sure how to compile/run it.
Anyone have a simple solution or a complex one i can follow to getting my apps out?
did you follow this?
http://forum.xda-developers.com/showpost.php?p=3311708&postcount=2
darkrangr said:
I also looked at yaffs extractor from the google code site but i wasnt quite sure how to compile/run it.
Click to expand...
Click to collapse
You go into the source directory, type "gcc -o unyaffs unyaffs.c", then you (create and) go to some directory where you want to extract the contents ("mkdir ~/extract") "cd ~/extract", and finally you extract the image "/path/to/unyaffs /path/to/data.img".
I tried the standard nandroid restore and it failed.
Trying the yaffs thing now and i got an error.
I placed the yaffs files all in a folder on the sdcard and put the img in that folder as well.
I open the terminal on the phone and did cd /sdcard/nan nan being the directory i made
I then tried to run that command "gcc -o unyaffs unyaffs.c" and i get gcc not found. what did i do wrong?
Unless your backup was corrupted, flashing the backup should have been fine.
Code:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash userdata data.img
You said it failed - what error did it give? Did it say it couldn't find the command? Be sure you're running these commands on your PC with your G1 connected via USB, the correct drivers are loaded, and you have the fastboot program.
As for using unyaffs - I don't think you understand what you have to do to use it. You have to compile it on your PC...all you get is the source code. I haven't looked on the google code site, but I would imagine there isn't a version for windows.
EDIT: After reading your original post for a second time, I have to ask: if you screwed up your SD card and lost all of your apps, does that mean you were using Apps2SD? That's a bit of an important detail to leave out, if so. Unless I'm mistaken (and someone correct me if I'm wrong), your apps wouldn't be in the backup anyway, you're wasting your time. If your backup is just restoring the symlinks to the SD card and the SD card is screwed up, then no wonder it's hanging at boot. You'd need to wipe your SD card and start from scratch. I'd recommend doing that either way - would you rather have to redownload a few apps or continue having a bricked phone for days?
it didnt fail on the restore with fastboot, it loaded up everything fine and then when i rebooted it just sat on the boot screens forever and never loaded.
I am feeling nice so darkrangr if you want to PM your image files I will unyaffs it on my ubuntu box for you.
TemporalShadows said:
EDIT: After reading your original post for a second time, I have to ask: if you screwed up your SD card and lost all of your apps, does that mean you were using Apps2SD? That's a bit of an important detail to leave out, if so. Unless I'm mistaken (and someone correct me if I'm wrong), your apps wouldn't be in the backup anyway, you're wasting your time. If your backup is just restoring the symlinks to the SD card and the SD card is screwed up, then no wonder it's hanging at boot. You'd need to wipe your SD card and start from scratch. I'd recommend doing that either way - would you rather have to redownload a few apps or continue having a bricked phone for days?
Click to expand...
Click to collapse
no, my apps were installed normally. I am running curent jf firmwar enow while i try to get my stuff back, but some of the apps i had are no longer available or have converted to pay apps, plus i forgot a lot of apps i had.
http://forum.xda-developers.com/showthread.php?t=497034
In the other tools archive on this post you can find the unyaffs tool fully compiled. Just move your image to the same folder, drag and drop it on the unyaffs.exe and watch the files appear.
How about YOU DIDN'T INSTALL GCC!!!
darkrangr said:
I tried the standard nandroid restore and it failed.
Trying the yaffs thing now and i got an error.
I placed the yaffs files all in a folder on the sdcard and put the img in that folder as well.
I open the terminal on the phone and did cd /sdcard/nan nan being the directory i made
I then tried to run that command "gcc -o unyaffs unyaffs.c" and i get gcc not found. what did i do wrong?
Click to expand...
Click to collapse
If i use DD to dump factoryfs, can i use this in a Rom as it is?
Ok so i found out how:
ADB shell
su
dd if=/dev/block/stl6 of=/sdcard/factoryfs.rfs
Is this any different to adb pull ?
that could be used to make a full backup of your phone for future recovery directly with ADB?
You sure it's possible? I'm intrigued
Bubble-be said:
Is this any different to adb pull ?
Click to expand...
Click to collapse
Way different.
Sent from my ACID Lestatious 2.0 BUILD 1.7 Galaxy 3 FROYO
Once you have have the factoryfs.rfs file how do you use this to flash the phone back?
I used this method to take a copy of the factory firmware before flashing a ROM. I can see in the TAR file used in the ROM I flashed has other RFS files as well.
flash it
stubborn_d0nkey said:
flash it
Click to expand...
Click to collapse
Hi Stubborn_d0nkey,
Thanks but I'm a bit of a noob at this. How exactly do you setup odin to do it as odin wants tar files and when using "one package" that tar combines lots of rfs files.
Can you explain step by step
thanks
astrae said:
Hi Stubborn_d0nkey,
Thanks but I'm a bit of a noob at this. How exactly do you setup odin to do it as odin wants tar files and when using "one package" that tar combines lots of rfs files.
Can you explain step by step
thanks
Click to expand...
Click to collapse
Download Total Commander and add it to a .tar file.
Sent from my ACID Lestatious 2.0 BUILD 1.7 Galaxy 3 FROYO
This is becoming interesting. So one could dd all the mount points and flash it back, or dd it back in download mode.
Which block devices should you backup ? To what rfs files do they correspond ?
Another question I have : where are the mount points defined ? I couldn't locate an fstab.
Bubble-be said:
This is becoming interesting. So one could dd all the mount points and flash it back, or dd it back in download mode.
Which block devices should you backup ? To what rfs files do they correspond ?
Another question I have : where are the mount points defined ? I couldn't locate an fstab.
Click to expand...
Click to collapse
No. You dd back in normal mode.
stl6: system
stl7: data
stl8: cache
Sent from my ACID Lestatious 2.0 BUILD 1.7 Galaxy 3 FROYO
Looks like deskjeti is one step further :
[Need Help] Galaxy 3 Backup Tool
This is how I made ROM, I'll try to write the steps as simple as I can. For advanced users only!
Update 22/08/11:
Revised packaging steps.
Update 13/08/11:
Removed unwanted method for ROM cooking.
Update 04/08/11:
Modified extract and repack ROM guide and added extracting system.rfs guide.
Things you need:
Base firmware
Archiver software (7zip recommended)
Any Linux environment to build ROM or Cygwin
APK Manager to optimize and decompile *.apk files
MagicISO (Optional) if you want to extract system.rfs
And the last thing is... You need enough experience in android world
So, here is the steps to cook a ROM:
Flash your phone with your desired base firmware
Make required modifications
Pull system.rfs from your phone by running this command on adb shell or Terminal Emulator:
Code:
dd if=/dev/stl12 of=/sdcard/system.rfs
Extract any *.tar.md5 files from your base firmware to your working folder with 7zip
Replace the current system.rfs with your modified one
EDIT: Pack your ROM by running this code via terminal or just pack it with 7zip/WinRAR as *.tar
Code:
tar -H ustar -c * >> ROMNAME.tar
change ROMNAME to your desired, well, ROM name.
Here is (yet) useful guide to modify your ROM.
Extract system files on system.rfs to make modding easier:
Extract PDA file (*.tar.md5) files with 7zip
Open system.rfs with MagicISO
To extract it, just drag and drop
NOTE: Never edit your ROM with MagicISO because the file permissions will be ignored, use MagicISO only for extracting files from system.rfs
Deodex, and Zipalign (optimize) your ROM apk files:
Ready to use deodex + root for KPN: http://forum.xda-developers.com/showthread.php?t=1196230
Ready to use deodex + root for KPH and other firmware: http://forum.xda-developers.com/showthread.php?t=1118048
Open APK Manager
To zipalign your apk files, in apk manager folder /place-apk-here-to-batch-optimize put your:
framework-res.apk, twframework-res.apk and all system apk
but not these:
AxT9IME, Calculator, Camera, Email, MMS, Phone, Screen Capture, Settings, Swype, Thinkdroid, Voice search
Choose Choose option 15
Then choose both (zp)
Let it run and done.
Now put back the apk files where they belong in the ROM.
How to put these apk files to my ROM? Copy these files to appropriate locations, such as /system/app to your ROM's /system/app, and etc.
Another handy modification guide:
Unpack and repack boot.img - http://forum.xda-developers.com/showthread.php?t=1173427
Convert firmware filesystem to ext4 - http://forum.xda-developers.com/showthread.php?t=1202049
Overscroll glow for any firmware - http://forum.xda-developers.com/showthread.php?t=1215933"
Give thanks to all dev who made that possible!
If you have more guides to put here, please PM me.
Am I pertamax?
hehe..just kidding.
Nice Info....great share.
I would want the Fla.sh Rom :'(
Thats a gr8 share...Thank you...)
saiftheboss7 said:
I would want the Fla.sh Rom :'(
Click to expand...
Click to collapse
sorry... once again, I'm sorry, I can't continue my ROM
Helpful thread man!
Thanks!
Great job taking your time to make this! Unfortunately, i dont even know the basics but now I know where to check when I do
fla.sh said:
sorry... once again, I'm sorry, I can't continue my ROM
Click to expand...
Click to collapse
Hey!
THX man, nice thread. Very useful!
Just PM to MOD, that they close you previous thread, a bout fla.sh.ROM. Or ppl just waiting it and asking.
CHEERS!
i think the most troublesome problem i encounter is to repack system.rfs. yes it can be mounted in magiciso, but howto repack/compile it back?
an0nym0us_ said:
i think the most troublesome problem i encounter is to repack system.rfs. yes it can be mounted in magiciso, but howto repack/compile it back?
Click to expand...
Click to collapse
Just save it.
didnt work when i just save it. my device got bootloop
an0nym0us_ said:
didnt work when i just save it. my device got bootloop
Click to expand...
Click to collapse
What modification you've added to your ROM? Maybe that modification causing the problem...
fla.sh said:
What modification you've added to your ROM? Maybe that modification causing the problem...
Click to expand...
Click to collapse
As Linux, MagicISO read RFS image as a FAT filesystem. File permissions can not be maintained. A better way but need linux:
1. Mount system.rfs as FAT and mount it to /tmp/rfs
2. Make ext4 image, and mount it to /tmp/system
3. Copy /tmp/rfs contents to /tmp/system
4. Make modification inside /tmp/system
5. Fix file permissions inside /tmp/system
6. Umount both image
7. Make ODIN flashable image, contains system.rfs (now in ext4 format) and CF-Root-S5830 boot and recovery image (for ext4 support)
8. Boot to Windows and flash your new firmware using ODIN.
ketut.kumajaya said:
As Linux, MagicISO read RFS image as a FAT filesystem. File permissions can not be maintained. A better way but need linux:
1. Mount system.rfs as FAT and mount it to /tmp/rfs
2. Make ext4 image, and mount it to /tmp/system
3. Copy /tmp/rfs contents to /tmp/system
4. Make modification inside /tmp/system
5. Fix file permissions inside /tmp/system
6. Umount both image
7. Make ODIN flashable image, contains system.rfs (now in ext4 format) and CF-Root-S5830 boot and recovery image (for ext4 support)
8. Boot to Windows and flash your new firmware using ODIN.
Click to expand...
Click to collapse
I use this command to mount rfs:
Code:
mount -o loop system.rfs /some_dir
Can you share us the command?
now thats really informative. thanks
ROM unpacking and repacking gude has been corrected. Tested by me. If you have any problems, just ask here.
Thanks.
I think you should add the date of update in the title, so that everyone can know about the update...
BTW thanks for this amazing guide...
Love it!!!
After making changes to system.rfs, how to save it as .rfs again?
adiles said:
After making changes to system.rfs, how to save it as .rfs again?
Click to expand...
Click to collapse
Please take look at the first page, it's updated, you know?
After I created md5 file and selected it in odin, it says "invalid image type" and "invalid model binary". How to solve that? After that I continued, skipped these errors and flashed, my phone stopped at boot screen with text "Galaxy ACE....". Plz help me
I edited a file manually in the system partition and my phone didn't boot and I didn't have a CWM backup.
By creating a new backup in CWM and mounting the SD card, I could open system.ext4.tar with "7-zip File Manager" and change back what I messed up and restore the system partition successfully!
----
What I discovered was that the MD5 mismatch would still appear even if I changed to the new MD5 string by using a MD5 generator.
This is a problem in CWM and appears in Abyss Kernel and Francos Kernel (The ones I tried and newest version as of this date), BUT luckily, SpeedMod kernel saved me!
By emptying the whole nandroid.md5 file, SpeedMod kernel's CWM did not check the MD5 sum and the system partition got restored with the corrected files and the phone booted successfully.
Hope this helps others as well and hit the Thanks button if it did, Thanks!
Could you not just boot into recovery, mount the system partition and then connect via an adb shell and/or use adb pull/push on the problem file?
Your method seems good though.
knightnz said:
Could you not just boot into recovery, mount the system partition and then connect via an adb shell and/or use adb pull/push on the problem file?
Your method seems good though.
Click to expand...
Click to collapse
That would work too of course!
Though many basic user are not familiar with adb or think it's complex.
If not, your method works as well.
Off Topic:
You should add "then" and "than" to your list. Also a common mistake.
I saw many people getting md5 mismatch while doing backup. So, I wrote this thread to help them.
Today I am going to share with you a method of restoring backups easily without an md5 error.
1ST METHOD:
Here are the steps:
1)Go to the folder where you saved your backup.
2)Open nandroid.md5 file with any text editor on your phone.
3)Delete all the lines from starting to end.
4)Save the file and close it.
5)Now restore your backup through CWM or Philz Touch or TWRP.
2ND METHOD:
If you changed the name of the backup folder, then, that is causing the problem. Try to change the name without adding spaces and/or special characters.
3RD METHOD:
Also you can use nandroid manager to recreate md5 sums.
Link in the next post by akiratoriyama
Thanks to @akiratoriyama
Or if you don't want to use nandroid manager, then you can use terminal emulator to recreate those sums:
Open terminal emulator then,
Use the following commands. (DON'T FORGET TO REPLACE "2012-04-17.10.09.36" WITH YOUR OWN BACKUP FOLDER NAME)
su
# mount -o remount rw /sdcard
#cd /sdcard/clockworkmod/backup/2012-04-17.10.09.36
#rm nandroid.md5
#md5sum *img > nandroid.md5
Don't forget to put the spaces!!
Voila, now your backup will restore properly without any md5 error:beer:
Sent from my GT-I9082 using Tapatalk Pro
Ateekujjawal said:
I saw many people getting md5 mismatch while doing backup. So, I wrote this thread to help them.
Today I am going to share with you a method of restoring backups easily without an md5 error.
1ST METHOD:
Here are the steps:
1)Go to the folder where you saved your backup.
2)Open nandroid.md5 file with any text editor on your phone.
3)Delete all the lines from starting to end.
4)Save the file and close it.
5)Now restore your backup through CWM or Philz Touch or TWRP.
2ND METHOD:
If you changed the name of the backup folder, then, that is causing the problem. Try to change the name without adding spaces and/or special characters.
Voila, now your backup will restore properly without any md5 error:beer:
Sent from my GT-I9082 using Tapatalk Pro
Click to expand...
Click to collapse
Alternate method
Use Nandroid Manager to recreate md5 sums
Sent from my GT-I9082 using Tapatalk
i tried the first method and it works for me
i cant backup my rom
i tried flashing the zip version of the s4 launcher and widget on my sgg-gt i-9082,,as instructed i backed up my stock rom but it didnt complete the backup..when i tried restoring the rom i get the error "md5 mismatch"..i wanted to try the methods youve posted but i cannot locate the nandroid.md5 file...i tried to install the touchwiz.apk (both in the system and user option) but the app just closes"unfortunately touchwiz has stopped working"..
so i have these questions:
1.is there a way i can still resore my stock rom?
2.i was running on jb 4.1.2..if i download the 4.2.2 update from the samsung website and flash my phone..wil i hav my touchwiz back?coz i dont like the holo launcher thaaaat much..
i'd be grateful for your help..
g_javella said:
i tried flashing the zip version of the s4 launcher and widget on my sgg-gt i-9082,,as instructed i backed up my stock rom but it didnt complete the backup..when i tried restoring the rom i get the error "md5 mismatch"..i wanted to try the methods youve posted but i cannot locate the nandroid.md5 file...i tried to install the touchwiz.apk (both in the system and user option) but the app just closes"unfortunately touchwiz has stopped working"..
so i have these questions:
1.is there a way i can still resore my stock rom?
2.i was running on jb 4.1.2..if i download the 4.2.2 update from the samsung website and flash my phone..wil i hav my touchwiz back?coz i dont like the holo launcher thaaaat much..
i'd be grateful for your help..
Click to expand...
Click to collapse
No way to restore stock rom. You didn't complete the backup.
Yes you can flash 4.2 to get TouchWiz back.
Sent from my GT-I9082 using Tapatalk Pro.
Ateekujjawal said:
No way to restore stock rom. You didn't complete the backup.
Yes you can flash 4.2 to get TouchWiz back.
Sent from my GT-I9082 using Tapatalk Pro.
Click to expand...
Click to collapse
thank you so much....
i tried the nandroid manager method and it worked..turns out my data was the one that didnt fully backup...i lost some-most-of my data but its better than losing my rom--...
thanks again..you are a life saver..