Placeholders

Some App Cloner modding options allow the use of placeholders. These placeholders allow text to be substituted at runtime.

The general placeholder syntax is:

{placeholder}
{placeholder:<value>}
{placeholder|<options>}
{placeholder:<value>|<options>}

Some placeholders require a value and some placeholders additionally support one or more options, which are specified as a comma-separated list of name / value pairs separated by a colon, e.g. option:value,option:value, etc.

See below for a summary of number-specific options, which include arithmetic operations, the modulus operator and formatting options.

You may enable placeholders in the Welcome message option, which can be useful for testing placeholder expressions.

Clone number

{clone-number}
{clone-number|<number options>}

Substitutes the 1-based clone number of the current clone. Clone #1 substitutes the number 1, clone #2 substitutes the number 2, etc.

NOTE: The legacy placeholder syntax for the clone number is #, ##, ### and so on, which substitutes a certain length of 0-padded digits.

Clone index

{clone-index}
{clone-index|<number options>}

Similar to clone number but substitutes the 0-based clone index of the current clone. Clone #1 substitutes the number 0, clone #2 substitutes the number 1, etc.

App name

{app-name}

Substitutes the name of the cloned app. This placeholder has no options.

NOTE: The legacy placeholder syntax for the app name is {NAME}.

Identity seed

{identity-seed}
{identity-seed|<number options>}

Substitutes the identity seed, which is a number that is randomized every time you generate a new identity using the New identity option. This is used as default seed value for the random number and **** placeholders. The identity seed is maintained by App Cloner, which is why App Cloner must remain installed.

Identity index

{identity-index}
{identity-index|<number options>}

Substitutes the identity index, which is a number that is incremented every time you generate a new identity using the New identity option. While the identity index starts at 0 for new clones, you do not have direct control over its value (you cannot reset it unless you uninstall & reinstall App Cloner). Use the mod number option (see below) to limit the identity index to a certain range. The identity index is maintained by App Cloner, which is why App Cloner must remain installed.

Random number

{random-number|min:<min>,max:<max>}
{random-number|min:<min>,max:<max>,<number options>}

Substitutes a random integer number between a minimum value (inclusive) and a maximum value (exclusive). If min is not provided, 0 is assumed, if max is not provided, 100 is assumed. For instance, {random-number|min:10,max:20} generates a random number from 10 to 19 (with a total of 10 possible numbers).

IMPORTANT: The default random number generator seed is the clone’s identity seed. This means by default it will always use the same random number (even after restarting the cloned app) until you generate a new identity using the New identity option. To provide an alternate seed value you can use the seed option.

{random-number|min:<min>,max:<max>,seed:<seed>}
{random-number|min:<min>,max:<max>,seed:<seed>,<number options>}

You may consider using date or time placeholders to substitute the seed value (see below).

NOTE: The legacy placeholder syntax for the random number is *, **, *** and so on, which substitutes a certain length of 0-padded digits.

Random item

{random-item:<item1,item2,item3,…>|seed:<seed>}

Substitutes a random item from the provided comma-separated item list.

IMPORTANT: The default random number generator seed is the clone’s identity seed. This means by default it will always use the same random password (even after restarting the cloned app) until you generate a new identity using the New identity option. To provide an alternate seed value you can use the seed option.

This placeholder is available for users who made the Huge donation.

Random password

{random-password|length:<length>,upper-case:<true|false>,lower-case:<true|false>,include-number:<true|false>,include-symbol:<true|false>,seed:<seed>}

This placeholder allows generating random passwords. All options have default values. By default, the password length is 8 characters, includes upper-case characters, includes lower-case characters, includes a number and includes a symbol. If you turn off both, upper- and lower-case characters, the generated password will consist of digits only, e.g. a random PIN.

IMPORTANT: The default random number generator seed is the clone’s identity seed. This means by default it will always use the same random password (even after restarting the cloned app) until you generate a new identity using the New identity option. To provide an alternate seed value you can use the seed option.

This placeholder is available for users who made the Giant donation.

Random name

{random-name|gender:<auto|female|male>,format:<full|first|last|email|gender>,separator:<separator>,seed:<seed>}

This placeholder allows generating random English female or male names from a database of >150K last names, >4K female first names and >1K male first names.

