Skip to content

Instantly share code, notes, and snippets.

View TinfoilSubmarine's full-sized avatar

Joel Beckmeyer TinfoilSubmarine

View GitHub Profile
@mikedawson
mikedawson / UnhiddenSoftApConfigurationBuilder.kt
Created July 6, 2023 13:41
Android 13+ LocalOnlyHotspot custom config
/**
* Reflection workaround to access hidden SoftApConfiguration.Builder so it can be used to set
* LocalOnlyHotspot on Android 13+
*
* LocalOnlyHotspotConfig is generated here by Android:
* https://cs.android.com/android/platform/superproject/+/refs/heads/master:packages/modules/Wifi/service/java/com/android/server/wifi/WifiApConfigStore.java;drc=7bb4243a97d53af6cbd4de21bcc61556a758898b;l=423
*/
@RequiresApi(30)
class UnhiddenSoftApConfigurationBuilder {