Skip to content

vaimalaviya1233/greentooth

 
 

Repository files navigation

Fork of Nicklas Bergman's Greentooth to attempt disabling Bluetooth with Shizuku (i.e. with the shell user)

Marginally more useful on Huawei devices, where their regarded changes to Android EMUI HarmonyOS result in you being always being asked to confirm disabling Bluetooth when doing so via external tools, which kinda limits the usefulness of tools such as Greentooth. However, it turns out svc bluetooth disable in an ADB shell bypasses the prompt.

Naturally, Shizuku must be running in the background for this to work.


Greentooth

PLEASE NOTE THAT THIS APP IS NO LONGER MAINTAINED AND MAY NOT WORK ON NEWER ANDROID VERSIONS

This app disables Bluetooth automatically when the last Bluetooth device has been disconnected.

Get it on F-Droid

Bluetooth can cause unnecessary battery drain and is a potential security risk if it is always turned on. Security experts recommend switching Bluetooth off when you're not using it. However, manually disabling Bluetooth when you're done listening to music or talking in your headset is annoying and easy to forget.

Greentooth can help you save battery and mitigate the security risks of Bluetooth by automatically turning Bluetooth off when it is no longer needed. When the last Bluetooth device has disconnected Greentooth will wait for an adjustable amount of time in order to not disturb any connection/reconnection attempts and then deactivate Bluetooth.

Please note that Greentooth only runs upon device disconnection, it does not do periodical checks for idle Bluetooth.

Frequently Asked Questions

Could you make a similar app but for Wi-Fi?

Several people have suggested an app that works like Greentooth but for Wi-Fi, but unfortunately, it's not possible due to technical reasons.

Google doesn't want developers running their apps in the background so they changed the rules with later Android versions to make it more difficult. Some exceptions were left for things like Bluetooth, which is why Greentooth is able to work like it does. However, any app that checks for Wi-Fi usage in a similar way would have to be running all the time in the foreground. Obviously this is contraproductive to the whole battery saving aspect. It would also have to constantly show an annoying notification to let the user know it's running.

For these reasons I won't be making an app to turn off Wi-Fi, at least not unless Google makes it possible to do it well.

Greentooth isn't working, what should I do?

  1. Make sure that the app is enabled and that a reasonable delay is set.
  2. Make sure that your Bluetooth device is actually disconnecting when you think it is and that there are no other Bluetooth devices left connected to your phone or tablet.
  3. Your phone might be preventing Greentooth from launching when a Bluetooth device disconnect is detected. Try whitelisting the app/adding it to the "protected" list in your battery saver settings. Make sure it is allowed to launch from the background. You can find guides on how to do this for many vendors at https://dontkillmyapp.com/.

I have a Huawei device and the app keeps asking for permission to turn off Bluetooth. What should I do?

This is an issue with Huawei's own Android customization EMUI and it affects all Bluetooth automation apps, see issue 6. Unfortunately, there doesn't seem to be a way around it at this time.

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%