How to connect i.MX51 and Ubuntu using USB cable:
i.MX51 Side
Plug in USB cable.
- getprop debug.adb.usb - Shows that debug.adb.usb are not set by default
- setprop persist.service.adb.enable 0 -> disable adb
- setprop debug.adb.usb 1 - adb will be through USB (for Ethernet, use setprop debug.adb.usb 0)
- setprop persist.service.adb.enable 1 -> enable adb
Example:
# getprop debug.adb.usb
#
#
# setprop persist.service.adb.enable 0
disabling adb
# adb_release
android_usb gadget: high speed config #1: android
setprop debug.adb.usb 1
#
# setprop persist.service.adb.enable 1
enabling adb
# adb_open
adb_release
adb_open
android_usb gadget: high speed config #1: android
#
Ubuntu Side
On Ubuntu side, the most important tip is regarding permission. ADB server MUST be started with root right.
Example of right mistake:
$ sudo <AND_SDK_DIR>/android-sdk-linux_86/tools/adb devices
List of devices attached
???????????? no permissions
$ sudo <AND_SDK_DIR>/android-sdk-linux_86/tools/adb shell
error: insufficient permissions for device
How to proceed to get permission:
$ sudo <AND_SDK_DIR>/android-sdk-linux_86/tools/adb kill-server
$ sudo <AND_SDK_DIR>/android-sdk-linux_86/tools/adb start-server
* daemon not running. starting it now *
* daemon started successfully *
$ sudo <AND_SDK_DIR>/android-sdk-linux_86/tools/adb devices
List of devices attached
0123456789ABCDEF device
$ sudo <AND_SDK_DIR>/android-sdk-linux_86/tools/adb shell
ADB over Ethernet/Wi-Fi
To make ADB work in i.MX51 using TCP:
- Install Android SDK
- export ADBHOST=BOARD_IP (setenv ADBHOST=xxx.xxx.xxx.xxx)
- adb kill-server
- make sure that ro.secure property is *not* set when the adbd daemon is launched, so edit the file default.prop
- make sure that /dev/android_adb or /dev/android do *not* exist
- stop adbd
- start adbd
Now you will be able to list the device:
hamilton@saygon:/opt/work/androidsdk/android-sdk-linux_86/tools$ ./adb kill-server
hamilton@saygon:/opt/work/androidsdk/android-sdk-linux_86/tools$ ./adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
emulator-5554 device