[Q] Flashing stock ROM on N7105 using Heimdall on OSX? - Galaxy Note II Q&A, Help & Troubleshooting

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

Related

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.

Error flashing bootloader with heimdall

I need to update the bootloader on a T705 in order to run the Marshmallow ROM. Got the correct sboot.bin file but attempting to flash with heimdall gives the error "Failed to confirm end of file transfer sequence!":
Code:
# heimdall flash --BOOTLOADER sboot.bin
Heimdall v1.4.1
Copyright (c) 2010-2014 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/
This software is provided free of charge. Copying and redistribution is
encouraged.
If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/
Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...
Initialising protocol...
Protocol initialisation successful.
Beginning session...
Some devices may take up to 2 minutes to respond.
Please be patient!
Session begun.
Downloading device's PIT file...
PIT file download successful.
Uploading BOOTLOADER
100%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: BOOTLOADER upload failed!
Ending session...
ERROR: Failed to send end session packet!
Releasing device interface...
Can't use odin as I don't have a windows machine.
My pit shows the bootloader as read-only and zero bytes:
Code:
--- Entry #0 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 80
Attributes: 2 (STL Read-Only)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 0
Partition Block Count: 2046
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOTLOADER
Flash Filename: sboot.bin
FOTA Filename:
Is that normal or does it mean the bootloader is locked? Sorry for my ignorance, don't have any experience flashing the bootloader.
Sorry I can't answer your questions but I'm also a non-windows user (Linux). To use the safer Odin I created a Windows VirtualBox VM with a Windows install iso I downloaded over the net. Subsequently it has been suggested by others that it would have been easier for my to have created a bootable usb. In any event you never have to activate the window license to use Odin just answer that pop-up by clicking later. I download the latest firmware (there is a firmware download tool thread in the general section), quickly and use Odin all in that VM.
I posted a how-to create such a VM in the general section but if doing it again I'd likely go the USB route but either way is likely safe than your current method.
Sent from my SM-T800 using XDA Premium HD app
You're lucky you even got Heimdall to connect on the tab s.
I've had zero success with it on either windows or Linux.
Stick with a VM as suggested. It takes literally a few minutes to set up.
https://dev.windows.com/en-us/microsoft-edge/tools/vms/linux/
Thanks for the advice. Heimdall on Linux previously worked well for me when I flashed TWRP on the same T705 a few months ago. This time though I'll try odin in a VM as you both suggest.
Got odin working. The VM was slightly problematic:
Couldn't get Virtualbox on Mac to work. VM couldn't see the tablet.
Under Linux, had to "modprobe -r cdc_acm" to get it to work, as described here
Even then, Odin was failing with a big red FAIL! message at the completion of the flash. Resorted to pirating Windows 7 and installing on a spare harddrive. Still got the Odin FAIL! So I think it was the files I was using. Would the slightly wrong version cause a flashing error? My tablet is an Australian T705Y and the images may have been for a different region.
Anyway, downloaded the complete official ROM from sammobile and that flashed fine using Odin. Then installed TWRP and now the Marshmallow ROM.
cr1key said:
Got odin working. The VM was slightly problematic:
Couldn't get Virtualbox on Mac to work. VM couldn't see the tablet.
Under Linux, had to "modprobe -r cdc_acm" to get it to work, as described here
Even then, Odin was failing with a big red FAIL! message at the completion of the flash. Resorted to pirating Windows 7 and installing on a spare harddrive. Still got the Odin FAIL! So I think it was the files I was using. Would the slightly wrong version cause a flashing error? My tablet is an Australian T705Y and the images may have been for a different region.
Anyway, downloaded the complete official ROM from sammobile and that flashed fine using Odin. Then installed TWRP and now the Marshmallow ROM.
Click to expand...
Click to collapse
yes I am curious how to flash only sboot.bin through odin (or any other means)
The heimdall command is at the top of the thread.
I never actually attempted the bootloader in odin. I tried flashing the modem (which I also had to update), but as that was failing I never progressed to the bootloader. For the modem I just used a tar file that contained modem.bin. Odin reads the PIT and figures out where which partition it should go in (in this case, RADIO). I expect it'd work for the bootloader too. The official ROM distributions are tar files containing *.bin files:
Code:
-rw-rw-r-- dpi/dpi 1148160 2015-10-23 00:29 sboot.bin
-rw-rw-r-- dpi/dpi 7592208 2015-10-23 00:29 boot.img
-rw-rw-r-- dpi/dpi 7803152 2015-10-23 00:29 recovery.img
-rw------- dpi/dpi 2313405472 2015-10-23 00:30 system.img
-rw-r--r-- dpi/dpi 40231200 2015-10-23 00:31 cache.img
-rw-r--r-- dpi/dpi 217281008 2015-10-23 00:31 hidden.img
-rw-rw-r-- dpi/dpi 28600832 2015-10-23 00:24 modem.bin
odin flashes each one in turn to the appropriate partition. Just use PDA to flash the tar file. Possibly you could use the BOOTLOADER (sometimes called just "BL") button, but I don't think it matters.

