-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgamepad.sh
More file actions
57 lines (45 loc) · 1.16 KB
/
gamepad.sh
File metadata and controls
57 lines (45 loc) · 1.16 KB
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
#!/usr/bin/bash
a="services:
redroid:
image: cnflysky/redroid-rk3588:lineage-20
container_name: redroid
restart: no
privileged: true
ports:
- \"5555:5555\"
volumes:
- \"~/redroid-data:/data\""
b=""
c=" command:
- \"androidboot.redroid_width=1080\"
- \"androidboot.redroid_height=1920\"
# - \"androidboot.redroid_magisk=1\"
# - \"androidboot.redroid_fake_wifi=1\"
# see https://source.android.com/docs/setup/create/new-device PRODUCT_CHARACTERISTICS
- \"ro.build.characteristics=default\""
for device in $(ls /dev/input/event*)
do
if udevadm info -q path -n $device > /dev/null 2>&1
then echo ok
else
sudo rm -rf $device
sudo rm -rf /dev/input/js0
fi
done
for device in $(ls /dev/input/event*)
do
if (udevadm info -q path -n $device | grep 045E:0B13) > /dev/null 2>&1
then b=${b}" - ${device}"$'\n'
fi
done
for device in $(ls /dev/input/event*)
do
if (udevadm info -q path -n $device | grep 3537:1041) > /dev/null 2>&1
then b=${b}" - ${device}"$'\n'
fi
done
echo "$b"
all="$a"$'\n'"$b"$'\n'"$c"
echo "$all" > docker-compose.yml
docker rm redroid
docker compose up -d