Galaxy Nexus Firmware Image - Kindle Fire Android Development

https://groups.google.com/group/android-building/msg/43c3a418144fc6c5?pli=1
as a platform nexus prime (TI4460)
very similar to the iron in Kindle Fire(TI4430) /
her release will accelerate work on the ICS

Do you know which format are those img files?
Can not unpack system.img .

riverzhou said:
Do you know which format are those img files?
Can not unpack system.img .
Click to expand...
Click to collapse
ext4
mount it in linux

river-lap:/river/test # mount -t ext4 -o loop system.img t
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any suggestion?

...or or or go here http://sourceforge.net/projects/ext2read/
and download that handy tool. allows a gui interface browsing of ext partitions or images and allows extracting thereof. no linux needed

riverzhou said:
river-lap:/river/test # mount -t ext4 -o loop system.img t
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Any suggestion?
Click to expand...
Click to collapse
try
losetup /dev/loop0 system.img
mount /dev/loop0 mnt-point/
If that doesn't work then paste the result of doing this to here (Unless you can figure that out yourself):
dd if=system.img | file -

I wanna rebuilt the system.img for kf, so linux is needed. Windows is no use for build android image .
On my linux:
river-lap:/river/gn/yakju-itl41f/a # losetup /dev/loop0 system.img
river-lap:/river/gn/yakju-itl41f/a # mount /dev/loop0 mnt/
mount: you must specify the filesystem type
river-lap:/river/gn/yakju-itl41f/a # dd if=system.img | file -
/dev/stdin: data
All not work.

riverzhou said:
I wanna rebuilt the system.img for kf, so linux is needed. Windows is no use for build android image .
On my linux:
river-lap:/river/gn/yakju-itl41f/a # losetup /dev/loop0 system.img
river-lap:/river/gn/yakju-itl41f/a # mount /dev/loop0 mnt/
mount: you must specify the filesystem type
river-lap:/river/gn/yakju-itl41f/a # dd if=system.img | file -
/dev/stdin: data
All not work.
Click to expand...
Click to collapse
Try
dd if=file.img | strings | head -20
and paste the result

river-lap:/river/gn/yakju-itl41f/a # dd if=system.img | strings | head -20
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
I did strings yesterday. It seems no difference :
river-lap:/river/gn/yakju-itl41f/a # strings system.img |head
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox

Yeah, it might be yaffs then. Try using a utility for that
http://code.google.com/p/yaffs2utils/

[email protected] yakju-itl41f# dd if=system.img | strings | head -20
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
toolbox
I get the same thing lol.
Here are my attempts to use unyaffs2
[email protected] yakju-itl41f# ./unyaffs2 -p 512 system.img /home/anthony/test/yakju-itl41f/
unyaffs2-0.2.3: image extracting tool for YAFFS2
image size (325426112) is NOT a mutiple of 512 + 16
operation incomplete
files contents may be broken
./unyaffs2 system.img /home/anthony/test/yakju-itl41f/
unyaffs2-0.2.3: image extracting tool for YAFFS2
image size (325426112) is NOT a mutiple of 2048 + 64
operation incomplete
Also tried regular ./unyaffs
[email protected] yakju-itl41f# ./unyaffs system.img
Segmentation fault (core dumped)

yareally said:
Yeah, it might be yaffs then. Try using a utility for that
http://code.google.com/p/yaffs2utils/
Click to expand...
Click to collapse
I can sure it's not yaffs.
I had unpacked some yaffs image files before.

riverzhou said:
I can sure it's not yaffs.
I had unpacked some yaffs image files before.
Click to expand...
Click to collapse
It looks like an ext4 filesystem image, just offset +40 bytes, but it's not complete, so not sure what is needed to make it complete.

Brandas said:
It looks like an ext4 filesystem image, just offset +40 bytes, but it's not complete, so not sure what is needed to make it complete.
Click to expand...
Click to collapse
Anybody know how to unpack this image now?
I am interesting in porting Galaxy Nexus ROM to Kindle Fire.

Finally, I find the way.
http://forum.xda-developers.com/showthread.php?p=5626296#post5626296

Why are you guys doing this?
Sent from my Galaxy Nexus using XDA App

JackpotClavin said:
Why are you guys doing this?
Sent from my Galaxy Nexus using XDA App
Click to expand...
Click to collapse
Trying to port Office Galaxy Nexus Rom to Kindle Fire.
My plan is based on the office rom, add some CM9's drivers and some linaro's performance components.
Of course, it need a new kernel too.

riverzhou said:
Finally, I find the way.
http://forum.xda-developers.com/showthread.php?p=5626296#post5626296
Click to expand...
Click to collapse
I was going to suggest the Android Kitchen, I've had to use it that way many times.

But what were you looking to remove from the nexus rom? You can download any rom for the nexus and it'll have the same stuff as that system image
Sent from my Galaxy Nexus using XDA App

Exactly. Just peruse the Nexus forum and find a stock rom. Easy enough.

Related

[GUIDE] Extract .rfs files

I came from HTC Hero to the Samsung Galaxy S GT-I9000
So I had never problems with cooking something up, but in the Galaxy I faced .rfs files and a flashing tool I can't use on linux...
So I searched through some boards to find a way to extract the .rfs files here a working guide for the S I9000.
What you need
Linux (tested with Debian testing)
It's pretty simple, execute this commands as root on your computer
SHORT WAY (thanks to mimocan)
Code:
# mount -o loop factory.rfs /some_dir
LOOOONG WAY
Attatch the rfs file to the loop device
Code:
# losetup /dev/loop0 /somedir/factoryfs.rfs
Create a directory to mount the device
Code:
# mkdir /somedir/mnt
Mount the device
Code:
# mount /dev/loop0 /somedir/mnt
the content of the rfs is NOT saved on the sdcard! you have to copy it!
Now you can copy the content from the /sdcard/tmp directory to the sdcard
Code:
# cp -R /somedir/mnt /somedir/factoryfs
hope this is helpful for someone
Code:
#mount -o loop factory.rfs /some_dir
should do the same
This works because rfs is based on vfat.
But have you ever tried this on cache.rfs or dbdata.rfs?
The mounted folder is empty. The cache.rfs in my case was around 1.2 mb.
Maybe the 1.2 mb are journaling data rfs uses?
I also tried mounting cache.rfs and dbdata.rfs directly on my sgs without any luck.
Since the phone has built in rfs drivers it should be able to mount it.
psternx said:
This works because rfs is based on vfat.
But have you ever tried this on cache.rfs or dbdata.rfs?
The mounted folder is empty. The cache.rfs in my case was around 1.2 mb.
Maybe the 1.2 mb are journaling data rfs uses?
I also tried mounting cache.rfs and dbdata.rfs directly on my sgs without any luck.
Since the phone has built in rfs drivers it should be able to mount it.
Click to expand...
Click to collapse
If you open the cache.rfs or dbdata.rfs from a PDA build (tested I900XXJP3) in a hexeditor you will see they are empty, just the headers and a lot of zeros
Have you been able to modify something from a rfs file and save it?
Actually Cache.rfs file in CSC is a renamed update.zip. At least with a few firmwares I have tried. So just open it with, for example, 7-zip and you can browse the files.
deleted............
Tried to mount a cache.rfs and got a "Device or resource busy".
Then tried to open it trough MagicISO, and voilá, I got the CSC files I needed
Now im into modifying factoryfs.rfs and hoping you can give me some tips.
Alt1
mount -o loop factoryfs.rfs directory & Copy files to a new place and edit them but how to create a .rfs from that point?
Alt2
sudo mount -v -o rw,loop,uid=$UID factoryfs.rfs Directory
Edit the files , umount the .rfs . Mount it again but the the changes are gone.
How do you do it?
Thanks.
a-son said:
Now im into modifying factoryfs.rfs and hoping you can give me some tips.
Alt1
mount -o loop factoryfs.rfs directory & Copy files to a new place and edit them but how to create a .rfs from that point?
Alt2
sudo mount -v -o rw,loop,uid=$UID factoryfs.rfs Directory
Edit the files , umount the .rfs . Mount it again but the the changes are gone.
How do you do it?
Thanks.
Click to expand...
Click to collapse
for me, i'll definitelty mod it elsewhere
ykk_five said:
for me, i'll definitelty mod it elsewhere
Click to expand...
Click to collapse
Thanks for answer.
Alt 1 i suppose you mean. But how to create the .rfs ?
a-son said:
Thanks for answer.
Alt 1 i suppose you mean. But how to create the .rfs ?
Click to expand...
Click to collapse
yess!!!!
how to recompile the .rfs ?????
KBJ911 said:
yess!!!!
how to recompile the .rfs ?????
Click to expand...
Click to collapse
BUMP!
Actually some cache.rfs aren't simple renamed zipfiles, as they (i.e. multi-csc) also contains more stuff
So I loopmounted rw the vfat cache.rfs, extracted and modified the contained sec_csc.zip (this one IS an update.zip structured file...)
But when I put it inside, sync, unmount and mount again to verify stuff, I got a corrupted filesystem and a corrupted zip file.
Any clue to successfully modify contents of such .rfs ?
mopodo said:
I came from HTC Hero to the Samsung Galaxy S GT-I9000
So I had never problems with cooking something up, but in the Galaxy I faced .rfs files and a flashing tool I can't use on linux...
So I searched through some boards to find a way to extract the .rfs files here a working guide for the S I9000.
What you need
Linux (tested with Debian testing)
It's pretty simple, execute this commands as root on your computer
SHORT WAY (thanks to mimocan)
Code:
# mount -o loop factory.rfs /some_dir
LOOOONG WAY
Attatch the rfs file to the loop device
Code:
# losetup /dev/loop0 /somedir/factoryfs.rfs
Create a directory to mount the device
Code:
# mkdir /somedir/mnt
Mount the device
Code:
# mount /dev/loop0 /somedir/mnt
the content of the rfs is NOT saved on the sdcard! you have to copy it!
Now you can copy the content from the /sdcard/tmp directory to the sdcard
Code:
# cp -R /somedir/mnt /somedir/factoryfs
hope this is helpful for someone
Click to expand...
Click to collapse
Is there a way to convert it back to rfs?
@all
Is there a way to convert it back to rfs?
criskelo said:
@all
Is there a way to convert it back to rfs?
Click to expand...
Click to collapse
If you used the shortway # mount -o loop factory.rfs /some_dir
than you can modify the files in some_dir.
when finished simple un mount the some_dir and the files are saved in the factory.rfs
Then tar and md5 the factory.rfs and you can flash it with odin
in windows use "magiciso" to extract .rfs
lownoise said:
Then tar and md5 the factory.rfs and you can flash it with odin
Click to expand...
Click to collapse
I lost at there, what does that means?
From linux
fastcx said:
I lost at there, what does that means?
Click to expand...
Click to collapse
From the linux command line you have to use
tar -cf filename.tar factory.rfs
md5sum filename.tar >filename.tar.md5
If you have extracted it with MagicISO and now just want to create it back to factoryfs.rfs can I do this with Cygwin and what would the command line be?

