platform_system_core/set-verity-state/Android.bp
Yi-Yo Chiang 8667495164 set-verity-state: Add -h -v -R (automatic reboot) options
-h: print help
-v: noisy output
-R: automatic reboot if needed

Also remove the "argc != 0" check, as this shouldn't happen most of the
time anyway. The only possible way (I can think of) for this to happen
is to explicitly call execve() with an empty argv, which is against the
calling convention, thus a footgun, to begin with.

Bug: 241688845
Test: adb shell [disable-verity|enable-verity] [-R] [-v] [-h]
Test: adb shell set-verity-state [-R] [-v] [-h] [0|1]
Change-Id: I27fc18b0958650c5926322a3f4bd1df758fd96c8
2022-08-17 06:13:20 +00:00

41 lines
816 B
Text

// Copyright 2019 The Android Open Source Project
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
cc_binary {
name: "set-verity-state",
srcs: ["set-verity-state.cpp"],
shared_libs: [
"libbase",
"libbinder",
"libcrypto",
"libcrypto_utils",
"libfs_mgr_binder",
"libutils",
],
static_libs: [
"libavb_user",
],
header_libs: [
"libcutils_headers",
],
cflags: ["-Werror"],
cppflags: [
"-DALLOW_DISABLE_VERITY=0",
],
product_variables: {
debuggable: {
cppflags: [
"-UALLOW_DISABLE_VERITY",
"-DALLOW_DISABLE_VERITY=1",
],
},
},
symlinks: [
"enable-verity",
"disable-verity",
],
}