less than 1 minute read

Preview

Swiping, swiping, swiping. From dusk till dawn.

iOS

Sniffing without network_security_config.xml

extension XCUIApplication {
    func openNotifications() {
        let up = self.coordinate(withNormalizedOffset: CGVector(dx: 0.1, dy: 0.001))
        let down = self.coordinate(withNormalizedOffset: CGVector(dx: 0.1, dy: 0.8))
        up.press(forDuration: 0.1, thenDragTo: down)
    }
}

Sniffing without network_security_config.xml

extension XCUIApplication {
    func openControlCenter() {
        let down = self.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.999))
        let up = self.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.2))
        down.press(forDuration: 0.1, thenDragTo: up)
    }
}

Android

Sniffing without network_security_config.xml

fun openNotifications() {
    val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
    device.executeShellCommand("input swipe 0 0 0 500")
}

Sniffing without network_security_config.xml

fun openLaunchPad() {
    val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
    device.executeShellCommand("input swipe 0 500 0 0")
}

Updated: