jacatanog
jacatanog

Reputation: 87

update android rom programmatically

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

Answers (3)

Vithani Ravi
Vithani Ravi

Reputation: 1981

You need to follow steps

  1. Root your phone (see video in YouTube about root your phone).
  2. Flash your phone with TWRP recovery (see video in YouTube about flash TWRP your phone).
  3. Download rom for your specific phones (see video in YouTube about Download rom your phone).
  4. Flash rom as wise see video in YouTube.
  5. If anycase your phone is dead then try to repair in care othervise see video in youtube "how to full flash with your device"

Upvotes: 0

NikhilS
NikhilS

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:

  1. The phone should be rooted.
  2. Placing ROM file in right place.

Upvotes: 0

niranjan94
niranjan94

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

Related Questions