0

What changes do adb install command make in system.img

I have installed a new launcher "Lawnchair.apk" in my AOSP build and I am using "Android 10" and I want to do reverse engineering as I want to install a new launcher by making AOSP again and over-ride default launcher in the same process.

So, If anyone can tell me what changes do "adb install" command make in system.imgenter image description here

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 04 '22 at 09:12

1 Answers1

1

System partition is a read-only partition, and adb install can't do anything with it. adb install installs an application to data partition.

If you install a launcher application, it installs as a regular app to data partition, but its manifest also declares android.intent.category.LAUNCHER, and Android OS will allow assigning the app as home launcher.

See How to make a launcher about home launcher manifest.

User can switch back to stock home launcher by clearing the user selected launcher in apps settings, see https://androidadvices.com/steps-restore-stock-launcher-android-devices/

To change home launcher app, user input is always needed, it's for security matters. In no way user application can change home launcher in stock rom without user prompt.

Let's assume that you need to replace default launcher with yours one. For that you need to remove the original one from ROM and place yours instead.

  1. You can extract system image, remove there the original launcher and place yours, then repack rom. There are utilities to do that, google. Then you can flash your aosp rom to hardware, using a recovery such as TWRP (this is a large topic by itself, sorry I do not have time to explain, google and read XDA forum about custom roms)

  2. If you can build AOSP from source, you can replace launcher there with your one, adding yours to BuildConfig.mk. It needs a tag to replace launcher app.

  3. I would remove launcher app and installed a new one in a recovery script, see https://forum.xda-developers.com/t/tutorial-the-updater-script-completely-explained.2377695/ It means that you'll need to install TWRP on device, and use it to flash your AOSP rom and then your update file over that.

Mixaz
  • 4,068
  • 1
  • 29
  • 55
  • Thank You buddy for your response as I find it extremely helpful. Can you help me out in one more thing? I am trying to install "Niagara" launcher in AOSP build and I don't wanna use "adb install". I am on Android 10. – Anand Shukla Dec 28 '21 at 05:53
  • I extended the answer to include info about apps replacement tin android roms. Sorry it's a large topic, you'll need to google and read quite a bit – Mixaz Dec 28 '21 at 11:57