How do I add APKs in an AOSP build?

前端 未结 3 449
醉梦人生
醉梦人生 2020-11-27 12:04

I need to add some 3rd party APKs to my AOSP build. What folder should I keep these APKs so that when I build the code and the image is created, it is installed in the emula

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 12:13

    You could also do the following in the target output dir:

    /host/linux-x86/bin/simg2img system.img temp.img
    mkdir system_root
    sudo mount -t ext4 -o loop temp.img system_root
    

    At this point you can make whatever changes you'd like to the files in system_root, i.e. adding apks to system/app etc...

    When you're done just go back down to the output dir and do:

    sudo umount system_root
    /host/linux-x86/bin/img2simg temp.img system.img
    

    You can now flash system.img using fastboot as usual.

提交回复
热议问题