[Q] why don't ROMs come with the correct pit? - Galaxy S6 Q&A, Help & Troubleshooting

For instance I'm trying to flash stock from sammobile
G920FXXU1AOE3_G920FXEU1AODQ_XEU.tar
which contains
boot.img
cache.img
cm.bin
hidden.img
modem.bin
recovery.img
sboot.bin
system.img
odin fails as soon as it gets to a bin file
That's ok I can just remove the bin files and it installs fine.
my understanding is that it's failing because the partitions are not all the same size. So what? If the pit was there it wouldn't matter, it could repartition and everything would be hunky dory?
Why is the pit not there, and where do I get the correct one? 32Gb
ZEROFLTE_EUR_OPEN-sb256-128.zip
ZEROFLTE_EUR_OPEN-sb200.zip
ZEROFLTE_EUR_OPEN-sb.zip
ZEROFLTE_EUR_OPEN-HIDDEN100M.pit
also I can't grab/backup my current pit with
dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=580 skip=2176
because there is no mmcblk0

The TAR file is basically an archive. Just open it with WinRAR and delete cache.img and hidden.img from the archive.
You will be able to flash any firmware without the PIT file.

neflictus said:
The TAR file is basically an archive. Just open it with WinRAR and delete cache.img and hidden.img from the archive.
You will be able to flash any firmware without the PIT file.
Click to expand...
Click to collapse
'
How do remove these files? This doesn't seem possible? Regards

Related

[help]flashing on linux!

m on linux right now n i want to use odin for flashing firmware on my phone
any idea how can i flash my fone? any other workaround?
p.s. i tried installing wine but no benefit as i doesn't detect my fone , i also installed usb drivers still no luck
sachin sharma said:
m on linux right now n i want to use odin for flashing firmware on my phone
any idea how can i flash my fone? any other workaround?
p.s. i tried installing wine but no benefit as i doesn't detect my fone , i also installed usb drivers still no luck
Click to expand...
Click to collapse
Don't use wine for this kind of things.
Use heimdall.
Here a tutorial: http://forum.xda-developers.com/showthread.php?t=1496705
However I prefer to do this:
Code:
heimdall flash --pit latona_20110114.pit --primary-boot boot.bin --secondary-boot Sbl.bin --normal-boot normalboot.img --cache cache.rfs --modem modem.bin --param param.lfs --system system.rfs
(your /data partition is not touched)
loSconosciuto said:
Don't use wine for this kind of things.
Use heimdall.
Here a tutorial: http://forum.xda-developers.com/showthread.php?t=1496705
However I prefer to do this:
Code:
heimdall flash --pit latona_20110114.pit --primary-boot boot.bin --secondary-boot Sbl.bin --normal-boot normalboot.img --cache cache.rfs --modem modem.bin --param param.lfs --system system.rfs
(your /data partition is not touched)
Click to expand...
Click to collapse
thnx for poitning me to correct thread
earlier i was using heimindall from some other thread which was not working properly thnk u so much!!!

i9505 How-to install stock ROM using Heimdall under linux

