ADB Survival Guide for Android - Android Software Development

Hello,
Android Debug Brigde (ADB) is a command line tool, coming with Android SDK provided by Google, that lets developers to communicate with an emulator or a connected Android device directly from the command line. ADB is an essential tool but few developers know really its possibilities.
This Survival Guide aims to regroup essential features offered by ADB.
Link to complete article is here : http://www.ssaurel.com/blog/adb-survival-guide-for-android/
A PDF version of ADB Survival Guide can be found here : http://goo.gl/8yVmpJ
Don't hesitate to tell me if you have comments about this guide.
Sylvain

Hello,
I updated ADB Survival Guide to add some commands.
Enjoy !
Sylvain

Nice list. Easy for new people to learn off.

Art Vanderlay said:
Nice list. Easy for new people to learn off.
Click to expand...
Click to collapse
Thanks .
Don't hesitate if you have ideas to improve.

sylsau said:
Thanks .
Don't hesitate if you have ideas to improve.
Click to expand...
Click to collapse
Its fine the way it is I've just got a couple of questions.
Are there any other keyinput commands or combinations of them that you find useful?
And what types of dumpsys do you find are the most useful for debugging problems or getting info?

Related

[Q] Can't Get S=OFF, I rooted, But it Stays On?

Hi, I have just joined the forums to seek a fun, helpful community, I just got the Mytouch 4g as well, This is my first Android Phone.
In the middle of my Root process, after I entered..
su
cd sdcard/root
sh root.sh
I get the instructions. But After I turn off and reboot my phone while holding down Volume Down, I get the S=ON still.
May anyone please help me, I am even willing to donate $ Via paypal
Thank you for your time.
http://forum.xda-developers.com/showthread.php?t=858996
Try that first. Not sure why people are still using older methods with gfree available.
Kline said:
http://forum.xda-developers.com/showthread.php?t=858996
Try that first. Not sure why people are still using older methods with gfree available.
Click to expand...
Click to collapse
Because they want to do it the easy way. They do not want to take the time to do it they way it was meant to be done.
Well, Whenever I search for Adb devices in the command prompt nothing is founnate $. Thank you.d, When I do the Adb messages, Can anyone still help me with visionary or adb, I will do
assurgency said:
Well, Whenever I search for Adb devices in the command prompt nothing is founnate $. Thank you.d, When I do the Adb messages, Can anyone still help me with visionary or adb, I will do
Click to expand...
Click to collapse
If you are using Windows use the link in my signature for TrueBlue's ADB setup.
Thank you, This has let me use ADB Command Prompt, But not as I wanted.
When I typed ADB Devices
I get a blank list.
When I plug in the phone, and the installed drivers are showing, all are installed but Adb.
I really do not know what is wrong, many anyone view my computer screen via teamviewer.
Thank you very much, I would like to donate to anyone who solves my solution.!
assurgency said:
Thank you, This has let me use ADB Command Prompt, But not as I wanted.
When I typed ADB Devices
I get a blank list.
When I plug in the phone, and the installed drivers are showing, all are installed but Adb.
I really do not know what is wrong, many anyone view my computer screen via teamviewer.
Thank you very much, I would like to donate to anyone who solves my solution.!
Click to expand...
Click to collapse
are you sure usb debugging is enabled under settings/applications/developemnt?
neidlinger said:
Because they want to do it the easy way. They do not want to take the time to do it they way it was meant to be done.
Click to expand...
Click to collapse
Don't really understand you. To me, gfree is the easy way. It's not much simpler than unzipping a file and running it. It has a better track record of success than any of the previous methods, but, whatever. To each their own struggle.
assurgency said:
Thank you, This has let me use ADB Command Prompt, But not as I wanted.
When I typed ADB Devices
I get a blank list.
When I plug in the phone, and the installed drivers are showing, all are installed but Adb.
I really do not know what is wrong, many anyone view my computer screen via teamviewer.
Thank you very much, I would like to donate to anyone who solves my solution.!
Click to expand...
Click to collapse
I dont take donations, but I am happy to help in any way I can. If you have a blank list you probably havent installed the drivers correctly or you have not turned on USB debugging.I will be happy to view your screen. Send me a Private Message with the info to do that if you still need the help.
Kline said:
Don't really understand you. To me, gfree is the easy way. It's not much simpler than unzipping a file and running it. It has a better track record of success than any of the previous methods, but, whatever. To each their own struggle.
Click to expand...
Click to collapse
We know that it is the easiest. But yet we've taken the time to learn ADB and what does what. Most people see the ADB commands and get nervous and want to do something that is automated and scripted. where all they have to do is punch in a "go" command and everything is done for them.
if you have issue with ADB using SDK just download this zip, extract it and transfer it to the SDK it will work just fine
http://www.mediafire.com/?547p5fc2b5wvf6b
I need some help too,,,I tried everything and I have the same problem
Sent from my HTC Glacier using XDA App

[Q] Using fastboot.

So I am not quite sure what exactly fastboot is supposed to do. I know you can flash recoveries, bootloaders, etc with it but that is about it for my understanding.
I tried to get into fastboot (following instructions here on the forum) mode earlier today and while the tablet gives me the fastboot message in the upper left, windows says that fastboot failed. Is there a folder I am supposed to be running cmd prompt from?
Sorry, still new to this stuff and my understanding of some of these tools is limited at best.
Sent from my A500 using Tapatalk 2
a friendly warning
CyaN1de said:
So I am not quite sure what exactly fastboot is supposed to do. I know you can flash recoveries, bootloaders, etc with it but that is about it for my understanding.
I tried to get into fastboot mode earlier today and while the tablet gives me the fastboot message in the upper left, windows says that fastboot failed. Is there a folder I am supposed to be running cmd prompt from?
Sorry, still new to this stuff and my understanding of some of these tools is limited at best.
Sent from my A500 using Tapatalk 2
Click to expand...
Click to collapse
Give me 30 mins got all the reading u gonna need b4 u make an attempt
if u fk up in here there is definitely NO WAY BACK in meantime you'll
Want to set adb as environmental variable in windows gonna make it
Helluva lot easier . Android sdk will too. f u don't know what I'm on About..
.best do some reading up on these as well.
Fast boot ain't something someone else can talk u thru and I doubt the devs will
Have any sympathy for anyone asking ....i bricked my tab pls help....
dibb_nz said:
Give me 30 mins got all the reading u gonna need b4 u make an attempt
if u fk up in here there is definitely NO WAY BACK in meantime you'll
Want to set adb as environmental variable in windows gonna make it
Helluva lot easier . Android sdk will too. f u don't know what I'm on About..
.best do some reading up on these as well.
Fast boot ain't something someone else can talk u thru and I doubt the devs will
Have any sympathy for anyone asking ....i bricked my tab pls help....
Click to expand...
Click to collapse
Running adb from its native folder is not an issue.....is fastboot the same way having to run cmd from folder that a file is located?
I prefer not to mess stuff that I do not fully comprehend (not that I fully comprehend ANY of this) but some of it makes more sense once you are into it rather than reading someone elses interpretation.
Sent from my A500 using Tapatalk 2
CyaN1de said:
Running adb from its native folder is not an issue.....is fastboot the same way having to run cmd from folder that a file is located?
I prefer not to mess stuff that I do not fully comprehend (not that I fully comprehend ANY of this) but some of it makes more sense once you are into it rather than reading someone elses interpretation.
Sent from my A500 using Tapatalk 2
Click to expand...
Click to collapse
yeh just a group of extended adb commands that allow you to do some pretty awesome stuff - like really, really bricking your tab for instance, lol. I'm unsure as to whether all the fastboot commands are available to us - i havent had enough spare time to devote to heavy duty reading in the Dev Forums!!!! You can flash everything in here so its like a supercharger;;;;Sort of like going from timmydeans EUU root to Civ's nvflash unlocking bootloaders thing, if you know what i mean.......
But heres some reading, most of it tutorial step by step stuff, mostly for other devices which may not apply to our tab but definitely apply to fastboot. AS you know, there is alot of info in our own dev forum but its hard to find a flow as the devs actually speak a different language to us!!!! So the tutorials are quite good in that respect as they use noob-ite speak
the backup and restore tute is a goody, couldnt get it going on v3 so looking forward to giving it a go on v4 (when i can find a quiet 30 mins or so, that is)
anyways happy reading be interested in your thoughts and keep us posted about what you get around to trying
rgds
Full Phone Backup http://forum.xda-developers.com/showthread.php?t=1420351
setup adb http://forum.xda-developers.com/showthread.php?t=1249798
adb http://forum.xda-developers.com/showthread.php?t=879701
adb logcat http://droid-force.com/showthread.php?tid=150&pid=573#pid573
ics BL by Skrilax_CZ http://forum.xda-developers.com/showthread.php?t=1514951
So I located Fastboot in D:\Android\android-sdk\platform-tools\Fastboot.exe
But putting tablet into fastboot mode yields the driver installer to report that "Device driver software was not succesfully installed".......Fastboot X Failed....is this normal? Will it run when I use cmd prompt from D:\Android\android-sdk\platform-tools?
I guess a little linux knowledge would go a long way.....too bad I can't get a grasp on that either.
Thanks for the links.....hopefully I can find time to give a read.
Set up adb/fastboot for noob-ites 101
CyaN1de said:
So I located Fastboot in D:\Android\android-sdk\platform-tools\Fastboot.exe
But putting tablet into fastboot mode yields the driver installer to report that "Device driver software was not succesfully installed".......Fastboot X Failed....is this normal? Will it run when I use cmd prompt from D:\Android\android-sdk\platform-tools?
I guess a little linux knowledge would go a long way.....too bad I can't get a grasp on that either.
Thanks for the links.....hopefully I can find time to give a read.
Click to expand...
Click to collapse
weird??? i kicked straight in to bl, fastboot drivers installed, never saw red x
u mean u arent cmd from platform tools???
in the cpuid guide I suggested extracting the just_adb.zip into C:\ so setting
up the env. var. would be easier I have been meaning to post the steps for
doing that, guess theres no time like the present
Set adb as Environment Variable or call adb direct from command prompt
............ first, copy the path to your install - in your case:
............ "Path to adb" = D:\Android\android-sdk\platform-tools
1. Click on the Start menu
2. Right click on Computer
3. Click on Advanced system settings
4. Click on the Environment Variables button
5. Look for Path in the System Variables section. Double click on it
6. Go to the end of the Variable value box and put in a semicolon ;
7. Now paste your "Path to adb" after the ;
8. it should look like this in your case ;D:\Android\android-sdk\platform-tools
9. Now test it out - start - run/search - cmd - in cmd window type: adb devices
10. If you've followed the steps you will see your device ID - voila!!!!
as you can see this makes trouble shooting so dam easy -
if you cant get a device id do not go any further in what u r doing
cos it aint gonna work....period!!!!! also since ICS has screwed
with getting our cpuid like this, for our purpose here, it is only important
that a device id is shown - not how right or wrong it is.....clear????
so getting back to it, check fastboot*.exe in same folder as adb.exe -
it came like this in my own setup not sure about the asdk setup -
remember too fastboot only has a few commands and i still havent
got round to trying them all out yet....
to anyone following this, I cannot say enough how dangerous this can be
please, please, please take a moment to read thru just one of the links i
posted earlier - they are tutorials and if you see the dev thread regarding
v4 unlock...you will not only learn something amazing but begin to
appreciate and respect the work done by these devs who laid the groundwork
that enabled civato and blakthund3r to produce what they have with the
unlocked bootloader - without this groundwork we would still be waiting
for a way to get full root access and cwm, custom roms, themes and mods......
Thanks for that
Seems my Windows skillz need brushing up on again too....LOL
C:\Users\username>adb devices
List of devices attached
11717XXXXXX device
CyaN1de said:
Thanks for that
Seems my Windows skillz need brushing up on again too....LOL
C:\Users\username>adb devices
List of devices attached
11717XXXXXX device
Click to expand...
Click to collapse
sweet m8 -
yeh whoever thought windoze would actually be useful!!!!
which i guess is freakn handy as having to go linux would spin me out....
what can i say??? I'm a child of windoze had no choice, forced-addiction
before i was born, lol - breaking the habit, but always go back, goddamit
OK....I get the adb ok.
But when I put tab into FB i get the driver error (see attachment). I suppose that I should not be getting this?
Trying just "fastboot reboot" (not wanting to go any farther until I get a grasp...HAHA) I get "waiting for device"
CyaN1de said:
OK....I get the adb ok.
But when I put tab into FB i get the driver error (see attachment). I suppose that I should not be getting this?
Click to expand...
Click to collapse
dont let windows install
choose let me choose where to install dunno exact wording
Does not give me a choice.
Driver is located at D:\Android\android-sdk\extras\google\usb_driver ???
This is making my head hurt....LOL
CyaN1de said:
Does not give me a choice.
Driver is located at D:\Android\android-sdk\extras\google\usb_driver ???
This is making my head hurt....LOL
Click to expand...
Click to collapse
Yr head hurts????
Ive updated the cpuid guide u my wanna take 5 min timeout to read it, the answers r all in there
I don't use full sdk there's a link to mini sdk zip in that post just has ad and fast boot
I've never had to use google drivers
Just plugged my tab in and its just 'worked'
DL Acer drivers if u haven't already . These are the most important ones to have installed right.
Disconnect and reboot everything
Run Acer setup.exe
Plug USB in
Go into fast boot, win doze will want to install f/b drivers let win doze do it, but if they fail, then run again and choose let me install, blah, blah, blah
What OS u got? Vista/win 7 don't normally have any probs
Acer drivers have been installed and all relevant sdk packages installed and up to date AFAIK. (USB_Acer_1.06.1500_A30HA31H_A.zip)
Had no issues installing ICS Bootloader V.3 manually through APX (no auto script) via instructions so I know I can at least do that well.....LOL
Might have to try reinstalling USB drivers and see if that helps.
Thanks
EDIT: Reinstalled USB Drivers now I can't get adb working....F#@K!!!!!!!!!
EDIT II: Re-Re-Installed Drviers and ADB working again...yay...LOL
EDIT III: Used A500_Manager.exe, clicked on "Enter Fastboot" and windows installed and recognized drivers......DBL YAY!!!!
C:\Users\username>fastboot reboot
rebooting...
finished. total time: 0.165s
Now.......to Brick this puppy.....
Thanx for your help dibb_nz....looks like all I needed in the first place was a driver reinstall...HAHA.
Hek m8 for a second or two there, I was feeling ya pain, lol
Oh but the elation when it finally happens!!!!!
I dunno why those drivers act out like that, but it always the same....
Fail, reinstall, fail, reinstall u can understand why peeps get frustrated
Glad u got it m8

[Info]NVflash and ADB

Hi guys.
First off i want to say thanks to the guys who have made up these tutorials as its in no way my work.
Theres some great tools available for us now but sometimes just getting an understanding of what to do or where to get the files you need isnt so obvious......so this is why ive done this. Report it for removal if its surplus to requirement etc etc.
What this is - I got frustrated etc when trying to help fix a TF a few days ago. I had never used ADB, never knew how to set it up and always wondered where to type the commands some of the guys on here talk about. Although i had Nv flashed my TF it had been a long time so needless to say i got a bit pissed off with that aswell. So..........ive found the first site i used for NVflash with a video guide & ive found a tutorial on how to set up ADB to make life a little easier.
It also shows what "apx" looks like and how to update the driver, how to access "apx" mode.
Note: the nv flash guide is for sbk1 only but im sure the sbk2 owners will get a better understanding of what files they are meant to be clicking on when required
If any info is wrong or anyone wants to update with different info then please do so...........try and keep the language simple and maybe do a quick guide as it always helps.
NVflash Guide using Roaches Prime Rom (Honeycomb) but you can use the stock I.C.S NVflash files found in the developer section (download.bat or simply "download" as its named)
NVflash tutorial with video and all files required for sbk1
I.c.s stock files here Stock ics / full restore /NO ROOT etc
For Sbk2 - look for the Peri tool or Easy flasher tools and read up on Wheelie (Nvflash tools)
ADB guide as follows although i have to say i havent tried editing the path as mines looks totally different but if someone could confirm that this guide is correct then id appreciate it or if they would like to post up an alternate guide.
Windows ADB install guide
Read all info and be confident before you attempt anything / DO NOT proceed if you are not 100% - Anything you do is at your OWN risk
I now have a stock ics nvflash folder set up on my laptop incase i need to rma and i have the honeycomb nvflash folder set up just incase i want to start over. Apx drivers are in.....so good to go in an emergency.
As for ADB im going to get a little more advice from one of our experienced members before i change anything in the laptop!!
Thanks to Roach, Rayman, Bumblebee and everyone involved in the guides etc etc
If this helped hit the Thanks - if you want to donate then donate to guys that have made the new flashing tools, Roach or another dev - Not Me!
***Yes i see the Root guide thats pinned but felt this would be easier to find when searching the forum titles & now that Nvflash is available for sbk2.***

Paid service to Flash New ROM?

Hi Everyone,
I have spent hours trying to root, get S-Off and back up my HTC Desire Z.
It's the first time I have done it and I'm a complete newbie to all of this and it's way out of my level of proficiency.
Even though the guides have been written very well this whole thing is really beyond me.
Is there a paid service or is there someone on here who has done this before a few times that could do this for me remotely? I'd be happy to pay and sit here while you work your magic.
Hopefully someone can steer me in the right direction.
Thanks!
Jason
umm, its often not the best idea to give someone access to your computer remotely, but your choice. id suggest trying to find someone local to help you. but there is always more options, often free
first of all there is little expertise needed to do it yourself, and I suggest learning how to root and why the rooting process itself works, as in the future you are bound to run into issues and not understand them, this could lead you to inadvertently brick your phone. for the most part having a rooted phone allows you to do anything to it, meaning a brick is much more possible.
I suggest reading up a bit on the process, finding out what benifits it has, and if you really need this. my guess is you want custom roms and the ablitity to use rooted apps, great, we all do. so do a little reasearch on the pros and cons and you will feel much better about it.
use google, its helpfull, search "cyanogen wiki g2 root" and "xda wiki vision root" and similar terms to find the proper rooting guides. also "reasons to root android"
read through the guides, log onto freenode irc #g2root (google it) and there will be many helpful people there that can explain what to do and why it works.
you'll be much happier and much more well informed. this will help you understand the process so future devices won't be overly complicated to you and lessen the chance for a brick, good luck!
Sent from my HTC Vision using xda premium
You get good at it the same way you get to Carnegie Hall: practice.
Sent from Spaceball One.
jason.choy said:
Hopefully someone can steer me in the right direction.
Click to expand...
Click to collapse
Hi mate,
I'm kinda in the same boat as you but I agree with the others, just stick at practising and you'll get better at it. You've managed to get root right? So that is the hardest part over and you did it. Flashing new ROM should be the easy part.
You can get real time help from the more experience members of this forum by going to this chat site:
Or you could join the irc channel, #G2ROOT on http://webchat.freenode.net/
Click to expand...
Click to collapse
where the likes of Nipqer and Setherio will be able to assist providing you ask nicely.
Go to this thread: http://forum.xda-developers.com/showthread.php?t=1178912&page=65 and ask away.
There aren't many guides here that actually work. Trust me, I've had trouble with other G2 phones. The process of downgrading and then rooting the phone is still difficult. The only guide I've ever found to work is this one. Just go down where it says "Rooting the Vision (G2/DZ) and DHD ". It explains how to downgrade, root, and install custom recovery onto your phone.
I can give you a few pointers from the guide.
#1 Get the Android SDK kit. You'll need it just to be able to do anything.
#2 Know some DOS. You may need to get yourself into the Android SDK directory or other directories. For example, cd "" is a great command. All you do is browse to where you need to go in Windows Explorer and right click the bar on top and select "copy address". Just paste that address between the quotations and you would have done half the work in modifying your phone. Also, you can paste stuff right into DOS by right clicking and selecting paste.
#3 Know some Terminal commands. Using "ADB shell" starts a terminal like shell that isn't dos, but is done through dos. Some commands need to be done in pure dos and some through ADB shell. The $ in adb shell means no root, and # means root.
Dukenukemx said:
The only guide I've ever found to work is this one.
Click to expand...
Click to collapse
That's the same guide that I used last night to root and it worked perfectly for me. I did have issues with the temp-root to backup but Nipqer helped me out in IRC. It didn't end up working (the backup) but we decided that it didn't matter too much (I just used a different backup utility that did not require root).
I suggest you not to look for a payment method but to try it your self, use a guide or ask help to a friend (or here on xda), it's not so hard.

How to implement an adb wireless app?

Just to become familiar with a bit lower level android programming I would implement an app alllowing to connect to adb without plug in the USB cable but I need some hint (API, existing source code) to start developing it, I can't find any valid beginning tutorial.
If possible I want to develop it for rooted (found some code on github) and unrooted devices (no examples found) like many other apps already present on play store.
It is an education task and I want to implement myself or study existing source code, I was unable to find source code helping me to understand how to do so any suggestion is welcomed
My final goal is to submit on github
I researched about adb wireless some time ago, too.
Here's how to do that: http://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp
Execute the commands as described here: http://forum.xda-developers.com/showthread.php?t=2226664
nikwen said:
I researched about adb wireless some time ago, too.
Click to expand...
Click to collapse
I know this is an old topic but I'm starting now to develop in the land of root apps
nikwen said:
Here's how to do that: http://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp
Execute the commands as described here: http://forum.xda-developers.com/showthread.php?t=2226664
Click to expand...
Click to collapse
Thanks this is exactly what I need

Categories

Resources