File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ paths in wsl follow the same as windows after /mnt/ its just the drive letter th
6161Set executable permission for the scripts
6262
6363```
64- cd..
64+ cd ..
6565sudo chmod +x extract_gapps_pico.sh
6666sudo chmod +x extend_and_mount_images.sh
6767sudo 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```
8893sudo ./extract_gapps_pico.sh
8994sudo ./extend_and_mount_images.sh
Original file line number Diff line number Diff line change @@ -71,4 +71,14 @@ find $InstallDir/etc/default-permissions -type f -exec chcon --reference=$Instal
7171find $InstallDir /etc/preferred-apps -type f -exec chcon --reference=$InstallDir /etc/fs_config_dirs {} \;
7272find $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 !!"
You can’t perform that action at this time.
0 commit comments