How to create a odin file without aboot

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.

booting custom kernel

SOLVED: I was using the G980F boot.img instead of G985F image. THANKS everyone
The device won't reboot if I unpack and repack the boot.img on S20
Did someone else here succeed in flashing a new boot.img ? THANKS
Code:
[email protected]:~/GS20_kernel_build$ unpackbootimg -i boot.img
BOARD_KERNEL_CMDLINE androidboot.hardware=exynos990
BOARD_KERNEL_BASE 10000000
BOARD_PAGE_SIZE 2048
[email protected]:~/GS20_kernel_build$ mkbootimg --kernel boot.img-zImage --ramdisk boot.img-ramdisk.gz -o boot_repacked.img
[email protected]:~/GS20_kernel_build$ heimdall flash --BOOT ./boot_repacked.img
[...]
Downloading device's PIT file...
PIT file download successful.
Uploading BOOT
100%
BOOT upload successful
Ending session...
Rebooting device...
modem__ said:
The device won't reboot if I unpack and repack the boot.img on S20
Did someone else here succeed in flashing a new boot.img ? THANKS
Code:
[email protected]:~/GS20_kernel_build$ unpackbootimg -i boot.img
BOARD_KERNEL_CMDLINE androidboot.hardware=exynos990
BOARD_KERNEL_BASE 10000000
BOARD_PAGE_SIZE 2048
[email protected]:~/GS20_kernel_build$ mkbootimg --kernel boot.img-zImage --ramdisk boot.img-ramdisk.gz -o boot_repacked.img
[email protected]:~/GS20_kernel_build$ heimdall flash --BOOT ./boot_repacked.img
[...]
Downloading device's PIT file...
PIT file download successful.
Uploading BOOT
100%
BOOT upload successful
Ending session...
Rebooting device...
Click to expand...
Click to collapse
You need to make a tar file containing the img and flash it with odin. You need a Windows computer for that. Linux won't do sadly
If you don't feel like making a flashable zip file you can just use dd to install it from within TWRP (via terminal on console or ADB) if you have that installed:
dd if=boot_repacked.img of=/dev/block/by-name/boot
No Windows/Odin required.
sjevtic said:
If you don't feel like making a flashable zip file you can just use dd to install it from within TWRP (via terminal on console or ADB) if you have that installed:
dd if=boot_repacked.img of=/dev/block/by-name/boot
No Windows/Odin required.
Click to expand...
Click to collapse
dd always scares me lol.
You sure this works with S20? Even Fastboot fllashing doesn't work so I doubt this will
JanBoyGamer23 said:
dd always scares me lol.
You sure this works with S20? Even Fastboot fllashing doesn't work so I doubt this will
Click to expand...
Click to collapse
My phone wouldn't boot last night after I tried flashing my own boot image and this was how I put the previous one back. It booted right up.

Categories

Resources