r/Magisk • • 2d ago

News [Module] QA tip: per-app Android ID (SSAID) — testing "same app, new install identity" without resetting the phone

Disclosure: this is the project account for Device Changer, a Zygisk module we build for Android QA and device simulation. No link here, just a workflow note.

A thing that trips people up when testing first-run, licensing or analytics code: since Android 8, Settings.Secure.ANDROID_ID is not one value per phone. It's scoped per app signing key (and user), and the system keeps those values in /data/system/users/0/settings_ssaid.xml. Uninstall/reinstall usually gives the app the same value back, so "fresh install" tests often aren't as fresh as you think.

What we do on a rooted test device:

  1. Look at the SSAID file first. The list of apps comes from that file, not from the launcher, so you see exactly which packages have an Android ID assigned.
  2. Regenerate only the app under test. In Device Changer's App ID screen you search the package and tap Generate (or Generate for all). The new value is what that app now reads as its own Android ID. A row can also be edited as hex if you need a specific value to reproduce a bug report.
  3. Keep known states. Save list / Load list stores the whole SSAID set, so you can flip between "returning user" and "new device" states between test runs. Before the first overwrite the original file is copied to settings_ssaid.xml.backup.
  4. Reboot (or at least force-stop the app) so it rereads the value, then run the flow.

Tool-agnostic part: even without any module, it's worth logging ANDROID_ID in debug builds and checking whether your "new user" path actually keys off it, Firebase installation ID, or something else. A lot of "works on fresh phone, fails on reinstall" bugs come from mixing those.

Needs root; meant for your own test devices and your own apps. Happy to answer questions about SSAID behavior or how you're structuring reinstall tests.

1 Upvotes

0 comments sorted by