HarmonyOSHarmonyOS automationPlatform matrix

HarmonyOS Automation Batch Publishing Tutorial: Getting Started with a HarmonyOS Next Multi-Account Matrix

A from-scratch HarmonyOS automation tutorial for batch publishing on a HarmonyOS Next multi-account matrix: preparing a Windows PC and a HarmonyOS 5.0.0+ device, Developer Mode and USB debugging, installing central control with the product downloader, connecting devices and enabling automation, authorization binding, fleet mirroring, the script sidebar and parameter groups, batch dispatch, log troubleshooting, and the common sticking points.

9 min readUpdated

When a team first takes delivery of a batch of HarmonyOS phones, the most common mistake is to run the Android process on them unchanged. And it does not run.

What stands in the way is not the operation but two facts: HarmonyOS Next does not run Android apps, so the toolchain has to be walked through again; and access itself switches to Developer Mode plus USB debugging. Nine out of ten first-timers trip on these two spots.

The good news is that the process itself does not change. Preparation, connection, grouping, scripts, dispatch, troubleshooting - still those six things, only every step has to line up with HarmonyOS specifics.

What follows walks the real order of operations, from installing central control to dispatching in batch, so you can follow along.

1. What to Prepare Before Connecting HarmonyOS Devices

Start with a judgment that is easy to miss: the HarmonyOS path is not the same device pool as Android, so do not expect to mix them. Get things separated during preparation and you avoid a lot of unexplainable errors later.

A Windows PC. The HarmonyOS path installs central control on Windows and connects physical devices with a data cable, and wireless debugging is supported too. With many devices, work out the USB port count ahead of time and add an independently powered hub.

A physical device on HarmonyOS 5.0.0 or above. Keep device versions within one batch as consistent as possible so you have a clean comparison. Keep always-online devices plugged in.

Developer Mode and USB debugging. This is the key step for connecting HarmonyOS: turn on Developer Mode, then enable USB debugging. To be clear - HarmonyOS Next has no root concept. The whole path never modifies the system; it only turns on debugging capabilities the system already offers.

Accounts and assets. The accounts have to be ones you control. Sort assets into folders by date or theme, and let the script reference the paths only.

Prep item Requirement Where it usually goes wrong
PC Windows, enough USB ports Not enough power with many devices, dropped connections
Physical device HarmonyOS 5.0.0 or above Mixed versions, hard to compare during troubleshooting
Phone settings Developer Mode + USB debugging Not authorized, central control cannot see the device
Data cable A cable that transfers data Charge-only cables will not connect

Two more points are easy to overlook: keep the system version consistent across a batch, because mixed versions leave too many variables when you troubleshoot; and fix the physical positions of your devices, so that an index and a location map one-to-one and you are not running around hunting for a machine when a log throws an error. Ten minutes now saves a lot of back and forth later.

2. Install the Central Control Component with the Product Downloader

Central control is not a standalone installer - it goes through the product downloader: open the downloader, select the central control component, and install it as prompted.

One version note: use 3.0.0 or above. From that version on you get the new central control UI with grouping, the script sidebar, and batch rename for bulk management - all of which sections 3 and 6 below rely on. If you can go to 3.1.0 or above, even better: you also get the new mirroring UI and an OCR engine upgrade, so the mirroring picture and text recognition both improve.

Once it is installed, do not rush to connect devices - confirm the install path first, and make sure it contains no special characters or spaces. A plain English path is the least trouble. Details like this look trivial at the time, but they become a real headache later when you hit a stubborn problem.

3. Connect Devices and Enable Automation

With central control installed and the cable plugged in, the next step is connecting devices.

  1. Connect the physical device with the data cable and confirm you tapped “Allow” on the USB debugging authorization prompt on the phone;
  2. Connect the device in central control and wait for the device list to read the machine;
  3. Check the status: only a normal status in the list means you can go on. If no device appears, go back and check Developer Mode and USB debugging;
  4. Once the status is normal, enable automation in the central control toolbar.

Enabling automation is the step most easily skipped. A connected device is not the same as an operable one - leave automation off, dispatch a script, and the screen simply will not move. Fix the order as: connect the device, then enable automation, and only then talk about dispatching tasks.

HarmonyOS Next’s no-root access follows the same idea as Android’s accessibility and ADB channels - both use capabilities the system already offers rather than modifying the system. If you want to understand this path first, see How HarmonyOS cluster control works.

4. Authorization Binding

After connecting and enabling automation, there is still one step: authorization binding. Central control prompts you through the binding flow, and you just follow it.

Do not put this off until batch dispatch. A task that stalls halfway on authorization wastes all the time you spent connecting devices and enabling automation. After binding, check the device list status once more; when both are normal, the environment is genuinely ready.

While you are here, group the devices first, then batch-rename them. Group by how you plan to dispatch later: by batch, by content direction, or by physical position all work. Put the group and index in the name, like harmony-a-01 and harmony-a-02. The batch rename capability in central control 3.0.0 and above is exactly for this - dozens of devices renamed in one go.

