diff --git a/microdroid/Android.bp b/microdroid/Android.bp index 7466a781..564348b4 100644 --- a/microdroid/Android.bp +++ b/microdroid/Android.bp @@ -57,6 +57,8 @@ android_filesystem { "servicemanager", "tombstoned", "cgroups.json", + "public.libraries.android.txt", + "microdroid_linker_config", "plat_sepolicy_and_mapping.sha256", ] + microdroid_shell_and_utilities, @@ -377,3 +379,28 @@ prebuilt_etc { name: "microdroid_cdisk_env.json", src: "microdroid_cdisk_env.json", } + +// TODO(b/185391776) generate at build time +linker_config { + name: "microdroid_system_provide", + src: "linker.config.json", + installable: false, +} + +genrule { + name: "microdroid_linker_config_gen", + tools: ["conv_linker_config"], + srcs: [ + ":system_linker_config", + ":microdroid_system_provide", + ], + out: ["linker.config.pb"], + cmd: "$(location conv_linker_config) merge -o $(out) -i $(location :system_linker_config) -i $(location :microdroid_system_provide)", +} + +prebuilt_etc { + name: "microdroid_linker_config", + src: ":microdroid_linker_config_gen", + filename: "linker.config.pb", + installable: false, +} diff --git a/microdroid/linker.config.json b/microdroid/linker.config.json new file mode 100644 index 00000000..c9c56113 --- /dev/null +++ b/microdroid/linker.config.json @@ -0,0 +1,17 @@ +{ + // TODO(b/185391776): Automate the list for microdroid + "provideLibs": [ + "libadbd_auth.so", + "libadbd_fs.so", + "libc.so", + "libcgrouprc.so", + "libdl.so", + "libdl_android.so", + "liblog.so", + "libm.so", + "libselinux.so", + "libstdc++.so", + "libvndksupport.so", + "libz.so" + ] +} \ No newline at end of file