Skip to content

Commit

Permalink
Merge pull request #7 from ChickenHook/feature/use_api_33
Browse files Browse the repository at this point in the history
added some logging
  • Loading branch information
SarotecK authored Oct 28, 2022
2 parents 8ff615a + 27d4fd8 commit b6b00da
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 11 deletions.
7 changes: 4 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 33
buildToolsVersion "33.0.0"
ndkVersion "22.1.7171670"

defaultConfig {
applicationId "org.chickenhook.restrictionbypass.app"
minSdkVersion 19
targetSdkVersion 30
targetSdkVersion 33
versionCode 1
versionName "1.0"

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
18 changes: 11 additions & 7 deletions restrictionbypass/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
group = 'com.github.ChickenHook'
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"

compileSdkVersion 33
buildToolsVersion "33.0.0"
ndkVersion "22.1.7171670"
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
defaultConfig {
minSdkVersion 19
targetSdkVersion 31
targetSdkVersion 33
versionCode 1
versionName "1.0"

Expand Down Expand Up @@ -42,9 +46,9 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.chickenhook.restrictionbypass;

import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;

import org.junit.Before;
import org.chickenhook.restrictionbypass.*;
import org.junit.Test;

public class UnsealTest {

@Test
public void doUnseal() throws Exception {
Unseal.unseal();
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.chickenhook.restrictionbypass;

import android.os.Build;
import android.system.Os;
import android.util.Log;

import java.lang.reflect.Method;

public class Unseal {
Expand All @@ -25,5 +29,8 @@ public static void unseal() throws Exception {
args[0] = list;
setHiddenApiExemptions.invoke(vmRuntime, args);
// setHiddenApiExemptions
if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Log.i("Unseal", "Successfully unsealed process <" + Os.getpid() + ">");
}
}
}

0 comments on commit b6b00da

Please sign in to comment.