Skip to content

Commit be4ca7d

Browse files
committed
Update Readme.md
Update library version in graddle Fixed typo in EPermissionType
1 parent 95578d1 commit be4ca7d

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

CriticalPermissionsHelper/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
ext {
55
PUBLISH_GROUP_ID = 'com.zebra.criticalpermissionshelper'
66
PUBLISH_ARTIFACT_ID = 'criticalpermissionshelper'
7-
PUBLISH_VERSION = '0.2'
7+
PUBLISH_VERSION = '0.6'
88
}
99

1010
android {
@@ -13,8 +13,8 @@ android {
1313
defaultConfig {
1414
minSdkVersion 30
1515
targetSdkVersion 32
16-
versionCode 5
17-
versionName "0.5"
16+
versionCode 6
17+
versionName "0.6"
1818

1919
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2020

CriticalPermissionsHelper/src/main/java/com/zebra/criticalpermissionshelper/EPermissionType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public enum EPermissionType
1010
MANAGE_EXTERNAL_STORAGE( "android.permission.MANAGE_EXTERNAL_STORAGE"),
1111
BIND_NOTIFICATION_LISTENER( "android.permission.BIND_NOTIFICATION_LISTENER"),
1212
READ_LOGS( "android.permission.READ_LOGS"),
13-
ALL_DANGEROUS( "ALL_DANGEROUS_PERMISSIONS");
13+
ALL_DANGEROUS_PERMISSIONS( "ALL_DANGEROUS_PERMISSIONS");
1414

1515
String stringContent = "";
1616
EPermissionType(String stringContent)

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Forget about AccessMgr, StageNow, EMDK, certificates, application signature... c
66

77
Just grant some critical permissions on your Zebra device in one method call (see at the end of this document).
88

9-
Includes: ACCESS_NOTIFICATIONS, PACKAGE_USAGE_STATS, SYSTEM_ALERT_WINDOW, BATTERY_STATS, MANAGE_EXTERNAL_STORAGE, GET_APP_OPS_STATS
9+
Includes: ACCESS_NOTIFICATIONS, PACKAGE_USAGE_STATS, SYSTEM_ALERT_WINDOW, BATTERY_STATS, MANAGE_EXTERNAL_STORAGE, GET_APP_OPS_STATS, ALL_DANGEROUS_PERMISSIONS
1010

1111
Have fun with Zebra's devices :)
1212

@@ -37,6 +37,11 @@ Controls permission to access battery statistics for the device.
3737
3838
#6. Manage External Storage:
3939
Controls management of USB and/or SD card storage media attached to the device.
40+
41+
#7. All Dangerous Permissions
42+
Grants all permissions that requires runtime permission model
43+
To know which permissions are listed as Dangerous, execute the following ADB command:
44+
adb shell pm list permissions -g -d
4045
```
4146

4247
This wrapper will use the EMDK with MX's AccessMgr feature to grant, deny or verify (WIP) critical permissions.
@@ -60,6 +65,15 @@ The EMDK permission is compulsary, the others are depending on your needs.
6065
tools:ignore="ProtectedPermissions" />
6166
<uses-permission android:name="android.permission.GET_APP_OPS_STATS"
6267
tools:ignore="ProtectedPermissions" />
68+
69+
<!-- Or any dangerous permission, for example: -->
70+
<uses-permission android:name="permission:android.permission.ACCESS_FINE_LOCATION"
71+
tools:ignore="ProtectedPermissions" />
72+
<uses-permission android:name="permission:android.permission.BLUETOOTH_CONNECT"
73+
tools:ignore="ProtectedPermissions" />
74+
<uses-permission android:name=" permission:android.permission.BLUETOOTH_SCAN"
75+
tools:ignore="ProtectedPermissions" />
76+
6377
```
6478

6579
Sample AdroidManifest.xml:
@@ -83,6 +97,12 @@ Sample AdroidManifest.xml:
8397
tools:ignore="ProtectedPermissions" />
8498
<uses-permission android:name="android.permission.GET_APP_OPS_STATS"
8599
tools:ignore="ProtectedPermissions" />
100+
<uses-permission android:name="permission:android.permission.ACCESS_FINE_LOCATION"
101+
tools:ignore="ProtectedPermissions" />
102+
<uses-permission android:name="permission:android.permission.BLUETOOTH_CONNECT"
103+
tools:ignore="ProtectedPermissions" />
104+
<uses-permission android:name=" permission:android.permission.BLUETOOTH_SCAN"
105+
tools:ignore="ProtectedPermissions" />
86106

87107
<application
88108
android:allowBackup="true"
@@ -165,6 +185,7 @@ EPermissionType.SYSTEM_ALERT_WINDOW
165185
EPermissionType.GET_APP_OPS_STATS
166186
EPermissionType.BATTERY_STATS
167187
EPermissionType.MANAGE_EXTERNAL_STORAGE
188+
EPermissionType.ALL_DANGEROUS_PERMISSIONS
168189
```
169190

170191
Snippet code to grant a permission:

0 commit comments

Comments
 (0)