diff --git a/rebootescrow/aidl/default/Android.bp b/rebootescrow/aidl/default/Android.bp index 4409314475..7f9b6d6caf 100644 --- a/rebootescrow/aidl/default/Android.bp +++ b/rebootescrow/aidl/default/Android.bp @@ -42,10 +42,10 @@ cc_library_static { cc_binary { name: "android.hardware.rebootescrow-service.default", - init_rc: ["rebootescrow-default.rc"], relative_install_path: "hw", - vintf_fragments: ["rebootescrow-default.xml"], vendor: true, + installable: false, // installed in APEX + srcs: [ "service.cpp", ], @@ -53,12 +53,14 @@ cc_binary { "-Wall", "-Werror", ], + stl: "c++_static", shared_libs: [ - "libbase", "libbinder_ndk", - "android.hardware.rebootescrow-V1-ndk", + "liblog", ], static_libs: [ + "android.hardware.rebootescrow-V1-ndk", + "libbase", "libhadamardutils", "librebootescrowdefaultimpl", ], @@ -97,3 +99,35 @@ cc_test { ], test_suites: ["device-tests"], } + +prebuilt_etc { + name: "rebootescrow-default.rc", + src: "rebootescrow-default.rc", + installable: false, +} + +prebuilt_etc { + name: "rebootescrow-default.xml", + src: "rebootescrow-default.xml", + sub_dir: "vintf", + installable: false, +} + +apex { + name: "com.android.hardware.rebootescrow", + manifest: "apex_manifest.json", + file_contexts: "apex_file_contexts", + key: "com.android.hardware.key", + certificate: ":com.android.hardware.certificate", + vendor: true, + updatable: false, + + binaries: [ + "android.hardware.rebootescrow-service.default", + ], + prebuilts: [ + "rebootescrow-default.rc", + "rebootescrow-default.xml", + "android.hardware.reboot_escrow.prebuilt.xml", // + ], +} diff --git a/rebootescrow/aidl/default/apex_file_contexts b/rebootescrow/aidl/default/apex_file_contexts new file mode 100644 index 0000000000..aa84984fce --- /dev/null +++ b/rebootescrow/aidl/default/apex_file_contexts @@ -0,0 +1,3 @@ +(/.*)? u:object_r:vendor_file:s0 +/etc(/.*)? u:object_r:vendor_configs_file:s0 +/bin/hw/android\.hardware\.rebootescrow-service\.default u:object_r:hal_rebootescrow_default_exec:s0 diff --git a/rebootescrow/aidl/default/apex_manifest.json b/rebootescrow/aidl/default/apex_manifest.json new file mode 100644 index 0000000000..8be495b450 --- /dev/null +++ b/rebootescrow/aidl/default/apex_manifest.json @@ -0,0 +1,4 @@ +{ + "name": "com.android.hardware.rebootescrow", + "version": 1 +} \ No newline at end of file diff --git a/rebootescrow/aidl/default/rebootescrow-default.rc b/rebootescrow/aidl/default/rebootescrow-default.rc index ad90465aa3..024dd6d15a 100644 --- a/rebootescrow/aidl/default/rebootescrow-default.rc +++ b/rebootescrow/aidl/default/rebootescrow-default.rc @@ -1,4 +1,4 @@ -service vendor.rebootescrow-default /vendor/bin/hw/android.hardware.rebootescrow-service.default +service vendor.rebootescrow-default /apex/com.android.hardware.rebootescrow/bin/hw/android.hardware.rebootescrow-service.default interface aidl android.hardware.rebootescrow.IRebootEscrow/default class hal user system