Skip to content

Commit 24ec49e

Browse files
authored
Fix v21 permissions (#26)
1 parent 1673f18 commit 24ec49e

File tree

6 files changed

+19
-7
lines changed

6 files changed

+19
-7
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ If you're only interested in using the app, you can grab the [latest release](ht
2121
```bash
2222
./installAndGrantPermission.sh
2323
```
24+
### Android 5.x
25+
26+
Because of old `adb` limitations, if you want to install the app in devices running Android 5.x, you must run two commands separately:
27+
28+
```bash
29+
adb install -t -r proxy-toggle.apk
30+
adb shell pm grant com.kinandcarta.create.proxytoggle android.permission.WRITE_SECURE_SETTINGS
31+
```
2432

2533
## Project setup
2634

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ apply from: rootProject.file("jacoco.gradle")
1010

1111
def versionMajor = 1
1212
def versionMinor = 0
13-
def versionPatch = 0
13+
def versionPatch = 1
1414

1515
android {
16-
compileSdkVersion 29
17-
buildToolsVersion "30.0.0"
16+
compileSdkVersion 30
17+
buildToolsVersion "30.0.3"
1818

1919
defaultConfig {
2020
applicationId "com.kinandcarta.create.proxytoggle"
2121
versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch
2222
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
2323

2424
minSdkVersion 21
25-
targetSdkVersion 29
25+
targetSdkVersion 30
2626

2727
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2828
}

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
android:name="android.permission.WRITE_SECURE_SETTINGS"
88
tools:ignore="ProtectedPermissions" />
99

10+
<uses-permission
11+
android:name="android.permission.WRITE_SETTINGS"
12+
tools:ignore="ProtectedPermissions" />
13+
1014
<application
1115
android:name=".App"
1216
android:allowBackup="true"

buildSrc/src/main/kotlin/Versions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object Versions {
2222

2323
const val androidx_hilt: String = "1.0.0-alpha01"
2424

25-
const val com_android_tools_build_gradle: String = "4.2.0-alpha02"
25+
const val com_android_tools_build_gradle: String = "4.2.0-beta04"
2626

2727
const val androidx_test_ext_junit: String = "1.1.1"
2828

@@ -65,7 +65,7 @@ object Versions {
6565
* See issue 19: How to update Gradle itself?
6666
* https://github.com/jmfayard/buildSrcVersions/issues/19
6767
*/
68-
const val gradleLatestVersion: String = "6.5.1"
68+
const val gradleLatestVersion: String = "6.7.1"
6969
}
7070

7171
/**

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-rc-1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip

proxy-toggle.apk

31.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)