Skip to content

Commit 7c9e222

Browse files
ADB GUI
1 parent 605f136 commit 7c9e222

File tree

4 files changed

+32
-28
lines changed

4 files changed

+32
-28
lines changed

Projects/ScrCpyGUI/ADB_GUI.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
import tkinter as tk
3+
import json, os
4+
5+
root = tk.Tk()
6+
ip = '192.168.0.103'
7+
8+
root.geometry("200x300")
9+
num_list = tk.Listbox(root, height=15, width=30)
10+
11+
def fun():
12+
key = num_list.get(num_list.curselection()[0])
13+
key = key.split(' : ')[0]
14+
os.system(f'adb -s {ip} shell input keyevent {key}')
15+
16+
with open('keyevents.json') as f:
17+
data = json.load(f)
18+
19+
for i in data['key_events']:
20+
j = data['key_events'][i]
21+
22+
k = j.split('adb shell input keyevent ')
23+
num_list.insert(k[1], f'{k[1]} : {i.split("key_")[1]}')
24+
25+
frame = tk.Frame(root)
26+
frame.pack(pady = 10)
27+
28+
num_list.pack()
29+
get_num_btn = tk.Button(frame, text="ADB", command=fun)
30+
31+
get_num_btn.pack()
32+
root.mainloop()

Projects/ScrCpyGUI/test.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

Projects/Screen/static/ADB_GUI.png

391 KB
Loading

0 commit comments

Comments
 (0)