Android ADB Connection issue on a PXA27x hardware

1,059 views
Skip to first unread message

Dark Knight

unread,
Jul 30, 2010, 6:34:21 AM7/30/10
to android-porting
Hi Everyone,

I was able to port Android on to a PXA270 based hardware, with the
following features working
- Display (Smart panel QVGA display )
- Touch screen (with corrections that I obtained using tslib for this
display)
- 3x3 Keypad
- USB Client (I had to change few things in android.c and pxa27x
gadget driver to make it work)

Now I am facing a problem regarding ADB. I will explain in detail,
before that I will tell you how I was able to port the USB Client to
android.

The PXA27x gadget driver had a static array for mapping USB endpoints
to PXA's ones. So I had to add two extra BULK endpoints in USB and
remap the PXA endpoint list to use them.

Also in android.c, I had change the configuration variable to init
section, to bss, as it was causing a crash during enumeration. Now
with this I was able to complete enumeration.

On the desktop side, (Windows XP PC), I modified the
'android_winusb.inf', recognize my hardware.

With all these changes, I was able to detect my device as "Android"
from PC. Also on giving 'adb devices' command, It was listing the
device too.

C:\Documents and Settings\vaisakh.ps\temp>adb devices
List of devices attached
0123456789ABCDEF device

The ADB push and pull commands also seems to be working,
C:\Documents and Settings\vaisakh.ps\temp>adb pull /data/app/
test_algorithm_host
279 KB/s (0 bytes in 26788.000s)

C:\Documents and Settings\vaisakh.ps\temp>adb pull /system/
build.prop
101 KB/s (0 bytes in 1621.000s)


C:\Documents and Settings\vaisakh.ps\temp>adb pull /data/WinVNC.log
522 KB/s (0 bytes in 133769.000s)

But other actions such as
- opening a shell connection using 'adb shell'
- deploying and debugging using eclipse and ADT is not working.

Has anyone come across such a problem?

here is the console log that I saw in eclipse

[2010-07-30 15:11:08 - ddms]ADB rejected shell command (getprop):
closed
[2010-07-30 15:14:42 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/ApiDemos.apk"): closed
[2010-07-30 15:14:42 - ddms]ADB rejected shell command (rm /data/
local/tmp/ApiDemos.apk): closed
[2010-07-30 15:14:42 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:15:02 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/ApiDemos.apk"): closed
[2010-07-30 15:15:02 - ddms]ADB rejected shell command (rm /data/
local/tmp/ApiDemos.apk): closed
[2010-07-30 15:15:02 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:16:34 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/ApiDemos.apk"): closed
[2010-07-30 15:16:34 - ddms]ADB rejected shell command (rm /data/
local/tmp/ApiDemos.apk): closed
[2010-07-30 15:16:34 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:20:24 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/Snake.apk"): closed
[2010-07-30 15:20:24 - ddms]ADB rejected shell command (rm /data/
local/tmp/Snake.apk): closed
[2010-07-30 15:20:24 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:21:13 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/Snake.apk"): closed
[2010-07-30 15:21:13 - ddms]ADB rejected shell command (rm /data/
local/tmp/Snake.apk): closed
[2010-07-30 15:21:13 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:22:05 - ddms]ADB rejected shell command (getprop):
closed
[2010-07-30 15:22:05 - ddms]null
java.lang.NullPointerException
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.doSyncApp(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.syncApp(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.clientChanged(Unknown
Source)
at com.android.ddmlib.AndroidDebugBridge.clientChanged(Unknown
Source)
at com.android.ddmlib.Device.update(Unknown Source)
at com.android.ddmlib.Client.update(Unknown Source)
at com.android.ddmlib.HandleHello.handleHELO(Unknown Source)
at com.android.ddmlib.HandleHello.handleChunk(Unknown Source)
at com.android.ddmlib.MonitorThread.callHandler(Unknown Source)
at com.android.ddmlib.MonitorThread.processClientActivity(Unknown
Source)
at com.android.ddmlib.MonitorThread.run(Unknown Source)

[2010-07-30 15:22:10 - ddms]ADB rejected shell command (getprop):
closed
[2010-07-30 15:22:10 - ddms]null
java.lang.NullPointerException
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.doSyncApp(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.syncApp(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.clientChanged(Unknown
Source)
at com.android.ddmlib.AndroidDebugBridge.clientChanged(Unknown
Source)
at com.android.ddmlib.Device.update(Unknown Source)
at com.android.ddmlib.Client.update(Unknown Source)
at com.android.ddmlib.HandleHello.handleHELO(Unknown Source)
at com.android.ddmlib.HandleHello.handleChunk(Unknown Source)
at com.android.ddmlib.MonitorThread.callHandler(Unknown Source)
at com.android.ddmlib.MonitorThread.processClientActivity(Unknown
Source)
at com.android.ddmlib.MonitorThread.run(Unknown Source)

[2010-07-30 15:22:30 - ddms]ADB rejected shell command (getprop):
closed
[2010-07-30 15:23:27 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/Snake.apk"): closed
[2010-07-30 15:23:27 - ddms]ADB rejected shell command (rm /data/
local/tmp/Snake.apk): closed
[2010-07-30 15:23:27 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:26:55 - ddms]ADB rejected shell command (getprop):
closed
[2010-07-30 15:26:55 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/Snake.apk"): closed
[2010-07-30 15:26:55 - ddms]ADB rejected shell command (rm /data/
local/tmp/Snake.apk): closed
[2010-07-30 15:26:55 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:27:11 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/Snake.apk"): closed
[2010-07-30 15:27:11 - ddms]ADB rejected shell command (rm /data/
local/tmp/Snake.apk): closed
[2010-07-30 15:27:11 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:34:08 - ddms]ADB rejected shell command (getprop):
closed
[2010-07-30 15:34:08 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/Snake.apk"): closed
[2010-07-30 15:34:08 - ddms]ADB rejected shell command (rm /data/
local/tmp/Snake.apk): closed
[2010-07-30 15:34:08 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:40:02 - ddms]ADB rejected shell command (getprop):
closed
[2010-07-30 15:40:03 - ddms]ADB rejected shell command (pm install -r
"/data/local/tmp/Snake.apk"): closed
[2010-07-30 15:40:03 - ddms]ADB rejected shell command (rm /data/
local/tmp/Snake.apk): closed
[2010-07-30 15:40:03 - Device]Failed to delete temporary package: sad
result from adb: closed
[2010-07-30 15:40:23 - ddms]ADB rejected shell command (getprop):
closed

How do I go about this problem?



Thanks & Regards,
Vaisakh P S
(http://www.google.com/profiles/VaisakhRulez)

Srikant

unread,
Jul 31, 2010, 12:57:48 PM7/31/10
to android-porting
adb pull/push commands show 0 bytes transferred??

For adb shell working, try the below from su
#adb kill-server
#adb shell

-

Dark Knight

unread,
Aug 1, 2010, 8:04:22 AM8/1/10
to android-porting
Yeah it was showing zero bytes, while pulling files, but the files
were getting transferred between PC and devices.
I will try killing server as per your command sequence.


Regards,
Vaisakh P S

Dark Knight

unread,
Aug 2, 2010, 1:52:01 AM8/2/10
to android-porting
I tried giving kill-server and adb shell, but the output is same. it
is giving "error:closed"

One more things I observed was that, when issued the command "adb usb"
after the device was connected and detected (using adb devices). i saw
the following log in logcat:

disabling adb
adb_release
D/jdwp ( 777): adbd disconnected
D/jdwp ( 837): adbd disconnected
D/jdwp ( 890): adbd disconnected
D/jdwp ( 871): adbd disconnected
D/jdwp ( 917): adbd disconnected
D/jdwp ( 911): adbd disconnected
D/jdwp ( 902): adbd disconnected
D/jdwp ( 844): adbd disconnected
D/jdwp ( 853): adbd disconnected
D/jdwp ( 864): adbd disconnected
D/jdwp ( 784): adbd disconnected
D/jdwp ( 781): adbd disconnected
D/jdwp ( 715): adbd disconnected
D/dalvikvm( 777): Debugger has detached; object registry had 1
entries
D/dalvikvm( 837): Debugger has detached; object registry had 1
entries
D/dalvenabling adb
ikvm( 890): Debugger has detached; object registry had 1 entries
D/dalvikvm( 871): Debugger has detached; object registry had 1
entries
D/dalvikvm( 917): Debugger has detached; object registry had 1
entries
D/dalvikvm( 911): Debugger has detached; object registry had 1
entries
D/adb_open
dalvikvm( 902): Debugger has detached; object registry had 1 entries
D/jdwp ( 924): adbd disconnected
D/dalvikvm( 844): Debugger has detached; object registry had 1
entries
D/jdwp ( 811): adbd disconnected
D/dalvikvm( 853): Debugger has detached; object registry had 1
entries
D/dalvikvm( 864): Debugger has detached; object registry had 1
entries
D/jdwp ( 789): adbd disconnected
D/dalvikvm( 784): Debugger has detached; object registry had 1
entries
D/dalvikvm( 781): Debugger has detached; object registry had 1
entries
D/dalvikvm( 715): Debugger has detached; object registry had 1
entries
D/dalvikvm( 924): Debugger has detached; object registry had 1
entries
D/dalvikvm( 811): Debugger has detached; object registry had 1
entries
D/dalvikvm( 789): Debugger has detached; object registry had 1
entries
I/power ( 715): *** set_screen_state 0

Also, after this any command like "adb shell" or "adb shell <any-
command>" is hanging.

Regards,
Vaisakh P S

Dark Knight

unread,
Aug 4, 2010, 9:02:14 AM8/4/10
to android-porting
Hi,

Found the problem, adb is creating process using /dev/ptmx device. it
was failing over there, as I had not added Unix PTY support in kernel.

Regards,
Vaisakh P S
Reply all
Reply to author
Forward
0 new messages