From 58cdf3dafd0200e1c3a1b2cd4ba451a65ae89e9e Mon Sep 17 00:00:00 2001 From: Daniel Norman Date: Fri, 28 Jan 2022 20:06:20 +0000 Subject: [PATCH] Revert^2 "Create thermal apex" 33251ba579b7deb1321dcc0a60ee2d11741af013 Change-Id: If3dd5bd1d8d35fc398a51e531fd9bf43ab91fb39 --- thermal/2.0/default/Android.bp | 16 ++++- thermal/2.0/default/apex/Android.bp | 55 ++++++++++++++++++ .../com.android.hardware.thermal.avbpubkey | Bin 0 -> 1032 bytes .../apex/com.android.hardware.thermal.pem | 51 ++++++++++++++++ .../apex/com.android.hardware.thermal.pk8 | Bin 0 -> 2376 bytes .../com.android.hardware.thermal.x509.pem | 34 +++++++++++ thermal/2.0/default/apex/file_contexts | 5 ++ thermal/2.0/default/apex/manifest.json | 4 ++ 8 files changed, 162 insertions(+), 3 deletions(-) create mode 100644 thermal/2.0/default/apex/Android.bp create mode 100644 thermal/2.0/default/apex/com.android.hardware.thermal.avbpubkey create mode 100644 thermal/2.0/default/apex/com.android.hardware.thermal.pem create mode 100644 thermal/2.0/default/apex/com.android.hardware.thermal.pk8 create mode 100644 thermal/2.0/default/apex/com.android.hardware.thermal.x509.pem create mode 100644 thermal/2.0/default/apex/file_contexts create mode 100644 thermal/2.0/default/apex/manifest.json diff --git a/thermal/2.0/default/Android.bp b/thermal/2.0/default/Android.bp index a63ffbc34c..f743adef32 100644 --- a/thermal/2.0/default/Android.bp +++ b/thermal/2.0/default/Android.bp @@ -22,16 +22,26 @@ package { default_applicable_licenses: ["hardware_interfaces_license"], } +filegroup { + name: "android.hardware.thermal@2.0-service.xml", + srcs: ["android.hardware.thermal@2.0-service.xml"], +} + +filegroup { + name: "android.hardware.thermal@2.0-service.rc", + srcs: ["android.hardware.thermal@2.0-service.rc"], +} + cc_binary { name: "android.hardware.thermal@2.0-service.mock", defaults: ["hidl_defaults"], relative_install_path: "hw", vendor: true, - init_rc: ["android.hardware.thermal@2.0-service.rc"], - vintf_fragments: ["android.hardware.thermal@2.0-service.xml"], + init_rc: [":android.hardware.thermal@2.0-service.rc"], + vintf_fragments: [":android.hardware.thermal@2.0-service.xml"], srcs: [ "Thermal.cpp", - "service.cpp" + "service.cpp", ], shared_libs: [ "libbase", diff --git a/thermal/2.0/default/apex/Android.bp b/thermal/2.0/default/apex/Android.bp new file mode 100644 index 0000000000..914a3a8a97 --- /dev/null +++ b/thermal/2.0/default/apex/Android.bp @@ -0,0 +1,55 @@ +// Copyright (C) 2022 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package { + default_applicable_licenses: ["hardware_interfaces_license"], +} + +apex_key { + name: "com.android.hardware.thermal.key", + public_key: "com.android.hardware.thermal.avbpubkey", + private_key: "com.android.hardware.thermal.pem", +} + +android_app_certificate { + name: "com.android.hardware.thermal.certificate", + certificate: "com.android.hardware.thermal", +} + +genrule { + name: "com.android.hardware.thermal.rc-gen", + srcs: [":android.hardware.thermal@2.0-service.rc"], + out: ["com.android.hardware.thermal.rc"], + cmd: "sed -E 's/\\/vendor/\\/apex\\/com.android.hardware.thermal.mock/' $(in) > $(out)", +} + +prebuilt_etc { + name: "com.android.hardware.thermal.rc", + src: ":com.android.hardware.thermal.rc-gen", + installable: false, +} + +apex { + name: "com.android.hardware.thermal.mock", + manifest: "manifest.json", + file_contexts: "file_contexts", + key: "com.android.hardware.thermal.key", + certificate: ":com.android.hardware.thermal.certificate", + use_vndk_as_stable: true, + updatable: false, + soc_specific: true, + binaries: ["android.hardware.thermal@2.0-service.mock"], + prebuilts: ["com.android.hardware.thermal.rc"], + vintf_fragments: [":android.hardware.thermal@2.0-service.xml"], +} diff --git a/thermal/2.0/default/apex/com.android.hardware.thermal.avbpubkey b/thermal/2.0/default/apex/com.android.hardware.thermal.avbpubkey new file mode 100644 index 0000000000000000000000000000000000000000..8f7cf72760d14321681f46a69b502e809faee507 GIT binary patch literal 1032 zcmV+j1o!&@01yCfR;Hz;a`vXN3aWKK#CceGka_1GL^`!VvG8ulb9uz*6l2c&QsBbI zh5iiY0FWTkz{BPSKhX3}^puBnJ#!u-e6*ps7^Tr}Zlr9WV_Xugvm4EIw!Vo30YC0w z2+^(;R8_5N;7v{=`5S#)mU120Aa)4583FRQTTnC>rfLSnfML3 zvk|mw3qVll9KyfWHvN-;nho>rdJY?pT<#3n z6lm3uplq3QG6z6Gq*Hrp>c=docvKM`yi|6>J7)mP6Rnh$q|;}Mv8u0!@KvWGgPg`$oI0O|u9_N1MWt@BxZJ@}e@5 zyHqLrr!Lc$APJvoT*0iHVBHtyZ6E3Z?e$=+!jRT1p06lE?y5uwV#GsS>P8%LZb*x8 zK)%8%e#b!I)SgjFwE{oJ$j)W)(6L+!-vAjt6*TnwVjGhAh*hUoA?ql>u8&LNQUwE--=#Dgprj0)heo0NHO4gd&&G zY7*u+NLjUkpsS@1rQs+9fC#-PQ>7e>MLLPyru*tH{XH5TDP@T-WKUB>026R*x04O8 zVb-WMmA0ctHQT>2GZOY#Pv>QUflX)J+EgMXF{)^Y->0n4(X(z81~O}A?Lpt)h;U9^ zi46Mm_$w@>g}hN6V?0(PZaQl-m9Ka2b?H!p;IcjlhB>uB7~$apCvUPiI2OwaoB;Em z;!Tx1dT-PE=M@kVyRGsZ{bADWeVsk(EFSUUDX_zkz$0BK)zt~ZV?k*S!4{PJMz9`% z_2OVFyk7Fk@^Py<4QU-W1p1c%bI1Vuy2aPP*WZU!h_mUk#AjKb2+p2$aB>M|ZY#<; z;O1$Ey=&K*+`oX;cjqStGj9g>-ISD`8Z@hTSrns_WPA)Nc4FUW9)fw%$gsS7U(3&8 ziBO#$6cYBA>nDvjNG$L-dU*3HI7qNqRX|8ToNkvCuA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m#o!_kgwm?fGPz{8)pc z8RwtSNHCc_!m*CT=s##c3SJ_X%w#z6sUe=m9D8jgN0UAK<~Ty+SsqrDUKYqsXf(~2 zjVC}iJ~07Ypy|X9Z7`+nBfdi;*1I02HM)hH?&@ysJoXF2Pyl6!4YhLuf&l=- zRs(4Mtjbv4PQS|Od=x(`;60u#)+MIGK1m}9Fg5uHql9u2T`O<-}Dnrl2pn3Qz)~;=hyE^}}+}osMvz70b0;^(r9e5_1L^)`lPe literal 0 HcmV?d00001 diff --git a/thermal/2.0/default/apex/com.android.hardware.thermal.x509.pem b/thermal/2.0/default/apex/com.android.hardware.thermal.x509.pem new file mode 100644 index 0000000000..048e69a25e --- /dev/null +++ b/thermal/2.0/default/apex/com.android.hardware.thermal.x509.pem @@ -0,0 +1,34 @@ +-----BEGIN CERTIFICATE----- +MIIF3TCCA8UCFFWeg2KJX/fyAqZPcKaFS61/a3GiMA0GCSqGSIb3DQEBCwUAMIGp +MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91 +bnRhaW4gVmlldzEQMA4GA1UECgwHQW5kcm9pZDEQMA4GA1UECwwHQW5kcm9pZDEi +MCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTElMCMGA1UEAwwcY29t +LmFuZHJvaWQuaGFyZHdhcmUudGhlcm1hbDAgFw0yMTExMTcxODE3MjRaGA80NzU5 +MTAxNDE4MTcyNFowgakxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlh +MRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRAwDgYDVQQKDAdBbmRyb2lkMRAwDgYD +VQQLDAdBbmRyb2lkMSIwIAYJKoZIhvcNAQkBFhNhbmRyb2lkQGFuZHJvaWQuY29t +MSUwIwYDVQQDDBxjb20uYW5kcm9pZC5oYXJkd2FyZS50aGVybWFsMIICIjANBgkq +hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA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ZVvIpO3gLLEe4maBEYF2sOlt3bRmzIHydORJtkfTt5tiZ4wR9RfJbkj +iBiDbNiX010bZPTAXmgMbuJzQXZEXCBy0qKeS1cHwf9M8FDoiLajXepfZIp+6syt +D4lZk4eAV141JL5PfABfdZWwT3cTgFIqCYpqrMQJIu+GHEjUwD2yNPi0I1/ydFCW +CPDnzWjYCi6yVB8hss3ZFbvhfyJzdm3LivNVbLGK0+TG0EOAz6d2aQ0UjESgMD1A +U8hLzQt7MiFSG0bt2cVx6SgCHeYUqMntbFELEAURWrhAfPLMJtAvFgKbEiZEAkkW +pdDVh603aIp4LjVCfTYp/mQ= +-----END CERTIFICATE----- diff --git a/thermal/2.0/default/apex/file_contexts b/thermal/2.0/default/apex/file_contexts new file mode 100644 index 0000000000..e0d87c73a7 --- /dev/null +++ b/thermal/2.0/default/apex/file_contexts @@ -0,0 +1,5 @@ +(/.*)? u:object_r:vendor_file:s0 +# Permission XMLs +/etc/permissions(/.*)? u:object_r:vendor_configs_file:s0 +# binary +/bin/hw/android\.hardware\.thermal@2\.0-service\.mock u:object_r:hal_thermal_default_exec:s0 diff --git a/thermal/2.0/default/apex/manifest.json b/thermal/2.0/default/apex/manifest.json new file mode 100644 index 0000000000..ee44dc1dbf --- /dev/null +++ b/thermal/2.0/default/apex/manifest.json @@ -0,0 +1,4 @@ +{ + "name": "com.android.hardware.thermal.mock", + "version": 1 +}