-
Notifications
You must be signed in to change notification settings - Fork 1
/
01perms
40 lines (32 loc) · 875 Bytes
/
01perms
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
#!/system/bin/sh
# Permission script
# Written by Roman (birgertime)
# www.edtdev.com
# Output the script name for easier run-parts debugging
echo Now running $0
mkdir -p /data/logs
chmod 777 /data/logs
logFile=/data/logs/perms.log
if [ -f "$logFile" ]; then
rm "$logFile"
fi
touch "$logFile"
chmod 777 "$logFile"
echo "Setting permissions" >> "$logFile"
chmod 0771 /data/app/
# standard permissions
for file in /system/app/* /system/framework/* /data/app/*; do
echo " setting permissions (644) for $file" >> "$logFile"
chmod 0644 "$file"
done
# init.d and /system/xbin
echo " chmodding init.d and xbin" >> "$logFile"
chmod 0755 /system/etc/init.d
for file in /system/etc/init.d/* /system/xbin/*; do
chmod 0755 "$file"
done
# su
echo " chmodding su" >> "$logFile"
chmod 06755 /system/bin/su
chmod 06755 /system/xbin/su
echo "Permissions set" >> "$logFile"