How to create a odin file without aboot - Galaxy Note 4 Developer Discussion (Devs., Only)

hello developers,
I am in pure stock odexed rom with unlocked bootloader and rooted by magisk. I would like to create a odin file to update the stock rom.
Steps:
1. Extract zip file from sammobile
2. Extract tar.md5 file contents using 7zip to /cygwin64/home/username/rom folder
3. Delete aboot.mbn
4. open cygwin64 and execute the following commands in windows 10 PC
$ cd rom
$ tar -H ustar -c sbl1.mbn rpm.mbn tz.mbn sdi.mbn NON-HLOS.bin boot.img recovery.img system.img.ext4 modem.bin cache.img.ext4 > stock.tar
$ md5sum -t stock.tar >> stock.tar
$ mv stock.tar stock.tar.md5
5. Odin stock.tar.md5
All threads completed. (succeed 1/failed 0)
But when I boot it, there is no /system/csc folder and I don't get network.
So I did the following steps to make it work.
1. Odin twrp
2. Boot to recovery
3. Use cacheripper to extract cache.img.ext4 to cache.zip file
4. mount system in twrp and activate sideload
5. adb sideload cache.zip
6. wipe dalvik and cache
7. Reboot
It works now - I have updated stock with all my apps and settings intact.
What am I missing in creating odin file? Why cache.img.ext4 is not flashing csc folder even though odin says success?
Thanks

sam298 said:
$ tar -H ustar -c sbl1.mbn rpm.mbn tz.mbn sdi.mbn NON-HLOS.bin boot.img recovery.img system.img.ext4 modem.bin cache.img.ext4 > stock.tar
Click to expand...
Click to collapse
I've read in other threads that the order of the files in the tar command is important. You might try ordering the files as they listed in the stock firmware (i.e., list cache.img.ext4 before modem.bin.

Related

[Q] Flashing stock ROM on N7105 using Heimdall on OSX?

Hi,
Is it possible to use the Heimdall command-line client to install a stock Samsung ROM on the N7105?
(I tried using Odin 3.07 from inside a Windows XP VM from VirtualBox - host is OSX - seems to randomly reboot during the flash - hence why I thought Heimdall might be more reliable).
For example, I download one of the stock N7105 ROM images from here:
http://forum.xda-developers.com/showthread.php?t=2032849
Inside the tar archive, I see:
boot.img
cache.img
hidden.img
recovery.img
system.img
modem.img
This doesn't quite seem to match up to the normal Heimdall commands I've seen - e.g.:
Code:
heimdall flash --repartition --pit s1_odin_20100512.pit --factoryfs factoryfs.rfs --cache cache.rfs --dbdata dbdata.rfs --primary-boot boot.bin --secondary-boot Sbl.bin --param param.lfs --kernel zImage --modem modem.bin
Is it still possible to use the above files from the tarball with Heimdall to flash back to stock?
Are there any special command-line flags I should use, or caveats I should be aware of?
Cheers,
Victor

[Guide]Modify stock rom and delete bootloader with Knox for Galaxy S4 Mini

