-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I4fdc6d10c1b8b4ad5465d105704655875ae63035
- Loading branch information
1 parent
7a54674
commit c963d51
Showing
26 changed files
with
314 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
plugins { | ||
alias(libs.plugins.androidLibrary) | ||
} | ||
|
||
android { | ||
namespace = "com.xayah.hiddenapi" | ||
compileSdk = 34 | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
dependencies { | ||
annotationProcessor(libs.refine.annotation.processor) | ||
compileOnly(libs.refine.annotation) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
51 changes: 51 additions & 0 deletions
51
dex/hiddenapi/src/main/java/android/app/AppOpsManagerHidden.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package android.app; | ||
|
||
import java.util.List; | ||
|
||
import dev.rikka.tools.refine.RefineAs; | ||
|
||
/** | ||
* @see <a href="https://cs.android.com/android/platform/superproject/+/android-7.0.0_r1:frameworks/base/core/java/android/app/AppOpsManager.java">AppOpsManager.java</a> | ||
*/ | ||
@RefineAs(AppOpsManager.class) | ||
public class AppOpsManagerHidden { | ||
public static final int MODE_IGNORED = 1; | ||
public static final int OP_NONE = -1; | ||
public static final int _NUM_OP = 64; | ||
|
||
public List<PackageOps> getOpsForPackage(int uid, String packageName, int[] ops) { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public static int permissionToOpCode(String permission) { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public void setMode(int code, int uid, String packageName, int mode) { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public static class PackageOps { | ||
public String getPackageName() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public int getUid() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public List<OpEntry> getOps() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
} | ||
|
||
public static class OpEntry { | ||
public int getOp() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public int getMode() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ dependencyResolutionManagement { | |
|
||
rootProject.name = "Script Dex" | ||
include(":app") | ||
include(":hiddenapi") |
This file contains 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
This file contains 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
50 changes: 50 additions & 0 deletions
50
source/core/hiddenapi/src/main/java/android/app/AppOpsManagerHidden.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package android.app; | ||
|
||
import java.util.List; | ||
|
||
import dev.rikka.tools.refine.RefineAs; | ||
|
||
/** | ||
* @see <a href="https://cs.android.com/android/platform/superproject/+/android-7.0.0_r1:frameworks/base/core/java/android/app/AppOpsManager.java">AppOpsManager.java</a> | ||
*/ | ||
@RefineAs(AppOpsManager.class) | ||
public class AppOpsManagerHidden { | ||
public static final int OP_NONE = -1; | ||
public static final int _NUM_OP = 64; | ||
|
||
public List<PackageOps> getOpsForPackage(int uid, String packageName, int[] ops) { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public static int permissionToOpCode(String permission) { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public void setMode(int code, int uid, String packageName, int mode) { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public static class PackageOps { | ||
public String getPackageName() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public int getUid() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public List<OpEntry> getOps() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
} | ||
|
||
public static class OpEntry { | ||
public int getOp() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
|
||
public int getMode() { | ||
throw new RuntimeException("Stub!"); | ||
} | ||
} | ||
} |
This file contains 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
2 changes: 2 additions & 0 deletions
2
source/core/model/src/main/aidl/com/xayah/core/model/database/PackagePermission.aidl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package com.xayah.core.model.database; | ||
parcelable PackagePermission; |
Oops, something went wrong.