Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
shatyuka committed Mar 9, 2024
1 parent 63f72bf commit 262b577
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "app/src/main/cpp/external/Dobby"]
path = app/src/main/cpp/external/Dobby
url = git@github.com:jmpews/Dobby.git
url = git@github.com:LSPosed/Dobby.git
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ apply plugin: 'com.android.application'

android {
namespace 'com.shatyuka.zhiliao'
compileSdk 33
buildToolsVersion '33.0.2'
compileSdk 34
defaultConfig {
applicationId "com.shatyuka.zhiliao"
minSdkVersion 26
targetSdkVersion 33
targetSdkVersion 34
ndkVersion "25.2.9519653"
versionCode appVerCode.toInteger()
versionName appVerName
Expand Down Expand Up @@ -79,6 +78,7 @@ android {
packagingOptions {
jniLibs {
excludes += ['META-INF/**', 'kotlin/**', 'google/**']
useLegacyPackaging false
}
resources {
excludes += ['META-INF/**', 'kotlin/**', 'google/**', '**.bin']
Expand Down
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:extractNativeLibs="false"
android:multiArch="true">

<meta-data
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/cpp/external/Dobby
Submodule Dobby updated 517 files
10 changes: 6 additions & 4 deletions app/src/main/cpp/zhiliao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ FILE *fake_fopen(const char *filename, const char *mode) {
return result;
}

#define PAGE_ALIGN(address, page_size) ((address) & (-(page_size)))

extern "C"
JNIEXPORT void JNICALL
Java_com_shatyuka_zhiliao_MainHook_initNative(JNIEnv *env, jobject) {
auto pagesize = sysconf(_SC_PAGE_SIZE);
auto addr = ((uintptr_t)fopen) & (-pagesize);
mprotect((void*)addr, pagesize, PROT_READ | PROT_WRITE | PROT_EXEC);
DobbyHook((void*)fopen, (void*)fake_fopen, (void**)&orig_fopen);
const auto page_size = sysconf(_SC_PAGE_SIZE);
const auto aligned = PAGE_ALIGN((uintptr_t)fopen, page_size);
mprotect((void*)aligned, page_size, PROT_READ | PROT_WRITE | PROT_EXEC);
DobbyHook((void*)fopen, (dobby_dummy_func_t)fake_fopen, (dobby_dummy_func_t*)&orig_fopen);
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ android.enableAppCompileTimeRClass=true
android.enableR8.fullMode=true
android.experimental.enableNewResourceShrinker=true
android.experimental.enableNewResourceShrinker.preciseShrinking=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Mar 14 23:38:36 CST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 262b577

Please sign in to comment.