Quick and dirty guide on how-to delete bootloader stuff that contain Knox from stock rom ( only works on Jelly Bean ) . On KitKat we have Knox 2.0 which is more harder to conquer
Only use it if u do not have KNOX WARRANTY in download mode
U need : a virtual machine or any linux environment . I use Vmware player + Linux Mint 16 x64
First download the rom from Sammobile and place it on your Desktop in a folder called work in linux
Let`s say we download Russia one for I9192
I9192XXUBMK4_I9192SERBMJ3_SER.zip
U can use this guide on other versions of this phone I9190/I9195
Firmwares that contain MK4/MK5/ML1/ML2/ML4/NA1/NA2 and so on from here have Knox bootloader inside
Only the name will be different but what is inside is the same
Only latest versions of firmware contain Knox Bootloader ( usually the ones released in late november/december 2013 )
Open terminal and type
Code:
cd Desktop
cd work
Now we need to extract it
Code:
unzip *.zip
U will get 2 files
First: I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar.md5
Second: SS_DL.dll
Now again in terminal type:
Code:
rm -rf SS_DL.dll
tar -xvf *.tar.md5
After it will finish to extract we can delete the files we do not need
Code:
rm -rf aboot.mbn - bootloader ( knox included )
rm -rf sbl1.mbn - part of bootloader
rm -rf sbl2.mbn - part of bootloader
rm -rf sbl3.mbn - part of bootloader
rm -rf *.tar.md5
Now we can place it back in an archive. Choose any name u want i had chosen original name for reference only.
Code:
tar -H ustar -c rpm.mbn tz.mbn boot.img recovery.img system.img.ext4 NON-HLOS.bin cache.img.ext4 hidden.img.ext4 > I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar
After comes md5 stuff
Code:
md5sum -t I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar >> I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar
mv I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar.md5
Now transfer it to your windows pc and flash it with Odin Make sure u do not rename the file at this stage or md5 checksum will fail
Double check it before u flash, look inside the archive that u don`t have those files u just deleted Maybe u did not move the correct file
Video of "How to" credit to @Mitko
SilviuMik said:
Quick and dirty guide on how-to delete bootloader stuff that contain Knox from stock rom
Only use it if u do not have KNOX WARRANTY in download mode
U need : a virtual machine or any linux environment . I use Vmware player + Linux Mint 16 x64
First download the rom from Sammobile and place it on your Desktop in a folder called work in linux
Let`s say we download Russia one
I9192XXUBMK4_I9192SERBMJ3_SER.zip
Open terminal and type
Code:
cd Desktop
cd work
Now we need to extract it
Code:
unzip I9192XXUBMK4_I9192SERBMJ3_SER.zip
U will get 2 files
First: I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar.md5
Second: SS_DL.dll
Now again in terminal type:
Code:
rm -rf SS_DL.dll
tar -xvf I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar.md5
After it will finish to extract we can delete the files we do not need
Code:
rm -rf aboot.mbn
rm -rf sbl1.mbn
rm -rf sbl2.mbn
rm -rf sbl3.mbn
rm -rf I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar.md5
Now we can place it back in an archive. Choose any name u want i had chosen original name for reference only.
Code:
tar -H ustar -c rpm.mbn tz.mbn boot.img recovery.img system.img.ext4 NON-HLOS.bin cache.img.ext4 hidden.img.ext4 > I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar
After comes md5 stuff
Code:
md5sum -t I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar >> I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar
mv I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar I9192XXUBMK4_I9192SERBMJ3_I9192XXUBMK4_HOME.tar.md5
Now transfer it to your windows pc and flash it with Odin Make sure u do not rename the file at this stage or md5 checksum will fail
Double check it before u flash, look inside the archive that u don`t have those files u just deleted Maybe u did not move the correct file
Click to expand...
Click to collapse
Is this BMK4 firmware different from previous versions by introducing Knox and improvement of battery? Can we transfer the rpm bootloader to previous version and enjoy the battery consumption improvement?
hobbya said:
Is this BMK4 firmware different from previous versions by introducing Knox and improvement of battery? Can we transfer the rpm bootloader to previous version and enjoy the battery consumption improvement?
Click to expand...
Click to collapse
I think u can yes But i also think some improvements were made in Modem/Kernel
That rpm.mbn file gets flashed in a special partition and does not get overwritten only if u flash a new one from a firmware that contain it. As i mentioned in other forum only last ones does contain it Russia, Brazil, Trinidad MK4
allows downgrade?
Once flashed this firmware without knox, would can move back to a previous version?
I ask that flashing the stock rom of samsung knox is no longer possible downgrade.
Thanks and regards,
Trepanator56 said:
Once flashed this firmware without knox, would can move back to a previous version?
I ask that flashing the stock rom of samsung knox is no longer possible downgrade.
Thanks and regards,
Click to expand...
Click to collapse
Yes u can downgrade as long as u don`t flash new bootloader
Use the tutorial and remove the files from stock rom before flashing. If u already have the new bootloader on phone u are out of luck
SilviuMik said:
Yes u can downgrade as long as u don`t flash new bootloader
Use the tutorial and remove the files from stock rom before flashing. If u already have the new bootloader on phone u are out of luck
Click to expand...
Click to collapse
One question, I flashed the stock thing via Heimdall and my wi-fi is not working. I think it didn't flash the tz.bin, since I saw you say on other thread that it was important for wifi to work in Brazil...
Is there anyway to fix it? Or I got myself screwed?
Dijinn said:
One question, I flashed the stock thing via Heimdall and my wi-fi is not working. I think it didn't flash the tz.bin, since I saw you say on other thread that it was important for wifi to work in Brazil...
Is there anyway to fix it? Or I got myself screwed?
Click to expand...
Click to collapse
Flash it with Odin that tz file and u are good to go
Same procedure as making an kernel from stock or modem
tar -H ustar -c tz.mbn > name.tar
md5sum -t name.tar >> name.tar
mv name.tar name.tar.md5
SilviuMik said:
Flash it with Odin that tz file and u are good to go
Same procedure as making an kernel from stock or modem
tar -H ustar -c tz.mbn > name.tar
md5sum -t name.tar >> name.tar
mv name.tar name.tar.md5
Click to expand...
Click to collapse
Well, we got another problem... Here... I'm on a MAC right now, so my only flashing thingy is Heimdall or ADB...
I tried flashing the tz.mbn file 3 times via Heimdall, it doesn't even open the recovery after I flash it... And wi-fi is never back...
I got ur version of the files and flashed everything again, still, no wi-fi, probably because of the tz.mbn
The funny thing is that Heimdall himself says the file was uploaded to the phone, but it seems it's not "installing" it if u understand what I mean...
Dijinn said:
Well, we got another problem... Here... I'm on a MAC right now, so my only flashing thingy is Heimdall or ADB...
I tried flashing the tz.mbn file 3 times via Heimdall, it doesn't even open the recovery after I flash it... And wi-fi is never back...
I got ur version of the files and flashed everything again, still, no wi-fi, probably because of the tz.mbn
The funny thing is that Heimdall himself says the file was uploaded to the phone, but it seems it's not "installing" it if u understand what I mean...
Click to expand...
Click to collapse
Sorry mate then flash an older file that does not contain Knox Hope u get your Wifi back
SilviuMik said:
Sorry mate then flash an older file that does not contain Knox Hope u get your Wifi back
Click to expand...
Click to collapse
I solved the problem!
If someone else has trouble fixing the Wi-Fi after the flash via Heimdall, here goes!
Flashing TZ partition only won't do anything...you upload the file, but it doesn't seem to get flashed...
The solution is to flash both MODEM and TZ partitions... It seems that when you reflash the modem, the cellphone tends to check for TZ again and TADA! Now it will be there!
Do you think that I could do the same for i9195 ?
Darktitor said:
Do you think that I could do the same for i9195 ?
Click to expand...
Click to collapse
Yes of course Is the same for all 3 models 9190 9192 9195
Great
My friend will be happy
Envoyé de mon GT-I9195 en utilisant Tapatalk
Apparently the contents of S4 (I9505) is same ... I made the change with Ubuntu, it does.
Before to flash, I would like to be sure.
Think it should do as correctly as your model?
franzyroy said:
Apparently the contents of S4 (I9505) is same ... I made the change with Ubuntu, it does.
Before to flash, I would like to be sure.
Think it should do as correctly as your model?
Click to expand...
Click to collapse
I have no ideea about S4 Maybe knox is in other places too like modem or no ideea. I can`t guarantee. On S4 mini is in aboot.mbn sbl1 sbl2 sbl3 ( bootloader )
Thanks for answer!
So, that's the reason you removed the modem.bin file?
What is the risk to try? Except to have the new bootloader.
franzyroy said:
Thanks for answer!
So, that's the reason you removed the modem.bin file?
What is the risk to try? Except to have the new bootloader.
Click to expand...
Click to collapse
I did not remove modem file
modem is named NON-HLOS.bin i keep it
If u have old bootloader ( no knox in download mode ) yes risk is to get new bootloader with knox
Pls check on S4 forums maybe someone did the same as me with S4 and knows more
SilviuMik said:
I did not remove modem file
modem is named NON-HLOS.bin i keep it
If u have old bootloader ( no knox in download mode ) yes risk is to get new bootloader with knox
Pls check on S4 forums maybe someone did the same as me with S4 and knows more
Click to expand...
Click to collapse
On the S4 (I9505), I also have NON-HLOS.bin, but I also have modem.bin file.
Not seen on the S4 forums a subject on that!
---------- Post added at 03:17 PM ---------- Previous post was at 03:15 PM ----------
SilviuMik said:
If u have old bootloader ( no knox in download mode ) yes risk is to get new bootloader with knox
Click to expand...
Click to collapse
Except this risk... This one, I'll have it certainly with the SAV!!
---------- Post added at 03:21 PM ---------- Previous post was at 03:17 PM ----------
Otherwise, I followed your tuto and like I didn't see the modem.bin file, I removed it. At worse, I could flash it after.
franzyroy said:
On the S4 (I9505), I also have NON-HLOS.bin, but I also have modem.bin file.
Not seen on the S4 forums a subject on that!
---------- Post added at 03:17 PM ---------- Previous post was at 03:15 PM ----------
Except this risk... This one, I'll have it certainly with the SAV!!
---------- Post added at 03:21 PM ---------- Previous post was at 03:17 PM ----------
Otherwise, I followed your tuto and like I didn't see the modem.bin file, I removed it. At worse, I could flash it after.
Click to expand...
Click to collapse
Yes of course , better to try then flash all the files and see after
Btw, S4 Mini Knox firmware contains:
sbl1.mbn - part of new bootloader , safe to delete
sbl2.mbn - part of new bootloader , safe to delete
sbl3.mbn - part of new bootloader , safe to delete
aboot.mbn - New Knox bootloader , DELETE
rpm.mbn - Resource power Management link
tz.mbn - Trusted zone ( Wifi won`t work if u don`t flash it together with new Modem )
boot.img - Kernel
recovery.img - Recovery/Download mode
system.img.ext4 - your apps/framework/android
NON-HLOS.bin - modem
cache.img.ext4 - CSC / APN settins / What bloat is to be installed depending on zone / carrier
hidden.img.ext4 - Another "system" part of apps that are too big for /system ( for now almost empty ) on S2 was full of apps
Try and see
Thanks ... I know for the S4(I9505), when we have old bootloader, we must put this (GSM_Modem_XXUEMJ5_and_LTE_Modem_XXUBMH1.zip ) modem for that all works.
Perhaps, I can replace modem.bin and NON-HLOS.bin by those in the zip.

Need stock 4.3.1 kernel

I need the official tmob noteII jb 4.3.1 kernel in tar or zip can anyone give me a link please
or latest official kernel
(Assuming you're running under Windows.)
Download the complete stock ROM from sammobile or the like. You could also get the boot.img from a repacked zip here, but YMMV.
Extract boot.img from the .tar.md5 file with a compression utility that handles tar archives, 7-Zip works well for this. (The error message about the end of the file is normal, that's because the MD5 hash isn't part of a normal tar archive.)
Get cygwin, namely its tar.exe command. With boot.img in your Cygwin home directory, from the Cygwin shell run:
tar -H ustar -cf youroutputfilename.tar boot.img
As an aside, my Windows-based setup to make Odin-flashable images is fancier than that. I've added the Cygwin binaries to my PATH environment variable (jury is still out on whether that's a good idea overall, but it works for a number of tricks) and I've created a script named tarodin.cmd in that directory which contains the following command:
tar -H ustar -cf %1 sboot.bin tz.img md5.img efs.img m9kefs1.bin m9kefs2.bin m9kefs3.bin param.bin boot.img recovery.img system.img modem.bin tombstones.img cache.img hidden.img userdata.img
The missing files just cause an error to show but the file itself works perfectly. I haven't bothered adding the MD5 hash, but it could be done.
The other way is to take a working t0lte kernel zip and substitute the boot.img in it then flash through recovery.
Good luck,
Darkshado
Got Kernel working
Darkshado said:
(Assuming you're running under Windows.)
Download the complete stock ROM from sammobile or the like. You could also get the boot.img from a repacked zip here, but YMMV.
Extract boot.img from the .tar.md5 file with a compression utility that handles tar archives, 7-Zip works well for this. (The error message about the end of the file is normal, that's because the MD5 hash isn't part of a normal tar archive.)
Get cygwin, namely its tar.exe command. With boot.img in your Cygwin home directory, from the Cygwin shell run:
tar -H ustar -cf youroutputfilename.tar boot.img
As an aside, my Windows-based setup to make Odin-flashable images is fancier than that. I've added the Cygwin binaries to my PATH environment variable (jury is still out on whether that's a good idea overall, but it works for a number of tricks) and I've created a script named tarodin.cmd in that directory which contains the following command:
tar -H ustar -cf %1 sboot.bin tz.img md5.img efs.img m9kefs1.bin m9kefs2.bin m9kefs3.bin param.bin boot.img recovery.img system.img modem.bin tombstones.img cache.img hidden.img userdata.img
The missing files just cause an error to show but the file itself works perfectly. I haven't bothered adding the MD5 hash, but it could be done.
The other way is to take a working t0lte kernel zip and substitute the boot.img in it then flash through recovery.
Good luck,
Darkshado
Click to expand...
Click to collapse
Thanks bud used the Kernel and subbed it in zip that did the trick God Bless

Cricket S3 SCH-R530C "sbl1.mbn" file needed.

Hello guy, i have a S3 SCH-R530C hard bricked(pls don't ask me how i hard bricked it!).
A guy from xda sent me a tutorial how to unbrick it without JTAG(Will post the tut at the end), but when i download the package the sbl1.mbn is missing.
Does anyone have it ?
Or maybe you have a better tutorial for debrick ? Anything will help. Thank you
Copy past tutorial, all credits goes to "robbiejobs"
First part:
You'll need these files :
1.) R530U debrick img https://app.box.com/SCH-R530U
2.) R530C stock image ( I guess the version doesn't matter, but you better try with 4.3 first ) http://terafile.co/88b027e65750/R530...RICMK3_CRI.zip
---
Extract R530CVVUCMK3_R530CCRICMK3_CRI.zip you'll get some .tar.md5 file, extract that file too and then grab these files
sbl1.mbn
sbl2.mbn
sbl3.mbn
aboot.mbn
rpm.mbn
tz.mbn
Second part:
I've waited for almost 2 years to have R530C debrick image, no one have that file. I almost give up, and then my stupid idea came up... ( You'll need linux terminal, and basic linux command knowledge )
1.) Download odin package for your device ( make sure it's the same version with your latest firmware before got bricked )
2.) Extract the .tar.md5 file ( WinRar / 7zip will give error message, just ignore it )
3.) Grab debrick image for your device, or at least the same variant ( R530C / U / M ) firmware version doesn't matter.
4.) Clone the debrick image to your microSD card.
5.) Now back to extracted folder of your firmware, copy these files :
sbl1.mbn
sbl2.mbn
sbl3.mbn
aboot.mbn
rpm.mbn
tz.mbn
to your working directory
6.) List your debrick microSD partition using parted ( mine was /dev/sdb, make sure you have the right partition before doing these commands )
I forgot the command, but it's something like
Code:
parted /dev/sdb
Code:
(parted) print
7.) Now you can see the partition list (sbl1,sbl2,etc)
8.) And then do this :
sudo dd if=sbl1.mbn of=/dev/sdbX
sudo dd if=sbl2.mbn of=/dev/sdbX
sudo dd if=sbl3.mbn of=/dev/sdbX
sudo dd if=aboot.mbn of=/dev/sdbX
sudo dd if=rpm.mbn of=/dev/sdbX
sudo dd if=tz.mbn of=/dev/sdbX
9.) After finishing all the command, remove your microSD from card reader, cross finger.. and Good Luck.
Sorry for my "not-so-easy" tutorial, I wish I could explain it a little easier to understand.. but my english sucks
This forum is for the GSM/LTE version of the s3. Try posting your question here: http://forum.xda-developers.com/galaxy-s3-verizon
audit13 said:
This forum is for the GSM/LTE version of the s3. Try posting your question here: http://forum.xda-developers.com/galaxy-s3-verizon
Click to expand...
Click to collapse
I was not sure where to post it, since there is no cricket , but thank you.

Repackaging Odin package

Hi all. I'm trying to repackage Odin package. I need to change smth. in cache.img.
Package contains cache.img and recovery.img.
I'm following these steps:
Untar package
simg2img cache.img cache.raw.img
mount -o loop -t ext4 cache.raw.img cache
umount cache
ext2simg cache.raw.img cache.img
tar -H ustar -c cache.img recovery.img > pkg.tar.md5
md5sum -t pkg.tar.md5 >> pkg.tar.md5
I do not change anything in cache.img, hust mounting to verify that image unpacks successfuly.
Then I'm trying to flash the package, but flashing fails on "NAND Write start" for cache.img.
As I understood, I've made a mistake when at the 5 step. How should I fix it?
Ax-Soft said:
I'm following these steps:
tar -H ustar -c cache.img recovery.img > pkg.tar.md5
...
try this:
tar --create --format=gnu -b20 --quoting-style=escape --owner=0 --group=0 --totals --mode=644 -f pkg.tar boot.img recovery.img
md5sum -t pkg.tar >> pkg.tar
mv pkg.tar pkg.tar.md5
Click to expand...
Click to collapse

Categories

Resources