├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── xposed_init │ ├── java │ └── com │ │ └── wind │ │ └── fuckads │ │ ├── HookManager.kt │ │ ├── PluginEntry.kt │ │ ├── Utils.java │ │ ├── hook │ │ ├── IQiyiHook.kt │ │ ├── KuwoVipHook.kt │ │ └── TencentVideoHook.kt │ │ └── ui │ │ └── MainActivity.kt │ └── res │ ├── drawable-v24 │ └── no_evil_monkey.xml │ ├── drawable │ └── ic_launcher_foreground.xml │ ├── layout │ ├── activity_main.xml │ └── content_main.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ └── values │ ├── colors.xml │ ├── dimens.xml │ ├── ic_launcher_background.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.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 | .idea/ 16 | app/release/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](https://upload-images.jianshu.io/upload_images/1639238-d39849bfa8575dca.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/280) 2 | 3 | ## 声明 4 | **本工程的内容仅能用于学习和研究,请勿用于任何商业用途,否则由此带来的法律责任由操作者自己承担,和本人无关。** 5 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | apply plugin: 'kotlin-android' 4 | 5 | apply plugin: 'kotlin-android-extensions' 6 | 7 | android { 8 | compileSdkVersion 28 9 | defaultConfig { 10 | applicationId "com.wind.fuckads" 11 | minSdkVersion 21 12 | targetSdkVersion 28 13 | versionCode 3 14 | versionName "1.3" 15 | } 16 | buildTypes { 17 | debug { 18 | minifyEnabled false 19 | shrinkResources false 20 | } 21 | release { 22 | minifyEnabled true 23 | shrinkResources true 24 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 25 | } 26 | } 27 | } 28 | 29 | dependencies { 30 | implementation fileTree(dir: 'libs', include: ['*.jar']) 31 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 32 | implementation 'com.android.support:appcompat-v7:28.0.0' 33 | 34 | implementation 'com.android.support.constraint:constraint-layout:1.1.3' 35 | compileOnly 'de.robv.android.xposed:api:53' 36 | compileOnly 'de.robv.android.xposed:api:53:sources' 37 | } 38 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class com.wind.fuckads.PluginEntry 2 | 3 | -keep class de.robv.android.xposed.* 4 | -keepclassmembers class de.robv.android.xposed.* { 5 | *; 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 28 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | com.wind.fuckads.PluginEntry -------------------------------------------------------------------------------- /app/src/main/java/com/wind/fuckads/HookManager.kt: -------------------------------------------------------------------------------- 1 | package com.wind.fuckads 2 | 3 | import com.wind.fuckads.hook.IQiyiHook 4 | import com.wind.fuckads.hook.KuwoVipHook 5 | import com.wind.fuckads.hook.TencentVideoHook 6 | import de.robv.android.xposed.IXposedHookLoadPackage 7 | import de.robv.android.xposed.callbacks.XC_LoadPackage 8 | 9 | /** 10 | * Created by Wind 11 | */ 12 | object HookManager { 13 | 14 | private val hookClassList = hashSetOf() 15 | 16 | fun startHook(lpparam: XC_LoadPackage.LoadPackageParam) { 17 | hookClassList.forEach { it.handleLoadPackage(lpparam) } 18 | } 19 | 20 | fun registHookClass(hookerList: List) { 21 | hookClassList.addAll(hookerList) 22 | } 23 | 24 | init { 25 | registHookClass( 26 | arrayListOf( 27 | TencentVideoHook(), 28 | IQiyiHook(), 29 | KuwoVipHook() 30 | ) 31 | ) 32 | } 33 | } -------------------------------------------------------------------------------- /app/src/main/java/com/wind/fuckads/PluginEntry.kt: -------------------------------------------------------------------------------- 1 | package com.wind.fuckads 2 | 3 | import de.robv.android.xposed.IXposedHookLoadPackage 4 | import de.robv.android.xposed.callbacks.XC_LoadPackage 5 | 6 | /** 7 | * Created by Wind 8 | */ 9 | class PluginEntry : IXposedHookLoadPackage { 10 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 11 | HookManager.startHook(lpparam) 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/wind/fuckads/Utils.java: -------------------------------------------------------------------------------- 1 | package com.wind.fuckads; 2 | 3 | import android.content.Context; 4 | import android.util.Log; 5 | import de.robv.android.xposed.XC_MethodHook; 6 | 7 | import java.io.BufferedReader; 8 | import java.io.Closeable; 9 | import java.io.InputStream; 10 | import java.io.InputStreamReader; 11 | import java.lang.reflect.Field; 12 | 13 | public class Utils { 14 | 15 | private static final String TAG = Utils.class.getSimpleName(); 16 | 17 | public static void xposedLog(String tag, XC_MethodHook.MethodHookParam param, boolean stackTrace) { 18 | StringBuilder build = new StringBuilder(); 19 | if (param.args != null && param.args.length > 0) { 20 | int index = 0; 21 | for (Object arg : param.args) { 22 | build.append(" arg[" + index + "] = " + arg); 23 | index++; 24 | } 25 | } 26 | if (stackTrace) { 27 | Log.e(TAG, tag + " this = " + param.thisObject + " \n " + build.toString() + " result = " + param.getResult(), 28 | new Exception("showLogTrace -- method = " + param.method.getName())); 29 | } else { 30 | Log.e(TAG, tag + " this = " + param.thisObject + " method = " + param.method.getName() + 31 | " \n " + build.toString() + " result = " + param.getResult()); 32 | } 33 | } 34 | 35 | public static String readTextFromAssets(Context context, String assetsFileName) { 36 | if (context == null) { 37 | return null; 38 | } 39 | try { 40 | InputStream is = context.getAssets().open(assetsFileName); 41 | return readTextFromInputStream(is); 42 | } catch (Exception e) { 43 | e.printStackTrace(); 44 | } 45 | return null; 46 | } 47 | 48 | public static String readTextFromInputStream(InputStream is) { 49 | InputStreamReader reader = null; 50 | BufferedReader bufferedReader = null; 51 | try { 52 | reader = new InputStreamReader(is, "UTF-8"); 53 | bufferedReader = new BufferedReader(reader); 54 | StringBuilder builder = new StringBuilder(); 55 | String str; 56 | while ((str = bufferedReader.readLine()) != null) { 57 | builder.append(str); 58 | } 59 | return builder.toString(); 60 | } catch (Exception e) { 61 | e.printStackTrace(); 62 | } finally { 63 | closeSafely(reader); 64 | closeSafely(bufferedReader); 65 | } 66 | return null; 67 | } 68 | 69 | private static void closeSafely(Closeable closeable) { 70 | try { 71 | if (closeable != null) { 72 | closeable.close(); 73 | } 74 | } catch (Exception e) { 75 | e.printStackTrace(); 76 | } 77 | } 78 | 79 | public static String readAttributeValue(Object obj) { 80 | String nameVlues = ""; 81 | //得到class 82 | Class cls = obj.getClass(); 83 | //得到所有属性 84 | Field[] fields = cls.getDeclaredFields(); 85 | for (int i = 0; i < fields.length; i++) {//遍历 86 | try { 87 | //得到属性 88 | Field field = fields[i]; 89 | //打开私有访问 90 | field.setAccessible(true); 91 | //获取属性 92 | String name = field.getName(); 93 | //获取属性值 94 | Object value = field.get(obj); 95 | //一个个赋值 96 | nameVlues += name + " --> " + value + " \n "; 97 | } catch (IllegalAccessException e) { 98 | e.printStackTrace(); 99 | } 100 | } 101 | 102 | int lastIndex = nameVlues.lastIndexOf("\n"); 103 | //不要最后一个逗号"," 104 | String result = nameVlues.substring(0, lastIndex); 105 | return result; 106 | } 107 | 108 | public static String readAttributeValue(Class cls, Object obj) { 109 | String nameVlues = ""; 110 | //得到所有属性 111 | Field[] fields = cls.getDeclaredFields(); 112 | for (int i = 0; i < fields.length; i++) {//遍历 113 | try { 114 | //得到属性 115 | Field field = fields[i]; 116 | //打开私有访问 117 | field.setAccessible(true); 118 | //获取属性 119 | String name = field.getName(); 120 | //获取属性值 121 | Object value = field.get(obj); 122 | //一个个赋值 123 | nameVlues += name + " --> " + value + " \n "; 124 | } catch (IllegalAccessException e) { 125 | e.printStackTrace(); 126 | } 127 | } 128 | 129 | int lastIndex = nameVlues.lastIndexOf("\n"); 130 | //不要最后一个逗号"," 131 | String result = nameVlues.substring(0, lastIndex); 132 | return result; 133 | } 134 | 135 | public static String readAllFieldValue(Object obj) { 136 | Class cls = obj.getClass(); 137 | String value = ""; 138 | while (cls != null && !cls.isAssignableFrom(Object.class)) { 139 | value += readAttributeValue(cls, obj); 140 | cls = cls.getSuperclass(); 141 | } 142 | return value; 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /app/src/main/java/com/wind/fuckads/hook/IQiyiHook.kt: -------------------------------------------------------------------------------- 1 | package com.wind.fuckads.hook 2 | 3 | import de.robv.android.xposed.IXposedHookLoadPackage 4 | import de.robv.android.xposed.XC_MethodHook 5 | import de.robv.android.xposed.XC_MethodReplacement 6 | import de.robv.android.xposed.XposedHelpers 7 | import de.robv.android.xposed.callbacks.XC_LoadPackage 8 | import java.util.* 9 | 10 | /** 11 | * Created by Wind 12 | */ 13 | class IQiyiHook : IXposedHookLoadPackage { 14 | 15 | private val IQIYI_PACKAGE_NAME = "com.qiyi.video" 16 | 17 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 18 | 19 | val packageName = lpparam.packageName 20 | val classLoader = lpparam.classLoader 21 | 22 | if (packageName != IQIYI_PACKAGE_NAME) { 23 | return 24 | } 25 | 26 | XposedHelpers.findAndHookMethod("com.iqiyi.video.qyplayersdk.player.state.StateManager", 27 | classLoader, 28 | "updateVideoType", 29 | Int::class.java, 30 | object : XC_MethodReplacement() { 31 | override fun replaceHookedMethod(param: MethodHookParam?): Any? { 32 | return null 33 | } 34 | }) 35 | 36 | XposedHelpers.findAndHookMethod(Properties::class.java, 37 | "getProperty", 38 | String::class.java, 39 | object : XC_MethodHook() { 40 | override fun beforeHookedMethod(param: MethodHookParam) { 41 | if ("qiyi.export.key" == param.args[0]) { 42 | param.result = "59e36a5e70e4c4efc6fcbc4db7ea59c1" 43 | } 44 | } 45 | }) 46 | } 47 | } -------------------------------------------------------------------------------- /app/src/main/java/com/wind/fuckads/hook/KuwoVipHook.kt: -------------------------------------------------------------------------------- 1 | package com.wind.fuckads.hook 2 | 3 | import de.robv.android.xposed.IXposedHookLoadPackage 4 | import de.robv.android.xposed.XC_MethodHook 5 | import de.robv.android.xposed.XC_MethodHook.MethodHookParam 6 | import de.robv.android.xposed.XC_MethodReplacement 7 | import de.robv.android.xposed.XposedHelpers 8 | import de.robv.android.xposed.callbacks.XC_LoadPackage 9 | import java.lang.Exception 10 | 11 | class KuwoVipHook : IXposedHookLoadPackage { 12 | private val KUWO_MUSIC_PACAKGENAME_ARRAY = arrayOf("cn.kuwo.player", "cn.kuwo.kwmusichd") 13 | 14 | private val TAG = "KuwoVipHook"; 15 | 16 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 17 | val packageName = lpparam.packageName 18 | val classLoader = lpparam.classLoader 19 | 20 | if (!KUWO_MUSIC_PACAKGENAME_ARRAY.contains(packageName)) { 21 | return 22 | } 23 | 24 | hookVip(classLoader) // 破解vip 25 | hookScreenAd(classLoader) // 去除开屏广告 26 | } 27 | 28 | private fun hookVip(classLoader: ClassLoader) { 29 | try { 30 | XposedHelpers.findAndHookMethod( 31 | "cn.kuwo.mod.vipnew.ConsumptionQueryUtil", 32 | classLoader, 33 | "hasBought", 34 | Long::class.java, 35 | List::class.java, 36 | object : XC_MethodHook() { 37 | override fun afterHookedMethod(param: MethodHookParam) { 38 | param.result = true 39 | } 40 | } 41 | ) 42 | } catch (t: Throwable) { 43 | t.printStackTrace() 44 | } 45 | 46 | // Kuwo Music: versionCode: 9441 versionName: 9.4.4.1 47 | try { 48 | XposedHelpers.findAndHookMethod("cn.kuwo.peculiar.speciallogic.d", classLoader, 49 | "a", Long::class.javaPrimitiveType, MutableList::class.java, 50 | object : XC_MethodHook() { 51 | @Throws(Throwable::class) 52 | override fun beforeHookedMethod(param: MethodHookParam) { 53 | param.result = true 54 | super.beforeHookedMethod(param) 55 | } 56 | }) 57 | } catch (e: Exception) { 58 | e.printStackTrace() 59 | } 60 | } 61 | 62 | private fun hookScreenAd(classLoader: ClassLoader) { 63 | try { 64 | XposedHelpers.findAndHookMethod( 65 | "cn.kuwo.mod.mobilead.KWTableScreenAd", classLoader, "isExistTableScreen", 66 | XC_MethodReplacement.returnConstant(null) 67 | ) 68 | } catch (t: Throwable) { 69 | t.printStackTrace() 70 | } 71 | 72 | try { 73 | XposedHelpers.findAndHookMethod( 74 | "cn.kuwo.mod.mobilead.KuwoAdUrl\$AdUrlDef", 75 | classLoader, 76 | "getUrl", 77 | String::class.java, 78 | XC_MethodReplacement.returnConstant("") 79 | ) 80 | } catch (t: Throwable) { 81 | t.printStackTrace() 82 | } 83 | } 84 | } -------------------------------------------------------------------------------- /app/src/main/java/com/wind/fuckads/hook/TencentVideoHook.kt: -------------------------------------------------------------------------------- 1 | package com.wind.fuckads.hook 2 | 3 | import android.util.Log 4 | import de.robv.android.xposed.IXposedHookLoadPackage 5 | import de.robv.android.xposed.XC_MethodHook 6 | import de.robv.android.xposed.XposedHelpers 7 | import de.robv.android.xposed.XposedHelpers.findAndHookMethod 8 | import de.robv.android.xposed.callbacks.XC_LoadPackage 9 | 10 | /** 11 | * Created by Wind 12 | */ 13 | class TencentVideoHook : IXposedHookLoadPackage { 14 | 15 | private val TENCENT_VIDEO_PACKAGE_NAME = "com.tencent.qqlive" 16 | private val TAG = "TencentVideoHook" 17 | 18 | override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { 19 | 20 | val packageName = lpparam.packageName 21 | val classLoader = lpparam.classLoader 22 | 23 | if (packageName != TENCENT_VIDEO_PACKAGE_NAME) { 24 | return 25 | } 26 | 27 | hookVideoInfo(classLoader) 28 | hookAdCofig(classLoader) 29 | } 30 | 31 | private fun hookVideoInfo(classLoader: ClassLoader) { 32 | try { 33 | findAndHookMethod("com.tencent.qqlive.ona.player.VideoInfo", 34 | classLoader, 35 | "isAdSkip", 36 | object : XC_MethodHook() { 37 | override fun beforeHookedMethod(param: MethodHookParam) { 38 | param.result = true 39 | } 40 | }) 41 | } catch (t: Throwable) { 42 | Log.e(TAG, " hook VideoInfo failed, msg = ${t.message}", t) 43 | t.printStackTrace() 44 | } 45 | } 46 | 47 | private fun hookAdCofig(classLoader: ClassLoader) { 48 | val adConfigClassName = "com.tencent.qqlive.multimedia.tvkcommon.config.TVKMediaPlayerConfig\$AdConfig" 49 | try { 50 | XposedHelpers.findAndHookConstructor( 51 | adConfigClassName, 52 | classLoader, 53 | object : XC_MethodHook() { 54 | @Throws(Throwable::class) 55 | override fun afterHookedMethod(param: XC_MethodHook.MethodHookParam) { 56 | val fieldNameList = arrayOf( 57 | "use_ad", "pre_ad_on", "offline_video_use_ad", "loop_ad_on", 58 | "postroll_use_ad", "mid_ad_on" 59 | ) 60 | fieldNameList.forEach { 61 | setBooleanField(param.thisObject, it, false) 62 | } 63 | } 64 | }) 65 | } catch (t: Throwable) { 66 | Log.e(TAG, " hook VideoInfo AdConfig, msg = ${t.message}", t) 67 | } 68 | } 69 | 70 | private fun setBooleanField(obj: Any, fieldName: String, value: Boolean) { 71 | try { 72 | XposedHelpers.setBooleanField(obj, fieldName, value) 73 | } catch (t: Throwable) { 74 | Log.e(TAG, " setBooleanField failed, obj --> $obj fieldName --> $fieldName ", t) 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /app/src/main/java/com/wind/fuckads/ui/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.wind.fuckads.ui 2 | 3 | import android.os.Bundle 4 | import android.support.v7.app.AppCompatActivity 5 | import com.wind.fuckads.R 6 | import kotlinx.android.synthetic.main.content_main.* 7 | 8 | 9 | class MainActivity : AppCompatActivity() { 10 | 11 | override fun onCreate(savedInstanceState: Bundle?) { 12 | super.onCreate(savedInstanceState) 13 | setContentView(R.layout.content_main) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/no_evil_monkey.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 11 | 15 | 19 | 20 | 21 | 24 | 25 | 29 | 31 | 35 | 39 | 43 | 47 | 51 | 55 | 59 | 60 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 8 | 12 | 16 | 20 | 24 | 25 | 26 | 29 | 30 | 34 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 12 | 19 | 26 | 33 | 40 | 41 | 48 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /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/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #008577 4 | #00574B 5 | #D81B60 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #66A664 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | No Ads 3 | 4 | 功能简介 5 | 6 | 这是一个Xposed插件。 7 | 8 | 9 | 使用方法 10 | 11 | Root环境:\n 12 | 直接接入Xposed框架,安装此apk,然后在Xposed插件管理器中开启这个插件即可。\n\n 13 | 非Root环境:\n 14 | 使用Xpatch工具对App重打包,卸载原来的app,安装重打包后的app,安装此插件,启动App,即可实现视频去广告。\n\n 15 |     Xpatch源码:\n 16 |     https://github.com/WindySha/Xpatch \n\n 17 |     Xpatch工具下载目录:\n 18 |     https://github.com/WindySha/Xpatch/releases/tag/v1.3 19 | 20 | 21 | Xpatch命令用法 22 | 23 | Xpatch工具对APK进行重打包,重打包后的APK可以自动加载已安装的Xposed插件,从而实现对App的随意篡改。\n\n 24 | 25 | 先下载Xpatch Jar包\n 26 | 在PC上在命令行中运行如下命令:\n\n 27 | $ java -jar ../xpatch.jar ../tencent_video.apk \n\n 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 14 | 30 | 31 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext.kotlin_version = '1.3.40' 5 | repositories { 6 | google() 7 | jcenter() 8 | 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:7.0.1' 12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | 23 | } 24 | } 25 | 26 | task clean(type: Delete) { 27 | delete rootProject.buildDir 28 | } 29 | -------------------------------------------------------------------------------- /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=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # Kotlin code style for this project: "official" or "obsolete": 15 | kotlin.code.style=official 16 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WindySha/RemoveVideoAdsPlugin/121b99672f559b7abfa3e6233ce27956044b2a5a/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed May 22 00:16:05 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name='RemoveVideoAdsPlugin' 3 | --------------------------------------------------------------------------------