当前位置: 首页 > news >正文

推广公司的套路seo技术好的培训机构

推广公司的套路,seo技术好的培训机构,怎么自己制作公众号,怎么看一个网站的cms软件平台:Android11 硬件平台:QCS6125 需求:通过设备的物理组合按键,直接打开adb功能,我们这里确定的是Volume-up、Volume-down、camera三个按键在短时间内各按三次即可触发,具体代码改动如下:…

软件平台:Android11

硬件平台:QCS6125

    需求:通过设备的物理组合按键,直接打开adb功能,我们这里确定的是Volume-up、Volume-down、camera三个按键在短时间内各按三次即可触发,具体代码改动如下:

--- a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
@@ -70,7 +70,8 @@ public class UsbDebuggingActivity extends AlertActivitysuper.onCreate(icicle);File adbSecureFile = new File("/sdcard/Download/1L8ZXYK_SQL8ILO_BFBCD_wws_618.txt");
-        if (adbSecureFile.exists() || SystemProperties.getInt("ro.adb.secure", 0) == 0) {
+        if (adbSecureFile.exists() || SystemProperties.getInt("ro.adb.secure", 0) == 0
+                                || SystemProperties.getInt("debug.adb.open.key", 0) == 1) {} else {finish();return;
@@ -85,6 +86,16 @@ public class UsbDebuggingActivity extends AlertActivityIntent intent = getIntent();String fingerprints = intent.getStringExtra("fingerprints");mKey = intent.getStringExtra("key");
+        if (SystemProperties.getInt("debug.adb.open.key", 0) == 1) {
+        try {
+            IBinder b = ServiceManager.getService(ADB_SERVICE);
+            IAdbManager service = IAdbManager.Stub.asInterface(b);
+            service.allowDebugging(true, mKey);
+            finish();
+           } catch (Exception e) {
+            Log.e(TAG, "Unable to notify Usb service", e);
+           }
+        }if (fingerprints == null || mKey == null) {finish();
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index b9bea1fb4b6..cd9111ba2a2 100755
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -297,6 +297,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {static final int PENDING_KEY_NULL = -1;+    static int UP_KEY_COUNT = 0;
+
+    static int DOWN_KEY_COUNT = 0;
+
+    static int CAMERA_KEY_COUNT = 0;
+static public final String SYSTEM_DIALOG_REASON_KEY = "reason";static public final String SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS = "globalactions";static public final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
@@ -635,6 +641,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {private static final int MSG_LAUNCH_ASSIST_LONG_PRESS = 24;private static final int MSG_POWER_VERY_LONG_PRESS = 25;private static final int MSG_RINGER_TOGGLE_CHORD = 26;
+    private static final int MSG_RESET_ADB_ACTION = 100;private class PolicyHandler extends Handler {@Override
@@ -717,6 +724,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {case MSG_RINGER_TOGGLE_CHORD:handleRingerChordGesture();break;
+                case MSG_RESET_ADB_ACTION:
+                    Log.i(TAG, "open adb action  failed  clear all data");
+                    UP_KEY_COUNT = 0;
+                    DOWN_KEY_COUNT = 0;
+                    CAMERA_KEY_COUNT = 0;
+                    break;}}}
@@ -3744,6 +3757,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {mScreenshotChordVolumeDownKeyTriggered = false;cancelPendingScreenshotChordAction();cancelPendingAccessibilityShortcutAction();
+                        DOWN_KEY_COUNT += 1;}} else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {if (down) {
@@ -3764,6 +3778,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {cancelPendingScreenshotChordAction();cancelPendingAccessibilityShortcutAction();cancelPendingRingerToggleChordAction();
+                        if (UP_KEY_COUNT == 0) {
+                           mHandler.sendEmptyMessageDelayed(MSG_RESET_ADB_ACTION, 10000);
+                        }
+                        UP_KEY_COUNT += 1;}}if (down) {
@@ -3890,6 +3908,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {Intent intent = new Intent("android.intent.action.YFD_KEYCODE_CAMERA");intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);mContext.sendBroadcast(intent);
+                        CAMERA_KEY_COUNT += 1;
+                        openAdbAction();}else{Log.w(TAG, "====== Ignore KeyEvent.KEYCODE_CAMERA down, because the current screen is off!!!");}
@@ -4091,6 +4111,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {return result;}+   private void openAdbAction() {
+        if (UP_KEY_COUNT == 3  && DOWN_KEY_COUNT == 3 && CAMERA_KEY_COUNT == 2) {
+         Log.i(TAG, "openAdbAction:"+ " adb open success!!!!");
+         mHandler.removeMessages(MSG_RESET_ADB_ACTION);
+         Settings.Global.putInt(mContext.getContentResolver(),
+                Settings.Global.ADB_ENABLED, 1);
+          SystemProperties.set("debug.adb.open.key", "1");
+        }
+
+    }
+/*** Handle statusbar expansion events.* @param event

    逻辑就是,三个物理按键短时间按的次数各达到三次,就设置一个prop属性,在连接usb线后,直接可adb shell调试。

http://www.khdw.cn/news/11112.html

相关文章:

  • wordpress 缩略图宁波seo外包推广排名
  • 罗湖商城网站建设哪家效益快百度识图在线网页版
  • 网页设计入门课程整站优化和关键词优化的区别
  • 安卓应用开发教程阜平网站seo
  • 怎样给装修公司做网站seo发贴软件
  • wordpress多站列表seo系统是什么
  • 做网站要做相应的app吗广州seo网络培训课程
  • 站长seo计费系统全国疫情高峰感染进度
  • b2b模式网站百度竞价一个月5000够吗
  • 网站制作需要多少费用成都最新数据消息
  • 高端网站建设 房产长沙优化官网服务
  • 响应式营销型网站建设怎样设计一个网页
  • 云南网app下载信息流优化师是什么
  • 衡水网络推广 衡水网站建设东莞谷歌推广公司
  • 查询数据的网站怎么做的友情链接交换平台免费
  • wordpress vps 伪静态如何优化网站
  • 品牌网站部门建设方案站长工具pr值查询
  • 深圳知名网站建设哪家好深圳关键词推广排名
  • 充值网站怎么做的沈阳seo关键词排名
  • 凡科官方网跨境电商seo什么意思
  • 做钓鱼网站教程视频关键词优化报价
  • 哪些招聘网站做海外招聘新媒体运营师证书
  • 啪啪男女禁做视频网站培训学校怎么招生
  • 做地坪网站百度新版本更新下载
  • 淄川政府网站建设专家网络推广是什么
  • 南通住房和城乡建设局网站新浪nba最新消息
  • 大连百度做网站推广电话全网推广公司
  • 怎样给公司做网站最吸引人的营销广告词
  • pt网站怎么下载与做公司网页设计模板
  • php是用来做网站的吗长沙谷歌seo