Hi guys. How can I create a flashable tar.md5 file via Odin? I need it to install a custom rom.. For first I installed the rom via recovery, then I made a backup of the /system partition using dd command line. After made the backup with the ext4.img extension (like stock firmwares), I converted it in tar.md5 using these commands on Ubuntu 14.04:
Code:
tar -H ustar -c customrom.ext4.img > customrom.tar
md5sum -t customrom.tar >> customrom.tar
mv customrom.tar customrom.tar.md5
Then I flashed the tar.md5 file via Odin but it gave me always fail.. There's anyone that could help me?
Up
Related
I couldn't find a thread on this. If there is one and I just missed it, please direct me that way and I apologize for the duplicate.
I hacked the .config file (kernel), compiled it, tested it in fastboot's boot mode (from the bootloader) and then flashed it to the phone with the instructions on this site:
credentiality2.blogspot.com/2010/08/nexus-one-htc-passion-compile-and-flash.html
It works and is wonderful, but I would love to find a way to create a boot.img file with the kernel I've hacked. Do any of you have any insight or know where I can look for more info.?
Do any of you know how to create the boot.img-ramdisk.gz file? I know how to put that with my hacked boot.img-kernel file and create a boot.img file that way.
Any help is much appreciated.
Fixed!
I figured out the problem was I couldn't the boot.img file from my Android 2.2 phone because the read-write permissions did not allow me to do the adb pull command. Now, I've pulled that boot.img file and can unpack and repack it with my hacked kernel using the directions on the website I originally referenced.
I used this command to change the permissions so I could pull the boot.img file:
#mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Hi,
I have rooted my HTC Dream successfully. I have flashed in CyanogenMod ROM.
Now I have downloaded Android Kernel and rebuilt it. Now I have the zImage which is the kernel image. Now how do I use this new image? I guess must modify the boot.img to use this new kernel image.
Any idea how can I do this? I tried using "fastboot flash:raw boot <kernel directory> <ramdisk directory>"
For <ramdisk directory> I point to the one in the android-sdk. But after flashing it stuck in the "G1 T Mobile" screen and doesn't proceed. Not sure how to resolve.
Thanks In Advance,
Perumal
I downloaded the boot.img file, split it into boot.img-kernel and boot.img-ramdisk.gz. Then, renamed my newly-compiled kernel's "zImage" file as "boot.img-kernel" and zipped them back up into boot.img. Then, I flashed it to the phone with fastboot. All of the directions are on this website:
credentiality2.blogspot.com/2010/08/nexus-one-htc-passion-compile-and-flash.html
It was written for HTC Passion / Nexus One, so you may want to pull your existing boot.img file first in case it doesn't work on the HTC Dream and you need to go back to where you started. I found this tutorial helpful for that.
credentiality2.blogspot.com/2010/08/extract-bootimg-from-android-phone.html
You probably need to change your permissions to push and pull the boot.img file. I would do that on my computer (with it tethered to the phone), using the following commands in a terminal window:
$ adb shell
$ su
# mount -o remount,rw /dev
Hi Guys
recently i bought a Samsung Galaxy Pro b7510
until now this phone doesnt have any custom recovery
i am trying to make a nandroid backup through ADB shell but i cant find the phone's partitions
i am using this command to find them
Code:
cat /proc/mtd
but it says that there is no such file directory
what should i do ?!
my phone is rootet
i wanna port clockworkmod recovery for this phone but first of all i want to have a full recovery from my phone in case if something went wrong i will be able to save my phone.
If I get what you say, then this is really easy.
Code:
mkyaffs2image /system system.img
mkyaffs2image /data data.img
mkyaffs2image /cache cache.img
md5sum *img > nandroid.md5
And put the 4 files inside /sdcard/clockworkmod/backup/nameOfBackup/
Cheers,
D4.
D4rKn3sSyS said:
If I get what you say, then this is really easy.
Code:
mkyaffs2image /system system.img
mkyaffs2image /data data.img
mkyaffs2image /cache cache.img
md5sum *img > nandroid.md5
And put the 4 files inside /sdcard/clockworkmod/backup/nameOfBackup/
Cheers,
D4.
Click to expand...
Click to collapse
thanx for reply but it says
mkyaffs2image not found
Hi there!
Anyone willing to paste official images for U8800: (V100R001C00B522G001)
recovery.img
boot.img
cust.img
amss.mbn
EMMCBOOT.MBN
Thanks!
S.
If i am honest i need only boot.img
Brgds,
S.
I need the whole non-modified image folder. /.cust_backup/image/
Little guide for making a dump.zip
1. Download Busybox installer
2. install Busybox to /system/xbin;
3. enter these commands from terminal;
4. su
5. cd /sdcard
6. chmod 777 /system/xbin/busybox
7. /system/xbin/busybox tar czvf dump.tar /.cust_backup
A dump.zip is saved at your sd-card
I am unable to do this because I have modified cust.img and recovery.img. Installing stock firmware doesn't work..
Check my MediaFire in the signature. I have cust_data separated from cust because cust_data is carrier specific.
Sent from my U8800
Hello dear humans,
This tutorial will help you convert simple IMG files into TAR.MD5, which is flashable using Odin (Mobile or PC version both).
For this you need to install JAVA JDK and Cygwin from the links below.
JAVA JDK: http://www.oracle.com/technetwork/ja...s-2133151.html
Cygwin: content.wuala.com/contents/neroyoung/XDA%20ROM%20Dev%20Tools/Cygwin.zip
How to install?
-Before doing anything, install Java then install Cygwin by extracting the zip and then extracting the cygwin_packages.zip, Run the cygwin.exe setup and select "Install from local...." then select the folder containing extracted files from cygwin_packages.zip, then click the "S" like button on all
and install in a folder you can access easily using commands.
(THE ABOVE LINKS ARE ONLY FOR WINDOWS VERSION OF JDK AND CYGWIN, IF YOU WANT TO INSTALL IN OTHER OPERATING SYSTEMS SO PLEASE GOOGLE IT. #IN LINUX DON'T INSTALL ANYTHING JUST DO IT IN THE TERMINAL)
Now in folder installed cygwin, go to home open cygwin.exe or open it from the shortcut in your desktop (THE IMG FILE AND CYGWIN MUST BE IN SAME FOLDER), lets name our IMG file recovery.img, in cygwin type the following commands without $ [Because cygwim already types $ before a command]
$ tar -H ustar -c recovery.img >
recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Congrats you've successfully concerted your IMG file.to Odin flashable TAR.MD5
Hit Thanks if this helped you
The stock recovery on the Nook Simple Touch has a routine to restore the device to factory state, wiping everything in the process. It is initiated on the 8th unsuccessful boot (unsuccessful := interrupted before the boot counter could be reset). The image is stored on the "/misc" partition, /dev/block/mmcblk0p3, as /factory.zip. On my device, it's version 1.0.1 (file size: 108460423, MD5 sum: 3ae0d4d9869330dec639a7da9c50fa72). Not very useful. So, how about customizing it? Or at least upgrading it to stock 1.2.1?
When restoring to factory state, the /cache and /data partitions are wiped independently by the stock recovery. As for the files inside the ZIP, there is no difference between the factory image and the OTA (over-the-air) update (nook_*_update.zip). The format of both files is the standard Edify ("updater-script") style. If you have your own script you can put it there for easy restoration. If you don't, you can at least upgrade the factory image there to 1.2.1, the latest version. The example is for the latter case, but all the steps will be the same, except the first one.
Please do not follow these instructions blindly. Instead, read them critically and adjust to your situation, adding extra steps such as backups where necessary. Make sure that you don't mind if everything from your device is erased in the process.
Remove B&N cruft from the ZIP update header
Start with the file nook_1_2_update.zip (get it here from B&N). Make sure you have the right file: size 121323347, MD5 sum: 30822c2927482380c325a47dc060daee. Note that while a well-formed ZIP file starts with the letters "PK" (from the initials of Phil Katz, the original developer of the ZIP format), the B&N ZIP has some proprietary gibberish at the beginning:
Code:
...............'1.2.1.24.carbon1_2.gossamer.rrdp.s70455.......XOLBsPWsxv0saXev7rdGBBrQLzdM74ai2CM4h6oD/D3S9xeKq8eFYW7j0+MgLohN4x/3tyIYaZV6YiLEi7gLXq+7XjvWV4KaTGvNw0wM6x11IPOEzYwmHryagnY91XjkfKTjwKR8XC3SkSRu4TT01DZ6lfqsw6MZO18AFz48GEjXcxKy8SQZyhA++kobYWlcC8jNa/EmkGgVJien7QJ4LvR8N5Bftk11WRTOy6+BSQQgdBh4K/i2WI0TqfpH7JC+6vNp5rb61KTXpZIMLHGyZloYca68mnn4rmr1SKqodpffgSmYI+f7DPt7RgBEkXGz20x+3kKA+OcPbd1QKvIwd+A==.........;=.
First 418 bytes of nook_1_2_update.zip. Unprintable characters replaced with dots.
Unzip and other unpackers will get through this just fine so you might not even notice it but it will prevent the file from working as factory image for the stock recovery, so let's start by getting rid of the cruft. There are at least three options here: (1) use dd(1) (UNIX shell or Windows CLI), (2) use Free Hex Editor (Windows GUI), (3) unzip and repack again. The dd command if you're lucky to have a recent version is:
Code:
dd if=nook_1_2_update.zip of=factory.zip skip=418bytes
- or -
Code:
dd if=nook_1_2_update.zip of=factory.zip iflag=skip_bytes skip=418
Option (3) will break the B&N signature on the ZIP. Theoretically, if the signature is preserved, the file should work as-is as the new factory image as it matches the key stored in the recovery). It didn't work for me but I didn't try too hard because what I want to do is to use a custom image anyway so feel free to check for yourself (skip to the last step).
Otherwise, if you are using the stock update file that you want to sign again, you need to remove the signature that is already there. Supposing your soon-to-be new factory image file is called factory.zip, the way to do it is:
Code:
zip -d -q factory.zip META-INF\CERT.SF META-INF\CERT.RSA META-INF\MANIFEST.MF
Insert your key into stock recovery RAM disk image
For customized factory.zip signed with your own key, we need to tweak the recovery image a bit.
Extract the image from the update ZIP:
Code:
unzip -j nook_1_2_update.zip ramdisk-recovery.img
Replace the file res/keys (see attachment) in the image, using XDA user Renate NST's bootutil.exe tool:
Code:
bootutil /r ramdisk-recovery.img res\keys
You can also leave the old key in place and append the new one, just make sure there is nothing in between them (not even whitespace). And here are the alternative steps to unpack and repack the image using just the standard tools, which might come handy on UNIX:
Unpack:
Code:
dd if=ramdisk-recovery.img bs=64 skip=1 | gzip -cd | cpio -id
Repack:
Code:
find . -not -name ramdisk-recovery.img | cpio -oc | gzip -c9 | mkimage -A arm -O linux -T ramdisk -C gzip -a 0 -e 0 -d - ramdisk-recovery.new.img
Now the image just needs to be installed:
Code:
adb shell mkdir /data/boot
adb shell mount -t vfat /dev/block/mmcblk0p1 /data/boot
adb push ramdisk-recovery.img /data/boot/uRecRam
adb shell umount /data/boot
adb shell rm /data/boot
Sign and install the customized factory image ZIP
Suppose our new factory image is called factory.zip. Then to sign it:
Code:
java -jar signapk.jar [B]-w[/B] testkey.x509.pem testkey.pk8 factory.zip factory.signed.zip
See the attachment below for the necessary files. Note the -w switch, which is particularly important in this case.
Now just for the installation part:
Code:
adb shell mkdir /data/factory
adb shell mount -t ext2 /dev/block/mmcblk0p3 /data/factory
adb push -p factory.signed.zip /data/factory/factory.zip
adb umount /data/factory
adb rm /data/factory
Restore to factory image to check if it works
For an easy alternative to the power button marathon:
Code:
adb shell
echo -n -e "\x08\x00\x00\x00" >/rom/devconf/BootCnt
reboot
Warning: this wipes everything, all your data on the device will be lost.
Bonus: What if you want to use your own key?
The testkey.{pk8,x509.pem} is one of these ubiquitous Android debug keys, used all around. Apparently, it was good enough for B&N as well, as they used a version of it too for their OTAs (see /system/etc/security/otacert.zip). If it's not good enough for you though, and you have your own key, the attached keys file will not work for you; instead, you need to generate the key dump in the right format for yourself using the dumpkey utility also provided in the attachment:
Code:
java -jar dumpkey.jar testkey.x509.pem >>res/keys
Replace the references to testkey with the name of your key throughout the examples. If you're doing this on Windows, remember to convert the line ending to UNIX format (CR+LF to LF), not doing so might make the key not work.
General note: If at any stage you need to debug why a key is rejected, there is a log being saved by the stock recovery under /cache/recovery/log.
Disclaimer: Please do not follow these instructions blindly, but instead adjust them to your situation. This is the minimal set of necessary actions, with any optional steps removed for the clarity of illustration. I don't do it this way myself: personally, I'd make a backup here and there, verify MD5 sums after copying large files, etc. In any case, if something goes wrong, you will have to boot from SD card and restore your device. If everything goes right, you will lose all the data on the device. These instructions are provided on an "as is" basis. I will not provide support if anything doesn't work as expected for you. Anything you decide to do based on the above instructions is your sole responsibility.
dumpkey.jar really helped, thanks for that. Had to make exponent 3 type android key else it gets rejected, if you compiled the class, can you remove that check? Out of thanks for today.
Just a short note:
"bootutil" is now called "imgutil" and can be found in the signature.
There are more options than before, but I forget which ones.