mirror of
https://github.com/tommytran732/Linux-Setup-Scripts
synced 2024-11-09 11:41:33 -05:00
Fixed some issues with DKMS, added SELinux policies
This commit is contained in:
parent
9b346da8f8
commit
ec050ca765
26
install.sh
26
install.sh
@ -201,16 +201,29 @@ sudo openssl req -new -x509 \
|
|||||||
-outform DER -out /root/mok.priv \
|
-outform DER -out /root/mok.priv \
|
||||||
-nodes -days 36500 -subj "/CN=DKMS Automatic Module Signer"
|
-nodes -days 36500 -subj "/CN=DKMS Automatic Module Signer"
|
||||||
|
|
||||||
sudo bash -c 'cat > /etc/dkms/anbox-ashmem.conf' <<-'EOF'
|
sudo sed -i 's^# sign_tool="/etc/dkms/sign_helper.sh"^sign_tool="/etc/dkms/sign_helper.sh"^g' /etc/dkms/framework.conf
|
||||||
sign_tool="/etc/dkms/sign_helper.sh"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sudo cp /etc/dkms/anbox-ashmem.conf /etc/dkms/anbox-binder.conf
|
|
||||||
sudo chmod 644 /etc/dkms/anbox-*
|
|
||||||
|
|
||||||
|
output "It's gonna fail to load in the kernel modules here... and that's okay. We haven't imported the MOK yet :)"
|
||||||
sudo dkms install anbox-ashmem/1
|
sudo dkms install anbox-ashmem/1
|
||||||
sudo dkms install anbox-binder/1
|
sudo dkms install anbox-binder/1
|
||||||
|
|
||||||
|
#Add SELinux Policies for anbox
|
||||||
|
wget https://raw.githubusercontent.com/tommytran732/Fedora-Workstation-Setup/main/selinux/my-gatekeeperd.te
|
||||||
|
wget https://raw.githubusercontent.com/tommytran732/Fedora-Workstation-Setup/main/selinux/my-ndroidsettings.te
|
||||||
|
wget https://raw.githubusercontent.com/tommytran732/Fedora-Workstation-Setup/main/selinux/my-servicemanager.te
|
||||||
|
|
||||||
|
checkmodule -M -m -o my-gatekeeperd.mod my-gatekeeperd.te
|
||||||
|
checkmodule -M -m -o my-ndroidsettings.mod my-ndroidsettings.te
|
||||||
|
checkmodule -M -m -o my-servicemanager.mod my-servicemanager.te
|
||||||
|
|
||||||
|
semodule_package -o my-gatekeeperd.pp -m my-gatekeeperd.mod
|
||||||
|
semodule_package -o my-ndroidsettings.pp -m my-ndroidsettings.mod
|
||||||
|
semodule_package -o my-servicemanager -m my-servicemanager.mod
|
||||||
|
|
||||||
|
sudo semodule -i my-gatekeeperd.pp
|
||||||
|
sudo semodule -i my-ndroidsettings.pp
|
||||||
|
sudo semodule -i my-servicemanager.pp
|
||||||
|
|
||||||
#Setup BTRFS layout and Timeshift
|
#Setup BTRFS layout and Timeshift
|
||||||
sudo mkdir /btrfs_pool
|
sudo mkdir /btrfs_pool
|
||||||
sudo mount -o subvolid=5 /dev/mapper/${PARTITIONID} /btrfs_pool
|
sudo mount -o subvolid=5 /dev/mapper/${PARTITIONID} /btrfs_pool
|
||||||
@ -241,3 +254,4 @@ output "Just to avoid confusion, we are importing Akmods's key"
|
|||||||
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
|
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
|
||||||
output "Now we import DKMS's key"
|
output "Now we import DKMS's key"
|
||||||
sudo mokutil --import /root/mok.der
|
sudo mokutil --import /root/mok.der
|
||||||
|
output "All done! You have to reboot now."
|
||||||
|
Loading…
Reference in New Issue
Block a user