FORUMS
Remove All Ads from XDA

i9505 How-to install stock ROM using Heimdall under linux

87 posts
Thanks Meter: 32
 
By paamet, Member on 9th June 2013, 09:19 PM
Post Reply Email Thread
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.... (Ubuntu Touch coming up???)

A million thanks to Benjamin Dobell (http://www.glassechidna.com.au/) who wrote Heimdall!

Best regards,
The Following 8 Users Say Thank You to paamet For This Useful Post: [ View ] Gift paamet Ad-Free
 
 
22nd June 2013, 11:53 AM |#2  
OP Member
Thanks Meter: 32
 
More
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...
23rd June 2013, 12:30 AM |#3  
OP Member
Thanks Meter: 32
 
More
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...
Quote:

sudo heimdall flash --APNHLOS NON-HLOS.bin

4. This will automatically poweroff your device. Reboot into download mode and from terminal issue...
Quote:

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!
23rd June 2013, 04:52 AM |#4  
How do you install Heimdall?
I tried downloading and using the .deb file, but it hangs when trying to flash firmware.
Quote:

Ending session...
Re-attaching kernel driver...

After that, I uninstalled Heimdall and tried compiling from source. It gave an error when I tried flashing.
Quote:

ERROR: Failed to access device. libusb error: 0


Ubuntu 13.04 64bit
15th July 2013, 09:06 AM |#5  
Senior Member
Thanks Meter: 52
 
More
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?
The Following User Says Thank You to svs57 For This Useful Post: [ View ] Gift svs57 Ad-Free
15th July 2013, 09:28 AM |#6  
echo_rc's Avatar
Senior Member
Thanks Meter: 2
 
More
Did you also flash bootloader?

Sent from my GT-N7100 using Tapatalk 4 Beta
15th July 2013, 09:49 AM |#7  
Senior Member
Thanks Meter: 52
 
More
Quote:
Originally Posted by echo_rc

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...
19th October 2013, 04:54 PM |#8  
Member
Thanks Meter: 15
 
More
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
The Following User Says Thank You to jsolares For This Useful Post: [ View ] Gift jsolares Ad-Free
6th November 2013, 03:41 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by svs57

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?


I get the same error. I think I'm also running 32-bit. But I forgot.
6th November 2013, 08:49 PM |#10  
dragon546's Avatar
Senior Member
Flag Essex
Thanks Meter: 116
 
More
Quote:
Originally Posted by lzk123

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?
19th November 2013, 11:53 PM |#11  
Senior Member
Thanks Meter: 137
 
More
Quote:
Originally Posted by lzk123

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
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes