Loading CleanSpec.mk +10 −0 Original line number Diff line number Diff line Loading @@ -60,4 +60,14 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/gatekeeper.$(TARGET_D $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/gatekeeper.$(TARGET_DEVICE).so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/vendor) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/libtrusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/libtrusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/keystore.trusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/keystore.trusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/gatekeeper.trusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/gatekeeper.trusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/secure-storage-unit-test) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/storageproxyd) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/tipc-test) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/trusty_keymaster_tipc) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/root) adb/set_verity_enable_state_service.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -93,21 +93,9 @@ static bool set_verity_enabled_state(int fd, const char* block_device, const cha /* Helper function to get A/B suffix, if any. If the device isn't * using A/B the empty string is returned. Otherwise either "_a", * "_b", ... is returned. * * Note that since sometime in O androidboot.slot_suffix is deprecated * and androidboot.slot should be used instead. Since bootloaders may * be out of sync with the OS, we check both and for extra safety * prepend a leading underscore if there isn't one already. */ static std::string get_ab_suffix() { std::string ab_suffix = android::base::GetProperty("ro.boot.slot_suffix", ""); if (ab_suffix == "") { ab_suffix = android::base::GetProperty("ro.boot.slot", ""); } if (ab_suffix.size() > 0 && ab_suffix[0] != '_') { ab_suffix = std::string("_") + ab_suffix; } return ab_suffix; return android::base::GetProperty("ro.boot.slot_suffix", ""); } /* Use AVB to turn verity on/off */ Loading adf/libadf/Android.bp +5 −1 Original line number Diff line number Diff line Loading @@ -12,8 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. cc_library_static { cc_library { name: "libadf", vendor_available: true, vndk: { enabled: true, }, srcs: ["adf.cpp"], cflags: ["-Werror"], local_include_dirs: ["include"], Loading fs_mgr/fs_mgr_format.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer) { uint64_t dev_sz; int fd, rc = 0; int status; if ((fd = open(fs_blkdev, O_WRONLY)) < 0) { PERROR << "Cannot open block device"; Loading @@ -62,7 +61,7 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer) const char* const mke2fs_args[] = { "/system/bin/mke2fs", "-t", "ext4", "-b", "4096", fs_blkdev, size_str.c_str(), nullptr}; rc = android_fork_execvp_ext(arraysize(mke2fs_args), const_cast<char**>(mke2fs_args), &status, rc = android_fork_execvp_ext(arraysize(mke2fs_args), const_cast<char**>(mke2fs_args), NULL, true, LOG_KLOG, true, nullptr, nullptr, 0); if (rc) { LERROR << "mke2fs returned " << rc; Loading @@ -78,7 +77,7 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer) nullptr}; rc = android_fork_execvp_ext(arraysize(e2fsdroid_args), const_cast<char**>(e2fsdroid_args), &status, true, LOG_KLOG, true, nullptr, nullptr, 0); NULL, true, LOG_KLOG, true, nullptr, nullptr, 0); if (rc) { LERROR << "e2fsdroid returned " << rc; } Loading @@ -88,10 +87,9 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer) static int format_f2fs(char *fs_blkdev) { int status; const char* const args[] = {"/system/bin/make_f2fs", "-f", "-O encrypt", fs_blkdev, nullptr}; return android_fork_execvp_ext(arraysize(args), const_cast<char**>(args), &status, true, return android_fork_execvp_ext(arraysize(args), const_cast<char**>(args), NULL, true, LOG_KLOG, true, nullptr, nullptr, 0); } Loading fs_mgr/fs_mgr_slotselect.cpp +3 −10 Original line number Diff line number Diff line Loading @@ -21,19 +21,12 @@ #include "fs_mgr.h" #include "fs_mgr_priv.h" // Returns "_a" or "_b" based on two possible values in kernel cmdline: // - androidboot.slot = a or b OR // - androidboot.slot_suffix = _a or _b // TODO: remove slot_suffix once it's deprecated. // Returns "_a" or "_b" based on androidboot.slot_suffix in kernel cmdline, or an empty string // if that parameter does not exist. std::string fs_mgr_get_slot_suffix() { std::string slot; std::string ab_suffix; if (fs_mgr_get_boot_config("slot", &slot)) { ab_suffix = "_" + slot; } else if (!fs_mgr_get_boot_config("slot_suffix", &ab_suffix)) { ab_suffix = ""; } fs_mgr_get_boot_config("slot_suffix", &ab_suffix); return ab_suffix; } Loading Loading
CleanSpec.mk +10 −0 Original line number Diff line number Diff line Loading @@ -60,4 +60,14 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/gatekeeper.$(TARGET_D $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/gatekeeper.$(TARGET_DEVICE).so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/vendor) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/init.rc) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/libtrusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/libtrusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/keystore.trusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/keystore.trusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/gatekeeper.trusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/gatekeeper.trusty.so) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/secure-storage-unit-test) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/storageproxyd) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/tipc-test) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/trusty_keymaster_tipc) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/root)
adb/set_verity_enable_state_service.cpp +1 −13 Original line number Diff line number Diff line Loading @@ -93,21 +93,9 @@ static bool set_verity_enabled_state(int fd, const char* block_device, const cha /* Helper function to get A/B suffix, if any. If the device isn't * using A/B the empty string is returned. Otherwise either "_a", * "_b", ... is returned. * * Note that since sometime in O androidboot.slot_suffix is deprecated * and androidboot.slot should be used instead. Since bootloaders may * be out of sync with the OS, we check both and for extra safety * prepend a leading underscore if there isn't one already. */ static std::string get_ab_suffix() { std::string ab_suffix = android::base::GetProperty("ro.boot.slot_suffix", ""); if (ab_suffix == "") { ab_suffix = android::base::GetProperty("ro.boot.slot", ""); } if (ab_suffix.size() > 0 && ab_suffix[0] != '_') { ab_suffix = std::string("_") + ab_suffix; } return ab_suffix; return android::base::GetProperty("ro.boot.slot_suffix", ""); } /* Use AVB to turn verity on/off */ Loading
adf/libadf/Android.bp +5 −1 Original line number Diff line number Diff line Loading @@ -12,8 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. cc_library_static { cc_library { name: "libadf", vendor_available: true, vndk: { enabled: true, }, srcs: ["adf.cpp"], cflags: ["-Werror"], local_include_dirs: ["include"], Loading
fs_mgr/fs_mgr_format.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer) { uint64_t dev_sz; int fd, rc = 0; int status; if ((fd = open(fs_blkdev, O_WRONLY)) < 0) { PERROR << "Cannot open block device"; Loading @@ -62,7 +61,7 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer) const char* const mke2fs_args[] = { "/system/bin/mke2fs", "-t", "ext4", "-b", "4096", fs_blkdev, size_str.c_str(), nullptr}; rc = android_fork_execvp_ext(arraysize(mke2fs_args), const_cast<char**>(mke2fs_args), &status, rc = android_fork_execvp_ext(arraysize(mke2fs_args), const_cast<char**>(mke2fs_args), NULL, true, LOG_KLOG, true, nullptr, nullptr, 0); if (rc) { LERROR << "mke2fs returned " << rc; Loading @@ -78,7 +77,7 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer) nullptr}; rc = android_fork_execvp_ext(arraysize(e2fsdroid_args), const_cast<char**>(e2fsdroid_args), &status, true, LOG_KLOG, true, nullptr, nullptr, 0); NULL, true, LOG_KLOG, true, nullptr, nullptr, 0); if (rc) { LERROR << "e2fsdroid returned " << rc; } Loading @@ -88,10 +87,9 @@ static int format_ext4(char *fs_blkdev, char *fs_mnt_point, bool crypt_footer) static int format_f2fs(char *fs_blkdev) { int status; const char* const args[] = {"/system/bin/make_f2fs", "-f", "-O encrypt", fs_blkdev, nullptr}; return android_fork_execvp_ext(arraysize(args), const_cast<char**>(args), &status, true, return android_fork_execvp_ext(arraysize(args), const_cast<char**>(args), NULL, true, LOG_KLOG, true, nullptr, nullptr, 0); } Loading
fs_mgr/fs_mgr_slotselect.cpp +3 −10 Original line number Diff line number Diff line Loading @@ -21,19 +21,12 @@ #include "fs_mgr.h" #include "fs_mgr_priv.h" // Returns "_a" or "_b" based on two possible values in kernel cmdline: // - androidboot.slot = a or b OR // - androidboot.slot_suffix = _a or _b // TODO: remove slot_suffix once it's deprecated. // Returns "_a" or "_b" based on androidboot.slot_suffix in kernel cmdline, or an empty string // if that parameter does not exist. std::string fs_mgr_get_slot_suffix() { std::string slot; std::string ab_suffix; if (fs_mgr_get_boot_config("slot", &slot)) { ab_suffix = "_" + slot; } else if (!fs_mgr_get_boot_config("slot_suffix", &ab_suffix)) { ab_suffix = ""; } fs_mgr_get_boot_config("slot_suffix", &ab_suffix); return ab_suffix; } Loading