i.MX51 Android ADB over USB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX51 Android ADB over USB

i.MX51 Android ADB over USB

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:

  • In your host machine:

- Install Android SDK

- export ADBHOST=BOARD_IP (setenv ADBHOST=xxx.xxx.xxx.xxx)

- adb kill-server

  • In your board:

- 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


Labels (3)
Comments
mbp

Nice. 

Now could someone PLEASE add the steps necessary for iMx51 Android adb over USB (for R10.4) with 32-bit Windows-XP system?

...had it working for years on R9.2, R9.3.   NO-GO (even after all User-Guide mods and following a million forum suggestions/issues).

thanks,

mike

%3CLINGO-SUB%20id%3D%22lingo-sub-1098886%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX51%20Android%20ADB%20over%20USB%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1098886%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHow%20to%20connect%20i.MX51%20and%20Ubuntu%20using%20USB%20cable%3A%3C%2FP%3E%3CH4%20id%3D%22toc-hId--735472998%22%20id%3D%22toc-hId--735472998%22%20id%3D%22toc-hId-200946385%22%3E%3CSPAN%20class%3D%22mw-headline%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FH4%3E%3CH2%20id%3D%22toc-hId-1050975257%22%20id%3D%22toc-hId-1050975257%22%20id%3D%22toc-hId-1987394640%22%3E%3CSPAN%20class%3D%22mw-headline%22%3Ei.MX51%20Side%20%3C%2FSPAN%3E%3C%2FH2%3E%3CPRE%20class%3D%22jive-pre%22%3EPlug%20in%20USB%20cable.%20%3C%2FPRE%3E%3CUL%3E%3CLI%3E%3CSTRONG%3Egetprop%20debug.adb.usb%3C%2FSTRONG%3E%20-%20Shows%20that%20debug.adb.usb%20are%20not%20set%20by%20default%3C%2FLI%3E%3CLI%3E%3CSTRONG%3Esetprop%20persist.service.adb.enable%200%3C%2FSTRONG%3E%20-%26gt%3B%20disable%20adb%3C%2FLI%3E%3CLI%3E%3CSTRONG%3Esetprop%20debug.adb.usb%201%3C%2FSTRONG%3E%20-%20adb%20will%20be%20through%20USB%20(for%20Ethernet%2C%20use%20setprop%20debug.adb.usb%200)%3C%2FLI%3E%3CLI%3E%3CSTRONG%3Esetprop%20persist.service.adb.enable%201%3C%2FSTRONG%3E%20-%26gt%3B%20enable%20adb%3C%2FLI%3E%3C%2FUL%3E%3CP%3EExample%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%23%20getprop%20debug.adb.usb%26nbsp%3B%20%0A%23%0A%23%20%0A%23%20setprop%20persist.service.adb.enable%200%20%0Adisabling%20adb%20%0A%23%20adb_release%20%0Aandroid_usb%20gadget%3A%20high%20speed%20config%20%231%3A%20android%20%0Asetprop%20debug.adb.usb%201%20%0A%23%20%0A%23%20setprop%20persist.service.adb.enable%201%20%0Aenabling%20adb%20%0A%23%20adb_open%20%0Aadb_release%20%0Aadb_open%20%0Aandroid_usb%20gadget%3A%20high%20speed%20config%20%231%3A%20android%20%0A%23%3C%2FPRE%3E%3CH2%20id%3D%22toc-hId--756479206%22%20id%3D%22toc-hId--756479206%22%20id%3D%22toc-hId-179940177%22%3E%3CSPAN%20class%3D%22mw-headline%22%3EUbuntu%20Side%20%3C%2FSPAN%3E%3C%2FH2%3E%3CP%3E%3C%2FP%3E%3CP%3EOn%20Ubuntu%20side%2C%20the%20most%20important%20tip%20is%20regarding%20permission.%20ADB%20server%20MUST%20be%20started%20with%20root%20right.%3C%2FP%3E%3CP%3EExample%20of%20right%20mistake%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%24%20sudo%20%3CAND_SDK_DIR%3E%2Fandroid-sdk-linux_86%2Ftools%2Fadb%20devices%20%0AList%20of%20devices%20attached%20%0A%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%3F%26nbsp%3B%26nbsp%3B%26nbsp%3B%20no%20permissions%26nbsp%3B%20%0A%0A%24%20sudo%20%3CAND_SDK_DIR%3E%2Fandroid-sdk-linux_86%2Ftools%2Fadb%20shell%20%0Aerror%3A%20insufficient%20permissions%20for%20device%0A%3C%2FAND_SDK_DIR%3E%3C%2FAND_SDK_DIR%3E%3C%2FPRE%3E%3CP%3EHow%20to%20proceed%20to%20get%20permission%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3E%24%20sudo%20%3CAND_SDK_DIR%3E%2Fandroid-sdk-linux_86%2Ftools%2Fadb%20kill-server%20%0A%24%20sudo%20%3CAND_SDK_DIR%3E%2Fandroid-sdk-linux_86%2Ftools%2Fadb%20%3CA%20href%3D%22http%3A%2F%2Fwww.imxdev.org%2Fwiki%2Findex.php%3Ftitle%3DIMX51_Android_ADB_over_USB%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20style%3D%22text-decoration%3A%20underline%3B%22%20title%3D%22Powered%20by%20Text-Enhance%22%20target%3D%22_blank%22%3Estart%3C%2FA%3E-server%20%0A*%20daemon%20not%20running.%20starting%20it%20now%20*%20%0A*%20daemon%20started%20successfully%20*%20%0A%24%20sudo%20%3CAND_SDK_DIR%3E%2Fandroid-sdk-linux_86%2Ftools%2Fadb%20devices%20%0AList%20of%20devices%20attached%20%0A0123456789ABCDEF%26nbsp%3B%26nbsp%3B%26nbsp%3B%20device%26nbsp%3B%20%0A%0A%24%20sudo%20%3CAND_SDK_DIR%3E%2Fandroid-sdk-linux_86%2Ftools%2Fadb%20shell%0A%3C%2FAND_SDK_DIR%3E%3C%2FAND_SDK_DIR%3E%3C%2FAND_SDK_DIR%3E%3C%2FAND_SDK_DIR%3E%3C%2FPRE%3E%3CH4%20id%3D%22toc-hId--1862869091%22%20id%3D%22toc-hId--1862869091%22%20id%3D%22toc-hId--926449708%22%3E%3CSPAN%20class%3D%22mw-headline%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FH4%3E%3CH2%20id%3D%22toc-hId--76420836%22%20id%3D%22toc-hId--76420836%22%20id%3D%22toc-hId-859998547%22%3E%3CSPAN%20class%3D%22mw-headline%22%3EADB%20over%20Ethernet%2FWi-Fi%3C%2FSPAN%3E%3C%2FH2%3E%3CH4%20id%3D%22toc-hId--1182810721%22%20id%3D%22toc-hId--1182810721%22%20id%3D%22toc-hId--246391338%22%3E%3CSPAN%20class%3D%22mw-headline%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FH4%3E%3CP%3ETo%20make%20ADB%20work%20in%20i.MX51%20using%20TCP%3A%3C%2FP%3E%3CUL%3E%3CLI%3EIn%20your%20host%20machine%3A%3C%2FLI%3E%3C%2FUL%3E%3CP%3E-%20Install%20Android%20SDK%3C%2FP%3E%3CP%3E-%20export%20ADBHOST%3DBOARD_IP%20(setenv%20ADBHOST%3Dxxx.xxx.xxx.xxx)%3C%2FP%3E%3CP%3E-%20adb%20kill-server%3C%2FP%3E%3CUL%3E%3CLI%3EIn%20your%20board%3A%3C%2FLI%3E%3C%2FUL%3E%3CP%3E-%20make%20sure%20that%20ro.secure%20property%20is%20*not*%20set%20when%20the%20adbd%20daemon%20is%20launched%2C%20so%20edit%20the%20file%20default.prop%3C%2FP%3E%3CP%3E-%20make%20sure%20that%20%2Fdev%2Fandroid_adb%20or%20%2Fdev%2Fandroid%20do%20*not*%20exist%3C%2FP%3E%3CP%3E-%20stop%20adbd%3C%2FP%3E%3CP%3E-%20start%20adbd%3C%2FP%3E%3CP%3ENow%20you%20will%20be%20able%20to%20list%20the%20device%3A%3C%2FP%3E%3CPRE%20class%3D%22jive-pre%22%3Ehamilton%40saygon%3A%2Fopt%2Fwork%2Fandroidsdk%2Fandroid-sdk-linux_86%2Ftools%24%20.%2Fadb%20kill-server%20%0Ahamilton%40saygon%3A%2Fopt%2Fwork%2Fandroidsdk%2Fandroid-sdk-linux_86%2Ftools%24%20.%2Fadb%20devices%20%0A*%20daemon%20not%20running.%20starting%20it%20now%20*%20%0A*%20daemon%20started%20successfully%20*%20%0AList%20of%20devices%20attached%20%0Aemulator-5554%26nbsp%3B%26nbsp%3B%20device%0A%3C%2FPRE%3E%3CP%3E%3CSPAN%20class%3D%22mce_paste_marker%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1098886%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAndroid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX51%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1098887%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20i.MX51%20Android%20ADB%20over%20USB%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1098887%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ENice.%26nbsp%3B%20%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ENow%20could%20someone%20PLEASE%20add%20the%20steps%20necessary%20for%20iMx51%20Android%20adb%20over%20USB%20(for%20R10.4)%20with%2032-bit%20Windows-XP%20system%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E...had%20it%20working%20for%20years%20on%20R9.2%2C%20R9.3.%26nbsp%3B%26nbsp%3B%20NO-GO%20(even%20after%20all%20User-Guide%20mods%20and%20following%20a%20million%20forum%20suggestions%2Fissues).%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Ethanks%2C%3C%2FP%3E%3CP%3Emike%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎09-10-2020 03:39 AM
Updated by: