Вы можете включить Wi-Fi другим способом. Запустите действие настроек и перейдите в «настройки беспроводной сети и сети» и включите его.
Следующий код запускает настройку:
# sets a variable with the package's internal name
package = 'com.android.settings'
# sets a variable with the name of an Activity in the package
activity = 'com.android.settings.Settings'
# sets the name of the component to start
runComponent = package + '/' + activity
setting = 'com.android.settings.Settings'
print("")
print("")
print("Start the Activity...")
# Runs the component
device.startActivity(component=runComponent)
После этого с помощью события нажатия используйте 'DOWN' и 'ENTER' KeyCode, и вы можете включить Wi-Fi ... !!!