Magisk安装模块以达到adb远控
一定只能是Magsik,只有它能挂载系统文件
Magisk安装模块以达到adb远控
adb远控用到的Magsik插件
我自己(借助AI)写的
- adb-tcp
- frpc 不放心可以自己换里面的二进制文件 网上开源的模块
- SSH for Magisk
- vim for Android: http://bnsmb.de/files/public/Android/vim_9.1.zip
推荐收藏大佬的网站:http://bnsmb.de/
可能会出现的问题: 手机静置一段时间后, adb连接不上, 但ssh, frp能连接上. 本地或远程SSH连上后, 依次执行:
1
stop adbd
1
start adbd
即可恢复.
adb shell 与 ssh shell 区别
它们大部分功能重叠. 但adb shell能调用Magisk远程安装模块, 能执行截屏并回传到控制端 , ssh shell却不行. ssh shell唯一的优势就是稳
ZereTermux快捷脚本
手机用的app是ZeroTermux 用的快捷脚本是
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?xml version="1.0" encoding="utf-8"?>
<zt-menu>
<group name="快捷键">
<item tag="shell"
name="重置连接"
autoRunShell="true"
click="ztShell:adb disconnect &&clear" />
<item tag="shell"
name="接入本地"
autoRunShell="true"
click="ztShell:adb connect 192.168.6.10:5555" />
<item tag="shell"
name="回退"
autoRunShell="true"
click="ztShell:exit" />
<item tag="shell"
name="su"
autoRunShell="true"
click="ztShell:su" />
<item tag="shell"
name="杀死当前"
autoRunShell="true"
click="ztShell:adb shell "su -c 'pkg=\$(dumpsys activity activities 2>/dev/null | grep -E \"ResumedActivity|topRunningActivity\" | head -1 | grep -o \"[a-zA-Z0-9._:]*\" || dumpsys window windows 2>/dev/null | grep -E \"mCurrentFocus|mFocusedApp\" | head -1 | grep -o \"[a-zA-Z0-9._:]*\"); [[ -n \"\$pkg\" ]] && kill -9 \$(pidof \$pkg 2>/dev/null)'"" />
<item tag="shell"
name="音量↑"
autoRunShell="true"
click="ztShell:adb shell input keyevent 24" />
<item tag="shell"
name="音量↓"
autoRunShell="true"
click="ztShell:adb shell input keyevent 25" />
<item tag="shell"
name="电源"
autoRunShell="true"
click="ztShell:adb shell input keyevent 26" />
<item tag="shell"
name="息屏"
autoRunShell="true"
click="ztShell:adb shell input keyevent 6" />
<item tag="shell"
name="截屏"
autoRunShell="true"
click="ztShell:adb exec-out screencap -p > /sdcard/download/screenshot.png" />
<item tag="shell"
name="查看截屏"
icon=""
activityTitle="本次截屏"
click="appWebUrl:file:///sdcard/download/screenshot.png" />
<item tag="shell"
name="解锁"
autoRunShell="true"
click="ztShell:adb shell input keyevent 26&&adb shell input keyevent 66&&adb shell input text '123123'" />
<item tag="shell"
name="杀死抖音"
autoRunShell="true"
click="ztShell:adb shell su -c 'killall com.ss.android.ugc.aweme'" />
<item tag="shell"
name="杀死哔哩"
autoRunShell="true"
click="ztShell:adb shell su -c 'killall tv.danmaku.bili'" />
<item tag="shell"
name="杀死微信"
autoRunShell="true"
click="ztShell:adb shell su -c 'killall com.tencent.mm'" />
<item tag="shell"
name="杀死QQ"
autoRunShell="true"
click="ztShell:adb shell su -c 'killall com.tencent.mobileqq'" />
<item tag="shell"
name="重启"
autoRunShell="true"
click="ztShell:adb shell reboot" />
<item tag="shell"
name="关机"
autoRunShell="true"
click="ztShell:adb shell su -c 'reboot -p'" />
<item tag="自定义左侧栏"
name="修改快捷"
icon="imgPath:/data/data/com.termux/files/home/ZtInfo/edit_menu.png"
click="ztEditText:/data/data/com.termux/files/home/ZtInfo/main_menu_path.xml" />
</group>
<group name="常用功能">
<item tag="ZT设置"
click="java:com.termux.zerocore.config.mainmenu.config.ZTSettingsClickConfig" />
</group>
</zt-menu>
更新版本
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?xml version="1.0" encoding="utf-8"?>
<zt-menu>
<group name="针对当前直接adb">
<item tag="shell"
name="杀死当前"
autoRunShell="true"
click="ztShell:adb shell "su -c 'pkg=\$(dumpsys activity activities 2>/dev/null | grep -E \"ResumedActivity|topRunningActivity\" | head -1 | grep -o \"[a-zA-Z0-9._:]*\" || dumpsys window windows 2>/dev/null | grep -E \"mCurrentFocus|mFocusedApp\" | head -1 | grep -o \"[a-zA-Z0-9._:]*\"); [[ -n \"\$pkg\" ]] && kill -9 \$(pidof \$pkg 2>/dev/null)'""
/>
<item tag="shell"
name="禁用当前"
autoRunShell="true"
click="ztShell:adb shell 'su -c "pkg=\$(dumpsys activity activities 2>/dev/null | grep -E \"ResumedActivity|topRunningActivity\" | head -1 | grep -oE \"[a-zA-Z0-9._-]+/[a-zA-Z0-9._\$-]+\" | cut -d\"/\" -f1 || dumpsys window windows 2>/dev/null | grep -E \"mCurrentFocus|mFocusedApp\" | head -1 | grep -oE \"[a-zA-Z0-9._-]+/[a-zA-Z0-9._\$-]+\" | cut -d\"/\" -f1); [[ -n \"\$pkg\" ]] && pm disable-user --user 0 \"\$pkg\""'" />
</group>
<group name="shell选择">
<item tag="shell"
name="重置连接"
autoRunShell="true"
click="ztShell:adb disconnect &&clear" />
<item tag="shell"
name="接入本地"
autoRunShell="true"
click="ztShell:adb connect 192.168.6.10:5555" />
<item tag="shell"
name="接入远程"
autoRunShell="true"
click="ztShell:adb connect 24.233.1.203:35555" />
</group>
<group name="进入shell">
<item tag="shell"
name="进入shell"
autoRunShell="true"
click="ztShell:adb shell" />
<item tag="shell"
name="su"
autoRunShell="true"
click="ztShell:su" />
<item tag="shell"
name="回退"
autoRunShell="true"
click="ztShell:exit" />
</group>
<group name="截屏相关">
<item tag="shell"
name="截屏"
autoRunShell="true"
click="ztShell:adb exec-out screencap -p > /sdcard/download/screenshot.png" />
<item tag="shell"
name="查看截屏"
icon=""
activityTitle="本次截屏"
click="appWebUrl:file:///sdcard/download/screenshot.png" />
</group>
<group name="查看基本信息">
<item tag="shell"
name="查看当前包名"
autoRunShell="true"
click="ztShell:dumpsys activity activities |grep -E ResumedActivity" />
<item tag="shell"
name="查看IP"
autoRunShell="true"
click="ztShell:ip -4 addr show wlan0 | awk '/inet / {print $2}' | cut -d'/' -f1" />
</group>
<group name="针对常用app-shell">
<item tag="shell"
name="杀死抖音"
autoRunShell="true"
click="ztShell:killall com.ss.android.ugc.aweme" />
<item tag="shell"
name="杀死哔哩"
autoRunShell="true"
click="ztShell:killall tv.danmaku.bili" />
<item tag="shell"
name="杀死微信"
autoRunShell="true"
click="ztShell:killall com.tencent.mm" />
<item tag="shell"
name="杀死QQ"
autoRunShell="true"
click="ztShell:killall com.tencent.mobileqq" />
</group>
<group name="音量操作-shell">
<item tag="shell"
name="音量↑"
autoRunShell="true"
click="ztShell:input keyevent 24" />
<item tag="shell"
name="音量↓"
autoRunShell="true"
click="ztShell:input keyevent 25" />
</group>
<group name="电源操作-shell">
<item tag="shell"
name="电源"
autoRunShell="true"
click="ztShell:input keyevent 26" />
<item tag="shell"
name="息屏"
autoRunShell="true"
click="ztShell:input keyevent 6" />
<item tag="shell"
name="解锁"
autoRunShell="true"
click="ztShell:input keyevent 26&& input keyevent 66&&input text '123123'" />
<item tag="shell"
name="重启"
autoRunShell="true"
click="ztShell:reboot" />
<item tag="shell"
name="关机"
autoRunShell="true"
click="ztShell:reboot" />
<item tag="自定义左侧栏"
name="修改快捷"
icon="imgPath:/data/data/com.termux/files/home/ZtInfo/edit_menu.png"
click="ztEditText:/data/data/com.termux/files/home/ZtInfo/main_menu_path.xml" />
<!--dialog
属性只能对于 click 为 ztShell 生效
dialogConfirm 为 false 则不提示
-->
</group>
<group name="常用功能">
<item tag="ZT设置"
click="java:com.termux.zerocore.config.mainmenu.config.ZTSettingsClickConfig" />
</group>
</zt-menu>
本文由作者按照 CC BY 4.0 进行授权