[TUTORIAL/HOW TO] Basics of ADB - EVO 4G Android Development

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?

Related

quake 3 install help

Can someone please give me detailed instructions how to install quake 3 on the samsung captivate
You have to be able to sideload applications and/or install non market apps. There are multiple threads on how to do this, which typically also include rooting. Anyway I would
1. Root the phone
2. Install the Phones drivers on PC
3. Download Qwaak3 Arena for your device
4. Unpack the rar file to somewhere on your PC
5. Copy the quake3 folder to sdcard/ (this is the internal SD card NOT the external sdcard/sd)
6. Put your phone in Debug Mode (Settings > Applications > Development > USB debugging)
7. Fire up Droid Explorer and load the APK file (Tools > Manage Packages > Install Package)
I cant install it using a powermac.
I download the apk
I cant open on my mac
I tried to install the apk onto my sd card
The file is there but when i install it and try to open it the game force closes.
Im a noob so I figure Im doing something wrong. I have some experience with installing files like this onto mobiles but new to android. any ideas?
*EDIT: This is for vanilla kwaak3. Not the kwaak3 arena that was pasted in the Captivate Apps forum*
I just got it working on my Captivate. I'm using Win7 64 bit though. You do not need to root to install and play Kwaak3.
Download adb - I got it through the Android SDK (you would only need to install the tools, nothing else unless you were going to develop). Then use adb to install Kwaak3.
List devices:
Code:
adb devices
If you don't have any Android emulators running, it should be the only thing that shows up. It'll be a bunch of letters and numbers followed by the word "device".
Then use adb to install the kwaak3.apk file. The '-s' flag designates which device to use - if you have multiple Android devices plugged in or emulators running.
Code:
adb -s <put your device ID here. It's the string of letters and numbers from above without the brackets> install kwaak3.apk
Then use adb to push each individual .pk3 file onto the sdcard. Use pak0.pk3 from the quake3 demo or from your cd if you own it. Take pak1-pak8 from the Quake3 1.32 point release.
You have to do it individually for each .pk3, for example, pak0.pk3...
Code:
adb -s <device> push <full path to pak0.pk3 without brackets> /sdcard/quake3/baseq3/
Once all .pk3's are in that folder, you're good to go.
Hope that helps.
Link to Android SDK:
http://developer.android.com/sdk/index.html
Link to adb instructions for your reference:
http://developer.android.com/guide/developing/tools/adb.html

Boot Animation with SkyRaider

Sorry about the post but I cannot find the post were it tells me how to install custom boot animations. I also need to be able to do the sounds. As far as I understand I have to put it in the media folder. I found the original one but it does not allow me to move it. I'm assuming I have to do it from recovery but I don't know how. Detailed instructions would be appreciated. I have a cold and the old brain is doing so well. Thanks
s-off your dinc and you can do it while booted
I was trying to avoid that because they do not have a way to undo s-off yet. Just incase my phone dies I dont want verizon to say I voided the warranty. Any way to do it without?
You can flash some of them from rom manager...that's how I did mine.
If you have rooted your phone, which you must have in order to install a custom ROM, you've already voided your warranty.
Adding S-OFF wouldn't change anything in the eyes of Verizon, and you can always drop your phone until it's physically broken if you need to take it in.
rom manager -> download rom -> Ihtfp69 -> boot animations -> download -> pick one
thats where i got mine from
MMBosstones86 said:
rom manager -> download rom -> Ihtfp69 -> boot animations -> download -> pick one
thats where i got mine from
Click to expand...
Click to collapse
When I try to install from Rom manager it doesn't load it says verification failed or something. Does anyone know how to manually install Droid 2 boot screen.
HTC incredible
SR sense 2. 5. 2
Radio 2. 15
Sent from my ADR6300 using XDA App
Did mine 'manually', since I'm rooted I have clockwork mod installed.
1. Boot into recovery (clockwork mod)
2. launched android SDK adb daemon
3. moved file from 'tools' folder of sdk to the proper destination on the phone.
4. Done.
Doctor Butts said:
Did mine 'manually', since I'm rooted I have clockwork mod installed.
1. Boot into recovery (clockwork mod)
2. launched android SDK adb daemon
3. moved file from 'tools' folder of sdk to the proper destination on the phone.
4. Done.
Click to expand...
Click to collapse
I'm not sure how to do step 2 your referring to. If you have a link to a thread that explains how to do that, it would be greatly appreciated.
Sent from my ADR6300 using XDA App
Well, you have to go to the android website and download the android SDK. Install it somewhere on your computer that's easy to access, preferably put the folder at the root of one of your hard drives.
You'll go into command prompt after that to do a lot of the work to transfer files.
So, make sure USB debugging is enabled (just in case) and boot your phone into cwm recovery. Connect the phone to your computer via USB.
in command prompt, cd to the android sdk's tools directory. From there, you can use the adb commands to transfer files.
So, for me, after connecting the phone I do the following in command prompt:
cd G:
cd androidsdk/tools
and then I use ADB to communicate with phone, first by verifying the phone is connected:
adb devices
(if adb is on your pc, it will auto run the daemon if it is not running)
If your phone shows up in recovery mode, you're set.
You may need to go into cwm and mount your system/sd card before transferring the file.
From there, you use adb shell to acess the phone's file systems.
If you put the boot animation to the phone you'll do something like (while in shell) mv bootanimation.zip system/somethingorother/bootanimation.zip
But don't take the above line as gospel. I dont remember the exact command line to use. Check the thread on "How 2 - ADB, Rooting...." for a list of commands in ADB shell and search for a webpage that gives basic linux commands.
Doctor Butts said:
Well, you have to go to the android website and download the android SDK. Install it somewhere on your computer that's easy to access, preferably put the folder at the root of one of your hard drives.
You'll go into command prompt after that to do a lot of the work to transfer files.
So, make sure USB debugging is enabled (just in case) and boot your phone into cwm recovery. Connect the phone to your computer via USB.
in command prompt, cd to the android sdk's tools directory. From there, you can use the adb commands to transfer files.
So, for me, after connecting the phone I do the following in command prompt:
cd G:
cd androidsdk/tools
and then I use ADB to communicate with phone, first by verifying the phone is connected:
adb devices
(if adb is on your pc, it will auto run the daemon if it is not running)
If your phone shows up in recovery mode, you're set.
You may need to go into cwm and mount your system/sd card before transferring the file.
From there, you use adb shell to acess the phone's file systems.
If you put the boot animation to the phone you'll do something like (while in shell) mv bootanimation.zip system/somethingorother/bootanimation.zip
But don't take the above line as gospel. I dont remember the exact command line to use. Check the thread on "How 2 - ADB, Rooting...." for a list of commands in ADB shell and search for a webpage that gives basic linux commands.
Click to expand...
Click to collapse
THANK YOU SIR. MUCH APPRECIATED.
Sent from my ADR6300 using XDA App

adb commands not recognized

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

[GUIDE]List all installed apps that don't allow adb backup

Some apps can't be backed up using adb backup. It is mainly because on its AndroidManifest.xml the flag android:allowBackup is either not set or set to "false". This tutorial will get you a list of apps that are currently installed on your device but will not be backed up, either using the official adb backup, LG Backup, Sony Backup and Restore, etc. (because they all use adb backup internally). So you can be cautious on advance and you are aware that the backup methods used officially have its flaws.
1) REQUIREMENTS
I will make the list of apps using a computer, so you need several things set up on the computer and the android phone.
1.1) SMARTPHONE REQUIREMENTS
-> USB Debugging enabled: How to enable USB Debugging on Android [Youtube]
1.2) COMPUTER REQUIREMENTS
-> aapt.exe and adb.exe installed. I recommend to install the Android Studio Bundle. The binaries will be installed in a path similar to this:
Code:
C:\Users\YourUser\AppData\Local\Android\sdk\build-tools\24.0.3\aapt.exe
Code:
C:\Users\YourUser\AppData\Local\Android\sdk\platform-tools\adb.exe
-> Add the paths of aapt.exe and adb.exe to your current PATH in Windows: How to Edit Your System PATH for Easy Command Line Access in Windows
-> Cygwin is mandatory to run bash commands on Windows. The x86 version is recommended because it has more commands than the 64bit version. This is where you will actually type the commands.
-> adb drivers for your smartphone. Windows 10 usually will install them flawlessly.
2) GETTING THE LIST OF APPS THAT DON'T ALLOW ADB BACKUP
2.2) CHECKING FOR SOFTWARE AND SMARTPHONE
Go into cygwin to a working directory to store there your temporary files:
Code:
cd /cygdrive/c/Temp/
Check with Cygwin that you PATH is currently set and that adb.exe and aapt.exe are usable:
Code:
which adb
/cygdrive/c/Users/Admin/AppData/Local/Android/sdk/platform-tools/adb
which aapt
/cygdrive/c/Users/Admin/AppData/Local/Android/sdk/build-tools/24.0.3/aapt
Now connect your android smartphone to the computer with the screen unlocked, accept any data connection (use MTP method if asked or from notifications panel), authorize the computer and run on Cygwin:
Code:
adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
LGH815b4b2c42e unauthorized
adb devices
List of devices attached
LGH815b4b2c42e device
2.3) GETTING THE LIST OF ALL APPS ON THE DEVICE
On this step, a list of all apps on the smartphone, will be saved to a file called all_packages.txt in the format of package name. That string that appears at the end of the url when you browse an app on the Play Store.
Code:
adb shell pm list packages | grep -v '^$' > all_packages.txt
UNDER CONSTRUCTION. WILL REPLY WHEN FINISHED. SUBSCRIBE IF YOU ARE INSTERESTED
It looks like somebody released an application for that and works great:
No ADB backup app lister

Computer Setup for executing fastboot commands

Credits : XDA developers
This is not my work I just make all of them at one place
Procedure for making your computer ready for executing fastboot commands
1 ) Install ADB drivers in windows using below link
https://drive.google.com/file/d/1lZ2pZLne6TV9YJLmS9P_EAteuAZn_BPs/view?usp=drivesdk
2) Download platform tools below link for windows :
https://drive.google.com/file/d/1HUAUNJnlOKUJCxSqVxNVRagV4XBGe-2Q/view?usp=drivesdk
linux and mac users download platform tools from this link :
https://developer.android.com/studio/releases/platform-tools.html
2 ) extract it
‎
‎3) whenever you want use fastboot commands
Goto platform tools and paste required file in platform tools folder
4) then from platform tools folder open Power shell or command prompt using (shift + right click ) in empty space
Then it will open command promt then you can execute fastboot commands
That's it now your computer can be used for executing fastboot commands
On Linux, you can type "whereis adb" to find the location, and then "sudo cp adb fastboot location(usually /usr/bin)", to replace it and use it system wide. Afterwards, always check "adb version", to make sure you did it right.
Sent from my Mi A1 using Tapatalk
Harris P said:
On Linux, you can type "whereis adb" to find the location, and then "sudo cp adb fastboot location(usually /usr/bin)", to replace it and use it system wide. Afterwards, always check "adb version", to make sure you did it right.
Click to expand...
Click to collapse
Thanks for the information
I only know about windows OS
Easier method for installing adb and fastboot in Ubuntu
For those running recent Ubuntu versions or distributions based on them, there are packages for adb and fastboot available in the default repositories. To install them, execute this command in the terminal:
Code:
sudo apt install android-tools-adb android-tools-fastboot
Addendum: This works on all Ubuntu versions from 16.04 and beyond. I haven't tested this on the 14.10, 15.04, and 15.10 releases. However, I can confirm that this doesn't work on 14.04 and below.

Categories

Resources