Merge "Create Apex com.android.hardware.usb for usb 1.0"

This commit is contained in:
Deyao Ren 2021-12-07 03:09:48 +00:00 committed by Gerrit Code Review
commit 955cf3b233
8 changed files with 165 additions and 2 deletions

View file

@ -21,11 +21,21 @@ package {
default_applicable_licenses: ["hardware_interfaces_license"],
}
filegroup {
name: "android.hardware.usb@1.0-service.xml",
srcs: ["android.hardware.usb@1.0-service.xml"],
}
filegroup {
name: "android.hardware.usb@1.0-service.rc",
srcs: ["android.hardware.usb@1.0-service.rc"],
}
cc_binary {
name: "android.hardware.usb@1.0-service",
defaults: ["hidl_defaults"],
init_rc: ["android.hardware.usb@1.0-service.rc"],
vintf_fragments: ["android.hardware.usb@1.0-service.xml"],
init_rc: [":android.hardware.usb@1.0-service.rc"],
vintf_fragments: [":android.hardware.usb@1.0-service.xml"],
relative_install_path: "hw",
vendor: true,
srcs: [

View file

@ -0,0 +1,59 @@
// Copyright (C) 2021 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.usb.key",
public_key: "com.android.hardware.usb.avbpubkey",
private_key: "com.android.hardware.usb.pem",
}
android_app_certificate {
name: "com.android.hardware.usb.certificate",
certificate: "com.android.hardware.usb",
}
genrule {
name: "com.android.hardware.usb.rc-gen",
srcs: [":android.hardware.usb@1.0-service.rc"],
out: ["com.android.hardware.usb.rc"],
cmd: "sed -E 's/\\/vendor/\\/apex\\/com.android.hardware.usb/' $(in) > $(out)",
}
prebuilt_etc {
name: "com.android.hardware.usb.rc",
src: ":com.android.hardware.usb.rc-gen",
installable: false,
}
apex {
name: "com.android.hardware.usb",
manifest: "manifest.json",
file_contexts: "file_contexts",
key: "com.android.hardware.usb.key",
certificate: ":com.android.hardware.usb.certificate",
updatable: false,
soc_specific: true,
use_vndk_as_stable: true,
binaries: ["android.hardware.usb@1.0-service"],
prebuilts: [
"com.android.hardware.usb.rc",
"android.hardware.usb.accessory.prebuilt.xml",
"android.hardware.usb.host.prebuilt.xml",
],
vintf_fragments: [":android.hardware.usb@1.0-service.xml"],
}

View file

@ -0,0 +1,51 @@
-----BEGIN RSA PRIVATE KEY-----
MIIJKQIBAAKCAgEAwdimmHgIZHrep3H3YfVaNYEAGg45LUEPIiwHV6aIC9V7zjBS
SftD30Z21jGyk7hmtas6WMI2vRBDNGrZWDgPeiEQoxXQinuU4Ug5S5X2F8LpWs0y
ZeNFwQkqZwqGdQlkmy8upfb6T7rDxqRv+C0AtGP1r4r36+Xh5ld5stVaMK0UNhZt
VW0nQAxyeJL3tm0zfiEA9Zu7FF2IyHm+bo9+eJ7WXfjiJfkclLgqlX3ec2cvVqAf
NHisj18PEd/qtC64b+FnkgbsdHzWbo8HW5x4STkGXNnH+O3dvkWBX60MOfywfZFw
+yaz5mt7K+ft/V4UA7zKiAEFM+J1lND9/UMJnd0XMYYtcRQF8lmu4dlcjfbbAm0k
VgoUEsizIeMPLrMj837uVloKKzIXmPsVsfMarP/MrX6TJfzdUhdm01pVO1g0wtHJ
J3eYQsEnOI7RjL+uZDQvPWAnr71pvacn66PAJC1UPulEEla5lhd30RDItbJkngXp
3UggW32ZOQt3Oc8P0eo9SCnBlHtCVr8wfxAbxCoPR9qIdX3azkQRqcKqGbBbPnkc
hSCzeIofUkYGibfbZg4k1yY82xEqZuN7J1zycoGP4wyhXeRLTRWxfPR5dxxmQZaS
67A1LWrYvAzF8Rd44VMRlI/Qk6zuBsL01j2dfBqit+le+viQmTYb3BpV+1kCAwEA
AQKCAgAmSfX2LddyiXaLWo6DsePkp5tuihqvHqevl0TIAmPi+oMe4hqO9GueoZt9
iYl9djILdkvrFkmbpKex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L2j5bxAtSD9xAHtczMn10uCUdLELjRB1L4f
1qY+EjpIgK0NIFuEt9K5uZXirXq3K3eixKeJFNji3x/X8NgDALSdnT8JIlSg4DMg
iWupLrQ9CSHMlgh5P43ALamiRIHQNqEwgj8OIGzsvQTSLbRjbPWYcDZa+Q1hosiA
Fv7vjDI6oySM
-----END CERTIFICATE-----

View file

@ -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\.usb@1\.0-service u:object_r:hal_usb_default_exec:s0

View file

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