[Q] adb shell question - Android Q&A, Help & Troubleshooting

Hi all,
I have a Dell server,
plugged in my rooted Galaxy S2,
installed Ubuntu 12.04 LTS,
Ran the following:
apt-get install openjdk-6-jdk
apt-get install ia32-libs-multiarch
downloaded adt-bundle-linux-x86_64-20140321.zip and extracted it, found adb.
I can see my phone:
# adb devices
List of devices attached
4fad0260 device
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 0624:0248 Avocent Corp.
Bus 002 Device 006: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]
Bus 002 Device 004: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 002 Device 005: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
I can reboot it and do other basic tasks but I can't send an sms from the shell
#adb shell am start –a android.intent.action.SENDTO –d sms:014166666666 --es sms_body "Hello World" --ez exit_on_sent true
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] pkg=–a }
Error: Activity not started, unable to resolve Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=–a }
I read posts about 'changing your manifest file' but again, it's purely a standalone purpose and I'm not writing an application.
Any ideas?
Thank you

gingivitor said:
Hi all,
I have a Dell server,
plugged in my rooted Galaxy S2,
installed Ubuntu 12.04 LTS,
Ran the following:
apt-get install openjdk-6-jdk
apt-get install ia32-libs-multiarch
downloaded adt-bundle-linux-x86_64-20140321.zip and extracted it, found adb.
I can see my phone:
# adb devices
List of devices attached
4fad0260 device
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 0624:0248 Avocent Corp.
Bus 002 Device 006: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]
Bus 002 Device 004: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 002 Device 005: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
I can reboot it and do other basic tasks but I can't send an sms from the shell
#adb shell am start –a android.intent.action.SENDTO –d sms:014166666666 --es sms_body "Hello World" --ez exit_on_sent true
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] pkg=–a }
Error: Activity not started, unable to resolve Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=–a }
I read posts about 'changing your manifest file' but again, it's purely a standalone purpose and I'm not writing an application.
Any ideas?
Thank you
Click to expand...
Click to collapse
Are you trying to send via adb shell for a specific purpose or you just want to be able to send SMS via your computer in general? If just general, then check out AirDroid. Nice web based interface and works pretty well. It also allows you to transfer files (limited amount for free), see what's on storage, your pics, etc.

es0tericcha0s said:
Are you trying to send via adb shell for a specific purpose or you just want to be able to send SMS via your computer in general? If just general, then check out AirDroid. Nice web based interface and works pretty well. It also allows you to transfer files (limited amount for free), see what's on storage, your pics, etc.
Click to expand...
Click to collapse
Thanks for the tip!
Yes I want to build an internal webpage to send out sms txt's via paid cell phone and usb cable.
I was going to have the webpage (via php) ssh in and run adb shell to send out the sms text programmatically.

gingivitor said:
Thanks for the tip!
Yes I want to build an internal webpage to send out sms txt's via paid cell phone and usb cable.
I was going to have the webpage (via php) ssh in and run adb shell to send out the sms text programmatically.
Click to expand...
Click to collapse
Maybe this would be helpful then? http://ubuntuforums.org/showthread.php?t=2140370

es0tericcha0s said:
Maybe this would be helpful then?
Click to expand...
Click to collapse
That worked great! Thank you!
Is this a new thing with android? I'm curious why I have to buy an app to do something that I was able to do before (without intent errors)
Thanks again

gingivitor said:
That worked great! Thank you!
Is this a new thing with android? I'm curious why I have to buy an app to do something that I was able to do before (without intent errors)
Thanks again
Click to expand...
Click to collapse
I've no clue. It's not something I've ever bothered looking in to. Just thought I would be helpful and I like to learn new things. Glad that was what you were looking for though!

Related

[Q] My adb devices list is empty!

Hi guys,
I have used the following tutorials:
http://forum.xda-developers.com/showthread.php?t=735375
http://forum.xda-developers.com/showthread.php?t=921169&page=2
But still when I type "./adb devices" or "sudo ./adb devices" all I get is "List of aevices attached" followed by a blank. Do you know a way to fix this?
I'm using a Samsung Galaxy Tab.
Thanks in advance.
Could you paste your dmesg? What's your OS?
Could you paste your 51-android.rules and output of lsusb?
My OS is Ubuntu 11.10
The output of lsusb is:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 03f0:5c11 Hewlett-Packard PhotoSmart C4200 Printer series
Bus 003 Device 002: ID 045e:00f7 Microsoft Corp. LifeCam VX-1000
Bus 006 Device 002: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
Bus 006 Device 003: ID 045e:0730 Microsoft Corp.
Bus 002 Device 005: ID 04e8:6877 Samsung Electronics Co., Ltd
Click to expand...
Click to collapse
The 51-android-rules file contains
SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666
Click to expand...
Click to collapse
Are you using the stock USB cable that came with your tablet? Is the cable in good shape?
I had a Samsung device that would not show up under my devices in Ubuntu. I later discovered it was because my cable was damaged internally. It charged, but had trouble connecting for data.
Is there any way this could be the issue?
adb driver
are you sure you have install the adb driver ?
The vendor id in your udev file is the HTC vendor id.. you should use the samsung one: 04e8
Besides, you can just try:
adb kill-server
and then:
sudo adb start-server
and see if you can get your device listed
it's so easy, just turn off your android device, then hold down both "Volume Down" key and "Power" at the same time, wait a few seconds till it start in recovery mode, done.
now type adb devices, and you'll see your device.

[Q] Flashing rom in Linux (Arch Linux)

Hi
I have installed Arch Linux but cannot find suitable material on setting up drivers and utilities for flashing rom on Linux specifically arch linux.
I can setup arch even if instructions are available for other distro Linux Mint and Ubuntu so any link can come in handy.
I was using flashtool in windows but after shifting to Arch, I am not sure whats the right procedure to do it.
I have unlocked bootloader and rooted rom (FXP kernel + MIUI) installed as of now which I want to change asap.
Please help.
Regards
Hello,
You don't need any drivers,just install android-udev and android-sdk-platform-tools for adb and fastboot (both from aur).
Download latest flastool and run it from the terminal just like you do in windows (it requires jre and libusbx from official repos ).
Ok I have reinstalled fatsboot, android-sdk-platform-tools and openjre
Now I still cannot use fastboot devices , its list nothing.
Also since I should have adb available (from sdk-platform) when I run adb it says no command ?
Code:
[[email protected] fastboot]$ fastboot devices
[[email protected] fastboot]$ sudo fastboot devices
[[email protected] fastboot]$ sudo fastboot devices
[[email protected] fastboot]$ sudo adb
sudo: adb: command not found
[[email protected] fastboot]$ adb
bash: adb: command not found
I have also installed udev-android , previous I created 51-android.rules manually but still doesnt work.
fastboot won't list the devices nor it works.
Code:
[sha[email protected] fastboot]$ lsusb
Bus 002 Device 005: ID 413c:2107 Dell Computer Corp.
Bus 002 Device 003: ID 046d:c051 Logitech, Inc. G3 (MX518) Optical Mouse
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 021: ID 0fce:5146 Sony Ericsson Mobile Communications AB
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
First of all make sure you have enabled usb debugging on your phone.Adb and fastboot should be under /opt/android-sdk/platform-tools/ and also 51-android.rules file in /usr/lib/udev/rules.d/ (with -rw-r--r-- permissions).
With these things i have everything in my sytem to flash roms etc,maybe you're missing something with your installation.
Also for more information check wiki from archlinux wiki.archlinux.org/index.php/android

Not able to setup adb with Oneplus X on Ubuntu 14.04.3

