How can I build bots that will automate any Android app on my smartphone?

miranon

Registered Member
Joined
Jun 25, 2011
Messages
84
Reaction score
20
I have several Android smartphones with root access. I want to build bots that will automate SM apps like Facebook, Instagram, TikTok.
Can you give me advice where to start? Any good tutorials?
I heard that there is a solution called ZennoDroid to do this. Or is it better to learn ADB and Appium and develop own solution?
 
I think you should start by mastering root management, then learn Android automation tools like ADB etc
 
Any noob-friendly ADB alternatives besides ZennoDroid to manage a small smartphone-farm? I saw lots of videos about Chinese phone-farms, what software are they using?
 
Chinese farms mostly run uiautomator2 under the hood it's what drives the actual touch events on the device. the "software" you see in those videos is usually a custom wrapper on top of it, not a separate tool. ZennoDroid is fine for a few devices but it gets expensive and the update cycle is slow.


if you're rooted, uiautomator2 + Python is the cleanest path. you install the uiautomator2 server APK on the device, control it from a Python script over ADB (USB or WiFi), done. learning curve is maybe a week to get basic tap/scroll/type working.
Feel free to DM if you want a starting point.
 
UiAutomator2 works on iPhones as well, problem is most SM like Instagram and TikTok will recognize you're using UIAutomator anyways and the UI paths will be random each time you run the apps. Maybe you'll even get shadowbanned or unable to run the apps while you have UIAutomator2 on.
 
The iPhone automation challenge is real, and most social media platforms have gotten pretty good at detecting UIAutomator. What I've seen is that even with uiautomator2, you'll still need to add some extra layers of obfuscation to avoid getting flagged. Using Python with uiautomator2 is a solid approach, but you'll also want to consider randomizing your automation patterns and adding some human-like delays to avoid raising suspicion. The silo idea makes sense in this context, as it can help distribute your automation tasks across multiple devices and make it harder for platforms to detect patterns. In my experience, it's not just about the automation tool itself, but how you implement it and manage your device farm that will determine your success.
 
UiAutomator2 works on iPhones as well
Lol, what are you talking about? Uiautomator is Android-only binary, it's literally a part of Android Open Source Project. And uiautomator2 is a bit more complex tool that uses uiautomator under the hood.

Maybe you mixed up the concepts a bit and meant Appium? Because Appium is a testing framework which indeed works with Android and iOS, though engines are completely different. And I agree that Appium is detectable, so it's mostly not used at all for automation these days.
 
Nevermind
Lol, what are you talking about? Uiautomator is Android-only binary, it's literally a part of Android Open Source Project. And uiautomator2 is a bit more complex tool that uses uiautomator under the hood.

Maybe you mixed up the concepts a bit and meant Appium? Because Appium is a testing framework which indeed works with Android and iOS, though engines are completely different. And I agree that Appium is detectable, so it's mostly not used at all for automation these days.
Nevermind, I meant appium. yeah you're right.
 
Back in the day I used to use a thing called ZennoDroid.
It was faster to get started, GUI, built-in features etc..
 
yeah uiautomator2 + Python is definitely the way to go, been running the same stack for a while.

open-sourced what I built if it saves anyone from starting from scratch

covers Instagram + TikTok

also real devices > emulators for detection. root not required for the basics.
 
A few approaches depending on your setup:
ADB + UIAutomator2 — Android Debug Bridge lets you tap, swipe, type, and read UI elements from command line. UIAutomator2 is the standard framework on top of it. With root access you have even more control. You can drive devices from your PC over USB or WiFi. This is what most mobile farming setups use at scale.
Appium — wraps UIAutomator2 with a clean API you can script in Python, JS, or Java. More structured than raw ADB, better for multi-device control and reliable element selectors. Good starting point since there's solid documentation.
Auto.js / Hamibot — JavaScript-based automation that runs directly on-device, no PC required. Good for simpler tasks. Some apps detect these through accessibility service detection, though root helps bypass that.
OpenCV + ADB — for apps that obfuscate their UI tree, you screenshot the screen, do pattern matching with OpenCV, then tap at matched coordinates. More fragile but works when element selectors fail.
Since you have root access, you can also use Frida for hooking into app internals — useful for bypassing detection or manipulating app state directly. More advanced but very powerful.
For SM apps specifically: Instagram and TikTok actively detect automation through timing patterns and device fingerprints. Start with UIAutomator2, add random delays between actions, and make sure your device fingerprints are varied if you're running multiple devices.
The ADB + UIAutomator2 + Python combo is the practical starting point. Plenty of tutorials on GitHub for this setup.
 
uiautomator2 + python sounds interesting, hadn't considered that. anyone else getting shadowbanned even with real devices? i'm struggling to avoid that on insta.
 
I have several Android smartphones with root access. I want to build bots that will automate SM apps like Facebook, Instagram, TikTok.
Can you give me advice where to start? Any good tutorials?
I heard that there is a solution called ZennoDroid to do this. Or is it better to learn ADB and Appium and develop own solution?
uiautomator2 + Python is definitely the meta right now for rooted devices. If you want to avoid the Instagram shadowbans someone mentioned above, just make sure you aren't using the default Appium/UiAutomator packages un-obfuscated. Social media apps scan for those specific server packages running in the background.
 
uiautomator2 + python sounds interesting, hadn't considered that. anyone else getting shadowbanned even with real devices? i'm struggling to avoid that on insta.
Real devices still get shadowbanned if your action patterns look robotic. Instagram tracks your touch coordinates and scrolling physics. If your script taps the exact center of a button every single time or scrolls at a constant speed, you will get flagged. You need to inject random pixel offsets and varying scroll velocities.
 
How do you guys handle ADB detection? it seems to be easy detecable for apps.
this is currently my problem, when getting a phone farm, how to get ADB not detected
 
@MarmeLadenKekse for the adb detection thing... since you have root you can use zygisk modules to hide the usb debugging state from specific apps. or just start adb over tcpip, unplug the cable, and then turn off usb debugging in the developer settings. the port stays open but the app cant see the usb debug flag anymore. i ran into this with tiktok last year and going wireless and hiding the props was the only way to stop the instant flags.
 
Back
Top