AndroidLearnBlog icon indicating copy to clipboard operation
AndroidLearnBlog copied to clipboard

安卓注入JS

Open fems1888 opened this issue 5 years ago • 8 comments

有demo吗

fems1888 avatar Nov 12 '19 08:11 fems1888

不好意思 没有demo 你可以按照文章中教程自行实现一个

carl1990 avatar Nov 12 '19 09:11 carl1990

也许是js我不会写 我按照你的教程  但是就是实现不了  已经试了好几次了

------------------ 原始邮件 ------------------ 发件人: "carl"<[email protected]>; 发送时间: 2019年11月12日(星期二) 下午5:03 收件人: "carl1990/AndroidLearnBlog"<[email protected]>; 抄送: "太阳、、"<[email protected]>;"Author"<[email protected]>; 主题: Re: [carl1990/AndroidLearnBlog] 安卓注入JS (#2)

不好意思 没有demo 你可以按照文章中教程自行实现一个

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

fems1888 avatar Nov 12 '19 09:11 fems1888

js代码要保持单行,js不会写可以让js专业同事写,术业有专攻

carl1990 avatar Nov 12 '19 09:11 carl1990

可以实现对任意webview内容的埋点吗

------------------ 原始邮件 ------------------ 发件人: "carl"<[email protected]>; 发送时间: 2019年11月12日(星期二) 下午5:30 收件人: "carl1990/AndroidLearnBlog"<[email protected]>; 抄送: "太阳、、"<[email protected]>;"Author"<[email protected]>; 主题: Re: [carl1990/AndroidLearnBlog] 安卓注入JS (#2)

js代码要保持单行,js不会写可以让js专业同事写,术业有专攻

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

fems1888 avatar Nov 13 '19 09:11 fems1888

不可以吧 因为不同js框架 hook的点不一样

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Jackie Yao <[email protected]> 发送时间: 2019年11月13日 17:48 收件人: carl1990/AndroidLearnBlog <[email protected]> 抄送: carl <[email protected]>, Comment <[email protected]> 主题: 回复:[carl1990/AndroidLearnBlog] 安卓注入JS (#2)

可以实现对任意webview内容的埋点吗

------------------&nbsp;原始邮件&nbsp;------------------ 发件人:&nbsp;"carl"<[email protected]&gt;; 发送时间:&nbsp;2019年11月12日(星期二) 下午5:30 收件人:&nbsp;"carl1990/AndroidLearnBlog"<[email protected]&gt;; 抄送:&nbsp;"太阳、、"<[email protected]&gt;;"Author"<[email protected]&gt;; 主题:&nbsp;Re: [carl1990/AndroidLearnBlog] 安卓注入JS (#2)

js代码要保持单行,js不会写可以让js专业同事写,术业有专攻

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

carl1990 avatar Nov 13 '19 10:11 carl1990

那安卓如何开发一个sdk,让使用react native开发的项目直接使用sdk来埋点呢。有什么可行的方案吗?

------------------ 原始邮件 ------------------ 发件人: "carl"<[email protected]>; 发送时间: 2019年11月13日(星期三) 晚上6:10 收件人: "carl1990/AndroidLearnBlog"<[email protected]>; 抄送: "太阳、、"<[email protected]>;"Author"<[email protected]>; 主题: Re: [carl1990/AndroidLearnBlog] 安卓注入JS (#2)

不可以吧 因为不同js框架 hook的点不一样

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Jackie Yao <[email protected]&gt; 发送时间: 2019年11月13日 17:48 收件人: carl1990/AndroidLearnBlog <[email protected]&gt; 抄送: carl <[email protected]&gt;, Comment <[email protected]&gt; 主题: 回复:[carl1990/AndroidLearnBlog] 安卓注入JS (#2)

可以实现对任意webview内容的埋点吗

------------------&amp;nbsp;原始邮件&amp;nbsp;------------------ 发件人:&amp;nbsp;"carl"<[email protected]&amp;gt;; 发送时间:&amp;nbsp;2019年11月12日(星期二) 下午5:30 收件人:&amp;nbsp;"carl1990/AndroidLearnBlog"<[email protected]&amp;gt;; 抄送:&amp;nbsp;"太阳、、"<[email protected]&amp;gt;;"Author"<[email protected]&amp;gt;; 主题:&amp;nbsp;Re: [carl1990/AndroidLearnBlog] 安卓注入JS (#2)

js代码要保持单行,js不会写可以让js专业同事写,术业有专攻

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

fems1888 avatar Nov 13 '19 10:11 fems1888

首先你需要向webview 注册一个桥方法用来 js和native通信 其次需要JS采集数据(采集方式要么是他们手动埋点,要么通过他们提供的JS代码通过native注入到webview中能够自动hook相应的点)通过这个桥方法把数据传到你的SDK SDK进行数据解析,上传等工作

carl1990 avatar Nov 13 '19 10:11 carl1990

这是注入的js,在图中的第二个箭头(想要收集的数据)处,怎么获取到任意一个用户行为呢?比如点击按钮或者点击图片等等。 ------------------ 原始邮件 ------------------ 发件人: "carl"<[email protected]>; 发送时间: 2019年11月13日(星期三) 晚上6:19 收件人: "carl1990/AndroidLearnBlog"<[email protected]>; 抄送: "太阳、、"<[email protected]>;"Author"<[email protected]>; 主题: Re: [carl1990/AndroidLearnBlog] 安卓注入JS (#2)

首先你需要向webview 注册一个桥方法用来 js和native通信 其次需要JS采集数据(采集方式要么是他们手动埋点,要么通过他们提供的JS代码通过native注入到webview中能够自动hook相应的点)通过这个桥方法把数据传到你的SDK SDK进行数据解析,上传等工作

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

fems1888 avatar Nov 14 '19 11:11 fems1888