学小易修改apk去除广告方法失效,只要重新签名apk,就会导致搜题不成功。无奈学习尝试frida。
思路:和修改apk一样,将类com.bytedance.sdk.openadsdk.TTAdConfig 下的方法getAppId 赋值为0
frida代码:
import frida
import sys
jscode = """
Java.perform(function(){
var Adconfig = Java.use('com.bytedance.sdk.openadsdk.TTAdConfig');
Adconfig.getAppId.implementation = function(){
return 0
}
});
"""
def on_message(message,data):
print(message)
process =frida.get_usb_device().attach('学小易')
script =process.create_script(jscode)
script.on('message',on_message)
script.load()
sys.stdin.read()
|