tweaselORG / appstraction

An abstraction layer for common instrumentation functions (e.g. installing and starting apps, setting preferences, etc.) on Android and iOS.
MIT License
4 stars 1 forks source link

Function to turn airplane mode on/off #28

Open baltpeter opened 1 year ago

baltpeter commented 1 year ago

Not sure whether we actually want this but since I found this Frida function to set the airplane mode on Android, I wanted to document it:

function setAirplaneMode(mode) {
    var p = ObjC.classes.RadiosPreferences.alloc().init();
    p.setAirplaneMode_(mode)
    p.synchronize()
    p.release();
}

mode can be true or false.

baltpeter commented 1 year ago

To toggle just the WiFi connection on iOS (same source):

function setWifiMode(mode) {
    var wfc = ObjC.classes.WFClient.sharedInstance();
    wfc.setPowered_(mode);
}