Here's a quick guide on how to enable App Ops in 4.4.2 / KOT49H. Decompile Settings.apk, open the Settings.smali and make these changes. Now if you want to keep ART working, don't deodex and just use the classes.dex that already included in the apk.
1.
Change to - +1
2.
Add this - What's marked in red should be 1 less than what you changed in the previous step (Or the previous number before adding 1)
EDIT: Here's how to add it to Settings/Security
Added this to values/strings.xml
Add this to xml/security_settings_misc.xml under the device admin title
1.
Code:
.method static constructor <clinit>()V
.locals 3
.prologue
const/4 v2, 0x0
.line 126
sput-boolean v2, Lcom/android/settings/Settings;->sShowNoHomeNotice:Z
.line 309
const/16 v0, 0x2[COLOR="Red"]c[/COLOR]
new-array v0, v0, [Ljava/lang/String;
Change to - +1
Code:
.method static constructor <clinit>()V
.locals 3
.prologue
const/4 v2, 0x0
.line 126
sput-boolean v2, Lcom/android/settings/Settings;->sShowNoHomeNotice:Z
.line 309
const/16 v0, 0x2[COLOR="red"]d[/COLOR]
new-array v0, v0, [Ljava/lang/String;
2.
Code:
const/16 v1, 0x2b
const-class v2, Lcom/android/settings/inputmethod/KeyboardLayoutPickerFragment;
invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v2
aput-object v2, v0, v1
sput-object v0, Lcom/android/settings/Settings;->ENTRY_FRAGMENTS:[Ljava/lang/String;
Add this - What's marked in red should be 1 less than what you changed in the previous step (Or the previous number before adding 1)
Code:
const/16 v1, 0x2b
const-class v2, Lcom/android/settings/inputmethod/KeyboardLayoutPickerFragment;
invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v2
aput-object v2, v0, v1
[B][COLOR="green"]const/16 v1, 0x[COLOR="red"]2c[/COLOR]
const-class v2, Lcom/android/settings/applications/AppOpsSummary;
invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v2
aput-object v2, v0, v1[/COLOR][/B]
sput-object v0, Lcom/android/settings/Settings;->ENTRY_FRAGMENTS:[Ljava/lang/String;
EDIT: Here's how to add it to Settings/Security
Added this to values/strings.xml
Code:
<string name="app_ops_settings_summary">Manage app permissions</string>
Add this to xml/security_settings_misc.xml under the device admin title
Code:
<Preference android:title="@string/app_ops_settings" android:key="app_ops_summary" android:summary="@string/app_ops_settings_summary" android:fragment="com.android.settings.applications.AppOpsSummary" />
Last edited: