Skip to content

Commit

Permalink
use pm enable/disable on com.android.bluetooth to avoid crashes
Browse files Browse the repository at this point in the history
suggested by Jon West <electrikjesus@gmail.com>
  • Loading branch information
Kethen committed Feb 2, 2024
1 parent 6f3f36e commit 275f3ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions post_sleep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ fi
# stop services if requested
if $RESTART_BT
then
pm disable com.android.bluetooth
sleep 0.5
setprop ctl.stop btlinux-1.1
setprop ctl.stop vendor.bluetooth-1-1
fi
Expand Down Expand Up @@ -112,6 +114,8 @@ then
setprop ctl.start vendor.bluetooth-1-1
;;
esac
sleep 0.5
pm enable com.android.bluetooth
fi

# allow user defined actions
Expand Down
2 changes: 2 additions & 0 deletions ueventd.x86.rc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
/sys/devices/pci*/0000:00:*/usb*/*/*/*/bluetooth/hci0/rfkill* state 0660 bluetooth bluetooth
/sys/devices/pci*/0000:00:*/usb*/*/*/*/bluetooth/hci0/rfkill* type 0440 bluetooth bluetooth
/dev/rfkill 0660 bluetooth wifi
# btlinux uses this path instead
/sys/class/rfkill/*/state 0660 bluetooth wifi
/dev/uhid 0660 bluetooth bluetooth
/dev/bus/usb/00*/00* 0660 bluetooth bluetooth

Expand Down

0 comments on commit 275f3ab

Please sign in to comment.