crankshaft icon indicating copy to clipboard operation
crankshaft copied to clipboard

shutdown script will not trigger in AA

Open snailcatcher opened this issue 5 years ago • 1 comments

  • What phone do you have? Google Pixel 1

  • What OS version? Android 10

  • What crankshaft version? latest (NG Alpha-5.1 2019-08-08)

  • Steps to reproduce the bug, if you're planning to report a bug. Please indicate whether the bug is always repoducible. Setup the shutdown script to any GPIO port (in my case GPIO 19). If I test it in Crankshaft everything works fine and the system is shutting down as expected. If I try the same thing inside Android Auto nothing happens.

This is my first issue for this project and so i want to say thank you for all stuff which was already build. The project is very cool. Keep it up!

snailcatcher avatar Sep 29 '19 19:09 snailcatcher

I've ran into the same issue, and it looks like this is the intended behaviour, which is understandable but undocumented as far as I can find.

After your set ignition delay passes, Crankshaft will check if there is a device connected by USB or Bluetooth and if there is, reset the countdown.

I have overwritten the Bluetooth rule by modifying system files:

$ crankshaft system unlock # allows to edit system files
$ sudo nano /opt/crankshaft/service_gpiotrigger.sh

Line 49 is what you're looking for, you can comment out the if statement or delete part of the expression, like the Bluetooth check in my case. Don't forget to comment out the else part too if you're removing the whole if

myfrom avatar Feb 17 '23 21:02 myfrom