8540faff16
Bug reports will now prefer v1.1 of the HAL since it supports well-scoped modes that mirror BugreportManager. For new devices launching with R, v1.1 must be supported if this (optional) HAL is implemented. It's also fairly trivial to update existing devices to 1.1 if an OEM chooses. As for what this means, bug reports will: - Be smaller in many cases, and as a result, faster to collect - Contain less unnecessary PII (e.g. camera logs should now be excluded for MODE_TELEPHONY) There's still some minor cleanup to be done, but for now leaving TODOs. Bug: 143183758 Bug: 143184495 Test: atest dumpstate_test Test: take bug report on Cuttlefish and Blueline, check for v1.1 usage Change-Id: I1660ff3983931fdeed51c85f2342700c89a012aa
183 lines
3.9 KiB
Text
183 lines
3.9 KiB
Text
//
|
|
// Copyright (C) 2017 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.
|
|
|
|
cc_defaults {
|
|
name: "dumpstate_cflag_defaults",
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wno-missing-field-initializers",
|
|
"-Wno-unused-variable",
|
|
"-Wunused-parameter",
|
|
],
|
|
}
|
|
|
|
cc_library_shared {
|
|
name: "libdumpstateutil",
|
|
defaults: ["dumpstate_cflag_defaults"],
|
|
vendor_available: true,
|
|
vndk: {
|
|
enabled: true,
|
|
},
|
|
srcs: [
|
|
"DumpstateInternal.cpp",
|
|
"DumpstateUtil.cpp",
|
|
],
|
|
shared_libs: [
|
|
"libbase",
|
|
"liblog",
|
|
],
|
|
export_include_dirs: ["."],
|
|
export_shared_lib_headers: [
|
|
"libbase",
|
|
],
|
|
}
|
|
|
|
cc_library_shared {
|
|
name: "libdumpstateaidl",
|
|
defaults: ["dumpstate_cflag_defaults"],
|
|
shared_libs: [
|
|
"libbinder",
|
|
"libutils",
|
|
],
|
|
aidl: {
|
|
local_include_dirs: ["binder"],
|
|
export_aidl_headers: true,
|
|
},
|
|
srcs: [
|
|
":dumpstate_aidl",
|
|
],
|
|
export_include_dirs: ["binder"],
|
|
}
|
|
|
|
filegroup {
|
|
name: "dumpstate_aidl",
|
|
srcs: [
|
|
"binder/android/os/IDumpstateListener.aidl",
|
|
"binder/android/os/IDumpstate.aidl",
|
|
],
|
|
path: "binder",
|
|
}
|
|
|
|
cc_defaults {
|
|
name: "dumpstate_defaults",
|
|
defaults: ["dumpstate_cflag_defaults"],
|
|
shared_libs: [
|
|
"android.hardware.dumpstate@1.0",
|
|
"android.hardware.dumpstate@1.1",
|
|
"libziparchive",
|
|
"libbase",
|
|
"libbinder",
|
|
"libcrypto",
|
|
"libcutils",
|
|
"libdebuggerd_client",
|
|
"libdumpstateaidl",
|
|
"libdumpstateutil",
|
|
"libdumputils",
|
|
"libhardware_legacy",
|
|
"libhidlbase",
|
|
"liblog",
|
|
"libutils",
|
|
],
|
|
srcs: [
|
|
"DumpstateService.cpp",
|
|
],
|
|
static_libs: [
|
|
"libincidentcompanion",
|
|
"libdumpsys",
|
|
"libserviceutils",
|
|
],
|
|
}
|
|
|
|
cc_binary {
|
|
name: "dumpstate",
|
|
defaults: ["dumpstate_defaults"],
|
|
srcs: [
|
|
"dumpstate.cpp",
|
|
"main.cpp",
|
|
],
|
|
required: [
|
|
"atrace",
|
|
"df",
|
|
"getprop",
|
|
"ip",
|
|
"iptables",
|
|
"ip6tables",
|
|
"kill",
|
|
"librank",
|
|
"logcat",
|
|
"lpdump",
|
|
"lpdumpd",
|
|
"lsmod",
|
|
"lsof",
|
|
"netstat",
|
|
"printenv",
|
|
"procrank",
|
|
"screencap",
|
|
"showmap",
|
|
"ss",
|
|
"storaged",
|
|
"top",
|
|
"uptime",
|
|
"vdc",
|
|
"vril-dump",
|
|
],
|
|
init_rc: ["dumpstate.rc"],
|
|
}
|
|
|
|
cc_test {
|
|
name: "dumpstate_test",
|
|
defaults: ["dumpstate_defaults"],
|
|
srcs: [
|
|
"dumpstate.cpp",
|
|
"tests/dumpstate_test.cpp",
|
|
],
|
|
static_libs: ["libgmock"],
|
|
test_config: "dumpstate_test.xml",
|
|
data: [
|
|
":dumpstate_test_fixture",
|
|
"tests/testdata/**/*",
|
|
],
|
|
test_suites: ["device-tests"],
|
|
}
|
|
|
|
cc_test {
|
|
name: "dumpstate_smoke_test",
|
|
defaults: ["dumpstate_defaults"],
|
|
srcs: [
|
|
"dumpstate.cpp",
|
|
"tests/dumpstate_smoke_test.cpp",
|
|
],
|
|
static_libs: ["libgmock"],
|
|
}
|
|
|
|
|
|
// =======================#
|
|
// dumpstate_test_fixture #
|
|
// =======================#
|
|
cc_test {
|
|
|
|
name: "dumpstate_test_fixture",
|
|
test_suites: ["device-tests"],
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wno-missing-field-initializers",
|
|
"-Wno-unused-variable",
|
|
"-Wunused-parameter",
|
|
],
|
|
srcs: ["tests/dumpstate_test_fixture.cpp"],
|
|
data: ["tests/testdata/**/*"],
|
|
}
|