Hi Tony, As Al Sutton says, you can't install artifacts to /data using Android.bp. If you really want to do that, continue using Android.mk. However, the more usual way of provisioning preinstalled apps is install them into /product (or /vendor, but product is better IMO), and Android.bp can do that
Cheers, Chris On Monday, August 7, 2023 at 7:23:44 PM UTC+1 [email protected] wrote: > Hi, > > I'm sorry for not getting back to you sooner. To avoid confusion, my > intention is to copy APK files and configuration files to the specified > directory in the data image when building AOSP. And the APK files will be > manually installed on the production line after the image is flashed to the > devices, and then they will be removed after a factory reset. > > However I got a building error when I declared the local_module_path as > "TARGET_OUT_DATA" in Android.bp. It seems that soong can't resolve > "TARGET_OUT_DATA" property. > > Regards, Tony > On Tuesday, July 25, 2023 at 11:39:06 PM UTC+8 Al Sutton wrote: > >> You shouldn't install prebuilt apps into the data partition. Use the >> vendor partition instead. >> >> On 24 Jul 2023, at 23:40, "[email protected]" <[email protected]> >> wrote: >> >> >> Hi, >> >> We're adding our own application codes in Android-13 AOSP code and plan >> to build and install APK files to the specified directory in userdata >> partition during building AOSP code. We create Android.bp and add the >> following statements to it. >> >> //built explicitly put it in the data partition >> local_module_path: { >> var: "TARGET_OUT_DATA", >> fixed: "/preinstall/app", >> }, >> >> But, the build system is throwing out errors and can't install APK files >> under data/preinstall/app directory. >> >> [ 25% 1/4] regenerate globs shard 250 of 1024 >> [ 50% 2/4] regenerate globs shard 565 of 1024 >> [ 75% 3/4] regenerate globs shard 581 of 1024 >> [100% 4/4] analyzing Android.bp files and generating ninja file at >> out/soong/build.ninja >> FAILED: out/soong/build.ninja >> cd "$(dirname "out/host/linux-x86/bin/soong_build")" && >> BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && >> "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" >> -o out/soong/build.ninja --globListDir build --globFile >> out/soong/globs-build.ninja -t -l out/.module_paths/Android.bp.list >> --available_env out/soong/soong.environment.available --used_env >> out/soong/soong.environment.used.build Android.bp >> Clang SA is not enabled >> error: >> vendor/bsp/proprietary/hlos/apps/SDK_Demo/app/src/main/Android.bp:27:22: >> unrecognized property "local_module_path" >> ninja: build stopped: subcommand failed. >> 13:33:54 soong bootstrap failed with: exit status 1 >> >> And we tried Android.mk and add the following statements. It's able to >> build and install APK files to /data/preinstall/app directory. >> >> # and when built explicitly put it in the data partition >> LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/preinstall/app >> >> We're wondering how to use Android.bp to build and install APK file to >> the data/preinstall/app directory. We're looking forward to your >> suggestions to help us figure out this error. >> >> >> -- >> -- >> You received this message because you are subscribed to the "Android >> Building" mailing list. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-building?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "Android Building" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/android-building/9fc75912-6b07-4707-9279-1469f458342dn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/android-building/9fc75912-6b07-4707-9279-1469f458342dn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/c22d4bfe-8338-4ac7-bdbb-3c437eb9ed33n%40googlegroups.com.
