Move uwb-service into VAPEX

Bug: 296487624
Test: launch cuttlefish / uwb-service runs
Change-Id: I5436d9215ad396fe6cd151690d299dd345c56cb0
This commit is contained in:
Jooyung Han 2023-08-21 13:37:13 +09:00
parent 3e0519690f
commit 83497068b9
8 changed files with 139 additions and 3 deletions

View file

@ -11,9 +11,8 @@ rust_binary {
name: "android.hardware.uwb-service",
crate_name: "uwb_default_hal",
relative_install_path: "hw",
init_rc: ["uwb-service.rc"],
vintf_fragments: ["uwb-service.xml"],
vendor: true,
prefer_rlib: true,
rustlibs: [
"android.hardware.uwb-V1-rust",
"liblogger",
@ -31,3 +30,47 @@ rust_binary {
"src/service.rs",
],
}
prebuilt_etc {
name: "uwb-service.rc",
src: "uwb-service.rc",
vendor: true,
installable: false,
}
prebuilt_etc {
name: "uwb-service.xml",
src: "uwb-service.xml",
sub_dir: "vintf",
vendor: true,
installable: false,
}
apex_key {
name: "com.android.hardware.uwb.key",
public_key: "com.android.hardware.uwb.avbpubkey",
private_key: "com.android.hardware.uwb.pem",
}
android_app_certificate {
name: "com.android.hardware.uwb.certificate",
certificate: "com.android.hardware.uwb",
}
apex {
name: "com.android.hardware.uwb",
manifest: "manifest.json",
file_contexts: "file_contexts",
key: "com.android.hardware.uwb.key",
certificate: ":com.android.hardware.uwb.certificate",
updatable: false,
vendor: true,
binaries: [
"android.hardware.uwb-service",
],
prebuilts: [
"uwb-service.rc", // init_rc
"uwb-service.xml", // vintf_fragments
],
}

Binary file not shown.

View file

@ -0,0 +1,52 @@
-----BEGIN PRIVATE KEY-----
MIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQChE5EVDbSAKAru
myK22LP72i2ivpJGi8DqRjgA5r6Zz3OKwtvrtSBaTtACv3j6ZALLndA2sgxbt64B
ik1vU1tpnrGnaqcdlgDio6QIfpavWEcZ9rOHuGXvLlv3Tzc2gyr1UKsaGtce+os8
jbfyEl4keN59oI2D8Nj1VVKYRKS+mrp4+hnvt3itGbvIKLCgGBY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FifB8e0CZbURreXa1tErWybfuDkaNBDtAHL333/IQGI0vV7zr0x
AgMBAAEwDQYJKoZIhvcNAQELBQADggIBAFqnBngYd7rXHwIXHYKZuRMf+NLQxNFN
f0m6ioFYgNnMwoMQidBHdRsJ2qTb9zfyt5O1/5Wel8Ix9aUCRbJejyX2lYXNIJNC
ykahkoP+3CEA8QtPkmtWzNraDJRh2eYn6V5DJOWyvkz02DsHA4mxatYkF7dUfqLx
f/y1y3cbnTyAraotTRb3W/F/zEYbcCzwlFZDT/IASVM89WRDE76+rp7/wDNJ0aEJ
l6cQaUWDPbrvDWZaptRWfnebPtg81v03qKauwrBADddxu+/Nqs0iczBdsP1tdXr/
Hxs47D7+fZnytVQglldBG4yky9YceL22yft/bCNDe5d7nF1/iUpJNbRIcrZxD86Z
wwPpo0VMJ+r6VuD6UGQTS6Zyi94QD3GYYkGrPPwyrLKpp1EU6dV32bWCNp5eQojY
FyTse/lfAJ9/Xu3klHYuR9xOaJiH+2MmtJTwKdjvK5h+EIiVbyrDJJHBd9sWav3a
Emo+wKaIxQzXEUjWxUwy7eAAwq5WzawLMMQ97P0zIgasNIlUHW2cvBzVsQlM1tN7
2t+7UPs5RifK5hadK6Ge1oqkG0xC1t65E7yGwrPMzKuz9aPgg7j1YAaETcKuFOHG
rZr/0kALZc6VKNSZ8eM2P5ObrelLOe4ED9Ha1ZhmnCDXN9BP2gwqmCekwfNJ3cPA
GObJiF81f9ZM
-----END CERTIFICATE-----

View file

@ -0,0 +1,3 @@
(/.*)? u:object_r:vendor_file:s0
/etc(/.*)? u:object_r:vendor_configs_file:s0
/bin/hw/android\.hardware\.uwb-service u:object_r:hal_uwb_default_exec:s0

View file

@ -0,0 +1,4 @@
{
"name": "com.android.hardware.uwb",
"version": 1
}

View file

@ -1,3 +1,3 @@
service vendor.uwb_hal /vendor/bin/hw/android.hardware.uwb-service ${ro.vendor.uwb.dev}
service vendor.uwb_hal /apex/com.android.hardware.uwb/bin/hw/android.hardware.uwb-service ${ro.vendor.uwb.dev}
class hal
user uwb