5. Central Control Mirroring: See Everything on One Screen

Once devices are connected, use central control mirroring to bring the pictures together on the PC. It solves three specific problems:

  • Confirming the scene. When the script throws an error, one look at the mirror tells you whether the page failed to load or a pop-up is in the way;
  • Watching progress. During a batch dispatch you do not have to walk to each phone; central control shows which devices are still stuck mid-step;
  • Single-device debugging. While writing a script you watch the screen sync in real time and change one step at a time, which beats editing blind.

If the mirrored picture stutters, check the connection quality between the device and central control first - wireless debugging is more sensitive to the network. The new mirroring UI in 3.1.0 and above improves the experience here.

There is another use for mirroring that gets underestimated: verifying device identity. With many devices it is easy to look at the wrong machine - the script errored on device 7 while you were staring at device 8, and you wasted a round of checking. Confirm each name through mirroring before dispatching, and that habit saves real time.

6. The Script Sidebar: Scripts, Parameters, and Grouping

The script sidebar in central control is where you spend most of your day, and both scripts and parameters live there.

Scripts are written in JavaScript or TypeScript, with a smart IDE, real-time screen sync, and built-in logging. Beyond control lookup for finding elements, you also get image recognition, free OCR, color-block and color search, and OpenCV image matching. Prefer control lookup, and fall back to image or text recognition only when no UI element can be read - that is the key to a script that lasts.

A typical publishing script follows the same idea as the Android side:

  1. Open the target app and wait for the home-screen element to appear;
  2. Enter the publish page and wait until the upload button is clickable;
  3. Pick the media, fill in the caption, add topics;
  4. Tap publish and wait for the success prompt or a page change;
  5. Record the result, and capture a screenshot on any exception.

Parameters are externalized the same way, and the config file looks like this:

// harmony-config.json -- the only file you touch when dispatching
module.exports = {
  group: 'harmony-a-01',              // target device group
  copyPool: './content/copy.txt',     // copy pool, one line per item
  topics: ['#dailyrecord', '#newfinds'], // topics
  mediaDir: './media/2026-09-24',     // asset directory
  publishAt: '10:00',                 // dispatch time
  perDevice: 1,                       // posts per device
  retry: 2                            // retries per failed step
};

Swap in a new set of content and you only change the two path lines; the script stays put. For script authoring and debugging details, the HarmonyOS automation script guide goes deeper. Finished scripts can also be packaged as standalone iec builds for easy distribution.

7. Batch Dispatch and Log Troubleshooting

With script and parameters ready, prove the whole chain on a single device first and make sure every step is stable before dispatching by group. Do not skip this - skip it and a later failure leaves you unable to tell a script problem from a device problem.

After dispatch, read the log and focus on two places:

What to look at How to use it
The step the script log stops at Element not found, page did not navigate, or content was not filled in
Device online status Dropped devices are usually a connection or power issue, not a script issue

Pinning down the exact device comes down to naming and grouping. When the log reads harmony-a-07 failed, the group and index in the name tell you exactly where to go find that machine. Once you find it, one look at the mirror beats guessing at the script.

Failure handling has an order too: the same failure on many devices means fix the script first; a failure on a single device means check the device first. Rerunning the whole group for a single-device problem is pointless and wastes time.

Fix the dispatch time as well - for example, a run in a fixed slot each day. Once the rhythm is stable, occasional issues like a device anomaly or network jitter are easier to spot, instead of re-deciding “does this run count as normal?” every time.

8. Common Sticking Points

Central control cannot see the device. Check four things: whether Developer Mode is on, whether USB debugging is authorized, whether the cable only charges without transferring data, and whether the device status is normal. If all four are fine, try another cable or USB port.

The device is connected but the screen will not move. Nine times out of ten automation is off, or permissions are incomplete. Go back and check the automation switch in the toolbar.

The mirror works but operations do nothing. First check whether the device you are watching in the mirror is the same one in the log - looking at the wrong device during a big dispatch is very common.

The script cannot find an element. First judge whether the page is still loading and add “wait for the element to appear before clicking”; if that is not enough, switch the locating method from controls to image recognition or OCR. Do not jump straight to coordinates - coordinates pass a demo but never survive long-term use.

The asset never went out. Check the mediaDir path in the config, and whether the assets sit somewhere the script can reach. This class of problem has little to do with script logic and is solved by fixing the config.

A newly added HarmonyOS device is not recognized. Pull the new device out on its own, connect it to central control and run a minimal flow (open app -> tap once -> check the result), and only fold it into the group once it works.


About EasyClick: A phone automation AI-agent platform covering Android no-root, iOS no-jailbreak (proxy / Bluetooth HID / OTG HID) and HarmonyOS Next, offering script development, Apple cluster control, local central control & mirroring, and cloud control systems. → Explore all products

Ready to build it for real?

Every approach in this article can be built with EasyClick capabilities on iEasyClick — full documentation, developer tools and automation products, free to try.

Visit iEasyClick →