drop ashmem from UNINSTALL.sh

This commit is contained in:
Rahammetoela Toekiman 2024-10-02 09:19:52 -03:00 committed by GitHub
parent f4c14929c9
commit 0a0f26e4a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 10 deletions

View File

@ -1,11 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# First use dkms to remove the modules: # First use dkms to remove the modules:
sudo dkms remove anbox-ashmem/1
sudo dkms remove anbox-binder/1 sudo dkms remove anbox-binder/1
# Then remove the module sources from /usr/src/: # Then remove the module sources from /usr/src/:
sudo rm -rf /usr/src/anbox-ashmem-1
sudo rm -rf /usr/src/anbox-binder-1 sudo rm -rf /usr/src/anbox-binder-1
# Finally remove the configuration files: # Finally remove the configuration files:
@ -14,11 +12,6 @@ sudo rm -f /lib/udev/rules.d/99-anbox.rules
# Verify remove by trying to load the modules and checking the created devices: # Verify remove by trying to load the modules and checking the created devices:
failed_checks=0 failed_checks=0
if sudo modprobe ashmem_linux > /dev/null 2>&1; then
failed_checks=1
else
failed_checks=0
fi
if sudo modprobe binder_linux > /dev/null 2>&1; then if sudo modprobe binder_linux > /dev/null 2>&1; then
failed_checks=1 failed_checks=1
@ -26,13 +19,13 @@ else
failed_checks=0 failed_checks=0
fi fi
if lsmod | grep -e ashmem_linux -e binder_linux > /dev/null 2>&1; then if lsmod | grep -e -e binder_linux > /dev/null 2>&1; then
failed_checks=1 failed_checks=1
else else
failed_checks=0 failed_checks=0
fi fi
if ls -alh /dev/binder /dev/ashmem > /dev/null 2>&1; then if ls -alh /dev/binder > /dev/null 2>&1; then
failed_checks=1 failed_checks=1
else else
failed_checks=0 failed_checks=0
@ -42,4 +35,4 @@ if [ $failed_checks == 1 ]; then
echo "Please restart your device and rerun this script to verify changes" echo "Please restart your device and rerun this script to verify changes"
else else
echo "Modules not installed" echo "Modules not installed"
fi fi