adb commands not recognized - Android Software/Hacking General [Developers Only]

my adb commands in windows cmd are not recognized. I have done the following and am trying to install a custom boot animation
-Installed android SDK
-Installed Java SDK
-Have phone charging only while in debugging mode
-Added environment variable on windows 7 pc
First install of sdk yielded no recognition of adb commands, reinstalled and adb help command worked so downloaded the bootanimation i wanted, went back to command, ran adb command again - not recognized as valid command. So it seems the adb script commands just aren't sticking...arrggg
UPDATE : I have adb running commands now, but my device is not recognized [error: device not found] I have installed the google usb drivers and manually installed them on my computer but do not know if they are working correctly, there are three:
-Android ADB interface
-Android Bootloader interface
-Android composite ASD interface
FIXED : 1.Needed HTC Sense driver for adb inteface, found standalone driver 2. adb commands wouldn't run unless your in the adb directory - duh

Related

[TUTORIAL/HOW TO] Basics of ADB

Feel free to contribute - Creating this at toast's request
Will do my best to update this with everybody's experience and knowledge to help out the new comers. Welcome to the world of Android!!
Definition of ADB - http://developer.android.com/guide/developing/tools/adb.html
1. Install Drivers
Win 7 drivers - http://depositfiles.com/en/files/yd61xorii - thanks shep211.
Win 7 64bit, Vista and XP - Confirmed works with HTC Sync - thanks to crackerstyle OR use HTC Sync.exe from the stock MicroSD card shipped with the phone. Myn also used these drivers - http://member.america.htc.com/download/Driver/HTC EVO (Sprint)/HTC_Sync_2.0.40.exe
Mac OS X drivers -
Linux drivers -
2. Install ADB (part of Android SDK)
Google's Main page - on the Android SDK which contains the adb binary inside the tools folder - http://developer.android.com/sdk/index.html
Windows Specific Android SDK installer (contains ADB binary inside tools folder) - http://developer.android.com/sdk/download.html?v=android-sdk_r06-windows.zip
Linux Specific Android SDK installer (contains ADB binary inside tools folder) - http://developer.android.com/sdk/download.html?v=android-sdk_r06-linux_86.tgz
Mac Specific Android SDK installer (contains ADB binary inside tools folder) - http://developer.android.com/sdk/download.html?v=android-sdk_r06-mac_86.zip
3. Enabling ADB support on EVO
If using completely stock EVO, adb will be disabled in recovery and can't be enabled.
If using the PC36IMG.zip (userdebug RUU) automatically turns on adb in recovery mode.
If in normal android mode, adb can be enabled by Settings->Applications->USB Debugging.
4. Running (Executing) ADB on Host computer
Windows - start->run->cmd . Navigate to the extracted the Android SDK folder and into the subfolder called tools.
cd c:\android-sdk\tools\
Now simply execute the commands in Step 5 and 6.
5. Learn basic ADB commands
adb push - sends a file to the phone over ADB thru USB - adb push c:\test.apk /sdcard/test.apk
adb pull - receives a file from the phone over ADB thru USB - adb pull /system/app/Test.apk c:\Test.apk
adb shell - starts a shell connection with the phone
adb reboot - restarts the phone
adb reboot recovery - restarts the phone into recovery
adb reboot bootloader - restarts the phone into the bootloader (white screen)
adb remount - remounts the file system
adb install <path to .apk file> - installs an application - adb install c:\swype.apk
adb uninstall <package name> - uninstalls an application - package name is usually in the format, com.android.browser
6. Learn basic Linux commands to run through ADB shell
cd - changes directories - works through stock android toolbox - cd /system/app
ls - lists all files in the directory - works through stock android toolbox - ls /system/app/
cat - copies files - works through stock android toolbox - cat /system/app/Test.apk > /sdcard/Test.apk
rm - removes files - works through stock android toolbox - rm /system/app/Test.apk
mv - moves files from one location to another - works through stock android toolbox - mv /system/app/Test.apk /sdcard/Test.apk
cp - copies files - functions similar to cat - uses busybox installed by the EVO-recovery.zip into recovery mode - cp /system/app/Test.apk /sdcard/Test.apk
mount - loads the file system (usually auto loaded except sometimes in recovery) - mount /dev/block/mtdblock4 /system
unmount - unloads the file system - umount /system
joeykrim said:
Feel free to contribute - Creating this at toast's request
Will do my best to update this with everybody's experience and knowledge to help out the new comers. Welcome to the world of Android!!
1. Install Drivers
Win 7 drivers - http://depositfiles.com/en/files/yd61xorii - thanks shep211
2. Install ADB (part of Android SDK)
Google's Main page on the Android SDK which contains the adb binary inside the tools folder - http://developer.android.com/sdk/index.html
Windows Specific Android SDK installer (contains ADB) - http://developer.android.com/sdk/download.html?v=android-sdk_r06-windows.zip
Linux Specific Android SDK installer (contains ADB) - http://developer.android.com/sdk/download.html?v=android-sdk_r06-linux_86.tgz
Mac Specific Android SDK installer (contains ADB) - http://developer.android.com/sdk/download.html?v=android-sdk_r06-mac_86.zip
3. Learn basic ADB commands
adb shell - starts a shell connection with the phone
adb reboot - restarts the phone
adb remount - remounts the file system
4. Learn basic Linux commands to run through ADB shell
cat - works through stock android toolbox - copies files - cat /system/app/Test.apk > /sdcard/Test.apk
rm - works through stock android toolbox - removes files - rm /system/app/Test.apk
mv - works through stock android toolbox - moves a file from one location to another - mv /system/app/Test.apk /sdcard/Test.apk
cp - uses busybox installed by the EVO-recovery.zip into recovery mode - functions similar to cat - cp /system/app/Test.apk /sdcard/Test.apk
Click to expand...
Click to collapse
Thanks a ton joeykrim!!!!!!!!!!!!!!! Really helpful!!!!!!!
Yeah, super handy. I know enough linux to make my way around moving files and what not... but this saved me a few googles for download links and figuring out what adb was.
Danke danke.
how do you install the drivers?..it's just folders
jayv1717 said:
how do you install the drivers?..it's just folders
Click to expand...
Click to collapse
download file is blocked for me and i dont have win7 or the evo yet, so you'll have to help and hopefully others will chime in.
i would assume once you plug the phone in, it will prompt/ask for drivers, simply navigate to the folders from the download file.
jayv1717 said:
how do you install the drivers?..it's just folders
Click to expand...
Click to collapse
Just found this, read about halfway through the first post, under Installing Drivers
http://forum.xda-developers.com/showthread.php?t=532719
joeykrim said:
Feel free to contribute - Creating this at toast's request
Will do my best to update this with everybody's experience and knowledge to help out the new comers. Welcome to the world of Android!!
1. Install Drivers
Win 7 drivers - http://depositfiles.com/en/files/yd61xorii - thanks shep211
Win XP drivers -
Win Vista drivers -
Mac OS X drivers -
Linux drivers -
Click to expand...
Click to collapse
Aren't the drivers available through Android SDK. I know I just downloaded an usb_driver with the SDK Setup.
eddy g said:
Just found this, read about halfway through the first post, under Installing Drivers
http://forum.xda-developers.com/showthread.php?t=532719
Click to expand...
Click to collapse
That helped alot..thanks
finebrian224 said:
Aren't the drivers available through Android SDK. I know I just downloaded an usb_driver with the SDK Setup.
Click to expand...
Click to collapse
some drivers are.
did they work? what OS are you using?
For the record, I don't know about mac but I know linux doesnt need drivers.
forgot about ADB push?
dmc971989 said:
forgot about ADB push?
Click to expand...
Click to collapse
Also might want to add adb pull and install and devices. Also remember if it says it cannot find your device make sure usb debugging is set in Settings->Applications and type in adb kill-server and adb remount.
chuckhriczko said:
Also might want to add adb pull and install and devices. Also remember if it says it cannot find your device make sure usb debugging is set in Settings->Applications and type in adb kill-server and adb remount.
Click to expand...
Click to collapse
i was assuming push/pull went together... but i forgot about adb remount, good call
finebrian224 said:
Aren't the drivers available through Android SDK. I know I just downloaded an usb_driver with the SDK Setup.
Click to expand...
Click to collapse
No just fastboot drivers.
chuckhriczko said:
Also might want to add adb pull and install and devices. Also remember if it says it cannot find your device make sure usb debugging is set in Settings->Applications and type in adb kill-server and adb remount.
Click to expand...
Click to collapse
added path to enabling ADB from normal android mode.
dmc971989 said:
i was assuming push/pull went together... but i forgot about adb remount, good call
Click to expand...
Click to collapse
added adb push/pull and adb remount was already added.
thanks guys!
I just installed ADB USB driver, and I had to use the tip found below because the driver downloaded by the SDK setup didn't support the HTC EVO natively.
**couldn't post url so google "FYI EVO/Incredible ADB How-To - Android Developers | Google Groups" and open the first link **
forceOnature said:
I just installed ADB USB driver, and I had to use the tip found below because the driver downloaded by the SDK setup didn't support the HTC EVO natively.
**couldn't post url so google "FYI EVO/Incredible ADB How-To - Android Developers | Google Groups" and open the first link **
Click to expand...
Click to collapse
what version of windows are you using?
is this the correct link? http://groups.google.com/group/andr...4a2ddfef884?show_docid=649444a2ddfef884&pli=1
joeykrim said:
Feel free to contribute - Creating this at toast's request
Will do my best to update this with everybody's experience and knowledge to help out the new comers. Welcome to the world of Android!!
1. Install Drivers
Win 7 drivers - http://depositfiles.com/en/files/yd61xorii - thanks shep211
Win XP drivers -
Win Vista drivers -
Click to expand...
Click to collapse
anyone using a REAL version of windows (Win7 64bit) will need these drivers... pulled from the SDK autodownloader... was a ***** to find... prob need to disable sign enforcement... mine is. when asked which of the 3 to select press the first Android ADB Interface.
yea your welcome...
That file doesn't work for me :-(
It just says that it can't install the drivers when I try to update/reinstall driver for the device "ADB" in device manager. I have tried the drivers from the SDK, the set in the post from the OP and the one a couple posts above me. What gives?

