如果你的安卓手机支持〔电源〕键+〔音量减〕键截屏,你可以代码
tasker吧
全部回复
仅看楼主
level 10
wsbdzcyh 楼主
最近研究外壳命令,如果你的安卓手机支持〔电源〕+〔音量减〕截屏,你试试下面代码:
sendevent /dev/input/event0 1 116 1
sendevent /dev/input/event0 1 114 1
sendevent /dev/input/event0 0 0 0
sleep 1
sendevent /dev/input/event0 1 116 0
sendevent /dev/input/event0 1 114 0
sendevent /dev/input/event0 0 0 0
以上一共七行,也可以截屏,具体操作:
【任务】【+】【代码】【外壳】,在【命令行】复制粘贴上面七行代码于其中,在下面【root】勾选 √,保存后,点击运行试试吧。
如果有效果,回复一下吧,以后有时间,我会多研究代码,出了成果就分享给大家。
2015年01月22日 06点01分 1
level 10
wsbdzcyh 楼主
实际上,修改上面七行部分数据,可以实现多种组合键按下的效果。
2015年01月22日 06点01分 2
level 13
亲测,可以截图。
   --生活很美好,总有惊喜!
2015年01月22日 06点01分 3
直接sleep前面那部分就可以截图了
2015年01月22日 06点01分
回复 酱油一下下 :不对,我测试,7行都写,运行,可以截图,去掉下3行,运行可以截图,再运行就无法截图了。
2015年01月22日 06点01分
level 10
wsbdzcyh 楼主
我也试过screenshot 命令,可是截图效果是倾斜、松散,不成图样,我感觉前面好像有几个命令实现帧缓冲什么的,看来要用这个命令,得真正安卓开发高手赐教了。
2015年01月22日 07点01分 5
我用的是 screencap,图片很正常
2015年01月22日 12点01分
screencap ?请教详细方法,后面什么参数?下面root,变量输出有什么设置么?
2015年01月22日 13点01分
嗯,不用回复,研究明白了,大家也可看看楼下,由此得到的简单方法
2015年01月22日 13点01分
level 3
根据这个做一个快捷拍照,就跟锤子手机一样
2015年01月22日 08点01分 6
level 8
支持楼主研究出更多有用代码 最好授之以渔 介绍下怎样研究出来的
2015年01月22日 09点01分 7
level 10
还有其它类似的没
2015年01月22日 11点01分 8
level 10
我的是home,要怎么改呀。。
2015年01月22日 11点01分 9
电源和home
2015年01月22日 11点01分
level 10
wsbdzcyh 楼主
如果电源+Home,那么只把第二行和第六行的114变成102,(注意改后的102的前后留有空格)
2015年01月22日 12点01分 10
level 10
wsbdzcyh 楼主
从 lvxc88那里得到的方法:
只要输入
screencap /storage/sdcard1/abc.png
就在SD卡下生成名字为abc.png的截图,这个方法简单,还能指定文件名和路径,比我的模拟按键要好,推荐大家应用之。
2015年01月22日 13点01分 12
你好,亲测失败
2015年01月29日 10点01分
@吹风哥 指的是重复覆盖,比如这次截图是abc 下次截图又覆盖了
2015年01月29日 10点01分
嗯…不覆盖,可以把abc改成%TIMES
2015年02月02日 08点02分
level 10
还是不行,这个方法我手机有截图编辑,楼下的一直在用
2015年01月22日 19点01分 13
root以沟
2015年01月22日 19点01分
回复
���Է���
:好
2015年07月31日 09点07分
level 10
wsbdzcyh 楼主
这个是我手机的
2015年01月23日 09点01分 22
从这个图,分析按键是event0,触屏是event3,手机不同,设备ID会有差别。
2015年01月23日 09点01分
level 10
add device 1: /dev/input/event17
name: "ssp_context"
events:
REL (0002): 0003 0004 0005
input props:
<none>
add device 2: /dev/input/event16
name: "meta_event"
events:
REL (0002): 0006 0007
input props:
<none>
add device 3: /dev/input/event15
name: "step_cnt_sensor"
events:
REL (0002): 0009
input props:
<none>
add device 4: /dev/input/event14
name: "uncalibrated_gyro_sensor"
events:
REL (0002): 0000 0001 0002 0003 0004 0005
input props:
<none>
add device 5: /dev/input/event13
name: "sig_motion_sensor"
events:
REL (0002): 0009
input props:
<none>
add device 6: /dev/input/event12
name: "uncal_geomagnetic_sensor"
events:
REL (0002): 0003 0004 0005 0006 0007 0008
input props:
<none>
add device 7: /dev/input/event11
name: "geomagnetic_sensor"
events:
REL (0002): 0003 0004 0005 0006
input props:
<none>
add device 8: /dev/input/event10
name:
2015年01月23日 14点01分 23
level 10
add device 14: /dev/input/event0
name: "sii8240_rcp"
events:
KEY (0001): 001c 0067 0069 006a 006c 0080 008b 009e
00a3 00a5 00a8 00c9 00cf 00d0 0163 0200
0201 0202 0203 0204 0205 0206 0207 0208
0209
add device 19: /dev/input/event3
name: "sec_touchscreen"
events:
KEY (0001): 0145* 014a
ABS (0003): 002f : value 0, min 0, max 9, fuzz 0, flat 0, resolution 0
0030 : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
0031 : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
0032 : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
0035 : value 0, min 0, max 1079, fuzz 0, flat 0, resolution 0
0036 : value 0, min 0, max 1919, fuzz 0, flat 0, resolution 0
0039 : value 0, min 0, max 65535, fuzz 0, flat 0, resolution 0
003b : value 0, min 0, max 255, fuzz 0, flat 0, r
2015年01月23日 14点01分 24
level 10
wsbdzcyh 楼主
你的手机大致看了下,输入设备太多了,分辨率1080*1920,至少2千元吧,其中event11到event16,都是传感器,多多研究对其编程(模拟压力重力什么的),
event0是按键的,event3是触屏的,和大多数手机相同
2015年01月24日 07点01分 26
level 10
wsbdzcyh 楼主
你的event0设备支持以下按键(回车, 上下左右 ,停止, 菜单 ,返回,下一首 ,前一首 ,快退 , cd暂停,播放,快进),这几个键可以模拟,还有0200多的等等我再计算查找一下
2015年01月24日 09点01分 27
找到了,是数字键以及0到9,在evevnt0的设备,没有home支持,如果单独键home,你试试 input keyevent 3
2015年01月24日 09点01分
三星水货,盖世J,我再试试谢了
2015年01月24日 11点01分
只能单独。。。[不高兴],你怎么查出来的
2015年01月24日 14点01分
level 10
wsbdzcyh 楼主
请查m.blog.csdn.net/blog/yicao821/[email protected] 唉,回个帖也要出错?
2015年01月27日 07点01分 31
好像有3天不能回帖子了
2015年01月27日 07点01分
level 1
小米1 怎么弄呢 他是菜单键+音量减键
2015年01月27日 08点01分 32
level 10
wsbdzcyh 楼主
116改139,114改115
2015年01月27日 15点01分 33
level 6
7108无效,截屏方法,home键电源键同时按。按上述方法改了键值后无效。用input keyevent KEYCODE_HOME 可返回主页, 用input keyevent KEYCODE_POWER 可模拟电源键锁屏,但不知怎么双键组合
求出手相助!
2015年01月29日 03点01分 35
1 2 尾页