闲鱼、盒马跳过用户协议
盒马
方法一
com.wudaokou.hippo.launcher.splash.SplashActivity.onCreate

| XposedHelpers.findAndHookMethod("com.wudaokou.hippo.launcher.util.StorageUtils", classLoader, "a", "android.content.Context","java.lang.String",boolean.class, new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { super.beforeHookedMethod(param); } @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { super.afterHookedMethod(param); Object key = param.args[1]; if("agreement_confirm".equals(key)){ param.setResult(true); } } });
|
方法2
com.wudaokou.hippo.launcher.agreement.AgreementPopupDialog.bindListener()
模拟点击
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| package com.wudaokou.hippo.launcher.agreement;
public class AgreementPopupDialog extends FrameLayout { public void bindListener() { IpChange ipChange0 = AgreementPopupDialog.$ipChange; if(ipChange0 != null && ((ipChange0 instanceof IpChange))) { ipChange0.ipc$dispatch("1d54d418", new Object[]{this}); return; }
View view0 = this.findViewById(id.accept); if(view0 != null) { view0.setOnClickListener((View view0) -> { IpChange ipChange0 = AgreementPopupDialog.$ipChange; if(ipChange0 != null && ((ipChange0 instanceof IpChange))) { ipChange0.ipc$dispatch("4b9470d1", new Object[]{this, view0}); return; }
ICallback agreementPopupDialog$ICallback0 = this.mCallback; if(agreementPopupDialog$ICallback0 != null) { agreementPopupDialog$ICallback0.a(); } }); }
View view1 = this.findViewById(id.deny); if(view1 != null) { view1.setOnClickListener((View view0) -> { IpChange ipChange0 = AgreementPopupDialog.$ipChange; if(ipChange0 != null && ((ipChange0 instanceof IpChange))) { ipChange0.ipc$dispatch("4795ffb0", new Object[]{this, view0}); return; }
ICallback agreementPopupDialog$ICallback0 = this.mCallback; if(agreementPopupDialog$ICallback0 != null) { agreementPopupDialog$ICallback0.b(); } }); } } ...
|
| XposedHelpers.findAndHookMethod("com.wudaokou.hippo.launcher.agreement.AgreementPopupDialog", classLoader, "bindListener", new XC_MethodHook() { @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { super.beforeHookedMethod(param); log("AgreementPopupDialog beforeHookedMethod..."); } @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { super.afterHookedMethod(param); View acceptButton = (View) XposedHelpers.callMethod(param.thisObject, "findViewById", 0x7F090050); if (acceptButton != null) { acceptButton.performClick(); } } });
|
闲鱼
com.taobao.fleamarket.home.activity.InitActivity.showPrivacyDialog()

com.taobao.fleamarket.home.activity.InitActivity.handleJumpUrl()
| AppLifecycleTracker.SHOW_PRIVACY_DIALOG = Boolean.valueOf(((boolean)(((TaoBaoApplication)this.getApplication()).authorizedGeneral() ^ 1)));
if(!AppLifecycleTracker.SHOW_PRIVACY_DIALOG.booleanValue()) { this.mJumpByDhh = this.launchAppForGrowth(); }
this.showPrivacyDialog();
|
com.taobao.idlefish.launcher.derived.LaunchApplication.authorizedGeneral()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| package com.taobao.idlefish.launcher.derived;
public class LaunchApplication extends Application { protected volatile boolean authorized; protected volatile boolean authorizedOld; private String mProcessName; protected static final String sLocalProvacyKey = "user_provacy_policy_new"; protected static final String sLocalProvacyKeyOld = "user_provacy_policy";
public boolean authorizedGeneral() { return (this.authorized) || (this.authorizedOld); }
private void putPrivacyVal(String s) { this.getSharedPreferences(s, 0).edit().putBoolean(s, true).apply(); }
public void setAuthorized() { this.authorized = true; this.authorizedOld = true; this.putPrivacyVal("user_provacy_policy_new"); this.putPrivacyVal("user_provacy_policy"); }
protected void waitTaskFinish() { AsyncTaskDispatch.instance().waitAllFinished(); } }
|
| XposedHelpers.findAndHookMethod("com.taobao.idlefish.launcher.derived.LaunchApplication", classLoader, "authorizedGeneral", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { super.afterHookedMethod(param); param.setResult(true); } });
|