新之助meow

Kratos
专注于用户阅读体验的响应式博客主题
  1. 首页
  2. android
  3. 正文

android安卓手机屏幕触摸失效时通过adb命令模拟触摸和按键的方法

2015年8月2日 714点热度 1人点赞 0条评论

这个周末鼓捣屏幕碎掉的nexus5,自己弄掉碎掉的外屏失败,还手贱开机看屏幕,结果触摸坏掉关不了机。

还好可以通过adb命令来操作。

命令 adb shell input

usage: input ...

input text <string>
input keyevent <key code number or name>
input tap <x> <y>
input swipe <x1> <y1> <x2> <y2>

模拟按键

adb shell input keyevent 19 (方向上键)
adb shell input keyevent 20 (方向下键)
adb shell input keyevent 21 (方向左键)
adb shell input keyevent 22 (方向右键)
adb shell input keyevent 23 (方向下键)
adb shell input keyevent 61 (TAB键)
adb shell input keyevent 66 (确定键)
adb shell input keyevent 3 (返回键)
adb shell input keyevent HOME (方向下键)
adb shell input keyevent MENU (菜单键)
adb shell input keyevent BACK (返回键)
adb shell input keyevent CAMERA (拍照键)
adb shell input keyevent POWER (电源键)

模拟屏幕手指点击 adb shell input tap x y

x、y坐标对应的是真实的屏幕分辨率,所以要根据具体手机具体看,比如你想点击屏幕(x, y) = (250, 250)位置:

adb shell input tap 250 250

模拟屏幕手指滑动  adb shell input swipe x1 y1 x2 y2

从250 250 滑动到 300 300

adb shell input swipe 250 250 300 300

 

标签: adb android 安卓 触摸屏坏
最后更新:2015年8月2日

tjccn_wx@hotmail.com

这个人很懒,什么都没留下

点赞
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

归档

  • 2026 年 10 月
  • 2024 年 2 月
  • 2023 年 7 月
  • 2023 年 1 月
  • 2022 年 10 月
  • 2022 年 9 月
  • 2022 年 6 月
  • 2022 年 4 月
  • 2022 年 3 月
  • 2022 年 2 月
  • 2021 年 11 月
  • 2021 年 10 月
  • 2021 年 9 月
  • 2021 年 1 月
  • 2020 年 12 月
  • 2020 年 11 月
  • 2020 年 10 月
  • 2020 年 9 月
  • 2020 年 7 月
  • 2020 年 6 月
  • 2020 年 5 月
  • 2020 年 4 月
  • 2020 年 3 月
  • 2020 年 2 月
  • 2019 年 10 月
  • 2019 年 8 月
  • 2019 年 7 月
  • 2019 年 4 月
  • 2019 年 3 月
  • 2018 年 12 月
  • 2018 年 11 月
  • 2018 年 10 月
  • 2018 年 6 月
  • 2018 年 5 月
  • 2018 年 4 月
  • 2018 年 3 月
  • 2018 年 2 月
  • 2018 年 1 月
  • 2017 年 12 月
  • 2017 年 11 月
  • 2017 年 10 月
  • 2017 年 9 月
  • 2017 年 8 月
  • 2017 年 7 月
  • 2017 年 6 月
  • 2017 年 5 月
  • 2017 年 4 月
  • 2017 年 3 月
  • 2017 年 2 月
  • 2017 年 1 月
  • 2016 年 12 月
  • 2016 年 11 月
  • 2016 年 10 月
  • 2016 年 9 月
  • 2016 年 8 月
  • 2016 年 7 月
  • 2016 年 6 月
  • 2016 年 5 月
  • 2016 年 4 月
  • 2016 年 3 月
  • 2015 年 12 月
  • 2015 年 8 月

分类

  • android
  • mysql
  • nethunter
  • proxmark
  • 未分类

COPYRIGHT © 2026 新之助meow. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang