New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Tip us?
 
bedwa
Old
bedwa's Avatar
Recognized Developer - OP
Thanks Meter 622
Posts: 1,038
Join Date: Oct 2008
Location: Springfield IL
Default [INFO] A short guide to Odin/Heimdal flashing and other helpful hints

I would post this in the Q&A or General section, but since those flashing something else than stock come most frequently to this section, I thought that I would post it here.

With that being said, here we go.

I am hoping to clear up the situations when you should just flash a kernel and when you fully re-stock your phone to get it to do what you need it to.

Materials needed:
Odin/Heimdal (search up there ^ & > ) you know where. You're not a noob right? :P
GTG's or other return to stock tar or zip.
Any working kernel with CWM (red is the norm here in the Infuse forum)
Your favorite rom/kernel/other additions.....

If you have a situation like our good friend ee23hd2 here, you need to know how to get out of it. The following information is what I've picked up during my time of having a Captivate and softbricking it frequently. (lost count, but my Infuse has only been softbricked a handful of times in comparison)

In the situation above, the best course of action would be to get any kernel (I keep a zImage of my 1.5 kernel [yes Froyo]) for just these situations) and put your phone into download mode (phone off, hold both vol keys and plug in USB) and flash a kernel onto the phone to be able to reach recovery. Then you may proceed with flashing whatever else you need.

The ONLY time you should need to fully restore your phone is if you have a situation like I did over the weekend... My phone did not recognize my internal SD (it would read it the first time, but then say it was not able to be recognized) and also if I unmounted ANY of my partitions in the mounts section, they would not remount. Situations like this are certain time to reflash to stock and even possibly repartition with appropriate pit as I did. I booted once to make sure that I was working, then I put it back into download mode, flashed one of my kernels onto it, went into recovery mode and went back to crackflashing.

As a review... Any bootloop can be solved in most circumstances with the following:

1. Pull battery,
2. Download Mode (hold both vol keys, plug in USB)
3. Flash ANY working CWM kernel
4. Flash your stuff back on the phone.

If this does not work, then
5. Repeat 1&2,
6. Flash back to stock.

I hope this has been of use to you.

P.S.: always useful commands for those who are ADB able, 'adb reboot recovery' and 'adb reboot download'
Former Devices: HTC Wizard-WM 6.5, OG iPhone, iPhone 3GS, 15+ android devices, including N1, Galaxy Nexus, Galaxy Tab 7.7 and many more.
Current Device: Moto xt910 w/ xt912 screen / S-off HTC One S

SIM Unlock: $16
Broken SIM locked XT910: $75
Working XT912: $200
Knowledge to dissasemble two phones and make one: Priceless.

Current Project(s)
Resources: Tab 7.7 Kernel/Initramfs
Kernels: Thrillz---Thrillz-GB---Infusion-GB---Infusion (Froyo)
No Odin? Flash a I897/I997 Kernel, Modem or both "zip packages!"
Red Nexus S LWP
LG Optimus Z Launcher

My Git.
My Twitter
Fuel my insanity fund, or click Thanks.
The Following User Says Thank You to bedwa For This Useful Post: [ Click to Expand ]
 
Entropy512
Old
(Last edited by Entropy512; 29th August 2011 at 05:24 PM.)
Elite Recognized Developer
Thanks Meter 21117
Posts: 11,602
Join Date: Aug 2007
Location: Owego, NY

 
DONATE TO ME
A few small comments/missing steps:

1) After Odining a kernel with working CWM, you need to do the following to enter CWM:
If phone is OFF:
Hold VolUp + VolDn + Power. Let go of Power once you see the Samsung logo. Continue to hold VolUp + VolDn for at least 5-10 seconds then let go. You should enter CWM when you let go.
If phone is ON and stuck at the Samsung logo:
Hold VolUp + VolDn + Power for 10-15 seconds, you should see the Samsung logo blink. Release power after 2-3 more seconds, continue holding VolUp + VolDn for another 5-10. If it fails try again or pull/reinsert battery then perform the Phone OFF steps - this can be a bit finicky.

2) The above steps only work if whatever you are flashing contains a correct kernel. Most full ROM ZIPs do, but just in case, try to find a kernel that is compatible with whatever you intend to flash.

3) Make sure to do a "Wipe Data/Factory Reset" in CWM after you flash your stuff.

Also note that if you're flashing TO Cyanogenmod 7, there are a few extra steps you need to perform from Orange CWM that are listed in the first post of his CM7 thread. These steps don't apply to people going between Samsung-derived ROMs.

The basic process for flashing a kernel with heimdall is as follows:
Code:
heimdall flash --kernel zImage
Google searching can help you with Heimdall installation - it's REALLY easy in Ubuntu, I think it's easy in Windows too but I can't help you there.

You can obtain zImage from the updates/ directory of whatever ROM ZIP you're trying to flash. If you're going for Hellraiser, use the zImage from Hellraiser, not from the Captivate/i9000 ROM.
*so much sig updating needed*

My Github profile - Some Android stuff, some AVR stuff

An excellent post on "noobs vs. developers"

A few opinions on kernel development "good practices"

Note: I have chosen not to use XDA's "friends" feature - I will reject all incoming "friend" requests.

Code:
<MikeyMike01> Smali is a spawn of hell
<shoman94> ^^^ +!
Code:
<Entropy512> gotta be careful not to step on each other's work.  :)
<Bumble-Bee> thats true
<jerdog> compeete for donations
The Following User Says Thank You to Entropy512 For This Useful Post: [ Click to Expand ]
 
Corvette Dave
Old
Corvette Dave's Avatar
Senior Member
Thanks Meter 38
Posts: 566
Join Date: Dec 2010
Location: Atlanta
Good Post!

Now comes the tricky step....

1. Please read and follow the directions above!!!!
Phones:
Galaxy Note II
Galaxy Note
Infuse
G1
Vibrant
Mytouch3g Slide
Mytouch4g
HTC Sensation
 
JordanElliott
Old
Account currently disabled
Thanks Meter 741
Posts: 2,810
Join Date: Jul 2011
Location: Wisconsin
Sticky and lock so no spam gets posted

Sent from my SGH-I997 using xda premium
Tags
heimdal, odin, tutorial