• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

i9505 How-to install stock ROM using Heimdall under linux

Search This thread

paamet

Senior Member
Sep 11, 2010
87
32
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,
 
Last edited:

paamet

Senior Member
Sep 11, 2010
87
32
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...
 
Last edited:

paamet

Senior Member
Sep 11, 2010
87
32
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
4. This will automatically poweroff your device. Reboot into download mode and from terminal issue...
sudo ./heimdall flash --MDM modem.bin
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!
 
Last edited:

svs57

Senior Member
Sep 4, 2012
445
52
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?
 
  • Like
Reactions: keulana

echo_rc

Senior Member
Jan 15, 2011
150
1
Did you also flash bootloader?

Sent from my GT-N7100 using Tapatalk 4 Beta
 

svs57

Senior Member
Sep 4, 2012
445
52
Did you also flash bootloader?

Sent from my GT-N7100 using Tapatalk 4 Beta
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...
 

jsolares

Senior Member
Feb 20, 2011
83
15
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
 
  • Like
Reactions: perosredo

dragon546

Senior Member
Sep 28, 2007
594
109
Essex
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


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?
 

vboyz103

Senior Member
Apr 9, 2006
878
138
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

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
 

djgalning

Member
Feb 8, 2011
29
8
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 :)
 
  • Like
Reactions: emottau

complience

Member
Oct 3, 2007
26
0
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

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,
 
Last edited:
Jul 5, 2014
31
10
Thrissur
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

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
 
Last edited:

kujawek

Member
Jan 3, 2015
23
0
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 ..
 
Jul 5, 2014
31
10
Thrissur
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 ..

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~~
 

kujawek

Member
Jan 3, 2015
23
0
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~~

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 ;)
 

francwalter

Senior Member
Nov 13, 2011
608
108
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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    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,
    1
    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?
    1
    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
    1
    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 :)
    1
    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~~