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!!!
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.
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
Hello,
I'm not able to build (repackage) correctly system.img for SM-G361F, output is always rejected by both Odin (10.3.7) and Heimdall
I'm trying to repackage (pre-root) system.img taken from "G361FXXU1APA2_G361FOXX1APA1_G361FXXU1APA2_HOME.tar.md5" (taken from ETL factory image named ETL-G361FXXU1APA2-20160202095551.zip )
Step-by-step:
1) tar xvf G361FXXU1APA2_G361FOXX1APA1_G361FXXU1APA2_HOME.tar.md5 system.img
2) simg2img system.img system.img.raw
3) mount system.img.raw /mnt
4) made changes
5a) make_ext4fs -s -g 32768 -b 4096 -T -1 -S file_contexts -f -l 1843M system.repack.img /mnt/
5b) mkuserimg.sh -s /mnt system.repack.img ext4 system 1843M file_contexts
6) tar --owner 0 --group 0 --numeric-owner -H ustar -c system.img > G361F_SYSTEM.tar
7a) Load either system.img through Heimdall (PIT file downloaded through Heimdall is here: http://forum.xda-developers.com/showpost.php?p=65779994&postcount=146 )
7b) Load G361F_SYSTEM.tar in Odin v3.10.7 in AP tab and flash it
On ODIN/Download screen I can see that
1) FRP LOCK: OFF
2) KNOX: 0x0
3) System status: official
4) RP SWREV: S1, L1, M1
Notes
1) I have checked the box "OEM Unlock" in Developers settings to enabled
2) "file_contexts" is taken from booted up device through ADB (adb pull /file_contexts)
3) I've tried repackage the image without making any changes
4) When I compare original and repackaged images ("ls -lsaR" outputs), it seems like owner:group permissions are not persisted
5) I've tried both simg2img/make_ext4fs/mkuserimg.sh from CM12.1 repository (up to date today) and from https://github.com/ASdev/android_img_repack_tools (branch android-5.1.1)
6) I'm not sure about size 1843M, however flashing fails in the same manner when I go with 1536M and 2048M and anything between those two
7) Heimdall fails at about 6% of flashing single (sparse system.img) file with error "Failed to unpack received packet"
OSS Kernel for SM-G361F is here: https://github.com/smarek/G361F-Kernel
OSS Platform for SM-G361F is here: https://github.com/smarek/G361F-Platform
Questions are:
1) Is there anything special to be aware of when building for Samsung devices?
2) Did I miss or misunderstood any step in system.img repackaging process?
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: