As an Android developer, I have a ton of spare devices running various versions of Android. One of them is the original Samsung Galaxy Note running CM10 so that I can test backward compat with 4.x.
Unfortunately, I have been unable to connect to it via adb/mtp/mass_storage for quite some time. adb via wifi works, but is dog slow when running connectedCheck.
Luckily, I figured out how to fix it yesterday (and thus the reason I am leaving this post so I can find it in a years time when I forget yet again).
It's completely incompatible with USB hubs. While all my other devices are plugged in through a single hub so that I can test on multiple devices, this CM10 device requires that I plug it in directly. Once I did that, it started working normally.
Why didn't I think of that earlier? Did I mention that none of the other devices have this problem? Just the CM10 device.
Search This Blog
Showing posts with label Devices. Show all posts
Showing posts with label Devices. Show all posts
13 April 2016
28 October 2015
USB3 hub disconnecting - dropping adb connection
I'm probably jumping the gun, but I am hopeful.
I was having a problem where my new OctoFire hub was disconnecting quite often -- especially if using something like Android ScreenMonitor.
I think it is fixed. I found the suggestion to disable the autosuspend here.
Edit the /etc/default/grub file and append to the GRUB_CMDLINE_
usbcore.Then run:autosuspend= -1
sudo update-grub
sudo reboot
03 June 2013
Unable to open MTP device '[usb:003,021]'
Recently I upgraded my Samsung Galaxy Note to JellyBean. Around the same time, I also upgraded both the desktop and laptop to Raring Ringtail. When connecting the device to the dev boxes, the laptop continued to work. The desktop however would give me a never ending loop of popups like this one:
While trying to resolve it, I found this fix about the ASUS Transformer...
I followed the same instructions with a few slight tweaks...
/etc/udev/rules.d/51-android.rules:
in /etc/fstab:
Now, when I connect, I get about 50 popups but then ADB works again.
Unable to open MTP device '[usb:003,021]'
While trying to resolve it, I found this fix about the ASUS Transformer...
I followed the same instructions with a few slight tweaks...
/etc/udev/rules.d/51-android.rules:
# MTP Settings added by Malachi
# From dmesg:
# [ 166.765498] usb 3-4: reset high-speed USB device number 20 using ehci-pci
# [ 166.845468] usb 3-4: USB disconnect, device number 20
# [ 167.084889] usb 3-4: new high-speed USB device number 21 using ehci-pci
# [ 167.219607] usb 3-4: New USB device found, idVendor=04e8, idProduct=6860
# [ 167.219609] usb 3-4: New USB device strings: Mfr=2, Product=3, SerialNumber=4
# [ 167.219611] usb 3-4: Product: SAMSUNG-SGH-I717
# [ 167.219613] usb 3-4: Manufacturer: samsung
# [ 167.219614] usb 3-4: SerialNumber: 2a4c2c04
ENV{ID_MODEL}=="SAMSUNG-SGH-I717", ENV{ID_MODEL_ID}=="6860", ACTION=="add", RUN+="/usr/bin/sudo -b -u malachi /usr/bin/go-mtpfs -allow-other=true /media/SGH-I717"
ENV{ID_MODEL}=="SAMSUNG-SGH-I717", ENV{ID_MODEL_ID}=="6860", ACTION=="remove", RUN+="/bin/umount /media/SGH-I717"
in /etc/fstab:
DeviceFs(SAMSUNG-SGH-I717) /media/SGH-I717 fuse.DeviceFs(SAMSUNG-SGH-I717) allow_other,rw,user,noauto 0 0
Now, when I connect, I get about 50 popups but then ADB works again.
09 May 2013
Upgrading the Galaxy Note to Jelly Bean
I received an SMS from AT&T today telling me that I could upgrade to JB using KIES. Enough acronyms for you?
Rebooting into Windows so that I could launch Kies....
Starting Kies, it detected that it was out of date and updated.
Afterwards, plugging in the phone, it detected the firmware was out of date and tried to update.
That's where things got redundant. I got in an infinite loop that kept stopping at:
Now, don't get me wrong. My first thought was maybe I was down to 100MB internal storage again. I do tend to install a couple hundred apps.
But, now according to the file manager:
So what's going on?
After a few attempts, I went to Settings | Storage | Unmount SD Card
After that Kies was able to upgrade the device.
Rebooting into Windows so that I could launch Kies....
Starting Kies, it detected that it was out of date and updated.
Afterwards, plugging in the phone, it detected the firmware was out of date and tried to update.
That's where things got redundant. I got in an infinite loop that kept stopping at:
Now, don't get me wrong. My first thought was maybe I was down to 100MB internal storage again. I do tend to install a couple hundred apps.
But, now according to the file manager:
So what's going on?
After a few attempts, I went to Settings | Storage | Unmount SD Card
After that Kies was able to upgrade the device.
23 January 2012
Reverse USB Tethering
I decided to give reverse usb tethering a shot. I don't know which devices easily support this, but I assume you have to be root. In my particular case, I was using an ICS device. These steps could easily screw up your existing cell routing - so make sure your willing to risk it.
Step 0: Make sure the device is booted and connected via USB
Step 1: Enable tethering on the device side
Step 5: Ping the workstation from the device
[ most people probably use eth0. Just use ifconfig to check which one is active]
Step 0: Make sure the device is booted and connected via USB
Step 1: Enable tethering on the device side
- Go to Settings
- Under the Wireless & Networks, click on More
- Click on Tethering & portable hotspot
- Enable USB Tethering
Step 3: Get the matching IP Address of the workstationmalachi@onyx:~$ adb shell
root@android:/ # netcfg
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
dummy0 DOWN 0.0.0.0/0 0x00000082 62:bc:02:e1:d5:ea
rmnet0 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet1 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet2 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet3 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet4 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet5 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet6 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
rmnet7 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
rndis0 UP 192.168.42.129/24 0x00001043 da:02:11:22:14:af
Step 4: Ping the device from the workstationmalachi@onyx:~$ ifconfig -a usb0
usb0 Link encap:Ethernet HWaddr e2:31:b5:d7:f3:7b
inet addr:192.168.42.74 Bcast:192.168.42.255 Mask:255.255.255.0
inet6 addr: fe80::e031:b5ff:fed7:f37b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1990 errors:0 dropped:0 overruns:0 frame:0
TX packets:1188 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:181334 (181.3 KB) TX bytes:657452 (657.4 KB)
malachi@onyx:~$ ping 192.168.42.129
PING 192.168.42.129 (192.168.42.129) 56(84) bytes of data.
64 bytes from 192.168.42.129: icmp_req=1 ttl=64 time=1.01 ms
64 bytes from 192.168.42.129: icmp_req=2 ttl=64 time=0.605 ms
Step 5: Ping the workstation from the device
root@android:/ # ping 192.168.42.74Step 6: Add workstation as the default gateway for the device
PING 192.168.42.74 (192.168.42.74) 56(84) bytes of data.
64 bytes from 192.168.42.74: icmp_seq=1 ttl=64 time=0.427 ms
64 bytes from 192.168.42.74: icmp_seq=2 ttl=64 time=0.397 ms
Step 7: Get a list of DNS servers from the workstationroot@android:/ # route add default gw 192.168.42.74 dev rndis0
malachi@onyx:~$ cat /etc/resolv.confStep 8: Add them to the device
nameserver 172.29.224.11
nameserver 8.8.8.8
Step 9: Setup forwarding from usb0 to eth1 on the workstationroot@android:/ # setprop net.dns1 172.29.224.11
root@android:/ # setprop net.dns2 8.8.8.8
[ most people probably use eth0. Just use ifconfig to check which one is active]
malachi@onyx:~$ sudo su - root
[sudo] password for malachi:
root@onyx:~# echo 1 > /proc/sys/net/ipv4/ip_forward
root@onyx:~# exit
Step 10: ping google ;)malachi@onyx:~$ sudo iptables --flush -t nat
malachi@onyx:~$ sudo iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
malachi@onyx:~$ sudo iptables --append FORWARD --in-interface usb0 -j ACCEPT
malachi@onyx:~$ adb shellAnd finally, check things like the Browser...
root@android:/ # ping google.com
PING google.com (74.125.127.99) 56(84) bytes of data.
64 bytes from pz-in-f99.1e100.net (74.125.127.99): icmp_seq=1 ttl=51 time=11.8 ms
64 bytes from pz-in-f99.1e100.net (74.125.127.99): icmp_seq=2 ttl=51 time=11.9 ms
11 December 2011
Publishing for GoogleTV
Yesterday I received the 3.1 update to my Logitech Revue box. Definitely better than it was, if for no other reason than the Market is finally there. So what's a developer to do besides install their own apps?
Unfortunately, FetLife wasn't available in the Market. Luckily, I had already expected that. I head over to the migrating page and try to figure out what all I need to change.
Turns out, the only thing I had to do for it to show up in the Market (for GoogleTV) was add this one line to my manifest.
This effectively makes the market quit filtering it out. After republishing, I go back to my GoogleTV and check the Market. Yep, there it is. (Note: the Market DOES allow multiple user accounts, so if you are using an account other than the one you purchased the app with; you have to add that account as well, or repurchase).
Now, at first, while it showed up, it said it was incompatible. I looked around online for a bit, then found this excellent resource on how to use ADB with my GoogleTV. You can walk through the article, but the jist of it is:
Anyways, app published and installed on the big screen. Now to disable things like camera and vibrate and....
Unfortunately, FetLife wasn't available in the Market. Luckily, I had already expected that. I head over to the migrating page and try to figure out what all I need to change.
Turns out, the only thing I had to do for it to show up in the Market (for GoogleTV) was add this one line to my manifest.
<uses-feature android:name="android.hardware.touchscreen" android:required="false">*lt;/uses-feature>
This effectively makes the market quit filtering it out. After republishing, I go back to my GoogleTV and check the Market. Yep, there it is. (Note: the Market DOES allow multiple user accounts, so if you are using an account other than the one you purchased the app with; you have to add that account as well, or repurchase).
Now, at first, while it showed up, it said it was incompatible. I looked around online for a bit, then found this excellent resource on how to use ADB with my GoogleTV. You can walk through the article, but the jist of it is:
- Tell GoogleTV that your dev box is going to be the debugging IP
- adb connect googletv-ip-address
- adb devices/logcat/etc
Anyways, app published and installed on the big screen. Now to disable things like camera and vibrate and....
05 March 2011
adb does not have permission to access my Atrix?
The Atrix does not have the option to allow installing from unknown (ie: non-Market) locations. As such, I was unsure what I would see when I tried to install APKs from the command line...
Turns out it is quite simple really....
1. Stop the existing ADB server.
2. Start adb's server as root. You could try sudo adb instead, but I didn't...
3. Run adb again... this time, with root running the server, it will work.
malachi@onyx:~$ adb devicesNot good... but, surely there is a way around that...?
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
???????????? no permissions
Turns out it is quite simple really....
1. Stop the existing ADB server.
malachi@onyx:~$ adb kill-server
2. Start adb's server as root. You could try sudo adb instead, but I didn't...
malachi@onyx:~$ sudo su - root
root@onyx:~# adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
root@onyx:~# exit
logout
3. Run adb again... this time, with root running the server, it will work.
malachi@onyx:~$ adb devices
List of devices attached
TA20704PWJ device
04 March 2011
Subscribe to:
Posts (Atom)

