<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>RegisterNatives on Ip2867</title><link>https://ip2867.github.io/tags/registernatives/</link><description>Recent content from Ip2867</description><generator>Hugo</generator><language>zh-CN</language><managingEditor>xxx@example.com (栗悟饭与龟波功)</managingEditor><webMaster>xxx@example.com (栗悟饭与龟波功)</webMaster><copyright>本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！</copyright><lastBuildDate>Mon, 02 Nov 2026 11:00:00 +0800</lastBuildDate><atom:link href="https://ip2867.github.io/tags/registernatives/index.xml" rel="self" type="application/rss+xml"/><item><title>JNI / NDK / 交叉编译：从 .so 生产流程到 Hook 动态注册</title><link>https://ip2867.github.io/post/jni-ndk-crosscompile-and-registernatives-hook/</link><pubDate>Mon, 02 Nov 2026 11:00:00 +0800</pubDate><author>xxx@example.com (栗悟饭与龟波功)</author><guid>https://ip2867.github.io/post/jni-ndk-crosscompile-and-registernatives-hook/</guid><description>
<![CDATA[<h1>JNI / NDK / 交叉编译：从 .so 生产流程到 Hook 动态注册</h1><p>作者：栗悟饭与龟波功（xxx@example.com）</p>
        
          <blockquote>
<p>很多人学 Android Native 逆向时会把三个概念混在一起：<strong>JNI、NDK、交叉编译</strong>。它们不在同一个层面上——</p>
<ul>
<li><strong>JNI</strong> 是「两个国家之间的外交协议」：规定 Java 和 C/C++ 怎么互相调用。</li>
<li><strong>NDK</strong> 是「外交部」：装着编译器、头文件、构建脚本的工具箱。</li>
<li><strong>交叉编译</strong> 是「外交部里专门做翻译的人」：让 x86 电脑产出 ARM 手机能跑的代码。</li>
</ul>
<p>协议不依赖外交部存在，但没有外交部，你很难按协议高效生产出可用的东西。搞清这三层之后，再回头看 Frida 为什么必须 Hook <code>RegisterNatives</code>，逻辑就是自然的了。</p>
        
        <hr><p>本文2026-11-02首发于<a href='https://ip2867.github.io/'>Ip2867</a>，最后修改于2026-11-02</p>]]></description><category>逆向</category></item></channel></rss>