开发者

How to launch provisioning app on Android

开发者 https://www.devze.com 2022-12-17 21:36 出处:网络
I\'m making some changes to the provisioning app that ships with the Android Eclair source code. I\'d like a way to launch the app to test it that doesn\'t involve reflashing my device or restarting m

I'm making some changes to the provisioning app that ships with the Android Eclair source code. I'd like a way to launch the app to test it that doesn't involve reflashing my device or restarting my emulator. The app is located in packages/apps/Provision and the main Activity is src/com/android/provision/DefaultActivity.java. I've tried:

adb shell am start -a android.intent.action.MAIN -n com.android.provision/.DefaultActivity

adb shell am start -n com.android.provision/com.android.provision.DefaultActivity

Both of which return:

Starting: Intent { act=android.intent.action.MAIN cmp=com.android.provision/.DefaultActivity }
Error type 3
Error: Activity class {com.android.pro开发者_StackOverflow中文版vision/com.android.provision.DefaultActivity} does not exist.


I added a layout to the provisioning app (which is something my app specifically needed) then commented out the line that sets the device as provisioned as well as the lines that finish the activity and remove the package.

From there I built a system image with the provisioning app and flashed the phone. Since the provisioning app is no longer marking the phone as provisioned I can then build just the provisioning app, use adb sync to push it to the phone and restart the phone to see the changes. It's perhaps not ideal, but it works.


Sounds like this bug: http://code.google.com/p/android/issues/detail?id=9158 Has been fixed in post-Froyo builds. I guess you will need to prepend a dot to the activity name.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号