← 资料库索引 ← 开源项目 原始链接 ↗ 🔍
开源项目

TikTokDeviceGenerator:批量 device_register 设备生成 原文标题:code-root/TikTokDeviceGenerator

发表时间:(页面未标注)采集时间:2026-10-09 14:49:20来源:github.com原文语言:en状态:完整

内容概要总结

GitHub 仓库 code-root/TikTokDeviceGenerator,提供带 Tkinter 桌面 GUI 的工具,通过 Java/unidbg 生成 TikTok 设备注册 payload 并批量注册。流程:构造随机输入(openudid、时间戳、类 MAC 模式)经 Libs/unidbg.jar 调用本地库(Libs/prebuilt/<platform>/)生成二进制 payload,从 unidbg stdout 的 hex=… 解析,POST 到 https://log-va.tiktokv.com/service/2/device_register/(content-type: application/octet-stream;tt-data=a),成功后保存 device_id、install_id 并落盘 JSON;批量模式用 ThreadPoolExecutor 并行,支持 http/https/socks5/socks5h 代理。每 50 条写一个 Device/devices_*.json,每次批量生成 generated_devices/_batch_summary_*.json。README 要求 Python 3.10+、Java(64 位 Windows 需 64 位 Java 配 win64 natives),并说明 Apple Silicon 上 unidbg.jar 内置的 JNA 只有 darwin x86_64,需改用 x64 JDK 否则报 UnsatisfiedLinkError;附故障排查表、项目结构、阿拉伯语文档与联系方式。作者为 Mostafa Al-Bagouri(Storage TE),原始工作归功于 xSaleh。工具界面分操作栏与批量选项:Start 会先校验 unidbg.jar、平台本地库、设备数量、线程数与代理 URL,Stop 取消剩余任务;日志逐台记录 URL、请求头、响应或错误,写盘前会剥离 request_log 以缩小文件,输出目录字段仅用于打开文件夹。

翻译内容

原文内容(English)

⚠ 说明:⚠ 逆向分析来源,仅作资料存档,其结论未经官方确认;文中字段名/算法为实现细节,可能随版本变化。 抓取时原 README 的 HTML 页面不可达(RemoteDisconnected),正文取自 GitHub 渲染版 README。 【V03跳过】基线为 GitHub 仓库页(含 Latest commit / About / Stars 等界面区块),标题数与译文无可比性:译文本就多一个「目录」标题。已清理界面块,但不强行对齐标题数(硬对齐会改坏译文,见 pitfalls 73)。

仓库: github.com/code-root/TikTokDeviceGenerator · 发布: 所有版本 · 最新: v1.0.0

带 Tkinter 桌面 GUI,通过 Java / unidbg 生成设备注册 payload,POST 到 TikTok 的 device register 端点,并把结果保存为 JSON,支持批量模式、多线程和可选的代理。

文档: 英文(本文件) · 阿拉伯语 —— README.ar.md

提示: 请仅在遵守适用法律和服务条款的前提下使用本工具。本文档只描述技术行为。

搜索 / 主题: TikTok 账号创建(设备绑定)、device_register、device_id / install_id(IID)、已签名的注册 payload(Java + native / unidbg)、批量设备注册、自动化、可选代理。GitHub 上的仓库 topic 包括 account-creation、device-registration、request-signing、tiktok-api 及相关标签。


目录


功能说明

  1. 构造随机输入(如 openudid、时间戳、类 MAC 模式),通过 Libs/unidbg.jar 传给 Java,从 Libs/prebuilt/&lt;platform&gt;/ 加载本地库。
  2. 从 unidbg stdout(hex=… 块)解析出二进制 payload。
  3. 向 https://log-va.tiktokv.com/service/2/device_register/ 发送 POST,带固定请求头和 content-type: application/octet-stream;tt-data=a。
  4. 收到成功的 JSON 后,存储 device_id、install_id(以及存在时的字符串变体)和元数据。
  5. 批量模式下用 ThreadPoolExecutor 并行运行多台设备;Stop 取消剩余工作(进行中的任务可能仍会完成)。

环境要求

组件说明
Python使用较新语法(如 `str \None`)。建议 Python 3.10+。
依赖包见 requirements.txt —— 特别是 SOCKS 代理所需的 requests[socks]。
Java能运行 Libs/unidbg.jar 的 JVM。在 64 位 Windows 上需使用 64 位 Java 以匹配 Libs/prebuilt/win64/。
仓库文件Libs/unidbg.jar 和 Libs/prebuilt/&lt;platform&gt;/(如 win64、linux64、osx64)。

安装

python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS / Linux:
source .venv/bin/activate

pip install -r requirements.txt

安装 JDK/JRE 并确认 java -version。如果在 64 位 Windows 上只装了 32 位 Java、而程序使用 win64 native,unidbg 会失败 —— 见 Java 与本地库。


运行

python DeviceGenerator.py

没有单独的 CLI;所有选项都在 GUI 里。


发布

带版本号的下载、变更日志和带 tag 的快照:github.com/code-root/TikTokDeviceGenerator/releases

  • 最新 tag: v1.0.0
  • 预编译的 .exe(若发布)会出现在某个 release 的 Assets 下;除非 release 说明另有交代,你仍然需要 Libs/ 和一个合适的 Java 运行时。

项目结构

TikTokDeviceGenerator-main/
├── DeviceGenerator.py      # GUI + 批量 worker + HTTP
├── requirements.txt
├── README.md               # 本文件(英文)
├── README.ar.md            # 阿拉伯语文档
├── assets/                 # 支持 / 收款二维码图片
├── scripts/                # 如 verify_environment.py(Java vs Apple Silicon)
├── Libs/
│   ├── unidbg.jar
│   └── prebuilt/           # win64, linux64, osx64, ...
├── Device/                 # devices_001.json, ...
└── generated_devices/      # _batch_summary_*.json

代码常量:

  • DEVICES_PER_JSON_FILE = 50 —— Device/ 下每个文件的记录数。
  • DEVICE_REGISTER_URL —— 注册端点 URL。

用户界面

顶部栏(Header) —— 应用标题和简短副标题。

操作栏(Action bar)

  • Start —— 校验 unidbg.jar、Libs/prebuilt/&lt;platform&gt;、数量、线程数和代理 URL(如有)。
  • Stop —— 发出取消信号;待处理的 future 被取消;进度反映已完成的工作。
  • Open output folder —— 打开当前 Output folder 中显示的文件夹路径(如 Windows 上的 os.startfile)。

批量选项

  • Number of devices —— 1–9999。
  • Threads —— 1–64,受设备数上限约束。
  • Output folder —— 显示在输入框里的路径,仅用于 Open output folder。 重要: 无论此字段为何,DeviceGenerator.py 总是把设备分片写到 &lt;project&gt;/Device/、把批量汇总写到 &lt;project&gt;/generated_devices/。可修改该字段以便打开别的文件夹(例如把它指向 generated_devices 后)。
  • Proxy URL (optional) —— 应用于本批次所有 device_register 请求。

Last device (preview) —— 只读的 OpenUDID、Device ID、IID,带 Copy 按钮;当前批次每次成功注册时更新。

Progress —— 准备阶段为不确定进度,之后按已完成/总数确定进度;状态行合并显示数量/百分比和一条短消息。

Log —— 每台设备:URL、请求头、body 的 hex 预览、响应或错误。写入每条记录到 Device/devices_*.json 前会剥离 request_log 以缩小文件;运行期间 UI 仍显示完整日志。


输出文件与 JSON

Device/

  • 文件 devices_001.json 等;分片编号从现有最大的 devices_*.json 往后接。
  • 每个文件:saved_at、part、devices_per_file、count,以及 devices:[{ &quot;batch_index&quot;: n, &quot;record&quot;: { ... } }, …]。
  • record 含 status、input、network、各类 id、register_response 等字段,通常不含 request_log。

generated_devices/

  • 每次批量运行生成 _batch_summary_YYYYMMDD_HHMMSS.json,含 requested_devices、threads、success、failed、completed_tasks、cancelled、路径、分片大小,以及 network(使用代理时含 proxy_url_masked)。

默认的 “Output folder” 字段

  • 通过 default_output_dir() 初始化为 &lt;project&gt;/generated_devices,与汇总写入位置一致;可编辑该字段以决定 Open output folder 打开哪个文件夹。

代理

支持的协议:http、https、socks5、socks5h。

http://127.0.0.1:8080
http://user:password@host:port
socks5h://127.0.0.1:1080

SOCKS 需安装 requests[socks]。导出 JSON 在凭据存在时使用 network 下的 proxy_url_masked。


Java 与本地库

从 Libs/ 调用大致为:

java -Djna.library.path="<prebuilt>" -Djava.library.path="<prebuilt>" -jar unidbg.jar "<message>"

&lt;prebuilt&gt; 即 Libs/prebuilt/&lt;getsystem()&gt;(如 64 位 Windows 上的 win64)。

get_java_exe() 依次尝试 JAVA_HOME、一个常见的 Windows 路径,然后 PATH 上的 java。在 64 位 Windows 上,它优先选择 java -version 输出中报告 64-Bit 的 JVM。

Apple Silicon(M1/M2/M3): unidbg.jar 里的 JNA 构建只带了 darwin x86_64 的 libjnidispatch。默认的 arm64 JDK 无法加载它 -> 在临时文件 jna*.tmp 上抛 UnsatisfiedLinkError。请改用 Intel / x64 JDK(如 Eclipse Temurin macOS x64),把 JAVA_HOME 指向它,并确认 java -XshowSettings:properties -version 显示 os.arch = x86_64。在仓库根目录快速检查:python scripts/verify_environment.py。


故障排查

现象可能原因
Missing unidbg.jarLibs/unidbg.jar 文件缺失。
Missing native librariesLibs/prebuilt/&lt;platform&gt; 错误或缺失。
UnsatisfiedLinkError / Can&#x27;t load library … jna*.tmp(macOS arm64)arm64 JVM 对 unidbg.jar 中仅 x86_64 的 JNA —— 安装 x64 JDK 并把 JAVA_HOME 指向它(见 Java 与本地库)。
libcapstone.dylib / native 加载错误(macOS)确保 libcapstone.dylib 是指向 libcapstone.4.dylib 的符号链接(keystone 同理 -> libkeystone.0.dylib)。
unidbg 失败 / 无 hex=…Java 架构不对、工作目录不对,或 JVM 输出异常(查看失败 payload 里的 Log / stderr)。
HTTP / JSON 错误网络、封锁、代理错误或非 JSON 响应。
SOCKS 失败缺少 requests[socks] 或 URL 不受支持。
Tk / 按钮错误使用带 Tk 的官方 Python;PyInstaller 构建需正确打包 Tcl/Tk。

致谢

  • 原始工作归功于 xSaleh —— 谢谢。
  • 应用页脚的品牌 / 联系方式定义在 DeviceGenerator.py 中(如 Storage TE)。

维护者、公司与联系方式

开发者Mostafa Al-Bagouri
公司Storage TE
WhatsApp+20 100 199 5914

支持本项目

如果本工具对你有用,可选的支持有助于维护和改进它。选最适合你的方式即可。

渠道如何支持
PayPalpaypal.me/sofaapi
Binance Pay / UID1138751298 —— 从 Binance App 发送(有 Pay / 内部转账时使用)。
Binance —— 充值(网页)充值加密货币(Binance) —— 登录、选择资产,再选 BSC (BEP20)。
BSC 地址(复制)0x94c5005229784d9b7df4e7a7a0c3b25a08fd57bc
网络: 仅使用 BSC (BEP-20)。此地址用于 USDT (BEP-20) 和 BSC 上的 BTC(Binance-Peg / App 内 BSC 上的 “BTC”),与下方 Binance 充值界面一致。不要向此地址发送原生比特币(链上 BTC)、ERC-20 或 NFT。

收款二维码(在 Binance 或任意 BSC 钱包中扫码)

USDT · BSCBTC · BSC
USDT deposit QR — BSC
USDT deposit QR — BSC
BTC on BSC deposit QR
BTC on BSC deposit QR

You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert

NameName

TikTok Device Generator

Repository: github.com/code-root/TikTokDeviceGenerator · Releases: all versions · Latest: v1.0.0

Desktop GUI (Tkinter) that generates device-registration payloads via Java / unidbg, POSTs them to TikTok’s device register endpoint, and saves results as JSON with batch mode, threading, and optional proxy support.

Documentation: English (this file) · Arabic — README.ar.md

Notice: Use this tool only in compliance with applicable laws and service terms. This document describes technical behavior only.

