# Manages Android packages on a device through DataFrames
## Tested against Windows / Python 3.11 / Anaconda
## pip install adbpackagesmanager
```python
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.
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/adbpackagesmanager",
"name": "adbpackagesmanager",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "adb,DataFrame,pandas,android,automation",
"author": "Johannes Fischer",
"author_email": "aulasparticularesdealemaosp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/14/cf/48711ae62c70b585a486ae6162ab5349369a25f19ad00d9f1ae166602353/adbpackagesmanager-0.10.tar.gz",
"platform": null,
"description": "\r\n# Manages Android packages on a device through DataFrames \r\n\r\n## Tested against Windows / Python 3.11 / Anaconda\r\n\r\n## pip install adbpackagesmanager\r\n\r\n```python\r\n\r\nclass PackageManager(builtins.object)\r\n | PackageManager(adb=None, adb_path=None, serial_number=None, **kwargs)\r\n | \r\n | Methods defined here:\r\n | \r\n | __init__(self, adb=None, adb_path=None, serial_number=None, **kwargs)\r\n | Initializes a PackageManager instance for managing Android packages on a device.\r\n | \r\n | Args:\r\n | adb (AdbCommands, optional): An existing AdbCommands instance. If not provided,\r\n | a new instance will be created using the specified adb_path and serial_number.\r\n | adb_path (str, optional): The path to the adb executable (e.g., 'C:\\Android\\android-sdk\\platform-tools\\adb.exe').\r\n | serial_number (str, optional): The serial number of the Android device or emulator to target.\r\n | **kwargs: Additional keyword arguments to pass to AdbCommands.\r\n | \r\n | Example:\r\n | from adbpackagesmanager import PackageManager\r\n | \r\n | adbpath = r\"C:\\Android\\android-sdk\\platform-tools\\adb.exe\"\r\n | serial_number = \"127.0.0.1:5555\"\r\n | addpkg = PackageManager(adb_path=adbpath, serial_number=serial_number)\r\n | df=addpkg.get_packages_df(ps=True)\r\n | \r\n | df.loc[(df.aa_3rd_party) &(df.aa_package=='com.ytheekshana.deviceinfo')].aa_copy_data_to_hdd.iloc[0]('c:\\\\deviceinfo_data')\r\n | df.loc[(df.aa_3rd_party) &(df.aa_package=='com.ytheekshana.deviceinfo')].aa_copy_apk_to_hdd.iloc[0]('c:\\\\deviceinfo_apk')\r\n | print(df[:5].to_string())\r\n | \r\n | # print(df[:5].to_string())\r\n | # aa_path aa_package aa_installer aa_uid aa_3rd_party aa_system aa_copy_data_to_hdd aa_copy_apk_to_hdd\r\n | # 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\r\n | # 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\r\n | # 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\r\n | # 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\r\n | # 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\r\n | \r\n | get_packages_df(self, **kwargs)\r\n | Retrieves a DataFrame containing information about installed Android packages on the device.\r\n | \r\n | Args:\r\n | **kwargs: Additional keyword arguments to customize package listing.\r\n | \r\n | Returns:\r\n | pandas.DataFrame: A DataFrame with package information, including package path, package name, installer,\r\n | UID, whether it's a third-party app, and whether it's a system app. It also provides methods for\r\n | copying the app's data and APK to the local file system.\r\n | \r\n | Example:\r\n | df = PackageManager.get_packages_df(ps=True)\r\n | # Retrieve and manipulate package information using the DataFrame.\r\n | \r\n | Note:\r\n | To access package-specific actions like copying data or APK, you can use the provided methods in the DataFrame.\r\n\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Manages Android packages on a device through DataFrames",
"version": "0.10",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/adbpackagesmanager"
},
"split_keywords": [
"adb",
"dataframe",
"pandas",
"android",
"automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8612746ecc3dcd030a6cfe6e68a20e8946f88e6c636c4f197cae8a7be1aa81b3",
"md5": "1220418ab2292bd59a990bc2ff776821",
"sha256": "02b81d370edca9ae972103955cea423bc9ce9280e658971d916928a12226c963"
},
"downloads": -1,
"filename": "adbpackagesmanager-0.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1220418ab2292bd59a990bc2ff776821",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9640,
"upload_time": "2023-10-13T06:13:11",
"upload_time_iso_8601": "2023-10-13T06:13:11.204604Z",
"url": "https://files.pythonhosted.org/packages/86/12/746ecc3dcd030a6cfe6e68a20e8946f88e6c636c4f197cae8a7be1aa81b3/adbpackagesmanager-0.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "14cf48711ae62c70b585a486ae6162ab5349369a25f19ad00d9f1ae166602353",
"md5": "65efd8426f12ca52099b27f3487a1568",
"sha256": "4165eed07d87f41735a131d9feada7342c49cab46f4ae7a19c88648ff629b6c4"
},
"downloads": -1,
"filename": "adbpackagesmanager-0.10.tar.gz",
"has_sig": false,
"md5_digest": "65efd8426f12ca52099b27f3487a1568",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7315,
"upload_time": "2023-10-13T06:13:13",
"upload_time_iso_8601": "2023-10-13T06:13:13.637626Z",
"url": "https://files.pythonhosted.org/packages/14/cf/48711ae62c70b585a486ae6162ab5349369a25f19ad00d9f1ae166602353/adbpackagesmanager-0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-13 06:13:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "adbpackagesmanager",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "adbpackagesmanager"
}