adbPullAs
adb pull wrapper to pull package private files from Android device.
WORKS ONLY ON DEBUG APPLICATIONS.
Problem Scope
Developers and testers need to access data from /data/data/com.viliussutkus89.adb.pull.as/cache.
adb pull /data/data/.../cache is no go, because the directory is private.
adb run-as com.viliussutkus89.adb.pull.as cp /data/data/com.viliussutkus89.adb.pull.as/cache /data/local/tmp is no go, because /data/local/tmp may require storage permissions.
adb su -c cp /data/data/.../cache /data/local/tmp is no go, because it requires root.
Solution
Recursive wrapper around adb.
Listing directories and reading files while using runtime permissions of specified application.
Piping contents into /data/local/tmp using normal adb user permissions and adb pull'ing into host computer.
Install
adbPullAs is available on PyPI
python -m pip install adbPullAs
Usage
adbPullAs is used as follows:
adbPullAs PACKAGE_NAME ANDROID_SOURCE... COMPUTER_DESTINATION_DIR.
COMPUTER_DESTINATION_DIR can be omitted to pull into current working directory,
but only with a single supplied ANDROID_SOURCE (example 1).
Multiple ANDROID_SOURCEs require COMPUTER_DESTINATION_DIR to be supplied (example 2).
Example 1
adbPullAs com.viliussutkus89.application /data/data/com.viliussutkus89.application/databases/androidx.work.workdb
Example 2
adbPullAs com.viliussutkus89.application /data/data/com.viliussutkus89.application/cache /data/data/com.viliussutkus89.application/files ./pulled_from_device
Metadata
Release files for adbPullAs 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| adbPullAs-2.0.0.tar.gz | 16.3 kB | Without provenance | Details for adbPullAs-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adbPullAs-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for adbPullAs-2.0.0-py3-none-any.whl |
Total release size: 33.5 kB
Release files / adbPullAs-2.0.0.tar.gz
| Download URL | adbPullAs-2.0.0.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22cbf97cab2fe6d5f1194d38e9579d1b42ed4bba73896a90a973a5c72ff428e0
|
|
BLAKE2b-256 checksum How to use checksums |
2ad4ec54e08c03a25ccc53e6f7cd60cd339cdb2e98b16a7797081606e7aeef1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Release files / adbPullAs-2.0.0-py3-none-any.whl
| Download URL | adbPullAs-2.0.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fec48a14664c3ef93799119146f1a30b488255d127e13defcd3b817c01d1dee4
|
|
BLAKE2b-256 checksum How to use checksums |
781f3e8845a3a4e2723dfe86511271e895ae135f72607963d086fcaf222d8639
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Security for adbPullAs 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.