Hi there,
I understand from the warnings when going to this block, and from the online documentation that this isn't guaranteed to work but I've had mixed results with it that I can't explain.
This block was working almost perfectly on my Pixel Fold 9 Pro Fold, not using any workarounds such as privileged service or legacy apps. I did have a flow stop on an error realted to the Wi-Fi hotspot set state block, unfortunately I can't remember the error as I cleared the log but I assume at the time it could be related to trying to set the hotspot to on, when it was already on and vise versa. So I added a state check beforehand and I believe it started working again.
However, it has started to error out again with "java.lang.IllegalStateException: Unknown error", which seems to be after my phone updated to Android 16 yesterday.
I've tried the privileged workaround (using wireless ADB) and legacy extension workaround but no luck.
I guess nothing can be done considering all the warnings and documentation? Perhaps this is just a heads up to those on Pixel phones that this might stop working after Android 16.
Is there a privileged shell command for WiFi hotspot like there is for the WiFi state?