Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,729,054 Members 40,429 Now Online
XDA Developers Android and Mobile Development Forum

[VERY EASY GUIDE] ADB/FASTBOOT/RECOVORY *FULL GUIDE* for flashing ROMs, Kernels, APKs

Tip us?
 
uppon2
Old
#21  
uppon2's Avatar
Recognized Contributor - OP
Thanks Meter 1159
Posts: 2,573
Join Date: Oct 2010
Should this be moved to the development section like the other guides? I didn't want to create a thread in development because guides aren't development. However I feel like this will get lost in the general section due to the nature of the traffic.
The more you sweat in training the less you bleed in battle
 
Bigandrewgold
Old
#22  
Senior Member
Thanks Meter 531
Posts: 2,373
Join Date: Mar 2011
Default Re: [VERY EASY GUIDE] ADB/FASTBOOT/RECOVORY *FULL GUIDE* for flashing ROMs, Kernels,

Quote:
Originally Posted by adamjamess View Post
Dsb's cubed. The one recommended in your guide.

Sent from my HTC6435LVW using Tapatalk 2
You should update to the newest version of viper before reporting bugs.

Sent from my HTC6435LVW using xda app-developers app
The Following User Says Thank You to Bigandrewgold For This Useful Post: [ Click to Expand ]
 
jlevy73
Old
#23  
jlevy73's Avatar
Senior Member
Thanks Meter 1224
Posts: 9,124
Join Date: Nov 2009
Location: Los Angeles
Quote:
Originally Posted by uppon2 View Post
Should this be moved to the development section like the other guides? I didn't want to create a thread in development because guides aren't development. However I feel like this will get lost in the general section due to the nature of the traffic.
Probably not but you should PM one of the Mods to have it stickied. My 2 cents.
 
uppon2
Old
#24  
uppon2's Avatar
Recognized Contributor - OP
Thanks Meter 1159
Posts: 2,573
Join Date: Oct 2010
Quote:
Originally Posted by jlevy73 View Post
Probably not but you should PM one of the Mods to have it stickied. My 2 cents.
Done
The more you sweat in training the less you bleed in battle
 
joewspot
Old
#25  
Junior Member
Thanks Meter 0
Posts: 8
Join Date: Feb 2013
Unhappy Push

Quote:
Originally Posted by uppon2 View Post
This procedure is designed to be EXTREMELY EASY and for people using windows. Following this guide will give you the knowledge you need to use ADB and Recovery menus in order to flash all of the ROMs, Kernels and APK (apps) files that you want. I am not responsible if anything undersireable happens in this procedure that makes you sad, poo yourself or ends the world.

Even if you have accidentally formatted your internal storage and you have no files on your phone, this section is down the bottom of the thread. Only follow this if you have no access to your phone and have nothing installed on your sdcard. For everybody else simply follow from step 1.


WINDOWS DRIVERS

You will need the USB drivers for your phone to communicate with your computer. You can search around and get these drivers separately or if that is not possible then please download and install The HTC Sync Manager from here


UNLOCKING YOUR BOOTLOADER

Since the new method came out, it is ridiculously easy to unlock your bootloader now. If you haven't unlocked your bootloader than please visit this thread and follow the instructions. I found this video on youtube that will make this process easier for you too.


INSTALLING ADB/FASTBOOT (SDK) (Please read this even if you have already installed this)

I would recommend following the guide to install adb (sdk) I have included below. If you have already done this step then keep in mind you should always have sdk updated and to make life easier rename your 'platform-tools' folder to something easier, for example rename the folder to android-adb. Now copy the 'android-adb' folder to a convenient location on your PC e.g: root of the C: so it will now look like this c:\android-adb *If you're having trouble locating this folder it will usually be here c:android-sdk-windows\platform-tools or something along those lines* At this stage the Windows’s Path Environment Variables will now have to suit this change, which in this case is: ;C:\android-adb - If you would prefer to leave things as they are than so be it and continue reading.

If this is all sounding too hard than you really need to start again and follow the EASY!!!!!! guide below

Make sure you have SDK installed and updated. If you haven't already than follow this extremely easy guide


DOWNLOADING REQUIRED FILES FOR FLASHING

(Download the following items listed below)

