纯前端马卡龙糖果色页面组件:配色、卡片高光与悬浮动效实战
2026/9/1 17:43:59
ifneq ($(PRODUCT_BOARD),qa) -# BOARD_KERNEL_CMDLINE += selinux=1 androidboot.selinux=enforcing androidboot.dtbo_idx=0,1,2 +BOARD_KERNEL_CMDLINE += selinux=1 androidboot.selinux=permissive androidboot.dtbo_idx=0,1,2 elseBOARD_KERNEL_CMDLINE += selinux=1 androidboot.selinux=permissive androidboot.dtbo_idx=0,1,2 endifint main(int argc, char** argv) { uid_t current_uid = getuid(); -if (current_uid != AID_ROOT && current_uid != AID_SHELL) error(1, 0, "not allowed"); +if (current_uid != AID_ROOT && current_uid != AID_SHELL && current_uid != AID_SYSTEM) error(1, 0, "not allowed"); // Handle -h and --help. ++argv; if (*argv && (strcmp(*argv, "--help") == 0 || strcmp(*argv, "-h") == 0)) {4.给su文件默认授予root权限
//static const struct fs_path_config android_dirs[] { 00755, AID_ROOT, AID_SHELL, 0, "system/vendor" }, -{ 00751, AID_ROOT, AID_SHELL, 0, "system/xbin" }, +{ 00755, AID_ROOT, AID_SHELL, 0, "system/xbin" }, { 00751, AID_ROOT, AID_SHELL, 0, "system/apex/*/bin" }, 💡 //static const struct fs_path_config android_files[] //the following two files are INTENTIONALLY set-uid, but they // are NOT included on user builds. { 06755, AID_ROOT, AID_ROOT, 0, "system/xbin/procmem" }, -{ 04750, AID_ROOT, AID_SHELL, 0, "system/xbin/su" }, +{ 06755, AID_ROOT, AID_SHELL, 0, "system/xbin/su" },static void DropCapabilitiesBoundingSet(fail_fn_t fail_fn) { +// for (int i = 0; prctl(PR_CAPBSET_READ, i, 0, 0, 0) >= 0; i++) {; +// if (prctl(PR_CAPBSET_DROP, i, 0, 0, 0) == -1) { +// if (errno == EINVAL) { +// ALOGE("prctl(PR_CAPBSET_DROP) failed with EINVAL. Please verify " +// "your kernel is compiled with file capabilities support"); +// } else { +// fail_fn(CREATE_ERROR("prctl(PR_CAPBSET_DROP, %d) failed: %s", i, strerror(errno))); +// } +// } +// }}static int cap_prctl_drop(unsigned long cap){ struct cred *new; +// if (!ns_capable(current_user_ns(), CAP_SETPCAP)) +// return -EPERM; +// if (!cap_valid(cap)) +// return -EINVAL; new = prepare_creds(); if (!new) return -ENOMEM; cap_lower(new->cap_bset, cap); return commit_creds(new); }