Author Topic: How to get ADB to work on Peppermint (Android)  (Read 1966 times)

Offline robertsala

  • Member
  • ***
  • Posts: 85
  • Karma: 8
  • New Forum User
    • View Profile
How to get ADB to work on Peppermint (Android)
« on: April 30, 2015, 05:58:54 am »
Greetings fellow Pepperminters!

I need to know how to get ADB to work on Peppermint (Android). I have a ZTE Grand S-lite with MTK(Mediatek) processor. Android version is 4.2.2. The cellphone immediately recognizes when it is connected as USB storage, media device (MTP), Camera (PTP) or charge only. None of these really require a "bridge". Now, what I really want to do is have ADB recognize the cellphone.
I ran these instructions from terminal:
adb kill-server
adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
adb devices
List of devices attached

And nothing is displayed...

lsusb lists the device ID as:
Bus 001 Device 002: ID 0c45:62c0 Microdia Sonix USB 2.0 Camera
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Obviously the first one is the camera and the second and third are the internal and external storages of the phone. I have also created a file 50-android.rules in /etc/udev/rules.d with the following content:
SUBSYSTEM==”usb”, ATTR{19D2}==”USB-VENDOR-ID”, MODE=”0666″

Did I miss something in this entry? I then rebooted my system and my phone, and tried again:
adb kill-server
adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
adb devices
List of devices attached

Still nothing... Now, I found a bash function to detect and register all adb devices in the system:
UpdateAdbUsbIni () {
    INIFILE=${1:-$HOME}/.android/adb_usb.ini
    mkdir -p $(dirname $INIFILE)
    DEVICES=$(find -L /sys/bus/usb/devices -maxdepth 2 -path "*/modalias" -printf "%h\t" -exec cat {} \; | awk -F: '/icFFisc42ip0/ {print $1}')
    echo -e "\nRegistering Vendor IDs for the following ADB devices:"
    for D in $DEVICES
    do
        echo -e "\tDEVPATH=$D Serial=$(cat $D/serial) VendorID=0x$(cat $D/idVendor) ($(cat $D/manufacturer))"
        echo "0x$(cat $D/idVendor)" >> $INIFILE
    done
    VIDS=$(grep ^0x....$ $INIFILE | sort -u)
    echo "$VIDS" > $INIFILE
    return 0

If this works, how do I go about creating the file? Where does it go? In /etc/udev/rules.d  ???
I do know my device's Vendor ID. In "USB Debugging" mode, I have tried connecting the cellphone in different USB ports and different USB cables (just in case it is the cable). Any help is appreciated.....

Offline mac

  • Veteran
  • ****
  • Posts: 1088
  • Karma: 336
    • View Profile
  • Peppermint version(s): Peppermint 7-8-9
Re: How to get ADB to work on Peppermint (Android)
« Reply #1 on: April 30, 2015, 06:19:07 am »
Hi robertsala,

No personal experience with it myself but your post sparked my curiosity so I did a bit of looking.  These may help or at least give you some ideas.  Good luck.

HERE

HERE

HERE
Peppermint: Standing Out from the Cloud
Reg. Linux User #432835

Offline robertsala

  • Member
  • ***
  • Posts: 85
  • Karma: 8
  • New Forum User
    • View Profile
Re: How to get ADB to work on Peppermint (Android)
« Reply #2 on: April 30, 2015, 06:23:44 am »
I'll give it a try thanks! :)