NodeLoc 设备信息显示功能分析报告
日期
2026-08-30
目标
实现 NodeLoc APP 发帖时显示设备信息的功能(如"来自 Pixel 8 Pro")
逆向分析结果
1. 官方 APK 反编译发现
通过反编译官方 APK,在 defpackage/y6.java 中找到关键代码:
// 第 389-409 行
int iIntValue = ((Number) obj).intValue();
if (iIntValue <= 0) {
return c91.m;
}
LinkedHashMap linkedHashMapD0 = gn2.d0(new ce3("mobile_source_platform", "android"));
if (iIntValue >= 3) {
String strA = ow0.a(); // 获取品牌
if (strA.length() <= 0) {
strA = null;
}
if (strA != null) {
linkedHashMapD0.put("mobile_source_brand", strA);
}
}
if (iIntValue < 4) {
return linkedHashMapD0;
}
String str = Build.MODEL;
if (str == null) {
str = "";
}
String string = jq4.z0(str).toString();
String str2 = string.length() > 0 ? string : null;
if (str2 != null) {
linkedHashMapD0.put("mobile_source_model", str2);
}
2. 发帖请求参数
根据用户设置的 post_source_level,在发帖时添加以下字段到请求 body:
| Level | 字段 | 值 | 说明 |
|---|---|---|---|
| 1+ | mobile_source_platform |
"android" |
平台标识 |
| 3+ | mobile_source_brand |
品牌名(如 "Google") |
设备品牌 |
| 4+ | mobile_source_model |
型号(如 "Pixel 8 Pro") |
设备型号 |
3. 品牌获取逻辑
在 defpackage/ow0.java 中实现:
public static String a() {
// 优先从系统属性获取市场名称
String strB = b(); // 读取系统属性
// 特定子品牌列表
Set<String> subBrands = {"iqoo", "redmi", "poco", "realme", "honor", "nothing"};
// 如果市场名称是子品牌,使用它
if (strB != null) {
String normalized = strB.trim().replace(" ", "").toLowerCase();
if (subBrands.contains(normalized)) {
return normalized;
}
}
// 否则使用 Build.MANUFACTURER
return Build.MANUFACTURER.trim();
}
public static String b() {
// 按优先级尝试读取系统属性
String[] properties = {
"ro.vivo.market.name",
"ro.product.marketname",
"ro.config.marketing_name",
"ro.vendor.oplus.market.name",
"ro.oppo.market.name",
"ro.product.vendor.marketname"
};
// 通过反射调用 SystemProperties.get()
for (String prop : properties) {
String value = SystemProperties.get(prop);
if (value != null && !value.isEmpty()) {
return value;
}
}
return null;
}
4. Web 页面显示方式
通过 Playwright 浏览器测试 水一贴 一发入魂,甲骨文开号成功 - #32,来自 lezi-fun 发现:
HTML 结构:
<span class="mobile-source">
<span class="mobile-source__badge" title="本帖由 lezi-fun 使用 Pixel 8 Pro 发送。">
Pixel 8 Pro
</span>
</span>
显示文本:
- 完整提示:
"本帖由 lezi-fun 使用 Pixel 8 Pro 发送。" - 显示文本:
"Pixel 8 Pro"
测试结果
测试方式
curl -X POST "$BASE_URL/posts" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "X-CSRF-Token: $CSRF_TOKEN" \
-H "User-Agent: Mozilla/5.0 (Linux; Android 14; Pixel 8 Pro) ..." \
--data-urlencode "topic_id=105674" \
--data-urlencode "raw=测试消息" \
--data-urlencode "mobile_source_platform=android" \
--data-urlencode "mobile_source_brand=Google" \
--data-urlencode "mobile_source_model=Pixel 8 Pro"
测试结果
成功! 在 Web 页面 水一贴 一发入魂,甲骨文开号成功 - #32,来自 lezi-fun 可以看到设备信息显示为 “Pixel 8 Pro”
参考资料
- 官方 APK: https://github.com/nodeloc/app/releases/download/v1.1.3/app-release.apk
- 测试话题: 水一贴 一发入魂,甲骨文开号成功
- 反编译工具: jadx

