April 16, 2014, 02:57:36 PM

collapse

* Sponsors


* Hot Topics


* Facebook Like


* Sponsors


* Board Stats

  • stats Total Members: 1215
  • stats Total Posts: 6353
  • stats Total Topics: 980
  • stats Total Categories: 3
  • stats Total Boards: 17
  • stats Most Online: 164

Author Topic: Complete Setup Guide: Android SDK and ADB  (Read 53386 times)

TekMason

  • Full Member
  • ***
  • Posts: 114
    • View Profile
Complete Setup Guide: Android SDK and ADB
« on: November 05, 2011, 12:21:20 AM »
I just got a new PC Tablet so I had to setup all my TPT tools on it so I thought I would document the steps and publish them here for anyone that may be struggling with it.  This guide is based on Windows 7 64-bit.

1.0 Install the TPT ADB Interface Driver
I noticed that Lenovo has finally published an "official" ADB Interface Driver for the TPT.  This is good news for us because we don't have to muck around with modifying INF or INI files.
1.1 Download the ADB Interface Driver - ThinkPad Tablet from http://support.lenovo.com/en_US/downloads/detail.page?DocID=DS022366
Per the instructions on the site:
1.2 Turn on the ThinkPad Tablet.
1.3 Press the slider bar icon to display the Settings property page.
1.4 Press Applications on the left side of the page.
1.5 Press Development and check USB debugging.
1.6 Press the OK button on the dialog.
1.7 Connect the Tablet to the computer.
1.8 Open Device Manager.
1.9 Expand the Other devices node.
1.10 Right click the ThinkPad Tablet node and select Update Driver Software.
1.11 Select Browse my computer for software.
1.12 Browse to the folder that contains the driver files.
1.13 Select the driver folder and continue the driver installation

2.0 Install the Java SE Development Kit (JDK)
The JDK is a prerequisite for the Android SDK and ADB.  Note that a JRE (Java Run-time Enviroment) is not the same as the JDK
2.1 Download the Java SE Development Kit (JDK) from http://java.oracle.com > Downloads > Java SE > JDK
2.2 Execute the installer and select the defaults.  Note: You do not have to register at the end of the installation.

3.0 Install the Android SDK (Software Development Kit)
The Android SDK gives you a number of tools, documentation and samples to develop for Android OSes.  The tool that we are most interested in as rooters/hackers is the ADB (Android Debug Bridge) which allows us to perform operations on our TPT from our PC.
3.1 Download the Android SDK from http://developer.android.com/sdk/index.html
3.2 Execute the Installer file that you downloaded accepting all of the defaults.
3.3 At the end of the install chose to run the Android SDK Manager.
3.4 You will need the following package for the TPT:
-Android SDK Tools
-Android 3.1 (API 12)
-Extras > Google USB Driver package
Check the status column for each and if is not installed select the check box beside the packages and click the Install Packages button.
3.5 If you get a Dependencies List select the Accept All radio button and click the Install button.

4.0 Add the Android Platform-tools Directory to Your Local Path Variable
This step is not a necessity but it will save you a lot of time if you are using ADB.  Without adding the path to adb.exe you would have to Change Directories from a DOS command line every time you want to use ADP.
For each flavor of OS the exact steps will vary.  The steps here are for Windows 7 64-bit.  If you have a hard time adapting to your OS just google "set path environment variable <your OS version>

4.1 Find out where ADB.exe is located on your PC.  Chances are it is in C:\Program Files\Android\android-sdk\platform-tools for Windows 32-bit or C:\Program Files (x86)\Android\android-sdk\platform-tools\ for Windows 64-bit.
4.2 Start -> Control Panel -> System -> Advanced
4.3 Click on Environment Variables
4.4 Under System Variables, find PATH, and click on it.
4.5 In the Edit windows, modify PATH by adding the location of adb.exe the value for PATH.
Note: each path is separated by a ;   Make sure that you add a semi-colon before your path.
i.e.  C:\windows\system32;C:\windows\  becomes C:\windows\system32;C:\windows\;C:\Program Files (x86)\Android\android-sdk\platform-tools\
4.6 Close the window.

5.0 Test ADB and Try Out a Few Commands
In This step we will test ADB and run a few interesting shell commands on your TPT.
5.1 Click Start, type cmd.exe in the text box and hit enter
5.2 Type  adb devices
The command should return something like:
Code: [Select]
C:\Users\TekMason>adb devices
List of devices attached
4280180415f5157 device

If you don't have anything listed something is not right, review the previous steps and if you still have trouble post to this thread.

5.3 Get a shell on your TPT by typing  adb shell
You should have a $ prompt.
$ ls
5.4 Type ls
Example output:
Code: [Select]
$ ls
acct
cache
config
d
data
...snip...
usbdrive
var
vendor
$
You just got a directory listing of all the files and folders on your TPT (in the current working directory).
A usefull command line switch for ls is -l (ls -l) for long format that displays the permissions as well.


5.5 Exit from the shell and get back to your (local PC) command prompt by typing  exit

5.6 Lets run the boot animation on your TPT:
Code: [Select]
C:\Users\TekMason> [b]adb shell[/b]
$ [b]/system/bin/bootanimation[/b]
Press ctrl-c to exit the shell and stop the animation.  Wish I knew of a more graceful way to end the animation.

You are now prepared for your journey into hacking around in your TPT.  Who knows maybe you could be the first one to root a TPT and collect the TPT Root Bounty.

I plan on maintaining and improving on this guide.  So please post to this thread with comments and suggestions on what to add or fix.

TekMason
« Last Edit: December 08, 2011, 03:00:36 PM by Babyfacemagee »
Lenovo TPT 64GB   |   HP 2760p TabletPC   |   BlackBerry Playbook 16GB   |   BlackBerry Torch 9800

jcclow

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #1 on: November 06, 2011, 12:52:27 AM »
Hey TekMason!

I too am running Windows 7 x64...did you install the x64 version of the JDK or the x86? I know that I installed both the x86 and x64 versions of the JRE, just in case I have any x64 apps that require it.

Also, a cool quick way to a command prompt in Windows 7 (maybe Vista too, but I don't have it to test it)...
  • Navigate, in Windows Explorer or My Computer, to the folder the app you want to run is in.
  • Hold down the "Shift" key and right click.
  • In the context menu that pops up, select "Open command window here".
« Last Edit: November 06, 2011, 01:14:16 AM by jcclow »

xi slick ix

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #2 on: November 08, 2011, 12:54:48 AM »
@ Tek

I personally had 90% of this figured out from previous phone tweaking, but thanks 10000000x for putting such a detailed guide up here.  This needs to be sticked to the top of the forum so as more people continue to join and setup development tools on their computers this post becomes a beginners guide and good all around reference guide.  Also, forum mod should probably reserve a few more spots directly under original post for future updates.

Sent from my ThinkPad Tablet using Tapatalk

mtnguy321

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #3 on: December 08, 2011, 02:21:01 PM »
Ok, I've got most of this working ... can install .apk files thru adb command line.  However, I also use a program with another Android device called QtADB (graphical interface) but cannot get it to work with this tablet.  Also, I cannot do an ADB CONNECT 192.168.0.16 (my TPT) ... always gives me an 'unable to connect.'

Any help would be appreciated.

Jim

twospirits

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #4 on: January 06, 2012, 01:25:26 PM »
usually i am good at this stuff, but damn is this giving me a hard time trying to install the USB drivers.

No matter what I do, they won't install.

using Win 7 64 bit. Extracted downloaded driver files no go.

Do I need to modify the INF file?

TS

GodfatherIP

  • Full Member
  • ***
  • Posts: 167
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #5 on: January 22, 2012, 03:21:07 PM »
By the way I couldn't get my drivers to install until I put the thinkpad into media transfer mode (in addition to enabling usb debugging of course), in usb storage mode it would only recognize it as a hard drive and not an ADB device.

DrGadget

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #6 on: January 22, 2012, 10:29:04 PM »
Ok, I've got most of this working ... can install .apk files thru adb command line.  However, I also use a program with another Android device called QtADB (graphical interface) but cannot get it to work with this tablet.  Also, I cannot do an ADB CONNECT 192.168.0.16 (my TPT) ... always gives me an 'unable to connect.'

Any help would be appreciated.

Jim


QtADB is good for removing Apps but not installing.  Moving them to the NXS .. yes.  You will find that the issue is the PATH to ADB.  Also, make sure that you are not already running a version of ADB (if so kill in Windows Task Manager).

This HowTo I wrote for the NI Adam tablet should help you: http://forum.xda-developers.com/showthread.php?t=1009982&highlight=screen+capture
Google Nexus S GT-i9023,  [CNA (Mod) 2.0.0-RC2 Android 4.0.4 IMM76D/Matr1x-CFS-V22.0, SmartassV2~SIO 200-1200Mhz/XXKL1], unlocked, rooted.
Lenovo Thinkpad Tablet, 18392QM 0121_ROW, [Android 4.0.3, OTA3], unlocked, rooted.

futzy

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #7 on: January 24, 2012, 07:52:26 AM »
Copying my post from the Lenovo forums as it may help some more people out

I added
 
Code: [Select]
;
;NVIDIA Tegra
%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
%CompositeAdbInterface% = USB_Install, USB\VID_0955&PID_7100&MI_01

;NVIDIA Tegra
%SingleAdbInterface% = USB_Install, USB\VID_17EF&PID_741C
%CompositeAdbInterface% = USB_Install, USB\VID_17EF&PID_741C&MI_01

 to android_winusb.inf, under the [Google.NTamd64] section of the regular google sdk driver. After that that I uninstalled the generic driver from the device manager, unplugged the tablet, and rebooted my pc. When I plugged it back it the google driver installed and the TPT was then listed under android devices in the device manager.

biday

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #8 on: January 24, 2012, 04:51:03 PM »
Im having problem with the installation. the adb devices command showed no device although I have connected my TPT. My TPT is successfully regconized as ADB Devices in Devices Manager and I have installed all the SDK tools need :(

twospirits

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #9 on: January 24, 2012, 10:38:22 PM »
Copying my post from the Lenovo forums as it may help some more people out

I added
 
Code: [Select]
;
;NVIDIA Tegra
%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
%CompositeAdbInterface% = USB_Install, USB\VID_0955&PID_7100&MI_01

;NVIDIA Tegra
%SingleAdbInterface% = USB_Install, USB\VID_17EF&PID_741C
%CompositeAdbInterface% = USB_Install, USB\VID_17EF&PID_741C&MI_01

 to android_winusb.inf, under the [Google.NTamd64] section of the regular google sdk driver. After that that I uninstalled the generic driver from the device manager, unplugged the tablet, and rebooted my pc. When I plugged it back it the google driver installed and the TPT was then listed under android devices in the device manager.
I did this on my laptop (that is connected to an external monitor at work since the display doesn't work) and it worked, but for some reason at home here, it doesn't work. Hopefully I'll get time to re-do the steps again this week.

TS

gork

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #10 on: January 25, 2012, 08:44:01 AM »
Thanks for that! It helped me a lot and everything went well @ Win7x64

mtnguy321

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #11 on: January 27, 2012, 02:12:39 PM »

QtADB is good for removing Apps but not installing.  Moving them to the NXS .. yes.  You will find that the issue is the PATH to ADB.  Also, make sure that you are not already running a version of ADB (if so kill in Windows Task Manager).

This HowTo I wrote for the NI Adam tablet should help you: http://forum.xda-developers.com/showthread.php?t=1009982&highlight=screen+capture
[/quote]

Thanks ... just a path problem.  QtADB now installs apps with no problems.

Jim

twospirits

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #12 on: February 03, 2012, 10:43:57 AM »
I did a pdf (with images) of the instructions for those that are either new to this sort of thing or like visuals alongside the steps.

All credit goes to TekMason,

Instructions with images in PDF format.



TS

pghFL

  • Sr. Member
  • ****
  • Posts: 495
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #13 on: February 03, 2012, 02:22:52 PM »
Great. Thanks TS.

And thanks to TekMason, too.
« Last Edit: February 03, 2012, 07:50:48 PM by pghFL »
Don't get mad, get root
GNote N8013
183827U 64GB
0089_US/Root/CWM ;D

DrGadget

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Complete Setup Guide: Android SDK and ADB
« Reply #14 on: February 03, 2012, 07:35:57 PM »
I did a pdf (with images) of the instructions for those that are either new to this sort of thing or like visuals alongside the steps.

All credit goes to TekMason,


TS

Very tasty. Thanks to TekMason and you ....
Google Nexus S GT-i9023,  [CNA (Mod) 2.0.0-RC2 Android 4.0.4 IMM76D/Matr1x-CFS-V22.0, SmartassV2~SIO 200-1200Mhz/XXKL1], unlocked, rooted.
Lenovo Thinkpad Tablet, 18392QM 0121_ROW, [Android 4.0.3, OTA3], unlocked, rooted.

 




SimplePortal 2.3.3 © 2008-2010, SimplePortal