Created
December 2, 2015 08:56
-
-
Save RussellCollins/87e447183103fe6ca8b1 to your computer and use it in GitHub Desktop.
Set write and read external storage permission prior to a test run so that a screenshot on fail listener can work on device targets running Android 6.0+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SDK=`adb shell getprop ro.build.version.sdk | tr -d '\r'` | |
echo "Device SDK level is: " $SDK | |
if (( "$SDK" >= 23 )) ; then | |
echo "Enabling read and write external storage permissions before running tests on Android 6.0+" | |
adb shell pm grant com.replace.with.your.app.package android.permission.WRITE_EXTERNAL_STORAGE | |
adb shell pm grant com.replace.with.your.app.package android.permission.READ_EXTERNAL_STORAGE | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mit is kell hozzá szólni?