1. 改动 ADB ROOT权限:

system/core$ git diff adb/adb.c

diff --git a/adb/adb.c b/adb/adb.c

index 99bea0f..d8fc090 100644

--- a/adb/adb.c

+++ b/adb/adb.c

@@ -1217,6 +1217,11 @@ static void drop_capabilities_bounding_set_if_needed() {

 

 static int should_drop_privileges() {

 #ifndef ALLOW_ADBD_ROOT

+       char value[PROPERTY_VALUE_MAX];

+       property_get("hw.hasusbadbroot", value, "");

+       if(strcmp(value, "1") == 0)

+       return 0;

+ else

     return 1;

 #else /* ALLOW_ADBD_ROOT */

     int secure = 0;

同一时候在system.prop中加入hw.hasusbadbroot=1





2.去掉adb 密钥校验:

ro.adb.secure=0



3.改动开发人员选项隐藏

packages/apps/Settings/src/com/android/settings/Settings.java

private void updateHeaderList(List<Header> target) {

-        final boolean showDev = mDevelopmentPreferences.getBoolean(

-                DevelopmentSettings.PREF_SHOW,

-                android.os.Build.TYPE.equals("eng"));

-        int i = 0;

+//        final boolean showDev = mDevelopmentPreferences.getBoolean(

+//                DevelopmentSettings.PREF_SHOW,

+//                android.os.Build.TYPE.equals("eng")); //samjiang modify

+               final boolean showDev = true; 

+               int i = 0;

 

         final UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);

         mHeaderIndexMap.clear();

4.USB调试默认打开:

@@ -272,7 +272,7 @@ for these).

         <li>Installs APKs according to the product definition files; tags

             are ignored for APK modules.

         <li><code>ro.secure=1</code>

-        <li><code>ro.debuggable=0</code>

+        <li><code>ro.debuggable=1</code>

         <li><code>adb</code> is disabled by default.

     </td>

 </tr>

"<code>make user</code>"

        <p>

        This is the flavor intended to be the final release bits.

        <ul>

        <li>Installs modules tagged with <code>shell_</code>$(TARGET_SHELL) and <code>user</code>.

        <li>Installs non-APK modules that have no tags specified.

        <li>Installs APKs according to the product definition files; tags

            are ignored for APK modules.

        <li><code>ro.secure=1</code>

        <li><code>ro.debuggable=1</code>

        <li><code>adb</code> is disabled by default.

    </td>

</tr>

<tr>

    <td>

@@ -350,7 +350,7 @@ ifeq (true,$(strip $(enable_target_debugging)))

   INCLUDE_TEST_OTA_KEYS := true

 else # !enable_target_debugging

   # Target is less debuggable and adbd is off by default

-  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0

+  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1

 endif # !enable_target_debugging









最新文章

  1. Learn ES2015
  2. ThreadLocal类详解:原理、源码、用法
  3. 实战Java虚拟机之二“虚拟机的工作模式”
  4. RunLoop相关知识的总结
  5. ListView
  6. UNITY3D的变量初始化问题
  7. 看程序写结果(program)
  8. 林子雨老师团队《Architecture of a Database System》 中文版
  9. 翻页采用jaxa
  10. 初学git &amp;&amp; 使用总结
  11. 关于MySql中自增长id设置初始值
  12. 3,fiddler手机端的设置
  13. pm2日志管理pm2-logrotate介绍
  14. Nifi InvokeHttp processor
  15. 记一次 Spring 事务配置踩坑记
  16. python_docx制作word文档详细使用说明【转】
  17. Anroid 手机助手 详细解析 概述(二)
  18. loadrunner脚本中参数化和返回值输出log到外部文件
  19. python selenium登陆网易云音乐
  20. Android滚动栏控件的优化

热门文章

  1. 牛客练习赛 29 E 位运算?位运算!(线段树)
  2. LoggerAspect
  3. 子查询在INSERT语句中的应用
  4. JZYZOJ1502 [haoi2008]下落的圆盘 计算几何 贪心
  5. JZYZOJ1527 [haoi2012]高速公路 线段树 期望
  6. 【贪心】AtCoder Regular Contest 079 E - Decrease (Judge ver.)
  7. 【概率dp】【滚动数组】CDOJ1652 都市大飙车
  8. Implicit declaration of function &#39;CC_MD5&#39; is invalid in C99
  9. MYSQL复习笔记10-连接
  10. Linux设备文件简介