Add prebuilt APKs to Android AOSP system.img

后端 未结 4 1060
独厮守ぢ
独厮守ぢ 2021-02-04 06:47

I\'m building AOSP from source. What I would like to do is to include a few prebuilt files in the generated system.img as part of the make process. I\'m trying to find the actua

4条回答
  •  孤独总比滥情好
    2021-02-04 07:07

    To add a prebuilt file to a build, find a .mk file which makes sense for your project and add the file under PRODUCT_COPY_FILE. It looks like this

     PRODUCT_COPY_FILE += your/build/tree/$FILE:path/to/location/on/device/$FILE
    

    Using a separate vendor tree is following good domain-driven principles...but is perhaps overkill for a single binary. Examine the makefiles you already use, there is often prebuilt apks already being added that you can piggyback on. device and existing vendor trees are good places to start looking. Maintaining an entirely new project is not something to be taken lightly, in my opinion.

提交回复
热议问题