[Q] How to use ADB - Atrix 4G Q&A, Help & Troubleshooting

Ok, this might be a real noob question.
I've read threads on how to use ADB and all they say is: use these and that command. None of them say WHERE to type in those commands.
So to my question... how exactly do i get to ADB mode and type in those commands?

well, i'm guessing you have ADB downloaded? if not, you can get it at http://developer.android.com/index.html
then extract ADB files to a folder on your computer, preferably right on the C drive. i have my in C:/Root
then go into the command promt, and do the command cd c:/(adb directory here)
my command is cd c:/root
after that, use your adb commands as instructed. like 'adb devices'
OR, you can just type the commands in the terminal emulator.

Do i have to plug in my phone already booted into android for ADB to work?

yes, your phone has to be on and connected to your computer.

Related

hello to a new forum, and already a newb question...

OK. Firstly, I have extensive experience with rooting moto droids and custom roms. That said I got cocky and didn't do enough homework trying to root my girls Eris and proceeded following the instructions in the "1.5 to rooted 2.1" thread. Step 1 went fine. I THINK I have root access. Anyway, like I was tired and couldn't get adb shell working so I left it at that with intent to finish today when I get home from work. Now she's telling me her icons are different and some are linking to different programs. Any ideas? Second, can someone point me in the direction of an adb shell how to, on my Droid I can just use terminal emulation and don't actually need a computer so I'm not too familiar with the process... sorry for the stupid newborn questions, don't pull the flame throwers out yet, thanks!
You can use terminal emulator, same thing for the most part as adb... I use that more then adb, faster then having to connect to a pc IMO.
I tried the terminal emulator and got adb not found or not allowed or some craziness like that. Does that mean I didn't root like I thought? Also, any clue about the icon s changing or linking to other apps like shes claiming? I'm going to try again when she gets home
In the terminal emulator you would not need to type adb.. adb is the program you would be using on a pc to talk to the phone... what is it that you are trying to type through adb or the terminal?
III: Flashing a Custom Recovery
Flashing a custom recovery will make your life easier when flashing ROMs in the future.
1. Download this file: Recovery.zip
2. Extract file contents to your \tools\ directory of your Android SDK.
3. Open up a command prompt and go to your tools directory, and execute these commands:
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
4. Success! You now have a recovery partition installed on your phone. You can access it by running "adb shell reboot recovery" or by powering off your phone, holding "Volume Up + Power On"
step 3. im an ass. ok so dont type the adb. like i said, not much exp in this part... im guessing i dont tye shell either, but i do type mount?
evilsway said:
III: Flashing a Custom Recovery
Flashing a custom recovery will make your life easier when flashing ROMs in the future.
1. Download this file: Recovery.zip
2. Extract file contents to your \tools\ directory of your Android SDK.
3. Open up a command prompt and go to your tools directory, and execute these commands:
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
4. Success! You now have a recovery partition installed on your phone. You can access it by running "adb shell reboot recovery" or by powering off your phone, holding "Volume Up + Power On"
step 3. im an ass. ok so dont type the adb. like i said, not much exp in this part...
Click to expand...
Click to collapse
Oh I see, for that yes you will need to get the SDK setup on your PC as per step 2... There is another thread that has a batch file that does all of this for you. You still need the SDK though.
see: http://forum.xda-developers.com/showthread.php?t=651669
ok, i have the sdk, i followed these instructions to the letter, and i still couldnt get it running last night, where in the sdk do i do this from or is it a command promp, or can i use the terminal emulator?
yes in the command prompt, typically adb.exe will be in your tools folder.
also, and i know im being a pain now, but by adb does it mean the adb in the tools directory of the sdk, i click it and it runs a script then dissapears.
evilsway said:
also, and i know im being a pain now, but by adb does it mean the adb in the tools directory of the sdk, i click it and it runs a script then dissapears.
Click to expand...
Click to collapse
yes, adb needs to be ran through the command prompt, if you click on it in windows it wont work... read the thread I linked you to, you wont need to run adb if you use that method, it does it all for you.
yeah im downloading the file now, but im just curious, now i want to be able to do it just to do it. i hate when i cant figure crap like this out,
so far ive done this, opened command promp, put in C:\androidsdk\android-sdk-windows\tools\adb.exe and it runs a script then nothing
evilsway said:
yeah im downloading the file now, but im just curious, now i want to be able to do it just to do it. i hate when i cant figure crap like this out,
so far ive done this, opened command promp, put in C:\androidsdk\android-sdk-windows\tools\adb.exe and it runs a script then nothing
Click to expand...
Click to collapse
go to start, run and type cmd and enter. then in that window
you have to change to the tools directory at the command prompt like so"
cd androidsdk\android-sdk-windows\tools
then type adb
Renocat said:
go to start, run and type cmd and enter. then in that window
you have to change to the tools directory at the command prompt like so"
cd androidsdk\android-sdk-windows\tools
then type adb
Click to expand...
Click to collapse
Yeah, once you do what he states and type...
cd androidsdk\android-sdk-windows\tools ... or where ever you have your SDK saved at on your computer ... you should be good to start running those scripts in the directions.