Search / topics: TikTok account creation (device binding), device_register, device_id / install_id (IID), signed registration payload (Java + native / unidbg), batch device registration, automation, optional proxy. Repository topics on GitHub include account-creation, device-registration, request-signing, tiktok-api, and related labels.

  • Maintainer, company & contact
  • Deposit QR codes (scan in Binance or any BSC wallet)

What it does

  • Builds random inputs (e.g. openudid, timestamps, MAC-like pattern) and passes them to Java through Libs/unidbg.jar, loading natives from Libs/prebuilt/<platform>/.
  • Parses the binary payload from unidbg stdout (hex=… block).
  • On successful JSON, stores device_id, install_id (and string variants when present) plus metadata.
  • In batch mode, runs many devices in parallel with ThreadPoolExecutor; Stop cancels remaining work (in-flight tasks may still finish).

Requirements

ComponentNotes
PythonModern syntax (e.g. strNone). Python 3.10+ recommended.
See requirements.txt — notably requests[socks] for SOCKS proxies.Java
JVM able to run Libs/unidbg.jar. On 64-bit Windows, use 64-bit Java to match Libs/prebuilt/win64/.Repo files
Libs/unidbg.jar and Libs/prebuilt/<platform>/ (e.g. win64, linux64, osx64).

Installation