OK! So, finally got this working. Thought I share how i did this...
I had previously installed CM 10.1, but wanted to try out the stock firmware (I9505XXUBMEA_I9505OXABMEA). As I do not have windows, I had to use Heimdall under Ubuntu 13.04 64-bits. As far as I know, there is no post on this for our device.
I will keep this simple. I did not succeed with Heimdall 1.3, but Heimdall 1.4 R1 worked fine (R2 untested).
In brief, I ran the following commands as root (given that heimdall executable is in the untarred folder of the firmware):
Code:
heimdall flash --APNHLOS NON-HLOS.bin
heimdall flash --ABOOT aboot.mbn
heimdall flash --BOOT boot.img
heimdall flash --HIDDEN hidden.img.ext4
heimdall flash --MDM modem.bin
heimdall flash --RECOVERY recovery.img
heimdall flash --RPM rpm.mbn
heimdall flash --SBL2 sbl2.mbn
heimdall flash --SBL3 sbl3.mbn
heimdall flash --SYSTEM system.img.ext4
heimdall flash --TZ tz.mbn
heimdall flash --CACHE cache.img.ext4
This will reboot the device multiple times, and can of course be done more elegantly in one simple command. However, this is how I did it.
The last command (CACHE) reboots the device into recovery (So recovery must be flashed first).
Flashing is fast, only minutes. No troubles or reflashes. Everything appears to work, including wifi and 4G.
Hope you will find this useful. Now...lets try Omega ROM 5.0....:laugh: (Ubuntu Touch coming up???)
A million thanks to Benjamin Dobell (http://www.glassechidna.com.au/) who wrote Heimdall!
Best regards,
I have tested this flashing stock ROM, CM, Omega 5/6, modems.
No reflashes, no problems.
Those having difficulties with wifi/LTE and having to reflash modem multiple times may want to check it out....
Only tested under Ubuntu 13.04 64. You need Heimdall 1.4R1 or later...
Problems with WiFi after upgrade???
For upgrading from Omega 5 to Omega 6 do this:
1. Flash Omega 6 from Recovery (I use Phil's, effortless, no wiping).
2. Put heimdall 1.4R1 (or later) into a seperate folder together with NON-HLOS.bin and modem.bin from the I9505XXUBMF4_modems.tar
3. Than boot i9505 into download mode and issue...
sudo heimdall flash --APNHLOS NON-HLOS.bin
Click to expand...
Click to collapse
4. This will automatically poweroff your device. Reboot into download mode and from terminal issue...
sudo ./heimdall flash --MDM modem.bin
Click to expand...
Click to collapse
5. This will poweroff your i9505. Fire it up and you are good to go!
Modems are flashed and Wifi works. Easy piecy...nice and clean...works at first shot!
How do you install Heimdall?
I tried downloading and using the .deb file, but it hangs when trying to flash firmware.
Ending session...
Re-attaching kernel driver...
Click to expand...
Click to collapse
After that, I uninstalled Heimdall and tried compiling from source. It gave an error when I tried flashing.
ERROR: Failed to access device. libusb error: 0
Click to expand...
Click to collapse
Ubuntu 13.04 64bit
I'm using 32-bits ubuntu.
Got msg.
Code:
flash --SYSTEM system.img.ext4
ERROR: Failed to open file "system.img.ext4"
How to fix this?
Did you also flash bootloader?
Sent from my GT-N7100 using Tapatalk 4 Beta
echo_rc said:
Did you also flash bootloader?
Sent from my GT-N7100 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Yes. All others stock files have flashed.
Also I recompile heimdall with -D_FILE_OFFSET_BITS=64
Code:
Session begun.
Downloading device's PIT file...
PIT file download successful.
Uploading SYSTEM
100%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: SYSTEM upload failed!
Ending session...
Rebooting device...
Releasing device interface...
Re-attaching kernel driver...
Thanks a lot for this info, managed to reflash my i9505 correctly in OSX with the latest release (4.3) XXUEMJ5 after trying odin under vmware and failing.
You could use this one line:
--APNHLOS NON-HLOS.bin --ABOOT aboot.mbn --BOOT boot.img --HIDDEN hidden.img.ext4 --MDM modem.bin --RECOVERY recovery.img --RPM rpm.mbn --SBL2 sbl2.mbn --SBL3 sbl3.mbn --SYSTEM system.img.ext4 --TZ tz.mbn --CACHE cache.img.ext4
svs57 said:
I'm using 32-bits ubuntu.
Got msg.
Code:
flash --SYSTEM system.img.ext4
ERROR: Failed to open file "system.img.ext4"
How to fix this?
Click to expand...
Click to collapse
I get the same error. I think I'm also running 32-bit. But I forgot.
lzk123 said:
How do you install Heimdall?
I tried downloading and using the .deb file, but it hangs when trying to flash firmware.
After that, I uninstalled Heimdall and tried compiling from source. It gave an error when I tried flashing.
Ubuntu 13.04 64bit
Click to expand...
Click to collapse
Hi I use mint 15 (13.04)
I went to the heimdall website and grabbed the latest amd64 deb files. I also installed the 32bit libraries from the ubuntu and mint depo's
Then installed the deb files.
I use sudo heimdall to do my flashes.
Does the hanging occur on your PC or just download mode?
lzk123 said:
How do you install Heimdall?
I tried downloading and using the .deb file, but it hangs when trying to flash firmware.
After that, I uninstalled Heimdall and tried compiling from source. It gave an error when I tried flashing.
Ubuntu 13.04 64bit
Click to expand...
Click to collapse
U need to have the "sudo" command in front because libusb requires root privilege.
so do this instead:
sudo heimdall flash --MDM blah blah blah
you are require to enter your username password
Just tried with Heimdall 1.4.0 on OS X (on i9505, stock 4.3) and it seems to have worked!
the one command for this is: heimdall flash --APNHLOS NON-HLOS.bin --ABOOT aboot.mbn --BOOT boot.img --HIDDEN hidden.img.ext4 --MDM modem.bin --RECOVERY recovery.img --RPM rpm.mbn --SBL2 sbl2.mbn --SBL3 sbl3.mbn --SYSTEM system.img.ext4 --TZ tz.mbn --CACHE cache.img.ext4
hope this helps someone
When I untar the stock firmware I don't see any bin files
9195XXUBML4_I9195O2UBMJ1_I9195XXUBML4_HOME.tar.md5
rpm.mbn system.img.ext4
aboot.mbn sbl1.mbn tz.mbn
boot.img sbl2.mbn
recovery.img sbl3.mbn
Only boot and recovery.img and some .mbn files
What am I missing?
9195XXUBML4_I9195O2UBMJ1_I9195XXUBML4_HOME.tar.md5
paamet said:
OK! So, finally got this working. Thought I share how i did this...
I had previously installed CM 10.1, but wanted to try out the stock firmware (I9505XXUBMEA_I9505OXABMEA). As I do not have windows, I had to use Heimdall under Ubuntu 13.04 64-bits. As far as I know, there is no post on this for our device.
I will keep this simple. I did not succeed with Heimdall 1.3, but Heimdall 1.4 R1 worked fine (R2 untested).
In brief, I ran the following commands as root (given that heimdall executable is in the untarred folder of the firmware):
Code:
heimdall flash --APNHLOS NON-HLOS.bin
heimdall flash --ABOOT aboot.mbn
heimdall flash --BOOT boot.img
heimdall flash --HIDDEN hidden.img.ext4
heimdall flash --MDM modem.bin
heimdall flash --RECOVERY recovery.img
heimdall flash --RPM rpm.mbn
heimdall flash --SBL2 sbl2.mbn
heimdall flash --SBL3 sbl3.mbn
heimdall flash --SYSTEM system.img.ext4
heimdall flash --TZ tz.mbn
heimdall flash --CACHE cache.img.ext4
This will reboot the device multiple times, and can of course be done more elegantly in one simple command. However, this is how I did it.
The last command (CACHE) reboots the device into recovery (So recovery must be flashed first).
Flashing is fast, only minutes. No troubles or reflashes. Everything appears to work, including wifi and 4G.
Hope you will find this useful. Now...lets try Omega ROM 5.0....:laugh: (Ubuntu Touch coming up???)
A million thanks to Benjamin Dobell (http://www.glassechidna.com.au/) who wrote Heimdall!
Best regards,
Click to expand...
Click to collapse
complience said:
When I untar the stock firmware I don't see any bin files
9195XXUBML4_I9195O2UBMJ1_I9195XXUBML4_HOME.tar.md5
rpm.mbn system.img.ext4
aboot.mbn sbl1.mbn tz.mbn
boot.img sbl2.mbn
recovery.img sbl3.mbn
Only boot and recovery.img and some .mbn files
What am I missing?
9195XXUBML4_I9195O2UBMJ1_I9195XXUBML4_HOME.tar.md5
Click to expand...
Click to collapse
Hello!
You don't have to worry. Flash it. In some packages it is like that. When I tried to flash Ace stock ROM, it was like that.
Code:
heimdall flash --ABOOT aboot.mbn --RECOVERY recovery.img --RPM rpm.mbn --SBL1 sbl1.mbn --SBL2 sbl2.mbn --SBL3 sbl3.mbn --SYSTEM system.img.ext4 --TZ tz.mbn
Use the above code to flash. For your own safety, re-check the code and also check whether every files are included in it.
Kindly,
MZ
Code:
$ sudo heimdall flash --pit s4pit.pit --APNHLOS NON-HLOS.bin --MDM modem.bin --SBL1 sbl1.mbn --SBL2 sbl2.mbn --SBL3 sbl3.mbn --ABOOT aboot.mbn --RPM rpm.mbn --TZ tz.mbn --SYSTEM system.img.ext4 --CACHE cache.img.ext4 --BOOT boot.img --RECOVERY recovery.img --HIDDEN hidden.img.ext4
ERROR: Failed to open file "system.img.ext4"
Guys what's wrong? I've just installed heimdall & heimdall-frontend from source (1.4.1), I'm trying to instal stock ROM on my i9505. I'm using Ubuntu 14, 32 bit. I cannot find any solution so far ..
kujawek said:
Code:
$ sudo heimdall flash --pit s4pit.pit --APNHLOS NON-HLOS.bin --MDM modem.bin --SBL1 sbl1.mbn --SBL2 sbl2.mbn --SBL3 sbl3.mbn --ABOOT aboot.mbn --RPM rpm.mbn --TZ tz.mbn --SYSTEM system.img.ext4 --CACHE cache.img.ext4 --BOOT boot.img --RECOVERY recovery.img --HIDDEN hidden.img.ext4
ERROR: Failed to open file "system.img.ext4"
Guys what's wrong? I've just installed heimdall & heimdall-frontend from source (1.4.1), I'm trying to instal stock ROM on my i9505. I'm using Ubuntu 14, 32 bit. I cannot find any solution so far ..
Click to expand...
Click to collapse
Hi kujawek! It is some problem with your system image of the stock ROM you downloaded. Try to re-download the stock ROM and do it again. Hope it works!
~~MZ~~
Muhammed Zakhir said:
Hi kujawek! It is some problem with your system image of the stock ROM you downloaded. Try to re-download the stock ROM and do it again. Hope it works!
~~MZ~~
Click to expand...
Click to collapse
I did it more than few times.
I've read somewhere that in latest Heimdall version it uses some different thing named "libusb" and that it's only possible to do it on Windows with heimdall 1.4.1.rc2 version. But it was easier for me to just use Odin on friend's computer
To install libusd on Linux Ubuntu :
Code:
Code:
sudo apt-get install libusb-dev
Upgrade:
Code:
sudo bash -c "apt-get update && apt-get upgrade"
~~MZ~~
Can I use Heimdall (the Mac OSX GUI) to flash a nandroid backup to my 9505?
In the nandroid there are all these files: boot.img, data.ext4.tar, recovery.img, system.ext4.tar - will this be the same as if I would restore the nandroid backup with CWM?
My phone doesnt start anymore and I tried a lot already, but CWM doesn't work anymore, so I look for a way to revive it.

How to extract sboot.bin from firmware or device?

Hi,
How can I extract the sboot.bin bootloader from the stock firmware or the device directly?
So I found out it's just in the zip file under the bootloader tar file. However, inside, there are 3 files in total - sboot.bin, param.bin and cm.bin. What do each of these do?

Flashing LineageOS -> stock: repartition fails

So I'm trying to restore a stock ROM on a G930F that had LineageOS on it. I got an EU version from Sammobile, and inferred the original partitions from strings in the PIT file. So I thought this heimdall commandline should do what I want, but it doesn't:
Code:
# heimdall flash --repartition --pit HEROLTE_EUR_OPEN_HIDDEN60M.pit \
--PARAM param.bin --BOOT boot.img --RECOVERY recovery.img --RADIO modem.bin \
--SYSTEM system.img --CACHE cache.img --HIDDEN hidden.img \
--CP_DEBUG modem_debug.bin
Heimdall v1.4.2
[blah, all fine so far]
Session begun.
Uploading PIT
ERROR: Failed to receive PIT file part response!
ERROR: PIT upload failed!
Ending session...
Rebooting device...
I've even skimmed heimdall's source around where that error message turns up, but to no avail. Somehow a packet isn't being sent by the phone and I have no clue why. Any ideas?
mbethke said:
So I'm trying to restore a stock ROM on a G930F that had LineageOS on it. I got an EU version from Sammobile, and inferred the original partitions from strings in the PIT file. So I thought this heimdall commandline should do what I want, but it doesn't:
Code:
# heimdall flash --repartition --pit HEROLTE_EUR_OPEN_HIDDEN60M.pit \
--PARAM param.bin --BOOT boot.img --RECOVERY recovery.img --RADIO modem.bin \
--SYSTEM system.img --CACHE cache.img --HIDDEN hidden.img \
--CP_DEBUG modem_debug.bin
Heimdall v1.4.2
[blah, all fine so far]
Session begun.
Uploading PIT
ERROR: Failed to receive PIT file part response!
ERROR: PIT upload failed!
Ending session...
Rebooting device...
I've even skimmed heimdall's source around where that error message turns up, but to no avail. Somehow a packet isn't being sent by the phone and I have no clue why. Any ideas?
Click to expand...
Click to collapse
Use a Windows PC and ODIN? (ODIN 3.12.7 for Nougat, 3.13.1 for Oreo)
*Detection* said:
Use a Windows PC and ODIN? (ODIN 3.12.7 for Nougat, 3.13.1 for Oreo)
Click to expand...
Click to collapse
Thanks, that did it indeed! I had actually tried Odin before but it turned out I had an old version, 3.12.7 works fine.
mbethke said:
Thanks, that did it indeed! I had actually tried Odin before but it turned out I had an old version, 3.12.7 works fine.
Click to expand...
Click to collapse
:good:

a750g deleted bootloader exynos

can anyone help with creating files for unbrick using MultiDownloader
1 BL1
2 Bl2.bin;
3 dram_el3mon.bin
4 dram_train.bin
5 epbl.bin
6 s-boot.bin
I uploaded sboot from firmware that was in the device
I also found boot1 and boot2 on YouTube for model a750f, should be the same since its a exynos 7885
eldon301 said:
can anyone help with creating files for unbrick using MultiDownloader
1 BL1
2 Bl2.bin;
3 dram_el3mon.bin
4 dram_train.bin
5 epbl.bin
6 s-boot.bin
I uploaded sboot from firmware that was in the device
I also found boot1 and boot2 on YouTube for model a750f, should be the same since its a exynos 7885
Click to expand...
Click to collapse
why you don't use heimdall and samloder for download original firmware tested on my SM-A750FN and I was angry theta this two programs saved my phone evrytime (one rule never flash **** on boot partitions use original fw. then you will be never Brik a phone.
use samloader like instructions
then flash in order one after another files in download mode on phone using himedall (download mode press both volume buttons and put cable in connected to pc) then use command to veryfite if device in developer mode is connected "add devices" then you use "adb reboot bootloader" then you downloads the pit file from phone to veryfite all partitions name on phone and files on computer for flash width heimadall, then flash original firmware
like me to extract original firmware on Mac OS (maybe on linux you must use other arguments for commands)
firmware to download on galaxyfirmware
for download mode press both volume buttons and put cable connected to pc
after download firmware you get it reddy for flash release firmware.zip width path of your zip
unzip -x *.zip ; rm -rf HOME_CSC* *.txt ; for f in *.md5; do tar xf $f; done && rm -rf *.md5 && unlz4 -dm *.lz4 && rm -rf *.lz4
Click to expand...
Click to collapse
then you flash it width heimdall
14 partitions in line order for flash
heimdall flash --BOOTLOADER sboot.bin --CM cm.bin --BOOT boot.img --RECOVERY recovery.img --SYSTEM system.img --VENDOR vendor.img --CACHE cache.img --ODM odm.img --OMR omr.img --HIDDEN hidden.img --RADIO modem.bin --PARAM param.bin --CP_DEBUG modem_debug.bin --USERDATA userdata.img
Click to expand...
Click to collapse

Categories

Resources