PHP code example of pkgmcp / adb-php
1. Go to this page and download the library: Download pkgmcp/adb-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pkgmcp / adb-php example snippets
use AdbPhp\AdbClient;
$adb = AdbClient::create();
$devices = $adb->listDevices();
$device = $adb->getDevice($devices[0]->id);
echo $device->shell('uname -a');
$device->install('/path/to/app.apk');
file_put_contents('/tmp/screen.png', $device->screencap());
bash
composer