Closed Bug 797652 Opened 12 years ago Closed 12 years ago

Current code agent code crashes on android 2.3

Categories

(Testing Graveyard :: SUTAgent, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla19

People

(Reporter: cmtalbert, Assigned: jmaher)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch the fix (obsolete) — Splinter Review
Logcat: I/ActivityManager( 1021): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 pkg=com.mozilla.SUTAgentAndroid cmp=com.mozilla.SUTAgentAndroid/.SUTAgentAndroid } I/ActivityManager( 1021): Start proc com.mozilla.SUTAgentAndroid for activity com.mozilla.SUTAgentAndroid/.SUTAgentAndroid: pid=1511 uid=10031 gids={3003, 1015, 3002, 3001} D/dalvikvm( 1511): DexOpt: couldn't find static field W/dalvikvm( 1511): VFY: unable to resolve static field 83 (SERIAL) in Landroid/os/Build; D/dalvikvm( 1511): VFY: replacing opcode 0x62 at 0x000d D/dalvikvm( 1511): VFY: dead code 0x000f-0010 in Lcom/mozilla/SUTAgentAndroid/SUTAgentAndroid;.getHWID (Landroid/content/Context;)Ljava/lang/String; I/dalvikvm( 1511): Could not find method java.net.NetworkInterface.getHardwareAddress, referenced from method com.mozilla.SUTAgentAndroid.SUTAgentAndroid.onCreate W/dalvikvm( 1511): VFY: unable to resolve virtual method 729: Ljava/net/NetworkInterface;.getHardwareAddress ()[B D/dalvikvm( 1511): VFY: replacing opcode 0x6e at 0x0093 D/dalvikvm( 1511): VFY: dead code 0x0096-00ce in Lcom/mozilla/SUTAgentAndroid/SUTAgentAndroid;.onCreate (Landroid/os/Bundle;)V I/SUTAgentAndroid( 1511): onCreate D/BluetoothService( 1021): Bluetooth state 10 -> 11 I/bluedroid( 1021): Starting hciattach daemon I/bluedroid( 1021): Starting bluetoothd deamon E/BluetoothEventLoop.cpp( 1021): event_filter: Received signal org.freedesktop.DBus:NameAcquired from /org/freedesktop/DBus I/global ( 1021): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required. D/BluetoothService( 1021): Bluetooth state 11 -> 12 I/bluetooth_ScoSocket.cpp( 1271): Listening SCO socket... D/dalvikvm( 1021): GC_EXPLICIT freed 14474 objects / 717088 bytes in 43ms D/BluetoothService( 1021): Bluetooth state 12 -> 13 D/ScoSocket( 1271): android.bluetooth.ScoSocket@442e6908 SCO OBJECT close() mState = 2 V/BluetoothEventRedirector( 1288): Received android.bluetooth.adapter.action.STATE_CHANGED W/ActivityManager( 1021): Launch timeout has expired, giving up wake lock! W/ActivityManager( 1021): Activity idle timeout for HistoryRecord{44511748 com.mozilla.SUTAgentAndroid/.SUTAgentAndroid} I/bluedroid( 1021): Stopping bluetoothd deamon I/bluedroid( 1021): Stopping hciattach deamon D/BluetoothService( 1021): Bluetooth state 13 -> 10 V/BluetoothEventRedirector( 1288): Received android.bluetooth.adapter.action.STATE_CHANGED D/AndroidRuntime( 1511): Shutting down VM W/dalvikvm( 1511): threadid=1: thread exiting with uncaught exception (group=0x4001d820) E/AndroidRuntime( 1511): FATAL EXCEPTION: main E/AndroidRuntime( 1511): java.lang.NoSuchFieldError: android.os.Build.SERIAL E/AndroidRuntime( 1511): at com.mozilla.SUTAgentAndroid.SUTAgentAndroid.getHWID(SUTAgentAndroid.java:751) E/AndroidRuntime( 1511): at com.mozilla.SUTAgentAndroid.SUTAgentAndroid.onCreate(SUTAgentAndroid.java:267) E/AndroidRuntime( 1511): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) E/AndroidRuntime( 1511): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) E/AndroidRuntime( 1511): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) E/AndroidRuntime( 1511): at android.app.ActivityThread.access$2300(ActivityThread.java:125) E/AndroidRuntime( 1511): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) E/AndroidRuntime( 1511): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 1511): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 1511): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime( 1511): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 1511): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 1511): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) E/AndroidRuntime( 1511): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) E/AndroidRuntime( 1511): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 1021): Force finishing activity com.mozilla.SUTAgentAndroid/.SUTAgentAndroid W/ActivityManager( 1021): Activity pause timeout for HistoryRecord{44511748 com.mozilla.SUTAgentAndroid/.SUTAgentAndroid} D/dalvikvm( 1288): GC_EXPLICIT freed 2502 objects / 175240 bytes in 55ms W/ActivityManager( 1021): Activity destroy timeout for HistoryRecord{44511748 com.mozilla.SUTAgentAndroid/.SUTAgentAndroid} D/dalvikvm( 1426): GC_EXPLICIT freed 2205 objects / 179232 bytes in 57ms I/ActivityManager( 1021): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 pkg=com.mozilla.SUTAgentAndroid cmp=com.mozilla.SUTAgentAndroid/.SUTAgentAndroid } W/ActivityManager( 1021): Launch timeout has expired, giving up wake lock! W/ActivityManager( 1021): Activity idle timeout for HistoryRecord{44429340 com.mozilla.SUTAgentAndroid/.SUTAgentAndroid} I/Process ( 1511): Sending signal. PID: 1511 SIG: 9 I/ActivityManager( 1021): Process com.mozilla.SUTAgentAndroid (pid 1511) has died. I/UsageStats( 1021): Unexpected resume of com.android.launcher while already resumed in com.mozilla.SUTAgentAndroid W/InputManagerService( 1021): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44417b58 I/dalvikvm( 1021): Total arena pages for JIT: 11 I/ActivityManager( 1021): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 pkg=com.mozilla.SUTAgentAndroid cmp=com.mozilla.SUTAgentAndroid/.SUTAgentAndroid } I/ActivityManager( 1021): Start proc com.mozilla.SUTAgentAndroid for activity com.mozilla.SUTAgentAndroid/.SUTAgentAndroid: pid=1628 uid=10031 gids={3003, 1015, 3002, 3001} D/dalvikvm( 1628): DexOpt: couldn't find static field W/dalvikvm( 1628): VFY: unable to resolve static field 83 (SERIAL) in Landroid/os/Build; D/dalvikvm( 1628): VFY: replacing opcode 0x62 at 0x000d D/dalvikvm( 1628): VFY: dead code 0x000f-0010 in Lcom/mozilla/SUTAgentAndroid/SUTAgentAndroid;.getHWID (Landroid/content/Context;)Ljava/lang/String; I/dalvikvm( 1628): Could not find method java.net.NetworkInterface.getHardwareAddress, referenced from method com.mozilla.SUTAgentAndroid.SUTAgentAndroid.onCreate W/dalvikvm( 1628): VFY: unable to resolve virtual method 729: Ljava/net/NetworkInterface;.getHardwareAddress ()[B D/dalvikvm( 1628): VFY: replacing opcode 0x6e at 0x0093 D/dalvikvm( 1628): VFY: dead code 0x0096-00ce in Lcom/mozilla/SUTAgentAndroid/SUTAgentAndroid;.onCreate (Landroid/os/Bundle;)V I/SUTAgentAndroid( 1628): onCreate D/BluetoothService( 1021): Bluetooth state 10 -> 11 V/BluetoothEventRedirector( 1288): Received android.bluetooth.adapter.action.STATE_CHANGED I/bluedroid( 1021): Starting hciattach daemon I/bluedroid( 1021): Starting bluetoothd deamon I/BluetoothEventLoop.cpp( 1021): agent_event_filter: Received method org.bluez.Agent:Release D/BluetoothService( 1021): Bluetooth state 11 -> 12 V/BluetoothEventRedirector( 1288): Received android.bluetooth.adapter.action.STATE_CHANGED I/bluetooth_ScoSocket.cpp( 1271): Listening SCO socket... D/BluetoothService( 1021): Bluetooth state 12 -> 13 D/ScoSocket( 1271): android.bluetooth.ScoSocket@442da5a8 SCO OBJECT close() mState = 2 V/BluetoothEventRedirector( 1288): Received android.bluetooth.adapter.action.STATE_CHANGED W/ActivityManager( 1021): Launch timeout has expired, giving up wake lock! W/ActivityManager( 1021): Activity idle timeout for HistoryRecord{444a0b28 com.mozilla.SUTAgentAndroid/.SUTAgentAndroid} I/bluedroid( 1021): Stopping bluetoothd deamon I/bluedroid( 1021): Stopping hciattach deamon D/BluetoothService( 1021): Bluetooth state 13 -> 10 V/BluetoothEventRedirector( 1288): Received android.bluetooth.adapter.action.STATE_CHANGED D/AndroidRuntime( 1628): Shutting down VM W/dalvikvm( 1628): threadid=1: thread exiting with uncaught exception (group=0x4001d820) E/AndroidRuntime( 1628): FATAL EXCEPTION: main E/AndroidRuntime( 1628): java.lang.NoSuchFieldError: android.os.Build.SERIAL E/AndroidRuntime( 1628): at com.mozilla.SUTAgentAndroid.SUTAgentAndroid.getHWID(SUTAgentAndroid.java:751) E/AndroidRuntime( 1628): at com.mozilla.SUTAgentAndroid.SUTAgentAndroid.onCreate(SUTAgentAndroid.java:267) E/AndroidRuntime( 1628): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) E/AndroidRuntime( 1628): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) E/AndroidRuntime( 1628): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) E/AndroidRuntime( 1628): at android.app.ActivityThread.access$2300(ActivityThread.java:125) E/AndroidRuntime( 1628): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) E/AndroidRuntime( 1628): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 1628): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 1628): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime( 1628): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 1628): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 1628): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) E/AndroidRuntime( 1628): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) E/AndroidRuntime( 1628): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 1021): Force finishing activity com.mozilla.SUTAgentAndroid/.SUTAgentAndroid W/ActivityManager( 1021): Activity pause timeout for HistoryRecord{444a0b28 com.mozilla.SUTAgentAndroid/.SUTAgentAndroid} D/dalvikvm( 1288): GC_EXPLICIT freed 1324 objects / 94208 bytes in 53ms W/ActivityManager( 1021): Activity destroy timeout for HistoryRecord{444a0b28 com.mozilla.SUTAgentAndroid/.SUTAgentAndroid} D/dalvikvm( 1426): GC_EXPLICIT freed 2230 objects / 117816 bytes in 53ms I/ActivityManager( 1021): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 pkg=com.mozilla.SUTAgentAndroid cmp=com.mozilla.SUTAgentAndroid/.SUTAgentAndroid } W/ActivityManager( 1021): Launch timeout has expired, giving up wake lock! W/ActivityManager( 1021): Activity idle timeout for HistoryRecord{4457f948 com.mozilla.SUTAgentAndroid/.SUTAgentAndroid} I/Process ( 1628): Sending signal. PID: 1628 SIG: 9 I/ActivityManager( 1021): Process com.mozilla.SUTAgentAndroid (pid 1628) has died.
Attachment #667755 - Flags: review?(jmaher)
Comment on attachment 667755 [details] [diff] [review] the fix Review of attachment 667755 [details] [diff] [review]: ----------------------------------------------------------------- a lot of debugging added in here...I got a good chuckle from some of it :) Really I am concerned about the removal of the LD_LIBRARY_PATH as indicated below. ::: build/mobile/sutagent/android/DoCommand.java @@ +3187,5 @@ > + args[1] = "-c"; > + args[2] = "echo"; > + args[3] = "hi"; > + Runtime.getRuntime().exec(args); > + Log.i("SUTAGENT_DEBUG", "*** Done straight up"); I really don't understand why echo hi helps us here? Although the message is really awesome! @@ +3213,5 @@ > theArgs[1] = "-c"; > // as a security measure, ICS and later resets LD_LIBRARY_PATH. reset > // it here when executing the command > + //theArgs[2] = "LD_LIBRARY_PATH=/vendor/lib:/system/lib " + cmdString; > + theArgs[2] = cmdString; we require LD_LIBRARY_PATH to be set in order for pm commands (and I believe all su) to work on panda board and ICS. If removing this resolves our problem, then we need to add it conditionally based upon the version we are running on.
Attachment #667755 - Flags: review?(jmaher) → review-
Assignee: nobody → jmaher
Attachment #667755 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #667952 - Flags: review?(wlachance)
Comment on attachment 667952 [details] [diff] [review] fix the sutagent to not crash on startup when running on the tegras (1.0) yep this is what I changed -- I attached the wrong patch. Sorry.
Attachment #667952 - Flags: review?(wlachance) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: