Basic Configuration
Configure a fake device identity and system properties per app. The config file uses TOML format.
Config File Path
/data/adb/device_faker/config/config.tomlThe config is hot-reloaded: the module re-reads the file on every app launch. After editing, just restart the target app — no system reboot required.
- If the config file is missing or fails to parse, the app skips spoofing and the module unloads; other apps are unaffected
- Apps not present in any config are not spoofed at all
Global Settings
debug = false # debug logging (off by default)
default_force_denylist_unmount = false
default_cpu_spoof = "kirin_9030pro" # fallback preset when a template / app does not set cpu_spoofdebug: when enabled, Info-level logs are output (Error-only when disabled), written to/data/adb/device_faker/logs/device_faker.log; keep it disabled during normal use to avoid leaving unnecessary tracesdefault_force_denylist_unmount: enables Zygisk'sFORCE_DENYLIST_UNMOUNTfor target apps; can be overridden per template / per app withforce_denylist_unmountdefault_cpu_spoof: CPU spoofing preset name, used as fallback when a template / app does not setcpu_spoof
cpu_presets
[cpu_presets] defines named presets whose values are full /proc/cpuinfo contents (TOML multiline strings; the middle lines are omitted in the example):
[cpu_presets]
kirin_9030pro = """Processor : AArch64 Processor rev 0 (aarch64)
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
...
Hardware : HiSilicon Kirin 9030 Pro"""Reference a preset from a template or [[apps]] with cpu_spoof = "preset-name" — see CPU Spoofing.
Editing the Configuration
Multi-user support
Append @userId to a package name to target a specific user only.
userIdis the number in the path/data/user/<userId>/...(e.g.0,999)- Match priority:
com.example.app@userIdis tried first, then falls back tocom.example.app - This applies to both
packageinappsand thepackageslist of templates
Method One: Device Templates
Define a packages list in a template; it is automatically applied to all listed packages:
[templates.redmagic_9_pro]
packages = [
"com.mobilelegends.mi",
# Only applies to userId=999
# "com.mobilelegends.mi@999",
"com.supercell.brawlstars",
]
manufacturer = "ZTE"
brand = "nubia"
model = "NX769J"
device = "REDMAGIC 9 Pro"
fingerprint = "nubia/NX769J/NX769J:14/UKQ1.230917.001/20240813.173312:user/release-keys"
build_id = "UKQ1.230917.001"
# No [[apps]] needed — all listed packages automatically use this templateAdvantages:
- Centralized management of device identity and package lists
- No need to repeat
[[apps]] - See at a glance which apps use which template
Method Two: Direct Configuration
Use [[apps]] to specify device info for a single app:
[[apps]]
package = "com.omarea.vtools"
manufacturer = "Xiaomi"
brand = "Xiaomi"
model = "2509FPN0BC"
device = "Xiaomi 15 Pro"
product = "popsicle"
name = "popsicle"Note: package is the only required field; if missing, the whole config fails to parse.
Priority
[[apps]] direct configuration > template packages list > global defaults[[apps]]matches the whole record: once a package matches an[[apps]]entry, that record entirely replaces the template — fields not set in the record do not fall through to the template, only global defaults apply- If no
[[apps]]entry matches, the templatepackageslists are searched - Finally, global defaults are applied:
force_denylist_unmount←default_force_denylist_unmount, CPU preset ←default_cpu_spoof - Apps matching nothing: no spoofing, module unloads
Template override example:
[templates.redmagic_9_pro]
packages = ["com.mobilelegends.mi"] # uses this template by default
manufacturer = "ZTE"
brand = "nubia"
[[apps]]
package = "com.mobilelegends.mi" # on match, the whole record replaces the template
manufacturer = "Samsung"
# Fields set in the template but not here (e.g. brand) do NOT take effectNext Steps
- Field Reference — what each field controls
- CPU Spoofing — how to spoof
/proc/cpuinfo - Advanced Usage — property mechanisms, full example, debugging