1. CWM Recovery This is what you will be using ALL THE TIME to flash ROMs and Kernel Modules. There is an alternative recovery called TWRP which can be found here but I am not using that right now so for the purpose of this guide please use CWM unless you know how to use TWRP.

2. Your desired ROM I would 100% recommend ViperDNA from HERE if not you can grab a different one from HERE or HERE

3. You now need all required kernel files you are planning to use with the ROM you have selected. Now for the Droid DNA at the moment the kernel is broken down in to 2 parts. The first file is kernel modules and the second file is the the boot.img. Now whatever ROM you choose to download and install, it should already be using a specific kernel. When you flash a ROM the kernel modules will already be installed for the specific kernel the ROM is using.

For example If you listened to my advice and are going to use ViperDNA, this ROM already comes with the kernel modules required for the kernel it is using. The only thing that is left for you to do is download the second part of the kernel which is the boot.img file. Every kernel needs both the kernel modules and boot.img files to work 100% without fault, and every kernel has different modules and a boot.img that will only work for that specific kernel.

Each ROM should give you a download link for the required boot.img so just make sure to read the first few posts - If you are planning to use ViperDNA then it can be found on the first page post number 2 of the ViperDNA thread and it is named Stock DSB System Write Boot.img -

* If that wasn't already clear enough I would like to say that if you are download a complete kernel zip separately (which you can do) then you will get both files required. The first is the "already included in the ROM" kernel modules and the second file will be the boot.img - You can find all of the different kernels here - as you can see in this list the kernel included in ViperDNA is the one named "[KERNEL]Droid DNA Cubed Kernel Stock" - Once you have finished installing a ROM then I would recommend having a look at some different kernels if you want. Down the very bottom of this post I have included instructions on how to flash a kernel so please check it out.*

Now read this next part carefully. before doing anything else, I want you to prepare the files that you are going to be flashing with ADB.


PREPARING FILES FOR FLASHING

1. ** Using your computer, unzip your CWM Recovery zip and move the recovery.img to your platform-tools folder which you may or may not have renamed by now. this is where adb and fastboot.exe files are. for example If you have followed the guide I provided it will be c:\android-adb if not it will be whatever you have named it as, and wherever you have installed it to. Usually c:android-sdk-windows\platform-tools or something along those lines. I'm assuming by this stage you have changed the Windows’s Path Environment Variables, if not then you really should be following the very simple guide above!
(if you don't have a zip program, use this one)

2. ** Next I need you move the boot.img (for your kernel) to the same location you just moved your recovery.img (If you have followed my advice then you can get this file from the first page of the ViperDNA thread) if you didn't then the boot.img file might be on the first page of your desired ROM. *If you have downloaded the same kernel used in the ROM, but as a complete zip then you will need to unzip the kernel zip to access the boot.img and continue as above*.

Do not close the folder where you have copied these files, simply leave it open

3. ** Now connect your phone to a USB port. Sometimes it's best to stick to USB 2 rather than USB 3. Copy and paste the ROM.zip (Whatever the name of your ROM is, you don't need to rename it ) file that you want to flash over to your phone (make sure to not accidentally drop it in to an already existing folder) So as soon as you open the contents of your device it should be pasted right there - Once this is complete disconnect the phone and switch it off.

4. ** Boot your phone in to bootloader by holding down the "power button" and the "volume down" key at the same time until you see the bootloader screen on your phone. Now press the power button once to make sure you're in fastboot (If you don't your phone will not be found by ADB and will be constantly "waiting for device") - Now connect your phone to your computer again and continue reading

5. ** Back to your computer, while still in the same folder you have copied your recovery.img and boot.img I want you to hold the shift button at the same time as right clicking on a blank space inside the folder and click on "open command window here"


FLASHING YOUR FILES IN FASTBOOT

Now you are ready to flash your files. Starting with your recovery.img file and then followed by your kernels boot.img - In your command window type the following commands

1. ** To flash a recovery you will need to type**

fastboot flash recovery recovery.img

2. ** To flash your kernels boot.img you need to type**

fastboot flash boot boot.img

Before flashing the boot.img, you can in fact flash your ROM.zip with the instructions given below. However, it is strongly recommended to do it before you flash the boot.img. This is the standard procedure that should be used for every single ROM.


USING CWM FOR THE ROM INSTALLATION AND A CLEAN WIPING PROCEDURE

Go back to your phone and scroll down to where it says recovery and hit the power button. Your phone will now reboot in to CWM Recovery. (If you can't see the recovery option then you might be in the main bootloader menu screen, try pressing the power button once to change back to fastboot). Your phone should now reboot and display a white HTC screen and up the top it will read "Entering Recovery" - After it has finished you can now navigate through CWM Recovery by using the volume keys and pressing the power button to enter. Some versions of CWM you can also touch the screen to make selections. Lets begin

*WARNING* Although you don't have to, but if you do choose to use the recommended Step 3 which is found below, it will wipe all of your games and apps including saved game data and such. Don't worry all of your photos and music will be fine. Make sure to sync your contacts with your Google account**

1. Scroll down to -advanced and hit power, then do as follows
- wipe dalvik cache
-***go back***

2. Scroll down to -mounts and storage and hit power then:
-format system
-press your back key on the phone to go back

3. Scroll down to -wipe data/factory reset and hit the power button
"you can skip this process but it is a highly recommended one if you want less bugs in the ROM" (If you decide to skip make sure you you also -wipe cache partition which is in the same menu)

4. Scroll down to install zip from sdcard and hit power and then:
-choose zip from sdcard. (Locate your ROM.zip and hit power)
- Wait for this process to finish or follow on screen prompts from here on.
- go back to the main menu and reboot your device if it isn't already

This method will work with every other zip file that is flashable through CWM including kernel modules. You will not however need to follow all of the steps for wiping and such, simply just start from step 4

This is the end of my guide!. If you already have a ROM installed and you want to change the kernel, then scroll all the way to the bottom of this post
__________________________________________________ __________________________________________________ ______________________

*NOTE* KEEP SCROLLING DOWN IF YOU ARE LOOKING AT HOW TO FLASH A DIFFERENT KERNEL. THIS SECTION IS FOR PEOPLE WHO HAVE ACCIDENTALLY FORMATTED THEIR INTERAL STORAGE. OR FOR ANY OTHER RANDOM REASON YOU CAN'T USE A COMPUTER TO DROP AND DRAG FILES TO YOUR PHONE.

Place desired ROM, kernel modules, recovery files, or APK (apps) files inside the same folder your adb/fastboot.exe files. It's usually found here c:android-sdk-windows\platform-tools or something along those lines unless you have moved or renamed it. If you are having trouble then please follow the ADB installation guide I have listed at the beginning of this thread.

Now we are going to push these files depending on the file type by typing in commands:

adb push ROM.zip /sdcard/ROM.zip ***replace the word ROM with the exact name of the file you are pushing***

For example if you were using ViperDNA ROM you would type: adb push ViperDNA-version2.3.zip /sdcard/ViperDNA-version2.3.zip

And if it was a kernel (boot) file you would change the name respectively. For example: adb push cubedversion1000.boot/sdcard/cubedversion1000.boot


Now for applications such as games etc. You can either install the game directly or push the file to you phone to be installed later. Personally I always like to install from my phone so I always just push the file. But I will give you both options. ***To clarify if you are confused right now: adb push will copy any file to the phone, whereas adb install will only accept an apk file, and will install it onto the device***

To install an apk, it is quite simple, however it has a different path than what we have spoken about previously. The files will automatically push install themself in the correct area with your current installed apps .

If you want to install apps then you would type:
adb install apkfile
***For example if it is the game temple run, it would look like this: adb install templerun.apk

If you would prefer to manually install the game from your phone than you will need to push the file like we have mentioned already with the other file types:

adb push templerun.apk/sdcard/templerun.apk

Now remember if your phone is working correctly you can simply copy and paste all of these files directly to your phone and then flash in recovery for your ROMs or if you want to install apps you would then use a file explorer and locate the apk on your sdcard of the phone and then install it all from your phone. This was simply written for people that have no files on their sdcard due to accidental formatting of internal memory


INSTALLING ANOTHER KERNEL

If you have flashed a ROM and do want to use a kernel that isn't included with your ROM, then you can get another one from HERE Now this process is exactly the same as the stuff you have already done. Instead you will need to flash both of the kernel files included in the kernel zip file.

The first part is identical to what you did earlier. Move the boot.img file to the same place I mentioned earlier in this guide, and flash it the same way I mentioned in fastboot. This time the path will need to be changed because it is a boot file not a recovery file. So use this command: fastboot flash boot boot.img

In this second part move the kernel modules file to your phone and do exactly the same as you did in order to flash the ROM in CWM Recovery as mentioned earlier, only this time start from step 9 section 4.

That is all. Keep in mind things like wifi might not work if you forget to flash the kernel modules! - Just be sure it is always a 2 step process.

Alternatively there is this fantastic app by joeykrim that flashes both parts for you and you can do it all from your phone. I personally haven't used it a great deal but I'm sure it is perfect


*Credits*

nitsuj17 for the greatest ROM on our phone ViperDNA
Jailbreak Eye for the wonderful ADB guide
joeykrim for his fantastic app
DroidModd3rX for his video
dsb9938 for his awesome kernel work
jcase and beaups for their unlocking methods
htcdev.com for the unlocking
All of the fantastic developers for Android

PLEASE HELP I have been following directions but i cant push the files, it gives me a very long error message. i put all files, viperdna ROM 1.1.0.zip, cubed kernel , and recovery.img in the adb/fastboot file as you instructed. the recovery went right in over TWRP, im using CWM now. however when i look in 'chose zip from sd card' there is nothing there but TWRP its like my whole phone was erased. i think i did this accidentally with TWRP. Iam unlocked, with recovery but i have, im positive, i have a corrupt kernel and now i cant get a kernel in or the viper rom PLEASE HELP
 
uppon2
Old
(Last edited by uppon2; 12th February 2013 at 04:20 AM.)
#26  
uppon2's Avatar
Recognized Contributor - OP
Thanks Meter 1159
Posts: 2,573
Join Date: Oct 2010
Quote:
Originally Posted by joewspot View Post
PLEASE HELP I have been following directions but i cant push the files, it gives me a very long error message. i put all files, viperdna ROM 1.1.0.zip, cubed kernel , and recovery.img in the adb/fastboot file as you instructed. the recovery went right in over TWRP, im using CWM now. however when i look in 'chose zip from sd card' there is nothing there but TWRP its like my whole phone was erased. i think i did this accidentally with TWRP. Iam unlocked, with recovery but i have, im positive, i have a corrupt kernel and now i cant get a kernel in or the viper rom PLEASE HELP
I'm sorry to hear you are having problems. Do you have any other files on your phone to flash? If you want to try again then follow instructions below.

1. Phone in fastboot. Be sure you have pressed the power button once after entering the bootloader screen else you will not be in fastboot.

2. Make sure all files you are pushing are in the same folder on your computer, where your adb.exe and fastboot.exe files are. While inside this folder, hold down the SHIFT key then right click in a blank space and open command window here.

3. Type in command: adb remount then wait about 10 seconds then type adb devices. In most cases this will show up a serial number. If it doesn't continue anyway, then finally follow the instructions to push the file. adb push filename.zip /sdcard/ROM.zip ***replace the word filename.zip with the exact name and file type of the file you are pushing*** Make sure you have the correct file type entered. Like .img .recovery .zip etc

4. If that doesn't work then you might be able to sideload it from CWM Recovery. (I haven't used this feature a lot) - However, I will try to instruct you.

1. Make sure the ROM you want to flash is on your computer and in the same folder I mentioned above.

2. Make sure phone is booted in CWM Recovery , now scroll down to where you see install zip from sideload and click on the power button. It will return some text that should be asking you to continue with adb or something like that.

3. Go back to computer and make sure the ROM you are sideloading is in the same folder on your computer, where your adb.exe and fastboot.exe files are. While inside this folder, hold down the SHIFT key then right click in a blank space and open command window here

4. Type in this command: adb sideload ROM.zip (remember that you will need to replace ROM.zip with the EXACT name of the zip. For example: adb sideload viper1.1.2.3.1.zip (if that was in fact the name of the file)

I hope it works out for you, please remember to push thanks if I have helped you
The more you sweat in training the less you bleed in battle
The Following User Says Thank You to uppon2 For This Useful Post: [ Click to Expand ]
 
joewspot
Old
#27  
Junior Member
Thanks Meter 0
Posts: 8
Join Date: Feb 2013
Talking Help extreme noob at it again

Quote:
Originally Posted by uppon2 View Post
I'm sorry to hear you are having problems. Do you have any other files on your phone to flash? If you want to try again then follow instructions below.

1. Phone in fastboot. Be sure you have pressed the power button once after entering the bootloader screen else you will not be in fastboot.

2. Make sure all files you are pushing are in the same folder on your computer, where your adb.exe and fastboot.exe files are. While inside this folder, hold down the SHIFT key then right click in a blank space and open command window here.

3. Type in command: adb remount then wait about 10 seconds then type adb devices. In most cases this will show up a serial number. If it doesn't continue anyway, then finally follow the instructions to push the file. adb push filename.zip /sdcard/ROM.zip ***replace the word filename.zip with the exact name and file type of the file you are pushing*** Make sure you have the correct file type entered. Like .img .recovery .zip etc

4. If that doesn't work then you might be able to sideload it from CWM Recovery. (I haven't used this feature a lot) - However, I will try to instruct you.