Help "pushing" files to eris using mac

So ive been trying to figure out how to push files onto my eris for like a week now and im not smart enough with computer to so it. Ive downloaded the mac ADB, and have a 2.2 emulator up and running. But when i plug my phone in i cant ever find it using terminal. Im pretty sure its just cause im using the wrong commands so if anyone knows them for a mac that would be awesome. Any info would help me, Thanks.
No emulator is involved. Find the adb executable, and cmd+c to copy it. Fire up terminal and cmd+v to paste it, then type a space, then "push" (without the quotes), then a space, then drag the file you want to copy onto the terminal window, then type the location on your phone you plan on pushing to (like /system/app/ for example). And that's it! But you should do an adb remount before pushing. Again, to do a remount, paste the adb file into terminal or drag it in, then type a space, then "remount" (without the quotes).
It's been a while since I did the initial install steps, but the main difference to the commands is having to use a dot and a slash before the command "./" to specify the command you want to run is in the directory you're working in. Other than that, the PC steps are the same.
For example, my files are in a sub-directory under my user profile: /Users/<user_name>/Phone/android-sdk-mac_86/tools/ which can also be typed as ~/<user_name>/Phone/android-sdk-mac_86/tools/
So, in Finder, I go to that directory and double click the android file. That starts terminal which also starts the Android app. I go back to Terminal, press Command+T to open a new tab in Terminal (just so I won't have a ton of windows open), change directory to ~/<user_name>/Phone/android-sdk-mac_86/tools/ then I run the adb command typed as ./adb
So, to re-cap step by step:
My adb files are located in ~/<user_name>/Phone/android-sdk-mac_86/tools/
Make sure your phone is connected in USB debugging mode
In Finder, go to the above directory and double click android
Switch back to Terminal, press Command+T to open a new tab and change directory to ~/<user_name>/Phone/android-sdk-mac_86/tools/
Type: ./adb remount
Type ./adb shell (or whatever adb commands you want to run)

Help with ADB

Got a new computer and Im having trouble getting my ADb setup. When I try to run adb devices I get
adb is not recognized as an internal or external command, operable program or batch file.
I have adb setup on C, JDK is installed. Downloaded drives from htc sync, but did not install htc sync. Under Device Manager, the phone is listed as
-Android USB Devices
-My HTC. the monitor has a lilttle yellow triangle with an !. I tried to update the drives, but it says I have the most recent installed.
Any help would be greatly appreciated. Thanks.
Edit.....need to use the platform-tools folder, not tools.
+1
I have tried to run ADB on my Inc, Nook Color and now the TBolt.
I just cant get it to work.
It would be easy to just say I am a dope, but I have had a highly successful run with the Inc. I have flashed/installed/performed/restored every worthwhile mod available for the INC and Nook with no trouble. I just cant get ADB to run.
ive just helped someone with this.
they HTC Sync software has the ADB drivers
download
install
then cancel HTC sync instalation
http://forum.xda-developers.com/showthread.php?t=1000751
It sounds to me like your problem is that the adb executable is not in your path and you're not trying to run it from within the directory it is installed in, as indicated by your saying "adb is not recognized as an internal or external command, operable program or batch file".
In your terminal window, try using the cd command to switch to whatever folder the adb.exe file is in, and then try running the command. You don't even need the phone hooked up to test at first...just type adb devices or something to see if the app runs or not. On my Mac, if I just type adb at the command line, adb responds with a list of all available commands.
Do a dir command (Win) or ls (Mac/Linux) to confirm the file is in the same directory you are.
distortedloop said:
It sounds to me like your problem is that the adb executable is not in your path and you're not trying to run it from within the directory it is installed in, as indicated by your saying "adb is not recognized as an internal or external command, operable program or batch file".
In your terminal window, try using the cd command to switch to whatever folder the adb.exe file is in, and then try running the command. You don't even need the phone hooked up to test at first...just type adb devices or something to see if the app runs or not. On my Mac, if I just type adb at the command line, adb responds with a list of all available commands.
Do a dir command (Win) or ls (Mac/Linux) to confirm the file is in the same directory you are.
Click to expand...
Click to collapse
Yea, the error is the one you get when you use a windows command thats not in the path. So do this, or add it to your path environment variable
Thanks to all who answered. That is why this community is the best. The older version of adb just had tools folder, while the new version has platform tools that needs to be used. Again thanks.
sent from my commando style T-Bolt.
I'm on win 7 32 bit.
I have HTC sync installed, adb installed, added system variables and cannot get adb to recongize my device in command prompt.
http://www.youtube.com/watch?v=A1SOSXwkc_8

[Q] OSX, adb usb, adb devices = error: device not found

when I type adb devices cmd in the terminal it does not list my device and its plugged in....
when I try to type adb usb it says no devices found...
for the record nothing is wrong with my USB connection cable because, I'm able to connect my HTC ReZound via USB cable to my macbook, the CDROM and STORAGE auto mounts to my desktop so i know the connection is working, because I'm able to copy files, update music via winamp sync playlists, also my paid EasyTeather copy works, etc.
I updated & installed most recent Android SDK adt-bundle-mac-x86_64-20130917 and updated the device manager for my ver 4.0.3 and all tools, even tryed using a stand alone platform-osx-tools.zip that contains a adb and fastboot...\
I read up on this and found nothing tryed everything....
adb kill-server > adb start-server - does nothing
adding device in the adb_usb.ini didn't help either.
chmod a+r /etc/udev/rules.d/51-android.rules after creating file didn't help.
rebooted many times .
i've attached a terminal cmd window below to show.
USB debugging is enabled on the device, yes? Does the "USB debugging enabled" notification show up when you plug it into the computer?
MaxxPayne said:
when I type adb devices cmd in the terminal it does not list my device and its plugged in....
when I try to type adb usb it says no devices found...
Click to expand...
Click to collapse
are you doing proper methods in command prompt for sdk's adb such as directing it to the folder its in...example did you type cd c:/androidsdk/platform_tools/ in command prompt for example
I used to have a mac ....but here
Download htc sync for mac
http://www.iskysoft.com/convert-mobile/sync-htc-to-mac.html
Download the sdk and all you need is a folder called platform tools
http://developer.android.com/sdk/index.html
Extract the platform tools folder Put it on your desktop
Open terminal type "cd" then hit space then drag and drop the platform tools folder into the terminal after that hit enter
Then you can run any command just make sure to put "./ " before the command without quotations so if you wanna flash a boot you would put
./fastboot flash boot boot.img and hit enter
Note that adb works perfectly well on my Mac without the HTC Sync drivers.

(SOLVED) Need help flashing battery.zip Linux Mint

I am trying to fastboot flash a dtb battery.zip. I am brand new to linux. Only been using it about a week. I did manage to get adb installed from the software manager. I have the battery.zip saved in Downloads. I have USB debugging enabled. However, I never get a prompt to allow the computer. When I run adb devices though there is a device listed. I must have did a thousand google searching trying everything I find and I cannot get this file on my tablet Can someone please help me out?
0
Seppppx said:
Did you follow these Linux ADB guides? How to Install ADB on Linux
1. Download the ADB ZIP file for Linux
2. Extract the ZIP to an easily-accessible location (like the Desktop for example).
3. Open a Terminal window.
4. Enter the following command: cd /path/to/extracted/folder/
5. This will change the directory to where you extracted the ADB files.
6. So for example:cd /Users/Doug/Desktop/platform-tools/
7. Connect your device to your Linux machine with your USB cable. Change the connection mode to “file transfer (MTP)” mode. This is not always necessary for every device, but it’s recommended so you don’t run into any issues.
8. Once the Terminal is in the same folder your ADB tools are in, you can execute the following command to launch the ADB daemon: adb devices
9. Back on your smartphone or tablet device, you’ll see a prompt asking you to allow USB debugging. Go ahead and grant it.install adb
10. Finally, re-enter the command from step #8. If everything was successful, you should now see your device’s serial number in the Terminal window output. Congrats! You can now run any ADB command on your device! Now go forth and start modding your phone by following our extensive list of tutorials!
Source https://www.xda-developers.com/install-adb-windows-macos-linux/
Click to expand...
Click to collapse
Yes I have all that taken care of. The device is recognized. However, I never got a prompt to accept the computer connection. I'm wondering if you get one when your using Linux? Anyways, adb devices shows one device and serial number. I then enter adb fastboot reboot fastboot. Once rebooted I tried fastboot flash battery.zip. This did not work. I must have the wrong command or something but I cannot find directions from where I left off above.
Found instruction but their not working. The proper command was abd reboot bootloader. Once there when I run adb devices I get nothing. Why does it show a device in android but not in the bootloader? I also tried just running the command fastboot flash battery.zip I got the fallowing bash: fastboot: command not found. Also, tried unzipping the battery folder first and flashing battery.dtb. Still no go. It is because it is not being found in fastboot. I have no clue why.
I figured it out.
In software manager install.
android-tools-adb
android-tools-fastboot
Download unzip it in your downloads folder.
Download your battery dtb file unzip and pit it in the platform-tools folder.
Enable USB debugging on your phone or tablet.
In terminal type sudo cd /home/rocky/Downloads/platform-tools
Type sudo adb devices. You should see a device number.
Type sudo adb fastboot reboot bootloader
Type sudo fastboot devices
Type sudo fastboot flash dtb xxxxx.zip. xxxxx.zup is the name of your batty dtb file.
You should see your file being transferred.
Once complete type exit and reboot phone or tablet.

Categories

Resources