├── .idea
├── .name
├── .gitignore
├── compiler.xml
├── migrations.xml
├── misc.xml
├── deploymentTargetSelector.xml
└── gradle.xml
├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── assets
│ │ │ ├── xposed_init
│ │ │ └── agreement.txt
│ │ ├── res
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_no.png
│ │ │ │ ├── ic_qqun.png
│ │ │ │ ├── ic_yes.png
│ │ │ │ ├── ic_github.png
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── values
│ │ │ │ ├── array.xml
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── themes.xml
│ │ │ ├── drawable
│ │ │ │ ├── ripple.xml
│ │ │ │ ├── btn_ripple.xml
│ │ │ │ ├── button.xml
│ │ │ │ ├── bg_red_solid.xml
│ │ │ │ ├── bg_blue_solid.xml
│ │ │ │ ├── rounded_button.xml
│ │ │ │ ├── bg_edit_solid.xml
│ │ │ │ ├── ic_launcher_foreground.xml
│ │ │ │ └── ic_launcher_background.xml
│ │ │ ├── values-night
│ │ │ │ └── themes.xml
│ │ │ ├── mipmap-anydpi
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── xml
│ │ │ │ ├── backup_rules.xml
│ │ │ │ └── data_extraction_rules.xml
│ │ │ └── layout
│ │ │ │ └── activity_main.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── log
│ │ │ │ └── yh
│ │ │ │ ├── Utils
│ │ │ │ ├── Init.java
│ │ │ │ ├── Sp.java
│ │ │ │ └── Update.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── Hook.java
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── log
│ │ │ └── yh
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── log
│ │ └── yh
│ │ └── ExampleInstrumentedTest.java
├── release
│ └── output-metadata.json
├── proguard-rules.pro
└── build.gradle
├── gradle
├── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
└── libs.versions.toml
├── .gitignore
├── README.md
├── settings.gradle
├── gradle.properties
├── gradlew.bat
└── gradlew
/.idea/.name:
--------------------------------------------------------------------------------
1 | Simian
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/src/main/assets/xposed_init:
--------------------------------------------------------------------------------
1 | com.log.yh.Hook
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_no.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xxhdpi/ic_no.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_qqun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xxhdpi/ic_qqun.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_yes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xxhdpi/ic_yes.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xxhdpi/ic_github.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/assets/agreement.txt:
--------------------------------------------------------------------------------
1 | 该APP仅作为交流学习和研究使用请于24小时内删除使用本项目所产生的任何后果由使用者自行承担在使用本项目之前,请确保您已充分了解相关法律法规,并确保您的行为符合所在国家或地区的法律要求。
2 | 对于该APP产生的一切后果,使用者责任自负
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/z2010643575/Simian/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/array.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - com.fenbi.android.leo
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ripple.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Simian
3 | 模式一
4 | 模式二
5 | 模式三
6 | 上传
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/btn_ripple.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FF000000
4 | #FFFFFFFF
5 | #ff323b42
6 | #1E88E5
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Oct 12 11:08:08 CST 2024
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/.idea/migrations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_red_solid.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_blue_solid.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/rounded_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/log/yh/Utils/Init.java:
--------------------------------------------------------------------------------
1 | package com.log.yh.Utils;
2 |
3 |
4 | public class Init {
5 | private ClassLoader mClassLoader;
6 | public void setClassloader(ClassLoader mClassLoader){
7 | this.mClassLoader=mClassLoader;
8 | }
9 | public ClassLoader getClassloader() throws Throwable {
10 | if (mClassLoader==null){
11 | throw new Exception();
12 | }
13 | return mClassLoader;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/test/java/com/log/yh/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.log.yh;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 猿猴模块
2 |
3 | >本项目仅供学习和研究使用请于24小时内删除。使用本项目所产生的任何后果由使用者自行承担。在使用本项目之前,请确保您已充分了解相关法律法规,并确保您的行为符合所在国家或地区的法律要求。未经授权的情况下,请勿将本项目用于商业用途或其他非法用途。转载使用请标明出处。
4 |
5 | 小猿口算模块
6 |
7 | 支持版本:3.93.4
8 |
9 | ## v1.0
10 |
11 | 1.答案全部更换为"."
12 |
13 | 2.快速回答
14 |
15 | ## v1.1
16 |
17 | 模式更新
18 |
19 | 模式一:自定义答案(题数不变)
20 |
21 | 模式二:自定义答案(只有一道题)
22 |
23 | ## v1.2
24 |
25 | 1.重写UI
26 |
27 | 2.模式二支持自定义题目
28 |
29 | 3.添加了远程更新(感谢扰提供的服务器)
30 |
31 | ## v1.3
32 |
33 | 1.支持口算练习自定义答案
34 |
35 | QQ交流群:994173459
36 |
37 | 提示:模块失效的请吧Xposed Api调用保护关闭
38 | 修改答案和模式需要重新启动小猿口算APP
39 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | google {
4 | content {
5 | includeGroupByRegex("com\\.android.*")
6 | includeGroupByRegex("com\\.google.*")
7 | includeGroupByRegex("androidx.*")
8 | }
9 | }
10 | mavenCentral()
11 | gradlePluginPortal()
12 | }
13 | }
14 | dependencyResolutionManagement {
15 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
16 | repositories {
17 | google()
18 | mavenCentral()
19 | maven { url('https://api.xposed.info/') }
20 | }
21 | }
22 |
23 | rootProject.name = "Simian"
24 | include ':app'
25 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetSelector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "com.log.yh",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 1,
15 | "versionName": "1.3",
16 | "outputFile": "app-release.apk"
17 | }
18 | ],
19 | "elementType": "File",
20 | "baselineProfiles": [
21 | {
22 | "minApi": 28,
23 | "maxApi": 30,
24 | "baselineProfiles": [
25 | "baselineProfiles/1/app-release.dm"
26 | ]
27 | },
28 | {
29 | "minApi": 31,
30 | "maxApi": 2147483647,
31 | "baselineProfiles": [
32 | "baselineProfiles/0/app-release.dm"
33 | ]
34 | }
35 | ],
36 | "minSdkVersionForDexing": 28
37 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/log/yh/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.log.yh;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 | assertEquals("com.log.yh", appContext.getPackageName());
25 | }
26 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
23 | -keep class com.log.yh.Hook
24 | -keepclassmembers class com.log.yh.MainActivity{
25 | private boolean isModuleActive();
26 | }
27 |
--------------------------------------------------------------------------------
/gradle/libs.versions.toml:
--------------------------------------------------------------------------------
1 | [versions]
2 | agp = "8.6.0"
3 | junit = "4.13.2"
4 | junitVersion = "1.1.5"
5 | espressoCore = "3.5.1"
6 | appcompat = "1.6.1"
7 | material = "1.10.0"
8 | activity = "1.8.0"
9 | constraintlayout = "2.1.4"
10 |
11 | [libraries]
12 | junit = { group = "junit", name = "junit", version.ref = "junit" }
13 | ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
14 | espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
15 | appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
16 | material = { group = "com.google.android.material", name = "material", version.ref = "material" }
17 | activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
18 | constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
19 |
20 | [plugins]
21 | android-application = { id = "com.android.application", version.ref = "agp" }
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_edit_solid.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
8 |
13 |
14 |
15 | -
16 |
17 |
-
18 |
19 |
20 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.android.application)
3 | }
4 |
5 | android {
6 | namespace 'com.log.yh'
7 | compileSdk 34
8 |
9 | defaultConfig {
10 | applicationId "com.log.yh"
11 | minSdk 28
12 | targetSdk 34
13 | versionCode 1
14 | versionName "1.3"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled true
22 | zipAlignEnabled true
23 | shrinkResources true
24 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 | compileOptions {
28 | sourceCompatibility JavaVersion.VERSION_17
29 | targetCompatibility JavaVersion.VERSION_17
30 | }
31 | buildFeatures {
32 | buildConfig = true
33 | }
34 | }
35 |
36 | dependencies {
37 |
38 | implementation libs.appcompat
39 | implementation libs.material
40 | implementation libs.activity
41 | implementation libs.constraintlayout
42 | testImplementation libs.junit
43 | androidTestImplementation libs.ext.junit
44 | androidTestImplementation libs.espresso.core
45 | compileOnly 'de.robv.android.xposed:api:82'
46 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. For more details, visit
12 | # https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Enables namespacing of each library's R class so that its R class includes only the
19 | # resources declared in the library itself and none from the library's dependencies,
20 | # thereby reducing the size of the R class for that library
21 | android.nonTransitiveRClass=true
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
31 |
34 |
37 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/log/yh/Utils/Sp.java:
--------------------------------------------------------------------------------
1 | package com.log.yh.Utils;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 |
6 | import de.robv.android.xposed.XSharedPreferences;
7 |
8 | public class Sp {
9 | private static final String Config = "Config";
10 | private static SharedPreferences preferences;
11 | private static SharedPreferences.Editor editor;
12 | private static XSharedPreferences xSharedPreferences;
13 |
14 | public static void SP_init(Context mcontext) {
15 | preferences = mcontext.getSharedPreferences(Config, Context.MODE_WORLD_READABLE);
16 | editor = preferences.edit();
17 | }
18 |
19 | public static void XSp_init() {
20 | xSharedPreferences = new XSharedPreferences("com.log.yh", Config);
21 | }
22 |
23 | public static void putString(String key, String value) {
24 | editor.putString(key, value);
25 | editor.apply();
26 | }
27 |
28 | public static void putInt(String key, Integer value) {
29 | editor.putInt(key, value);
30 | editor.apply();
31 | }
32 | public static void putBoolen(String key, Boolean value){
33 | editor.putBoolean(key, value);
34 | editor.apply();
35 | }
36 | public static String getString(String key) {
37 | String str=null;
38 | if (key.equals("title")){
39 | str=preferences.getString(key, "Log=\\square");
40 | }else if (key.equals("answer")) {
41 | str = preferences.getString(key, "1");
42 | }else if (key.equals("practice_answer")){
43 | str=preferences.getString(key,"1");
44 | }else {
45 | str= preferences.getString(key, "");
46 | }
47 | return str;
48 | }
49 |
50 | public static Integer getInt(String key) {
51 | return preferences.getInt(key, 0);
52 | }
53 | public static Boolean getBoolean(String key){
54 | return preferences.getBoolean(key, false);
55 | }
56 | public static String Hook_getString(String key) {
57 | String str=null;
58 | if (key.equals("title")){
59 | str=xSharedPreferences.getString(key, "Log=\\square");
60 | }else if (key.equals("answer")) {
61 | str = xSharedPreferences.getString(key, "1");
62 | }else if (key.equals("practice_answer")){
63 | str=xSharedPreferences.getString(key,"1");
64 | }else {
65 | str= xSharedPreferences.getString(key, "");
66 | }
67 | return str;
68 | }
69 |
70 | public static int Hook_getInt(String key) {
71 | return xSharedPreferences.getInt(key, 0);
72 | }
73 | public static Boolean Hook_getBoolean(String key){
74 | return xSharedPreferences.getBoolean(key, false);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/app/src/main/java/com/log/yh/Utils/Update.java:
--------------------------------------------------------------------------------
1 | package com.log.yh.Utils;
2 |
3 | import android.content.Context;
4 | import android.content.DialogInterface;
5 | import android.content.Intent;
6 | import android.net.Uri;
7 | import android.os.Handler;
8 |
9 | import androidx.appcompat.app.AlertDialog;
10 |
11 | import com.google.android.material.dialog.MaterialAlertDialogBuilder;
12 |
13 | import org.json.JSONObject;
14 |
15 | import java.io.BufferedReader;
16 | import java.io.InputStreamReader;
17 | import java.net.HttpURLConnection;
18 | import java.net.MalformedURLException;
19 | import java.net.URL;
20 |
21 | /**
22 | * Created by Log husy on 2024/10/19.
23 | *
24 | * @link https://github.com/Log08
25 | * @Gdescription:
26 | * 更新
27 | */
28 | public class Update {
29 | public static String message;
30 | private static String version="1.3";
31 | private static Handler handler=new Handler();
32 | public static void Updated_version(Context context){
33 | new Thread(()->{
34 | try {
35 | URL url=new URL("http链接");
36 | HttpURLConnection connection=(HttpURLConnection) url.openConnection();
37 | connection.setRequestMethod("GET");
38 | connection.setRequestProperty("Accept", "*/*");
39 | connection.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.0");
40 | connection.setRequestProperty("Content-Language", "en-US");
41 | connection.setRequestProperty("Accept-Language","zh-CN");
42 | connection.setRequestProperty("Content-type","text/html");
43 | connection.connect();
44 | InputStreamReader ir = new InputStreamReader(connection.getInputStream());
45 | BufferedReader br = new BufferedReader(ir);
46 | StringBuffer buffer=new StringBuffer();
47 | String line;
48 | while ((line = br.readLine()) != null) {
49 | buffer.append(line);
50 | }
51 | br.close();
52 | ir.close();
53 | connection.disconnect();
54 | JSONObject json=new JSONObject(buffer.toString());
55 | boolean isMandatory=json.getBoolean("Mandatory_updates")? false:true;
56 | String json_version=json.getString("version");
57 | String Update_http=json.getString("Update_http");
58 | message=json.getString("message");
59 | if (version.equals(json_version)) {
60 | return;
61 | }
62 | handler.post(()->{
63 | AlertDialog builder=new MaterialAlertDialogBuilder(context).setTitle("有新版本需要更新").setMessage(message).setCancelable(isMandatory).setPositiveButton("前往更新",null).create();
64 | builder.show();
65 | builder.getButton(DialogInterface.BUTTON_POSITIVE).setOnClickListener((view -> {
66 | Intent intent=new Intent();
67 | intent.setData(Uri.parse(Update_http));
68 | context.startActivity(intent);
69 | }));
70 | });
71 | } catch (Exception e) {
72 | throw new RuntimeException(e);
73 | }
74 | }).start();
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/app/src/main/java/com/log/yh/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.log.yh;
2 |
3 |
4 | import android.annotation.SuppressLint;
5 | import android.content.Intent;
6 | import android.content.res.AssetManager;
7 | import android.net.Uri;
8 | import android.os.Bundle;
9 | import android.view.View;
10 | import android.widget.Button;
11 | import android.widget.ImageView;
12 | import android.widget.LinearLayout;
13 | import android.widget.RadioButton;
14 | import android.widget.RadioGroup;
15 | import android.widget.Switch;
16 | import android.widget.TextView;
17 | import android.widget.Toast;
18 |
19 | import androidx.appcompat.app.AppCompatActivity;
20 | import androidx.constraintlayout.utils.widget.ImageFilterView;
21 |
22 | import com.google.android.material.dialog.MaterialAlertDialogBuilder;
23 | import com.google.android.material.textfield.TextInputEditText;
24 | import com.log.yh.Utils.Sp;
25 | import com.log.yh.Utils.Update;
26 |
27 | import java.io.InputStream;
28 |
29 | public class MainActivity extends AppCompatActivity {
30 | ImageFilterView github_dump;
31 | LinearLayout layout_activation, answer_layout, mode_layout, title_layout,main_layout,vip_layout;
32 | RadioGroup mode_group;
33 | RadioButton mode_first, mode_second, mode_third;
34 | ImageView StatusIcon,qqqun_image;
35 | TextView activation_title, activation_meesage,title_text;
36 | TextInputEditText edit_title, edit_answer,practice_answers;
37 | Button upload_button;
38 | Switch vip_switch;
39 |
40 |
41 | @SuppressLint("NonConstantResourceId")
42 | @Override
43 | protected void onCreate(Bundle savedInstanceState) {
44 | super.onCreate(savedInstanceState);
45 | setContentView(R.layout.activity_main);
46 | Update.Updated_version(this);
47 | initview();
48 | }
49 |
50 | private void initview() {
51 | github_dump = (ImageFilterView) findViewById(R.id.github_dump);
52 | main_layout=(LinearLayout) findViewById(R.id.main_layout);
53 | layout_activation = (LinearLayout) findViewById(R.id.layout_activation);
54 | answer_layout = (LinearLayout) findViewById(R.id.answer_layout);
55 | mode_layout = (LinearLayout) findViewById(R.id.mode_layout);
56 | title_layout = (LinearLayout) findViewById(R.id.title_layout);
57 | vip_layout=(LinearLayout) findViewById(R.id.vip_layout);
58 | mode_group = (RadioGroup) findViewById(R.id.mode_group);
59 | mode_first = (RadioButton) findViewById(R.id.mode_first);
60 | mode_second = (RadioButton) findViewById(R.id.mode_second);
61 | mode_third = (RadioButton) findViewById(R.id.mode_third);
62 | StatusIcon=(ImageView) findViewById(R.id.StatusIcon);
63 | qqqun_image=(ImageView) findViewById(R.id.qqqun_image);
64 | title_text=(TextView) findViewById(R.id.title_text);
65 | activation_title = (TextView) findViewById(R.id.activation_title);
66 | activation_meesage = (TextView) findViewById(R.id.activation_meesage);
67 | edit_title = (TextInputEditText) findViewById(R.id.edit_title);
68 | edit_answer = (TextInputEditText) findViewById(R.id.edit_answer);
69 | practice_answers=(TextInputEditText) findViewById(R.id.practice_answers);
70 | upload_button=(Button) findViewById(R.id.upload_button);
71 | vip_switch=(Switch) findViewById(R.id.vip_switch);
72 | init();
73 | }
74 |
75 | private void init() {
76 | mode_third.setVisibility(View.GONE);
77 | mode_first.setText(R.string.mode_1);
78 | mode_second.setText(R.string.mode_2);
79 | qqqun_image.setOnClickListener((view -> {
80 | joinQQGroup("rnqZIwayhgddTBF62ufYb1d25tGnSwZo");
81 | }));
82 | github_dump.setOnClickListener((view -> {
83 | Intent intent = new Intent();
84 | intent.setData(Uri.parse("https://github.com/Log08"));
85 | startActivity(intent);
86 | }));
87 | if (!isModuleActive()) {
88 | title_layout.setVisibility(View.GONE);
89 | mode_layout.setVisibility(View.GONE);
90 | answer_layout.setVisibility(View.GONE);
91 | activation_title.setText("未激活模块");
92 | activation_meesage.setText("请先激活模块,才能正常加载该界面");
93 | layout_activation.setBackgroundResource(R.drawable.bg_red_solid);
94 | upload_button.setText("退出");
95 | upload_button.setOnClickListener(view -> {
96 | System.exit(0);
97 | });
98 | return;
99 | }
100 | StatusIcon.setImageResource(R.mipmap.ic_yes);
101 | activation_title.setText("已激活模块");
102 | activation_meesage.setText("可以正常使用以下功能");
103 | Sp.SP_init(this);
104 | ismode();
105 | set_answer_title();
106 | agreement_show();
107 | mode_group.setOnCheckedChangeListener((radioGroup, i) -> {
108 | if (i == mode_first.getId()) {
109 | Sp.putInt("mode", 0);
110 | title_layout.setVisibility(View.GONE);
111 | } else if (i == mode_second.getId()) {
112 | Sp.putInt("mode", 1);
113 | title_layout.setVisibility(View.VISIBLE);
114 | }
115 | });
116 | upload_button.setOnClickListener((view -> {
117 | if (title_layout.getVisibility()== View.VISIBLE){
118 | Sp.putString("title",edit_title.getText().toString());
119 | }
120 | Sp.putString("answer",edit_answer.getText().toString());
121 | Sp.putString("practice_answer",practice_answers.getText().toString());
122 | }));
123 | vip_layout.setVisibility(Sp.getBoolean("vip_layout")?View.VISIBLE:View.GONE);
124 | title_text.setOnLongClickListener((view -> {
125 | vip_layout.setVisibility(View.VISIBLE);
126 | Sp.putBoolen("vip_layout",true);
127 | return true;
128 | }));
129 | vip_switch.setText("是否开启破解Vip功能");
130 | vip_switch.setChecked(Sp.getBoolean("vip")?true:false);
131 | vip_switch.setOnCheckedChangeListener((compoundButton,b)->{
132 | Sp.putBoolen("vip",b);
133 | });
134 | }
135 | public void agreement_show(){
136 | try {
137 | if (Sp.getString("first").equals("1")) {
138 | return;
139 | }
140 | new MaterialAlertDialogBuilder(this).setTitle("使用协议").setMessage(readtxt()).setCancelable(false).setPositiveButton("同意", (dialogInterface, i) -> {
141 | Sp.putString("first", "1");
142 | dialogInterface.dismiss();
143 | }).show();
144 | }catch (Exception e){
145 | e.printStackTrace();
146 | }
147 | }
148 | private boolean isModuleActive() {
149 | return false;
150 | }
151 |
152 | private void ismode() {
153 | switch (Sp.getInt("mode")) {
154 | case 0 -> {
155 | mode_first.setChecked(true);
156 | title_layout.setVisibility(View.GONE);
157 | }
158 | case 1 -> mode_second.setChecked(true);
159 | case 2 -> mode_third.setChecked(true);
160 | }
161 | }
162 |
163 | private void set_answer_title() {
164 | String title = Sp.getString("title");
165 | String answer = Sp.getString("answer");
166 | String practice_answer=Sp.getString("practice_answer");
167 | edit_title.setText(title);
168 | edit_answer.setText(answer);
169 | practice_answers.setText(practice_answer);
170 | }
171 | public String readtxt()throws Exception{
172 | AssetManager manager=getAssets();
173 | InputStream open = manager.open("agreement.txt");
174 | byte b[] = new byte[1024];
175 | int len = 0;
176 | StringBuffer sb = new StringBuffer();
177 | //字符串为-1 表示为空
178 | while((len = open.read(b)) != -1){
179 | sb.append(new String(b,0,len));
180 | }
181 | return sb.toString();
182 | }
183 | private void joinQQGroup(String key) {
184 | Intent intent = new Intent();
185 | intent.setData(Uri.parse("mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26jump_from%3Dwebapi%26k%3D" + key));
186 | // 此Flag可根据具体产品需要自定义,如设置,则在加群界面按返回,返回手Q主界面,不设置,按返回会返回到呼起产品界面 //intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
187 | try {
188 | startActivity(intent);
189 | } catch (Exception e) {
190 | Toast.makeText(this, "请先安装QQ", Toast.LENGTH_SHORT).show();
191 | }
192 | }
193 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/log/yh/Hook.java:
--------------------------------------------------------------------------------
1 | package com.log.yh;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import android.util.Base64;
6 | import android.widget.Toast;
7 |
8 | import com.log.yh.Utils.Init;
9 | import com.log.yh.Utils.Sp;
10 |
11 | import org.json.JSONArray;
12 | import org.json.JSONObject;
13 |
14 | import java.lang.reflect.Method;
15 | import java.util.ArrayList;
16 | import java.util.List;
17 |
18 | import de.robv.android.xposed.IXposedHookLoadPackage;
19 | import de.robv.android.xposed.XC_MethodHook;
20 | import de.robv.android.xposed.XposedBridge;
21 | import de.robv.android.xposed.XposedHelpers;
22 | import de.robv.android.xposed.callbacks.XC_LoadPackage;
23 |
24 | public class Hook implements IXposedHookLoadPackage {
25 | public Init init;
26 | public List Answers;
27 |
28 | @Override
29 | public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
30 | Sp.XSp_init();
31 | XposedHelpers.findAndHookMethod(Application.class, "attach", Context.class, new XC_MethodHook() {
32 | @Override
33 | protected void afterHookedMethod(MethodHookParam param) throws Throwable {
34 | super.afterHookedMethod(param);
35 | if (lpparam.packageName.equals("com.log.yh")) {
36 | Hook_ModuleActive(lpparam.classLoader);
37 | return;
38 | }
39 | Context context = (Context) param.args[0];
40 | if (init == null) {
41 | init = new Init();
42 | }
43 | ClassLoader classLoader = context.getClassLoader();
44 | Toast.makeText(context, "hook成功", Toast.LENGTH_SHORT).show();
45 | init.setClassloader(classLoader);
46 | init();
47 | }
48 | });
49 | }
50 |
51 | public void init() throws Throwable {
52 | switch (Sp.Hook_getInt("mode")) {
53 | case 0:
54 | Encrypt_Hook();
55 | break;
56 | case 1:
57 | Encrypt_Hook_one();
58 | break;
59 | default:
60 | Encrypt_Hook();
61 | break;
62 | }
63 | Hook_practice();
64 | Hook_vip();
65 | }
66 |
67 | public void Encrypt_Hook() throws Throwable {
68 | ClassLoader loader = init.getClassloader();
69 | final Class> EncryptResult = XposedHelpers.findClass("com.fenbi.android.leo.webapp.secure.commands.EncryptResult", loader);
70 | XposedHelpers.findAndHookConstructor(EncryptResult, String.class, new XC_MethodHook() {
71 | @Override
72 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
73 | try {
74 | String answer_str = Sp.Hook_getString("answers");
75 | String decode = new String(Base64.decode(((String) param.args[0]).getBytes(), 0));
76 | JSONObject json = new JSONObject(decode);
77 | JSONObject otherUser = json.getJSONObject("otherUser");
78 | int id = otherUser.getInt("userId");
79 | String username = otherUser.getString("userName");
80 | String avatarUrl = otherUser.getString("avatarUrl");
81 | XposedBridge.log("当前对手id:" + id + "名称:" + username + "头像:" + avatarUrl);
82 | JSONObject examVO = json.getJSONObject("examVO");
83 | JSONArray questions = examVO.getJSONArray("questions");
84 | for (int i = 0; i < questions.length(); i++) {
85 | JSONObject question = questions.getJSONObject(i);
86 | JSONArray answers = question.getJSONArray("answers");
87 | answers.put(0, answer_str);
88 | question.put("answers", answers);
89 | }
90 | examVO.put("questions", questions);
91 | json.put("examVO", examVO);
92 | String str = json.toString();
93 | String encode = new String(Base64.encode(str.getBytes(), 0));
94 | param.args[0] = encode;
95 | } catch (Exception e) {
96 | }
97 | }
98 | });
99 | final Class> JsBridgeBean = XposedHelpers.findClass("com.yuanfudao.android.common.webview.base.JsBridgeBean$a", loader);
100 | XposedHelpers.findAndHookConstructor(JsBridgeBean, "com.yuanfudao.android.common.webview.base.a", String.class, String.class, new XC_MethodHook() {
101 | @Override
102 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
103 | String answer_str = Sp.Hook_getString("answers");
104 | String result = (String) param.args[1];
105 | if (result.contains("recognize")) {
106 | String num = "[null, \"" + answer_str + "\"]";
107 | String encode = new String(Base64.encode(num.getBytes(), 0));
108 | param.args[2] = encode;
109 | }
110 | }
111 | });
112 | }
113 |
114 | public void Encrypt_Hook_one() throws Throwable {
115 | ClassLoader loader = init.getClassloader();
116 | final Class> EncryptResult = XposedHelpers.findClass("com.fenbi.android.leo.webapp.secure.commands.EncryptResult", loader);
117 | XposedHelpers.findAndHookConstructor(EncryptResult, String.class, new XC_MethodHook() {
118 | @Override
119 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
120 | try {
121 | String answer_str = Sp.Hook_getString("answers");
122 | String title_str = Sp.Hook_getString("title");
123 | String decode = new String(Base64.decode(((String) param.args[0]).getBytes(), 0));
124 | JSONObject json = new JSONObject(decode);
125 | JSONObject otherUser = json.getJSONObject("otherUser");
126 | int id = otherUser.getInt("userId");
127 | String username = otherUser.getString("userName");
128 | String avatarUrl = otherUser.getString("avatarUrl");
129 | XposedBridge.log("当前对手id:" + id + "名称:" + username + "头像:" + avatarUrl);
130 | JSONObject examVO = json.getJSONObject("examVO");
131 | JSONArray questions = examVO.getJSONArray("questions");
132 | JSONObject last = questions.getJSONObject(questions.length() - 1);
133 | last.put("content", title_str);
134 | JSONArray answers = last.getJSONArray("answers");
135 | answers.put(0, answer_str);
136 | last.put("answers", answers);
137 | JSONArray singleQuestionArray = new JSONArray();
138 | singleQuestionArray.put(last);
139 | examVO.put("questions", singleQuestionArray);
140 | json.put("examVO", examVO);
141 | String str = json.toString();
142 | String encode = new String(Base64.encode(str.getBytes(), 0));
143 | param.args[0] = encode;
144 | } catch (Exception e) {
145 | }
146 | }
147 | });
148 | final Class> JsBridgeBean = XposedHelpers.findClass("com.yuanfudao.android.common.webview.base.JsBridgeBean$a", loader);
149 | XposedHelpers.findAndHookConstructor(JsBridgeBean, "com.yuanfudao.android.common.webview.base.a", String.class, String.class, new XC_MethodHook() {
150 | @Override
151 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
152 | String answer_str = Sp.Hook_getString("answers");
153 | String result = (String) param.args[1];
154 | if (result.contains("recognize")) {
155 | String num = "[null, \"" + answer_str + "\"]";
156 | String encode = new String(Base64.encode(num.getBytes(), 0));
157 | param.args[2] = encode;
158 | }
159 | }
160 | });
161 | }
162 | private void Hook_practice() throws Throwable {
163 | ClassLoader classLoader=init.getClassloader();
164 | Class> claz=XposedHelpers.findClass("com.fenbi.android.leo.exercise.data.QuestionVO",classLoader);
165 | XposedHelpers.findAndHookMethod(claz, "getAnswers", new XC_MethodHook() {
166 | @Override
167 | protected void afterHookedMethod(MethodHookParam param) throws Throwable {
168 | String answer=Sp.Hook_getString("practice_answer");
169 | Answers =(List) param.getResult();
170 | List new_Answers=new ArrayList<>();
171 | for (int i = 0; i< Answers.size(); i++){
172 | new_Answers.add(answer);
173 | }
174 | param.setResult(new_Answers);
175 | }
176 | });
177 | }
178 | public void Hook_vip()throws Throwable{
179 | if (Sp.Hook_getBoolean("vip")) {
180 | ClassLoader classLoader = init.getClassloader();
181 | Class> UserVipVO = XposedHelpers.findClass("com.fenbi.android.leo.business.user.vip.UserVipVO", classLoader);
182 | XposedHelpers.findAndHookMethod(UserVipVO, "getVipSymbol", new XC_MethodHook() {
183 | @Override
184 | protected void afterHookedMethod(MethodHookParam param) throws Throwable {
185 | param.setResult(true);
186 | }
187 | });
188 | }
189 | }
190 | private void Hook_ModuleActive(ClassLoader classLoader) {
191 | XposedHelpers.findAndHookMethod("com.log.yh.MainActivity", classLoader, "isModuleActive", new XC_MethodHook() {
192 | @Override
193 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
194 | param.setResult(true);
195 | }
196 | });
197 | }
198 | }
199 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
30 |
31 |
40 |
41 |
44 |
50 |
51 |
63 |
64 |
72 |
76 |
80 |
81 |
89 |
90 |
98 |
99 |
103 |
111 |
112 |
113 |
114 |
115 |
127 |
128 |
133 |
134 |
138 |
139 |
143 |
144 |
148 |
149 |
150 |
151 |
163 |
164 |
168 |
169 |
174 |
175 |
181 |
182 |
183 |
184 |
196 |
197 |
201 |
202 |
207 |
208 |
214 |
215 |
216 |
219 |
224 |
225 |
238 |
239 |
243 |
244 |
249 |
250 |
255 |
256 |
257 |
269 |
270 |
274 |
275 |
280 |
281 |
287 |
288 |
289 |
295 |
299 |
300 |
304 |
310 |
311 |
312 |
313 |
--------------------------------------------------------------------------------