FORUMS
Remove All Ads from XDA

Heimdall Galaxy S4 I337 Full Recovery

18 posts
Thanks Meter: 18
 
By tom_callahan, Junior Member on 23rd July 2013, 02:32 AM
Post Reply Email Thread
I ran into a corrupted or unaccessible /data partition several times this week, and after searching, couldn't find any tutorials on using heimdall to completely reset the phone back to stock. So... below is my version. Please provide any input on this method, it's worked a couple times with no issues for me.

FILENAMES BELOW ARE FOR ATT PHONE, if you are not ATT, use the relevant files for your carrier.

Instructions here were done on a Mac, but the programs and commands are the same on any Operating System.

1) Download the tar.md5 firmware files from galaxys4root DOT com or any other site which has them. I used the I337UCUAMDL_I337ATTAMDL_ATT.zip file

2) Download and install heimdall latest. I can't post links yet, google heimdall and you should find the site to download it.

3) Unzip the I337UCUAMDL_I337ATTAMDL_ATT.zip file, and you should get a folder with a tar.md5 file in it.

4) Using 7zip or similar, extract the tar.md5 file. You have have to rename it to just .tar instead of .tar.md5 for this to work.

5) You will have several files now, some ext4.img, some .mbn, etc.

6) You will now reboot your phone into "ODIN" mode, by holding Volume Down when booting, just after the vibration. When prompted, hit Volume Up to begin download mode.

7) On your Mac, open up Terminal, and navigate to the location you extracted the tar.md5 files to

8) In Terminal, type the following in the below order. The phone will reboot between each, you will need to repeat step 6 for each reboot.
8a) sudo heimdall flash --RECOVERY recovery.img --SYSTEM system.img.ext4 --HIDDEN hidden.img.ext4 --BOOT boot.img
8b) sudo heimdall flash --MDM modem.bin --APNHLOS NON-HLOS.bin --ABOOT aboot.mbn --BOOT boot.img --TZ tz.mbn
8c) sudo heimdall flash --CACHE cache.img.ext4

9) When your phone reboots the last time, it may just sit on the Samsung screen and not do anything. If this happens, reboot the phone (hold down the side power button) and hold Volume Up to reboot into Recovery mode. Use volume up and down to navigate to factory reset, and the power button to select. This will reformat and clean up your data partition.

10) Reboot the phone and wait patiently. You will see all the familiar factory logos and boot into a fresh working factory firmware

Hope this helps, any questions don't hesitate to PM me.


===================WINDOWS VERSION, by popular request================================
Instructions here were done on a Windows 7 PC

1) Download the tar.md5 firmware files from galaxys4root DOT com or any other site which has them. I used the I337UCUAMDL_I337ATTAMDL_ATT.zip file

2) Download and install heimdall latest. I can't post links yet, google heimdall and you should find the site to download it.

3) Unzip the I337UCUAMDL_I337ATTAMDL_ATT.zip file, and you should get a folder with a tar.md5 file in it.

4) Using 7zip or similar, extract the tar.md5 file. You have have to rename it to just .tar instead of .tar.md5 for this to work.

5) You will have several files now, some ext4.img, some .mbn, etc.

6) You will now reboot your phone into "ODIN" mode, by holding Volume Down when booting, just after the vibration. When prompted, hit Volume Up to begin download mode.

7) On your PC, open up a Command Prompt (Click the "start" button, and type in cmd and hit enter), and navigate to the location you extracted the tar.md5 files to

8) In the command prompt, type the following in the below order. The phone will reboot between each, you will need to repeat step 6 for each reboot.
8a) heimdall flash --RECOVERY recovery.img --SYSTEM system.img.ext4 --HIDDEN hidden.img.ext4 --BOOT boot.img
8b) heimdall flash --MDM modem.bin --APNHLOS NON-HLOS.bin --ABOOT aboot.mbn --BOOT boot.img --TZ tz.mbn
8c) heimdall flash --CACHE cache.img.ext4

9) When your phone reboots the last time, it may just sit on the Samsung screen and not do anything. If this happens, reboot the phone (hold down the side power button) and hold Volume Up to reboot into Recovery mode. Use volume up and down to navigate to factory reset, and the power button to select. This will reformat and clean up your data partition.

10) Reboot the phone and wait patiently. You will see all the familiar factory logos and boot into a fresh working factory firmware
The Following 15 Users Say Thank You to tom_callahan For This Useful Post: [ View ] Gift tom_callahan Ad-Free
 
 
23rd July 2013, 02:56 AM |#2  
oak's Avatar
Senior Member
Flag Colorado
Thanks Meter: 371
 
More
Thanks for taking the time to do this. Provides an Odin - like option for Linux users like myself, and of course, Mac users too.

Sent from my GT-I9505G using xda premium
24th July 2013, 12:13 PM |#3  
InstigatorX's Avatar
Senior Member
Thanks Meter: 745
 
More
I'm getting...

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading RECOVERY
100%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: RECOVERY upload failed!

Ending session...
Rebooting device...
Releasing device interface...

...Any advice? It looks like its uploading, fails, and reboots phone back to download mode.
25th July 2013, 05:34 AM |#4  
Senior Member
Thanks Meter: 32
 
More
Encryption Failed everytime i reboot any fix?
Deleted
25th July 2013, 02:56 PM |#5  
rugmankc's Avatar
Senior Member
Flag Dayton, Ohio
Thanks Meter: 1,852
 
More
Interested in any solutions you guys found for your listed issues, as I have an iMac also--
25th July 2013, 02:59 PM |#6  
Monkz's Avatar
Senior Member
Flag Toronto
Thanks Meter: 90
 
