Android::ADB - thin wrapper over the 'adb' command
use Android::ADB;; my $adb = Android::ADB->new(path => '/opt/android/platform-tools/adb'); my @devices = $adb->devices; $adb->set_device($devices[0]); $adb->push('file.txt', '/sdcard/'); sleep 10; $adb->reboot('recovery');
This module is a minimal wrapper over the Android Debug Bridge (adb) command for manipulating Android devices.
adb
Methods die on non-zero exit code and return the text printed by the adb command. The available methods are:
Create a new Android::ADB object. The available arguments are path, the path to the adb executable (defaults to the value of the environment variable ADB or the string adb) and args, an arrayref of arguments passed to every adb command (defaults to []).
path
ADB
args
Returns a list of Android::ADB::Device objects representing connected devices.
Takes an Android::ADB::Device and directs all further commands to that device by passing -s serialno to every command.
-s serialno
Run an arbitrary ADB command and return its output.
Analogues of the respective adb commands.
Same as adb pull -a $remote $local.
adb pull -a $remote $local
Marius Gavrilescu, <marius@ieval.ro>
Copyright (C) 2017 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.2 or, at your option, any later version of Perl 5 you may have available.
To install Android::ADB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Android::ADB
CPAN shell
perl -MCPAN -e shell install Android::ADB
For more information on module installation, please visit the detailed CPAN module installation guide.