xref: /aosp_15_r20/build/make/target/product/generic/Android.bp (revision 9e94795a3d4ef5c1d47486f9a02bb378756cea8a)
1generic_rootdirs = [
2    "acct",
3    "apex",
4    "bootstrap-apex",
5    "config",
6    "data",
7    "data_mirror",
8    "debug_ramdisk",
9    "dev",
10    "linkerconfig",
11    "metadata",
12    "mnt",
13    "odm",
14    "odm_dlkm",
15    "oem",
16    "postinstall",
17    "proc",
18    "second_stage_resources",
19    "storage",
20    "sys",
21    "system",
22    "system_dlkm",
23    "tmp",
24    "vendor",
25    "vendor_dlkm",
26]
27
28android_rootdirs = [
29    "system_ext",
30    "product",
31]
32
33generic_symlinks = [
34    {
35        target: "/system/bin/init",
36        name: "init",
37    },
38    {
39        target: "/system/etc",
40        name: "etc",
41    },
42    {
43        target: "/system/bin",
44        name: "bin",
45    },
46    {
47        target: "/vendor",
48        name: "system/vendor",
49    },
50    {
51        target: "/system_dlkm/lib/modules",
52        name: "system/lib/modules",
53    },
54    {
55        target: "/data/user_de/0/com.android.shell/files/bugreports",
56        name: "bugreports",
57    },
58    {
59        target: "/sys/kernel/debug",
60        name: "d",
61    },
62    {
63        target: "/storage/self/primary",
64        name: "sdcard",
65    },
66    {
67        target: "/product/etc/security/adb_keys",
68        name: "adb_keys",
69    },
70    // For Treble Generic System Image (GSI), system-as-root GSI needs to work on both devices with
71    // and without /odm partition. Those symlinks are for devices without /odm partition. For
72    // devices with /odm partition, mount odm.img under /odm will hide those symlinks.
73    {
74        target: "/vendor/odm/app",
75        name: "odm/app",
76    },
77    {
78        target: "/vendor/odm/bin",
79        name: "odm/bin",
80    },
81    {
82        target: "/vendor/odm/etc",
83        name: "odm/etc",
84    },
85    {
86        target: "/vendor/odm/firmware",
87        name: "odm/firmware",
88    },
89    {
90        target: "/vendor/odm/framework",
91        name: "odm/framework",
92    },
93    {
94        target: "/vendor/odm/lib",
95        name: "odm/lib",
96    },
97    {
98        target: "/vendor/odm/lib64",
99        name: "odm/lib64",
100    },
101    {
102        target: "/vendor/odm/overlay",
103        name: "odm/overlay",
104    },
105    {
106        target: "/vendor/odm/priv-app",
107        name: "odm/priv-app",
108    },
109    {
110        target: "/vendor/odm/usr",
111        name: "odm/usr",
112    },
113]
114
115android_symlinks = [
116    {
117        target: "/product",
118        name: "system/product",
119    },
120    {
121        target: "/system_ext",
122        name: "system/system_ext",
123    },
124    {
125        target: "/data/cache",
126        name: "cache",
127    },
128]
129
130filegroup {
131    name: "generic_system_sign_key",
132    srcs: [":avb_testkey_rsa4096"],
133}
134
135phony {
136    name: "generic_system_fonts",
137    required: [
138        "AndroidClock.ttf",
139        "CarroisGothicSC-Regular.ttf",
140        "ComingSoon.ttf",
141        "CutiveMono.ttf",
142        "DancingScript-Regular.ttf",
143        "DroidSansMono.ttf",
144        "NotoColorEmoji.ttf",
145        "NotoColorEmojiFlags.ttf",
146        "NotoNaskhArabic-Bold.ttf",
147        "NotoNaskhArabic-Regular.ttf",
148        "NotoNaskhArabicUI-Bold.ttf",
149        "NotoNaskhArabicUI-Regular.ttf",
150        "NotoSansAdlam-VF.ttf",
151        "NotoSansAhom-Regular.otf",
152        "NotoSansAnatolianHieroglyphs-Regular.otf",
153        "NotoSansArmenian-VF.ttf",
154        "NotoSansAvestan-Regular.ttf",
155        "NotoSansBalinese-Regular.ttf",
156        "NotoSansBamum-Regular.ttf",
157        "NotoSansBassaVah-Regular.otf",
158        "NotoSansBatak-Regular.ttf",
159        "NotoSansBengali-VF.ttf",
160        "NotoSansBengaliUI-VF.ttf",
161        "NotoSansBhaiksuki-Regular.otf",
162        "NotoSansBrahmi-Regular.ttf",
163        "NotoSansBuginese-Regular.ttf",
164        "NotoSansBuhid-Regular.ttf",
165        "NotoSansCJK-Regular.ttc",
166        "NotoSansCanadianAboriginal-Regular.ttf",
167        "NotoSansCarian-Regular.ttf",
168        "NotoSansChakma-Regular.otf",
169        "NotoSansCham-Bold.ttf",
170        "NotoSansCham-Regular.ttf",
171        "NotoSansCherokee-Regular.ttf",
172        "NotoSansCoptic-Regular.ttf",
173        "NotoSansCuneiform-Regular.ttf",
174        "NotoSansCypriot-Regular.ttf",
175        "NotoSansDeseret-Regular.ttf",
176        "NotoSansDevanagari-VF.ttf",
177        "NotoSansDevanagariUI-VF.ttf",
178        "NotoSansEgyptianHieroglyphs-Regular.ttf",
179        "NotoSansElbasan-Regular.otf",
180        "NotoSansEthiopic-VF.ttf",
181        "NotoSansGeorgian-VF.ttf",
182        "NotoSansGlagolitic-Regular.ttf",
183        "NotoSansGothic-Regular.ttf",
184        "NotoSansGrantha-Regular.ttf",
185        "NotoSansGujarati-Bold.ttf",
186        "NotoSansGujarati-Regular.ttf",
187        "NotoSansGujaratiUI-Bold.ttf",
188        "NotoSansGujaratiUI-Regular.ttf",
189        "NotoSansGunjalaGondi-Regular.otf",
190        "NotoSansGurmukhi-VF.ttf",
191        "NotoSansGurmukhiUI-VF.ttf",
192        "NotoSansHanifiRohingya-Regular.otf",
193        "NotoSansHanunoo-Regular.ttf",
194        "NotoSansHatran-Regular.otf",
195        "NotoSansHebrew-Bold.ttf",
196        "NotoSansHebrew-Regular.ttf",
197        "NotoSansImperialAramaic-Regular.ttf",
198        "NotoSansInscriptionalPahlavi-Regular.ttf",
199        "NotoSansInscriptionalParthian-Regular.ttf",
200        "NotoSansJavanese-Regular.otf",
201        "NotoSansKaithi-Regular.ttf",
202        "NotoSansKannada-VF.ttf",
203        "NotoSansKannadaUI-VF.ttf",
204        "NotoSansKayahLi-Regular.ttf",
205        "NotoSansKharoshthi-Regular.ttf",
206        "NotoSansKhmer-VF.ttf",
207        "NotoSansKhmerUI-Bold.ttf",
208        "NotoSansKhmerUI-Regular.ttf",
209        "NotoSansKhojki-Regular.otf",
210        "NotoSansLao-Bold.ttf",
211        "NotoSansLao-Regular.ttf",
212        "NotoSansLaoUI-Bold.ttf",
213        "NotoSansLaoUI-Regular.ttf",
214        "NotoSansLepcha-Regular.ttf",
215        "NotoSansLimbu-Regular.ttf",
216        "NotoSansLinearA-Regular.otf",
217        "NotoSansLinearB-Regular.ttf",
218        "NotoSansLisu-Regular.ttf",
219        "NotoSansLycian-Regular.ttf",
220        "NotoSansLydian-Regular.ttf",
221        "NotoSansMalayalam-VF.ttf",
222        "NotoSansMalayalamUI-VF.ttf",
223        "NotoSansMandaic-Regular.ttf",
224        "NotoSansManichaean-Regular.otf",
225        "NotoSansMarchen-Regular.otf",
226        "NotoSansMasaramGondi-Regular.otf",
227        "NotoSansMedefaidrin-VF.ttf",
228        "NotoSansMeeteiMayek-Regular.ttf",
229        "NotoSansMeroitic-Regular.otf",
230        "NotoSansMiao-Regular.otf",
231        "NotoSansModi-Regular.ttf",
232        "NotoSansMongolian-Regular.ttf",
233        "NotoSansMro-Regular.otf",
234        "NotoSansMultani-Regular.otf",
235        "NotoSansMyanmar-Bold.otf",
236        "NotoSansMyanmar-Medium.otf",
237        "NotoSansMyanmar-Regular.otf",
238        "NotoSansMyanmarUI-Bold.otf",
239        "NotoSansMyanmarUI-Medium.otf",
240        "NotoSansMyanmarUI-Regular.otf",
241        "NotoSansNKo-Regular.ttf",
242        "NotoSansNabataean-Regular.otf",
243        "NotoSansNewTaiLue-Regular.ttf",
244        "NotoSansNewa-Regular.otf",
245        "NotoSansOgham-Regular.ttf",
246        "NotoSansOlChiki-Regular.ttf",
247        "NotoSansOldItalic-Regular.ttf",
248        "NotoSansOldNorthArabian-Regular.otf",
249        "NotoSansOldPermic-Regular.otf",
250        "NotoSansOldPersian-Regular.ttf",
251        "NotoSansOldSouthArabian-Regular.ttf",
252        "NotoSansOldTurkic-Regular.ttf",
253        "NotoSansOriya-Bold.ttf",
254        "NotoSansOriya-Regular.ttf",
255        "NotoSansOriyaUI-Bold.ttf",
256        "NotoSansOriyaUI-Regular.ttf",
257        "NotoSansOsage-Regular.ttf",
258        "NotoSansOsmanya-Regular.ttf",
259        "NotoSansPahawhHmong-Regular.otf",
260        "NotoSansPalmyrene-Regular.otf",
261        "NotoSansPauCinHau-Regular.otf",
262        "NotoSansPhagsPa-Regular.ttf",
263        "NotoSansPhoenician-Regular.ttf",
264        "NotoSansRejang-Regular.ttf",
265        "NotoSansRunic-Regular.ttf",
266        "NotoSansSamaritan-Regular.ttf",
267        "NotoSansSaurashtra-Regular.ttf",
268        "NotoSansSharada-Regular.otf",
269        "NotoSansShavian-Regular.ttf",
270        "NotoSansSinhala-VF.ttf",
271        "NotoSansSinhalaUI-VF.ttf",
272        "NotoSansSoraSompeng-Regular.otf",
273        "NotoSansSoyombo-VF.ttf",
274        "NotoSansSundanese-Regular.ttf",
275        "NotoSansSylotiNagri-Regular.ttf",
276        "NotoSansSymbols-Regular-Subsetted.ttf",
277        "NotoSansSymbols-Regular-Subsetted2.ttf",
278        "NotoSansSyriacEastern-Regular.ttf",
279        "NotoSansSyriacEstrangela-Regular.ttf",
280        "NotoSansSyriacWestern-Regular.ttf",
281        "NotoSansTagalog-Regular.ttf",
282        "NotoSansTagbanwa-Regular.ttf",
283        "NotoSansTaiLe-Regular.ttf",
284        "NotoSansTaiTham-Regular.ttf",
285        "NotoSansTaiViet-Regular.ttf",
286        "NotoSansTakri-VF.ttf",
287        "NotoSansTamil-VF.ttf",
288        "NotoSansTamilUI-VF.ttf",
289        "NotoSansTelugu-VF.ttf",
290        "NotoSansTeluguUI-VF.ttf",
291        "NotoSansThaana-Bold.ttf",
292        "NotoSansThaana-Regular.ttf",
293        "NotoSansThai-Bold.ttf",
294        "NotoSansThai-Regular.ttf",
295        "NotoSansThaiUI-Bold.ttf",
296        "NotoSansThaiUI-Regular.ttf",
297        "NotoSansTifinagh-Regular.otf",
298        "NotoSansUgaritic-Regular.ttf",
299        "NotoSansVai-Regular.ttf",
300        "NotoSansWancho-Regular.otf",
301        "NotoSansWarangCiti-Regular.otf",
302        "NotoSansYi-Regular.ttf",
303        "NotoSerif-Bold.ttf",
304        "NotoSerif-BoldItalic.ttf",
305        "NotoSerif-Italic.ttf",
306        "NotoSerif-Regular.ttf",
307        "NotoSerifArmenian-VF.ttf",
308        "NotoSerifBengali-VF.ttf",
309        "NotoSerifCJK-Regular.ttc",
310        "NotoSerifDevanagari-VF.ttf",
311        "NotoSerifDogra-Regular.ttf",
312        "NotoSerifEthiopic-VF.ttf",
313        "NotoSerifGeorgian-VF.ttf",
314        "NotoSerifGujarati-VF.ttf",
315        "NotoSerifGurmukhi-VF.ttf",
316        "NotoSerifHebrew-Bold.ttf",
317        "NotoSerifHebrew-Regular.ttf",
318        "NotoSerifHentaigana.ttf",
319        "NotoSerifKannada-VF.ttf",
320        "NotoSerifKhmer-Bold.otf",
321        "NotoSerifKhmer-Regular.otf",
322        "NotoSerifLao-Bold.ttf",
323        "NotoSerifLao-Regular.ttf",
324        "NotoSerifMalayalam-VF.ttf",
325        "NotoSerifMyanmar-Bold.otf",
326        "NotoSerifMyanmar-Regular.otf",
327        "NotoSerifNyiakengPuachueHmong-VF.ttf",
328        "NotoSerifSinhala-VF.ttf",
329        "NotoSerifTamil-VF.ttf",
330        "NotoSerifTelugu-VF.ttf",
331        "NotoSerifThai-Bold.ttf",
332        "NotoSerifThai-Regular.ttf",
333        "NotoSerifTibetan-VF.ttf",
334        "NotoSerifYezidi-VF.ttf",
335        "Roboto-Regular.ttf",
336        "RobotoFlex-Regular.ttf",
337        "RobotoStatic-Regular.ttf",
338        "SourceSansPro-Bold.ttf",
339        "SourceSansPro-BoldItalic.ttf",
340        "SourceSansPro-Italic.ttf",
341        "SourceSansPro-Regular.ttf",
342        "SourceSansPro-SemiBold.ttf",
343        "SourceSansPro-SemiBoldItalic.ttf",
344        "font_fallback.xml",
345        "fonts.xml",
346    ],
347}
348
349android_filesystem_defaults {
350    name: "system_image_defaults",
351    partition_name: "system",
352    base_dir: "system",
353    dirs: generic_rootdirs,
354    symlinks: generic_symlinks,
355    file_contexts: ":plat_file_contexts",
356    linker_config: {
357        gen_linker_config: true,
358        linker_config_srcs: [":system_linker_config_json_file"],
359    },
360    fsverity: {
361        inputs: [
362            "etc/boot-image.prof",
363            "etc/classpaths/*.pb",
364            "etc/dirty-image-objects",
365            "etc/preloaded-classes",
366            "framework/*",
367            "framework/*/*", // framework/{arch}
368            "framework/oat/*/*", // framework/oat/{arch}
369        ],
370        libs: [":framework-res{.export-package.apk}"],
371    },
372    build_logtags: true,
373    gen_aconfig_flags_pb: true,
374
375    compile_multilib: "both",
376
377    use_avb: true,
378    avb_private_key: ":generic_system_sign_key",
379    avb_algorithm: "SHA256_RSA4096",
380    avb_hash_algorithm: "sha256",
381
382    deps: [
383        "abx",
384        "aconfigd-system",
385        "aflags",
386        "am",
387        "android.software.credentials.prebuilt.xml", // generic_system
388        "android.software.webview.prebuilt.xml", // media_system
389        "android.software.window_magnification.prebuilt.xml", // handheld_system
390        "android.system.suspend-service",
391        "apexd",
392        "appops",
393        "approved-ogki-builds.xml", // base_system
394        "appwidget",
395        "atrace",
396        "audioserver",
397        "bcc",
398        "blank_screen",
399        "blkid",
400        "bmgr",
401        "bootanimation",
402        "bootstat",
403        "bpfloader",
404        "bu",
405        "bugreport",
406        "bugreportz",
407        "cameraserver",
408        "cgroups.json",
409        "cmd",
410        "content",
411        "cppreopts.sh", // generic_system
412        "credstore",
413        "debuggerd",
414        "device_config",
415        "dirty-image-objects",
416        "dmctl",
417        "dmesgd",
418        "dnsmasq",
419        "dpm",
420        "dump.erofs",
421        "dumpstate",
422        "dumpsys",
423        "e2fsck",
424        "enhanced-confirmation.xml", // base_system
425        "etc_hosts",
426        "flags_health_check",
427        "framework-audio_effects.xml", // for handheld // handheld_system
428        "framework-sysconfig.xml",
429        "fs_config_dirs_system",
430        "fs_config_files_system",
431        "fsck.erofs",
432        "fsck.f2fs", // for media_system
433        "fsck_msdos",
434        "fsverity-release-cert-der",
435        "gatekeeperd",
436        "gpu_counter_producer",
437        "gpuservice",
438        "group_system",
439        "gsi_tool",
440        "gsid",
441        "heapprofd",
442        "hid",
443        "hiddenapi-package-whitelist.xml", // from runtime_libart
444        "idc_data",
445        "idmap2",
446        "idmap2d",
447        "ime",
448        "incident",
449        "incident-helper-cmd",
450        "incident_helper",
451        "incidentd",
452        "init.environ.rc-soong",
453        "init.usb.configfs.rc",
454        "init.usb.rc",
455        "init.zygote32.rc",
456        "init.zygote64.rc",
457        "init.zygote64_32.rc",
458        "initial-package-stopped-states.xml",
459        "input",
460        "installd",
461        "ip", // base_system
462        "iptables",
463        "kcmdlinectrl",
464        "kernel-lifetimes.xml", // base_system
465        "keychars_data",
466        "keylayout_data",
467        "keystore2",
468        "ld.mc",
469        "llkd", // base_system
470        "lmkd", // base_system
471        "locksettings", // base_system
472        "logcat", // base_system
473        "logd", // base_system
474        "logpersist.start",
475        "lpdump", // base_system
476        "lshal", // base_system
477        "make_f2fs", // media_system
478        "mdnsd", // base_system
479        "media_profiles_V1_0.dtd", // base_system
480        "mediacodec.policy", // base_system
481        "mediaextractor", // base_system
482        "mediametrics", // base_system
483        "misctrl", // from base_system
484        "mke2fs", // base_system
485        "mkfs.erofs", // base_system
486        "monkey", // base_system
487        "mtectrl", // base_system
488        "ndc", // base_system
489        "netd", // base_system
490        "netutils-wrapper-1.0", // full_base
491        "notice_xml_system",
492        "odsign", // base_system
493        "otapreopt_script", // generic_system
494        "package-shareduid-allowlist.xml", // base_system
495        "passwd_system", // base_system
496        "perfetto", // base_system
497        "ping", // base_system
498        "ping6", // base_system
499        "pintool", // base_system
500        "platform.xml", // base_system
501        "pm", // base_system
502        "prefetch", //base_system
503        "preinstalled-packages-asl-files.xml", // base_system
504        "preinstalled-packages-platform-generic-system.xml", // generic_system
505        "preinstalled-packages-platform-handheld-system.xml", // handheld_system
506        "preinstalled-packages-platform.xml", // base_system
507        "preinstalled-packages-strict-signature.xml", // base_system
508        "preloaded-classes", // ok
509        "printflags", // base_system
510        "privapp-permissions-platform.xml", // base_system
511        "prng_seeder", // base_system
512        "public.libraries.android.txt",
513        "recovery-persist", // base_system
514        "recovery-refresh", // generic_system
515        "requestsync", // media_system
516        "resize2fs", // base_system
517        "rss_hwm_reset", // base_system
518        "run-as", // base_system
519        "schedtest", // base_system
520        "screencap", // base_system
521        "screenrecord", // handheld_system
522        "sdcard", // base_system
523        "secdiscard", // base_system
524        "sensorservice", // base_system
525        "service", // base_system
526        "servicemanager", // base_system
527        "settings", // base_system
528        "sfdo", // base_system
529        "sgdisk", // base_system
530        "sm", // base_system
531        "snapshotctl", // base_system
532        "snapuserd", // base_system
533        "storaged", // base_system
534        "surfaceflinger", // base_system
535        "svc", // base_system
536        "system_manifest.xml", // base_system
537        "task_profiles.json", // base_system
538        "tc", // base_system
539        "telecom", // base_system
540        "tombstoned", // base_system
541        "traced", // base_system
542        "traced_probes", // base_system
543        "tradeinmode", // base_system
544        "tune2fs", // base_system
545        "uiautomator", // base_system
546        "uinput", // base_system
547        "uncrypt", // base_system
548        "update_engine", // generic_system
549        "update_engine_sideload", // recovery
550        "update_verifier", // generic_system
551        "usbd", // base_system
552        "vdc", // base_system
553        "virtual_camera", // handheld_system // release_package_virtual_camera
554        "vold", // base_system
555        "vr", // handheld_system
556        "watchdogd", // base_system
557        "wifi.rc", // base_system
558        "wificond", // base_system
559        "wm", // base_system
560    ] + select(release_flag("RELEASE_PLATFORM_VERSION_CODENAME"), {
561        "REL": [],
562        default: [
563            "android.software.preview_sdk.prebuilt.xml", // media_system
564        ],
565    }) + select(release_flag("RELEASE_MEMORY_MANAGEMENT_DAEMON"), {
566        true: [
567            "mm_daemon", // base_system (RELEASE_MEMORY_MANAGEMENT_DAEMON)
568        ],
569        default: [],
570    }) + select(product_variable("debuggable"), {
571        true: [
572            "adevice_fingerprint",
573            "arping",
574            "avbctl",
575            "bootctl",
576            "dmuserd",
577            "evemu-record",
578            "idlcli",
579            "init-debug.rc",
580            "iotop",
581            "iperf3",
582            "iw",
583            "layertracegenerator",
584            "logtagd.rc",
585            "ot-cli-ftd",
586            "ot-ctl",
587            "procrank",
588            "profcollectctl",
589            "profcollectd",
590            "record_binder",
591            "sanitizer-status",
592            "servicedispatcher",
593            "showmap",
594            "sqlite3",
595            "ss",
596            "start_with_lockagent",
597            "strace",
598            "su",
599            "tinycap",
600            "tinyhostless",
601            "tinymix",
602            "tinypcminfo",
603            "tinyplay", // host
604            "tracepath",
605            "tracepath6",
606            "traceroute6",
607            "unwind_info",
608            "unwind_reg_info",
609            "unwind_symbols",
610            "update_engine_client",
611        ],
612        default: [],
613    }),
614    multilib: {
615        common: {
616            deps: [
617                "BackupRestoreConfirmation", // base_system
618                "BasicDreams", // handheld_system
619                "BlockedNumberProvider", // handheld_system
620                "BluetoothMidiService", // handheld_system
621                "BookmarkProvider", // handheld_system
622                "BuiltInPrintService", // handheld_system
623                "CalendarProvider", // handheld_system
624                "CallLogBackup", // telephony_system
625                "CameraExtensionsProxy", // handheld_system
626                "CaptivePortalLogin", // handheld_system
627                "CarrierDefaultApp", // telephony_system
628                "CellBroadcastLegacyApp", // telephony_system
629                "CertInstaller", // handheld_system
630                "CompanionDeviceManager", // media_system
631                "ContactsProvider", // base_system
632                "CredentialManager", // handheld_system
633                "DeviceAsWebcam", // handheld_system
634                "DeviceDiagnostics", // handheld_system - internal
635                "DocumentsUI", // handheld_system
636                "DownloadProvider", // base_system
637                "DownloadProviderUi", // handheld_system
638                "DynamicSystemInstallationService", // base_system
639                "E2eeContactKeysProvider", // base_system
640                "EasterEgg", // handheld_system
641                "ExtShared", // base_system
642                "ExternalStorageProvider", // handheld_system
643                "FusedLocation", // handheld_system
644                "HTMLViewer", // media_system
645                "InputDevices", // handheld_system
646                "IntentResolver", // base_system
647                "KeyChain", // handheld_system
648                "LiveWallpapersPicker", // generic_system, full_base
649                "LocalTransport", // base_system
650                "ManagedProvisioning", // handheld_system
651                "MediaProviderLegacy", // base_system
652                "MmsService", // handheld_system
653                "MtpService", // handheld_system
654                "MusicFX", // handheld_system
655                "NetworkStack", // base_system
656                "ONS", // telephony_system
657                "PacProcessor", // handheld_system
658                "PackageInstaller", // base_system
659                "PartnerBookmarksProvider", // generic_system
660                "PrintRecommendationService", // handheld_system
661                "PrintSpooler", // handheld_system
662                "ProxyHandler", // handheld_system
663                "SecureElement", // handheld_system
664                "SettingsProvider", // base_system
665                "SharedStorageBackup", // handheld_system
666                "Shell", // base_system
667                "SimAppDialog", // handheld_system
668                "SoundPicker", // not installed by anyone
669                "StatementService", // media_system
670                "Stk", // generic_system
671                "Tag", // generic_system
672                "TeleService", // handheld_system
673                "Telecom", // handheld_system
674                "TelephonyProvider", // handheld_system
675                "Traceur", // handheld_system
676                "UserDictionaryProvider", // handheld_system
677                "VpnDialogs", // handheld_system
678                "WallpaperBackup", // base_system
679                "adbd_system_api", // base_system
680                "android.hidl.base-V1.0-java", // base_system
681                "android.hidl.manager-V1.0-java", // base_system
682                "android.test.base", // from runtime_libart
683                "android.test.mock", // base_system
684                "android.test.runner", // base_system
685                "aosp_mainline_modules", // ok
686                "build_flag_system", // base_system
687                "charger_res_images", // generic_system
688                "com.android.apex.cts.shim.v1_prebuilt", // ok
689                "com.android.cellbroadcast", // telephony_system
690                "com.android.future.usb.accessory", // media_system
691                "com.android.location.provider", // base_system
692                "com.android.media.remotedisplay", // media_system
693                "com.android.media.remotedisplay.xml", // media_system
694                "com.android.mediadrm.signer", // media_system
695                "com.android.nfc_extras", // ok
696                "com.android.nfcservices", // base_system (RELEASE_PACKAGE_NFC_STACK != NfcNci)
697                "com.android.runtime", // ok
698                "dex_bootjars",
699                "ext", // from runtime_libart
700                "framework-graphics", // base_system
701                "framework-location", // base_system
702                "framework-minus-apex-install-dependencies", // base_system
703                "framework-connectivity-b", // base_system
704                "framework_compatibility_matrix.device.xml",
705                "generic_system_fonts", // ok
706                "hwservicemanager_compat_symlink_module", // base_system
707                "hyph-data",
708                "ims-common", // base_system
709                "init_system", // base_system
710                "javax.obex", // base_system
711                "llndk.libraries.txt", //ok
712                "org.apache.http.legacy", // base_system
713                "perfetto-extras", // system
714                "sanitizer.libraries.txt", // base_system
715                "selinux_policy_system_soong", // ok
716                "services", // base_system
717                "shell_and_utilities_system", // ok
718                "system-build.prop",
719                "system_compatibility_matrix.xml", //base_system
720                "telephony-common", // libs from TeleService
721                "voip-common", // base_system
722            ] + select(soong_config_variable("ANDROID", "release_crashrecovery_module"), {
723                "true": [
724                    "com.android.crashrecovery", // base_system (RELEASE_CRASHRECOVERY_MODULE)
725                ],
726                default: [
727                    "framework-platformcrashrecovery", // base_system
728                ],
729            }) + select(release_flag("RELEASE_ONDEVICE_INTELLIGENCE_MODULE"), {
730                true: [
731                    "com.android.neuralnetworks", // base_system (RELEASE_ONDEVICE_INTELLIGENCE_MODULE)
732                ],
733                default: [
734                    "framework-ondeviceintelligence-platform", // base_system
735                ],
736            }) + select(soong_config_variable("ANDROID", "release_package_profiling_module"), {
737                "true": [
738                    "com.android.profiling", // base_system (RELEASE_PACKAGE_PROFILING_MODULE)
739                ],
740                default: [],
741            }) + select(release_flag("RELEASE_AVATAR_PICKER_APP"), {
742                true: [
743                    "AvatarPicker", // generic_system (RELEASE_AVATAR_PICKER_APP)
744                ],
745                default: [],
746            }) + select(release_flag("RELEASE_UPROBESTATS_MODULE"), {
747                true: [
748                    "com.android.uprobestats", // base_system (RELEASE_UPROBESTATS_MODULE)
749                ],
750                default: [],
751            }),
752        },
753        prefer32: {
754            deps: [
755                "drmserver", // media_system
756                "mediaserver", // base_system
757            ],
758        },
759        lib64: {
760            deps: [
761                "android.system.virtualizationcommon-ndk",
762                "android.system.virtualizationservice-ndk",
763                "libgsi",
764                "servicemanager",
765            ] + select(release_flag("RELEASE_UPROBESTATS_MODULE"), {
766                true: [],
767                default: [
768                    "uprobestats", // base_system internal
769                ],
770            }),
771        },
772        both: {
773            deps: [
774                "[email protected]", // generic_system
775                "[email protected]", // generic_system
776                "[email protected]", // generic_system
777                "[email protected]", // generic_system
778                "[email protected]", // generic_system
779                "[email protected]", // generic_system
780                "[email protected]", // generic_system
781                "[email protected]", // generic_system
782                "[email protected]", // generic_system
783                "app_process", // base_system
784                "boringssl_self_test", // base_system
785                "heapprofd_client", // base_system
786                "libEGL", // base_system
787                "libEGL_angle", // base_system
788                "libETC1", // base_system
789                "libFFTEm", // base_system
790                "libGLESv1_CM", // base_system
791                "libGLESv1_CM_angle", // base_system
792                "libGLESv2", // base_system
793                "libGLESv2_angle", // base_system
794                "libGLESv3", // base_system
795                "libOpenMAXAL", // base_system
796                "libOpenSLES", // base_system
797                "libaaudio", // base_system
798                "libalarm_jni", // base_system
799                "libamidi", // base_system
800                "libandroid",
801                "libandroid_runtime",
802                "libandroid_servers",
803                "libandroidfw",
804                "libartpalette-system",
805                "libaudio-resampler", // generic-system
806                "libaudioeffect_jni",
807                "libaudiohal", // generic-system
808                "libaudiopolicyengineconfigurable", // generic-system
809                "libbinder",
810                "libbinder_ndk",
811                "libbinder_rpc_unstable",
812                "libcamera2ndk",
813                "libcgrouprc", // llndk library
814                "libclang_rt.asan",
815                "libcompiler_rt",
816                "libcutils", // used by many libs
817                "libdmabufheap", // used by many libs
818                "libdrm", // used by many libs // generic_system
819                "libdrmframework", // base_system
820                "libdrmframework_jni", // base_system
821                "libfdtrack", // base_system
822                "libfilterfw", // base_system
823                "libfilterpack_imageproc", // media_system
824                "libfwdlockengine", // generic_system
825                "libgatekeeper", // base_system
826                "libgui", // base_system
827                "libhardware", // base_system
828                "libhardware_legacy", // base_system
829                "libhidltransport", // generic_system
830                "libhwbinder", // generic_system
831                "libinput", // base_system
832                "libinputflinger", // base_system
833                "libiprouteutil", // base_system
834                "libjnigraphics", // base_system
835                "libjpeg", // base_system
836                "liblog", // base_system
837                "liblogwrap", // generic_system
838                "liblz4", // generic_system
839                "libmedia", // base_system
840                "libmedia_jni", // base_system
841                "libmediandk", // base_system
842                "libminui", // generic_system
843                "libmonkey_jni", // base_system - internal
844                "libmtp", // base_system
845                "libnetd_client", // base_system
846                "libnetlink", // base_system
847                "libnetutils", // base_system
848                "libneuralnetworks_packageinfo", // base_system
849                "libnl", // generic_system
850                "libpdfium", // base_system
851                "libpolicy-subsystem", // generic_system
852                "libpower", // base_system
853                "libpowermanager", // base_system
854                "libprotobuf-cpp-full", // generic_system
855                "libradio_metadata", // base_system
856                "librs_jni", // handheld_system
857                "librtp_jni", // base_system
858                "libsensorservice", // base_system
859                "libsfplugin_ccodec", // base_system
860                "libskia", // base_system
861                "libsonic", // base_system
862                "libsonivox", // base_system
863                "libsoundpool", // base_system
864                "libspeexresampler", // base_system
865                "libsqlite", // base_system
866                "libstagefright", // base_system
867                "libstagefright_foundation", // base_system
868                "libstagefright_omx", // base_system
869                "libstdc++", // base_system
870                "libsysutils", // base_system
871                "libui", // base_system
872                "libusbhost", // base_system
873                "libutils", // base_system
874                "libvendorsupport", // llndk library
875                "libvintf_jni", // base_system
876                "libvulkan", // base_system
877                "libwebviewchromium_loader", // media_system
878                "libwebviewchromium_plat_support", // media_system
879                "libwilhelm", // base_system
880                "linker", // base_system
881            ] + select(soong_config_variable("ANDROID", "TARGET_DYNAMIC_64_32_DRMSERVER"), {
882                "true": ["drmserver"],
883                default: [],
884            }) + select(soong_config_variable("ANDROID", "TARGET_DYNAMIC_64_32_MEDIASERVER"), {
885                "true": ["mediaserver"],
886                default: [],
887            }) + select(release_flag("RELEASE_UPROBESTATS_MODULE"), {
888                true: [],
889                default: [
890                    "libuprobestats_client", // base_system internal
891                ],
892            }),
893        },
894    },
895    arch: {
896        arm64: {
897            deps: [
898                "libclang_rt.hwasan",
899                "libc_hwasan",
900            ],
901        },
902    },
903}
904
905android_system_image {
906    name: "aosp_shared_system_image",
907    defaults: ["system_image_defaults"],
908    dirs: android_rootdirs,
909    symlinks: android_symlinks,
910    type: "erofs",
911    erofs: {
912        compressor: "lz4hc,9",
913        compress_hints: "erofs_compress_hints.txt",
914    },
915}
916