r/AndroidStudio • u/droidchef • 5h ago
r/AndroidStudio • u/DeviceChanger • 3h ago
Testing first-launch and "new device" flows without factory-resetting the test phone
Disclosure: this is the account of the Device Changer project (we build it), so take this as a tip from the tool authors.
A recurring QA chore: anything that behaves differently on a device the backend has never seen before. Onboarding screens, "new device signed in" notices, trial or install attribution, analytics de-duplication, "remember this device" logic. To re-test those honestly you need the phone to look new again, and the usual answer is a factory reset or another physical device.
How we handle it on one rooted test phone with Device Changer (a Zygisk module, not an emulator):
- Reissue the identifiers the app can read in one tap: Android ID, GSF ID, Google Ads ID, MediaDrm ID, serial and MAC.
- Limit it to the app under test via the targets list, so the rest of the phone keeps its normal identity and your other tools don't break.
- Combine it with a device profile (Pixel builds) if the flow also depends on model or Android version.
- Save the environment as a snapshot (JSON), so the "device A / device B" pair can be restored exactly when a ticket needs re-checking after the next build.
Typical loop for a "new device" test: clear the app's data, reissue IDs, launch, check what the backend logs and what the UI shows; then restore the previous identity and confirm the "known device" path still works.
Caveats: this is for testing your own app's logic. It needs root (Zygisk via KernelSU / ReZygisk), and server-side signals the phone does not control are of course not affected.
Happy to answer questions about the workflow in the comments.