-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacrodroid-init.txt
70 lines (51 loc) · 1.56 KB
/
macrodroid-init.txt
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
touch /system/etc/init/macrodroid.rc
chmod 644 /system/etc/init/macrodroid.rc
service macrodroid /system/bin/macrodroid
class core
user root
group root
seclabel u:r:su:s0
touch /system/bin/macrodroid
chmod 755 /system/bin/macrodroid
chcon u:r:su:s0 /system/bin/macrodroid
chown root:shell /system/bin/macrodroid
#!/system/bin/sh
cd /data/data/com.arlosoft.macrodroid/files/bin/
./macrodroid.sh
touch /data/data/com.arlosoft.macrodroid/files/bin/macrodroid.sh
chmod 755 /data/data/com.arlosoft.macrodroid/files/bin/macrodroid.sh
cat /data/data/com.arlosoft.macrodroid/files/bin/macrodroid.sh
#!/system/bin/sh
if pidof "com.android.systemui" > /dev/null && pidof "com.arlosoft.macrodroid" > /dev/null
then
setprop ctl.stop macrodroid
else
am start-foreground-service com.arlosoft.macrodroid/.MacroDroidService
fi
maybe use this
#!/system/bin/sh
for i in {1..100}
do
if pidof "com.android.systemui" > /dev/null && pidof "com.arlosoft.macrodroid" > /dev/null
then
setprop ctl.stop macrodroid
else
am start-foreground-service com.arlosoft.macrodroid/.MacroDroidService
fi
done
nohup ./macrodroid.sh &>/dev/null &
setsid ./macrodroid.sh &>/dev/null &
or this
#!/system/bin/sh
for i in {1..100}
do
if pidof "com.android.systemui" > /dev/null && pidof "com.arlosoft.macrodroid" > /dev/null
then
setprop ctl.stop macrodroid
else
am start-foreground-service com.arlosoft.macrodroid/.MacroDroidService
fi
sleep 1
done
nohup ./macrodroid.sh &>/dev/null &
setsid ./macrodroid.sh &>/dev/null &