Related
This will allow you to use adb and fastboot as if they were any other DOS command by typing them in a Command Prompt window from any directory.
Thanks to MERKJONES for giving me the idea... of course it only occurred to me after he mentioned it, that this would be quite useful for a lot of people besides ourselves
There are two ways of doing this.
#1
as per MERKJONES suggestion you can just add the files to your "windows/system32" directory.
#2
I like to keep my files organized in my own folders and be able to put them on any partition that I want. So to do this we just need to add the path of your folder containing adb and fastboot files to the windows Environment path.
IN XP/WINDOWS 7/VISTA
Right click on "my computer"
Left click on "properties"
Then.........
IN VISTA/WINDOWS 7 (this is an extra step for these two OS"s ignore this if you are using XP)
Click on "Advanced System Settings" in the left hand pane.
IN ALL WINDOWS
Make sure you are on the "Advanced" tab of the System Properties Panel.
Click on "Environment Variables" button.
Look for a line/variable that says "Path" in "System variables" pane.
Double click on "Path" to open a new window that should be say "Edit System Variable" or select the "Path" variable and click on the Edit Button.
Navigate to the end of the line/value and add
;path to files (where "path to files" is the location of your adb and fastboot files)
For example for me this is
;E:\AndroidFiles
So your path should look something like this
%SystemRoot%\system32;%SystemRoot%;E\AndroidFiles
Now reboot and you can open up a DOS Command Prompt window and use these programs in any directory you want by just typing them like any other DOS command.
Awesome.... I hope this can help some folks out
or as i have mentioned to MANY people in MANY threads, place the adb and fastboot in your system32 folder and you are good. but why should you use the search function when you can just post a new thread that says the same thing many other threads say
tubaking182 said:
or as i have mentioned to MANY people in MANY threads, place the adb and fastboot in your system32 folder and you are good. but why should you use the search function when you can just post a new thread that says the same thing many other threads say
Click to expand...
Click to collapse
LOL... Was thinking the same thing. This has been talked about over and over
PS... the "other" way of doing it I think was actually written by Stericson originally
momentarylapseofreason said:
LOL... Was thinking the same thing. This has been talked about over and over
PS... the "other" way of doing it I think was actually written by Stericson originally
Click to expand...
Click to collapse
You are right of course, I probably should have checked first... so no offense to anyone there are sooooo many threads to keep up with and a search can often bring up so many threads that is easy to miss something.
Actually I am sure that although Stericson may have also written it... he is far from the first person as it is really quite a common thing ... I just wanted to help let people know there was an easier way of doing things.
or as i have mentioned to MANY people in MANY threads, place the adb and fastboot in your system32 folder and you are good. but why should you use the search function when you can just post a new thread that says the same thing many other threads say
Click to expand...
Click to collapse
No offense.... but I personally don't like throwing file after file into my system32 folder as it can get messy... hence adding it to the Environment Path
Sometimes things can be repeated over and over and still get lost in a long thread... so I tried to make it more obvious for people to find the information
pixel-painter said:
You are right of course, I probably should have checked first... so no offense to anyone there are sooooo many threads to keep up with and a search can often bring up so many threads that is easy to miss something.
Actually I am sure that although Stericson may have also written it... he is far from the first person as it is really quite a common thing ... I just wanted to help let people know there was an easier way of doing things.
No offense.... but I personally don't like throwing file after file into my system32 folder as it can get messy... hence adding it to the Environment Path
Sometimes things can be repeated over and over and still get lost in a long thread... so I tried to make it more obvious for people to find the information
Click to expand...
Click to collapse
you dont have to put it in your system32 folder.
Put your backed up img files (all files from nandroid backup) in the same folder as fastboot, then open command-prompt
you then need to change directory to the location of the folder with this command
cd c:\where ever the fastboot folder is
(if its just in the c drive then the command would look like this)
cd c:\fastboot
enter, and you will then get
C:\fastboot>
then just type these commands.
fastboot flash system system.img
fastboot flash userdata data.img
fastboot flash boot boot.img
fastboot reboot
this is how i restore and have been doing it this way everytime no problems.
^^ Sorry but I think you missed the point entirely The idea is to avoid doing that so one can use the programs from any directory.
Both #1 and #2 are really just 2 different ways of accomplishing the same thing
hi im using 5.0.1H build and would like to have root terminal control back. all my commands come back permission denied. Fastboot works for me for nandroid but when i try to follow the instructions on gaining superuser i get this
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb push bin/s
u /system/bin
error: device not found
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb shell chmo
d 4755 /system/bin/su
error: device not found
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb uninstall
koushikdutta.superuser
- waiting for device -
what could i be doing wrong.
Hi,
Try doing:
adb devices see if your phone is recognized by the computer
adb remount enable read /write access
Now you can use your other commands.
maydaysos said:
hi im using 5.0.1H build and would like to have root terminal control back. all my commands come back permission denied. Fastboot works for me for nandroid but when i try to follow the instructions on gaining superuser i get this
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb push bin/s
u /system/bin
error: device not found
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb shell chmo
d 4755 /system/bin/su
error: device not found
C:\Documents and Settings\Owner.YOUR-D592011E4B\Desktop\Superuser>adb uninstall
koushikdutta.superuser
- waiting for device -
what could i be doing wrong.
Click to expand...
Click to collapse
I have compiled this guide from the other one posted on this forum, the discussion therein, and my own knowledge. If you have any suggestions on making it better or to correct any mistakes I may have made please let me know.
This guide is intended for Windows and includes detailed instructions. It will cover the steps necessary to root, flash the new recovery image, create a full backup. This will work with software versions 1.29.651.1 and 1.56.651.2 (aka Android 1.5). If you have updated to 2.1 please following this guide here. I am not responsible for any damage done to your phone using this guide. Root at your own risk.
I have put to together a video on YouTube for you to follow along as well. The version numbers of certain files are now outdated in the video so change file names as necessary.
If you own a non-Sprint Hero, you will need to do some extra steps. Follow the guide in the How to Root Non-Sprint CDMA Hero thread.
Step 1: Download the Android SDK from http://developer.android.com/sdk/index.html The Windows file is called android-sdk_r06-windows.zip. Extract the files to your C: drive so that you now have the folder C:\android-sdk-windows
Step 2: Download the asroot2 exploit file from http://forum.xda-developers.com/attachment.php?attachmentid=244212&d=1257621154 Extract asroot2.zip to C:\android-sdk-windows\tools folder.
Step 3: Download the Hero recovery image from http://forum.xda-developers.com/showpost.php?p=4898505&postcount=1g Place this file in C:\android-sdk-windows\tools as well.
Step 4: Make sure USB Debugging is off by going to Settings>Applications>Development. Now connect the phone to your PC via USB cable.
Step 5: Mount your sdcard; Browse to the HTC Sync folder and install HTC Sync on your pc. After it is done installing unmount the sdcard then enable your USB debugging.
Step 6: Open a command prompt by clicking the Start button and typing cmd into the search box and pressing enter or found under All Programs>Accessories.
Step 7: You will now enter a series of commands which I will place inside code boxes to indicate the entire command. You may copy and then paste them into the command prompt window by right clicking. Only enter one command at a time.
1:
Code:
cd C:\android-sdk-windows\tools
2:
Code:
adb devices
If you've been following this guide you will see your phone's serial number. If you get "device not found" error, you either need to make sure you the drivers were properly installed or make sure you enable USB debugging AFTER you connect the USB cable. Continue on once you get the proper phone serial output.
3:
Code:
adb push asroot2 /data/local/
4:
Code:
adb shell
5:
Code:
chmod 0755 /data/local/asroot2
6:
Code:
/data/local/asroot2 /system/bin/sh
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#Now for a few last commands.
7:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
8:
Code:
cd /system/bin
9:
Code:
cat sh > su
10:
Code:
chmod 4755 su
You are now officially rooted. A few more steps and you will have flashed the recovery image.
11:
Code:
exit
12:
Code:
exit
13:
Code:
adb push recovery-RA-heroc-v1.6.2.img /sdcard
Pushing is equivalent of copy the file to the root of your sdcard. By the time you finished reading this it should be done. You'll know its done because the ouput will say something like transferred X bytes in X secs.
14:
Code:
adb shell reboot
This will cause the phone to restart automatically. Wait till it is fully booted to continue.
15:
Code:
adb shell
16:
Code:
su
17:
Code:
cd /sdcard/
18:
Code:
flash_image recovery recovery-RA-heroc-v1.6.2.img
FLASHING TO THE RECOVERY TAKES SEVERAL SECONDS-- BE PATIENT. ENTER THE NEXT COMMAND ONLY AFTER THE COMMAND PROMPT RETURNS TO THE # (ROOT SYMBOL).
19:
Code:
reboot recovery
Step 8: This is the last command; you may now close the cmd prompt. This will cause your phone to boot into recovery mode; it should take no longer than 30 secs. The third option on the list is "- Backup/Restore"; select it. Now, select the first option "- Nand backup". The phone will prompt you to press HOME to confirm which is want you want to do. The backup will begin. You will see the screen say, "Performing backup : .........." When done, the bottom of the screen will say "Backup complete!" and you will be given the menu options again. Go back to the main menu and select reboot system. Rebooting your phone after installing the new recovery image may take several minutes.
Step 9: Once your phone is fully booted, mount the sdcard. You will see a folder called "nandroid"; I highly recommend you copy this to your pc in case you lose your sdcard data or reformat it. Your phone is rooted, 100% backed up, and ready to install a custom rom if you wish!
wow dude,
instructions worked great on Win7
i was able to download the missing usb_drivers by running SDK Setup in C:\android-sdk-windows, and selecting the usb driver from the available packages. I was unable to download the index for the SDK Setup program until I enabled "force http://" in the settings menu.
had to copy over asroot again after i ran SDK Setup (that program deleted it from the directory)
your instructions worked like a charm. total time spent rooting this thing after finding your post: 18 minutes.
(you might want to add a line there in the "mount and copy over the zip file step" to backup the nandroid folder from your SDCard to your comp just as a backup of your stock phone image)
anyway.. cheers!
izanagi said:
wow dude,
i'm about to follow these instructions. thank's for the precise list!
(btw, about to try it on Win7.. may have to change some folder pathing but we'll see)
okay.. typo on the first command in parentheses, and I'm missing the usb_drivers folder (do you have it / can sent it to me) so am unable to install the device in win7.
Click to expand...
Click to collapse
Heh, thanks for the misspell heads up. I did my rooting from Win7 pc; it automatically installed correct drivers for me. To check go to the Control Panel>View devices and printers. You see one device named "Android Phone". Otherwise as far as Ive heard installing HTC Sync installs proper drivers.
izanagi said:
*** edit had to copy over asroot again after i ran SDK Setup (that program deleted it from the directory)
**** edit: all done.. your instructions worked like a charm. total time spent rooting this thing after finding your post: 18 minutes.
(you might want to add a line there in the "mount and copy over the zip file step" to backup the nandroid folder from your SDCard to your comp just as a backup of your stock phone image)
anyway.. cheers!
Click to expand...
Click to collapse
Thank you for taking the time help make my guide better. I'm very glad to know there are little to no hiccups.
When I do step 5, instead of:
5. "/data/local/asroot2 /system/bin/sh"
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
I get:
[1] Killed /data/local/asroot2 /system/bin/sh
Any suggestions? Should I just be quiet until there is an Eris specific way to do this?
When I do step 5, instead of:
5. "/data/local/asroot2 /system/bin/sh"
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
I get:
[1] Killed /data/local/asroot2 /system/bin/sh
Any suggestions? Should I just be quiet until there is an Eris specific way to do this?
detox702 said:
When I do step 5, instead of:
5. "/data/local/asroot2 /system/bin/sh"
You should see an output that says:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
I get:
[1] Killed /data/local/asroot2 /system/bin/sh
Any suggestions? Should I just be quiet until there is an Eris specific way to do this?
Click to expand...
Click to collapse
This guide is for the CDMA Hero not the Eris!
When I go to apply the rom I get an white screen with skateboarding androids on the bottom and the prompt to erase data yes/no. I press the home key and the Hero reboots without asking to "Apply sdcard:choose zip". This is done from the boot menu. Does the rom load automatically? Did I do something wrong? I got root with no problem. A tip; to make it easier and to avoid spelling mistakes copy and paste the rooting commands from the instructions. Made it go faster too. Thanks in advance.
Never mind. I held down Home and Power at
the same time instead of Home THEN power! ARRGH! Loading up now as I type. Sorry.
ELIMINATED said:
When I go to apply the rom I get an white screen with skateboarding androids on the bottom and the prompt to erase data yes/no.
I press the home key and the Hero reboots without asking to "Apply sdcard:choose zip".This is done from the boot menu.
Does the rom load automatically? Did I do something wrong? I got root with no problem.
A tip; to make it easier and to avoid spelling mistakes copy and paste the rooting commands from the instructions. Made it go faster too. Thanks in advance.
Click to expand...
Click to collapse
yuck... break up your sentences, that's alot of crap to throw on someone all at once... and the bold doesn't help it any.
check to see if you have the custom recovery installed....
-turn off phone
-hold vol down + power
-should search for some stuff then give three options
-press "home" to enter recovery image
do you see "!" and a phone.... does it just hang or do you see a green/yellow menu?
At the end of his post he says he figured it out. He wasn't holding down home key
None of this is working for me at all... I'm not sure what I'm doing wrong, but every time I enter ANY of the commands into the prompt all I get is "cannot find the path specified".
For reference, i have done everything in this guide to the letter, everything is downloaded, unzipped to the correct location, USB drivers installed, etc etc. Not sure what's wrong.
EDIT: I figured it out.. user error, awesome. Worked great, thanks for this!
awesomeindeed said:
None of this is working for me at all... I'm not sure what I'm doing wrong, but every time I enter ANY of the commands into the prompt all I get is "cannot find the path specified".
For reference, i have done everything in this guide to the letter, everything is downloaded, unzipped to the correct location, USB drivers installed, etc etc. Not sure what's wrong.
EDIT: I figured it out.. user error, awesome. Worked great, thanks for this!
Click to expand...
Click to collapse
"cd C:\android-sdk-windows\tools" is actually "cd C:\android-sdk_r3-windows\tools"
is that where you are stuck?
thank you TS. I've been lurking xda for a couple years now when i had the mogul and tp. First time on an android device. Thank you for your time in helping me.
someone buy this man a drink!!!
Invaluable piece of work right here, helped me get it done in no time at all....real clear concise and very helpful....REQUEST THIS BE A STICKY!!!!!
fenske09 said:
"cd C:\android-sdk-windows\tools" is actually "cd C:\android-sdk_r3-windows\tools"
is that where you are stuck?
Click to expand...
Click to collapse
That was the name of the zip file not the extracted folder.
Please help, I followed all of your instructions, I received no errors however I can't boot the recovery image. I checked and it is in the sd card, but every time it just hangs at the HTC logo
I downloaded a terminal emulator and typed su and it gave me # so I assuming I am rooted?!
newtodroid said:
Please help, I followed all of your instructions, I received no errors however I can't boot the recovery image. I checked and it is in the sd card, but every time it just hangs at the HTC logo
I downloaded a terminal emulator and typed su and it gave me # so I assuming I am rooted?!
Click to expand...
Click to collapse
Redownload the recovery image and reflash it. The one you're using probably became corrupt during DL or something.
theresthatguy said:
Redownload the recovery image and reflash it. The one you're using probably became corrupt during DL or something.
Click to expand...
Click to collapse
also make sure you have the heroc version there's a hero and heroC, i messed that up once and had similar results
new ROM
So i loaded the custom ROM, and i followed all the istructions as listed on this guide. When i rebooted my phone, a bunch of my apps started Force Closing on startup.
did i miss something, or do something wrong?
if i reinstall them on the new ROM will they work right?
thanks for any insight
kristaps said:
So i loaded the custom ROM, and i followed all the istructions as listed on this guide. When i rebooted my phone, a bunch of my apps started Force Closing on startup.
did i miss something, or do something wrong?
if i reinstall them on the new ROM will they work right?
thanks for any insight
Click to expand...
Click to collapse
you converted your sd card to fat32,ext2,swap and now the apps are looking for the program on your sd card,
turn off your phone
take out sd card
turn on phone
uninstall app
turn off phone
put in sd card
turn on phone
reinstall app
this should fix you
Please note, this is NOT my own work. It's on the CM Wiki, but since so many people seem to not want to be bothered to read the damn wikis for their intended purpose, I'm going to be a ratbastard enabler and post the steps HERE in a thread, so next time someone goes to post to ask how, IF they use the search function they'll find THIS thread and not threadnaught this forum with questions about how to do it.
This has been tested and works 100%. I have not tried it for CM6, and I don't suggest anyone try it on a 911 patched Rogers Dream until CM6 is stable AND there's a proper kernel image for Dream/Magic 32A/32B. As usual, I hold no responsibility if this bricks your Dream. I have made ROMs for the Raphael, Rhodium, Topaz, and Kaiser, and am an expert on those devices but this is my first actual Android device that I've had for less than a week, and just rooted/flashed it today, so I am NOT an Android expert AT ALL.
Original Guide: Here!
(Note: This guide is for CM5)
Step 1) Download all of the required software. SDK, Fastboot, Exploid from DroidXRoot, SPL 1.33.2005, Amon_Ra Recovery for CM, CM5 Itself, Googleapps, and extra kernel for Rogers Dream.
Step 2) Install extract the SDK archive and rename it to 'sdk' for easier use. In Windows, extract to C:\sdk, linux ~/home/sdk, mac .. wherever you want. Extract the Fastboot.zip to the sdk/tools folder. Move exploid, SPL, and Recovery to sdk/tools for easier use with adb.
Step 3) On your Dream, go to Settings->Applications->Development and enable USB Debugging, and connect your Dream to your computer via USB cable.
Step 4) Enter your sdk/tools directory and type the following:
Code:
* adb push spl-signed.zip /sdcard/1_33_2005_spl.zip
* adb push update-cm5* /sdcard/update-cm5*
* adb push gapps-ds-ERE36B-signed.zip /sdcard/gapps-ds-ERE36B-signed.zip
* adb push bc-5.0.x-ebi1-signed.zip /sdcard/bc-5.0.x-ebi1-signed.zip
* adb push recovery-RA-dream-v1.7.0R-cyan.img /data/local
* adb push exploid /sqlite_stmt_journals
* adb shell chmod 777 /sqlite_stmt_journals/exploid
(*whatever your CM image is.)
Step 5) Running Exploid!
Code:
adb shell /sqlite_stmt_journals/exploid
should produce the following:
Code:
$ adb shell /sqlite_stmt_journals/exploid
[*] Android local root exploid (C) The Android Exploid Crew
[*] Modified by birdman for the DroidX
[+] Using basedir=/sqlite_stmt_journals, path=/sqlite_stmt_journals/exploid
[+] opening NETLINK_KOBJECT_UEVENT socket
[+] sending add message ...
[*] Try to invoke hotplug now, clicking at the wireless
[*] settings, plugin USB key etc.
[*] You succeeded if you find /system/bin/rootshell.
[*] GUI might hang/restart meanwhile so be patient.
Now unplug/replug USB cable to apply exploit. ROOOOOTED!
Step 6) Custom Recovery time!
Type the following:
Code:
adb shell
this will take you to a $ prompt (that's the shell.)
Code:
rootshell
this will ask for a password, which is 'secretlol' without quotes.
Now that you're at a root shell, type
Code:
chmod 666 /dev/mtd/mtd1
exit
Now you're back at the regular shell prompt, type:
Code:
flash_image recovery /data/local/recovery-RA-dream-v1.7.0R-cyan.img
If this gives a "mtd: read error at 0x00000000 (Out of memory)" error, it's okay, just type it again and it should work without the error. This is normal, do not panic.
Once this is complete, type
Code:
exit
and power down the phone. (long hold end key)
Step 7) SPL
Hold Home and press the End key to power up the Dream. At the recovery menu select
Code:
Flash Zip from SDCARD
and select the
Code:
1_33_2005_spl.zip
.
Now reboot by holding home+back. It will take you back to the recovery shell, and this is okay. This is actually what we want. Now, type
Code:
adb shell reboot bootloader
and watch the screen to verify that you see:
Code:
HBOOT: 1.33.2005
RADIO: 3.22.26.17
Now, run the following Fastboot commands:
Code:
fastboot erase system -w
fastboot erase boot
fastboot oem powerdown
Step 8) Flashing CM!
Press home+end to power up the phone in recovery mode, and select
Code:
Flash Zip from SDCARD
, Select your CM image, then
Code:
Flash Zip from SDCARD
and select gapps-ds-ERE36B-signed.zip, and finally
Code:
Flash Zip from SDCARD
and select bc-5.0.x-ebi1-signed.zip.
Once that is complete, home+back to reboot, and you're done. That's it. First CM boot may take 5-15 mins.
Reserved for updates
Click to expand...
Click to collapse
Time for the update!
CyanogenMod6rc3
EBI1 Kernel for CM6rc3
Google Apps, Mdpi Tiny for CM6
Use these the same way you would in the above steps for flashing CM5, obviously replacing the zip files from CM5 with the ones from CM6 during the adb push, and the flashing from zip in recovery console. This should work exactly the same as the above version, but the end result is that you'll have FroYo instead of Eclair.
I waited until RC3 for this update because, in my opinion, RC2 was a bit laggy and overall wasn't as stable.
Also note: This process will work for roms OTHER than CyanogenMod so long as they're either based on CM or have an EBI1 Kernel available. Make sure you use the correct EBI1 Kernel by checking what gapps version the Rom uses if it's CM-based but doesn't link to an EBI1 Kernel. For example, if it's gapps-mdpi-FRF91-3 then it's the CM6rc2 EBI1 Kernel you need.
Any questions? Post 'em here.
Thanks for posting this. I know some people got confused.
I highly recommend people also look at the pre existing thread: http://forum.xda-developers.com/showthread.php?p=7306638#post7306638 if they have questions as that is where the q/a is at.
ezterry said:
I highly recommend people also look at the pre existing thread: http://forum.xda-developers.com/showthread.php?p=7306638#post7306638 if they have questions as that is where the q/a is at.
Click to expand...
Click to collapse
The difference is your thread is a vague shortened process that assumes people are going to follow all the links in your post and read through pages of comments to figure out the exact steps of your "simplified process", where my thread gives them a one-stop-shop from stock to a stable rom. You've linked to your thread, so now people who don't mind looking around then posting tons of questions have their place to go.
Tl;dr version: this thread is for the people who can barely be bothered to use the search function and want everything in one place, your thread is for "everyone else".
Sent from my HTC Dream using XDA App
agentfusion said:
The difference is your thread is a vague shortened process that assumes people are going to follow all the links in your post and read through pages of comments to figure out the exact steps of your "simplified process", where my thread gives them a one-stop-shop from stock to a stable rom. You've linked to your thread, so now people who don't mind looking around then posting tons of questions have their place to go.
Tl;dr version: this thread is for the people who can barely be bothered to use the search function and want everything in one place, your thread is for "everyone else".
Sent from my HTC Dream using XDA App
Click to expand...
Click to collapse
Don't worry I'm following this thread so *I* don't inadvertently support people who don't follow links.
It just sucks that people really are that lazy. Seriously. They waste more time typing a question that has been answered 20 times than it would take to search for the proper answer.
So yeah, thanks for posting a topic that has a lot of great information for those of us who aren't lazy, I do personally like yours and think it should be in the informative links sticky. I just wish I had found yours first while I was searching for my answers because it really is informative for those of us not afraid to read and not have things spoonfed to them.
Sent from my HTC Dream [CM5] with xda app.
Thanks for the How-To. It was very easy to follow.
AverageCanadian said:
Thanks for the How-To. It was very easy to follow.
Click to expand...
Click to collapse
No problem! Glad you found it useful. All of those steps now work for CM6, so I will be adding links for CM6rc3 later tonight
Sent from my HTC Dream using XDA App on CM6rc3
update bump.
Tks for the guide. Total newbie here and trying to root my HTC Dream.
Up to now, i fallowed WIKI loll to the letter, tho, when i try to download the EXPLOID, either from your link or the WIKI one, it pup's out as a TROJAN program Exploit.Linux.Lotoor.e !
Is it safe to get it or i shouldn't go there???
I'm stuck to this step now and not sure what to do
Tks for the info..
Wood's said:
Tks for the guide. Total newbie here and trying to root my HTC Dream.
Up to now, i fallowed WIKI loll to the letter, tho, when i try to download the EXPLOID, either from your link or the WIKI one, it pup's out as a TROJAN program Exploit.Linux.Lotoor.e !
Is it safe to get it or i shouldn't go there???
I'm stuck to this step now and not sure what to do
Tks for the info..
Click to expand...
Click to collapse
To the best of my knowledge, it comes up as a trojan because it's a rootkit for Android, which is based on Linux... so virus scanners will consider Exploid as a "virus/trojan" because using a rootkit on a linux machine is basically using a trojan to get root access, which is what you're doing to your phone.. you're using an exploit to get root access.
DO NOT POST IN THIS THREAD BEFORE READING THE WHOLE POST
PLEASE ADD GUIDES TO COMMON ISSUES YOURSELVES
To my recollection, the previous WM Guides thread was successful.. so we'll be moving on to android as well - from beginner to pro.
I hope this thread will provide answers to a decent percentage of your questions.
Please hold until guide collecting is finished..
In the meanwhile you are ALL invited to send me links or full guides to add to this thread.. remember, we are all about sharing.
COMING SOON! (in the meanwhile, you've got a great battery life guide at http://forum.xda-developers.com/showthread.php?t=471521 - be sure to thank BruceElliot for it!)
also, if you decide to post a guide, please keep the guide as neat as possible, with a title containing the LEVEL ([BEGINNER], [INTERMEDIATE], [PRO]) and the commonly searched words so that people who look for it can find it easily. (if you can, use the same color (dark orange) and same size (4) and Bold.. for the main title.. tho that's not a must )
post #2. [BEGINNERS+INTERMEDIATE] Replacing System Files using Android Commander
post #3. [EVERYONE] ADB Workshop by Adrynalyne and Guide by Captainkrtek
post #4. [QUICK FAQ's] Common QnA's for beginners by Timmymarsh (work in progress)
[BEGINNERS] Replacing system files using Android Commander
Replacing system files using Android Commander:
(This post was formally based in the HD2's RTL support thread and revolved around our need to replace frameworks)
so:
1. Download the android SDK from: http://dl.google.com/android/android...08-windows.zip
2. EXTRACT(!!!) the android-sdk-windows to c:\
(make sure you extract the dir - not run the setup from inside the zip file)
3. install Android Commander from http://androidcommander.com
4. Connect your device and make sure it's set to Debugging mode in /settings/applications/development/
5. You might have to set a dir containing your adb.exe file. set it to c:\android-sdk-windows\tools\
6. You will see a Total Commander-like interface. you can then copy the framework.jar file to the correct directory (there's no difference between SD android builds and androids in ROM - the system dir will be shown the same way)
a. Yes, you can replace/delete system files while android is running.
b. (for androids running from SD) Any file copied to /sdcard/android/root/system/X will be copied to /system/X in the system file. The sdcard/android root dir is JUST LIKE your root in ROM androids.
c. Make sure you either created a backup or verified a match in any other way before replacing files like frameworks, zimage, modules, etc.. your android might not boot afterwards (I keep all system.ext2 files backed up so that i can restore them incase i screw something up.)
enjoy
[EVERYONE] ADB Workshop by Adrynalyne and Guide by Captainkrtek
This following guide was rewritten by Captainkrtek, please make sure to thank him for it
Original Post:
(http://forum.xda-developers.com/showthread.php?t=879701)
This workshop was held in #android-learning on irc.freenode.net by XDA Member Adrynalyne. All credit to him for this guide, I simply am taking it and turning it into a guide. Here we go!
You can find the raw IRC log here
Good evening folks, and welcome to my ADB workshop. This is by no means a full explanation on the subject, but more of a crash course to help folks get up to speed, and get more from their devices. There may be some things you already know here, so please be patient and respect those who do not.
Reference Files
http://adrynalyne.us/files/How to install adb.pdf
http://adrynalyne.us/files/Using ADB.pdf
So, lets just start with the basics.
What is ADB?
ADB stands for the android debugging bridge and is used for testing and debugging purposes by developers.
However, we like to get more out of our devices, and its a great way to fix things.
Knowing adb can mean the difference between a paperweight and a working phone.
So, to start with, we will look at installing ADB.
Generally speaking, the Sun/Oracle JDK is required to run all SDK functions.
ADB is but one tool in the SDK arsenal.
So, we begin by downloading and installing the JDK. This can be found here:
https://cds.sun.com/is-bin/[email protected]_Developer
Choose your OS, download and install. I recommend that 64 bit users use the regular x86/32 bit version as well.
Moving ahead, we download the Windows sdk from here:
http://dl.google.com/android/installer_r08-windows.exe
Due to already installing JDK, you won't be stopped by the install process.
Now, if you notice, I installed it to:
C:\android-sdk-windows
I did this because it makes things easier when setting up path variables.
I encourage everyone to do the same, but obviously it is not required.
So, this SDK is handy, but is only good up to 2.2. We want the latest and greatest! (Well I do)
So, we navigate to:
C:\android-sdk-windows\
and we run SDK Manager.exe
If you notice in your PDF file for installing adb, you will notice that you can update, and I made a choice not to include earlier sdk versions.
I won't go into full detail on that, but depending on the version of SDK you have, 8 or 9, it WILL make a difference in using adb.
By default, for version 8 adb.exe resides in C:\android-sdk-windows\tools
By default, for version 9 adb.exe resides in C:\android-sdk-windows\platform-tools
We will assume version 9 in this guide
Really, the SDK is installed and adb is usable right now, but in my humble opinion, its not enough
I like the ability to use adb in ANY directory on my machine.
To do this, we edit Windows's environment variables.
Specifically, the system path.
To do this, we click on start, or the orb (depending on OS), and right click on Computer, left clicking on properties in the menu.
If its windows XP, I believe it brings you into advanced system properties immediatly. Vista and 7 need a second step.
On the left hand side, as you notice I have highlighted in the pdf, left click advanced system settings.
Under advanced tab, we left click environment variables...
There are two boxes here.
We are concerned with system variables, however.
So we scroll down the list and highlight path and click edit.
Ignoring all the extra stuff in here, make sure you are at the end of the line, and type
Code:
;C:\android-sdk-windows\platform-tools
The semicolon allows us to separate it
from the previous path statement.
Click ok all the way out.
We now have ADB setup globally. We can use cmd.exe (I use powershell) and no matter what directory we are in, adb is recognized.
If it is not, make certain you entered the path into system variables, and made no typos.
If you installed to a different location, you will need to adjust the path accordingly.
This concludes the section on installing the Android SDK to use ADB.
This next section will be on using ADB, so please open that pdf now.
Now, this applies to any OS, not just Windows.
Well, with the exception of the USB drivers.
I will not go too much into that, but if you take a look at the PDF, it goes through installing usb drivers for the sdk, and how to download them.
Fiarly straightforward, in that rspect.
Now, to setup our phones to use with the SDK and ADB, we must change some settings.
First, we go to menu softkey, then settings.
We scroll down to Applications and tap it.
Under Development, we will check Enable USB Debugging. Please note the SGS phones are different in this respect.
The USB cable must be unplugged before enabling or disabling this setting.
Once this is done, we are now ready to play with adb
One quick note: If you get device not found/conencted, please reboot your phone. DJ05 has a quirk in it where ADBD randomly crashes on boot.
A reboot will fix this
ADBD= ADB Daemon
Ok, continuing on.
Lets look at installing applications. This is also known as sideloading.
Unlike installing from the SD card, it does not require unknown sources to be enabled.
The command for this is
Code:
adb install packagename
This assumes that you are working from the directory where the file is located.
This will install the application to /data/app.
It will also show sometimes useful errors if install fails.
That is not something you will see from the Android GUI.
Now, a lot of us have probably deleted files with apps like Root Explorer. While this isn't really a bad thing, it leaves behind databases and data for the application removed.
This is where the 0kb applicaiton entries come from.
If you take that application entry name, you can uninstall the extra data via adb.
First we go to the adb shell which logs into the phone.
Code:
adb shell
If we end up with a $, we will want admin rights, in many cases. This is not one of them, I don't beleive.
To get admin rights, you want to type
Code:
su
Look at your phone if this is the first time, it may prompt you to allow access. Else you will get permission denied.
If you are not rooted, this will not work either.
Ok, now that we are logged in, we will type
Code:
pm uninstall packagename
where packagename is the name of the 0kb listing.
Now this seems like a pain in the a** and I agree.
HOWEVER
There will be a time where Manage applications crashes when you try to uninstall it from the phone. In this case, a factory reset, or this method is the only effective way to fix the problem.
Moving on.
How many of us have removed system applications or renamed them? Did you know that you can simply disable them from the system?
Code:
adb shell
su
pm disable appllicationname
This will disable it, and the system will ignore it.
This can be seen as safer than deleting or renaming things, but your mileage may vary.
On the other hand, you can also re-enable these applications.
Code:
adb shell
su
pm enable applicationname
Please note: Not all applications will properly re-enable. I believe a factory reset or reinstall of said application will fix the issue.
Also, application names are absolutely case sensitive.
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Ok, a lot of us tweak and mod our phones and turning off the device to get to clockwork recovery, or battery pulls, or multiple button holds to get into Download mode are troublesome and annoying at best.
ADB can help us here.
Here, we do not need to be logged into the shell
If we want to merely reboot the phone:
Code:
adb reboot
If we want to go to recovery (works well with voodoo5)
Code:
adb reboot recovery
If we want to go to Download Mode because we need Odin, heaven forbid:
Code:
adb reboot download
Its instant. No waiting on animations or anything else.
Its also handy if Android has locked up, but yet still works in adb.
I for one hate taking my case off to battery pull.
So now we move on to pushing and pulling files.
Sometimes, I don't feel like mounting my sd card to copy a file over to my phone.
I can use this command to push a file straight to my sd card:
Code:
adb push filename /pathtodirectoryonphone
So for instance, if I have test.txt that I want to send, I would type:
Code:
adb push test.txt /sdcard/
and there it goes.
Ok moving on
Pushing files can be done to any directory, however, some are protected.
For instance, /system is going to give you a permission denied or a read only filesystem error.
To get around this, the easiest thing to do is push the file to your sdcard, then log into the shell:
Code:
adb shell
Code:
su
We will then mount the system as writable
Code:
mount -o rw,remount /dev/block/stl9 /system
Then we can use something like
Code:
cp /sdcard/test.txt /system/app/test.txt
cp stands for copy
and it requires the path of the file and destination path. The name of the file is optional
When you copy it, you can rename it to whatever you like.
For instance, if we wanted to backup a file
Code:
cp /sdcard/test.txt /sdcard/backuptest.txt
Now, lets assume you do not have busybox installed.
You non rooted users will not.
Then you must use a slightly more complicated command called dd
This is used like this:
Code:
dd if=/sdcard/test.txt of=/system/app/test.txt
if is for inputfile
of= output file
Not every user friendly, but probably one of the safer copy commands.
Ok, moving on to pulling files.
Lets say you want to get a file from your phone, to modify, backup, etc.
To do this, we simply use adb in this manner:
Code:
adb pull /pathtofile/filename destinationname
For instance, if I wanted to backup ADW launcher in system/app
I would do this
Code:
adb pull /system/app/ADWLaucnher.apk ADWLauncher.apk
And it will pull the file from the phone and put it in the current directory.
Like above, you can specifcy where it goes.
pushing files to the sdcard, it seems prudent to talk about changing permissions.
sdcards are typically fat32, which destroys permisisons, and Android is heavily permission based.
So if you push an application to your sd card, then try to copy it to /system/app/ bad things are going to happen, or the app may not even show up.
So in that case, we use something called chmod.
This is used in this manner
Code:
adb shell
su
chmod 755 /pathtoapplication/applicationname
Keep in mind
you dont want to do this while its still on your sd card.
an example
Code:
adb shell
su
chmod 755 /system/app/ADWLauncher.apk
755 is good for applications and script files.
Just a couple more topics to cover.
Lets go over deleting files.
This becomes especially handy for removing rogue applications.
To do this, we must be in the adb shell.
Code:
adb shell
su
rm /system/app/ADWLauncher.apk
You may need to remount system as writable with:
Code:
mount -o rw,remount /dev/block/stl9 /system
That applies when using chmod as well.
So what I did above was delete ADW Launcher from system/app
However, what if I wanted to delete the entire contents of a directory?
Same thing as before, except
Code:
adb shell
rm -f /data/dalvik-cache/*.*
I just cleared my dalvik-cache with that command
very quick, very effective.
If you just tried that, please reboot your phone now
Ok....this leaves us with the final topic: logcat
logcat allows us to log what the OS is doing, and possibly delve information for when things are not working
its quite simple Reading it is another.
To use logcat
Code:
adb shell
logcat
To logcat to a certain file do
Code:
adb shell
logcat > /sdcard/logcat.txt
Now we let the log settle down to a reasonable amount of data coming in and not a wall of scrolling, then start the app in question. When it gives an error, we hit ctrl-C and kill the adb shell session.
This should have captured enough data to see the error. Now, I prepared an example. A user came to me on IRC, and Google Maps was force closing. Clearing data didnt fix it, Clearing dalvik-cache, and fix permissions did not fix it. In this case, the user did not know how to use adb So I had him grab an app called alogcat from the market and email me the log. This is also a very valid method.
this file explains what the problem was, and highlights what to look for as an example.
http://adrynalyne.us/files/logcat.pdf
___________________________________________________________________
This concludes the guide from Adrynalyne, there will be more workshops such as this one in irc.freenode.net #android-learning.
Thanks to everyone in #samsung-fascinate !
QUICK FAQ's
sources: Q&A Section, The Weekly Q&A Section by XDA News Writers (thanks guys)
Q: ‘Is there any way to block specific apps from using my data connection?’
A: Try the Droid Wall application.
Q: ‘I read how you can make changes in the build.prop file on my Android device. How exactly do I get to it?’
A: Install ASTRO file manager, browse to /system, long press on build.prop – Edit – Copy. Press on the home icon then Edit icon – Paste. Connect sd card, edit it, and paste it over from where you copied build.prop
Q: What happens if I update my phone? will I need to re-root it and get the ROM again? will all of my applications get erased? If so, is there a way around this?
A: You will lose your root, but not apps if it is just an update.
Q: I just tried to flash a ROM from recovery on my Android phone and got “Verification Failed, Installation Aborted” What happened?
A: Before you can flash a custom ROM the .zip file must be digitally signed in the ROM kitchen, if unzipped and re-zipped it will lose its verification, this happens often using the Safari browser as it likes to decompress .zip’s. Or if your download is corrupted (download the ROM again) it will fail the Verification.
Q - HTC Location Widget shows "map data unavailable"
A - On the widget, click the pin/then click the windows button/click get more/scroll to download maps/download relevant map (care, maybe a big file). Now exit and click onto map, your location should now be visible :)
Q:So, I moved all the apps on the SD, but is still not enough. How can I free some memory? I could delete the cache of the older upgrade or something else?
A:Do you have pictures and videos? If so, check if they are on the SD card and not on your internal memory. Cleaning your cache helps, and try deleting your text messages threads.
Q: ‘What exactly is a kernel and what are the benefits in changing it?’
A: A kernel is a bridge between the applications and the actual data processing done at the hardware level. The kernel’s responsibilities include managing the system’s resources – the communication between hardware and software components. Flashing different kernels gives you different operating speeds, better battery life, the ability to overclock, and more.
Android control other device with IOIO Board.
It use ADB.
http://androidcontrol.blogspot.com/2011/10/ioio-board-for-android-control-io.html
timmymarsh said:
QUICK FAQ's
sources: Q&A Section, The Weekly Q&A Section by XDA News Writers (thanks guys)
Q: ‘Is there any way to block specific apps from using my data connection?’
A: Try the Droid Wall application.
Q: ‘I read how you can make changes in the build.prop file on my Android device. How exactly do I get to it?’
A: Install ASTRO file manager, browse to /system, long press on build.prop – Edit – Copy. Press on the home icon then Edit icon – Paste. Connect sd card, edit it, and paste it over from where you copied build.prop
Q: What happens if I update my phone? will I need to re-root it and get the ROM again? will all of my applications get erased? If so, is there a way around this?
A: You will lose your root, but not apps if it is just an update.
Q: I just tried to flash a ROM from recovery on my Android phone and got “Verification Failed, Installation Aborted” What happened?
A: Before you can flash a custom ROM the .zip file must be digitally signed in the ROM kitchen, if unzipped and re-zipped it will lose its verification, this happens often using the Safari browser as it likes to decompress .zip’s. Or if your download is corrupted (download the ROM again) it will fail the Verification.
Q - HTC Location Widget shows "map data unavailable"
A - On the widget, click the pin/then click the windows button/click get more/scroll to download maps/download relevant map (care, maybe a big file). Now exit and click onto map, your location should now be visible :)
Q:So, I moved all the apps on the SD, but is still not enough. How can I free some memory? I could delete the cache of the older upgrade or something else?
A:Do you have pictures and videos? If so, check if they are on the SD card and not on your internal memory. Cleaning your cache helps, and try deleting your text messages threads.
Q: ‘What exactly is a kernel and what are the benefits in changing it?’
A: A kernel is a bridge between the applications and the actual data processing done at the hardware level. The kernel’s responsibilities include managing the system’s resources – the communication between hardware and software components. Flashing different kernels gives you different operating speeds, better battery life, the ability to overclock, and more.
Click to expand...
Click to collapse
Thank you for your patience and taking the time to answer those questions. I loved your simple and easily digestible format.
There is a note
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Click to expand...
Click to collapse
this note is all wrong..
1. linNUX is not *NIX.
2. Mac OS-X is a *NIX OS, it is based upon UNIX, they use their own variant called Darwin. Darwin does not require capitolization.
3. The word should be POSIX. Linux is POSIX compliant and POSIX defines the capitolization standardards
soft brick
Taioba said:
Is there any way to use ADB even though I can not enable USB debugging by the android?
I have an Atrix with soft-brick. How can I restore a file (framework-res.apk) knowing that my USB debugging is off?
I can enable ADB via fastboot?
Thanks!
Click to expand...
Click to collapse
I found this for atrix 4g....
http://forum.xda-developers.com/showthread.php?t=965546
hope it helps
knoknot said:
i have a bricked s2 not so sure how to go about reviving it via adb
Click to expand...
Click to collapse
check this thread
http://forum.xda-developers.com/showthread.php?t=1237815
thanks. searched for that
Thanks for it.
Great Guys............ :good:
Thanks for sharing.
Thanks for sharing this guild :d, i am new member for reccod
Great job~ Sometimes could be used this.
I'm using Windows 10 RTM and I've set the path, yet I still get the "unrecognized application" error in the command console. What am I missing?
Nevermind, a restart fixed it. Used to be you didn't have to.... sheesh.
nir36 said:
Replacing system files using Android Commander:
(This post was formally based in the HD2's RTL support thread and revolved around our need to replace frameworks)
so:
1. Download the android SDK from: http://dl.google.com/android/android...08-windows.zip
2. EXTRACT(!!!) the android-sdk-windows to c:\
(make sure you extract the dir - not run the setup from inside the zip file)
3. install Android Commander from http://androidcommander.com
4. Connect your device and make sure it's set to Debugging mode in /settings/applications/development/
5. You might have to set a dir containing your adb.exe file. set it to c:\android-sdk-windows\tools\
6. You will see a Total Commander-like interface. you can then copy the framework.jar file to the correct directory (there's no difference between SD android builds and androids in ROM - the system dir will be shown the same way)
a. Yes, you can replace/delete system files while android is running.
b. (for androids running from SD) Any file copied to /sdcard/android/root/system/X will be copied to /system/X in the system file. The sdcard/android root dir is JUST LIKE your root in ROM androids.
c. Make sure you either created a backup or verified a match in any other way before replacing files like frameworks, zimage, modules, etc.. your android might not boot afterwards (I keep all system.ext2 files backed up so that i can restore them incase i screw something up.)
enjoy
Click to expand...
Click to collapse
Thanks, this Guide is very informative
Help with LG D722
I'm using LG D722 phone and I somehow unlocked bootloader and installed twrp recovery. I backed up Lollipop that's what I'm using and i want to restore custom ROM
I know I need to install Google Apps after installing Custom ROM. But Do I also need to install Modem files on my device ? Because I can't find them on XDA Forums. Please give me a link or something. The help is not just appreciated but seriously needed.
Success. Thanks
Hello, I walk testing one recovery but I'm booting before flashing, the question is, will the recovery feel same when booted vs flashed? I've booted and used to flash a pair of zips but felt very laggy and bugged although did the work right. Thanks
Edit: solved, tried myself
Sent from my SHIELD Tablet K1 using XDA-Developers mobile app
http://forum.xda-developers.com/showthread.php?t=872128&page=2
A friend wants me to do a temp root/downgrade/root combo on his GB Shift. I am not a total noob to this but i have not done a shift. i have read numerous threads and just wondering if i could do this
HTML:
http://forum.xda-developers.com/showthread.php?t=1255474
by replacing step one with this (I would imagine so sense its in the same thread. Just making sure.)
HTML:
http://forum.xda-developers.com/showthread.php?t=1185243&page=28
I also plan on doing this right from the phone (the hboot way) and am clueless about the Terminal Emulator. I just searched "terminal" on my evos market and first one is Android Terminal Emulator. I assume that is the one i need, correct?
Plus, is this info relevant?
"SPCS_001
DeviceWarmBoot
CE Serial InUse
Debug Cable Ena
CE USB InUse
ClearAutoImage
2.76.651.4
FNOC
FNOC"
Please and thank you for your time. He is paranoid about bricking his phone, and i dont want to brick it being my first shift mod(s).
Are you referring to this post?
galaara98 said:
This zip has ADB, the exploit, the latest su and Superuser.apk [8/18/11], and the latest busybox for android.
The script is a combination of Windows PowerShell and a sh script. You Must have PowerShell installed (Google it or search Microsoft downloads), preferably version 2. (windows 7 you enable it as a feature, but i think it is on by default)
Unzip into a folder, preferably near the root of your hard drive. Like C:\TempRootEvoShift
there is a readme.txt ... it is mostly this information
Run Powershell (generally Start -> All Programs -> Accessories -> Windows Powershell -> Windows Powershell) [or Start -> Run -> Powershell, or many have an icon in the quick launch bar ... small blue greater than symbol]
IF you have never run a Powershell script you will need to enable PS1 files by typing set-executionpolicy remotesigned
CD into the folder you unzipped and run the script by typing
.\TempRootEvoShift.ps1
i have tested it on 2 computers, but i digitally signed the script and i do not know what your computers will do with that. If they do not like it, open the script in Notepad, Copy all of it down to, but not including the signature block, and paste it into Powershell (AFTER YOU Change directories into where you unzipped)
Click to expand...
Click to collapse
If so then let me start off with, how you obtain temp root doesn't matter for the exploit to downgrade hboot/android. So you can get temp root however you want, seeing as how that looks like just a packaged up fre3vo temp root, if it works, then you can replace the first fre3vo temp root in my guide with that yes.
So in short, yes you can replace getting temp root with any method you want, as long as you get it before continuing.
Yes that terminal emulator can work, or connect bot or any other terminal application.
To the users, no that isn't really relevant, it's just explaining what the exploit does to the developers(mainly aimed at ones for other devices)
Just follow the guide and you should be fine.
Also, it should be noted that it /looks/ like it errors out a few times when flashing but it isn't erroring, it's doing it's job(We made this mistake earlier but it works)
Before you go on messing with hboot, make sure hboot picks up the sdcard.
Thank you so much. ^.^
Just wanted to understand everything before trying. I figured any temp root way would be fine.
Much appreciated.