Files
MobileModels/web

Web UI

Start

From repository root:

python3 -m http.server 8123

Open:

页面顶部有导航条Gitea 风格):

  • 设备查询
  • 数据管理

设备查询

Mode A: 客户端上报模式(新增)

字段按你给的上报方式输入:

  • Android
    • platform=android
    • model_raw=Build.MODEL(例如 SM-G9980
  • iOS
    • platform=ios
    • model_raw=utsname.machine(例如 iPhone14,2
  • 鸿蒙
    • platform=harmony
    • model_raw(如果有就原样填)
    • deviceInfo.marketName(页面里填 marketName
    • deviceInfo.osFullName(页面里填 osFullName

说明:

  • 鸿蒙模式下,model_rawmarketName 至少填一个。
  • 页面会输出完整候选列表,并附带 report_payload 方便核对上报值。

Mode B: 通用多字段模式(原有)

primaryName:

  • Put the strongest identifier first, such as iPhone14,5, M2102J2SC, L55M5-AD, SM-G9910.

extraNames (one line each):

  • Paste all values you can get from client APIs, for example:
model=SM-G9910
device=star2qltechn
marketName=Galaxy S21
buildProduct=o1qzcx

brand:

  • Optional. Supports aliases like 苹果, samsung, huawei, 小米.

platform:

  • iOS / Android / HarmonyOS / Unknown

Output

设备查询页会返回:

  • best candidate
  • complete ranked candidates
  • normalized brand + parent manufacturer
  • source rank/weight (from source order config)
  • matched inputs
  • matched normalized keys
  • source markdown file and section
  • full JSON output for direct integration or debugging

Data management

数据管理页支持:

  • Independent maintenance:
    • Brand list is maintained independently in the UI and initialized from index data on first load.
    • Changes are stored in browser localStorage.
  • Alias normalization (brand only):
    • 华为 / huawei / HUAWEI are normalized to brand HUAWEI.
  • Brand-manufacturer relations:
    • One brand has exactly one parent manufacturer.
    • One manufacturer can contain multiple brands.
    • Examples:
      • Xiaomi manufacturer includes brands Xiaomi, Redmi, POCO.
      • vivo manufacturer includes brands vivo, iQOO.
      • OPPO manufacturer includes brands OPPO, OnePlus, realme.
  • Click 品牌数 / 厂商数 to open full list popup.
  • 编辑品牌列表: popup edit.
  • 编辑品牌-厂商关系: popup edit.
  • 编辑品牌同义词: popup edit.
  • 数据来源管理(新增):
    • Supports drag-and-drop source ordering.
    • Ranking weight is higher for sources at the top.
    • Initial order puts *_cn.md before non-cn sources.

Notes

  • If browser blocks local file fetch, start HTTP server as above.
  • You can also manually upload dist/device_index.json in the page.