Android DEBUG版本默认开放ROOT权限

Android DEBUG版本默认开放ROOT权限

最近收到项目需求,需要默认开放ROOT权限,具体修改参照如下:

/build/make/core/main.mk

ifneq (,$(user_variant))
  # Target is secure in user builds.
-  ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1
+  ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0

  ifeq ($(user_variant),user)
-    ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
+    ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=0
  endif

  ifeq ($(user_variant),userdebug)
    # Pick up some extra useful tools
    tags_to_install += debug
  else
    # Disable debugging in plain user builds.
-    enable_target_debugging :=
+    # enable_target_debugging :=
  endif

重新编译验证,修改生效,已默认开放ROOT权限

你可能感兴趣的:(Android,android)