1. Make sure the ROM you want to flash is on your computer and in the same folder I mentioned above.

2. Make sure phone is booted in CWM Recovery , now scroll down to where you see install zip from sideload and click on the power button. It will return some text that should be asking you to continue with adb or something like that.

3. Go back to computer and make sure the ROM you are sideloading is in the same folder on your computer, where your adb.exe and fastboot.exe files are. While inside this folder, hold down the SHIFT key then right click in a blank space and open command window here

4. Type in this command: adb sideload ROM.zip (remember that you will need to replace ROM.zip with the EXACT name of the zip. For example: adb sideload viper1.1.2.3.1.zip (if that was in fact the name of the file)

I hope it works out for you, please remember to push thanks if I have helped you
I know what erased, i went back to TWRP and found what i did it says format data, this wipes all internal storage including backups & removes encryption, thats the one i hit by mistake. How do i fix that????
 
uppon2
Old
#28  
uppon2's Avatar
Recognized Contributor - OP
Thanks Meter 1159
Posts: 2,573
Join Date: Oct 2010
Quote:
Originally Posted by joewspot View Post
I know what erased, i went back to TWRP and found what i did it says format data, this wipes all internal storage including backups & removes encryption, thats the one i hit by mistake. How do i fix that????
You follow the instructions I gave you in my previous post
The more you sweat in training the less you bleed in battle
 
joewspot
Old
#29  
Junior Member
Thanks Meter 0
Posts: 8
Join Date: Feb 2013
Unhappy Help extreme noob at it again

Quote:
Originally Posted by uppon2 View Post
You follow the instructions I gave you in my previous post
i did,when i do adb remount and adb devices says nothing found. also i have sideloaded viper and cubed modules. viper goes in but hangs, i also tried RC4 it sideloads but locks. think this phone is junk now
 
n8mack33
Old
(Last edited by n8mack33; 12th February 2013 at 09:45 PM.) Reason: question answered
#30  
Senior Member
Thanks Meter 5
Posts: 128
Join Date: Oct 2007
Thanks so much for the guide. I had a question about warranty but I found another thread where people were saying they didn't check and or you could relock (although it would say relocked) and be fine. Here was the method provided to relock:

If you want it back to factory anyway, do this:

1) Be sure to have ADB/fastboot installed.
2) Reboot into the bootloader (vol down + power when the device is off.)
2.5) Flash the Verizon system dump (a RUU executable) from d-h.st/lY5.
3) Navigate to your "platform-tools" directory in a command prompt or bash shell.
3.5) Type "adb reboot bootloader" if your phone restated.
4) Type "fastboot oem lock"
5) Your bootloader is now locked (note: your bootloader is not completely stock, because of jcase's hack.)
6) Type "fastboot reboot recovery" (or "adb reboot recovery" if your phone restated.)
7) Wipe your data or do a factory reset in the recovery.

Maybe you could put something about warranty and relocking in your guide?

The Following User Says Thank You to n8mack33 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes