Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
android-tools no device detected
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Eiji
n00b
n00b


Joined: 27 Jul 2016
Posts: 10

PostPosted: Mon Sep 12, 2016 10:56 pm    Post subject: android-tools no device detected Reply with quote

I installed android-tools package:
Code:
[ebuild   R    ] dev-util/android-tools-5.1.1_p13::gentoo  USE="-libressl" 0 KiB

I also enabled "USB debugging" in my phone.
When I type in console:
Code:
adb devices

I got this result:
Code:
List of devices attached


lsusb command returns:
Code:
Bus 002 Device 016: ID 2970:e688


My USB keyboard and mouse are recognized without problems:
Code:
Bus 002 Device 010: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 002 Device 011: ID 046d:c05a Logitech, Inc. M90/M100 Optical Mouse

Also in http://www.the-sz.com/products/usbid/ I can find my keyboard and mouse, but I can't find my phone.
My phone is: "Kazam TV 45" (Android 4.4.2).
How can I solve this?
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 411
Location: Gainesville, FL, USA

PostPosted: Tue Sep 13, 2016 1:19 am    Post subject: Reply with quote

Funny, I made a reply at first to your message describing how to enable USB debugging. Only when I submitted it that I noticed that you had already enabled it. So rather than give you useless directions, it's time for help at the step where you are.

You *could* set up udev rules to let you recognize the device, but you may get away without that. ADB has to know about the device, though. Look to the file ~/.android/adb_usb.ini If your phone doesn't have a definition preset in ADB, somehow the USB ID of your phone will have to get into this file. The file has a comment telling not to edit the file but instead run android update adb. There's some magic involved at this point I don't know--you'll have to search for that yourself. In any event, this should get you started.
Back to top
View user's profile Send private message
Eiji
n00b
n00b


Joined: 27 Jul 2016
Posts: 10

PostPosted: Tue Sep 13, 2016 8:04 am    Post subject: Reply with quote

Quote:
You *could* set up udev rules to let you recognize the device, but you may get away without that. ADB has to know about the device, though.

I found this:
Quote:
All I need for adb to work is to emerge dev-util/android-tools . Never created udev-rules manually, nor did I need any extra java-library. You could try to install it trough portage too or take a look in the ebuild.
at https://forums.gentoo.org/viewtopic-t-977256-start-0.html, so I don't think udev rules could solve it.
Quote:
Look to the file ~/.android/adb_usb.ini If your phone doesn't have a definition preset in ADB, somehow the USB ID of your phone will have to get into this file. The file has a comment telling not to edit the file but instead run android update adb. There's some magic involved at this point I don't know--you'll have to search for that yourself. In any event, this should get you started.

    1. I don't have file: "~/.android/adb_usb.ini".
    2. I don't have "android" command.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21766
Location: here

PostPosted: Tue Sep 13, 2016 8:24 am    Post subject: Reply with quote

Eiji wrote:
2. I don't have "android" command.

You need to install dev-util/android-sdk-update-manager
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Eiji
n00b
n00b


Joined: 27 Jul 2016
Posts: 10

PostPosted: Tue Sep 13, 2016 9:30 am    Post subject: Reply with quote

fedeliallalinea wrote:
Eiji wrote:
2. I don't have "android" command.

You need to install dev-util/android-sdk-update-manager
I think this is not a problem.
Quote:
All I need for adb to work is to emerge dev-util/android-tools . Never created udev-rules manually, nor did I need any extra java-library. You could try to install it trough portage too or take a look in the ebuild.
So other users can connect phone without this package, see: https://forums.gentoo.org/viewtopic-t-977256-start-0.html.
or:
Is this package required with some phone models? What you think about it?
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 411
Location: Gainesville, FL, USA

PostPosted: Tue Sep 13, 2016 11:51 am    Post subject: Reply with quote

Well, here is time for a Wild Ass Guess. I do have android-update-manager, so I do have an android command. I've never installed dev-util/android-tools, so I can't vouch for how that package works. I can presume that, as the package description asserts, it supplies the complete adb binary and not a reduced-function one. I can tell you that android-update-manager does supply adb.

The adb installed with android-update-manager looks to configuration files in the ~/.android directory. It could be that adb installed with android-tools still looks there but does not create the directory and file if they are not there already. You might get around that.

Try creating a .android directory in your home directory and then populating it with an adb_usb.ini file. This is the basic contents of that file:
Code:
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.


On one machine I have, that's all that's present in the file. In another machine, one which I had set up years before, I also find one of those vendor ID's expressed as a c-language hex literal (hex digits prefixed with 0x).

Try executing this line in your home directory.
Code:
mkdir -p .android; echo '0x2970' >.android/adb_usb.ini


That sets up that adb_usb.ini file with your device's vendor ID. Maybe this will get adb to recognize your device.

Edit to add: Be sure to kill the adb background process before attempting to run adb after you make this change. You want to be sure that adb really has a chance to read the new configuration before starting up:
Code:
killall adb
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21766
Location: here

PostPosted: Tue Sep 13, 2016 12:06 pm    Post subject: Reply with quote

If doesn't work miket's suggestion, I would try to create udev rule
Code:
# echo "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"2970\", MODE=\"0666\"" >> /etc/udev/rules.d/51-android.rules

time ago I did for a device that wasn't detected from adb (unfortunately I don't have anymore this device for a test)

EDIT: I always used dev-util/android-sdk-update-manager not dev-util/android-tools
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Eiji
n00b
n00b


Joined: 27 Jul 2016
Posts: 10

PostPosted: Tue Sep 13, 2016 4:28 pm    Post subject: Reply with quote

@miket: thx, now I can see my device and access shell to it.
Can you link to a good tutorial about how to root my phone with these packages? I tried some tutorials, but can't do it.
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 411
Location: Gainesville, FL, USA

PostPosted: Wed Sep 14, 2016 4:30 am    Post subject: Reply with quote

Eiji wrote:
Can you link to a good tutorial about how to root my phone with these packages? I tried some tutorials, but can't do it.

The trouble with Android rooting is that there nothing even close to a consistent, clear-cut way to do it. Sometimes a manufacturer is careless and ships the product already rooted. Very often someone has found a vulnerability in the hardware or software that can be exploited in order to gain root access. Sometimes the manufacturer of the device allows the user to alter the bootloader to open root access to the device. There is no single path; it generally comes down to the luck of the draw.

You've got a device I hadn't even heard of. You'll have to do research. Try doing internet searches mentioning your device name and the word "root". Yes indeed, it may be that tools like adb could help you. You could use it to load an .apk like Kingo or Superuser after having enabled loading by other sources (the command is adb install.) On the other hand, your path to rooting might use some other tool. All I can do at this point is wish you luck.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum