drozer icon indicating copy to clipboard operation
drozer copied to clipboard

Android Wear Support

Open joswr1ght opened this issue 10 years ago • 1 comments

The Drozer agent would be useful on Android Wear devices. I believe the agent would work on Android Wear with little difficulty, except that the agent has an action bar, which causes the Android Wear runtime to kill the app:

--------- beginning of crash
E/AndroidRuntime( 4118): FATAL EXCEPTION: main
E/AndroidRuntime( 4118): Process: com.mwr.dz, PID: 4118
E/AndroidRuntime( 4118): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mwr.dz/com.mwr.dz.activities.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
E/AndroidRuntime( 4118):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
E/AndroidRuntime( 4118):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
E/AndroidRuntime( 4118):    at android.app.ActivityThread.access$800(ActivityThread.java:151)
E/AndroidRuntime( 4118):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
E/AndroidRuntime( 4118):    at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 4118):    at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 4118):    at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime( 4118):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 4118):    at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 4118):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime( 4118):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
E/AndroidRuntime( 4118): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
E/AndroidRuntime( 4118):    at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:322)
E/AndroidRuntime( 4118):    at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3381)
E/AndroidRuntime( 4118):    at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3669)
E/AndroidRuntime( 4118):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:368)
E/AndroidRuntime( 4118):    at android.app.Activity.setContentView(Activity.java:2145)
E/AndroidRuntime( 4118):    at com.mwr.dz.activities.MainActivity.onCreate(MainActivity.java:41)
E/AndroidRuntime( 4118):    at android.app.Activity.performCreate(Activity.java:5990)
E/AndroidRuntime( 4118):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
E/AndroidRuntime( 4118):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
E/AndroidRuntime( 4118):    ... 10 more
W/ActivityManager(  482):   Force finishing activity 1 com.mwr.dz/.activities.MainActivity

Are there any plans to build an Android Wear-compatible agent, or possibly modify the existing agent just to suppress the action bar on the Wear platform?

joswr1ght avatar Dec 27 '15 19:12 joswr1ght

Drozer can be used with Android wear in rogue agent (no-gui) mode.

$ drozer agent build --rogue
$ adb install agent.apk
$ drozer server start
$ adb shell 'am startservice -n com.mwr.dz/.Agent'
$ drozer console connect 

HenryHoggard avatar Jan 18 '16 22:01 HenryHoggard