一、封装库
(1).hook jni函数调用
https://github.com/Areizen/JNI-Frida-Hook
二、自己封装
function str2ArrayBuffer(str) {
var buf = new ArrayBuffer(str.length); // 1 bytes for each char
var bufView = new Uint8Array(buf);
for (var i=0, strLen=str.length; i < strLen; i++) {
bufView[i] = str.charCodeAt(i);
}
return buf;
}
来源:CSDN
作者:jinangl
链接:https://blog.csdn.net/jinangl/article/details/104550691