How to ADB debug the X20 96Boards?  

  RSS

Koncn Tseng
Active MemberAdmin
Joined:8 years  ago
Posts: 18
October 1, 2016 5:12 pm  

For Linux User

Here we assume you are using Ubuntu 14.04 or above release, and you are welcome to discuss to figure out other linux distribution release. 

1. Download & Install ADB

$ sudo apt-get install android-tools-adb

2. Connect the board to your PC using Micro USB cable, execute the following command to identify the USB Vendor ID

$ sudo lsusb

Please pay attention to the line including MediaTek keywords! here we can get the VID which is 0x0e8d.

Not found? you need double check you have enabled "Settings -> Develop Options -> USB Debugging", to enter into Develop Options when you board runs USER ROM which "Develop Options" was hidden for security purpose, you need to click 10+ times on some item like "Settings -> About phone -> Build number" to make "Develop Options" visible.

Still not found? Let's check the board to set the Micro USB port enter into Device Mode. How? As quick guide mentioned in the box, set the 3rd PIN (USB HOST SET) of SW3205 to the OFF side to enable USB Device Mode.

3. Register the board USB VID into ADB configure file

$ sudo echo "0x0e8d" > ~/.android/adb_usb.ini

4. Start the adb server and detect the attached device

$ adb devices

You can find the device with SN which is 123456789abcedef.

In some case, you will find that the board attached to your PC can't be identified as invalid or offline. To fix this issue, you need to restart the adb server or reboot the X20 96Boards and your PC.

$ adb kill-server
$ adb devices

5. adb debug

$ adb logcat 

or login to the board

$ adb shell

For more details about the adb usage, please refer to the official link https://developer.android.com/studio/command-line/adb.html

 

For Windows User

  1. Install ADB tool from the Android SDK, first it is recommended to download SDK tool package from Android Studio page ( https://developer.android.com/studio/index.html), you can find the latest SDK tools package like "android-sdk_r24.4.1-windows.zip".
  2. So, download the SDK tools package from here and save the file on the desktop.
  3. Extract the file and place it to the root of the C driver. You should get something like “C:\ android-sdk-windows”.
  4. Go to the mentioned folder (C:\ android-sdk-windows) and open SDK manager.
  5. From there select “Android SDK Platform-tools, revision 24.0.x” along with anything else you want and start the installation procedure.
  6. Then, go to path “Available Packages -> Third party Add-ons -> Google Inc. add-ons -> check Google USB Driver package, revision 11? and install this too.
  7. You can close the manager now.
  8. Up next, on your computer click on “Start / Windows button -> Control Panel -> System proprieties”.
  9. Choose “Advance System settings” followed by “Environment Variables”.
  10. Now we will set down the variables; in order to do so, scroll down until you see “Path” – click on the same.
  11. Into the Value field, on the end of the line add the following “;C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools”.
  12. Click “OK” and exit.
  13. Now, take your board and enable the USB debugging option on it: “Settings -> Develop Options -> USB Debugging”.
  14. Connect your board with the computer by using its USB cable.
  15. Install the proper drivers for your board. You can get the board driver here: (TBD)
  16. Open command prompt on your computer (“Start -> run -> cmd”).
  17. On the cmd window type “adb devices”.
  18. Your device should now be listed in cmd meaning that you are done.

In case you are not getting the expected results, then something wrong might had happened. Anyway, try to do the following in order to resolve the issues:

  • Right click on the “My computer” icon and then open the Device manager.
  • A yellow exclamation mark should be near the Unknown Device group.
  • Right click on ADB and select “Update Driver Software -> Browse -> Let me pick”.
  • Click on “Have disk -> browse”.
  • Head to path “C:\android-sdk-windows\extras\google\usb_driver and choose android_winusb.inf.” and click on the Android ADB Interface.
  • Ignore the warnings if such is displayed.
  • When the installation procedure is over, re-open the cmd on your computer, type “adb devices” once more; this time everything should be working as expected.
  • Still has problem, please refer to "For Linux User" section to check everything is going on right line.

So, there you have it; now you know how to install Android SDK / ADB on your Windows running computer.

 

For Mac User

1. Install ADB tool

Install ADB tool from the Android SDK, first it is recommended to download SDK tool package from Android Studio page ( https://developer.android.com/studio/index.html), you can find the latest SDK tools package like "android-sdk_r24.4.1-macosx.zip". Just download it, then extract the file and place it to your home directory like "~/develop/android-sdk".

Refer to the "For Windows User" section, from step 4 ~ 7. Then set up the "Environment Variables" to involve your android sdk.

$ export PATH=~/develop/android-sdk/platform-tools:~/develop/android-sdk/tools:$PATH

2. Register the board USB VID into ADB configure file

$ sudo echo "0x0e8d" > ~/.android/adb_usb.ini

3. Connect the board to your PC and begin to adb debug

It is same as Linux, please refer to "For Linux User" section, step 2 and step 4 for more details.

Hope you success on the going!

Edited: 8 years  ago

ReplyQuote
  
Working

Please Login or Register