Skip to content

Commit 0ede3b8

Browse files
authored
Merge branch 'main' into main
2 parents fd1b9f1 + be67d80 commit 0ede3b8

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ paths in wsl follow the same as windows after /mnt/ its just the drive letter th
6161
Set executable permission for the scripts
6262

6363
```
64-
cd..
64+
cd ..
6565
sudo chmod +x extract_gapps_pico.sh
6666
sudo chmod +x extend_and_mount_images.sh
6767
sudo chmod +x apply.sh
@@ -84,6 +84,11 @@ replace the root variable with the output of pwd up until and including the WSAG
8484

8585
### Run the scripts
8686

87+
**Debian WSL users need to create an mtab symlink:**
88+
```
89+
sudo ln -s /proc/self/mounts /etc/mtab
90+
```
91+
8792
```
8893
sudo ./extract_gapps_pico.sh
8994
sudo ./extend_and_mount_images.sh

apply.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,14 @@ find $InstallDir/etc/default-permissions -type f -exec chcon --reference=$Instal
7171
find $InstallDir/etc/preferred-apps -type f -exec chcon --reference=$InstallDir/etc/fs_config_dirs {} \;
7272
find $InstallDir/etc/sysconfig -type f -exec chcon --reference=$InstallDir/etc/fs_config_dirs {} \;
7373

74-
echo "!! Apply completed !!"
74+
echo "Applying SELinux policy"
75+
# Sed will remove the SELinux policy for plat_sepolicy.cil, preserve policy using cp
76+
cp $InstallDir/etc/selinux/plat_sepolicy.cil $InstallDir/etc/selinux/plat_sepolicy_new.cil
77+
sed -i 's/(allow gmscore_app self (process (ptrace)))/(allow gmscore_app self (process (ptrace)))\n(allow gmscore_app self (vsock_socket (read write create connect)))\n(allow gmscore_app device_config_runtime_native_boot_prop (file (read)))/g' $InstallDir/etc/selinux/plat_sepolicy_new.cil
78+
cp $InstallDir/etc/selinux/plat_sepolicy_new.cil $InstallDir/etc/selinux/plat_sepolicy.cil
79+
rm $InstallDir/etc/selinux/plat_sepolicy_new.cil
80+
81+
# Prevent android from using cached SELinux policy
82+
echo '0000000000000000000000000000000000000000000000000000000000000000' > $InstallDir/etc/selinux/plat_sepolicy_and_mapping.sha256
83+
84+
echo "!! Apply completed !!"

0 commit comments

Comments
 (0)