[Q] 4.1.1 device detected in device manager but not in command prompt

THE DEVICE penta ws 708 c is detected in disk manager .even name and driver version displayed.
pdanet 3.02 installed and operating fine.when adb command is used in command prompt it runs fine.
but when adb devices command is run it shows under list of devices no name or number .
so also when backup command is run it says -adb unable to connect to the device. what needs to be done?
SDK IS UP TO DATE with ECLIPSE STARTING UP AND RUNNING AND PLATFORM TOOLS UPDATED> PLEASE CLICK ON ATTACHMENTS AND SEE IF YOU CN FIND ANY PROBLEMS THERE.

Cannot see Moto G XT1034 in adb

Edit: [SOLVED] I also had to copy over AdbWinUsbApi.dll from platform-tools. Derp.
I am running Windows 10 Pro on a Surface Pro 3. When I enter "adb devices" into a command line, there is nothing under "list of devices attached." USB debugging is enabled.
Initially I copied adb, AdbWinApi.dll, and fastboot to another directory from platform-tools from the Android SDK. Then I installed the Motorola Device Manager. But adb could not see my device. I then installed Minimal ADB which did not help. After that I uninstalled Motorola Device Manager and solely installed the drivers from this thread http://forum.xda-developers.com/showthread.php?t=2550635, including the additional file, which also did not work. But if I launch adb using Android Studio, and then typing "adb devices" into a command line, adb can then see my device. What does Android Studio do or use that is different? How can I make adb see my device solely from command line?

