AndroidCommand

Provides functionality to interact with an Android device through shell commands.

Classes

AndroidCommand

Methods

(async) shell(command) → {Promise.<string>}

Runs a shell command on the connected Android device. This method requires the Android device to be properly configured.
Parameters:
NameTypeDescription
commandstringThe shell command to run on the Android device.
Throws:
Throws an error if Android is not configured or if the command fails.
Type
Error
Returns:
A promise that resolves with the result of the command or rejects if there's an error.
Type: 
Promise.<string>
Example
await commands.android.shell('');

(async) shellAsRoot(command) → {Promise.<string>}

Runs a shell command on the connected Android device as the root user. This method requires the Android device to be properly configured and that you rooted the device.
Parameters:
NameTypeDescription
commandstringThe shell command to run on the Android device as root.
Throws:
Throws an error if Android is not configured or if the command fails.
Type
Error
Returns:
A promise that resolves with the result of the command or rejects if there's an error.
Type: 
Promise.<string>
Example
await commands.android.shellAsRoot('');