开发者

Is it possible to upgrade Android firmware programatically?

I need to write Android application which looks for firmware in internet and allows to automatically down开发者_Go百科load selected firmware and perform update on device. Is it possible? Thanks


It should be possible. I am trying to do the same thing. I posted a question about this as another user. It almost works for me, but my device can't apply the new image on boot time.

Basically you use the RecoverySystem.installPackage(context, packageFile) method to do this. You will also need the following permissions:

<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
<uses-permission android:name="android.permission.DELETE_CACHE_FILES" />

Also, your app must run as a system app. I don't know if you're using the whole Android SDK with Eclipse and the SDK tools, but what I did for that was basically connect my device to my machine and used it for debuggin, then ran the app through the IDE so it gets uploaded and run on the device. And finally use the adb shell command to open up a shell on my device and moved the apk package file from /data/app to /system/app and rebooted.

Check out my post here. It might help you out.

Android development RecoverySystem.installPackage() cannot write to /cache/recovery/command permission denied


You need root, and it won't be automatically applied, but like with cyanogen updater, it reboots to recovery where the user will apply the update by itself


It is possible. Take a look at Clockwork Mod - http://www.clockworkmod.com/rommanager

They have an app which will check for the latest version of the firmware and update it - available on Google Marketplace https://market.android.com/details?id=com.koushikdutta.rommanager&hl=en

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