Android Adguard Crack
Adguard is a good ad blocker, but it needs $9.95/year or $24.95/lifetime, and you can get a cracked version from internet, but the cracked version is not newest. So, I wrote a xposed module to crack Adguard, it can crack the newest version.
The xposed module' core source is:
package com.lanyus.adguardcrack;
import java.util.Date;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage;
/**
* Created by ilanyu on 2016/8/9.
*/
public class Main implements IXposedHookLoadPackage {
@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
if (!lpparam.packageName.equals("com.adguard.android")) {
return;
}
XposedHelpers.findAndHookMethod("android.app.SharedPreferencesImpl", lpparam.classLoader, "getLong", String.class, long.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
if (param.args[0].equals("application_premium_expiration_date")) {
param.setResult(0L);
XposedBridge.log("set application_premium_expiration_date to 0L");
}
if (param.args[0].equals("last_license_check_date")) {
param.setResult(System.currentTimeMillis());
XposedBridge.log("set last_license_check_date to " + new Date(System.currentTimeMillis()));
}
}
});
XposedHelpers.findAndHookMethod("android.app.SharedPreferencesImpl", lpparam.classLoader, "getBoolean", String.class, boolean.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
if (param.args[0].equals("application_trial_license")) {
param.setResult(false);
XposedBridge.log("set application_trial_license to false");
}
if (param.args[0].equals("application_premium")) {
param.setResult(true);
XposedBridge.log("set application_premium to true");
}
}
});
XposedHelpers.findAndHookMethod("android.app.SharedPreferencesImpl", lpparam.classLoader, "getString", String.class, String.class, new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
if (param.args[0].equals("key_last_import_rule")) {
if (param.getResult() == null || param.args[1].toString().equals(param.getResult().toString())) {
param.setResult("http://update.adbyby.com/rule3/lazy.jpg");
XposedBridge.log("set key_last_import_rule to http://update.adbyby.com/rule3/lazy.jpg");
}
}
}
});
}
}
The xposed module download link is:
https://drive.google.com/open?id=0Bx7wGDIg2K-7X0JrNG9YZ0ZJc0k
It can crack adguard of 2.6.108 version, 2.7.220 version and so on.
The Android Adguard download link is:
https://github.com/AdguardTeam/AdguardForAndroid/releases
If you think the app is great, please buy a license from
https://adguard.com/en/license.html
nice job
楼主,这个跟shadowsocks怎么共存?
@abc
ss那用NAT模式, adguard那用vpn模式