1、获取数据到手机内存
function main(){Java.perform(function () {var result = "";var flag = true;var JavaString =Java.use("java.lang.String");Java.choose("cn.xxx.xxxxx", {onMatch : function(instance) {for(var i = 1;i<1000;i++){if(flag){console.log(i)var word = instance.search(1,i.toString());var word_txt = JavaString.$new(word);result = result + word_txt + "\n";}}console.log("结束!")var file = new File('/data/user/0/包名/files/dict.txt', 'wb'); // 'a+' 追加写入file.write(result);file.flush();file.close();console.log("保存成功!")flag = false;}, onComplete : function() {}});});
}
setTimeout(main,1000);
2、将手机内存数据pull到电脑当前目录
adb pull /data/user/0/包名/files/dict.txt