The issue is now solved.
I'm trying to set up adb in Ubuntu 14.04.3 64bit but its not showing up when I connect my device.
Here is what I did
I installed adb and fastboot using these commands
Code:
sudo apt-get install android-tools-adb android-tools-fastboot
I got the adb driver files from my device and executed it
Code:
sh ~/Desktop/adb_config_Linux_OSX.sh
The command got executed and adb_usb.ini file got created successfully at ~/.android/ folder.
Now I connected my device with USB debugging ON
When I run the adb devices command this is what I get
Code:
List of devices attached
The list of devices is empty.
When I run my lsusb command
Code:
Bus 001 Device 005: ID 0cf3:0036 Atheros Communications, Inc.
Bus 001 Device 003: ID 0bda:5756 Realtek Semiconductor Corp.
Bus 001 Device 010: ID 2a70:904d
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The vendor is not showing up. It is left blank.
I tried the same method in both MTP as well as PTP mode. Still no luck.
Could someone help me out please because I operate only on Ubuntu and can't use Windows.
Have you enabled `android debug`?
YumeMichi said:
Have you enabled `android debug`?
Click to expand...
Click to collapse
You mean usb debugging?? Yes I have
Run the script as root and you should be fine, tested with Linux Mint 17.2.
Not sure if it makes a difference, I made it executable with chmod +x and run as root from my home directory instead of using sh.
Solved the issue...The RSA fingerprint had to be accepted on the device.
Also I had to run all commands as administrator using sudo
Sent from my ONE E1003 using Tapatalk

Onyx not recognized by Ubuntu

My oneplus x is rooted and running latest orion os. The problem is that it is not appearing in lsusb command in Ubuntu 16.04. When I connect my phone nothing appears. But I can use my phone for usb tethering to connect my pc to internet. I want to be able to use mtp & adb. Can anyone help?
And here is the output of lsusb:
Code:
$ lsusb
Bus 002 Device 004: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 002 Device 005: ID 05c6:6769 Qualcomm, Inc.
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 008: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 001 Device 006: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Update: Interesting when I disconnect my phone "Bus 002 Device 005: ID 05c6:6769 Qualcomm, Inc. " disappears.
Bump!
I don't know..but my onyx is recognized on Ubuntu. I have installed Android Studio from here, maybe that's why.
raulx222 said:
I don't know..but my onyx is recognized on Ubuntu. I have installed Android Studio from here, maybe that's why.
Click to expand...
Click to collapse
Can u send me the default mac os driver .sh file which can be obtained by emulated cdrom of onyx? May be installing that will help.
raulx222 said:
I don't know..but my onyx is recognized on Ubuntu. I have installed Android Studio from here, maybe that's why.
Click to expand...
Click to collapse
Ok after installing android studio, my device is actually being shown in the nautilus as mtp device but when I click on it following error occurs:
Unable to open MTP device '[usb:002,009]'
The output of lsusb is still the same i.e.:
Code:
$ lsusb
Bus 002 Device 009: ID 05c6:6765 Qualcomm, Inc.
Bus 002 Device 003: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 001 Device 003: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
sixline said:
Ok after installing android studio, my device is actually being shown in the nautilus as mtp device but when I click on it following error occurs:
Unable to open MTP device '[usb:002,009]'
The output of lsusb is still the same i.e.:
Code:
$ lsusb
Bus 002 Device 009: ID 05c6:6765 Qualcomm, Inc.
Bus 002 Device 003: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 001 Device 003: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Click to expand...
Click to collapse
Make sure you are using latest Ubuntu and have your phone's screen unlocked. Also make sure that your cable works properly, maybe try another one.
raulx222 said:
Make sure you are using latest Ubuntu and have your phone's screen unlocked. Also make sure that your cable works properly, maybe try another one.
Click to expand...
Click to collapse
Well I am using ubuntu 16.04 lts as i mentioned in the op so its the latest. And i am using the oem cable came with the device. I ve also checked with two more cables which are working with other phones.
Sent from my ONE E1003 using XDA-Developers mobile app
Well atleast adb is now recognizing my device by following the procedure given by Evan Carroll at http://askubuntu.com/questions/461729/ubuntu-is-not-detecting-my-android-device
Now only problem remains is the mtp which return error: Unable to open MTP device '[usb:002,018]'
sixline said:
Well atleast adb is now recognizing my device by following the procedure given by Evan Carroll at http://askubuntu.com/questions/461729/ubuntu-is-not-detecting-my-android-device
Now only problem remains is the mtp which return error: Unable to open MTP device '[usb:002,018]'
Click to expand...
Click to collapse
Can you try to reboot phone while the phone is plugged?
Kéno40 said:
Can you try to reboot phone while the phone is plugged?
Click to expand...
Click to collapse
Yes I can reboot my phone using adb.
sixline said:
Yes I can reboot my phone using adb.
Click to expand...
Click to collapse
Edit sorry , I meant :
Try to reboot your computer while the phone is plugged
Edit : An outdated french guide with Go-MTPFS (not sure it could help)
http://korben.info/installer-nexus-7-android-4-0-ubuntu.html
Kéno40 said:
Edit sorry , I meant :
Try to reboot your computer while the phone is plugged
Edit : An outdated french guide with Go-MTPFS (not sure it could help)
http://korben.info/installer-nexus-7-android-4-0-ubuntu.html
Click to expand...
Click to collapse
Thanks for your concern but I switched rom to sultan's cm13, after that its working.

New kid (and mobile model) on the block...

Hello all, I have a little project I'd like some help on. I have recently bought an Alba 4 inch with android 7 (Nougat). I'd like to use this phone purely for SatNav work, but it appears that it doesn't like working the GPS without SIM or wireless. I have done some research and apparently, a few people have experienced a similar issue when updating from android 6 to 7. So I thought I'd root my 'Alba' and flash it back to 6 to see if that improves the GPS usage unless someone can tell me otherwise. It's quite maddening as I have an old Nokia Lumia 925 (Windows 8.1) which has no problem using the internal GPS device without wireless or SIM card - in fact, my old N8 and X6 have no problem at all and I still use those but software is now almost defunct. However, I'd like to pursue with the 'Alba' as I want to install OsmAnd or equivalent app and upload created gpx routes from my laptop, for me to use on my mountain bike or road bike. The reason I'm going for a fairly simple mobile, but should fit the bill, is that it can be charged while out in the wild with a basic solar power pack. My other phone the Honor 8 requires more than a simple solar pack....
Details of phone - Alba 4 3g (AC40AS3G / SKU133814622) with Archos android 7.
Steps taken...
'OneClickRoot' doesn't have a root app entry for my particular phone. Now I've done the build number trick, allowed usb debugging, got the PC authorised on the phone, installed android sdk on my Ubuntu 12.04 laptop and I can run adb and some commands:
'adb devices' creates:
[email protected]:~$ adb devices
List of devices attached
18643080980731 device
'adb shell' creates:
[email protected]:~$ adb shell
ac40as3g:/ $
'adb reboot bootloader' - gives a screen with 'fastboot mode' in the top left corner of the mobile.
'fastboot oem unlock' and 'fastboot flashing unlock- both give "< waiting for any device >" but no listing
'fastboot devices' - this then produces "no permissions (user in plugdev group; are your udev rules wrong?); see [developer website] "
My lsusb command produces this, with phone connected in normal mode:
userATlaptop:~$ lsusb
Bus 002 Device 004: ID 0e79:5604 Archos, Inc.
Bus 008 Device 002: ID 8086:0189 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
My 51-android.rules file contains :
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666", GROUP="plugdev"
I also have a custom rule called '70-abdroid-custom-device.rules' which I created from some 'googled' page...
# Archos 4
ACTION=="add|change", SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", ATTRS{idProduct}=="5609", TAG+="uaccess"
ACTION=="add|change", SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", ATTRS{idProduct}=="5604", TAG+="uaccess"
'fastboot flashing get_unlock_ability' - this produces "< waiting for any device >" but nothing.
So questions are:
Have I got my udev right?
What would be the next step after correcting the first question?
...any other suggestions? Apart from 'throw it in the bin...' thanks.

Categories

Resources