Block reference / App Management
Load resource
Take the next free account from a resource pool and put it on the phone: its device, its proxy and its signed-in apps.
Only in
WarpX Phone
Load resource is the start of an account's turn on a phone. It takes the next free account from a pool on the Resources page — one no other phone has, that has rested and is not used up for today — and makes the run's phone that account's: it is shown as the same device every time, goes out through the account's own proxy, and gets its apps back as Save resource last saved them, signed in. An account that was never signed in comes with its apps clean instead, for the workflow to sign it in.
Settings
- Resource pool
The pool's name, as the Resources page shows it. Its apps are the ones loaded and saved.
ExampleFacebook VN- Account (optional)
Empty, the pool picks: the account that has rested longest, the next in order, or one at random — as the pool is set — with an account pinned to this phone first. An account's label loads that one; it fails with
RESOURCE_UNAVAILABLEwhen another phone has it, it is resting or it is not ready.Example- Hold it for (minutes)
How long no other phone may take the account. Save resource gives it back sooner; a run that stops before then frees it when the time is up, without saving. Make it longer than the work between the two blocks.
Example60- Open the pool's first app once loaded
Opens the first app the pool names, after everything else is in place.
ExampleChecked- Save the account to a variable
Stores the account in a workflow variable,
resourceunless you name another.ExampleChecked- Delay (ms)
A pause after the block finishes, before the next block starts. Write one number such as
1000, or a range such as1000,3000to pick a random pause in that range on each run.Example0
Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.
What it hands on
The variable holds state — loaded (its apps came back from its snapshot, signed in) or new (apps clean: sign it in) — and label, id, pool, device and every field the pool imported, by its name: {{variables.resource.Username}}, {{variables.resource.Password}}. Passwords and the other secrets are in it as written, for the sign-in. Leaves by its single output; a Conditions block on {{variables.resource.state}} sends a new account to its sign-in.
Example: Work every Facebook account in turn
- Start
- Load resource
- Conditions
- Save resource
- On the Resources page, make a pool Facebook VN with the app
com.facebook.katanaand paste your accounts in. - Add Load resource with Resource pool
Facebook VN. - Add a Conditions block: when
{{variables.resource.state}}isnew, go to the blocks that sign in with{{variables.resource.Username}}and{{variables.resource.Password}}. - Add the account's work, then Save resource.
- Put the whole of it in a loop, or run the workflow on a schedule, for the pool's accounts to take turns.
Good to know
- Needs root: the device the account is shown as is set with
resetprop, and its signed-in apps come back from their private data. On a phone without root the load fails at the device. - An account's device is made on its first load — one of Change device's presets, a name of its own and an advertising ID of its own (Google Play services', which any app on the phone can read) — and kept: it is the same on whichever phone loads it. New device on its next load on the Resources page makes another. A phone whose Play services has made no advertising ID yet loads without one, and the log says so.
- Each save keeps a snapshot, and the pool keeps the newest few. When the newest went wrong — the account came back signed out or checkpointed — Snapshots… on the Resources page puts an older one back for the next load.
- A new account's apps are each installed from the APK library when the phone has not got them, cleared, and given an Android ID no other account was shown. The phone's screen goes black for 10–20 seconds per app while that is written.
- A phone that loads again without saving gives the account it held back — what was done with it is not kept — and takes another one when the pool has one free.
- When no account is free the block fails with
RESOURCE_POOL_EMPTY; its On error can wait and try again. - A snapshot made on one kind of phone (an x86 emulator) may not run on another (an ARM phone): keep an account's phones alike.
- A workflow that was not edited on this computer (from the Appstore, a file or the assistant) asks you to allow this block before its first run, in a window that lists what it will do. Blocks you set up in the editor are approved as you edit them, so your own workflows never ask; changing the block's settings asks again.
- There is no Device field: the block acts on the run's phone — the one picked in the editor's toolbar, or each phone ticked for Run automation in the Control Center or named in an API run.
See also
- Save resource — Back up the account on the phone into a new snapshot and give it back to its pool.
- Change device — Change what the phone says it is: its name, its model and brand, its screen size and density.
- Restore — Put a backup made by Backup back on a phone.