├── app ├── .gitignore ├── src │ ├── main │ │ ├── assets │ │ │ ├── xposed_init │ │ │ └── help.html │ │ ├── ic_launcher-web.png │ │ ├── res │ │ │ ├── raw │ │ │ │ ├── wechatc.jpg │ │ │ │ └── wx_donate.jpg │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── xml │ │ │ │ ├── file_paths.xml │ │ │ │ ├── pref_headers.xml │ │ │ │ ├── pref_mhzs_tab.xml │ │ │ │ ├── pref_mhzs_ad.xml │ │ │ │ ├── pref_mhzs_exp.xml │ │ │ │ └── pref_mhzs.xml │ │ │ ├── drawable │ │ │ │ ├── bmob_update_wifi_disable.png │ │ │ │ ├── bmob_update_dialog_bg.xml │ │ │ │ ├── bmob_update_button_ok_bg_tap.xml │ │ │ │ ├── bmob_update_button_cancel_bg_tap.xml │ │ │ │ ├── bmob_update_button_cancel_bg_focused.xml │ │ │ │ ├── bmob_update_button_ok_bg_focused.xml │ │ │ │ ├── bmob_update_button_ok_bg_normal.xml │ │ │ │ ├── bmob_update_button_cancel_bg_normal.xml │ │ │ │ ├── submit_selector.xml │ │ │ │ ├── bmob_update_button_close_bg_selector.xml │ │ │ │ ├── bmob_update_button_ok_bg_selector.xml │ │ │ │ ├── bmob_update_button_cancel_bg_selector.xml │ │ │ │ ├── bmob_update_button_check_selector.xml │ │ │ │ └── ic_launcher_background.xml │ │ │ ├── drawable-hdpi │ │ │ │ ├── bmob_update_close_bg_tap.png │ │ │ │ ├── bmob_update_close_bg_normal.png │ │ │ │ ├── bmob_update_btn_check_off_holo_light.png │ │ │ │ ├── bmob_update_btn_check_on_holo_light.png │ │ │ │ ├── bmob_update_btn_check_on_focused_holo_light.png │ │ │ │ ├── bmob_update_btn_check_on_pressed_holo_light.png │ │ │ │ ├── bmob_update_btn_check_off_focused_holo_light.png │ │ │ │ └── bmob_update_btn_check_off_pressed_holo_light.png │ │ │ ├── values │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── arrays.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── bmob_update_string.xml │ │ │ │ └── bmob_common_strings.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── activity_ad.xml │ │ │ │ ├── activity_help.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── activity_feedback.xml │ │ │ │ ├── activity_about.xml │ │ │ │ └── bmob_update_dialog.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── lhy │ │ │ │ └── xposed │ │ │ │ └── mhzs │ │ │ │ ├── MHApplicaiton.java │ │ │ │ ├── permission │ │ │ │ ├── PermissionInterface.java │ │ │ │ ├── PermissionUtil.java │ │ │ │ └── PermissionHelper.java │ │ │ │ ├── fragment │ │ │ │ ├── TabSettingFragment.java │ │ │ │ ├── AdSettingFragment.java │ │ │ │ ├── ExpSettingFragment.java │ │ │ │ ├── BasePreferenceFragment.java │ │ │ │ └── SettingFragment.java │ │ │ │ ├── helper │ │ │ │ ├── Config.java │ │ │ │ ├── LogUtil.java │ │ │ │ ├── ToastUtils.java │ │ │ │ ├── XPrefUtils.java │ │ │ │ ├── Constant.java │ │ │ │ ├── HYHelper.java │ │ │ │ └── FileUtils.java │ │ │ │ ├── plugin │ │ │ │ ├── IPlugin.java │ │ │ │ ├── ClearMyFragmentAdPlugin.java │ │ │ │ ├── TemplatePlugin.java │ │ │ │ ├── ClearPlayerAdPlugin.java │ │ │ │ ├── HideDanmuPlugin.java │ │ │ │ ├── ClearMarqueePlugin.java │ │ │ │ ├── ClearDanmuPlugin.java │ │ │ │ ├── ClearFiveSecondsPlugin.java │ │ │ │ ├── ClearMainAdPlugin.java │ │ │ │ ├── TVPlugin.java │ │ │ │ ├── NoUpdatePlugin.java │ │ │ │ ├── ClearBootAdPlugin.java │ │ │ │ ├── DownloadPlugin.java │ │ │ │ ├── InfiniteCachePlugin.java │ │ │ │ ├── CustomMainInterfacePlugin.java │ │ │ │ ├── AutoSignPlugin.java │ │ │ │ ├── WatchThirtyMinutesPlugin.java │ │ │ │ ├── WechatSharePlugin.java │ │ │ │ └── SharePlugin.java │ │ │ │ ├── activity │ │ │ │ ├── ExpSettingActivity.java │ │ │ │ ├── TabSettingActivity.java │ │ │ │ ├── AdSettingActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── FeedbackActivity.java │ │ │ │ ├── AboutActivity.java │ │ │ │ ├── AppCompatPreferenceActivity.java │ │ │ │ ├── BaseActivity.java │ │ │ │ ├── HelpActivity.java │ │ │ │ └── SettingsActivity.java │ │ │ │ ├── bean │ │ │ │ ├── DataBean.java │ │ │ │ ├── Feedback.java │ │ │ │ ├── M3u8FormatBean.java │ │ │ │ └── VideoInfoBean.java │ │ │ │ ├── HookLoader.java │ │ │ │ └── HookMain.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── lhy │ │ │ └── xposed │ │ │ └── mhzs │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── lhy │ │ └── xposed │ │ └── mhzs │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── alipayc.jpg ├── lucky.jpg ├── wechatc.jpg ├── img └── share.gif ├── .idea ├── dictionaries │ └── .xml ├── markdown-navigator │ └── profiles_settings.xml ├── vcs.xml ├── runConfigurations.xml ├── gradle.xml ├── codeStyles │ └── Project.xml ├── misc.xml └── markdown-navigator.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── LICENSE ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /release 3 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | com.lhy.xposed.mhzs.HookLoader -------------------------------------------------------------------------------- /alipayc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/alipayc.jpg -------------------------------------------------------------------------------- /lucky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/lucky.jpg -------------------------------------------------------------------------------- /wechatc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/wechatc.jpg -------------------------------------------------------------------------------- /img/share.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/img/share.gif -------------------------------------------------------------------------------- /.idea/dictionaries/.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/res/raw/wechatc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/raw/wechatc.jpg -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/raw/wx_donate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/raw/wx_donate.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_wifi_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/drawable/bmob_update_wifi_disable.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bmob_update_close_bg_tap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/drawable-hdpi/bmob_update_close_bg_tap.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bmob_update_close_bg_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/drawable-hdpi/bmob_update_close_bg_normal.png -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bmob_update_btn_check_off_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/drawable-hdpi/bmob_update_btn_check_off_holo_light.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bmob_update_btn_check_on_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/drawable-hdpi/bmob_update_btn_check_on_holo_light.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bmob_update_btn_check_on_focused_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/drawable-hdpi/bmob_update_btn_check_on_focused_holo_light.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bmob_update_btn_check_on_pressed_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/drawable-hdpi/bmob_update_btn_check_on_pressed_holo_light.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bmob_update_btn_check_off_focused_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/drawable-hdpi/bmob_update_btn_check_off_focused_holo_light.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/bmob_update_btn_check_off_pressed_holo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/1595901624/mhzs/HEAD/app/src/main/res/drawable-hdpi/bmob_update_btn_check_off_pressed_holo_light.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 麻花助手 3 | 4 | 注意:提交反馈将仅会收集您的设备名称、设备型号、安卓系统版本。当您提交反馈后,我们将会默认您知晓此问题。 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_dialog_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches/build_file_checksums.ser 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | .DS_Store 9 | /build 10 | /captures 11 | .externalNativeBuild 12 | /.idea 13 | DEV.md 14 | mhzs.zip 15 | /app/release -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EdXposed框架 5 | 太极(TaiChi)框架 6 | Xposed原版框架 7 | 其它 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/xml/pref_headers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_ok_bg_tap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_cancel_bg_tap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_cancel_bg_focused.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_ok_bg_focused.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_ok_bg_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/MHApplicaiton.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs; 2 | 3 | import android.app.Application; 4 | 5 | import cn.bmob.v3.Bmob; 6 | 7 | public class MHApplicaiton extends Application { 8 | 9 | @Override 10 | public void onCreate() { 11 | super.onCreate(); 12 | Bmob.initialize(this, "0053ab880ceb939700414994235c4adf"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_cancel_bg_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/submit_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/test/java/com/lhy/xposed/mhzs/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs; 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 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_close_bg_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/permission/PermissionInterface.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.permission; 2 | 3 | /** 4 | * 权限请求接口 5 | */ 6 | public interface PermissionInterface { 7 | 8 | /** 9 | * 可设置请求权限请求码 10 | */ 11 | int getPermissionsRequestCode(); 12 | 13 | /** 14 | * 设置需要请求的权限 15 | */ 16 | String[] getPermissions(); 17 | 18 | /** 19 | * 请求权限成功回调 20 | */ 21 | void requestPermissionsSuccess(); 22 | 23 | /** 24 | * 请求权限失败回调 25 | */ 26 | void requestPermissionsFail(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/fragment/TabSettingFragment.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.fragment; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.lhy.xposed.mhzs.R; 6 | import com.lhy.xposed.mhzs.activity.BaseActivity; 7 | 8 | import androidx.preference.PreferenceFragmentCompat; 9 | 10 | public class TabSettingFragment extends BasePreferenceFragment { 11 | @Override 12 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 13 | addPreferencesFromResource(R.xml.pref_mhzs_tab); 14 | setWorldReadable(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_ok_bg_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_cancel_bg_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/helper/Config.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.helper; 2 | 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | 6 | /** 7 | * 配置文件 8 | */ 9 | public interface Config { 10 | String HELP_MARKDOWN_URL = "https://raw.githubusercontent.com/1595901624/mhzs/master/README.md"; 11 | Set HOOK_APPLICATION_PACKAGE_NAME = new HashSet() {{ 12 | // add("com.lhy.xposed.mhzs"); 13 | add("com.amahua.ywofnbfd"); 14 | add("com.amahua.ompimdrt"); 15 | add("com.amahua.vwzasawq"); 16 | }}; 17 | /*麻花影视支持版本*/ 18 | String SUPPORT_MHYS_VERISON = "2.7.0"; 19 | // String HOOK_APPLICATION_PRE_PACKAGE_NAME = "com.amahua"; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/IPlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | /** 4 | * 如果想对现有的插件进行扩展,请实现此方法 5 | *

6 | * 当然,您可以参照 TemplatePlugin 来开发 7 | *

8 | * 插件写完以后,在HookMain中的iPlugins数组,加入自己的插件即可 9 | */ 10 | public interface IPlugin { 11 | /** 12 | * 插件运行方法 13 | *

14 | * 请在此方法中进行Xposed Hook 15 | * 16 | * @param classLoader 17 | * @throws Throwable 18 | */ 19 | void run(ClassLoader classLoader) throws Throwable; 20 | 21 | /** 22 | * 插件的启用与关闭 23 | *

24 | * 1.可以直接返回true 或者 false 25 | * 2.可以添加配置文件,使用XPrefUtils.getPref().getBoolean("xxx", false)来返回结果 26 | * 27 | * @return 28 | */ 29 | boolean isOpen(); 30 | } -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/fragment/AdSettingFragment.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.fragment; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.lhy.xposed.mhzs.R; 6 | 7 | import androidx.preference.Preference; 8 | import androidx.preference.PreferenceFragmentCompat; 9 | 10 | public class AdSettingFragment extends BasePreferenceFragment { 11 | @Override 12 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 13 | addPreferencesFromResource(R.xml.pref_mhzs_ad); 14 | setWorldReadable(); 15 | } 16 | 17 | @Override 18 | public boolean onPreferenceTreeClick(Preference preference) { 19 | return super.onPreferenceTreeClick(preference); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/helper/LogUtil.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.helper; 2 | 3 | import android.util.Log; 4 | 5 | import com.lhy.xposed.mhzs.BuildConfig; 6 | 7 | public class LogUtil { 8 | private final static String TAG = "XP_MHYSZY"; 9 | 10 | private LogUtil() { 11 | } 12 | 13 | public static void e(String msg) { 14 | if (BuildConfig.DEBUG) { 15 | Log.e(TAG, msg); 16 | } 17 | } 18 | 19 | public static void w(String msg) { 20 | if (BuildConfig.DEBUG) { 21 | Log.w(TAG, msg); 22 | } 23 | } 24 | 25 | public static void i(String msg) { 26 | if (BuildConfig.DEBUG) { 27 | Log.i(TAG, msg); 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/fragment/ExpSettingFragment.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.fragment; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.lhy.xposed.mhzs.R; 6 | 7 | import androidx.preference.Preference; 8 | 9 | /** 10 | * 实验性功能 11 | * 12 | * @author lhy 13 | * @time 2019年3月12日10:56:55 14 | */ 15 | public class ExpSettingFragment extends BasePreferenceFragment { 16 | @Override 17 | public void onCreatePreferences(Bundle bundle, String s) { 18 | addPreferencesFromResource(R.xml.pref_mhzs_exp); 19 | setWorldReadable(); 20 | } 21 | 22 | @Override 23 | public boolean onPreferenceTreeClick(Preference preference) { 24 | return super.onPreferenceTreeClick(preference); 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/res/values/bmob_update_string.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 未联网 4 | 发现新版本 5 | 最新版本: 6 | 更新内容 7 | 仅需要下载: 8 | 新版本大小: 9 | (提示:非WIFI环境) 10 | 立即更新 11 | 应用更新 12 | 以后再说 13 | 忽略该版 14 | 正在更新中.... 15 | 最新版本已下载,是否安装? 16 | v3.1.4Beta 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/activity/ExpSettingActivity.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.activity; 2 | 3 | import android.graphics.Color; 4 | 5 | import com.lhy.xposed.mhzs.fragment.ExpSettingFragment; 6 | 7 | import androidx.appcompat.widget.Toolbar; 8 | 9 | public class ExpSettingActivity extends BaseActivity { 10 | @Override 11 | protected void initToolbar(Toolbar mToolbar) { 12 | mToolbar.setTitle("实验性功能"); 13 | mToolbar.setTitleTextColor(Color.WHITE); 14 | setSupportActionBar(mToolbar); 15 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 16 | } 17 | 18 | @Override 19 | protected void initView() { 20 | 21 | } 22 | 23 | @Override 24 | protected void initData() { 25 | switchFragment(new ExpSettingFragment()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/bean/DataBean.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.bean; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * DataBean 7 | * 麻花影视 2.5.0之前 8 | */ 9 | @Deprecated 10 | public class DataBean { 11 | 12 | private String m3u8PlayUrl; 13 | 14 | @SerializedName(value = "m3u8Format") 15 | private M3u8FormatBean m3u8FormatBean; 16 | 17 | public void setM3u8PlayUrl(String m3u8PlayUrl) { 18 | this.m3u8PlayUrl = m3u8PlayUrl; 19 | } 20 | 21 | public String getM3u8PlayUrl() { 22 | return m3u8PlayUrl; 23 | } 24 | 25 | public void setM3u8Format(M3u8FormatBean m3u8Format) { 26 | this.m3u8FormatBean = m3u8Format; 27 | } 28 | 29 | public M3u8FormatBean getM3u8Format() { 30 | return m3u8FormatBean; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /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 | android.enableJetifier=true 10 | android.useAndroidX=true 11 | org.gradle.jvmargs=-Xmx1536m 12 | # When configured, Gradle will run in incubating parallel mode. 13 | # This option should only be used with decoupled projects. More details, visit 14 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 15 | # org.gradle.parallel=true 16 | 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/lhy/xposed/mhzs/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs; 2 | 3 | import android.content.Context; 4 | import androidx.test.InstrumentationRegistry; 5 | import androidx.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.lhy.xposed.pref_mhzs", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/ClearMyFragmentAdPlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import com.lhy.xposed.mhzs.helper.Constant; 4 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 5 | 6 | import de.robv.android.xposed.XC_MethodReplacement; 7 | import de.robv.android.xposed.XposedHelpers; 8 | 9 | /** 10 | * 清除MyFragment中的广告 11 | *

12 | * 不会请求广告数据,从而消耗多余流量 13 | * 14 | * @author lhy 15 | * @time 2019年4月8日17:25:21 16 | */ 17 | public class ClearMyFragmentAdPlugin implements IPlugin { 18 | @Override 19 | public void run(ClassLoader classLoader) throws Throwable { 20 | XposedHelpers.findAndHookMethod(Constant.prst.$MyPresenter, classLoader, "e", XC_MethodReplacement.DO_NOTHING); 21 | } 22 | 23 | @Override 24 | public boolean isOpen() { 25 | return XPrefUtils.getPref().getBoolean("ad_my", true); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/helper/ToastUtils.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.helper; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.widget.Toast; 6 | 7 | public class ToastUtils { 8 | 9 | private ToastUtils() { 10 | 11 | } 12 | 13 | public static void toast(Activity activity, String msg) { 14 | Toast.makeText(activity, msg, Toast.LENGTH_SHORT).show(); 15 | } 16 | 17 | public static void toast(Activity activity, int resId) { 18 | Toast.makeText(activity, resId, Toast.LENGTH_SHORT).show(); 19 | } 20 | 21 | public static void toastLong(Activity activity, String msg) { 22 | Toast.makeText(activity, msg, Toast.LENGTH_LONG).show(); 23 | } 24 | 25 | public static void toastLong(Activity activity, int resId) { 26 | Toast.makeText(activity, resId, Toast.LENGTH_LONG).show(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_ad.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/activity/TabSettingActivity.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.activity; 2 | 3 | import android.graphics.Color; 4 | import android.view.MenuItem; 5 | 6 | import com.lhy.xposed.mhzs.fragment.AdSettingFragment; 7 | import com.lhy.xposed.mhzs.fragment.TabSettingFragment; 8 | 9 | import androidx.appcompat.widget.Toolbar; 10 | 11 | public class TabSettingActivity extends BaseActivity { 12 | @Override 13 | protected void initToolbar(Toolbar mToolbar) { 14 | mToolbar.setTitle("底部栏设置"); 15 | mToolbar.setTitleTextColor(Color.WHITE); 16 | setSupportActionBar(mToolbar); 17 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 18 | } 19 | 20 | @Override 21 | protected void initView() { 22 | 23 | } 24 | 25 | @Override 26 | protected void initData() { 27 | switchFragment(new TabSettingFragment()); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/res/xml/pref_mhzs_tab.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 13 | 14 | 19 | 20 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/values/bmob_common_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 正在下载中. 4 | 下载出错啦,请检查网络后继续。 5 | 暂停 6 | 继续 7 | 取消 8 | 正在下载: 9 | 暂停: 10 | 正在下载应用 11 | 正在更新安装包 12 | 请连接网络后再尝试! 13 | 下载失败 14 | 下载完成,请点击安装 15 | 更新完成,请点击安装 16 | 新版本已经准备好,请点击安装 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/activity/AdSettingActivity.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.activity; 2 | 3 | import android.graphics.Color; 4 | import android.view.MenuItem; 5 | 6 | import com.lhy.xposed.mhzs.fragment.AdSettingFragment; 7 | 8 | import androidx.appcompat.widget.Toolbar; 9 | 10 | public class AdSettingActivity extends BaseActivity { 11 | @Override 12 | protected void initToolbar(Toolbar mToolbar) { 13 | mToolbar.setTitle("广告净化"); 14 | mToolbar.setTitleTextColor(Color.WHITE); 15 | setSupportActionBar(mToolbar); 16 | getSupportActionBar().setDisplayHomeAsUpEnabled(true); 17 | } 18 | 19 | @Override 20 | protected void initView() { 21 | 22 | } 23 | 24 | @Override 25 | protected void initData() { 26 | switchFragment(new AdSettingFragment()); 27 | } 28 | 29 | @Override 30 | public boolean onOptionsItemSelected(MenuItem item) { 31 | if(item.getItemId() == android.R.id.home){ 32 | onBackPressed(); 33 | return true; 34 | } 35 | return super.onOptionsItemSelected(item); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 1595901624 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/fragment/BasePreferenceFragment.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.fragment; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.os.Bundle; 5 | 6 | import com.lhy.xposed.mhzs.helper.FileUtils; 7 | 8 | import java.io.File; 9 | 10 | import androidx.preference.PreferenceFragmentCompat; 11 | 12 | public class BasePreferenceFragment extends PreferenceFragmentCompat { 13 | @Override 14 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 15 | } 16 | 17 | /** 18 | * 设置Pref为可读 19 | */ 20 | @SuppressWarnings({"deprecation", "ResultOfMethodCallIgnored"}) 21 | @SuppressLint({"SetWorldReadable", "WorldReadableFiles"}) 22 | protected void setWorldReadable() { 23 | if (FileUtils.getDefaultPrefFile(getActivity()) 24 | .exists()) { 25 | for (File file : new File[]{FileUtils.getDataDir(getActivity()), FileUtils.getPrefDir(getActivity()), FileUtils.getDefaultPrefFile(getActivity())}) { 26 | file.setReadable(true, false); 27 | file.setExecutable(true, false); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_help.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 19 | 20 | 25 | 26 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/TemplatePlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 4 | 5 | import de.robv.android.xposed.XC_MethodHook; 6 | import de.robv.android.xposed.XposedHelpers; 7 | 8 | /** 9 | * 这是一个插件开发模板 10 | */ 11 | public class TemplatePlugin implements IPlugin { 12 | 13 | /** 14 | * 请在此进行Hook 15 | * 16 | * @param classLoader 17 | * @throws Throwable 18 | */ 19 | @Override 20 | public void run(ClassLoader classLoader) throws Throwable { 21 | //Xposed框架的Hook方法 22 | XposedHelpers.findAndHookMethod("xxx", classLoader, "x", new XC_MethodHook() { 23 | @Override 24 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 25 | super.beforeHookedMethod(param); 26 | } 27 | 28 | @Override 29 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 30 | super.afterHookedMethod(param); 31 | } 32 | }); 33 | } 34 | 35 | /** 36 | * 插件的启用与关闭 37 | * 38 | * @return 39 | */ 40 | @Override 41 | public boolean isOpen() { 42 | // return false; 43 | return XPrefUtils.getPref().getBoolean("xxx", false); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/ClearPlayerAdPlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import com.lhy.xposed.mhzs.helper.Constant; 4 | import com.lhy.xposed.mhzs.helper.LogUtil; 5 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 6 | 7 | import de.robv.android.xposed.XC_MethodReplacement; 8 | import de.robv.android.xposed.XposedBridge; 9 | import de.robv.android.xposed.XposedHelpers; 10 | 11 | /** 12 | * 清理播放界面广告 13 | * 包括:“推荐”,“电影”,“电视剧” 14 | * 15 | * @author lhy 16 | * @time 2019年2月16日15:12:33 17 | */ 18 | public class ClearPlayerAdPlugin implements IPlugin { 19 | 20 | @Override 21 | public void run(ClassLoader classLoader) throws Throwable { 22 | /** 23 | * 在com.mh.movie.core.mvp.presenter.player.PlayerPresenter中 24 | * 替换g()方法,去除播放页面的广告 -BootadsListBean- 25 | * 26 | * 此变量名版本更新可能会改变 27 | */ 28 | XposedHelpers.findAndHookMethod(Constant.prst.$PlayerPresenter, classLoader, "g", int.class, new XC_MethodReplacement() { 29 | @Override 30 | protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable { 31 | LogUtil.e("hook g method!"); 32 | return null; 33 | } 34 | }); 35 | } 36 | 37 | @Override 38 | public boolean isOpen() { 39 | return XPrefUtils.getPref().getBoolean("ad_player", true); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/HideDanmuPlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | 4 | import android.content.Context; 5 | 6 | import com.lhy.xposed.mhzs.helper.LogUtil; 7 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 8 | 9 | import java.lang.reflect.Method; 10 | import java.util.List; 11 | 12 | import de.robv.android.xposed.XC_MethodHook; 13 | import de.robv.android.xposed.XposedHelpers; 14 | 15 | /** 16 | * 默认隐藏弹幕 17 | *

18 | * 弹幕设置按钮可开启 19 | * 20 | * @author lhy 21 | * @time 2019年4月12日10:49:16 22 | */ 23 | public class HideDanmuPlugin implements IPlugin { 24 | private String $DanmakuVideoPlayer = "com.mh.movie.core.mvp.ui.activity.player.DanmakuVideoPlayer"; 25 | 26 | @Override 27 | public void run(final ClassLoader classLoader) throws Throwable { 28 | 29 | XposedHelpers.findAndHookMethod($DanmakuVideoPlayer, classLoader, "a", List.class, new XC_MethodHook() { 30 | @Override 31 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 32 | super.beforeHookedMethod(param); 33 | } 34 | 35 | @Override 36 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 37 | super.afterHookedMethod(param); 38 | XposedHelpers.callMethod(param.thisObject, "d"); 39 | } 40 | }); 41 | 42 | } 43 | 44 | @Override 45 | public boolean isOpen() { 46 | return XPrefUtils.getPref().getBoolean("hide_danmu", false); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 24 | 25 | 26 | 27 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/bean/Feedback.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.bean; 2 | 3 | import cn.bmob.v3.BmobObject; 4 | 5 | public class Feedback extends BmobObject { 6 | private String detail; 7 | private String contact; 8 | private String device; 9 | private String framework; 10 | private String version; 11 | 12 | public String getDetail() { 13 | return detail; 14 | } 15 | 16 | public void setDetail(String detail) { 17 | this.detail = detail; 18 | } 19 | 20 | public String getContact() { 21 | return contact; 22 | } 23 | 24 | public void setContact(String contact) { 25 | this.contact = contact; 26 | } 27 | 28 | public String getDevice() { 29 | return device; 30 | } 31 | 32 | public void setDevice(String device) { 33 | this.device = device; 34 | } 35 | 36 | public String getFramework() { 37 | return framework; 38 | } 39 | 40 | public void setFramework(String framework) { 41 | this.framework = framework; 42 | } 43 | 44 | public String getVersion() { 45 | return version; 46 | } 47 | 48 | public void setVersion(String version) { 49 | this.version = version; 50 | } 51 | 52 | @Override 53 | public String toString() { 54 | return "Feedback{" + 55 | "detail='" + detail + '\'' + 56 | ", contact='" + contact + '\'' + 57 | ", device='" + device + '\'' + 58 | ", framework='" + framework + '\'' + 59 | ", version='" + version + '\'' + 60 | '}'; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/ClearMarqueePlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import android.os.Bundle; 4 | import android.os.Message; 5 | 6 | import com.lhy.xposed.mhzs.helper.Constant; 7 | import com.lhy.xposed.mhzs.helper.LogUtil; 8 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 9 | 10 | import de.robv.android.xposed.XC_MethodHook; 11 | import de.robv.android.xposed.XposedHelpers; 12 | 13 | /** 14 | * 清除底部滚动广告 15 | * 16 | * @author lhy 17 | * @time 2019年3月7日13:37:05 18 | */ 19 | // TODO: 2019/3/15 0015 BUG 20 | public class ClearMarqueePlugin implements IPlugin { 21 | 22 | @Override 23 | public void run(ClassLoader classLoader) throws Throwable { 24 | XposedHelpers.findAndHookMethod(Constant.util.$MyTimeTaskHandler, classLoader, "handleMessage", Message.class, new XC_MethodHook() { 25 | @Override 26 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 27 | super.beforeHookedMethod(param); 28 | Message msg = (Message) param.args[0]; 29 | // LogUtil.e("msg.what = " + msg.what); 30 | if (msg.what == 9999) { 31 | msg.what = 5211314; 32 | // LogUtil.e("ClearMarqueePlugin run"); 33 | } 34 | } 35 | 36 | @Override 37 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 38 | super.afterHookedMethod(param); 39 | } 40 | }); 41 | } 42 | 43 | @Override 44 | public boolean isOpen() { 45 | return XPrefUtils.getPref().getBoolean("ad_marquee", false); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/res/xml/pref_mhzs_ad.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | 23 | 24 | 29 | 30 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bmob_update_button_check_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 10 | 13 | 16 | 17 | 20 | 23 | 24 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/ClearDanmuPlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import android.content.Context; 4 | import android.util.Log; 5 | import android.view.View; 6 | import android.widget.LinearLayout; 7 | 8 | import com.lhy.xposed.mhzs.helper.Constant; 9 | import com.lhy.xposed.mhzs.helper.LogUtil; 10 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 11 | 12 | import java.lang.reflect.Field; 13 | 14 | import de.robv.android.xposed.XC_MethodHook; 15 | import de.robv.android.xposed.XposedHelpers; 16 | 17 | /** 18 | * 去除弹幕 19 | *

20 | * 该功能开启后,内置弹幕设置开关将失效 21 | * 22 | * @time 2019年4月12日09:56:37 23 | * @auth lhy 24 | */ 25 | public class ClearDanmuPlugin implements IPlugin { 26 | private String $DanmakuVideoPlayer = "com.mh.movie.core.mvp.ui.activity.player.DanmakuVideoPlayer"; 27 | 28 | @Override 29 | public void run(final ClassLoader classLoader) throws Throwable { 30 | XposedHelpers.findAndHookMethod($DanmakuVideoPlayer, classLoader, "g", new XC_MethodHook() { 31 | @Override 32 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 33 | super.afterHookedMethod(param); 34 | LogUtil.e("clear danmuku ----"); 35 | int llDanmakuViewId = XposedHelpers.getStaticIntField(classLoader.loadClass(Constant.$id), "ll_danmaku_view"); 36 | View view = (View) param.thisObject; 37 | LinearLayout llDanmakuView = view.findViewById(llDanmakuViewId); 38 | llDanmakuView.setVisibility(View.GONE); 39 | } 40 | }); 41 | } 42 | 43 | @Override 44 | public boolean isOpen() { 45 | return XPrefUtils.getPref().getBoolean("clear_danmu", false); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/ClearFiveSecondsPlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | 6 | import com.lhy.xposed.mhzs.helper.Constant; 7 | import com.lhy.xposed.mhzs.helper.HYHelper; 8 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 9 | 10 | import java.util.List; 11 | 12 | import de.robv.android.xposed.XC_MethodReplacement; 13 | import de.robv.android.xposed.XposedHelpers; 14 | 15 | /** 16 | * 去除5s倒计时 17 | * 18 | * @time 2019年3月6日19:16:12 19 | */ 20 | public class ClearFiveSecondsPlugin implements IPlugin { 21 | 22 | @Override 23 | public void run(final ClassLoader classLoader) throws Throwable { 24 | /** 25 | * 在com.mh.movie.core.mvp.ui.activity.SplashActivity中 26 | * 替换a()方法,去除5s启动 27 | * 28 | * 此变量名版本更新可能会改变 29 | */ 30 | XposedHelpers.findAndHookMethod(Constant.act.$SplashActivity, classLoader, "a", long.class, List.class, boolean.class, new XC_MethodReplacement() { 31 | @Override 32 | protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable { 33 | //跳转MainActivity,并结束当前进程 34 | Class clazz = classLoader.loadClass(Constant.act.$MainActivity); 35 | Activity activity = (Activity) methodHookParam.thisObject; 36 | 37 | Intent intent = new Intent(activity, clazz); 38 | XposedHelpers.callMethod(activity, "startActivity", intent); 39 | XposedHelpers.callMethod(activity, "finish"); 40 | return null; 41 | } 42 | }); 43 | } 44 | 45 | @Override 46 | public boolean isOpen() { 47 | return XPrefUtils.getPref().getBoolean("five_seconds", true); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/helper/XPrefUtils.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.helper; 2 | 3 | import com.lhy.xposed.mhzs.BuildConfig; 4 | 5 | import java.lang.ref.WeakReference; 6 | import java.util.ArrayList; 7 | import java.util.HashSet; 8 | import java.util.List; 9 | import java.util.Set; 10 | 11 | import de.robv.android.xposed.XSharedPreferences; 12 | 13 | /** 14 | * Created by zpp0196 on 2018/4/11. 15 | */ 16 | 17 | public class XPrefUtils { 18 | 19 | private static WeakReference xSharedPreferences = new WeakReference<>(null); 20 | 21 | public static XSharedPreferences getPref() { 22 | XSharedPreferences preferences = xSharedPreferences.get(); 23 | if (preferences == null) { 24 | preferences = new XSharedPreferences(BuildConfig.APPLICATION_ID); 25 | preferences.makeWorldReadable(); 26 | preferences.reload(); 27 | xSharedPreferences = new WeakReference<>(preferences); 28 | } else { 29 | preferences.reload(); 30 | } 31 | return preferences; 32 | } 33 | 34 | // private static Set getStringSet(String key) { 35 | // return getPref().getStringSet(key, new HashSet<>()); 36 | // } 37 | // 38 | // public static List getStringList(String key) { 39 | // Set set = getStringSet(key); 40 | // List list = new ArrayList<>(); 41 | // list.addAll(set); 42 | // return list; 43 | // } 44 | // 45 | // public static List getIntegerList(String key) { 46 | // List stringList = getStringList(key); 47 | // List integerList = new ArrayList<>(); 48 | // for (String str : stringList) { 49 | // integerList.add(Integer.valueOf(str)); 50 | // } 51 | // return integerList; 52 | // } 53 | } 54 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/helper/Constant.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.helper; 2 | 3 | public class Constant { 4 | 5 | 6 | public static String CURRENT_HOOK_PACKAGE_NAME = ""; 7 | public static final String $id = "com.mh.movie.core.R$id"; 8 | public static final String $MHApplication = "com.mh.movie.core.mvp.ui.MHApplication"; 9 | 10 | /** 11 | * 麻花影视的activity名 12 | */ 13 | public static class act { 14 | public static final String $MainActivity = "com.mh.movie.core.mvp.ui.activity.main.MainActivity"; 15 | public static final String $SplashActivity = "com.mh.movie.core.mvp.ui.activity.SplashActivity"; 16 | public static final String $PlayerActivity = "com.mh.movie.core.mvp.ui.activity.player.PlayerActivity"; 17 | public static final String $ScreeningActivity = "com.mh.movie.core.mvp.ui.activity.player.ScreeningActivity"; 18 | 19 | public static final String $WXEntryActivity = CURRENT_HOOK_PACKAGE_NAME + ".wxapi.WXEntryActivity"; 20 | } 21 | 22 | public static class fgmt { 23 | public static final String $TaskFragment = "com.mh.movie.core.mvp.ui.fragment.TaskFragment"; 24 | public static final String $MyFragment = "com.mh.movie.core.mvp.ui.fragment.MyFragment"; 25 | } 26 | 27 | public static class prst { 28 | public static final String $PlayerPresenter = "com.mh.movie.core.mvp.presenter.player.PlayerPresenter"; 29 | public static final String $MyPresenter = "com.mh.movie.core.mvp.presenter.MyPresenter"; 30 | } 31 | 32 | public static class util { 33 | public static final String $MyTimeTaskHandler = "com.mh.movie.core.mvp.ui.utils.MyTimeTaskHandler"; 34 | } 35 | 36 | public static class db { 37 | public static final String $TableCommodity = "com.mh.movie.core.mvp.model.db.TableCommodity"; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/ClearMainAdPlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import com.lhy.xposed.mhzs.helper.LogUtil; 4 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 5 | 6 | import java.util.List; 7 | 8 | import de.robv.android.xposed.XC_MethodReplacement; 9 | import de.robv.android.xposed.XposedHelpers; 10 | 11 | /** 12 | * 清理主界面广告 13 | * 包括:“推荐”,“电影”,“电视剧” 14 | * 15 | * 该插件全版本通用 16 | * 17 | * @author lhy 18 | * @time 2019年2月16日14:12:33 19 | */ 20 | public class ClearMainAdPlugin implements IPlugin { 21 | private final String movieCardViewClassName = "com.mh.movie.core.mvp.ui.widget.MovieCardView"; 22 | 23 | @Override 24 | public void run(ClassLoader classLoader) throws Throwable { 25 | 26 | /** 27 | * 在com.mh.movie.core.mvp.ui.widget.MovieCardView中 28 | * 替换setShowBanner方法,去掉广告 29 | */ 30 | // TODO: 2019/3/6 0006 VXP/EXP TOO SHORT METHOD 31 | // XposedHelpers.findAndHookMethod(movieCardViewClassName, classLoader, "setShowBanner", List.class, new XC_MethodReplacement() { 32 | // @Override 33 | // protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable { 34 | // LogUtil.e("hook setShowBanner method!"); 35 | // return null; 36 | // } 37 | // }); 38 | 39 | XposedHelpers.findAndHookMethod(movieCardViewClassName, classLoader, "c", new XC_MethodReplacement() { 40 | @Override 41 | protected Object replaceHookedMethod(MethodHookParam methodHookParam) throws Throwable { 42 | LogUtil.e("hook setShowBanner2 method!"); 43 | return null; 44 | } 45 | }); 46 | 47 | } 48 | 49 | @Override 50 | public boolean isOpen() { 51 | return XPrefUtils.getPref().getBoolean("ad_main", true); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.lhy.xposed.mhzs" 7 | minSdkVersion 17 8 | targetSdkVersion 27 9 | versionCode 1109 10 | versionName "0.7.1 Beta" 11 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(include: ['*.jar'], dir: 'libs') 23 | implementation 'androidx.appcompat:appcompat:1.1.0-alpha02' 24 | implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3' 25 | testImplementation 'junit:junit:4.12' 26 | androidTestImplementation 'androidx.test:runner:1.1.2-alpha01' 27 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01' 28 | implementation 'com.google.code.gson:gson:2.8.5' 29 | implementation 'androidx.preference:preference:1.1.0-alpha03' 30 | implementation 'com.github.didikee:AndroidDonate:0.1.0' 31 | compileOnly 'de.robv.android.xposed:api:82' 32 | compileOnly 'de.robv.android.xposed:api:82:sources' 33 | implementation 'com.vladsch.flexmark:flexmark:0.40.22' 34 | implementation 'com.vladsch.flexmark:flexmark-util:0.40.22' 35 | implementation 'com.vladsch.flexmark:flexmark-ext-tables:0.40.22' 36 | implementation 'com.vladsch.flexmark:flexmark-profile-pegdown:0.40.22' 37 | implementation 'com.squareup.okhttp3:okhttp:3.12.1' 38 | implementation 'cn.bmob.android:bmob-sdk:3.7.0' 39 | implementation "io.reactivex.rxjava2:rxjava:2.2.2" 40 | implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' 41 | implementation 'com.squareup.okio:okio:2.1.0' 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/helper/HYHelper.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.helper; 2 | 3 | import android.content.Context; 4 | import android.content.pm.PackageInfo; 5 | import android.content.pm.PackageManager; 6 | import android.os.Build; 7 | 8 | import de.robv.android.xposed.XposedHelpers; 9 | 10 | 11 | public class HYHelper { 12 | 13 | /** 14 | * 获取packageCode 15 | * 16 | * @param context 17 | * @return 18 | */ 19 | public static long getPackageCode(Context context) { 20 | PackageManager manager = context.getPackageManager(); 21 | long code = 0; 22 | try { 23 | PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0); 24 | code = info.getLongVersionCode(); 25 | } catch (PackageManager.NameNotFoundException e) { 26 | e.printStackTrace(); 27 | } 28 | return code; 29 | } 30 | 31 | 32 | /** 33 | * 获取packageName 34 | * 35 | * @param context 36 | * @return 37 | */ 38 | public static String getVerisonName(Context context) { 39 | PackageManager manager = context.getPackageManager(); 40 | String name = null; 41 | try { 42 | PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0); 43 | name = info.versionName; 44 | } catch (PackageManager.NameNotFoundException e) { 45 | e.printStackTrace(); 46 | } 47 | 48 | return name; 49 | } 50 | 51 | /*** 52 | * 53 | */ 54 | public static int getViewId(ClassLoader classLoader, String idName) throws ClassNotFoundException { 55 | return XposedHelpers.getStaticIntField(classLoader.loadClass(Constant.$id), "rl_main_partner"); 56 | } 57 | 58 | /** 59 | * 获取设备信息 60 | * 61 | * @return 62 | */ 63 | public static String getDeviceInfo() { 64 | return "设备品牌:" + Build.BRAND + " " + Build.MODEL + ", 安卓版本:" 65 | + Build.VERSION.RELEASE + "(" + Build.VERSION.SDK_INT + ")"; 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/permission/PermissionUtil.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.permission; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.content.pm.PackageManager; 6 | import android.os.Build; 7 | 8 | import java.util.ArrayList; 9 | 10 | /** 11 | * 动态权限工具类 12 | */ 13 | public class PermissionUtil { 14 | 15 | /** 16 | * 判断是否有某个权限 17 | * 18 | * @param context 19 | * @param permission 20 | * @return 21 | */ 22 | public static boolean hasPermission(Context context, String permission) { 23 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 24 | if (context.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) { 25 | return false; 26 | } 27 | } 28 | return true; 29 | } 30 | 31 | /** 32 | * 弹出对话框请求权限 33 | * 34 | * @param activity 35 | * @param permissions 36 | * @param requestCode 37 | */ 38 | public static void requestPermissions(Activity activity, String[] permissions, int requestCode) { 39 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 40 | activity.requestPermissions(permissions, requestCode); 41 | } 42 | } 43 | 44 | /** 45 | * 返回缺失的权限 46 | * 47 | * @param context 48 | * @param permissions 49 | * @return 返回缺少的权限,null 意味着没有缺少权限 50 | */ 51 | public static String[] getDeniedPermissions(Context context, String[] permissions) { 52 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 53 | ArrayList deniedPermissionList = new ArrayList<>(); 54 | for (String permission : permissions) { 55 | if (context.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) { 56 | deniedPermissionList.add(permission); 57 | } 58 | } 59 | int size = deniedPermissionList.size(); 60 | if (size > 0) { 61 | return deniedPermissionList.toArray(new String[deniedPermissionList.size()]); 62 | } 63 | } 64 | return null; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/TVPlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.util.Log; 6 | import android.view.View; 7 | import android.view.ViewGroup; 8 | import android.widget.Button; 9 | import android.widget.LinearLayout; 10 | 11 | import com.lhy.xposed.mhzs.helper.Constant; 12 | import com.lhy.xposed.mhzs.helper.LogUtil; 13 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 14 | 15 | import java.lang.reflect.Field; 16 | 17 | import de.robv.android.xposed.XC_MethodHook; 18 | import de.robv.android.xposed.XposedHelpers; 19 | 20 | /** 21 | * TV投屏功能 22 | * @time 2019年3月10日 23 | * @author lhy 24 | */ 25 | public class TVPlugin implements IPlugin { 26 | @Override 27 | public void run(final ClassLoader classLoader) throws Throwable { 28 | 29 | XposedHelpers.findAndHookMethod(Constant.prst.$PlayerPresenter, classLoader, "c", int.class, new XC_MethodHook() { 30 | @Override 31 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 32 | super.beforeHookedMethod(param); 33 | } 34 | 35 | @Override 36 | protected void afterHookedMethod(MethodHookParam param) throws Throwable { 37 | super.afterHookedMethod(param); 38 | LogUtil.e("--TV Plugin--" + param.args[0]); 39 | if ((int) param.args[0] == 1 || (int) param.args[0] == 9) { 40 | Class tableCommodityClazz = classLoader.loadClass(Constant.db.$TableCommodity); 41 | Object object = tableCommodityClazz.newInstance(); 42 | Field hasFlag = XposedHelpers.findField(tableCommodityClazz, "hasFlag"); 43 | hasFlag.setAccessible(true); 44 | hasFlag.setInt(object, 1); 45 | Boolean b = XposedHelpers.getStaticBooleanField(classLoader.loadClass(Constant.act.$PlayerActivity), "q"); 46 | LogUtil.e("----" + b); 47 | param.setResult(object); 48 | } 49 | } 50 | }); 51 | } 52 | 53 | @Override 54 | public boolean isOpen() { 55 | return XPrefUtils.getPref().getBoolean("tv_screen", false); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/bean/M3u8FormatBean.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.bean; 2 | 3 | 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | /** 7 | * M3u8FormatBean 8 | * 麻花影视 2.5.0之前 9 | */ 10 | @Deprecated 11 | public class M3u8FormatBean { 12 | @SerializedName(value = "1080P") 13 | private String _$1080P; 14 | @SerializedName(value = "360P") 15 | private String _$360P; 16 | @SerializedName(value = "480P") 17 | private String _$480P; 18 | @SerializedName(value = "720P") 19 | private String _$720P; 20 | private String free; 21 | 22 | public String getM3u8Format(int i) { 23 | if (i == 0) { 24 | if (get_$360P() != null) { 25 | return get_$360P(); 26 | } 27 | return null; 28 | } else if (i == 1) { 29 | if (get_$480P() != null) { 30 | return get_$480P(); 31 | } 32 | return null; 33 | } else if (i == 2) { 34 | if (get_$720P() != null) { 35 | return get_$720P(); 36 | } 37 | return null; 38 | } else if (i == 3) { 39 | if (get_$1080P() != null) { 40 | return get_$1080P(); 41 | } 42 | return null; 43 | } else if (i != -1 || getFree() == null) { 44 | return null; 45 | } else { 46 | return getFree(); 47 | } 48 | } 49 | 50 | public String get_$720P() { 51 | return this._$720P; 52 | } 53 | 54 | public void set_$720P(String str) { 55 | this._$720P = str; 56 | } 57 | 58 | public String getFree() { 59 | return this.free; 60 | } 61 | 62 | public void setFree(String str) { 63 | this.free = str; 64 | } 65 | 66 | public String get_$480P() { 67 | return this._$480P; 68 | } 69 | 70 | public void set_$480P(String str) { 71 | this._$480P = str; 72 | } 73 | 74 | public String get_$360P() { 75 | return this._$360P; 76 | } 77 | 78 | public void set_$360P(String str) { 79 | this._$360P = str; 80 | } 81 | 82 | public String get_$1080P() { 83 | return this._$1080P; 84 | } 85 | 86 | public void set_$1080P(String str) { 87 | this._$1080P = str; 88 | } 89 | } -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/permission/PermissionHelper.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.permission; 2 | 3 | import android.app.Activity; 4 | import android.content.pm.PackageManager; 5 | 6 | import androidx.annotation.NonNull; 7 | 8 | /** 9 | * 动态权限帮助类 10 | */ 11 | public class PermissionHelper { 12 | 13 | private Activity mActivity; 14 | private PermissionInterface mPermissionInterface; 15 | 16 | public PermissionHelper(@NonNull Activity activity, @NonNull PermissionInterface permissionInterface) { 17 | mActivity = activity; 18 | mPermissionInterface = permissionInterface; 19 | } 20 | 21 | /** 22 | * 开始请求权限。 23 | * 方法内部已经对Android M 或以上版本进行了判断,外部使用不再需要重复判断。 24 | * 如果设备还不是M或以上版本,则也会回调到requestPermissionsSuccess方法。 25 | */ 26 | public void requestPermissions(){ 27 | String[] deniedPermissions = PermissionUtil.getDeniedPermissions(mActivity, mPermissionInterface.getPermissions()); 28 | if(deniedPermissions != null && deniedPermissions.length > 0){ 29 | PermissionUtil.requestPermissions(mActivity, deniedPermissions, mPermissionInterface.getPermissionsRequestCode()); 30 | }else{ 31 | mPermissionInterface.requestPermissionsSuccess(); 32 | } 33 | } 34 | 35 | /** 36 | * 在Activity中的onRequestPermissionsResult中调用 37 | * @param requestCode 38 | * @param permissions 39 | * @param grantResults 40 | * @return true 代表对该requestCode感兴趣,并已经处理掉了。false 对该requestCode不感兴趣,不处理。 41 | */ 42 | public boolean requestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults){ 43 | if(requestCode == mPermissionInterface.getPermissionsRequestCode()){ 44 | boolean isAllGranted = true;//是否全部权限已授权 45 | for(int result : grantResults){ 46 | if(result == PackageManager.PERMISSION_DENIED){ 47 | isAllGranted = false; 48 | break; 49 | } 50 | } 51 | if(isAllGranted){ 52 | //已全部授权 53 | mPermissionInterface.requestPermissionsSuccess(); 54 | }else{ 55 | //权限有缺失 56 | mPermissionInterface.requestPermissionsFail(); 57 | } 58 | return true; 59 | } 60 | return false; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/activity/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.activity; 2 | 3 | import android.Manifest; 4 | import android.graphics.Color; 5 | 6 | import com.lhy.xposed.mhzs.fragment.SettingFragment; 7 | import com.lhy.xposed.mhzs.helper.ToastUtils; 8 | import com.lhy.xposed.mhzs.permission.PermissionHelper; 9 | import com.lhy.xposed.mhzs.permission.PermissionInterface; 10 | 11 | import androidx.annotation.NonNull; 12 | import androidx.appcompat.widget.Toolbar; 13 | import cn.bmob.v3.update.BmobUpdateAgent; 14 | 15 | 16 | public class MainActivity extends BaseActivity implements PermissionInterface { 17 | private PermissionHelper mPermissionHelper; 18 | 19 | @Override 20 | protected void initToolbar(Toolbar mToolbar) { 21 | mToolbar.setTitle("麻花影视助手"); 22 | mToolbar.setTitleTextColor(Color.WHITE); 23 | setSupportActionBar(mToolbar); 24 | getSupportActionBar().setDisplayHomeAsUpEnabled(false); 25 | } 26 | 27 | @Override 28 | protected void initView() { 29 | BmobUpdateAgent.setUpdateOnlyWifi(false); 30 | BmobUpdateAgent.update(this); 31 | } 32 | 33 | @Override 34 | public void initData() { 35 | switchFragment(new SettingFragment()); 36 | //初始化并发起权限申请 37 | mPermissionHelper = new PermissionHelper(this, this); 38 | mPermissionHelper.requestPermissions(); 39 | } 40 | 41 | @Override 42 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { 43 | if (mPermissionHelper.requestPermissionsResult(requestCode, permissions, grantResults)) { 44 | //权限请求结果,并已经处理了该回调 45 | return; 46 | } 47 | super.onRequestPermissionsResult(requestCode, permissions, grantResults); 48 | } 49 | 50 | @Override 51 | public int getPermissionsRequestCode() { 52 | return 19680; 53 | } 54 | 55 | @Override 56 | public String[] getPermissions() { 57 | return new String[]{ 58 | Manifest.permission.WRITE_EXTERNAL_STORAGE, 59 | Manifest.permission.READ_EXTERNAL_STORAGE, 60 | }; 61 | } 62 | 63 | @Override 64 | public void requestPermissionsSuccess() { 65 | 66 | } 67 | 68 | @Override 69 | public void requestPermissionsFail() { 70 | ToastUtils.toast(this, "应用需要权限才能正常运行!"); 71 | finish(); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/helper/FileUtils.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.helper; 2 | 3 | import android.content.Context; 4 | import android.os.Environment; 5 | 6 | import com.lhy.xposed.mhzs.BuildConfig; 7 | 8 | import java.io.File; 9 | import java.io.FileInputStream; 10 | import java.io.FileOutputStream; 11 | import java.io.IOException; 12 | 13 | 14 | /** 15 | * Created by zpp0196 on 2019/2/9. 16 | */ 17 | 18 | public class FileUtils { 19 | private static final String FILE_PREF_NAME = BuildConfig.APPLICATION_ID + "_preferences.xml"; 20 | 21 | public static boolean copyFile(File srcFile, File targetFile) { 22 | FileInputStream ins = null; 23 | FileOutputStream out = null; 24 | try { 25 | if (targetFile.exists()) { 26 | targetFile.delete(); 27 | } 28 | File targetParent = targetFile.getParentFile(); 29 | if (!targetParent.exists()) { 30 | targetParent.mkdirs(); 31 | } 32 | targetFile.createNewFile(); 33 | ins = new FileInputStream(srcFile); 34 | out = new FileOutputStream(targetFile); 35 | byte[] b = new byte[1024]; 36 | int n; 37 | while ((n = ins.read(b)) != -1) { 38 | out.write(b, 0, n); 39 | } 40 | } catch (IOException e) { 41 | e.printStackTrace(); 42 | return false; 43 | } finally { 44 | try { 45 | if (ins != null) { 46 | ins.close(); 47 | } 48 | if (out != null) { 49 | out.close(); 50 | } 51 | } catch (IOException e) { 52 | e.printStackTrace(); 53 | } 54 | } 55 | return true; 56 | } 57 | 58 | public static File getDataDir(Context context) { 59 | return new File(context.getApplicationInfo().dataDir); 60 | } 61 | 62 | public static File getPrefDir(Context context) { 63 | return new File(getDataDir(context), "shared_prefs"); 64 | } 65 | 66 | public static File getDefaultPrefFile(Context context) { 67 | return new File(getPrefDir(context), FILE_PREF_NAME); 68 | } 69 | 70 | public static File getBackupPrefsFile() { 71 | return new File(getBackupDir(), FILE_PREF_NAME); 72 | } 73 | 74 | private static File getBackupDir() { 75 | return new File(Environment.getExternalStorageDirectory(), "QQPurify"); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/NoUpdatePlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import com.lhy.xposed.mhzs.helper.Constant; 4 | import com.lhy.xposed.mhzs.helper.LogUtil; 5 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 6 | 7 | import java.lang.reflect.Method; 8 | 9 | import de.robv.android.xposed.XC_MethodHook; 10 | import de.robv.android.xposed.XposedBridge; 11 | import de.robv.android.xposed.XposedHelpers; 12 | 13 | /** 14 | * 去除主界面提示升级的对话框 15 | *

16 | * 该插件全版本通用 17 | * 18 | * @author lhy 19 | * @time 2019年2月27日16:22:31 20 | */ 21 | public class NoUpdatePlugin implements IPlugin { 22 | private final String channelResponseClassName = "com.mh.movie.core.mvp.model.entity.response.ChannelResponse"; 23 | 24 | @Override 25 | public void run(ClassLoader classLoader) throws Throwable { 26 | /** 27 | * 方法1:直接返回null 28 | */ 29 | // TODO: 2019/2/27 0027 与 EXP/VXP 可能会冲突 30 | // XposedHelpers.findAndHookMethod(channelResponseClassName, classLoader, "getUrl", new XC_MethodHook() { 31 | // @Override 32 | // protected void afterHookedMethod(MethodHookParam param) throws Throwable { 33 | // super.afterHookedMethod(param); 34 | // LogUtil.e("Hook ChannelResponse!"); 35 | // param.setResult(null); 36 | // } 37 | // }); 38 | 39 | /** 40 | * 方法2:另辟蹊径 41 | * 42 | * 此变量名版本更新可能会改变 43 | */ 44 | final Class channelResponseClazz = classLoader.loadClass(channelResponseClassName); 45 | XposedHelpers.findAndHookMethod(Constant.act.$MainActivity, classLoader, "a", channelResponseClazz, new XC_MethodHook() { 46 | @Override 47 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 48 | super.afterHookedMethod(param); 49 | LogUtil.e("Hook MainActivity No Update!"); 50 | Object o = channelResponseClazz.cast(param.args[0]); 51 | XposedHelpers.findMethodBestMatch(channelResponseClazz, "setUrl", String.class); 52 | Method setUrlMethod = channelResponseClazz.getMethod("setUrl", String.class); 53 | setUrlMethod.invoke(o, ""); 54 | // XposedBridge.invokeOriginalMethod(setUrlMethod, o, new Object[]{""}); 55 | } 56 | }); 57 | } 58 | 59 | @Override 60 | public boolean isOpen() { 61 | return XPrefUtils.getPref().getBoolean("no_update", false); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/bean/VideoInfoBean.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.bean; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | /** 6 | * VideoInfoBean 7 | * 麻花影视 2.5.0之前 8 | */ 9 | @Deprecated 10 | public class VideoInfoBean { 11 | private String code; 12 | @SerializedName(value = "data") 13 | private DataBean dataBean; 14 | private String description; 15 | private String imgAddr; 16 | private boolean success; 17 | private String videoAddr; 18 | 19 | public DataBean getDataBean() { 20 | return this.dataBean; 21 | } 22 | 23 | public void setDataBean(DataBean dataBean) { 24 | this.dataBean = dataBean; 25 | } 26 | 27 | public String getCode() { 28 | return this.code; 29 | } 30 | 31 | public void setCode(String str) { 32 | this.code = str; 33 | } 34 | 35 | public String getDescription() { 36 | return this.description; 37 | } 38 | 39 | public void setDescription(String str) { 40 | this.description = str; 41 | } 42 | 43 | public String getImgAddr() { 44 | return this.imgAddr; 45 | } 46 | 47 | public void setImgAddr(String str) { 48 | this.imgAddr = str; 49 | } 50 | 51 | public boolean isSuccess() { 52 | return this.success; 53 | } 54 | 55 | public void setSuccess(boolean z) { 56 | this.success = z; 57 | } 58 | 59 | public String getVideoAddr() { 60 | return this.videoAddr; 61 | } 62 | 63 | public void setVideoAddr(String str) { 64 | this.videoAddr = str; 65 | } 66 | 67 | public String toString() { 68 | StringBuilder stringBuilder = new StringBuilder(); 69 | stringBuilder.append("VideoInfo{dataBean="); 70 | stringBuilder.append(this.dataBean); 71 | stringBuilder.append(", code='"); 72 | stringBuilder.append(this.code); 73 | stringBuilder.append('\''); 74 | stringBuilder.append(", description='"); 75 | stringBuilder.append(this.description); 76 | stringBuilder.append('\''); 77 | stringBuilder.append(", imgAddr='"); 78 | stringBuilder.append(this.imgAddr); 79 | stringBuilder.append('\''); 80 | stringBuilder.append(", success="); 81 | stringBuilder.append(this.success); 82 | stringBuilder.append(", videoAddr='"); 83 | stringBuilder.append(this.videoAddr); 84 | stringBuilder.append('\''); 85 | stringBuilder.append('}'); 86 | return stringBuilder.toString(); 87 | } 88 | } -------------------------------------------------------------------------------- /app/src/main/java/com/lhy/xposed/mhzs/plugin/ClearBootAdPlugin.java: -------------------------------------------------------------------------------- 1 | package com.lhy.xposed.mhzs.plugin; 2 | 3 | import android.content.Context; 4 | 5 | import com.lhy.xposed.mhzs.helper.LogUtil; 6 | import com.lhy.xposed.mhzs.helper.XPrefUtils; 7 | 8 | import de.robv.android.xposed.XC_MethodHook; 9 | import de.robv.android.xposed.XposedHelpers; 10 | 11 | /** 12 | * 清理启动页的广告,5s启动 13 | * 14 | * @author lhy 15 | * @time 2019年2月16日13:12:33 16 | */ 17 | public class ClearBootAdPlugin implements IPlugin { 18 | 19 | private final String dataHelperClassName = "com.jess.arms.c.d"; 20 | private final String constantsClassName = "com.mh.movie.core.mvp.ui.b"; 21 | private final String loginResponseClassName = "com.mh.movie.core.mvp.model.entity.response.LoginResponse"; 22 | 23 | @Override 24 | public void run(final ClassLoader classLoader) throws Throwable { 25 | /** 26 | * 禁止加载广告历史记录 27 | * 28 | * 【方法1】 29 | * 此变量名版本更新可能会改变 30 | */ 31 | // XposedHelpers.setStaticObjectField(classLoader.loadClass(constantsClassName), "w", "splash_no_ad_list"); 32 | 33 | /** 34 | * 【方法2】 35 | * 此变量名版本更新可能会改变,但改变的几率很小 36 | */ 37 | XposedHelpers.findAndHookMethod(dataHelperClassName, classLoader, "a", Context.class, String.class, 38 | new XC_MethodHook() { 39 | @Override 40 | protected void beforeHookedMethod(MethodHookParam param) throws Throwable { 41 | super.beforeHookedMethod(param); 42 | if ((param.args[1] + "").equals("splash_ad_list")) { 43 | param.args[1] = "splash_no_ad_list"; 44 | LogUtil.e(param.args[1] + "---"); 45 | } 46 | } 47 | }); 48 | /** 49 | * 将AdList设置为空 50 | * 清除5s启动已经包含此功能 51 | */ 52 | // TODO: 2019/2/22 0022 Exposed/VXP ISSUE--TOO SHORT METHOD!!! 53 | // XposedHelpers.findAndHookMethod(loginResponseClassName, classLoader, "getAdsList", new XC_MethodHook() { 54 | // @Override 55 | // protected void afterHookedMethod(MethodHookParam param) throws Throwable { 56 | // super.afterHookedMethod(param); 57 | // LogUtil.e("hook getAdsList null!"); 58 | // param.setResult(null); 59 | // } 60 | // }); 61 | 62 | } 63 | 64 | @Override 65 | public boolean isOpen() { 66 | return XPrefUtils.getPref().getBoolean("ad_boot", true); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_feedback.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 17 | 18 | 19 | 20 | 25 | 26 | 33 | 34 | 40 | 41 | 48 | 49 | 56 | 57 |