LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   android-platform-tools in Debian wheezy? (http://www.linuxquestions.org/questions/debian-26/android-platform-tools-in-debian-wheezy-4175467323/)

mshlinux 06-25-2013 10:26 AM

android-platform-tools in Debian wheezy?
 
In Debian wheezy, I have android-platform-tools installed working well.
But my android device is not found. I get this:

Quote:

msh@dbndst-msh:~$ adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached

msh@dbndst-msh:~$ adb shell
error: device not found
msh@dbndst-msh:~$
I also created /etc/udev/rules.d/70-android.rules flie and
tried putting one of these lines below each time.

Quote:

SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"
or
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1:1031", MODE="0666"
or
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
or
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1:1031", MODE="0666"
note: 12d1 or 12d1:1031 is my Huawei mobile device's ID which lsusb shows.

But still doesn't work...
I had been googling long time today without finding any post that devote to
"setting up android-platform-tools in Debian wheezy". why?
any help, please!

Hangaber 06-25-2013 03:58 PM

Does it show anything with; adb devices
Any difference if you run adb as root (you may have to kill-server first, if it's running as msh)

mshlinux 06-25-2013 10:12 PM

I get same same:
Quote:

root@dbndst-msh:/home/msh# adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached

root@dbndst-msh:/home/msh# adb shell
error: device not found
root@dbndst-msh:/home/msh#
I killed server first too.
but..... :)

evo2 06-25-2013 10:44 PM

Hi,

I would expect exactly this behaviour if "USB debugging" is not enabled on your android device. Can you confirm it is enabled?

Evo2.

mshlinux 06-26-2013 04:48 AM

yes, I am sure that I enabled USB debugging.
I have tried many times with my Android Phone's USB Debugging enabled.
but still doesn't work...

Hangaber 06-26-2013 11:26 AM

Apparently that phone has some built in extra thing called "HiSuite" that lets you connect via USB and I guess backup/delete contacts and stuff.
If so, turn that off from the phone if you can.

The lack of "devices" showing anything is where you should start. (If you don't see any 'devices', then you're not going to get a 'shell'.)

- Try unpluging USB. Turn the phone completely off. Take out the battery for a few seconds. Put it back together, turn it on, let it load up, reconnect USB and retry.
- Try another USB port / USB cable.
- Toggle OFF the usb debugging, then back on.
- Confirm you have the latest android sdk version.

I used to have a different Huawei phone (U8652), and although it would work well with 'adb', I would occasionally have to just turn the phone off and on to get it to appear in 'adb devices'.

mshlinux 06-27-2013 01:15 AM

I did all you say:
Quote:

- Try unpluging USB. Turn the phone completely off. Take out the battery for a few seconds. Put it back together, turn it on, let it load up, reconnect USB and retry.
- Try another USB port / USB cable.
- Toggle OFF the usb debugging, then back on.
- Confirm you have the latest android sdk version.
my device has no things such as HiSuit which I removed since long long ago.

But my Huawei C8800 is still missing on Debian.
My windows7 and ubuntu find it and run adb and fastboot well.
The problem is only on my Debian...wheezy...

anyhow, thank you for your suggestions...

evo2 06-27-2013 01:28 AM

Hi,
Quote:

Originally Posted by mshlinux (Post 4978349)
In Debian wheezy, I have android-platform-tools installed working well.

what exactly is this, and how did you install it? Have you tried using adb from the android-tools-adb package? It works fine for me on at least two different android devices (Nexus 7 w/ android 4.2.2 and SE Xperia w/ android 2.3) on wheezy.

Evo2.

mshlinux 06-27-2013 03:03 AM

just this morning, I removed previous one which I suspected as defect and downloaded up-to-date android-SDK from this page http://developer.android.com/sdk/index.html and install platform-tools via android-sdk.
Then go to ~/android-sdk/android-sdk-linux/platform-tools directory and do ./adb , that's all.
if I do ./adb , I get this:
Quote:

msh@dbndst-msh:~/android-sdk/android-sdk-linux/platform-tools$ ./adb
Android Debug Bridge version 1.0.31

-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <specific device> - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
etc...etc...
so, I think, my adb and fastboot are flawless...

evo2 06-27-2013 03:17 AM

Hi,
Quote:

Originally Posted by mshlinux (Post 4979422)
so, I think, my adb and fastboot are flawless...

I thought the whole point of this thread was that you were having trouble with adb. Have you tried the version packaged by Debian?

Evo2.

mshlinux 06-27-2013 04:59 AM

yahh! u may be right. I didn't try because I couldn't find any version packaged by debian despite I searched around online :) . so, plz give the link to the version packaged by debian for debian wheezy. thank u...

evo2 06-27-2013 05:16 AM

Hi,

the package name is in post #8.

Opps, I just checked and see that I must have installed it from unstable.

http://packages.debian.org/search?ke...ll&section=all

Evo2.

evo2 06-27-2013 10:51 PM

Hi,

just a follow up on how to install on Wheezy. This approach backports the package from Sid.

As root, add unstable src repo and install the build dependencies:
Code:

echo "deb-src http://http.debian.net/debian/ sid main contrib non-free" >> /etc/apt/sources.list
apt-get update
apt-get build-dep android-tools

As a normal user, maake a scrarch directory, download the source package and build the binary packages:
Code:

mkdir foo && cd foo
apt-get source --build android-tools

This should build the three binary android .deb pacakges
Code:

android-tools-adb_4.2.2+git20130529-2_amd64.deb
android-tools-fastboot_4.2.2+git20130529-2_amd64.deb
android-tools-fsutils_4.2.2+git20130529-2_amd64.deb

Install them as root
Code:

dpkg -i android-tools-*.deb
HTH,

Evo2.

mshlinux 06-30-2013 12:56 AM

sorry for my late response.
I was busy...

I did all thing as mentioned in #13. Everything went well as expected.
I learned a lot using unstable repo and building .deb from your post.
thank you for that.

but I am really sad to say that my Debian wheezy still can't find my Huawei C8800 and Huawei C8650.

So, the problem may be in my Devices or somewhere else in the OS or machince...
however, thank you so much for your care.

replica9000 06-30-2013 12:08 PM

I've always just ran the sdk straight from https://developer.android.com/sdk/index.html What version of Android are you using? If you are running Jellybean, I would grab the latest sdk.

Is the phone rooted?

Can you connect with ADB while in recovery? (if running custom recovery)

Make sure you have developer options enable in Android, and check to make sure:

Android debugging is checked.

Addition steps for Jellybean:
Root Access: ADB Only or Apps and ADB is enabled.
Phone may ask for confirmation before allowing the connection.


All times are GMT -5. The time now is 10:05 PM.