← All posts

Android

Rooting a phone so a bot can work on it all day

What root adds to a phone that answers customers on its own SIM and WhatsApp, and the four things that broke when we kept one rooted, with the fix for each.

Pocket4 min read

A phone that answers a shop's calls and WhatsApp works fine without root. Root removes three limits that matter once it runs all day: messages Android hides, audio on calls, and permissions only system apps get. This is what we learned keeping a test phone rooted through updates.

What root adds

  • Hidden messages, read silently. On Android 15 and later, notifications that look like a one-time code are shown to apps as "Sensitive notification content hidden". Price negotiations look exactly like that. With root, the bot reads that one message from WhatsApp's own message store, read-only, even with the phone locked. Without root it has to open the chat on screen, which needs the phone unlocked.
  • Clean audio into calls. On our test phone, audio an ordinary app plays into a call reached the other side at noise level. The same audio played by a small helper process started as root came through clearly.
  • System-only permissions. Hearing the call (capture of call audio) is a permission Android gives only to privileged system apps. A Magisk module makes the app privileged without touching the real system partition.

The setup, briefly

  1. Unlock the bootloader the way your phone's maker documents it. This wipes the phone.
  2. Get the stock firmware for the exact build the phone runs, and take the init_boot image out of it (on older phones, boot).
  3. Patch that image with the Magisk app, on the phone.
  4. Flash the patched image to the active slot from fastboot, and reboot.
  5. In Magisk, grant root only to the apps that need it.

What broke, and the fix for each

1. An over-the-air update removed root

The phone installed a system update overnight. Updates rewrite the boot image, so root was gone and every root feature with it. To root again you need the stock image for the *new* build, and fastboot can't download it. The fix was the OS Updater app's advanced mode, which re-downloads the full official package for the version you're already on. We checked its MD5 against the published one, extracted init_boot from the package's payload.bin, patched it and flashed it.

2. Stop it happening again

Turning off automatic updates in Settings wasn't enough on this phone: the maker's updater apps can still fetch and apply updates. With root, we disabled the updater packages for the phone's user (pm disable-user), which is reversible with pm enable. Keep the list of what you disabled next to the stock images, so you can undo it before a deliberate update.

3. The Magisk module froze an old copy of the app

To make the app privileged, the module copied the app's APK into a system folder when it was installed, and never updated that copy. While root was gone the module was inactive and the normal app ran. When root came back, the module brought back a two-month-old copy signed with a different key. Android treated it as a different app: settings reset, permissions reset, and every update refused.

The fix: the module now refreshes its copy from the installed app on every boot, before it's mounted, so the privileged copy is always the build the phone actually runs. Updates install over it normally and the app stays privileged.

4. Root couldn't see WhatsApp's folder

Running a command as root from adb could read WhatsApp's database. The same command started by the app said the database didn't exist. Since Android 11, each app sees a filtered view of /data/data that contains only its own folder, and su started by an app inherits that view by default. Magisk's su --mount-master runs the command in the phone's global view instead, where the folder is there.

su --mount-master -c 'CLASSPATH=<app apk> app_process /system/bin <reader class> …'
Root started from an app: ask for the global mount namespace.

After any of this, check the basics

When the app is reinstalled or its signature changes, Android resets more than you'd expect. Check that the app's own switches are still on, that notification access, accessibility, microphone and answer-calls permissions are granted, and that Magisk still grants it root. Then send it a real message from another phone, with the screen locked, and watch it answer.

AndroidRootWhatsAppCallsGuide

Try it on your own number

Thirty minutes of agent time free, no card.

Keep reading