Reputation: 87
I have a requirement that goes like this: We have custom Android devices with custom ROM installed on them. I need to be able to install an update for this custom ROM through an app.
What I was thinking to solve this problem was to download the custom rom from a server via ftp and then issue "some kind of command" to execute the ROM from my app, but the problem is I don't know what command to issue in order to execute this ROM.
Do you know how can I install that custom rom programmatically?
Upvotes: 5
Views: 1621
Reputation: 1981
You need to follow steps
Upvotes: 0
Reputation: 83
Updating custom ROM on mobile includes changing of base Android files. This includes switching on/off your device a no. Of times. This itself will kill your application process in memory.
If you want you can sync a computer with Android device so that .zip file from ftp will be transferred to respective computer when user presses option in your Android application and from your desktop application, ADB commands can be executed. You must learn about ADB (Android Debug Bridge) for your task. There is command called "sideload" executed as:
adb sideload <filename>.zip
Which will install custom zip. The thing which you should take care of are:
Upvotes: 0
Reputation: 826
The only way you can do that is to 'interface' with the the Custom Recovery (CWM/TWRP) installed on the device. It would mostly be a Shell command directing the phone to boot into recovery and install the update.zip at a given location on the sdcard.
I suggest you look into the source code of CMUpdater.apk or other updater apps like Goo.im manager, etc (if available) and see how it is done. You'll be needing 'root' access to make such an app though.
If you do find any solution, do post it here for others to benefit from it !
Upvotes: 0