Xpsoed hook TikTok

实现原理非常简单

只需要需改SIM卡的运营商名称即可,比如CN代表中国,JP待变日本。

核心Hook代码一行代码

XposedBridge.hookAllMethods(TelephonyManager.class, "getSimCountryIso", new XC_MethodHook() {
            @Override
            protected void afterHookedMethod(MethodHookParam param) throws Throwable {
                super.afterHookedMethod(param);
    
                param.setResult(C_CODE);
            }
        });

完整代码:

public class TikTokMethodList extends HookMethodList {


    private static String C_CODE = "JP";
    private static String C_NAME = "日本";

    public static void initTikTok(final XC_LoadPackage.LoadPackageParam loadPackageParam) {
        LogXUtils.e("进入TikTokHOOK生效---");
        XposedBridge.hookAllMethods(TelephonyManager.class, "getSimCountryIso", new XC_MethodHook() {
            @Override
            protected void afterHookedMethod(MethodHookParam param) throws Throwable {
                super.after

猜你喜欢

转载自blog.csdn.net/lw_zhaoritian/article/details/103967326