Hi guys,
In this thread, I will teach the Developer Edition owners how to make a tar file to update your device, and prevent your bootloader from being locked.
Requirements:
-Linux (It's possible on Windows with Cygwin, but I won't cover that here.) (Also possible on OS X but you need the GNU version of tar, you can get it with brew)
-Firmware tar
The most important step we will take in precaution is backing up your precious Developer Edition aboot. If your device accidentally gets locked, and you have this file, you can re-unlock your device.
Code:
dd if=/dev/block/mmcblk0p6 of=/sdcard/aboot.bak
Move aboot.bak somewhere safe and hang on to it!
1. Extract the tar file using a file archiver like Engrampa or Archiver
You will have NON-HLOS.bin, modem.bin, sbl1.mbn, sdi.mbn, aboot.mbn, rpm.mbn, tz.mbn, boot.img, recovery.img, cache.img.ext4, system.img.ext4, and possibly a .pit file or a couple other files, but the latter listed are the important ones.
2. Open a terminal and change your directory to where you extracted your tar
Code:
cd /home/ryan/Downloads/firmware/
This is just an example
3. DELETE aboot.mbn
Code:
rm aboot.mbn
Or just right click and delete
4. Tar the files
Code:
tar -H ustar -c NON-HLOS.bin modem.bin sbl1.mbn sdi.mbn rpm.mbn tz.mbn boot.img recovery.img cache.img.ext4 system.img.ext4 > update.tar
You should now have a file called update.tar and it should roughly be the size of all the images combined.
5. Calculate MD5 for your update.tar
Code:
md5sum -t update.tar >> update.tar
6. Change the file name of update.tar to update.tar.md5 to reflect our new MD5
Code:
mv update.tar update.tar.md5
7. Flash your freshly baked update.tar.md5 in ODIN!
I will be making improvements to this tutorial and possibly adding a Windows tutorial with cygwin. Questions or comments, post and I shall answer!
I confirm this works with the latest 4.4.4 NI2 and the stock Kernel will boot!
Here is a ODIN flashable file:
https://www.androidfilehost.com/?fid=95784891001608429
This will flash boot.img, modem.bin, NON-HLOS.bin, rpm.mbn, sbl1.mbn, sdi.mbn and tz.mbn.
This will NOT flash, the bootloaded and the recovery
ryanbg said:
Hi guys,
In this thread, I will teach the Developer Edition owners how to make a tar file to update your device, and prevent your bootloader from being locked.
Requirements:
-Linux (It's possible on Windows with Cygwin, but I won't cover that here.) (Also possible on OS X but you need the GNU version of tar, you can get it with brew)
-Firmware tar
The most important step we will take in precaution is backing up your precious Developer Edition aboot. If your device accidentally gets locked, and you have this file, you can re-unlock your device.
Code:
dd if=/dev/block/mmcblk0p6 of=/sdcard/aboot.bak
Move aboot.bak somewhere safe and hang on to it!
1. Extract the tar file using a file archiver like Engrampa or Archiver
You will have NON-HLOS.bin, modem.bin, sbl1.mbn, sdi.mbn, aboot.mbn, rpm.mbn, tz.mbn, boot.img, recovery.img, cache.img.ext4, system.img.ext4, and possibly a .pit file or a couple other files, but the latter listed are the important ones.
2. Open a terminal and change your directory to where you extracted your tar
Code:
cd /home/ryan/Downloads/firmware/
This is just an example
3. DELETE aboot.mbn
Code:
rm aboot.mbn
Or just right click and delete
4. Tar the files
Code:
tar -H ustar -c NON-HLOS.bin modem.bin sbl1.mbn sdi.mbn rpm.mbn tz.mbn boot.img recovery.img cache.img.ext4 system.img.ext4 > update.tar
You should now have a file called update.tar and it should roughly be the size of all the images combined.
5. Calculate MD5 for your update.tar
Code:
md5sum -t update.tar >> update.tar
6. Change the file name of update.tar to update.tar.md5 to reflect our new MD5
Code:
mv update.tar update.tar.md5
7. Flash your freshly baked update.tar.md5 in ODIN!
I will be making improvements to this tutorial and possibly adding a Windows tutorial with cygwin. Questions or comments, post and I shall answer!
Click to expand...
Click to collapse
Dude! Please I beg you to make this a youtube video.
razzrmaxx said:
Dude! Please I beg you to make this a youtube video.
Click to expand...
Click to collapse
there is a flashable file in post #2
Downgrade
B"H
So, using your methodology, can I take a Verizon developer edition phone (4.4.4 or 4.4.2), take a stock Consumer edition 4.4.2 version ROM, Tar it up, and flash to my developer edition?
This would be something important as I have software that needs 4.4.2 version, but can only find new Verizon S5 that are on 4.4.4.
Would this method also flash the 4.4.2 modem as well as kernel?
Thank you,
Dovid
dovid said:
B"H
So, using your methodology, can I take a Verizon developer edition phone (4.4.4 or 4.4.2), take a stock Consumer edition 4.4.2 version ROM, Tar it up, and flash to my developer edition?
This would be something important as I have software that needs 4.4.2 version, but can only find new Verizon S5 that are on 4.4.4.
Would this method also flash the 4.4.2 modem as well as kernel?
Thank you,
Dovid
Click to expand...
Click to collapse
Yes, you should be able to downgrade to 4.4.2, including modem and kernel.
dovid said:
B"H
So, using your methodology, can I take a Verizon developer edition phone (4.4.4 or 4.4.2), take a stock Consumer edition 4.4.2 version ROM, Tar it up, and flash to my developer edition?
This would be something important as I have software that needs 4.4.2 version, but can only find new Verizon S5 that are on 4.4.4.
Would this method also flash the 4.4.2 modem as well as kernel?
Thank you,
Dovid
Click to expand...
Click to collapse
As long as you don't touch aboot on a Dev Edition (always delete aboot.mbn from any tar you make), the answer is YES! :good:
razzrmaxx said:
Dude! Please I beg you to make this a youtube video.
Click to expand...
Click to collapse
It's rather easy to do. Just download an Ubuntu live cd image and burn it to a USB drive. Boot up, access your hard drive, extract tar to a folder, delete aboot.mbn, and then follow the instructions verbatim on my tutorial. It's a great learning experience, and figuring out how to do it is half the fun.
Two questions: First, where in ODIN do I flash the TAR? Second, do I flash the firmware first, or the ROM? Thanks in advance!
HTC-8690 said:
Two questions: First, where in ODIN do I flash the TAR? Second, do I flash the firmware first, or the ROM? Thanks in advance!
Click to expand...
Click to collapse
- Flash in ODIN using the AP button
- I don't think it does really matter, but you'll need both for proper behavior.
I am having difficulties flashing the file in post 2, tried downloading it from a different mirror as well.
Getting this in ODIN 3.09.
Code:
<ID:0/003> Added!!
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> MD5 hash value is invalid
<OSM> G900V_DevEd_FirmwareOnly_NI2.tar.md5 is invalid.
<OSM> End...
neodawg said:
I am having difficulties flashing the file in post 2, tried downloading it from a different mirror as well.
Getting this in ODIN 3.09.
Code:
<ID:0/003> Added!!
<OSM> Enter CS for MD5..
<OSM> Check MD5.. Do not unplug the cable..
<OSM> Please wait..
<OSM> MD5 hash value is invalid
<OSM> G900V_DevEd_FirmwareOnly_NI2.tar.md5 is invalid.
<OSM> End...
Click to expand...
Click to collapse
My bad, I renamed the file after I processed the md5.
I will re upload a valid version. In the meantime you can remove the .md5 at the end of the file name and flash it like this. It will not verify the md5 and proceed though.
timeToy said:
My bad, I renamed the file after I processed the md5.
I will re upload a valid version. In the meantime you can remove the .md5 at the end of the file name and flash it like this. It will not verify the md5 and proceed though.
Click to expand...
Click to collapse
Thanks that worked, however it didnt fix the issue i was hoping it would have.
http://forum.cyanogenmod.org/topic/101909-verizon-dev-device-not-able-to-call/
if your interested in what my actual issue is.
Why do you delete the aboot?
Sent from my SM-G900V using XDA Premium 4 mobile app
Zooandbio4me said:
Why do you delete the aboot?
Sent from my SM-G900V using XDA Premium 4 mobile app
Click to expand...
Click to collapse
If you don't you will lock your bootloader. You can avoid this by backing it up with the beginning of this thread. Also remember that the aboot is specific to each device so you have to have your own. Back it up, actually just backup all partitions for safe keeping.
First off, thanks for the tip on backing up my bootloader! I used Terminal Emulator to pull the backup.
Could I use Terminal Emulator to repackage the firmware? I.e. download the firmware on your phone (or Windows PC), extract, delete the aboot (and maybe recovery), and use Terminal Emulator on your phone to repackage it.
I do have a jump drive with Ubuntu but I rarely use it. So rarely, that I end up spending a ton of time tinkering with Bios to get it to boot into it. It would be quicker for me to carefully type the command in on my phone since it is Linux based.
Not that anyone here would be brave (or dumb) enough to overwrite their $600 bootloader, but if so, how would we restore the backup?
Does anyone have a copy of the flashable zip for backing up the partitions and aboot? the link is dead.
ryanbg said:
Hi guys,
In this thread, I will teach the Developer Edition owners how to make a tar file to update your device, and prevent your bootloader from being locked.
Requirements:
-Linux (It's possible on Windows with Cygwin, but I won't cover that here.) (Also possible on OS X but you need the GNU version of tar, you can get it with brew)
-Firmware tar
The most important step we will take in precaution is backing up your precious Developer Edition aboot. If your device accidentally gets locked, and you have this file, you can re-unlock your device.
Code:
dd if=/dev/block/mmcblk0p6 of=/sdcard/aboot.bak
Move aboot.bak somewhere safe and hang on to it!
1. Extract the tar file using a file archiver like Engrampa or Archiver
You will have NON-HLOS.bin, modem.bin, sbl1.mbn, sdi.mbn, aboot.mbn, rpm.mbn, tz.mbn, boot.img, recovery.img, cache.img.ext4, system.img.ext4, and possibly a .pit file or a couple other files, but the latter listed are the important ones.
2. Open a terminal and change your directory to where you extracted your tar
Code:
cd /home/ryan/Downloads/firmware/
This is just an example
3. DELETE aboot.mbn
Code:
rm aboot.mbn
Or just right click and delete
4. Tar the files
Code:
tar -H ustar -c NON-HLOS.bin modem.bin sbl1.mbn sdi.mbn rpm.mbn tz.mbn boot.img recovery.img cache.img.ext4 system.img.ext4 > update.tar
You should now have a file called update.tar and it should roughly be the size of all the images combined.
5. Calculate MD5 for your update.tar
Code:
md5sum -t update.tar >> update.tar
6. Change the file name of update.tar to update.tar.md5 to reflect our new MD5
Code:
mv update.tar update.tar.md5
7. Flash your freshly baked update.tar.md5 in ODIN!
I will be making improvements to this tutorial and possibly adding a Windows tutorial with cygwin. Questions or comments, post and I shall answer!
Click to expand...
Click to collapse
I understand that to execute the dd command you have to do it in the phone itself through terminal emulator or something like this , right? when I do it I get the message "Permission denied". What am I missing?
On the other hand I need a little help on this as I find myself trying to follow this guide through the rooting one: http://forum.xda-developers.com/showthread.php?t=2784880
That guide says that this is to not to get a locked bootloader, but I see that in this guide you appliy an update and I am not sure how this works (new at rooting phones) . Can you enlighten me on really what I have to do? I would really appreciate it.
Thanks a lot!
_msl_ said:
I understand that to execute the dd command you have to do it in the phone itself through terminal emulator or something like this , right? when I do it I get the message "Permission denied". What am I missing?
On the other hand I need a little help on this as I find myself trying to follow this guide through the rooting one: http://forum.xda-developers.com/showthread.php?t=2784880
That guide says that this is to not to get a locked bootloader, but I see that in this guide you appliy an update and I am not sure how this works (new at rooting phones) . Can you enlighten me on really what I have to do? I would really appreciate it.
Thanks a lot!
Click to expand...
Click to collapse
Based upon your posts in other threads, you cannot use this guide. The guide in this thread is for the developer edition of the Verizon Galaxy S5, which could only be bought through Samsung I believe. From what I can tell from your other posts, you most likely have the retail version. The retail version has a locked bootloader, the developer edition does not. That is why this operation can be performed on the developer edition and not the retail version. If you bought your phone privately and not from Verizon, it would have been clearly identified as a developer edition by the seller. If it was not identified as a developer edition by the seller you definitely have the retail version. And like I said, you cannot use this guide. That's why the title of this thread is clearly identified for the developer edition only.
landshark68 said:
Based upon your posts in other threads, you cannot use this guide. The guide in this thread is for the developer edition of the Verizon Galaxy S5, which could only be bought through Samsung I believe. From what I can tell from your other posts, you most likely have the retail version. The retail version has a locked bootloader, the developer edition does not. That is why this operation can be performed on the developer edition and not the retail version. If you bought your phone privately and not from Verizon, it would have been clearly identified as a developer edition by the seller. If it was not identified as a developer edition by the seller you definitely have the retail version. And like I said, you cannot use this guide. That's why the title of this thread is clearly identified for the developer edition only.
Click to expand...
Click to collapse
I had no idea about this developer and not developer edition. Thanks a lot for the info, it makes sense now.
Related
I'm sure several people will be wanting this information, so I figured I would post it here for everyone. This will allow you to backup your system and create custom Odin images for restore purposes. For anyone unfamiliar with the Samsung system, they use Odin to flash things to the device, much like HTC has RUU and Moto has SBF. Odin files are either .tar files, or .tar.md5 files.
The .tar.md5 files are .tar files with the md5 checksum added to the end of the file. If you attempt to flash a .tar.md5 file, Odin will automatically check that the contents are what they should be before flashing and proceed with the flash if the md5 is valid, otherwise it will stop.
In Odin, you should use the PDA button for all flashing. The PIT button may be used as well, if we can get a valid .pit file for the device, but for now, PIT won't be used either. Other than PDA, Start/Reset are the only other buttons you need to worry about.
Now, on to creating the backup files. First, you will need your device to be rooted (perm or temp root will work), and you also need to have access to terminal on the phone, either via an emulator or adb shell access. To create the backup files, you won't need a Linux/UNIX system, but you will if you want to create a flashable Odin package. The following will output the files on the root of the SDCard, adjust the "of=" path if you want them somewhere else. It will also create the files for the proper filename for Odin as well. So to create the files, here are the commands you will use from root shell (#):
System:
Code:
dd if=/dev/block/stl10 of=/sdcard/factoryfs.rfs bs=4096
Kernel:
Code:
dd if=/dev/block/bml8 of=/sdcard/zImage bs=4096
Recovery:
Code:
dd if=/dev/block/bml9 of=/sdcard/recovery.bin bs=4096
DO NOT INCLUDE THE FOLLOWING IN ANYTHING BUT A PERSONAL BACKUP
Cache:
Code:
dd if=/dev/block/mmcblk0p3 of=/sdcard/cache.rfs bs=4096
DBData:
Code:
dd if=/dev/block/stl11 of=/sdcard/dbdata.rfs bs=4096
Data:
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/movinand.bin bs=4096
The last three files (cache, dbdata, data) may contain personal information, so do not include these 3 files in anything but a personal backup/recovery package.
To create a flashable Odin package, you need to pull all of the files off of the phone/sdcard and onto your computer. From there, you use the following to create the package:
Code:
tar -H ustar -c factoryfs.rfs recovery.bin zImage > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
If you want to include cache/dbdata/data in the above for personal use, just add them after the "-c" and before the ">".
There are other files that may be in Odin packages, but they are protected by Samsung and cannot be dumped properly. The files are the bootloader, secondary bootloader, modems, and .lfs partitions. The files would be boot.bin, Sbl.bin, modem.bin (not sure what it would be for the CDMA/LTE dual modem here), and param.lfs. It however isn't that big of an issue that these can't be dumped as the can't really be altered by normal flashing of the device, and are usually only altered via OTA updates.
Thanks for this info imnuts! I unfortunately updated to the new update and would like to go back to rooted but cant until I downgrade.
Thanks!
Thanks for posting this. I'm going to attempt to make a personal backup and then I can factory reset the phone and make a stock version for people to use. I'm haven't installed the update yet either, so I'm hoping this will let people get back to ED1. I've also been playing around with theming using the fascinate community rom theme and ninjamorph to swap files. It'll take a while, but it's currently the only way I feel safe messing with framework-res.
wynalazca said:
Thanks for posting this. I'm going to attempt to make a personal backup and then I can factory reset the phone and make a stock version for people to use. I'm haven't installed the update yet either, so I'm hoping this will let people get back to ED1. I've also been playing around with theming using the fascinate community rom theme and ninjamorph to swap files. It'll take a while, but it's currently the only way I feel safe messing with framework-res.
Click to expand...
Click to collapse
I'm definitely looking forward to having a downgrade ROM image to get back to ED1!
So how do you add the last personal 3 i just got the droid charge and i am not very familiar with samsung files i had a droid x and a thunderbolt very shortly and am familiar with ruu and sbf but how do you add cache dbdata and the other one. I meab like the actual command not the instruction to put it after c
rami98 said:
So how do you add the last personal 3 i just got the droid charge and i am not very familiar with samsung files i had a droid x and a thunderbolt very shortly and am familiar with ruu and sbf but how do you add cache dbdata and the other one. I meab like the actual command not the instruction to put it after c
Click to expand...
Click to collapse
The only thing that would change would be the tar command. If you want to include the other files, it would be:
Code:
tar -H ustar -c cache.rfs dbdata.rfs factoryfs.rfs movinand.bin recovery.bin zImage > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
You just need to pull the files from your phone and have them in the same directory that you're in in terminal, and have them named appropriately. It also doesn't matter what order they are in (that I know of), I just have them in alphabetical order for ease of reading.
So im going to try and do the voodoo lagfix for the first time ever but I wanted to make a backup. Im on ED2 and NOT rooted so how would I go about making these backups?
imnuts said:
The only thing that would change would be the tar command. If you want to include the other files, it would be:
Code:
tar -H ustar -c cache.rfs dbdata.rfs factoryfs.rfs movinand.bin recovery.bin zImage > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
You just need to pull the files from your phone and have them in the same directory that you're in in terminal, and have them named appropriately. It also doesn't matter what order they are in (that I know of), I just have them in alphabetical order for ease of reading.
Click to expand...
Click to collapse
I tried the above and I keep getting this error message in the command prompt:
'tar' is not recognized as an internal or external command, operable program or batch file.
(I'm trying this on windows 7 professional)
Any help would be appreciated, thanks!
mypantsaretorn said:
I tried the above and I keep getting this error message in the command prompt:
'tar' is not recognized as an internal or external command, operable program or batch file.
(I'm trying this on windows 7 professional)
Any help would be appreciated, thanks!
Click to expand...
Click to collapse
You wouldn't by any chance be trying the "tar" command at a windows command prompt, would you?
imnuts said:
To create the backup files, you won't need a Linux/UNIX system, but you will if you want to create a flashable Odin package.
To create a flashable Odin package, you need to pull all of the files off of the phone/sdcard and onto your computer. From there, you use the following to create the package:
Code:
tar -H ustar -c factoryfs.rfs recovery.bin zImage > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
If you want to include cache/dbdata/data in the above for personal use, just add them after the "-c" and before the ">".
Click to expand...
Click to collapse
Course you might be running Linux in a vmware or Hyper-V environment....hint?
HTH
Damn! I didn't pay attention to the second part of that sentence! Lol
Thanks for the "hint"..
Sent from my SCH-I510 using XDA App
The other option would be using Cygwin, but I've never tried it, so it may or may not work.
imnuts said:
The other option would be using Cygwin, but I've never tried it, so it may or may not work.
Click to expand...
Click to collapse
cygwin works!
Edit: Here is how:
1. Search google for cygwin - download
2. Run - you will be prompted to get packages - I assumed "archive" was a good place to start - not sure if you need this or not...
3. When complete you will see a new icon on your desktop - double-click
4. Be patient as it loads
5. Copy the files output'ed from first post to same folder on PC
6. Back in cygwin:
a. cd x: (where x: is the drive letter of the drive that has the folder with the files)
b. tar -H ustar -c cache.rfs dbdata.rfs movinand.bin factoryfs.rfs recovery.bin zImage > package_name.tar
c: md5sum -t package_name.tar >> package_name.tar
d: mv package_name.tar package_name.tar.md5
Complete output of commands:
These files are for the users to personalise their cygwin experience.
They will never be overwritten nor automatically updated.
`./.bashrc' -> `/home/UWINKET//.bashrc'
`./.bash_profile' -> `/home/UWINKET//.bash_profile'
`./.inputrc' -> `/home/UWINKET//.inputrc'
`./.profile' -> `/home/UWINKET//.profile'
Your group is currently "mkgroup". This indicates that neither
your gid nor your pgsid (primary group associated with your SID)
is in /etc/group.
The /etc/group (and possibly /etc/passwd) files should be rebuilt.
See the man pages for mkpasswd and mkgroup then, for example, run
mkpasswd -l [-d] > /etc/passwd
mkgroup -l [-d] > /etc/group
Note that the -d switch is necessary for domain users.
[email protected] ~
$ cd h:
System Volume Information
[email protected] /cygdrive/h
$ cd downloads
[email protected] /cygdrive/h/downloads
$ cd charge
[email protected] /cygdrive/h/downloads/charge
$ cd tarbackup/
[email protected] /cygdrive/h/downloads/charge/tarbackup
$ tar -H ustar -c cache.rfs dbdata.rfs movinand.bin factoryfs.rfs recovery.bin
zImage > package_name.tar
[email protected] /cygdrive/h/downloads/charge/tarbackup
$ md5sum -t package_name.tar >> package_name.tar
[email protected] /cygdrive/h/downloads/charge/tarbackup
$ mv package_name.tar package_name.tar.md5
[email protected] /cygdrive/h/downloads/charge/tarbackup
$
Hmm flash did not work with my personal data in it - got an error. Created a new .tar file with just factoryfs.rfs recovery.bin and zImage and was able to flash that. TG for TiBu!
jism31 said:
Thanks for this info imnuts! I unfortunately updated to the new update and would like to go back to rooted but cant until I downgrade.
Click to expand...
Click to collapse
How do you start doing this. How do I get to root shell (#)... Thanks
AD
I plan to get rooted on ED1 so I can get a stock image backed up, and have a clean base to work from. Still getting my head around the odin stuff first.
RaptorMD said:
I plan to get rooted on ED1 so I can get a stock image backed up, and have a clean base to work from. Still getting my head around the odin stuff first.
Click to expand...
Click to collapse
you dont have to do that its already done
http://forum.xda-developers.com/showthread.php?t=1085190
Well, I successfully followed all the instructions and have created my first ODIN flashable file, I have not tried to flash it yet. I'm just curious, I pull all the different .rfs, .bin, and zImage on this file and noticed it's about 1.8gb file. Is this normal?
Also, before I try to flash this. Should I have dissable voodoo lagfix and converted back to rfs before I dumped the files?
Thanks for all the help!
JKChad said:
Well, I successfully followed all the instructions and have created my first ODIN flashable file, I have not tried to flash it yet. I'm just curious, I pull all the different .rfs, .bin, and zImage on this file and noticed it's about 1.8gb file. Is this normal?
Also, before I try to flash this. Should I have dissable voodoo lagfix and converted back to rfs before I dumped the files?
Thanks for all the help!
Click to expand...
Click to collapse
Yes, that's normal for it to be so large as dd will dump the partition, including empty space. If you were to compress it with zip or lzma, it'd drop down considerably.
Not sure about the voodoo part as I've never dumped files from an ext4 partition. I don't see any reason why it wouldn't work, but I'd flash with caution and have another working image ready just in case.
imnuts said:
Not sure about the voodoo part as I've never dumped files from an ext4 partition. I don't see any reason why it wouldn't work, but I'd flash with caution and have another working image ready just in case.
Click to expand...
Click to collapse
Shouldn't be an issue as long as he keeps the voodoo kernel.
Sent from my SCH-I510 using Tapatalk
Anybody try this with voodoo yet ?
So i just wanted to share this info as it has been very helpful to me in my development process. When making custom recoveries you often end up with a recovery.img and with Samsung devices there isn't really a good way to flash those. The best way to flash these is to run the following on a linux box:
$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Now you can flash that recovery.tar.md5 through Odin in the PDA tab. Im guessing you can use the same process on any .img file (userdata.img, etc.) you create but i havent tested that. Ive only tested this on recovery.img and it works great.
Sorry if this is old information but i couldn't find any posts in the Skyrocket section and just wanted to share this.
Thanks
Easiest way I've found to flash a recovery img on skyrocket is to rename recovery file to recovery.img and place it on internal SD. (This won't work if your soft bricked and a tar file will be necessary )
Then type: dd if=/sdcard/recovery.img of=/dev/block/mmcblk022 in adb shell or terminal emulator.
That should work for any of our recovery images as long as you rename it to recovery.img and put it in your internal SD. I suppose you could replace /sdcard/ with /external_sd/ if you wanted to flash from external SD. Oh and don't be supprised if you catch a little heat for posting this in dev section.
Sent from my SAMSUNG-SGH-I727 using xda premium
Noob question.... Is there a way to do this on windows vs linux?
cdshepherd said:
Easiest way I've found to flash a recovery img on skyrocket is to rename recovery file to recovery.img and place it on internal SD. (This won't work if your soft bricked and a tar file will be necessary )
Then type: dd if=/sdcard/recovery.img of=/dev/block/mmcblk022 in adb shell or terminal emulator.
That should work for any of our recovery images as long as you rename it to recovery.img and put it in your internal SD. I suppose you could replace /sdcard/ with /external_sd/ if you wanted to flash from external SD. Oh and don't be supprised if you catch a little heat for posting this in dev section.
Sent from my SAMSUNG-SGH-I727 using xda premium
Click to expand...
Click to collapse
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
And not sure if there is a windows way. Try googling for Windows tar and md5sum. There most likely is a way.
Sent from my SAMSUNG-SGH-I727 using XDA App
Thank you
I used your method to flash the clockworkmod touch recovery. It worked flawlessly
Sk8er, I used your method today. Its flawless dude. Thanks
Sent from my SAMSUNG-SGH-I727 using xda premium
kamgrn said:
Noob question.... Is there a way to do this on windows vs linux?
Click to expand...
Click to collapse
funny... nobody bothered to answer this.
The way to do this in Windows as I know:
1. Ensure the fastboot drivers for your device is installed.
2. Acquire the fastboot binary (this is fastboot.exe).
3. Test if fastboot can see your device. Open DOS Command prompt, go to the fastboot binary folder and run "fastboot devices" command.
Example: C:\FASTBOOT\fastboot devices ---> The output should be some sort of serial number.
4. Flash the img file you have via command "fastboot flash boot <image_filename>"
Example: C:\FASTBOOT\fastboot flash boot boot.img
jtdc said:
funny... nobody bothered to answer this.
The way to do this in Windows as I know:
1. Ensure the fastboot drivers for your device is installed.
2. Acquire the fastboot binary (this is fastboot.exe).
3. Test if fastboot can see your device. Open DOS Command prompt, go to the fastboot binary folder and run "fastboot devices" command.
Example: C:\FASTBOOT\fastboot devices ---> The output should be some sort of serial number.
4. Flash the img file you have via command "fastboot flash boot <image_filename>"
Example: C:\FASTBOOT\fastboot flash boot boot.img
Click to expand...
Click to collapse
What if this is for the note, where there is no fastboot? I can get to odin mode, or to recovery mode, but no fastboot...unless i'm missing something..??
Thanks
Thank you for the post. I used your method but to flash TWRP as follows:
1. Downloaded recovery file (openrecovery-twrp-2.2.0-skyrocket.img) for Samsung Skyrocket from TWRP website on Linux.
2. Renamed file to recovery.img
3. Ran the following commands to covert IMG file to a TAR file:
tar -H ustar -c recovery.img > openrecovery-twrp-2.2.0-skyrocket.tar
md5sum -t openrecovery-twrp-2.2.0-skyrocket.tar >> openrecovery-twrp-2.2.0-skyrocket.tar
mv openrecovery-twrp-2.2.0-skyrocket.tar openrecovery-twrp-2.2.0-skyrocket.tar.md5
4. Flashed recovery using ODIN as customary.
It worked flawlessly with no issues. I highly recommend TWRP over CWM Touch Recovery. TWRP wipes things cleanly. You DO NOT have to wipe 3x which will reduce the wear and tear on your device.
ebaul said:
What if this is for the note, where there is no fastboot? I can get to odin mode, or to recovery mode, but no fastboot...unless i'm missing something..??
Thanks
Click to expand...
Click to collapse
use samsung tool kit v2.3. i had same issue as u and this page only sort of helped me and i guessed my way to tool kit. you only need to install it and place the recovery you need to transform in its input folder, where ever you installed it. then run it and just follow the instructions its pretty easy.
Thanks for the Pakistanian guy above me for reviving this vital topic ...
this method is great :
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
BUT to be sure no leftovers are there :
dd if=/dev/zero of=/dev/block/mmcblk0p22
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
Can be done inside Android if you're rooted , and a terminal emulator app is installed ...
nice commands to keep in mind.
mahanddeem said:
Thanks for the Pakistanian guy above me for reviving this vital topic ...
this method is great :
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
BUT to be sure no leftovers are there :
dd if=/dev/zero of=/dev/block/mmcblk0p22
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p22 bs=4096
Can be done inside Android if you're rooted , and a terminal emulator app is installed ...
Click to expand...
Click to collapse
Lol
its pakistani
btw great the other method worked for you
sk8erwitskil said:
So i just wanted to share this info as it has been very helpful to me in my development process. When making custom recoveries you often end up with a recovery.img and with Samsung devices there isn't really a good way to flash those. The best way to flash these is to run the following on a linux box:
$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Now you can flash that recovery.tar.md5 through Odin in the PDA tab. Im guessing you can use the same process on any .img file (userdata.img, etc.) you create but i havent tested that. Ive only tested this on recovery.img and it works great.
Sorry if this is old information but i couldn't find any posts in the Skyrocket section and just wanted to share this.
Thanks
Click to expand...
Click to collapse
Would it be the same approach whilst with custom zImage? and load into PDA tab? or are they any other settings to flash custom kernel with odin... I tried flashing with heimdall v.1.3.1 and 1.3.2 both version results "fail to initialise protocol". could please provide any pointes on how to flash custom built kernel image on S2 lte.
I think I finally find it!!
thank you man +1
mrbeers said:
Anyone have a CWD backup for the Repp? I am both newb & noob to the rooting scene and deleted my backup when I factory reset my phone. Any help will be appreciated. I'm gonna spam this message until I get my 10 posts then I'll post a new thread. Sorry mods! My family is without a phone until I fix this!
Click to expand...
Click to collapse
I don't recommend that if you want help
Sent from my SGH-I727 using Tapatalk 2
Huge thanks !
sk8erwitskil said:
So i just wanted to share this info as it has been very helpful to me in my development process. When making custom recoveries you often end up with a recovery.img and with Samsung devices there isn't really a good way to flash those. The best way to flash these is to run the following on a linux box:
$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Now you can flash that recovery.tar.md5 through Odin in the PDA tab. Im guessing you can use the same process on any .img file (userdata.img, etc.) you create but i havent tested that. Ive only tested this on recovery.img and it works great.
Sorry if this is old information but i couldn't find any posts in the Skyrocket section and just wanted to share this.
Thanks
Click to expand...
Click to collapse
Hi! First of all, thx a lot really was trying to find this out for a long time. One Question i have tough. I Only used the first command and left it as a simple tar file, flashed it with odin and all was well. So what do you actally do by adding md5sum and then renaming it? Is it better to add the md5sum or does it make no difference?
again huge thanks! I always used mskip toolkit, but i like to not depend on additional software
I believe ODIN will verify the md5 sum of the .img if the .md5 file is in the tar. Just in case your .img in the tar gets corrupted. If that happens ODIN will abort the flash and report something like md5 mismatch
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
---------- Post added at 12:21 PM ---------- Previous post was at 12:20 PM ----------
So its not necessary but a good practice.
Sent from my SAMSUNG-SGH-I727 using xda app-developers app
sk8erwitskil said:
So i just wanted to share this info as it has been very helpful to me in my development process. When making custom recoveries you often end up with a recovery.img and with Samsung devices there isn't really a good way to flash those. The best way to flash these is to run the following on a linux box:
$ tar -H ustar -c recovery.img > recovery.tar
$ md5sum -t recovery.tar >> recovery.tar
$ mv recovery.tar recovery.tar.md5
Now you can flash that recovery.tar.md5 through Odin in the PDA tab. Im guessing you can use the same process on any .img file (userdata.img, etc.) you create but i havent tested that. Ive only tested this on recovery.img and it works great.
Sorry if this is old information but i couldn't find any posts in the Skyrocket section and just wanted to share this.
Thanks
Click to expand...
Click to collapse
very helpful... thx mate
That's strange but command from first post don't work for me. Tablet says about incorrect file (.img, not .img.md5). So I've modified commands to make them work with Galaxy Tab 8.9 and Odin 1.8.5:
Code:
cp recovery.img recovery.img.md5
md5sum -t recovery.img.md5 >> recovery.img.md5
tar -H ustar -c recovery.img.md5 > recovery.tar
md5sum -t recovery.tar >> recovery.tar
mv recovery.tar recovery.tar.md5
Hi xda
for some reson the ext4_utils is not working well on the galaxy s4, but there is another way to do that.
so thanks to hua_wuxin explained to me how to do it, and big thank to Chenglu for this.
What do you need to do:
first flash the firmware you wnat to modify, and root the phone. (it's can't be done without root first)
Do your changes in the device, by root explorer, zip files and etc.
Then via CMD (or terminal emulator) you type the following commands to dump the partition to samsung img file. (odin img, not ext4)
The commands according to the device and partition.
I9500
System:
Code:
su
make_ext4fs -s -l 2764M -a system /sdcard/system.img /system
Cache:
Code:
su
make_ext4fs -s -l 2072M -a cache /sdcard/cache.img /cache
I9505
System:
Code:
su
make_ext4fs -s -l 2760M -a system /sdcard/system.img.ext4 /system
Cache:
Code:
su
make_ext4fs -s -l 2070M -a cache /sdcard/cache.img.ext4 /cache
Now you can flash in odin by making tar from this modified img and the rest of the firmware.
The commands to create tar file, for example to I9500. (Cygwin or Linux)
Code:
tar -c boot.img cache.img hidden.img modem.bin recovery.img system.img >> file_name.tar
md5sum -t file_name.tar >> file_name.tar
mv file_name.tar file_name.tar.md5
Good Luck!
Sorry for my bad english.
Unfortunately, this still doesn't work for the I9500. Works fine for I9505 (which for me never had any issue at all, and worked with existing make_ext4fs tools just fine), but can't get *anything* to work with I9500.
To me it worked for both I9500 and I9505.
I created successfully for the I9500/I9505 scripts to add hebrew language to the languages list, by flashing custem recovery and cache img. (extended command and zip like your old root method to I9300)
also, i created full firmwares to both models with system and cache modified.
i flashed this files on over 1000 devices (I9500), and it's works gerat.
avicohh said:
To me it worked for both I9500 and I9505.
I created successfully for the I9500/I9505 scripts to add hebrew language to the languages list, by flashing custem recovery and cache img. (extended command and zip like your old root method to I9300)
also, i created full firmwares to both models with system and cache modified.
i flashed this files on over 1000 devices (I9500), and it's works gerat.
Click to expand...
Click to collapse
Have you tried making the I9500 image on the I9505 ? Or only on the I9500 ?
Could you make and attach an empty (or containing one small file: echo 1 > file ) custom cache.img for the I9500, so I can test some more ?
Really need to get this working I wish I actually had the device, heh ...
EDIT: Also maybe attach the make_ext4fs from your device ?
Chainfire said:
Unfortunately, this still doesn't work for the I9500. Works fine for I9505 (which for me never had any issue at all, and worked with existing make_ext4fs tools just fine), but can't get *anything* to work with I9500.
Click to expand...
Click to collapse
+1 :good:
You have to make the img on the same model exactly, because they have some differences in the img building.
For example the cache.img from the I9500 cannot be convert to ext4 by sgs2ext4.jar on windows. The cache.img.ext4 from the i9505 converted fine with this jar, so there is some differences. (Maybe it is the CPU differences)
any way I made the imgs for the i9500 on the i9500, and for i9505 on i9505.
I dont have the i9500 next to me, I have it in the work. (I will be there tomorrow)
For now i'm attaching a small cache.img from the firmware I made, containing only a command file for wipe data. (after flashing)
I hope it's will help.
Any way if you want, you can send me the cfroot folder with the root files and i will build it tomorrow for you to a cache.img. (with 32M size or 2072M)
btw. how exactly i can copy the the make_ext4fs from my device? (ftom where)
Thanks, just trying to figure out what the damned difference is
If you're on Windows, can you run this ? https://dl.dropboxusercontent.com/u/25695577/i9500_makefs_test.zip
Should make a cache.img file from your i9500, identical to ones I have here from a different device. This may help me figure the difference. Please attach both cache.img and commands.out files
file attached
Thanks! My my, Samsung is adding bytes to the image, make it non-standard and outside of spec. Not sure what those bytes mean yet, I've made an image with them zeroed out. Can you see if this flashes no your i9500, or ODIN produces an error ?
check it now.
edit:
works!!
how did you made this img? (on the I9505/computer)
Awesome!
Can you try this test version of CF-Auto-Root ? https://dl.dropboxusercontent.com/u/25695577/cfar_i9500_test.zip
Please:
- unroot your device before trying (just do full unroot from SuperSU's settings tab)
- flash this test CF-Auto-Root
- pay attention - is the Android you see during rooting red, blue, or green ?
- boot and see if you are re-rooted
As for what I did: I put a lot of files together, figured out what the difference was, and wrote a tool to convert between normal images and the ones used for the i9500. If all this works, I'll upload the tool (and the code, and the docs) later.
These images are made on the computer, by the way. As I said before, for the I9505 I didn't need to do this on the phone anyway, just make_ext4fs from latest Android source. And add to that my new tool, and you can make images for i9500 ... no phone needed.
works great!
i flashed it on new device and i checked it with root explorer.
the android was red like all cf-auto root.
waitng to your tool..
thanks.
https://github.com/Chainfire/sgs4ext4fs
Chainfire said:
https://github.com/Chainfire/sgs4ext4fs
Click to expand...
Click to collapse
Hi Cainfire, tnx for your tools, may be this can help you repack image I9505...
checkout android-4.2.2_r1.2
as i9000 said:
Hi Cainfire, tnx for your tools, may be this can help you repack image I9505...
checkout android-4.2.2_r1.2
Click to expand...
Click to collapse
I don't get it... I don't need help repacking i9505, as I've stated, latest ext4 utils will just work ?
i need to repack firmware for i9505 with hidden.img.ext4
i see in your commands hidden.img without ext4 extension
This should be work (create hidden img from the device)
Code:
make_ext4fs -s -l 500M -a hidden /sdcard/hidden.img.ext4 /preload
if you like to make a tar file, use those commands
Code:
tar -c boot.img cache.img.ext4 hidden.img.ext4 modem.bin NON-HLOS.bin persdata.img.ext4 recovery.img system.img.ext4 >> file_name.tar
md5sum -t file_name.tar >> file_name.tar
mv file_name.tar file_name.tar.md5
Works like a charm
Thanks Chainfire
I've tried it on the cache partition and system partition on i9500 and everything is more than fine/
Thank you very much.
do we need to make cache.img.ext4 off of our phone in Terminal EMUlator for all to work well or is that optional. thanks
also why such a large cache size and what is the difference between the larger and smaller cache recommended sizes ? ie 30M vs the 2000+ size and should we stick with those numbers.
iask because one time odin failed me on the cach.img.ext4 so I am wondering thanks again
hebrew
Hello cainfire,thanks for your work,it's amazing, i'm useing it alot.
Is there a chance to get a hebrew script or a tar for the samsung galaxy 9505,9500
You will make me happy and i would be happy to buy u a beer
Thanks
First the disclaimer:
I am not responsible for what you do to your phone. Following these directions could cause you to brick, locust plague, or end of times. You assume ALL responsibility for what you do with this information.
Now, on to the fun stuff. I take *NO* credit for this information at all. I am a student of people far more knowledgeable about these things. However, I've managed to take what I've learned and apply it in really fun ways. For example, I have a script that takes an OTA and builds a new full ODIN image from it...with all partitions fully signed except system. Many people have asked me to "repackage it" with various requests. This tutorial is going to show how to do that.
Requirements:
o) You will need to install Cygwin. A default installation should suffice for this exercise.
o) You will need one of the ODIN TAR Full Rooted Restore images. They are gzipped to make them smaller.
Process:
o) You need to unpack the files stored inside the gzip. 7 Zip is a handy program for doing that. We need the individual partition files extracted to a work directory that can be accessed from a Cygwin command prompt. I create a C:\Android\S4_GPE directory for my own image creation tasks.
o) Once the individual files are unpacked, we need to repack them. Open a Cygwin command prompt and navigate to the directory you extracted the files to. In my case, that would be cd c:/Android/S4_GPE
Follow the directions below to repack the files as needed. I give a few examples here to show you the basics of how it's done. Basically you run each command in your Cygwin command prompt. Or you can add them to an SH script and run it that way. Whatever you feel most comfortable with.
The output of these commands is an ODIN flashable file that will install what you choose.
BOOT
filename=boot
tar -H ustar -c boot.img > $filename.tar
md5sum -t $filename.tar >> $filename.tar
mv $filename.tar $filename.tar.md5
RECOVERY
filename=recovery
tar -H ustar -c recovery.img > $filename.tar
md5sum -t $filename.tar >> $filename.tar
mv $filename.tar $filename.tar.md5
MODEM
filename=modem
tar -H ustar -c NON-HLOS.bin modem.bin > $filename.tar
md5sum -t $filename.tar >> $filename.tar
mv $filename.tar $filename.tar.md5
FULL ODIN IMAGE
filename=I9505GUEUB_FULL_ROOTED
tar -H ustar -c boot.img recovery.img NON-HLOS.bin modem.bin system.img.ext4 > $filename.tar
md5sum -t $filename.tar >> $filename.tar
mv $filename.tar $filename.tar.md5
gzip $filename.tar.md5
Those are some of the common ones. What if I wanted a "semi-full rooted image"? For instance, without the modems? You just modify this line:
tar -H ustar -c boot.img recovery.img NON-HLOS.bin modem.bin system.img.ext4 > $filename.tar
so that it becomes:
tar -H ustar -c boot.img recovery.img system.img.ext4 > $filename.tar
Of if you don't want recovery, either, and just want boot and system:
tar -H ustar -c boot.img system.img.ext4 > $filename.tar
And the rest stays the same. I really hope this helps people. I will update this post to clarify anything that's confusing and will try to help people in this thread to create whatever they need. Again, you take responsibility for anything you create using these instructions and flash to your phone.
whats the command to create a system dump to an odin compatible system.img file? been a while. i forget
This is how I do it in my script:
adb shell "su -c 'cd /sdcard; dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/sdcard/system.img.ext4'"
adb pull /sdcard/system.img.ext4
adb shell rm /sdcard/system.img.ext4
SamuriHL said:
This is how I do it in my script:
adb shell "su -c 'cd /sdcard; dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/sdcard/system.img.ext4'"
adb pull /sdcard/system.img.ext4
adb shell rm /sdcard/system.img.ext4
Click to expand...
Click to collapse
I'm a relative noob and just learning as much as I can and this is alot of great info. I am able to pull system dump and pull recovery.img from my but when I create an odin flashable recovery image (for back-up purposes) it fails auth. Is there a way to pull a signed recovery image from system? Thanks.
No. When you dd extract a partition it adds padding to it which messes with the signature. I create a signed recovery img file by patching the boot img with the recovery-from-boot.p in the OTA update. That's a lot more involved than what's in this tutorial, however.
SamuriHL said:
No. When you dd extract a partition it adds padding to it which messes with the signature. I create a signed recovery img file by patching the boot img with the recovery-from-boot.p in the OTA update. That's a lot more involved than what's in this tutorial, however.
Click to expand...
Click to collapse
Got it, thank you. I found the thread on hexediting the partition file. I will see if that works.
muniz_ri said:
Got it, thank you. I found the thread on hexediting the partition file. I will see if that works.
Click to expand...
Click to collapse
My initial results weren't very conclusive on that. I tried it with the NON-HLOS.bin file just to see if I could make it consistent with the one I create by patching, and the results were not good. There's no way to know exactly how long to make the cut. It seems like all you do is remove the trailing 00's when hexediting, but, I can tell you that's not enough to make it match. I've got more research to do on this as it would be extremely useful to be able to edit the dd extracted files to make them match the signed files. So far, that doesn't seem possible.
SamuriHL said:
My initial results weren't very conclusive on that. I tried it with the NON-HLOS.bin file just to see if I could make it consistent with the one I create by patching, and the results were not good. There's no way to know exactly how long to make the cut. It seems like all you do is remove the trailing 00's when hexediting, but, I can tell you that's not enough to make it match. I've got more research to do on this as it would be extremely useful to be able to edit the dd extracted files to make them match the signed files. So far, that doesn't seem possible.
Click to expand...
Click to collapse
That's too bad, I was also hoping removing the trailing zeros would work. Can you point me to a tutorial, etc where i can learn how to patch using the OTA files? thanks again.
muniz_ri said:
That's too bad, I was also hoping removing the trailing zeros would work. Can you point me to a tutorial, etc where i can learn how to patch using the OTA files? thanks again.
Click to expand...
Click to collapse
It's not quite as simple as that. There isn't a tutorial on it. I learned what I know from Matt Groff. It started with a thread here:
http://forum.xda-developers.com/showthread.php?t=1702233
But that thread isn't going to teach nearly enough to learn how to do this. It involves parsing the update scripts from the OTA to find the command they use to patch the actual partition and then converting that to a command to patch the file. So if you look at this command from install-recovery.sh:
applypatch EMMC:/dev/block/platform/msm_sdcc.1/by-name/boot:8036608:1ad324cf48a6e19fd402603477cd0ed8472ed863 EMMC:/dev/block/platform/msm_sdcc.1/by-name/recovery f4579fa7099942ec2f214cff81014b8e8b1a550f 8632576 1ad324cf48a6e19fd402603477cd0ed8472ed863:/system/recovery-from-boot.p
What that's doing is taking 8036608 bytes from the boot partition, ensuring it has a sha1 hash of 1ad324cf48a6e19fd402603477cd0ed8472ed863, patching it with the contents of the recovery-from-boot.p file, and then writing it to the recovery partition.
Each time an OTA comes out for our phones, I create signed recovery, modem, and non-hlos files using this process. Then I use the process outlined in this tutorial to create the ODIN tar md5 files that I post.
SamuriHL said:
It's not quite as simple as that. There isn't a tutorial on it. I learned what I know from Matt Groff. It started with a thread here:
http://forum.xda-developers.com/showthread.php?t=1702233
But that thread isn't going to teach nearly enough to learn how to do this. It involves parsing the update scripts from the OTA to find the command they use to patch the actual partition and then converting that to a command to patch the file. So if you look at this command from install-recovery.sh:
applypatch EMMC:/dev/block/platform/msm_sdcc.1/by-name/boot:8036608:1ad324cf48a6e19fd402603477cd0ed8472ed863 EMMC:/dev/block/platform/msm_sdcc.1/by-name/recovery f4579fa7099942ec2f214cff81014b8e8b1a550f 8632576 1ad324cf48a6e19fd402603477cd0ed8472ed863:/system/recovery-from-boot.p
What that's doing is taking 8036608 bytes from the boot partition, ensuring it has a sha1 hash of 1ad324cf48a6e19fd402603477cd0ed8472ed863, patching it with the contents of the recovery-from-boot.p file, and then writing it to the recovery partition.
Each time an OTA comes out for our phones, I create signed recovery, modem, and non-hlos files using this process. Then I use the process outlined in this tutorial to create the ODIN tar md5 files that I post.
Click to expand...
Click to collapse
Success! Thanks so much, just created my first signed odin image!
Theres two more ways the get signed images. One is using dd if=of with the right bs and count. For example, I extracted the stock signed PIT file for the S4 using
Code:
su
dd if=/dev/block/mmcblk0 of=/sdcard/sch1545.pit bs=8 count=580 skip=2176
you can see the thread and md5 comparisonhere The other method is hexediting but it was easier on 4.2.2 but still very doable on 4.3. You have to know what signatures look like though. Hexediting can also be useful for manually extracting the zimage and ramdisk from a boot.img
Sent from my SCH-I545 using XDA Premium 4 mobile app
Surge1223 said:
Theres two more ways the get signed images. One is using dd if=of with the right bs and count. For example, I extracted the stock signed PIT file for the S4 using
Code:
su
dd if=/dev/block/mmcblk0 of=/sdcard/sch1545.pit bs=8 count=580 skip=2176
you can see the thread and md5 comparisonhere The other method is hexediting but it was easier on 4.2.2 but still very doable on 4.3. You have to know what signatures look like though. Hexediting can also be useful for manually extracting the zimage and ramdisk from a boot.img
Sent from my SCH-I545 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I'm also going to play around more with hexediting, if it will work it seems much more straightforward. Thanks again for all of the good info!
SamuriHL said:
My initial results weren't very conclusive on that. I tried it with the NON-HLOS.bin file just to see if I could make it consistent with the one I create by patching, and the results were not good. There's no way to know exactly how long to make the cut. It seems like all you do is remove the trailing 00's when hexediting, but, I can tell you that's not enough to make it match. I've got more research to do on this as it would be extremely useful to be able to edit the dd extracted files to make them match the signed files. So far, that doesn't seem possible.
Click to expand...
Click to collapse
Sam, id be glad to try hexediting the NON-HLOS.bin file and then send you the md5.
Sent from my SCH-I545 using XDA Premium 4 mobile app
Surge1223 said:
Sam, id be glad to try hexediting the NON-HLOS.bin file and then send you the md5.
Sent from my SCH-I545 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I'll pm one to you tomorrow. I definitely am curious if you're able to md5 hash it correctly.
Pm sent. Good luck.
Sent from my SM-P600 using Tapatalk 4
SamuriHL said:
Pm sent. Good luck.
Sent from my SM-P600 using Tapatalk 4
Click to expand...
Click to collapse
How do you limit the number of bytes extracted for the mdm.bin to match the updater script's parameters? Thank you.
muniz_ri said:
How do you limit the number of bytes extracted for the mdm.bin to match the updater script's parameters? Thank you.
Click to expand...
Click to collapse
I didn't. The first signed modem bin I made was done by looking at the size in the updater script and using cygwin to copy that many bytes to a new file. From then on I just patched the previous version's modem bin and NON-HLOS bin files.
Sent from my SM-P600 using Tapatalk 4
SamuriHL said:
I didn't. The first signed modem bin I made was done by looking at the size in the updater script and using cygwin to copy that many bytes to a new file. From then on I just patched the previous version's modem bin and NON-HLOS bin files.
Sent from my SM-P600 using Tapatalk 4
Click to expand...
Click to collapse
First time quickly hexediting it I got
md5: 9616e85b765e0365e8ccd57550a715b8
Surge1223 said:
First time quickly hexediting it I got
md5: 9616e85b765e0365e8ccd57550a715b8
Click to expand...
Click to collapse
Which doesn't match the digital signature. This is what I was afraid of and what I was running into.
Sent from my SM-P600 using Tapatalk 4
SamuriHL said:
Which doesn't match the digital signature. This is what I was afraid of and what I was running into.
Sent from my SM-P600 using Tapatalk 4
Click to expand...
Click to collapse
what are you comparing the sig to?
Sent from my SCH-I545 using XDA Premium 4 mobile app
Hello
How is a bootloader available as a tar.md5 file to flash in Odin? Is it possible to take the bootloader out of a Stock or Rooted ROM? Does it come from the boot.img file in some way ? Any help would be great.
Thanks in advance
[Guide] How and Where to Ask a Question on XDA
[Guide] How and Where to Ask a Question on XDA Read the Forum Rules Announcement: Forum Rules by MikeChannon (Forum Admin) Search before asking Use the XDA search to see if your device has it's own Subforum or Enhanced Device Tag e.g...
forum.xda-developers.com
Fixed title of the thread, but this is a general Android question and not for a specific phone so I hope it is in the right section
seskanda said:
... not for a specific phone...
Click to expand...
Click to collapse
Not really, odin is a Samsung only tool.
So you must have a Samsung device.
And most android devices, the bootloader would need to be unlocked, to pull a copy of the bootloader.
sd_shadow said:
Not really, odin is a Samsung only tool.
So you must have a Samsung device.
Click to expand...
Click to collapse
Wow I had no idea Odin is a Samsung only tool
Yes it is Sprint Galaxy S5, does thread need to be moved now?
I see is any way to know if the bootloader is unlocked? And if not,
then can it be done?
If device's Android is rooted a device's bootloader typically gets extracted by means of a Windows CMD script what is simlar to this one
Code:
adb devices
for /F %%a in ('adb shell "su -c 'ls -l /dev/block/platform/msm_sdcc.1/by-name/boot'"') do (set blk_device=%%a)
adb exec-out "su -c 'dd if=%blk_device% bs=4096'" > "C:\boot.img"
My Sprint Galaxy S5 is rooted what kind of file does this command output? Is it an IMG file? I'm looking for a TAR.MD5 file, and need it from a firmware/ROM that is not on the phone.
seskanda said:
My Sprint Galaxy S5 is rooted what kind of file does this command output? Is it an IMG file? I'm looking for a TAR.MD5 file, and need it from a firmware/ROM that is not on the phone.
Click to expand...
Click to collapse
A tar.md5 should just be a text file for the checksum from the .tar file you are trying to flash?
sd_shadow said:
A tar.md5 should just be a text file for the checksum from the .tar file you are trying to flash?
Click to expand...
Click to collapse
I'm not really sure but let's say you are right I will be needing at least a .tar file of the bootloader from a firmware/ROM
seskanda said:
I'm not really sure but let's say you are right I will be needing at least a .tar file of the bootloader from a firmware/ROM
Click to expand...
Click to collapse
I would look for firmware for your exact model here something like SM-G90xx
Samsung Galaxy S 5
The Samsung Galaxy S 5 is the successor to the popular Galaxy S 4. The 5.1" Super AMOLED display has a resolution of 1080x1920. The Galaxy S 5 is powered by a 2.5 GHz Qualcomm Snapdragon 801 processor with 2GB RAM. Internal storage comes in at either 16GB or 32GB, with a microSD slot up to...
forum.xda-developers.com
sd_shadow said:
A tar.md5 should just be a text file for the checksum from the .tar file you are trying to flash?
Click to expand...
Click to collapse
A TAR.MD5-file ( used by firmware update and kernel flashing applications like Odin and Heimdall for Samsung Android devices ) contains a TAR archive that has been verified with an MD5 checksum; the TAR file contains firmware and other system data, while the .MD5 extension verifies that no data is corrupted.
sd_shadow said:
I would look for firmware for your exact model here something like SM-G90xx
Samsung Galaxy S 5
The Samsung Galaxy S 5 is the successor to the popular Galaxy S 4. The 5.1" Super AMOLED display has a resolution of 1080x1920. The Galaxy S 5 is powered by a 2.5 GHz Qualcomm Snapdragon 801 processor with 2GB RAM. Internal storage comes in at either 16GB or 32GB, with a microSD slot up to...
forum.xda-developers.com
Click to expand...
Click to collapse
Ok it is SM-G900P w/ Android 4.4.2 NE5 rooted and Knox 0x0. I'd like to upgrade to Android 5.0 OA6 and keep Knox and root.
Yes that is a good explaination of what the TAR.MD5 file is. I'm never able to find a TAR file without MD5 as that verifies it. I've read that to upgrade to Android 5.0 with root and Knox may need a TAR.MD5 of the bootloader for the OA6 firmware. I have OA6 ROM file but no clue how to get bootloader from it.
If a .TAR.MD5 suffixed archive file is needed, then change archive file's .TAR suffix to .TAR.MD5
I do not have a .TAR or .TAR.MD5 file of any bootloader and that command you gave does not work it says "%%a was unexpected at this time" after the second line.
seskanda said:
command you gave does not work it says "%%a was unexpected at this time" after the second line.
Click to expand...
Click to collapse
Put the code example shown above into a Windows command file ( .BAT-file ) and it should work.
seskanda said:
I have OA6 ROM file but no clue how to get bootloader from it.
Click to expand...
Click to collapse
If ROM comes as .ZIP-file then extract the .ZIP-file with any ZIP software: the boot.img file should be right there at the root of the archive.
jwoegerbauer said:
Put the code example shown above into a Windows command file ( .BAT-file ) and it should work.
Click to expand...
Click to collapse
No, I get 'error: closed' when I run the .bat file as Administrator and it outputs a boot.img file that is 0 bytes in C:\
jwoegerbauer said:
If ROM comes as .ZIP-file then extract the .ZIP-file with any ZIP software: the boot.img file should be right there at the root of the archive.
Click to expand...
Click to collapse
Yes the OA6 ROM is a ZIP file that Windows is able to open by itself, and I see a boot.img file in there. But even if this is the boot loader how can it be turned into a .TAR or TAR.MD5 file to flash in Odin?
seskanda said:
Yes the OA6 ROM is a ZIP file that Windows is able to open by itself, and I see a boot.img file in there. But even if this is the boot loader how can it be turned into a .TAR or TAR.MD5 file to flash in Odin?
Click to expand...
Click to collapse
Look inside here:
How To Use Tar On Windows 10
How To Use Tar On Windows 10
www.addictivetips.com
jwoegerbauer said:
Look inside here:
How To Use Tar On Windows 10
How To Use Tar On Windows 10
www.addictivetips.com
Click to expand...
Click to collapse
Ok let's say I make a .TAR file from boot.img all I have to do is rename it to TAR.MD5 and Odin will flash it ?