anbox-modules/UNINSTALL.sh
2026-04-20 06:29:36 +02:00

43 lines
940 B
Bash
Executable File

#!/usr/bin/env bash
# First use dkms to remove the module:
sudo dkms remove anbox-binder/1
# Then remove the module sources from /usr/src/:
sudo rm -rf /usr/src/anbox-binder-1
# Finally remove the configuration files:
sudo rm -f /etc/modules-load.d/anbox.conf
sudo rm -f /lib/udev/rules.d/99-anbox.rules
#Remove symlinks
sudo rm /dev/binder
sudo rm /dev/hwbinder
sudo rm /dev/vndbinder
# Verify remove by trying to load the modules and checking the created devices:
failed_checks=0
if sudo modprobe binder_linux > /dev/null 2>&1; then
failed_checks=1
else
failed_checks=0
fi
if lsmod | grep -e binder_linux > /dev/null 2>&1; then
failed_checks=1
else
failed_checks=0
fi
if ls -alh /dev/binder > /dev/null 2>&1; then
failed_checks=1
else
failed_checks=0
fi
if [ $failed_checks == 1 ]; then
echo "Please restart your device and rerun this script to verify changes"
else
echo "Modules not installed"
fi