More
Quote:
Originally Posted by tom_callahan

I ran into a corrupted or unaccessible /data partition several times this week, and after searching, couldn't find any tutorials on using heimdall to completely reset the phone back to stock. So... below is my version. Please provide any input on this method, it's worked a couple times with no issues for me.

FILENAMES BELOW ARE FOR ATT PHONE, if you are not ATT, use the relevant files for your carrier.

Instructions here were done on a Mac, but the programs and commands are the same on any Operating System.

1) Download the tar.md5 firmware files from galaxys4root DOT com or any other site which has them. I used the I337UCUAMDL_I337ATTAMDL_ATT.zip file

2) Download and install heimdall latest. I can't post links yet, google heimdall and you should find the site to download it.

3) Unzip the I337UCUAMDL_I337ATTAMDL_ATT.zip file, and you should get a folder with a tar.md5 file in it.

4) Using 7zip or similar, extract the tar.md5 file. You have have to rename it to just .tar instead of .tar.md5 for this to work.

5) You will have several files now, some ext4.img, some .mbn, etc.

6) You will now reboot your phone into "ODIN" mode, by holding Volume Down when booting, just after the vibration. When prompted, hit Volume Up to begin download mode.

7) On your Mac, open up Terminal, and navigate to the location you extracted the tar.md5 files to

8) In Terminal, type the following in the below order. The phone will reboot between each, you will need to repeat step 6 for each reboot.
8a) sudo heimdall flash --RECOVERY recovery.img --SYSTEM system.img.ext4 --HIDDEN hidden.img.ext4 --BOOT boot.img
8b) sudo heimdall flash --MDM modem.bin --APNHLOS NON-HLOS.bin --ABOOT aboot.mbn --BOOT boot.img --TZ tz.mbn
8c) sudo heimdall flash --CACHE cache.img.ext4

9) When your phone reboots the last time, it may just sit on the Samsung screen and not do anything. If this happens, reboot the phone (hold down the side power button) and hold Volume Up to reboot into Recovery mode. Use volume up and down to navigate to factory reset, and the power button to select. This will reformat and clean up your data partition.

10) Reboot the phone and wait patiently. You will see all the familiar factory logos and boot into a fresh working factory firmware

Hope this helps, any questions don't hesitate to PM me.

Im having that inaccessible /data partition and ODIN is not working for me. It flashes successfuly in ODIN, but upon boot it just hangs on the Samsung Galaxy S4 logo. When i go into the stock recovery, it shows the broken android and the cannot mount/data error. Its starting to become a real headache for me. I don't have a Mac tho, so i don't think your tool would work for me.
25th July 2013, 03:54 PM |#7  
mg2195's Avatar
Senior Member
Flag RSM
Thanks Meter: 2,610
 
Donate to Me
More
Quote:
Originally Posted by Monkz

Im having that inaccessible /data partition and ODIN is not working for me. It flashes successfuly in ODIN, but upon boot it just hangs on the Samsung Galaxy S4 logo. When i go into the stock recovery, it shows the broken android and the cannot mount/data error. Its starting to become a real headache for me. I don't have a Mac tho, so i don't think your tool would work for me.

Heimdall works on any platfork, mac/linux/windows...you just need java installed and your good to go, just use the command prompt instead of terminal. this was also stated in the op

You know...im surprised nobody has made a one click heimdal package yet...heimdal is so much better than odin imho

Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
25th July 2013, 04:24 PM |#8  
Monkz's Avatar
Senior Member
Flag Toronto
Thanks Meter: 90
 
More
Quote:
Originally Posted by mg2195

Heimdall works on any platfork, mac/linux/windows...you just need java installed and your good to go, just use the command prompt instead of terminal. this was also stated in the op

You know...im surprised nobody has made a one click heimdal package yet...heimdal is so much better than odin imho

Sent from my SAMSUNG-SGH-I337 using Tapatalk 2

I'm going to try this when i get home then. I just want my phone to come to life again. Crossing my fingers that this will work! Things were perfect, i don't know why restoring a nandroid and updating my kernel has caused this to become such a terrible issue.
25th July 2013, 06:19 PM |#9  
Senior Member
Flag Springfield, OH
Thanks Meter: 889
 
More
Seems to have worked. It's hung on the AT&T logo for a couple minutes though. How long after you did this did it take to boot up the first time? I'm afraid to pull the battery and screw something up.

---------- Post added at 01:19 PM ---------- Previous post was at 01:09 PM ----------

Never mind, I rebooted to recovery and factory reset just like you said in OP and now it's booted up to the setup screen. Thanks for this man. I really needed to return to stock and didn't want to have to install Windows just to run Odin. Much appreciated!
26th July 2013, 12:25 AM |#10  
OP Junior Member
Thanks Meter: 18
 
More
Try doing just hidden or system, and see if those flash correctly. If they do then come back after those and flash recovery

Sent from my SAMSUNG-SGH-I337 using xda app-developers app
26th July 2013, 01:26 AM |#11  
OP Junior Member
Thanks Meter: 18
 
More
Quote:
Originally Posted by housry23

Seems to have worked. It's hung on the AT&T logo for a couple minutes though. How long after you did this did it take to boot up the first time? I'm afraid to pull the battery and screw something up.

---------- Post added at 01:19 PM ---------- Previous post was at 01:09 PM ----------

Never mind, I rebooted to recovery and factory reset just like you said in OP and now it's booted up to the setup screen. Thanks for this man. I really needed to return to stock and didn't want to have to install Windows just to run Odin. Much appreciated!

Glad this worked for you, I was struggling to find a clear method to use heimdall to repair, which is exactly why I wanted to post help for any others.
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