tweaselORG / appstraction

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

Function to get platform version #129

Closed baltpeter closed 5 months ago

baltpeter commented 7 months ago

We need this for https://github.com/tweaselORG/cyanoacrylate/issues/39.

baltpeter commented 7 months ago

On Android:

❯ adb shell getprop ro.build.version.release
13
❯ adb shell getprop ro.build.version.sdk
33
baltpeter commented 7 months ago

For iOS:

❯ pymobiledevice3 usbmux list --no-color
[
    {
        "BuildVersion": "20A362",
        "ConnectionType": "USB",
        "DeviceClass": "iPhone",
        "DeviceName": "Vanessa\u2019s iPhone (2)",
        "Identifier": "c3c9c7245a7ca2b8a6bb9db3c8d98b25dc476795",
        "ProductType": "iPhone10,3",
        "ProductVersion": "16.0"
    }
]
baltpeter commented 7 months ago

While I'm at it, I'll extend this with support for a few more device attributes and expose them through getDeviceAttribute().