Skip to main content

Manages Android packages on a device through DataFrames

Tested against Windows / Python 3.11 / Anaconda

pip install adbpackagesmanager

class PackageManager(builtins.object)
 |  PackageManager(adb=None, adb_path=None, serial_number=None, **kwargs)
 |  
 |  Methods defined here:
 |  
 |  __init__(self, adb=None, adb_path=None, serial_number=None, **kwargs)
 |      Initializes a PackageManager instance for managing Android packages on a device.
 |      
 |      Args:
 |          adb (AdbCommands, optional): An existing AdbCommands instance. If not provided,
 |              a new instance will be created using the specified adb_path and serial_number.
 |          adb_path (str, optional): The path to the adb executable (e.g., 'C:\Android\android-sdk\platform-tools\adb.exe').
 |          serial_number (str, optional): The serial number of the Android device or emulator to target.
 |          **kwargs: Additional keyword arguments to pass to AdbCommands.
 |      
 |      Example:
 |          from adbpackagesmanager import PackageManager
 |      
 |          adbpath = r"C:\Android\android-sdk\platform-tools\adb.exe"
 |          serial_number = "127.0.0.1:5555"
 |          addpkg = PackageManager(adb_path=adbpath, serial_number=serial_number)
 |          df=addpkg.get_packages_df(ps=True)
 |      
 |          df.loc[(df.aa_3rd_party) &(df.aa_package=='com.ytheekshana.deviceinfo')].aa_copy_data_to_hdd.iloc[0]('c:\\deviceinfo_data')
 |          df.loc[(df.aa_3rd_party) &(df.aa_package=='com.ytheekshana.deviceinfo')].aa_copy_apk_to_hdd.iloc[0]('c:\\deviceinfo_apk')
 |          print(df[:5].to_string())
 |      
 |          # print(df[:5].to_string())
 |          #                                                                                 aa_path                                            aa_package aa_installer  aa_uid  aa_3rd_party  aa_system                                              aa_copy_data_to_hdd                                                                   aa_copy_apk_to_hdd
 |          # 0  /vendor/overlay/DisplayCutoutEmulationCorner/DisplayCutoutEmulationCornerOverlay.apk  com.android.internal.display.cutout.emulation.corner         <NA>   10002         False       True  /data/data/com.android.internal.display.cutout.emulation.corner  vendor\overlay\DisplayCutoutEmulationCorner\DisplayCutoutEmulationCornerOverlay.apk
 |          # 1  /vendor/overlay/DisplayCutoutEmulationDouble/DisplayCutoutEmulationDoubleOverlay.apk  com.android.internal.display.cutout.emulation.double         <NA>   10001         False       True  /data/data/com.android.internal.display.cutout.emulation.double  vendor\overlay\DisplayCutoutEmulationDouble\DisplayCutoutEmulationDoubleOverlay.apk
 |          # 2                       /data/downloads/com.location.provider/com.location.provider.apk                                 com.location.provider         <NA>   10044         False       True                                 /data/data/com.location.provider                       data\downloads\com.location.provider\com.location.provider.apk
 |          # 3                              /system/priv-app/TelephonyProvider/TelephonyProvider.apk                       com.android.providers.telephony         <NA>    1001         False       True                       /data/data/com.android.providers.telephony                              system\priv-app\TelephonyProvider\TelephonyProvider.apk
 |          # 4                                /system/priv-app/CalendarProvider/CalendarProvider.apk                        com.android.providers.calendar         <NA>   10013         False       True                        /data/data/com.android.providers.calendar                                system\priv-app\CalendarProvider\CalendarProvider.apk
 |  
 |  get_packages_df(self, **kwargs)
 |      Retrieves a DataFrame containing information about installed Android packages on the device.
 |      
 |      Args:
 |          **kwargs: Additional keyword arguments to customize package listing.
 |      
 |      Returns:
 |          pandas.DataFrame: A DataFrame with package information, including package path, package name, installer,
 |              UID, whether it's a third-party app, and whether it's a system app. It also provides methods for
 |              copying the app's data and APK to the local file system.
 |      
 |      Example:
 |          df = PackageManager.get_packages_df(ps=True)
 |          # Retrieve and manipulate package information using the DataFrame.
 |      
 |      Note:
 |          To access package-specific actions like copying data or APK, you can use the provided methods in the DataFrame.

Metadata

Release files for adbpackagesmanager 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adbpackagesmanager 0.10
File Size Uploaded Provenance Actions
adbpackagesmanager-0.10.tar.gz 7.3 kB Without provenance Details for adbpackagesmanager-0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for adbpackagesmanager 0.10
File Interpreter ABI Platform Actions
adbpackagesmanager-0.10-py3-none-any.whl Python 3 none any Details for adbpackagesmanager-0.10-py3-none-any.whl

Total release size: 17.0 kB

Release files / adbpackagesmanager-0.10.tar.gz

Download URL adbpackagesmanager-0.10.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4165eed07d87f41735a131d9feada7342c49cab46f4ae7a19c88648ff629b6c4
BLAKE2b-256 checksum
How to use checksums
14cf48711ae62c70b585a486ae6162ab5349369a25f19ad00d9f1ae166602353
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / adbpackagesmanager-0.10-py3-none-any.whl

Download URL adbpackagesmanager-0.10-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02b81d370edca9ae972103955cea423bc9ce9280e658971d916928a12226c963
BLAKE2b-256 checksum
How to use checksums
8612746ecc3dcd030a6cfe6e68a20e8946f88e6c636c4f197cae8a7be1aa81b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for adbpackagesmanager 0.10

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.

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page