[ROM] Steam ROM 2.9.9.0 (JPA/JP7/JPM)

STEAM ROM 2.9.9.0 (it's not 3.0.0.0 because that would mean stable)
Steam ROM is a Steam Kernel based XWJPA/XXJP7/JPM ROM. Although this config is a bit old, I didn't had much time to experiment with the newer ones. This ROM is the common successor of both of my previous two ROMs
Steam ROM is a showcase of almost all features Steam kernel/recovery provides, including the recovery selection menu, or afterburner. It also has /system pre-lagfixed, so you won't need to do that after flashing. (the other filesystems are still rfs, as samsung's CSC install would format them anyway to rfs)
Main highlights
- ROM:XWJPA, CSC:XWJP7 Kernel: JPM (Steam Kernel 2.9.9.0)
- System is pre-converted to ext4
- All other partitions can be converted later
- Root is not installed, but can be installed later from the menu
- No theme is installed, but the battery indicator can be installed later from Afterburner
- Most samsungs apps are removed, but they can be installed later from Afterburner
How to install
The zip file contains everything you need to start, including Odin, a pit file, and all images. This is a complete rom, so you can always flash this with re-partition checked, and get all your previous data erased (sometimes data is kept, run a wipe data to be sure)!
You don't need to stick with the XXJP7 CSSC however, as CSC installs will be done by either 3e, or 2e recovery. After boot, you'll be asked which recovery version you want to use to install your CSC file. The rule of thumb is, that if your CSC file is old (made for Eclair), then you should choose 2e recovery. If it's new (made for Froyo) chose 3e recovery. You can chose to keep with Steam, but that will usually fail, as Steam is not designed to handle CSC updated.
What is Afterburner?
After you allow Steam to install, and the CSC files to setup, you'll be greeted (hopefully) with a list of post-flash options. Most of these options will simply
install back some of the removed applications. Simply check the apps you wish to use, and wait for them to get installed. If you change your mind, you can later re-visit the afterburner menu during recovery mode.
Be careful however, as the space is limited on /system, and afterburner doesn't yet check if there is enough space left on the device!
How to root?
Enter recovery mode, select Steam options, and install superuser
How to lagfix?
Enter recovery mode, select Steam options, and filesystem options
DL link:
- http://android.sztupy.hu/dl/Steam_ROM_eng_2.9.9.0.zip (english)
- http://android.sztupy.hu/dl/Steam_ROM_hun_2.9.9.0.zip (hungarian - use 2e recovery)
This is truly nice work. Make a 2.2.1 version?
Looks like awesome stuff sztupy!
Maybe next, a tool to convert the rfs factoryfs.rfs to ext4, from a PC? Or better yet, a tool to convert Samsung rom images from rfs to ext4 that can be flashed using Odin or something.
DocRambone said:
This is truly nice work. Make a 2.2.1 version?
Click to expand...
Click to collapse
First I have to get the kernel working on stock stuff. Then it'll be possible.
hardcore said:
Looks like awesome stuff sztupy!
Maybe next, a tool to convert the rfs factoryfs.rfs to ext4, from a PC? Or better yet, a tool to convert Samsung rom images from rfs to ext4 that can be flashed using Odin or something.
Click to expand...
Click to collapse
I don't think that can be done on a PC, as there are no rfs drivers. Creating a script that does the job using adb is easy though:
Code:
rem Should be on Steam kernel, with adb root option enabled
adb root
adb shell /sbin/steam mkdir -p /mnt/sdcard/convert
adb shell /sbin/steam mkdir -p /mnt/sdcard/convert/rfs
adb shell /sbin/steam mkdir -p /mnt/sdcard/convert/ext4
adb push factoryfs.rfs /mnt/sdcard/convert/
adb shell /sbin/steam truncate /mnt/sdcard/convert/factoryfs.rfs 291504128
rem The correct amount is got by multiplying the partition size from /proc/partitions by 1024
adb shell /sbin/steam losetup /dev/block/loop0 /mnt/sdcard/convert/factoryfs.rfs
adb shell /sbin/steam touch /mnt/sdcard/convert/factoryfs.ext4
adb shell /sbin/steam truncate /mnt/sdcard/convert/factoryfs.ext4 291504128
adb shell /sbin/steam losetup /dev/block/loop1 /mnt/sdcard/convert/factoryfs.ext4
adb shell /sbin/steam mount -t rfs -o check=no /dev/block/loop0 /mnt/sdcard/convert/rfs
adb shell /sbin/steam mkfs.ext4 -b 1024 -m 0 -J size=4 /dev/block/loop1
adb shell /sbin/steam mount -t ext4 -o noatime /dev/block/loop1 /mnt/sdcard/convert/ext4
adb shell /sbin/steam cp -dpR /mnt/sdcard/convert/rfs/* /mnt/sdcard/convert/ext4
adb shell /sbin/steam umount /dev/block/loop0
adb shell /sbin/steam umount /dev/block/loop1
adb shell /sbin/steam losetup -d /dev/block/loop0
adb shell /sbin/steam losetup -d /dev/block/loop1
adb pull /mnt/sdcard/convert/factoryfs.ext4
adb shell rm -rf /mnt/sdcard/convert
I will try this out, I am sure I will be as awed by this ROM as I was with Sztupy's earlier ones.
Sztupy always delivers.
nice work sztupy and i happy u coming back
Any one tried this yet?
Aylarth said:
Sztupy always delivers.
Click to expand...
Click to collapse
That is right.
Lets hurry up samsung to release 2.2.1 sources so we can get it rolling again?
I'm fed with da mess with JPU/JPX/JPY and JPM kernels
@ Sztupy,
So, this ROM is stock, right? No deodex, no zipalign. Can I flash DDJP6 MODEM on it? & can I flash HKAINU CSC from the recovery?
ragin said:
@ Sztupy,
So, this ROM is stock, right? No deodex, no zipalign. Can I flash DDJP6 MODEM on it? & can I flash HKAINU CSC from the recovery?
Click to expand...
Click to collapse
Yep, it's stock. Only the apps were removed + system was converted to ext4.
Official CSC's will work using 3e recovery.
I don't know about the modem, but I don't know why it wouldn't work oout of the box with another one.
sztupy said:
Yep, it's stock. Only the apps were removed + system was converted to ext4.
Official CSC's will work using 3e recovery.
I don't know about the modem, but I don't know why it wouldn't work oout of the box with another one.
Click to expand...
Click to collapse
Thanks for a quick reply. I have uploaded a CSC file to be installed thru CWM, and a MODEM file specific to my region. Can you tell me if it will work?
Thanks again.
Will this work on the Sprint Epic 4G? I'm asking only because this phone is known to have odd differences/bugs from the other Galaxy S phones.
Now that JPX source is available. Why not a sample?
Sent from my GT-I9000 using XDA App
Any development?
Waiting for 2.2.1 jpy release,it will rock
°Dexter° said:
Waiting for 2.2.1 jpy release,it will rock
Click to expand...
Click to collapse
Like its said above, Sztupy always delivers.
hd2 problem hang
my htc hd2 hang on disply how to solve this problem help me

[GUIDE] How to make an Odin ROM

How to make an Odin flashable ROM
This is just a small guide I want to share with anyone who's interested in the commands I personally use. Feel free to correct me or give better commands / instructions.
@Moderators:
If this thread is in the wrong section or already present at XDA, PM me.
This needs a UNIX compatible OS - like Linux or Mac OS X.
On Windows, you can use "Cygwin".
Click to expand...
Click to collapse
Use the dd (datadump) command to make the .rfs files
Of course you need to connect your phone via USB and have ADB prepared on your computer.
# Get Root access first
Code:
su
# Do this first to mount the /system R/W
(thanks to scheichuwe for the simplified command)
Code:
mount -o remount,rw /dev/block/stl9 /system
# Dump the needed data / partitions to your /sdcard
Code:
dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096
dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096
dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096
dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096
# Make the tar ball
Code:
tar -H ustar -c factoryfs.rfs cache.rfs modem.bin zImage > darky.tar
# MD5 it for a security check
Code:
md5sum –t darky.tar >> darky.tar
# Rename the tar file
Code:
mv darky.tar darky.tar.md5
Optional:
Make your own pit file
The pit file is used to set the partition layout (Partition Information Table).
# Dump the pit
Code:
dd if=/dev/block/bml2 of=/sdcard/darky.pit bs=4096
I hope I could help you with that
- darkyy.
Nice
Yeah first
Oh and one more thing:
If someone is gonna rate this thread 1 star, please explain here why.
So this means I can make an Odin rom of my current installed config? Or am I missing something?
If you then flash your tar + pit, you have your kernel and rom restored? This would be an awesome way to backup a good config, no?
VenQWish said:
So this means I can make an Odin rom of my current installed config? Or am I missing something?
If you then flash your tar + pit, you have your kernel and rom restored? This would be an awesome way to backup a good config, no?
Click to expand...
Click to collapse
Exactly - these commands will dump the data directly from your current phone.
And yes, you'll have a 1 to 1 Backup.
That is actually VERY useful! I'm constantly switching between a modded Insanity and CM7, and constantly reverting to stock, flashing custom kernels and flashing nandroids is getting quite annoying now.
Don't have access to a linux machine now, I'll try this asap, thanks!
Wow, dasch mal nützlich ville dank^^
Neat. Thank you!
Quipeace said:
That is actually VERY useful! I'm constantly switching between a modded Insanity and CM7, and constantly reverting to stock, flashing custom kernels and flashing nandroids is getting quite annoying now.
Don't have access to a linux machine now, I'll try this asap, thanks!
Click to expand...
Click to collapse
Well you can install cygwin, just remember to install bash terminal when cygwin setup is running.
Sent from my GT-P1000 using Tapatalk
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
Galaxy S is running on yaffs2? Interesting
Code:
mount -o rw,remount /system
That should work too...
Is this the same as this?
http://forum.xda-developers.com/showthread.php?t=943588
Mackzen said:
Is this the same as this?
http://forum.xda-developers.com/showthread.php?t=943588
Click to expand...
Click to collapse
No:
The instructions from drakyy create a flashable ROM from the phone.
The Application from bohdans creates a flashable ROM from files on your computer
scheichuwe said:
Galaxy S is running on yaffs2? Interesting
Code:
mount -o rw,remount /system
That should work too...
Click to expand...
Click to collapse
Thanks - gonna change it in the first post
Verified?
Cool stuff Darkyy,
is this working without any issues, any testers?
mr_at_sgs said:
Cool stuff Darkyy,
is this working without any issues, any testers?
Click to expand...
Click to collapse
It's what we used for the Darky's Resurrection Edition
Damn. Left my laptop charger at work. Just when I need battery also.
Great thread. Thank you.
Tricky103 UltraSlim Essential Rom on DamianGTO Ultimate kernel
I have a problem. When tryign to create the tar-file i get:
cannot create jesper.tar: read-only file system.
What to do?
Does this also work when the partitions are NOT RFS.
Like all in ext4?
Will Odin be able to flash that image?
I somehow doubt it...
zurchpet said:
Does this also work when the partitions are NOT RFS.
Like all in ext4?
Will Odin be able to flash that image?
I somehow doubt it...
Click to expand...
Click to collapse
Good question..... I'd like to know this too..
Although even if having to disable lag fix to create it the apply again after flashing is still a quicker way to toggle between your current rom and cm7..
Neat Darky
but can i do these dumps on the phone without a pc or adb
Sent from my GT-I9000 using XDA App
Perhaps some could write a script to do this at the phone
Sent from my GT-I9000 using XDA App

[Q] Extracting files from system images

Does anyone know what format is used to pack the stock system.img and userdata.img images for the Galaxy Nexus? I'm trying to extract the files from these images but not sure how to do so. So far I've tried unyaffs but it's segfaulting on the images, so I suppose these images aren't yaffs.
Try ext4 if unyaffs doesn't work
Sent from my PG86100 using xda premium
xHausx said:
Try ext4 if unyaffs doesn't work
Sent from my PG86100 using xda premium
Click to expand...
Click to collapse
Doesn't work, unfortunately...
Code:
> sudo mount -t ext4 -o loop system.img temp
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
> dmesg | tail
[ 1790.501835] EXT4-fs (loop0): VFS: Can't find ext4 filesystem
Ah, so it's a special sparse ext4 image that needs to be converted to a normal ext4 image using one of the tools in AOSP.
http://forum.xda-developers.com/showthread.php?t=1081239
This worked.

(Q) Best recovery?

What is the most reliable recovery currently? I'm using twrp at the moment. It's probably an older version so I'm curious what is recommended before i update it.
Sent from my Kindle Fire using Tapatalk 2
pwned3 said:
What is the most reliable recovery currently? I'm using twrp at the moment. It's probably an older version so I'm curious what is recommended before i update it.
Sent from my Kindle Fire using Tapatalk 2
Click to expand...
Click to collapse
My suggestion would be for you to stay with TWRP. Version 2.1.1 is the latest.
kinfauns said:
My suggestion would be for you to stay with TWRP. Version 2.1.1 is the latest.
Click to expand...
Click to collapse
I agree
Sent from my Galaxy Nexus using XDA
pwned3 said:
What is the most reliable recovery currently? I'm using twrp at the moment. It's probably an older version so I'm curious what is recommended before i update it.
Click to expand...
Click to collapse
You already know that TWRP is intuitive and easy to use. I'm using TWRP 2.1.1 and I have used recovery many times when trying out new ROM builds. Occassionally with 2.1.1 I find that the operation that you want to do just fails with either an error outright or will fail during the recovery process. It even failed on me once while creating a backup. I didn't pay much attention to the backup output log text once and I did want to recover that backup and could not due to an image file being zero bytes in size. I have my own app and data backup script that I wrote that keeps me current so recovery in such a failed case is simply flashing a new ROM and executing my recovery script; couldn't be simpler.
If you pay attention to TWRP's output and not just make an assumption that the backup or recovery succeeded then you can just repeat the operation until it's successful. This is rare but has happened to me more than once but even with that issue, I still like TWRP 2.1.1 (plus my own app backup script).
I'll include my app backup and recovery script here in case others can find it useful (I make no claims that will work to your liking however or that it will even work for you)
rebaseline.sh
Code:
#!/system/xbin/bash
cd /sdcard/BACKUP/
for i in `/system/bin/pm list packages -3 -f`
do
read junk apk pkg <<< =`echo $i | sed -e 's/[=:]/ /g'`
echo "Processing $pkg..."
echo " backing up $apk..."
cp $apk baseline/
touch /sdcard/BACKUP/baseline/`basename $apk`
echo " backing up data..."
busybox tar czf /sdcard/BACKUP/baseline/$pkg.tar.gz --exclude lib --exclude cache /data/data/$pkg 2>/dev/null
done
echo "Processing accounts..."
echo " backing up data..."
busybox tar czf /sdcard/BACKUP/baseline/accounts.tar.gz /data/system/accounts.db 2>/dev/null
Here is my recovery script:
restore-from-baseline.sh
Code:
#!/system/xbin/bash
cd /sdcard/BACKUP
pm set-install-location 1
chmod 777 /data/data
for i in baseline/*apk
do
X=${i/-[0-9].apk}
Y=`basename $i`
Y=${Y/-[0-9].apk}
echo $X
pm install -r $i
# Find out what the new app ID is for the package
OWNER=`/system/bin/ls -l /data/data | grep $Y | awk '{print $3;}'`
echo $OWNER
# Restore data as the app owner ID
chmod 777 /data/data/$Y
su --command "tar xvf /sdcard/BACKUP/$X.tar.gz -C /" $OWNER
echo "tar rc=$?"
chmod 751 /data/data/$Y
echo
done
chmod 771 /data/data
echo "Restoring accounts.db - reboot will be required"
tar xvf /sdcard/BACKUP/baseline/accounts.tar.gz -C /
There is one limitation that I haven't worked into the script yet. Any time there is an app update you will see a duplicate app in the baseline folder differentiated by -1 or -2. Before recovery you can just get rid of the oldest version of the apk file; the data is always current.
I'm sure that there are a lot of apps that this script would not work with but it does work very well with mine and cuts down recovery to a minute or two. I don't use Titanium Backup myself.
I've been sticking with TWRP 2.1.1, simply because I really like how it can compress backups, meaning more space for music and videos. Haven't had any issues with it, but I do prefer the look of CWRecovery, particularly Hashcode's latest release.

Categories

Resources