I see there are a lot of users here in these forums that either are scared of ADB or have no idea how to use it or what to do with it.
The beauty of ADB is it's cross platform, it works on Windows, Mac, and Linux.
The adb commands everyone should know how to use are very basic and used for file manipulation and device control.
To use ADB Google will tell you you need to download and install the most current Android SDK. If you want to write apps for Android, this is true, but for most people there's no need to do this.
You can get everything you need from one of the one clicks.
You need adb and fastboot for your platform.
Download them and put them in a directory of your choice, on my Mac they live in /Android.
I've dug them up and attached adb and fastboot for all platforms. Just unzip them and put the ones for your Operating System somewhere easy to get to.
if you're on Windows you'll need drivers. The best way to get the driver is to download HTC Sync from here http://dl4.htc.com/managed-assets/support/software/htc-sync/htc_sync_setup_3.2.20.exe and install it. After it is installed make sure it isn't running.
I'm now going to go through a few simple adb command and what they're for.
To use ADB or Fastboot your phone has to be in USB Debugging mode Set this in Settings/Developer Options on the phone.
Open a Command prompt
Navigate to the location you put the adb and fastboot commands
1) adb reboot
this command does exactly what it says. If you type it without any modifiers your phone will reboot. You can also reboot recovery or reboot bootloader.
2) adb push
Adb push is the command for putting a file on your device.
The format to use the command is adb push /filelocation/filename /destination the destination is usually /sdcard
3) adb pull
this command is how you get a file off of your phone
adb pull /file location the file will be downloaded to the location of your adb executable
4) Sometimes to help you troubleshoot a problem you may be asked to provide a logcat to someone. What this means is a log of the what is happening on the device. Getting one is easy
adb logcat > logcat.txt
this will create a logcat file and save it to the directory on your computer that you're running the adb commands from. To stop the logcat just use ctrl-c
Now on to fastboot
fastboot is a special mode on Android phones that allow system level partitions to be written or commands executed.
fastboot only works if your phone is in bootloader mode.
Once in bootloader mode
open a command prompt and navigate to where you installed the fastboot executable
You need fastboot to unlock your bootloader
fastboot flash unlocktoken Unlock_code.bin
and to relock it:
fastboot oem lock
you can also use fastboot to flash recoveries
fastboot flash recovery recovery.img use the filename of the recovery you downloaded.
If you've installed the 2.20 firmware from AT&T and you have root, you'll need to flash the kernel for any new rom separately using fast boot.
unzip the rom you've downloaded and locate the boot.img file and put it in the same directory as your fastboot and dab commands
reboot to bootloader then flash the kernel using the command fastboot flash boot boot.img. after hat you can boot into recovery right from the bootloader and install your rom.
These commands are just a few very basic ones.
There's no reason to be afraid of the command line or these tools.
I hope this quick and dirty tutorial helps someone.
If there's something else that can be explained here, feel free to add it to the thread and I'll add it to the OP.
you're right. nobody should be afraid of adb/fastboot commands or understanding WHY they are useful.
i would as far to say that if you dont understand basic adb/fastboot commands, then you have no business modding your phone....
You gotta add that they need to open a command line from the directory that has adb in it and type the commands from there.
_MetalHead_ said:
You gotta add that they need to open a command line from the directory that has adb in it and type the commands from there.
Click to expand...
Click to collapse
Oh yeah, duh
gunnyman said:
Oh yeah, duh
Click to expand...
Click to collapse
You're slackin'
I would go so far to say that this lack of comfort with adb/fastboot is the single largest contributor to the issues people have had in rooting and unlocking their HOXs over the last two months. Thanks for taking the time to put this together. Should help quite a few people unsure of adb/fastboot in general.
Another adb usage that may be helpful to add to this list is adb pull of user apps before updating ROM and then pushing them back. I have often seen people unsure of the best way to restore apps after a ROM upgrade. For me TiB works great, but you need to know what to restore via TiB and what to configure again manually. I think Scott posted the general steps in one of his CleanROM threads, but adding it to this list would be good too.
Just realized it's exactly two months since I received my pre-ordered HOX . No bricks, a superb HOX that I haven't had to warranty replace for any reason so far, and then comes along Scott with his fantastic CleanROM series. What a fun-filled ride it has been so far
Add adb logcat as well please, not enough people know how to use it
nice bro! this will come in handy for those that need it. i was there once! we all were. but good job man!
rohan32 said:
Add adb logcat as well please, not enough people know how to use it
Click to expand...
Click to collapse
Good call. Tomorrow I'll update it.
Done. Keep the suggestions coming. I know enough to get someone started, but I'm no developer.
I like this. Information that won't get old and everyone needs at one point or another. Nice call gunny.
Stickify!
this is great! excellent idea gunny
Oh yeah, stickied! :highfive: Too bad noobs still won't read it lol. They never read anything :silly:
_MetalHead_ said:
Oh yeah, stickied! :highfive: Too bad noobs still won't read it lol. They never read anything :silly:
Click to expand...
Click to collapse
Yeah but now we can be snarky and say "didn't you read the effing sticky???"
What about common connection issues?
Im facing one now
Funny you should say that. Your post made me realize it was missing.
So I'm getting a replacement One X from AT&T on July 19th and need to send my current phone back. I unlocked the bootloader and flashed ROM's on my current phone, so I should just follow this guide to return my phone back to stock before shipping it out to AT&T, correct?
Sent from my HTC One X using Tapatalk 2
acles003 said:
So I'm getting a replacement One X from AT&T on July 19th and need to send my current phone back. I unlocked the bootloader and flashed ROM's on my current phone, so I should just follow this guide to return my phone back to stock before shipping it out to AT&T, correct?
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
lock bootloader install RUU
done
Simple and awesome thread. Should help a lot of people.
This really helped me out before I became a member, thanks
Related
I'm extremely new to this and this website, sort of. So if any of this is wrong impression already sorry. A few weeks ago I rooted my myTouch_4G_Slide, using s-off. I'm pretty sure that went OK as my phone is still currently rootly rooted. Next I tried using a custom rom, i am not exactly sure what I did wrong but, I cannot boot into recovery and when i go into Hboot I get multiple "no image" popping up. I can't factory reset and when i try to boot into recovery my phone gets stuck at the mt4gs screen and i have to take out the battery. Is there anyway to fix this, easily hopefully.
Sent from my myTouch_4G_Slide using XDA App
You said your phone is s-off and "rootly rooted". I assume you meant "permanently rooted"? Did you use the right version of superuser (2.3.6.3 or above) and clockwork recovery image (4.0.0.9)? You can ignore the "no image" message, I get them all the time and I can still boot into recovery no problem.
I have the right superhero version but i don't think I have the right clockwork. How could I fix it, without having to boot into recovery.
Sent from my myTouch_4G_Slide using XDA App
imjames said:
I'm extremely new to this and this website, sort of. So if any of this is wrong impression already sorry. A few weeks ago I rooted my myTouch_4G_Slide, using s-off. I'm pretty sure that went OK as my phone is still currently rootly rooted. Next I tried using a custom rom, i am not exactly sure what I did wrong but, I cannot boot into recovery and when i go into Hboot I get multiple "no image" popping up. I can't factory reset and when i try to boot into recovery my phone gets stuck at the mt4gs screen and i have to take out the battery. Is there anyway to fix this, easily hopefully.
Sent from my myTouch_4G_Slide using XDA App
Click to expand...
Click to collapse
Sounds like you need to reflash your recovery. Since you can get into fastboot still, this is an easy fix.
Just download the recovery image from here -
http://android.modaco.com/topic/343...e-mytouch-4g-slide-unofficial-modaco-edition/
once downloaded, enter hboot and select fastboot. Once your phone says "fastboot usb" on it enter the following command into fastboot -
Fastboot flash recovery c:/android/tools/recovery.img
The "c:/android/tools/recovery" portion of that command will be variable based on where the downloaded recovery image is contained on your computer.
Id say that has a pretty good chance of fixing your prollem =). Keep me posted
Sent from my myTouch_4G_Slide using xda premium
do i have to have adb to do it, because thats learning in progress
imjames said:
do i have to have adb to do it, because thats learning in progress
Click to expand...
Click to collapse
um, yeah. Fastboot is like ADB, but a different tool included in the SDK. Do you have the SDK? It's relatively simple, let me just break it down to maximize simplicity.
1) If you don't have the SDK, download it (in zip format) here. If you do have the SDK,
2) for simplicity's sake, create a Directory on your computer (the hard drive root) entitled "Android" (so that it's c:\Android).
3) If you didn't previously have the SDK, once it is is downloaded, extract the files.
4) assuming you run windows, navigate to the SDK, there's a subdirectory called "tools". Move that folder into the Android folder you created.
5) Now. take that recovery.img that you downloaded... (if you haven't done so yet, look to the link I provided in my previous post) move IT to the Android folder as well
6) open a command prompt and change the directory to the tools subdirectory of the Android folder (type cd c:android\tools), You'll now see a command prompt beginning with C:\Android\tools
7) make sure your phone is connected to your computer and in fastboot mode (select "fastboot" from the Hboot screen, it'll then say "fastboot usb" on the screen). I"m assuming your drivers are already properly installed since you were able to root your phone.
8) type in the following command into the commmand prompt - "fastboot flash recovery c:\android\recovery.img
That should do it =)
Sorry this took awhile, I am having trouble with the command prompt I can't get it to change
Sent from my myTouch_4G_Slide using XDA App
imjames said:
Sorry this took awhile, I am having trouble with the command prompt I can't get it to change
Sent from my myTouch_4G_Slide using XDA App
Click to expand...
Click to collapse
Because:
AndroidAutobot said:
... (type cd/c:android/tools) ...
Click to expand...
Click to collapse
Should be:
cd c:\android\tools
if you installed the SDK to a folder in your C: drive called android. That's what I did too because it makes life easier.
The rest of AndroidAutobots post is what you need to do, this one command was just typed wrong.
Blue6IX said:
Because:
Should be:
cd c:\android\tools
if you installed the SDK to a folder in your C: drive called android. That's what I did too because it makes life easier.
The rest of AndroidAutobots post is what you need to do, this one command was just typed wrong.
Click to expand...
Click to collapse
Oops lol. I cant believe i did that ha ha. Thanks for spotting that =)
I've corrected all the command lines in that particular post. Should be able to follow it step by step without any trouble now.
Sent from my HTC Doubleshot using xda premium
So I have my Xoom unlocked and I am trying to flash the recovery in order to root. I have the recovery in the platform tools folder along with fastboot and all that, and I'm able to get the Xoom into fastboot from adb, but I can't get the recovery to flash. I'm typing the name correct. And I'm putting in 'fastboot flash recovery recovery-Tiamat-R4c-100611-1150-cwm.img' without the quotes. Honestly I'm a little bit stumped at this point.
I have had the same issue for the past few days I have also tried the steps here no luck.... http://forum.xda-developers.com/showthread.php?t=1249798
supenova3000 said:
I have had the same issue for the past few days I have also tried the steps here no luck.... http://forum.xda-developers.com/showthread.php?t=1249798
Click to expand...
Click to collapse
I used the same guide. It just makes no sense that I can control the Xoom and unlock it, but I can't flash the darn recovery.
williamthegoat said:
I used the same guide. It just makes no sense that I can control the Xoom and unlock it, but I can't flash the darn recovery.
Click to expand...
Click to collapse
I tried moving the files from the tools folder to platform tools still no luck.. all of this for the I C S flash I'm going to keep working on a solution I will let you know if I have any luck!
So I have the android sdk in c:\ , and in the sdk folder I have everything, and in the platform tools I have my fastboot and recovery. I then use cmd to get into adb, then I put the xoom in fastboot. From there I try to flash the recovery, which always fails. I must be doing something wrong here.
Try downloading the IMG again. Or try out the rogue recovery. I actually like rogue better.
Sent from my MB860 using xda premium
I finally got it. In command I needed to direct it to the platform tools folder and then it flashed just fine. I am now rooted. Now to learn about flashing ICS
Thanks for the responses and help guys
Think you have to be stock to flash to ICS, at least that was the word yesterday.
I gave up trying to root just as I found out about the ICS update.
williamthegoat said:
I finally got it. In command I needed to direct it to the platform tools folder and then it flashed just fine. I am now rooted. Now to learn about flashing ICS
Thanks for the responses and help guys
Click to expand...
Click to collapse
Two simple errors:
1) not opening the command window from the folder where you have fastboot and the image files you're trying to flash; and
2) not realizing that you have hidden file extensions in Windows, and typing ...recovery.img.img
williamthegoat said:
So I have my Xoom unlocked and I am trying to flash the recovery in order to root. I have the recovery in the platform tools folder along with fastboot and all that, and I'm able to get the Xoom into fastboot from adb, but I can't get the recovery to flash. I'm typing the name correct. And I'm putting in 'fastboot flash recovery recovery-Tiamat-R4c-100611-1150-cwm.img' without the quotes. Honestly I'm a little bit stumped at this point.
Click to expand...
Click to collapse
I assume that you've set up a path in environment variables to run adb and fastboot from ay directory... and are running the flash command from a folder other than where your .IMG file is located. In order for fastboot to find the file you're trying to flash, you actually have to run your flash command from the folder your file is located...
So, cd\...\platform-tools and then flash
The simplest way I perform all of my operations for this:
I leave everything installed into it's default locations. I download tiamat's CWM image and place it into the platform-tools folder.
For Windows 7, I use Windows PowerShell.
For example: Open Start Menu > Type "power" to search, "Windows PowerShell" should show up. (For me, its default at the top - so I press enter to open it)
Once opened: I type this configuration EXACTLY as is: (Keys in <>)
Code:
cd C:\Pr <TAB><TAB> An <TAB> An <TAB> Pl <TAB><TAB> <ENTER>
This above brings me directly to:
C:\Program Files (x86)\Android\Android-sdk\Platform-tools\
Of course, this will be different depending upon your computer setup. I've nailed this routine to get to the path the quickest.
to use FASTBOOT (XOOM already in fastboot mode):
Code:
./fastboot flash recovery rec<TAB><ENTER>
This auto completes the filename as ./recovery-tiamat-r4c-xxxx.img
Of course, depending on how many files/folders you have, you may have to hit <TAB> multiple times. I have to do it 3 or 4 times to select the recovery image I want.
Auto-complete is a nice thing. "./" is added to command from the working directory.
williamthegoat said:
I finally got it. In command I needed to direct it to the platform tools folder and then it flashed just fine. I am now rooted. Now to learn about flashing ICS
Thanks for the responses and help guys[/QUOTE
Worked for me too!!! Thanks!!!
Click to expand...
Click to collapse
i ditched windows ages ago and i will never look back i am sick and tierd of waiting on moto uk to push ics. i use to have the dell streak and i rooted that but i was on windows then how do i root my xoom with linux mint is it possible and can any point me in the right direction please
Stand by, I will give you all the tools and options you need to do so, I could draft something tomorrow morning.
Sent from my PG86100 using Tapatalk
Thank you megabiteg Still learning linux but i Love it
megabiteg said:
Stand by, I will give you all the tools and options you need to do so, I could draft something tomorrow morning.
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
well, it isn't that hard since everything you really need on your computer ist fastboot and a way to push a file to an sdcard (fat formatted)...
Just go here, download and install the android sdk from there. Make sure the commands adb and fastboot are in your path. (test by issuing adb devices, shold return a list of attached android devices with usb debugging turned on)
After that, just follow these instructions. I am not sure if you need to run fastboot as root, but you'll see
Cheers for the info just by any chance do you know the commands still learning Linux
llama-power said:
well, it isn't that hard since everything you really need on your computer ist fastboot and a way to push a file to an sdcard (fat formatted)...
Just go here, download and install the android sdk from there. Make sure the commands adb and fastboot are in your path. (test by issuing adb devices, shold return a list of attached android devices with usb debugging turned on)
After that, just follow these instructions. I am not sure if you need to run fastboot as root, but you'll see
Click to expand...
Click to collapse
elsworth1983 said:
Cheers for the info just by any chance do you know the commands still learning Linux
Click to expand...
Click to collapse
thought you ditched windows ages ago?
anyhow... don't have linux set up atm, so this will from memory and might contain some errors... Also, never tried mint, I always stuck to debian or debian-derivates...
anyhow, lets try this:
first, use your package management-system to install a jre (java runtime environment.
If that is set up, install the android sdk:
Code:
$ cd ~
$ wget http://dl.google.com/android/android-sdk_r17-linux.tgz
$ sudo su
[enter your su-password]
# cd /usr/local
# tar xfzv ~[yourusername]/android-sdk_r17-linux.tgz
# ./android-sdk-linux/tools/android
a window should open up and list some files available for download. Just select "Android SDK Platform-tools" and hit "Install 1 package...".
once that's finished (might take a while), close the Android SDK Manager and you should get back to your shell.
Code:
# ln -s /usr/local/android-sdk-linux/platform-tools/adb /usr/local/bin/adb
# ln -s /usr/local/android-sdk-linux/platform-tools/fastboot /usr/local/bin/fastboot
# exit
$ rm android-sdk_r17-linux.tgz
now, connect your xoom to your computer and enable usb debugging in the settings of your xoom. If you issue adb devices, you should get something like
Code:
List of devices attached
043c12343456476547 device
if you receive something like bash: adb: command not found, something went wrong somewhere. Try the same using sudo: sudo adb devices if that doesn't fix it please write another post.
Also, if you encounter an error after entering any of the comments above, please do not continue until you resolved that error. (For example ask for a solution here)
And, since you are still learning to use linux: whenever instructions contain a $ or # at the beginning of a line, DO NOT ENTER THESE. They are just there to tell you to issue that command as normal user ($) or superuser (#)
/EDIT: btw: there may be an easier way to do this if you just want to use adb/fastboot this once: you could try to simply download the adb and fastboot- binaries and put these into the folder with your recovery.img-file. Might work, not sure about that, though. Also, since I don't have linux installed on my machine atm, I can't provide you with a link to these binaries.
cheers for all your help will give this a go "Dont want to back to windows
Android SDK manger log
Error Stopping ADB server failed (code-1)
Connected the xoom and did adb devices and it listed the xoom with no errors in the terminal Thank you again ? Were do i go from here now
glad to read it's working
just follow the instructions in this thread That will help you to install a custom recovery and root your xoom. It will not, however, install a custom rom. To do that, you'd also need to download a custom rom (usually comes in a flashable .zip-file), place that on an acutal sd-card which you're gonna put into your xoom, and install that file from within the custom recovery. Just make sure you grab a rom that works with your xoom (for example, you shouldn't put a us-4g-rom onto a wifi-only-xoom and vice versa)
have i done something wrong
god-WE174AA-ABU-s5306uk god # adb reboot bootloader
god-WE174AA-ABU-s5306uk god # fastboot oem unlock
fastboot: command not found
The problem i seem to be having is when the xoom is on i type <adb reboot bootloader> The xoom reboots to the fastboot screen after that no commands work and when i do ADB devices in the terminal the device list is empty ?
elsworth1983 said:
have i done something wrong
god-WE174AA-ABU-s5306uk god # adb reboot bootloader
god-WE174AA-ABU-s5306uk god # fastboot oem unlock
fastboot: command not found
Click to expand...
Click to collapse
have you done the # ln -s /usr/local/android-sdk-linux/platform-tools/fastboot /usr/local/bin/fastboot? The error you're getting seems to suggest that it can't find the fastboot application? What happens if you type /usr/local/android-sdk-linux/platform-tools/fastboot oem unlock?
elsworth1983 said:
The problem i seem to be having is when the xoom is on i type <adb reboot bootloader> The xoom reboots to the fastboot screen after that no commands work and when i do ADB devices in the terminal the device list is empty ?
Click to expand...
Click to collapse
that is expected. adb is only available while android is booted up, fastboot is the protocol to use while in bootloader mode. As indicated before, I suspect that your computer can't find the fastboot application (on the computer).
Cheers for all the info i went back and started all from the top again only thing i am struggling with is Flashing the recovery now lol i get
god-WE174AA-ABU-s5306uk god # adb reboot bootloader
god-WE174AA-ABU-s5306uk god # fastboot flash recovery recovery-solarnz-100611-1150.img
error: cannot load 'recovery-solarnz-100611-1150.img'
I have it on a memory card which i checked which was working
elsworth1983 said:
Cheers for all the info i went back and started all from the top again only thing i am struggling with is Flashing the recovery now lol i get
god-WE174AA-ABU-s5306uk god # adb reboot bootloader
god-WE174AA-ABU-s5306uk god # fastboot flash recovery recovery-solarnz-100611-1150.img
error: cannot load 'recovery-solarnz-100611-1150.img'
I have it on a memory card which i checked which was working
Click to expand...
Click to collapse
The recovery image needs to be on your pc. It doesn't matter where on your pc as long as you can access it and know where it is.
Fastboot works by sending the image over the usb cable. Once you start flashing roms, those will need to be on your sd card within the xoom.
all i can say is thank you for all the information every 1 is giving me my head is mashed lol so if i put recovery-Tiamat-R4c-100611-1150-cwm.img on the desktop what would the terminal code be
kofrad said:
The recovery image needs to be on your pc. It doesn't matter where on your pc as long as you can access it and know where it is.
Fastboot works by sending the image over the usb cable. Once you start flashing roms, those will need to be on your sd card within the xoom.
Click to expand...
Click to collapse
depends on where your desktop is If it is in ~/Desktop/, then the correct command should be
Code:
fastboot flash recovery ~/Desktop/recovery-Tiamat-R4c-100611-1150-cwm.img
error: cannot load '/root/Desktop/recovery-Tiamat-R4c-100611-1150-cwm.img'
ARRRR i am really loosing the will to live ;-)
What am doing so wrong its lucky am not bold yet been trying this all day
elsworth1983 said:
error: cannot load '/root/Desktop/recovery-Tiamat-R4c-100611-1150-cwm.img'
ARRRR i am really loosing the will to live ;-)
Click to expand...
Click to collapse
if the graphical interface, where do you see the file located?
elsworth1983 said:
error: cannot load '/root/Desktop/recovery-Tiamat-R4c-100611-1150-cwm.img'
ARRRR i am really loosing the will to live ;-)
Click to expand...
Click to collapse
Sounds to me like you are running the commands as root. You likely have also downloaded the recovery image as a normal user. This means the '~' shortcut for the home directory is pointing you to someplace where the file is not.
Try using "fastboot flash /home/Your username/Desktop/recovery-Tiamat-R4c-100611-1150-cwm.img"
I have put the file on the desktop ? is that what u mean
I have my Samsung note 3, and it will never be unlocked. So i was thinking about moving to this. Is the Verizon edition unlocked for custom roms?
Sent from my SM-N900V using XDA Free mobile app
scoreboard said:
I have my Samsung note 3, and it will never be unlocked. So i was thinking about moving to this. Is the Verizon edition unlocked for custom roms?
Sent from my SM-N900V using XDA Free mobile app
Click to expand...
Click to collapse
It doesn't come unlocked, but you can unlock it. That's why are a lot of us are on this phone. I had an S5 ordered, but decided against it, when I saw there wasn't any progress being made on it. I cancelled my order, bought my M8, and haven't looked back. Give me an unlocked bootloader, or give me death.
You can S-OFF (which unlocks bootloader) & root it immediately after getting it.
I came from a locked Galaxy S4 and have to say this phone is snappier than an iPhone & as unlockable as a door thats compatible with all keys ;D. Love love loveeee this phone and highly recommend it! Go for it!
I unlocked mine the moment I got home with it, no OTA update required as some people have said to do before unlocking it & as far as I've seen no ones had an actual "Oh no! They made it impossible to unlock like Sammysung!" moment.
Ive tried a for the last two days to root my htc m8..but i can not get it to work...tried htc unclock tried setting up adb...but the first gives me an mid error and the second does not recognize my phone...i did install the newest update before i tried to s-off....any help would be great...
Frausbite77 said:
Ive tried a for the last two days to root my htc m8..but i can not get it to work...tried htc unclock tried setting up adb...but the first gives me an mid error and the second does not recognize my phone...i did install the newest update before i tried to s-off....any help would be great...
Click to expand...
Click to collapse
Have u tried the weak sauce app for root then fire water to s-off?
Sent from my Insanely powered M8 using Tapatalk
holla420 said:
Have u tried the weak sauce app for root then fire water to s-off?
Sent from my Insanely powered M8 using Tapatalk
Click to expand...
Click to collapse
I set up adb using the method from root junky. but my computer won't recognize my device. I must have tried it like 50 times, so i tried the htcdev unlock method...my computer recognizes by device but after i copy the token i get the mid 160 error.
Frausbite77 said:
I set up adb using the method from root junky. but my computer won't recognize my device. I must have tried it like 50 times, so i tried the htcdev unlock method...my computer recognizes by device but after i copy the token i get the mid 160 error.
Click to expand...
Click to collapse
U must not being in the right directory
Sent from my Insanely powered M8 using Tapatalk
Frausbite77 said:
I set up adb using the method from root junky. but my computer won't recognize my device. I must have tried it like 50 times, so i tried the htcdev unlock method...my computer recognizes by device but after i copy the token i get the mid 160 error.
Click to expand...
Click to collapse
What that guy above me said, if you using Windows make sure you right click+shift in the platform tools directly then see if it shows up with adb devices, if not check your drivers.
Frausbite77 said:
Ive tried a for the last two days to root my htc m8..but i can not get it to work...tried htc unclock tried setting up adb...but the first gives me an mid error and the second does not recognize my phone...i did install the newest update before i tried to s-off....any help would be great...
Click to expand...
Click to collapse
HTCDEV unlock doesn't work for the Verizon variant. To s-off just follow this step by step guide:
http://forum.xda-developers.com/showthread.php?t=2708628
PRO TIPS: Let's say that your adb and fastboot files are located in C:\Program Files\Android. Add this directory to your system path by pressing the Windows key and typing "environment". After a few letters you'll see an option called "Edit the System Environment Variables". Click on this option. The system properties windows will open to the Advanced tab. Click the Environment Variables button. In the System Variables field you'll see a variable called Path. Click on it and choose edit. In the variable value field you'll see a list of paths separated by semi colons. We want to add the path of your adb and fastboot files to the system Path variable so that adb and fastboot commands can be executed anywhere. For the example location I used above you would add the following to the end of the list:
;C:\Program Files\Android
To test, open a command prompt and type "adb". This should launch adb with no parameters. Now you can use adb and fastboot commands anywhere. When you download the firewater script file, you can just leave it in the Downloads directory. If you use Chrome you could click the arrow next to the file and choose "show in folder". Then shift+right click an empty portion of the Downloads directory window and choose "open command window here" (you can also shift+right click on folders icons to accomplish this). Should be easy to s-off now.
NOTES:
*Once adb is setup issue the command "adb devices" to ensure your phone is recognized. The first time you will get a popup on your phone asking if you want to allow the PC adb access. Make sure you check "always allow".
*Before you issue the "su" command wait about 30 seconds to allow WeakSauce to root the phone after reboot. If you get an error saying "su not found" it's because WeakSauce has not yet rooted the phone. Wait 10 seconds and try again.
*When you issue the "su" command wake your phone's display and look for a SuperSu request. Allow it obviously.
*It's possible that the process may fail. If it does just try again. If it keeps failing try a different USB 2.0 port. Also make sure you're using the best USB cable that you have. The one that came with the phone should work.
Doc Ames said:
HTCDEV unlock doesn't work for the Verizon variant. To s-off just follow this step by step guide:
http://forum.xda-developers.com/showthread.php?t=2708628
PRO TIPS: Let's say that your adb and fastboot files are located in C:\Program Files\Android. Add this directory to your system path by pressing the Windows key and typing "environment". After a few letters you'll see an option called "Edit the System Environment Variables". Click on this option. The system properties windows will open to the Advanced tab. Click the Environment Variables button. In the System Variables field you'll see a variable called Path. Click on it and choose edit. In the variable value field you'll see a list of paths separated by semi colons. We want to add the path of your adb and fastboot files to the system Path variable so that adb and fastboot commands can be executed anywhere. For the example location I used above you would add the following to the end of the list:
;C:\Program Files\Android
To test, open a command prompt and type "adb". This should launch adb with no parameters. Now you can use adb and fastboot commands anywhere. When you download the firewater script file, you can just leave it in the Downloads directory. If you use Chrome you could click the arrow next to the file and choose "show in folder". Then shift+right click an empty portion of the Downloads directory window and choose "open command window here" (you can also shift+right click on folders icons to accomplish this). Should be easy to s-off now.
NOTES:
*Once adb is setup issue the command "adb devices" to ensure your phone is recognized. The first time you will get a popup on your phone asking if you want to allow the PC adb access. Make sure you check "always allow".
*Before you issue the "su" command wait about 30 seconds to allow WeakSauce to root the phone after reboot. If you get an error saying "su not found" it's because WeakSauce has not yet rooted the phone. Wait 10 seconds and try again.
*When you issue the "su" command wake your phone's display and look for a SuperSu request. Allow it obviously.
*It's possible that the process may fail. If it does just try again. If it keeps failing try a different USB 2.0 port. Also make sure you're using the best USB cable that you have. The one that came with the phone should work.
Click to expand...
Click to collapse
Thank you for letting me know about the HTC Dev...I have a mac and set up ADB...it shows my phone off line...i get the message that says allow this computer and check always...i run adb devices and now it just returns blank...i reinstall drivers which is htc sync but the problem persists....
Frausbite77 said:
Thank you for letting me know about the HTC Dev...I have a mac and set up ADB...it shows my phone off line...i get the message that says allow this computer and check always...i run adb devices and now it just returns blank...i reinstall drivers which is htc sync but the problem persists....
Click to expand...
Click to collapse
Try 'adb kill-server' then issue 'adb start-server' then try 'adb devices'. If that doesn't work, try a different USB port. If still no joy try a different USB cable. If that doesn't work try restarting the Mac, restarting the phone, spinning around in an office chair three times, and blowing into a Nintendo cartridge. If that doesn't work I don't know what else to suggest besides trying it on a different computer or maybe in Windows. I've never had an issue with ADB so if somebody else has any ideas for Frausbite77 please chime in.
Edit: I googled this Mac ADB guide. I don't know if it really matters, but it says to have ADB/fastboot in the /usr/bin directory. Check it out. There's a script file and when run it installs the Android SDK tools to the appropriate folder. Also check the comments. Somebody else has probably had the same problem as you:
http://htc-one.wonderhowto.com/how-...-mac-os-x-send-commands-your-htc-one-0151178/
Edit 2: After reading a user's comment that the script was broken I looked at the script and it was, in fact, broken. I fixed it. Follow the guide but use this zip instead:
Doc Ames said:
Try 'adb kill-server' then issue 'adb start-server' then try 'adb devices'. If that doesn't work, try a different USB port. If still no joy try a different USB cable. If that doesn't work try restarting the Mac, restarting the phone, spinning around in an office chair three times, and blowing into a Nintendo cartridge. If that doesn't work I don't know what else to suggest besides trying it on a different computer or maybe in Windows. I've never had an issue with ADB so if somebody else has any ideas for Frausbite77 please chime in.
Edit: I googled this Mac ADB guide. I don't know if it really matters, but it says to have ADB/fastboot in the /usr/bin directory. Check it out. There's a script file and when run it installs the Android SDK tools to the appropriate folder. Also check the comments. Somebody else has probably had the same problem as you:
http://htc-one.wonderhowto.com/how-...-mac-os-x-send-commands-your-htc-one-0151178/
Edit 2: After reading a user's comment that the script was broken I looked at the script and it was, in fact, broken. I fixed it. Follow the guide but use this zip instead:
Click to expand...
Click to collapse
Ok, well so I never got adb to show my device on line....but when i typed ./adb reboot, the device actually responds to the commands...taking a risk i went ahead and pushed the firewater files and the process worked. I was able to unlock my device and install twrp...so i figured out that for and to work i have to type in ./ before i type in any commands...i don't if i messed something up along the way or what...but in the end i have gotten i was able to root and get s off....maybe i got lucky lol...thanks so much for the help!!
Frausbite77 said:
Ok, well so I never got adb to show my device on line....but when i typed ./adb reboot, the device actually responds to the commands...taking a risk i went ahead and pushed the firewater files and the process worked. I was able to unlock my device and install twrp...so i figured out that for and to work i have to type in ./ before i type in any commands...i don't if i messed something up along the way or what...but in the end i have gotten i was able to root and get s off....maybe i got lucky lol...thanks so much for the help!!
Click to expand...
Click to collapse
That's the proper command line for using Adb on a Mac. It won't work without using ./ before the command.
Sent from my HTC6525LVW using Tapatalk
Frausbite77 said:
Ok, well so I never got adb to show my device on line....but when i typed ./adb reboot, the device actually responds to the commands...taking a risk i went ahead and pushed the firewater files and the process worked. I was able to unlock my device and install twrp...so i figured out that for and to work i have to type in ./ before i type in any commands...i don't if i messed something up along the way or what...but in the end i have gotten i was able to root and get s off....maybe i got lucky lol...thanks so much for the help!!
Click to expand...
Click to collapse
My bad. I should have mentioned that to execute a file in a Unix-like operating system you need to enter the full or relative path if it's not in your $Path environment variable. That's why you needed to add a './' before the command. The './' indicates that the file is in the current directory. That's probably why that guide recommended putting adb and fastboot in /usr/bin. If you want to fix it so that adb and fastboot commands can be run from anywhere open a terminal, change to the directory where adb and fastboot are located, and issue the following commands:
sudo mv adb /usr/bin
sudo mv fastboot /usr/bin
That will move adb and fastboot into /usr/bin which is in your $Path so you can issue the commands anywhere without using './'. I'm glad you got your M8 s-offed and recovery installed. If you're looking into custom ROMs, I can personally recommend ViperOne as a great stock option and LiquidSmooth as an AOSP option. Try em' out. Now that you have recovery you can just restore a backup if you don't like your current ROM.
Doc Ames said:
My bad. I should have mentioned that to execute a file in a Unix-like operating system you need to enter the full or relative path if it's not in your $Path environment variable. That's why you needed to add a './' before the command. The './' indicates that the file is in the current directory. That's probably why that guide recommended putting adb and fastboot in /usr/bin. If you want to fix it so that adb and fastboot commands can be run from anywhere open a terminal, change to the directory where adb and fastboot are located, and issue the following commands:
sudo mv adb /usr/bin
sudo mv fastboot /usr/bin
That will move adb and fastboot into /usr/bin which is in your $Path so you can issue the commands anywhere without using './'. I'm glad you got your M8 s-offed and recovery installed. If you're looking into custom ROMs, I can personally recommend ViperOne as a great stock option and LiquidSmooth as an AOSP option. Try em' out. Now that you have recovery you can just restore a backup if you don't like your current ROM.
Click to expand...
Click to collapse
Thanks for the advice...actually i was just going to ask about some roms...just flashed viper rom and gonna give it a go...thanks for all the help...
Frausbite77 said:
Thanks for the advice...actually i was just going to ask about some roms...just flashed viper rom and gonna give it a go...thanks for all the help...
Click to expand...
Click to collapse
You'll love it. A couple thing to note though. For some reason the 1.6 download doesn't actually contain the 1.6 OTA so you'll want to go to 'About phone' and update to 1.6. Also I believe that ViperOne defaults to power saver mode. You can change this by using the toggle in the notification drawer. If you want to add power saver and extreme power saver to the settings menu follow this guide:
http://forum.xda-developers.com/showthread.php?t=2710946
Doc Ames said:
You'll love it. A couple thing to note though. For some reason the 1.6 download doesn't actually contain the 1.6 OTA so you'll want to go to 'About phone' and update to 1.6. Also I believe that ViperOne defaults to power saver mode. You can change this by using the toggle in the notification drawer. If you want to add power saver and extreme power saver to the settings menu follow this guide:
http://forum.xda-developers.com/showthread.php?t=2710946
Click to expand...
Click to collapse
wow, man viper rom is insane, thanks for the update heads up...i wouldn't have even thought to do that...guess i have tons of reading to catch up on...thanks...
Hi,
I don't see my device both on 'adb' mode or in 'fastboot' mode.
What can I do to see it or put it in either of these modes?
Thanks!
-ChipX
For ADB you obviously need to enable ADB debugging from the developer settings or to be in a recovery with ADB enabled. For Fastboot you need to be in bootloader mode (fastboot).
If your device is not recognized in either of these, check your drivers/cable/USB port.
Correct.
I have ADB debugging enabled from developer settings.
My device is not being recognized now in either mode (it was earlier).
I was trying to flash a new build/AP on the phone.
fastboot erase misc
fastboot -w
fastboot reboot bootloader
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update xxx.zip
I have done this countless times on multiple phones without any issues. It doesn't work today on this device
Just before the last instruction above, after I issued 'fastboot reboot bootloader', and when I tried check whether the device has come up in 'fastboot' mode by giving 'fastboot devices', I don't see it.
I can try re-installing the USB drivers again.
ChipX8 said:
Correct.
I have ADB debugging enabled from developer settings.
My device is not being recognized now in either mode (it was earlier).
I was trying to flash a new build/AP on the phone.
fastboot erase misc
fastboot -w
fastboot reboot bootloader
fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update xxx.zip
I have done this countless times on multiple phones without any issues. It doesn't work today on this device
Just before the last instruction above, after I issued 'fastboot reboot bootloader', and when I tried check whether the device has come up in 'fastboot' mode by giving 'fastboot devices', I don't see it.
I can try re-installing the USB drivers again.
Click to expand...
Click to collapse
Try updating your SDK platform-tools. They may be out of date.
I had this on my previous phone, it wasn't a big deal for me I just needed to add a ./ to each command and it would work. Hope it helps.
OzBoy1 said:
I had this on my previous phone, it wasn't a big deal for me I just needed to add a ./ to each command and it would work. Hope it helps.
Click to expand...
Click to collapse
That's why sometimes it's a better idea to run the adb/fastboot commands from CMD versus PowerShell (CMD shouldn't need "./") -- I'm assuming you're using windows as Linux & Mac OS require the ./ regardless...
I'm sure platform tools needs to be updated (for the OP), but 2 things to keep in mind is to be sure not to be using anything like "minimal adb and fastboot" and there has been reported issues on the updated platform tools (r34), so maybe there's that to consider...
Not to sound silly but have you CD'd to the Android/platform-tools directory
Have you run
adb kill-server
adb start-server
adb devices
and hit OK on the popup that shows up on your phone after start-server?
HipKat said:
Not to sound silly but have you CD'd to the Android/platform-tools directory
Have you run
adb kill-server
adb start-server
adb devices
and hit OK on the popup that shows up on your phone after start-server?
Click to expand...
Click to collapse
Kill server is usually enough. No need for start server. I'm wondering why OP is using fastbootd though.
Also, you don't need to use ./ With PowerShell if you enter "cmd" (without quotation marks of course) as your first command. After entering that, PowerShell works like command prompt.
xunholyx said:
Kill server is usually enough. No need for start server. I'm wondering why OP is using fastbootd though.
Also, you don't need to use ./ With PowerShell if you enter "cmd" (without quotation marks of course) as your first command. After entering that, PowerShell works like command prompt.
Click to expand...
Click to collapse
I can't seem to find where OP is specifically using fastbootd versus regular ol' fastboot mode...
but thanks for the tip of typing "cmd" in powershell! It's good to know! I'm always wary of using powershell and am in a lot of situation counseling other users on it, so this will come in handy versus attempting to get them to switch to cmd and/or with administrative privilages....
simplepinoi177 said:
but thanks for the tip of typing "cmd" in powershell! It's good to know! I'm always wary of using powershell and am in a lot of situation counseling other users on it, so this will come in handy versus attempting to get them to switch to cmd and/or with administrative privilages....
Click to expand...
Click to collapse
In case you didn't know, you can also just type "cmd" in the address bar of your Platform Tools folder and skip PowerShell altogether.
Lughnasadh said:
In case you didn't know, you can also just type "cmd" in the address bar of your Platform Tools folder and skip PowerShell altogether.
Click to expand...
Click to collapse
Thank you...I was aware of this handy tip... but when dealing advice on platform-tools matters, just avoid any potential mishaps or hiccups, I try to get an elevated (administrative privileges) prompt, and I was never sure if going about it in this manner would achieve this...
But thanks for saying this! It might really help someone in a general sense...
simplepinoi177 said:
Thank you...I was aware of this handy tip... but when dealing advice on platform-tools matters, just avoid any potential mishaps or hiccups, I try to get an elevated (administrative privileges) prompt, and I was never sure if going about it in this manner would achieve this...
But thanks for saying this! It might really help someone in a general sense...
Click to expand...
Click to collapse
Yeah, I've never needed admin privileges when using command prompt for any flashing I've done so it works fine for me.
simplepinoi177 said:
Thank you...I was aware of this handy tip... but when dealing advice on platform-tools matters, just avoid any potential mishaps or hiccups, I try to get an elevated (administrative privileges) prompt, and I was never sure if going about it in this manner would achieve this...
But thanks for saying this! It might really help someone in a general sense...
Click to expand...
Click to collapse
I do the same, run cmd as administrator. Actually, I toggle every app to run as administrator when I use Windows
HipKat said:
I do the same, run cmd as administrator. Actually, I toggle every app to run as administrator when I use Windows
Click to expand...
Click to collapse
exactly....especially when counseling & troubleshooting others through adb/fastboot related operations...
You never know what set up they have on their (Windows) system, and it's always a headache and a hassle "in the field" when you run down dozens and dozens of troubleshooting steps and it ends up having nothing to do with operations or execution but simple stuff like permissions or attributes. That's why I just like to get it "out of the way" so to speak and have it established at the onset before going down a whole road (dozens of steps taken)...
simplepinoi177 said:
exactly....especially when counseling & troubleshooting others through adb/fastboot related operations...
You never know what set up they have on their (Windows) system, and it's always a headache and a hassle "in the field" when you run down dozens and dozens of troubleshooting steps and it ends up having nothing to do with operations or execution but simple stuff like permissions or attributes. That's why I just like to get it "out of the way" so to speak and have it established at the onset before going down a whole road (dozens of steps taken)...
Click to expand...
Click to collapse
Exactly. Now if Windows stopped making me go in and retoggle Run as Administrator after every update... >: