adb_utils 0.4.3
adb_utils: ^0.4.3 copied to clipboard
A Dart library for interacting with ADB (Android Debug Bridge) server and devices.
0.4.3 #
- feat(phantom): embedded Phantom APK binaries in Dart source via Base64, removing runtime dependency on local APK file paths.
- feat(phantom): refactored
PhantomClient.startAgent()to install from embedded binaries using safe temporary files created at runtime. - feat(phantom): added
AdbDevice.phantomextension for ergonomic usage (await device.phantom.startAgent();). - build(tooling): added
tool/generate_base64_apks.dartto regeneratelib/src/phantom/phantom_binaries.dart. - docs: updated README/docs/examples to the new no-path Phantom startup flow.
0.4.2 #
- docs: updated documentation to reflect the latest changes in release 0.4.2.
- ex: also add examples.
0.4.1 #
- hotfix(reporting): fixed automatic HTML report generation in
dart test.- Renamed test helper from
test/helpers/reporting_test.darttotest/helpers/reporting.dartso it is no longer discovered as a standalone test file. - Fixed concurrent JSONL append writes by forcing file-end position before writing under lock.
- Hardened report/session JSON parsing to ignore malformed residual lines instead of failing in
tearDownAll.
- Renamed test helper from
0.4.0 #
- feat(phantom): added
PhantomClient.startVideoStream()for raw H.264 streaming.- Automatically configures
adb forward tcp:9009 -> tcp:9009. - Opens a native
Socketon127.0.0.1:9009and returns it asStream<List<int>>. - Added API docs clarifying the stream contains raw H.264 NAL units.
- Automatically configures
- feat(reporting): added automated HTML test reporting utilities.
- Added
TestResultmodel (lib/src/reporting/test_result.dart). - Added
HtmlReporter(lib/src/reporting/html_reporter.dart) with summary cards and failure evidence blocks (mensagemErro+stackTracein<pre><code>). - Added sequential test wrapper
TestRunner(lib/src/reporting/test_runner.dart). - Exported reporting APIs in
lib/adb_utils.dart. - Added demo runner at
bin/test_runner.dartthat writesreport.html.
- Added
- test(reporting):
dart testnow generatesreport.htmlautomatically.- Added
test/helpers/reporting_test.dartto capture per-test results and failures. - Integrated reporting helper in unit and integration suites:
test/adb_utils_test.darttest/phantom_client_test.darttest/integration/server_test.darttest/integration/device_test.dart
- Added
- test(phantom): added coverage for
startVideoStream()forwarding and byte streaming behavior.
0.3.2 #
- chore: apply
dart formatacross project files required by CI/release workflow.
0.3.1 #
- feat(ui_hierarchy): added typed UI hierarchy model and package export.
- Added
UiHierarchy,UiNode, andBoundsinlib/src/models/ui_hierarchy.dart. - Exported
ui_hierarchy.dartfrom the main barrel (adb_utils.dart).
- Added
- feat(phantom): added
dumpWindowHierarchy()to parse XML directly intoUiHierarchy. - security: hardened shell/socket surfaces.
- Added package-name validation in
appInfo()anduninstall(). - Added URL validation/sanitization in
openBrowser(). - Added Phantom socket connect/response timeouts, response size cap, empty-response check, and strict port-range validation.
- Added package-name validation in
- test: added security-focused tests and hierarchy parsing coverage.
- docs: updated README with Phantom +
UiHierarchyusage.
0.3.0 #
- feat(phantom): added
PhantomClientto orchestrate UiAutomator agent lifecycle and TCP communication.- Added
startAgent(targetApkPath, agentApkPath)with APK push, install, force-stop, background instrumentation start, and port forwarding. - Added JSON socket communication flow with robust chunked response handling.
- Added
dumpWindow()andclickByText()high-level actions.
- Added
- test(phantom): added focused unit tests for
startAgent, JSON payload exchange,dumpWindow(), andclickByText(). - chore(phantom): added bundled APK artifacts for the phantom flow:
lib/src/phantom/apks/agent.apklib/src/phantom/apks/target.apk
0.2.2 #
- feat(adb_sync): fully implemented file transfer operations via the ADB SYNC protocol.
- Added
pull(): download files using memory-efficient streaming. - Added
readBytes()andreadText(): read remote file contents directly into memory. - Added
stat(): query remote file size, mode, and modification time.
- Added
0.1.3 #
- fix: apply
dart formattoapp_info.dartandadb_utils_test.dart
0.1.2 #
- added
AppInfo.fromDumpsysto get more detailed information about the app, such as version and permissions. This is useful for users who want to know more about the apps installed on their devices. - added
AdbDevice.appInfoto retrieve theAppInfofor a given package name.