[python](https://github.com/topics/python) -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS / Linux:
source .venv/bin/activate
pip install -r requirements.txt

Install a JDK/JRE and verify java -version. If only 32-bit Java is installed on 64-bit Windows while the app uses win64 natives, unidbg will fail — see Java & native libraries.

Run

python [DeviceGenerator.py](https://github.com/code-root/TikTokDeviceGenerator/blob/main/DeviceGenerator.py)

There is no separate CLI; all options are in the GUI.

Versioned downloads, changelogs, and tagged snapshots: github.com/code-root/TikTokDeviceGenerator/releases

  • A prebuilt .exe (when published) will appear under Assets on a release; you still need Libs/ and a suitable Java runtime unless the release notes say otherwise.

Project layout

TikTokDeviceGenerator-main/
├── DeviceGenerator.py # GUI + batch worker + HTTP
├── requirements.txt
├── [README.md](https://github.com/code-root/TikTokDeviceGenerator/blob/main/README.md) # This file (English)
├── README.ar.md # Arabic documentation
├── [assets](https://github.com/code-root/TikTokDeviceGenerator/tree/main/assets)/ # Support / deposit QR images
├── [scripts](https://github.com/code-root/TikTokDeviceGenerator/tree/main/scripts)/ # e.g. verify_environment.py (Java vs Apple Silicon)
├── Libs/
│ ├── unidbg.jar
│ └── prebuilt/ # win64, linux64, osx64, ...
├── Device/ # devices_001.json, ...
└── generated_devices/ # _batch_summary_*.json
  • DEVICES_PER_JSON_FILE = 50 — records per file under Device/.
  • DEVICE_REGISTER_URL — register endpoint URL.

User interface

Header — app title and short subtitle.

  • Start — validates unidbg.jar, Libs/prebuilt/<platform>, counts, threads, and proxy URL (if any).
  • Stop — signals cancel; pending futures are cancelled; progress reflects completed work.
  • Open output folder — opens the folder path currently shown in Output folder (e.g. os.startfile on Windows).
  • Number of devices — 1–9999.
  • Threads — 1–64, capped by device count.
  • Output folder — path shown in the field and used only for Open output folder.

Important: DeviceGenerator.py always writes device chunks to <project>/Device/ and batch summaries to <project>/generated_devices/, regardless of this field. Change it to open another folder for convenience (e.g. after you point it at generated_devices).

  • Proxy URL (optional) — applied to all device_register requests in the batch.

Last device (preview) — read-only OpenUDID, Device ID, IID with Copy buttons; updates on each successful registration in the current batch.

Progress — indeterminate while preparing, then determinate by completed/total; status line combines count/percent and a short message.

Log — per device: URL, headers, hex preview of body, response or errors. request_log is stripped before writing each record to Device/devices_*.json to keep files smaller; the UI still shows full logs during the run.

Output files & JSON

  • Files devices_001.json, …; part numbers continue from the highest existing devices_*.json.
  • Each file: saved_at, part, devices_per_file, count, and devices: [{ "batch_index": n, "record": { ... } }, …].
  • record includes fields like status, input, network, ids, register_response, etc., usually without request_log.
  • Each batch run creates _batch_summary_YYYYMMDD_HHMMSS.json with requested_devices, threads, success, failed, completed_tasks, cancelled, paths, chunk size, and network (including proxy_url_masked when a proxy is used).

Default “Output folder” field

  • Initialized to <project>/generated_devices via default_output_dir() so it matches where summaries are written; you may edit the field for which folder Open output folder opens.

Proxy

Supported schemes: http, https, socks5, socks5h.

http://127.0.0.1:8080
http://user:password@host:port
socks5h://127.0.0.1:1080

Install requests[socks] for SOCKS. Exported JSON uses proxy_url_masked under network when credentials are present.

Java & native libraries

Approximate invocation from Libs/:

java -Djna.library.path="<prebuilt>" -Djava.library.path="<prebuilt>" -jar unidbg.jar "<message>"

<prebuilt> is Libs/prebuilt/<getsystem()> (e.g. win64 on 64-bit Windows).

get_java_exe() tries JAVA_HOME, a common Windows path, then java on PATH. On 64-bit Windows it prefers a JVM that reports 64-Bit in java -version output.

Apple Silicon (M1/M2/M3): The JNA build inside unidbg.jar only ships a darwin x86_64 libjnidispatch. A default arm64 JDK cannot load it → UnsatisfiedLinkError on a temp jna*.tmp file. Use an Intel / x64 JDK (e.g. Eclipse Temurin macOS x64), set JAVA_HOME to it, and confirm java -XshowSettings:properties -version shows os.arch = x86_64. Quick check from the repo root: python scripts/verify_environment.py.

Troubleshooting

SymptomLikely cause
Missing unidbg.jarFile missing at Libs/unidbg.jar.
Missing native librariesWrong or missing Libs/prebuilt/<platform>.
UnsatisfiedLinkError / Can't load library … jna*.tmp (macOS arm64)arm64 JVM vs x86_64-only JNA in unidbg.jar — install x64 JDK and point JAVA_HOME there (see Java & native libraries).
libcapstone.dylib / native load errors (macOS)Ensure libcapstone.dylib is a symlink to libcapstone.4.dylib (same for keystone → libkeystone.0.dylib).
unidbg fails / no hex=…Wrong Java arch, bad cwd, or unexpected JVM output (check Log / stderr in failure payload).
HTTP / JSON errorsNetwork, block, bad proxy, or non-JSON response.
SOCKS failsMissing requests[socks] or unsupported URL.
Tk / button errorsUse official Python with Tk; for PyInstaller builds, bundle Tcl/Tk correctly.

Credits

  • Original work attributed to xSaleh — thank you.
  • Branding / contact in the app footer is defined in DeviceGenerator.py (e.g. Storage TE).

Maintainer, company & contact

Developer

Mostafa Al-Bagouri

Company

Storage TE

WhatsApp

+20 100 199 5914

Support this project

If this tool is useful to you, optional support helps maintain and improve it. Pick whatever works best for you.

ChannelHow to support
PayPalpaypal.me/sofaapi
Binance Pay / UID1138751298 — send from the Binance app (Pay / internal transfer when available).
Binance — deposit (web)Deposit crypto (Binance) — sign in, pick the asset, then select BSC (BEP20).
BSC address (copy)0x94c5005229784d9b7df4e7a7a0c3b25a08fd57bc

Network: Use BSC (BEP-20) only. This address is for USDT (BEP-20) and BTC on BSC (Binance-Peg / in-app “BTC” on BSC), matching the Binance deposit screens below. Do not send native Bitcoin (on-chain BTC), ERC-20, or NFTs to this address.

Deposit QR codes (scan in Binance or any BSC wallet)

USDT · BSCBTC · BSC

USDT deposit QR — BSCBTC on BSC deposit QR
USDT deposit QR — BSC

Desktop Tkinter app: batch TikTok device_register via Python + Java (unidbg). Bilingual README (EN/AR).

account-creationautomationbatch-processingcross-platformdesktop-appdevice-fingerprintdevice-iddevice-registrationguiinstall-idjavapythonrequest-signingrequestsreverse-engineeringtiktoktiktok-accounttiktok-apitkinterunidbg

You can’t perform that action at this time.

放大预览