The default gender is auto, which uses an almost even probability of generating female or male names. Set the gender option to female or male to only generate female or male names, respectively. The default format is full, which returns the first and last name separated by a space. Set the format option to first or last to only return the first or last name, respectively. Set it to email to return the first and last names concatenated in lowercase by a separator. The separator defaults to a dot (.) but this can be customized using the separator option (you can also remove the separator entirely by setting it blank). Set the format option to gender to return either female or male (in lowercase) depending on the automatic gender selection.

Please note that this placeholder cannot be added as a runtime option on existing clones. If the use of the {random-name} placeholder is detected the database of names is added to the clone during the cloning process.

IMPORTANT: The default random number generator seed is the clone’s identity seed. This means by default it will always use the same random name (even after restarting the cloned app) until you generate a new identity using the New identity option. To provide an alternate seed value you can use the seed option.

This placeholder is available for users who made the Ultra donation.

Current date

{current-date}
{current-date|format:<format>}

Substitutes the current date in the form of yyyyMMdd (without any separators). You can provide a custom date format according to this specification.

Current time

{current-time}
{current-time|format:<format>}

Substitutes the current time in the form of HHmmss (without any separators, using the 24-hour clock). You can provide a custom time format according to this specification.

Current millis

{current-millis}
{current-millis|<number options>}

Substitutes the current milliseconds since Unix epoch, for instance 1651363200000 represents midnight 1st of May 2022 UTC. You may want to use this as seed option for the random number placeholder, if you want to generate different random values continuously, e.g. {random-number|max:50,seed:{current-millis}}.

Started millis

{started-millis}
{started-millis|<number options>}

Substitutes the milliseconds since Unix epoch when the app process was started. You may want to use this as seed option for the random number placeholder, if you want to generate different random values each time the app process is started, e.g. {random-number|max:50,seed:{started-millis}}.

Resource string

{res-string:<name>}

Substitutes the resource string value for the given resource string name. To use this placeholder you should be familiar with resource strings of Android apps. This is useful if you want to substitute a language-independent string, e.g. when skipping dialogs that contain certain resource text.

System property

{system-property:<name>}

Substitutes the system property value for the given system property name, e.g. ro.build.id or ro.product.model. To use this placeholder you should be familiar with Android system properties (see https://bit.ly/3wU22qK).

File contents

{file-contents:<path>}
{file-contents:<path>|row:<row>}
{file-contents:<path>|row:<row>,column:<column>}
{file-contents:<path>|row-index:<row index>}
{file-contents:<path>|row-index:<row index>,column-index:<column index>}

Substitutes the contents of a local file at the given file path. The path must be an absolute path, e.g. /sdcard/file.txt, if you want to read a file called file.txt from the internal storage directory. You may use other placeholders inside the path to substitute the clone number / index, a random number or the date / time before the contents of the file is read.

By default the placeholder is substituted by the entire file contents. By providing the row or row-index options, you can substitute a specific row of the file only (row is the 1-based, e.g. 1 is the first row, while row-index is 0-based, e.g. 0 is the first row; no header column is expected).

If you have CSV (comma-separate values) data, you can then use the column or column-index options to look up a specific column of the previously selected row containing y (again, column is the 1-based, e.g. 1 is the first column, while column-index is 0-based, e.g. 0 is the first column).

The file must use UTF-8 encoding.

If the cloned app does not have the read storage permission granted, it will prompt you to grant this permission. While the permission is not granted, the placeholder will be substituted by an empty string. If the cloned app relies on the placeholder being correctly substituted you may consider granting the permission after the clone is installed but before it is started. Alternatively, you may consider setting the target SDK version to 22 (see Manifest & resource options), which will auto-grant all permissions after installation.

Clipboard contents

{clipboard-contents}

Substitutes the current clipboard contents as text.

This placeholder is available since App Cloner 2.15.1.

Custom value

{custom-value:<name>}

Substitutes the named custom value.

This placeholder is available for users who made the Large donation.

This placeholder is available since App Cloner 2.16.0.

String

The {string:<value>|…} placeholders offers various utilities for string manipulation on the given value. The following options are available:

{string:<value>|before:<separator>}

Substitutes the substring before the first occurrence of the separator within the given value.

{string:<value>|before-last:<separator>}

Substitutes the substring before the last occurrence of the separator within the given value.

{string:<value>|before-index:<index>}

Substitutes the substring before the character index within the given value.

{string:<value>|after:<separator>}

Substitutes the substring after the first occurrence of the separator within the given value.

{string:<value>|after-last:<separator>}

Substitutes the substring after the last occurrence of the separator within the given value.

{string:<value>|after-index:<index>}

Substitutes the substring after the character index within the given value.

{string:<value>|char-at:<index>}

Substitutes the single character at the character index within the given value.

{string:<value>|length}

Substitutes the length in characters of the given value.

{string:<value>|lowercase}

Substitutes the given value in lower case.

{string:<value>|uppercase}

Substitutes the given value in upper case.

{string:<value>|capitalize}

Substitutes the given value in capitalized case.

{string:<value>|trim}

Substitutes the given value trimmed, i.e. white space characters are removed at the start and end of the string.

{string:<value>|reverse}

Substitutes the given value with characters reversed.

{string:<value>|repeat:<count>}

Substitutes the given value repeated the specified number of times.

{string:<value>|if-empty:<other>}

Substitutes the given value or another value if the value is empty.

{string:<value>|if-blank:<other>}

Substitutes the given value or another value if the value is blank (either empty or consisting of white space characters only).

{string:<value>|remove:<substring>}

Substitutes the given value with all occurrences of the specified substring removed.

{string:<value>|remove-start:<substring>}

Substitutes the given value with the specified substring removed at the start of the value (if it occurs at the start).

{string:<value>|remove-end:<substring>}

Substitutes the given value with the specified substring removed at the end of the value (if it occurs at the end).

{string:<value>|append:<suffix>}

Substitutes the given value with the specified suffix appended to the end.

{string:<value>|prepend:<prefix>}

Substitutes the given value with the specified prefix prepended to the start.

{string:<value>|append-if-missing:<suffix>}

Substitutes the given value with the specified suffix appended to the end if not present.

{string:<value>|prepend-if-missing:<prefix>}

Substitutes the given value with the specified prefix prepended to the start if not present.

{string:<value>|base64-encode}

Substitutes the given value Base64-encoded.

{string:<value>|base64-decode}

Substitutes the given value Base64-decoded.

{string:<value>|hex-encode}

Substitutes the given value hex-encoded.

{string:<value>|hex-decode}

Substitutes the given value hex-decoded.

{string:<value>|url-encode}

Substitutes the given value URL-encoded.

{string:<value>|url-decode}

Substitutes the given value URL-decoded.

{string:<value>|md5}

Substitutes the hex-encoded MD5 hash of the given value.

You may use multiple options in sequence, e.g. {string:<value>|trim,char-at:0,uppercase} first trims the given value, then extracts the first character and then converts this character to upper case.

This placeholder is available for users who made the Giant donation. This placeholder is available since App Cloner 2.15.1.

Number options

The following options apply to number placeholders. They are applied in the order shown below.

mod:<modulus>

The mod option applies the modulus operator to the number value. This ensures that the number is always inside a given range. For instance, mod:1000 ensures that the number is always mapped to the range 0 to 999. For instance, 999 will remain 999 but 1000 will be mapped to 0, while 1999 will be 999 again and 2000 will be mapped back to 0, and so on.

pow:<power>

The pow option raises the number value to the given power.

mul:<factor>

The mul option multiplies the number value by the given factor.

mul:<divisor>

The div option divides the number value by the given divisor.

add:<number>

The add option adds the the number.

sub:<number>

The sub option subtracts the the number.

digits:<length>

The digits option ensures that a number is formatted with 0-padding, so that it has at least the given number of digits. For instance, digits:3 formats the number 0 as 000, the number 10 as 010, while the number 100 remains 100.

You can combine the mod option and digits options to create a fixed length pool of a certain range of numbers, e.g. 000 to 999 or 0000 to 9999.

Examples

The following placeholder expression reads a row from a file called /sdcard/file.txt. For each new identity generated it substitutes rows in the range 1 to 10 for clone #1, rows in the range 11 to 20 for clone #2 and so on.

{file-contents:/sdcard/file.txt|row-index:{identity-index|mod:10,add:{clone-index|mul:10}}}

The following placeholder expression uses a different approach, concatenating two 2-digit numbers. The first 2-digit number is the clone index, 00, 01, etc. The second 2-digit number is the identity index in range 00 to 99. This results in a 4 digit number for the final row index: 0000-0099 for clone #1, 0100-0199 for clone #2, etc.

{file-contents:/sdcard/file.txt|row-index:{clone-index|digits:2}{identity-index|mod:100,digits:2}}