ADB & Fastboot Installer (Windows)

Android Debug Bridge (ADB) and Fastboot utility installer for Windows.
Description:
Lets you designate the directory where you want to install it.
Sets environment variable to access ADB and Fastboot commands on Command Prompt (CMD) as an external command.
Steps:
Enter the path to the directory you want to install it.
Notes:
Program must run with administrator privilege.
Links:
Version 1.0 (x86) — https://goo.gl/nOQaoX

issue with adb from TWRP

Getting this while trying to uninstall Google apps from TWRP using ADB:
c:\adb>adb uninstall com.google.android.youtube
/sbin/sh: cmd: not found
Other adb commands like shell, push, pull are working fine.
USB drivers and adb are pretty fresh, not older than 2 months.
adb version:
Android Debug Bridge version 1.0.41
Version 29.0.1-5644136
USB Driver, ver 11.0.0.0 was downloaded from developer.android.com.
Windows 10 recognize device as 'Android Composite ADB Interface'.
I have tried to disable MTP, unmount/mount System, Data - no avail.
What I'm doing wrong?
Pogo said:
Getting this while trying to uninstall Google apps from TWRP using ADB:
c:\adb>adb uninstall com.google.android.youtube
/sbin/sh: cmd: not found
Other adb commands like shell, push, pull are working fine.
USB drivers and adb are pretty fresh, not older than 2 months.
adb version:
Android Debug Bridge version 1.0.41
Version 29.0.1-5644136
USB Driver, ver 11.0.0.0 was downloaded from developer.android.com.
Windows 10 recognize device as 'Android Composite ADB Interface'.
I have tried to disable MTP, unmount/mount System, Data - no avail.
What I'm doing wrong?
Click to expand...
Click to collapse
Actually, it's more likely TWRP limitation. Some shell commands are not working, like pm.
Maybe I should bring this to TWRP thread instead?
First off, update your drivers the very latest. Then use the bootable TWRP image. The permanent TWRP has stripped down functions to fit in the tiny recovery of the Pixel 3a and 3a xl.

Categories

Resources