Skip to content

Commit

Permalink
v7
Browse files Browse the repository at this point in the history
add system.prop
fix app crash when debug
  • Loading branch information
TimothyZhang023 committed Dec 3, 2018
1 parent a4b8c1d commit 65347b5
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ MiPushFramework with value map below
* `ro.product.brand` -> `Xiaomi`
* `ro.product.name` -> `Xiaomi`

also we add some prop inspired by [MiPushFake](https://github.com/Magisk-Modules-Repo/MiPushFake)


2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ android {

task zip(type: Exec) {
workingDir '..'
commandLine 'sh', 'build.sh', project.name, 'v6'
commandLine 'sh', 'build.sh', project.name, 'v7'
}
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ function copy_files {

cp $MODULE_NAME/template_override/config.sh $TMP_DIR_MAGISK
cp $MODULE_NAME/template_override/module.prop $TMP_DIR_MAGISK
cp -r $MODULE_NAME/template_override/common $TMP_DIR_MAGISK
}
2 changes: 1 addition & 1 deletion jni/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ __attribute__((visibility("default"))) int nativeForkAndSpecializePost(JNIEnv *e
if (env) {
LOGI("inject android.os.Build for %s ", package_name);

jclass build_class = env->FindClass("android.os.Build");
jclass build_class = env->FindClass("android/os/Build");
jfieldID brand_id = env->GetStaticFieldID(build_class, "BRAND", "Ljava/lang/String;");
jfieldID manufacturer_id = env->GetStaticFieldID(build_class, "MANUFACTURER", "Ljava/lang/String;");
jfieldID product_id = env->GetStaticFieldID(build_class, "PRODUCT", "Ljava/lang/String;");
Expand Down
11 changes: 11 additions & 0 deletions template_override/common/service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/system/bin/sh
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/...
# This will make your scripts compatible even if Magisk change its mount point in the future
MODDIR=${0%/*}

# This script will be executed in late_start service mode
# More info in the main Magisk thread
resetprop -n ro.miui.ui.version.name V9
resetprop -n ro.miui.ui.version.code 7
resetprop -n ro.miui.version.code_time 1505408400
resetprop -n ro.miui.internal.storage /sdcard/
7 changes: 7 additions & 0 deletions template_override/common/system.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file will be read by resetprop
# Example: Change dpi
# ro.sf.lcd_density=320
ro.miui.ui.version.name=V9
ro.miui.ui.version.code=7
ro.miui.version.code_time=1505408400
ro.miui.internal.storage=/sdcard/
6 changes: 3 additions & 3 deletions template_override/module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=mipush_fake
name=Riru - MiPushFakeModule
version=v6
versionCode=6
version=v7
versionCode=7
author=Timothy
description=Fake as XiaoMI device by hook system_property_get. Require Riru - Core installed.
minMagisk=1500
minMagisk=17000
6 changes: 3 additions & 3 deletions template_override/riru_module.prop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Riru - MiPushFakeModule
version=v6
versionCode=6
version=v7
versionCode=7
author=Timothy
description=Fake as XiaoMI device by hook system_property_get. Require Riru - Core installed.
description=Fake as XiaoMI device by hook system_property_get. Require Riru-Core v9+ installed.

0 comments on commit 65347b5

Please sign in to comment.