-
Notifications
You must be signed in to change notification settings - Fork 12
/
prep-media.sh
55 lines (46 loc) · 1.02 KB
/
prep-media.sh
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
#!/sbin/sh
# Reset all, except media folder
# rm -rf $(ls * | grep -v media)
rm -rf *;
# Create all
mkdir media;
mkdir misc;
mkdir misc_ce;
mkdir misc_de;
mkdir vendor;
#mkdir vendor_ce;
#mkdir vendor_de;
mkdir user;
mkdir user_de;
#mkdir user_ce;
mkdir system;
mkdir system_ce;
mkdir system_de;
# Change permission
chown media_rw:media_rw media;
chown system:system vendor;
#chown system:system vendor_ce;
#chown system:system vendor_de;
chown system:system user;
chown system:system user_de;
#chown system:system user_ce;
chown system:system system;
chown system:system system_ce;
chown system:system system_de;
chown system:misc misc;
chown system:misc misc_ce;
chown system:misc misc_de;
# Create 0 subdir
mkdir /data/media/0;
mkdir /data/media/ob;
mkdir /data/system_de/0;
mkdir /data/system_ce/0;
mkdir /data/misc_de/0;
mkdir /data/misc_ce/0;
mkdir /data/user_de/0;
#mkdir /data/user_ce/0;
#mkdir /data/data
cd media
chown media_rw:media_rw 0;
chown media_rw:media_rw ob;
exit 0;