/*****************************************************************************
* I.MX6 默认打开 USB adb
* 声明:
* 在调试android的时候,尤其是前期,可能我们没有Touch,这样使用adb显得
* 力不从心,因为它会弹个对话框来,可你有按不了,于是默认打开adb就成了需求。
*
* 2016-1-20 深圳 南山平山村 曾剑锋
****************************************************************************/ 一、参考文章:
飞思卡尔 imx6 android 调试环境搭建
http://www.wjxfpf.com/2015/10/590190.html
Android 4.2. 开机默认开启USB调试
http://blog.csdn.net/zhujm320/article/details/37914487
默认打开USB调试功能
http://blog.csdn.net/pfgmylove/article/details/16985159 二、解决方案:
. cat frameworks/base/services/java/com/android/server/usb/UsbDeviceManager.java
......
public void systemReady() {
if (DEBUG) Slog.d(TAG, "systemReady");
mNotificationManager = (NotificationManager)
mContext.getSystemService(Context.NOTIFICATION_SERVICE); // We do not show the USB notification if the primary volume supports mass storage.
// The legacy mass storage UI will be used instead.
boolean massStorageSupported = false;
final StorageManager storageManager = StorageManager.from(mContext);
final StorageVolume primary = storageManager.getPrimaryVolume();
massStorageSupported = primary != null && primary.allowMassStorage();
mUseUsbNotification = !massStorageSupported; // make sure the ADB_ENABLED setting value matches the current state
//Settings.Global.putInt(mContentResolver, Settings.Global.ADB_ENABLED, mAdbEnabled ? 1 : 0);
Settings.Global.putInt(mContentResolver, Settings.Global.ADB_ENABLED, );
mHandler.sendEmptyMessage(MSG_SYSTEM_READY);
}
......
. cat /init.rc
......
# Enable adb security for JB4.2.2
setprop ro.adb.secure
......

I.MX6 默认打开 USB adb的更多相关文章

  1. Android系统移植与调试之------->如何修改Android系统默认显示【开发者选项】并默认打开【USB调试】和【未知来源】开关

    今天有个用户对[设置]有个特殊的要求,即: 1.开机的时候默认显示[开发者选项]并打开[USB调试]开关    ([Developer options]-->[USB debugging]) 2 ...

  2. [FAQ04776]如何默认打开user版本 debug 选项, 默认打开adb 连接【转】

    本文转载自:http://blog.csdn.net/thinkinwm/article/details/24865933 Description] 如何默认打开user 版本的USB debug 选 ...

  3. android usb adb流程[转]

    android adb 概述 android adb的代码分为两部分: kernel层的代码在如下路径: drivers/usb/gadget/f_adb.c drivers/usb/gadget/a ...

  4. 如何打开USB OTG功能:

    一.检查HW原理图,确认是否支持OTG功能(vbus是否供上电,IDDIG pin连接是否正确)二.若HW确认支持OTG功能,则按照以下方法分别打开USB OTG功能及实现挂载: 如何打开USB OT ...

  5. [转]如何设置eclipse中js默认打开为java Editor

    打开window-preference -> General-Editors-File Associator 看到右边的.js下边就是设置默认打开方式了 转自百度知道:http://zhidao ...

  6. 更改localhost默认打开的index.html的地址三步曲

    首先说明,我的Apache安装路径是F:\software installing\Apache2.2 解释一下,localhost默认打开的是安装路径下index.html 也就是路径F:\softw ...

  7. 20160303 - 升级 Windows 10 版本 1511 后,文件夹默认打开方式为 cmd 的修复

    问题描述:升级 Windows 10 版本 1511 (OS 内部版本 10586.122)后,文件夹的默认打开方式变成了cmd.双击任何一个文件夹,显示相关的提示错误信息如下: [Window Ti ...

  8. Ubuntu 14 修改默认打开方式

    通过研究,有三种修改方式. 方式一: 修改路径:右上角“系统设置” -> 详细信息 -> 默认应用程序 但是,有个缺陷,可修改的项比较少. 方式二: 例如,修改pdf的打开方式,只要查看任 ...

  9. [SoapUI] 同一个Resource不同参数时,在两个step里默认打开总是同一个Resource

    当SoapUI里Projects 有两个相同的Resource,只是参数不同时,使用两个Resource创建的step默认打开的总是同一个Resource.我们应当修改method名字为不同,这是So ...

随机推荐

  1. MSAA

    多重采样抗锯齿(MultiSampling Anti-Aliasing,簡稱MSAA)是一种特殊的超级采样抗锯齿(SSAA).MSAA首先来自于OpenGL.具体是MSAA只对Z缓存(Z-Buffer ...

  2. 多线程Java Socket编程示例(转)

    这篇做为学习孙卫琴<<Java网络编程精解>>的学习笔记吧.其中采用Java 5的ExecutorService来进行线程池的方式实现多线程,模拟客户端多用户向同一服务器端发送 ...

  3. uva 1423 拓扑排序

    刘书上例题  拓扑排序 #include <cstdio> #include <cstdlib> #include <cmath> #include <map ...

  4. PHP杂记

    SOAP: 感觉是类似于Java中的HttpClient的东西,和curl也有点像. PHPStorm中查看所有的函数结构(Structure):Alt+7 查找方法或类(Symbol Name 函数 ...

  5. Unity3d 一些 常见路径

    Application.persistentDataPath C:\Users\Administrator\AppData\LocalLow\Company Name\Product Name 如果改 ...

  6. UNDERSTANDING CALLBACK FUNCTIONS IN JAVASCRIPT

    转自: http://recurial.com/programming/understanding-callback-functions-in-javascript/ Callback functio ...

  7. POJ 3318 Matrix Multiplication(矩阵乘法)

    题目链接 题意 : 给你三个n维矩阵,让你判断A*B是否等于C. 思路 :优化将二维转化成一维的.随机生成一个一维向量d,使得A*(B*d)=C*d,多次生成多次测试即可使错误概率大大减小. #inc ...

  8. Android 父类super.onDestroy();的有关问题

    super.onDestroy(); 的问题. 注意:没有显式地在自己的方法中调用父类Activity的onDestroy是会报错的.我的问题很简单,在我覆盖的onDestroy(),方法中需要调用父 ...

  9. Spring整合Ibatis

    Spring整合Ibatis javaibatisspring 所需jar清单           ibatis-2.*.jar    *为任意版本,下同,ibatis工作包           sp ...

  10. CKeditor 配置使用

    CKeditor 配置使用 一.使用方法:1.在页面<head>中引入ckeditor核心文件ckeditor.js<script type="text/javascrip ...