Skip to main content

rdomschk notes

Directly from the forum:

https://forum.sailfishos.org/t/potential-bluetooth-support-in-the-android-app-support-aas/9686/206

I’m a fan of ShellEx and Sudo. So I create in ShellEx two command blocks into one command. Of course, I modified the AAS file /opt/appsupport/etc/appsupport.conf.d/10-hybris.conf beforehand. I found out, this change can even remain permanent, because we can disable/enable the BT package from AAS.

Now my way of working:

  1. Stop the AppSupport and open with root@tIDE editor follow file and add one line (in my case line 50 in SFOS 5.0.0.67)

   /opt/appsupport/etc/appsupport.conf.d/10-hybris.conf 
   Proxies=android.hardware.camera.provider@2.4::ICameraProvider/legacy/0
   #Add this line below line 49
   Proxies=android.hardware.bluetooth@1.1::IBluetoothHci,android.hardware.bluetooth@1.0::IBluetoothHci/default
  1. Start the AppSupport

  2. Than create follow commands in ShellEx or in Situations!

Name 1: “BT AppSupport On”


   sudo systemctl stop bluetooth
   sudo systemctl stop bluebinder
   sudo systemctl start appsupport@defaultuser
   sudo appsupport-attach pm enable com.android.bluetooth

Name 2: “BT AppSupport Off”


   sudo appsupport-attach pm disable com.android.bluetooth
   sudo systemctl stop appsupport@defaultuser
   sudo systemctl start bluebinder
   sudo systemctl start appsupport@defaultuser
   sudo systemctl restart bluetooth
  1. Open Android settings and go to the second menu “Bluetooth” and see the BT devices

  2. On X10III it needs time and I had to give the BT a name first time (e.g. Xperia10III). If the phone not found any BT devices under AAS its help to connect the phone form another phone via BT one time. On X10 it was not a problem but the X10III need this procedure.

  3. With the Command “BT AppSupport Off” you can bring back your Phone to normal BT under SFOS.
    Don’t be surprised. The first command block runs quite quickly, provided AAS is already running. The second block takes a while because AAS has to be stopped and started. So, the gyroscope in ShellEx is normal, and only at the end does a restart of the BT complete everything.

Only as additional information - to sudo settings:

  1. Install Sudo: devel-su + Password ; pkcon install sudo
  2. Create a file “my-personal-settings” under /etc/sudoers.d/
  3. Fill the file with follow lines:

   defaultuser ALL = (ALL) NOPASSWD: ALL
   defaultuser ALL = NOPASSWD: /usr/bin/dbus-send
   defaultuser ALL = NOPASSWD: /usr/bin/systemctl
   defaultuser ALL = NOPASSWD: /usr/bin/killall
   defaultuser ALL = NOPASSWD: /usr/bin/kill

In Situations you can also bring the command blocks and it’s possible to create only one Situation because you can run the commands at start and stop from this Situation. So now enough text. :slight_smile:

 

Postscript:

Hello - I had also trouble with the 2. part back to normal bluebinder service. The solution was to start AAS after start bluebinder and restart Bluetooth as last command. So you win time because the start from AAS and the bluebinder service is on if you start Bluetooth. You can also add the resart command on the end from your procedure.
With situations work this also good. I tested it for some minutes…