# Use the power of pandas to manage the files on your Android device
```python
pip install a-pandas-ex-adb-to-df
```
```python
################################################
#Update 2022/12/06:
# select individual folder
df = pd.Q_adb_to_df(device=deviceserial,adb_path=adb_path, folder='data/') # will automatically switch to su
################################################
#Update 2022/12/05:
# Added ff_pull_file_cat to pull files that usually need su rights, which is not possible using "adb pull" (Maybe it is, but I haven't
# found a way)
# Make sure to exclude folders and symlinks when you copy files using cat:
df.loc[(df.aa_symlink.isna()) & (df.aa_size > 0) & (~df.aa_rights.str.contains('^d'))].ff_pull_file_cat.apply(lambda x:x('f:\\gvbadsasww', timeout=15))
################################################
################################################
#Update 2022/11/22:
################################################
#you can now pull files (folders will be created if they don't exist)
for key, item in dff.loc[(dff.aa_size > 10) & (dff.aa_size < 200) & (~dff.aa_filename.str.contains('->')) & (~dff.aa_filename.str.contains('/tmp'))].iterrows():
try:
item.ff_pull_file(f'f:\\keyboardstuffxx2')
except Exception:
pass
#and remove files
for key, item in dff.loc[dff.aa_fullpath.str.contains(r'tmp.*\.bin') & dff.aa_folder.str.contains(r'sdcard/')].iterrows():
try:
item.ff_remove_file()
except Exception:
pass
################################################
from a_pandas_ex_adb_to_df import pd_add_adb_to_df
import pandas as pd
adb_path = "C:\\Users\\Gamer\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe"
deviceserial = "localhost:5745"
pd_add_adb_to_df()
df = pd.Q_adb_to_df(device=deviceserial,adb_path=adb_path)
print(df)
print(df.loc[df.aa_fullpath.str.contains(r'download.*_.*\.mp4',na=False,regex=True, flags=re.IGNORECASE)][:5].to_string())
aa_filename aa_folder aa_fullpath aa_id aa_index aa_rights aa_links aa_owner aa_group aa_size aa_date
634994 von_haus_aus.mp4 storage/emulated/0/Download storage/emulated/0/Download/von_haus_aus.mp4 140306 5428 -rwxrwx--- 1 u0_a219 media_rw 5552768 2022-03-21 17:31:00
634995 ins_haus_stehen.mp4 storage/emulated/0/Download storage/emulated/0/Download/ins_haus_stehen.mp4 186233 6328 -rwxrwx--- 1 u0_a219 media_rw 6471958 2022-03-21 17:31:00
634996 aufs_haus_gehen.mp4 storage/emulated/0/Download storage/emulated/0/Download/aufs_haus_gehen.mp4 126498 6588 -rwxrwx--- 1 u0_a219 media_rw 6738374 2022-03-21 17:31:00
634997 mit_der_tuer_ins_haus_fallen.mp4 storage/emulated/0/Download storage/emulated/0/Download/mit_der_tuer_ins_haus_fallen.mp4 130773 6832 -rwxrwx--- 1 u0_a219 media_rw 6989353 2022-03-21 17:31:00
635004 Alfredo_stiftete_seinen_Lieferwagen_final.mp4 storage/emulated/0/Download storage/emulated/0/Download/Alfredo_stiftete_seinen_Lieferwagen_final.mp4 136706 5104 -rw-rw---- 1 u0_a219 media_rw 5219973 2022-06-01 22:58:00
```
Raw data
{
"_id": null,
"home_page": "https://github.com/hansalemaos/a_pandas_ex_adb_to_df",
"name": "a-pandas-ex-adb-to-df",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "pandas,DataFrame,adb,ls,dir,files",
"author": "Johannes Fischer",
"author_email": "<aulasparticularesdealemaosp@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f0/bd/b678879b1997ac08e22ce4cc4564204ae7efbe86116c63addfbaae461056/a_pandas_ex_adb_to_df-0.15.tar.gz",
"platform": null,
"description": "\n# Use the power of pandas to manage the files on your Android device\n\n\n\n```python\n\npip install a-pandas-ex-adb-to-df\n\n```\n\n\n\n```python\n\n################################################\n\n#Update 2022/12/06:\n\n\n\n# select individual folder\n\ndf = pd.Q_adb_to_df(device=deviceserial,adb_path=adb_path, folder='data/') # will automatically switch to su\n\n\n\n################################################\n\n#Update 2022/12/05:\n\n# Added ff_pull_file_cat to pull files that usually need su rights, which is not possible using \"adb pull\" (Maybe it is, but I haven't \n\n# found a way)\n\n\n\n# Make sure to exclude folders and symlinks when you copy files using cat:\n\ndf.loc[(df.aa_symlink.isna()) & (df.aa_size > 0) & (~df.aa_rights.str.contains('^d'))].ff_pull_file_cat.apply(lambda x:x('f:\\\\gvbadsasww', timeout=15))\n\n################################################\n\n\n\n\n\n################################################\n\n#Update 2022/11/22:\n\n################################################\n\n#you can now pull files (folders will be created if they don't exist)\n\nfor key, item in dff.loc[(dff.aa_size > 10) & (dff.aa_size < 200) & (~dff.aa_filename.str.contains('->')) & (~dff.aa_filename.str.contains('/tmp'))].iterrows():\n\n try:\n\n item.ff_pull_file(f'f:\\\\keyboardstuffxx2')\n\n except Exception:\n\n pass\n\n \n\n#and remove files \n\nfor key, item in dff.loc[dff.aa_fullpath.str.contains(r'tmp.*\\.bin') & dff.aa_folder.str.contains(r'sdcard/')].iterrows():\n\n try:\n\n item.ff_remove_file()\n\n except Exception:\n\n pass\n\n################################################\n\nfrom a_pandas_ex_adb_to_df import pd_add_adb_to_df\n\nimport pandas as pd\n\nadb_path = \"C:\\\\Users\\\\Gamer\\\\AppData\\\\Local\\\\Android\\\\Sdk\\\\platform-tools\\\\adb.exe\"\n\ndeviceserial = \"localhost:5745\"\n\npd_add_adb_to_df()\n\ndf = pd.Q_adb_to_df(device=deviceserial,adb_path=adb_path)\n\nprint(df)\n\n\n\n\n\nprint(df.loc[df.aa_fullpath.str.contains(r'download.*_.*\\.mp4',na=False,regex=True, flags=re.IGNORECASE)][:5].to_string())\n\n\n\n aa_filename aa_folder aa_fullpath aa_id aa_index aa_rights aa_links aa_owner aa_group aa_size aa_date\n\n634994 von_haus_aus.mp4 storage/emulated/0/Download storage/emulated/0/Download/von_haus_aus.mp4 140306 5428 -rwxrwx--- 1 u0_a219 media_rw 5552768 2022-03-21 17:31:00\n\n634995 ins_haus_stehen.mp4 storage/emulated/0/Download storage/emulated/0/Download/ins_haus_stehen.mp4 186233 6328 -rwxrwx--- 1 u0_a219 media_rw 6471958 2022-03-21 17:31:00\n\n634996 aufs_haus_gehen.mp4 storage/emulated/0/Download storage/emulated/0/Download/aufs_haus_gehen.mp4 126498 6588 -rwxrwx--- 1 u0_a219 media_rw 6738374 2022-03-21 17:31:00\n\n634997 mit_der_tuer_ins_haus_fallen.mp4 storage/emulated/0/Download storage/emulated/0/Download/mit_der_tuer_ins_haus_fallen.mp4 130773 6832 -rwxrwx--- 1 u0_a219 media_rw 6989353 2022-03-21 17:31:00\n\n635004 Alfredo_stiftete_seinen_Lieferwagen_final.mp4 storage/emulated/0/Download storage/emulated/0/Download/Alfredo_stiftete_seinen_Lieferwagen_final.mp4 136706 5104 -rw-rw---- 1 u0_a219 media_rw 5219973 2022-06-01 22:58:00\n\n\n\n\n\n\n\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Use the power of pandas to manage the files on your Android device",
"version": "0.15",
"project_urls": {
"Homepage": "https://github.com/hansalemaos/a_pandas_ex_adb_to_df"
},
"split_keywords": [
"pandas",
"dataframe",
"adb",
"ls",
"dir",
"files"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "725aec27ae3baa9e7257adeda1cb00b922f1f25147549c5a0334e564b4cbc531",
"md5": "acbc0b98130ee3c1f20160bfe4b4b39e",
"sha256": "34166b1ce82a2f88b6650b082de20efc1b772f0d4be3b4f88a1aa17e8778b125"
},
"downloads": -1,
"filename": "a_pandas_ex_adb_to_df-0.15-py3-none-any.whl",
"has_sig": false,
"md5_digest": "acbc0b98130ee3c1f20160bfe4b4b39e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9011,
"upload_time": "2022-12-06T02:56:30",
"upload_time_iso_8601": "2022-12-06T02:56:30.733514Z",
"url": "https://files.pythonhosted.org/packages/72/5a/ec27ae3baa9e7257adeda1cb00b922f1f25147549c5a0334e564b4cbc531/a_pandas_ex_adb_to_df-0.15-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f0bdb678879b1997ac08e22ce4cc4564204ae7efbe86116c63addfbaae461056",
"md5": "d7eddb666b6af038bfae11a354c6d203",
"sha256": "855213078f154c2658736ba0c3880e2c610455fb7034a50b6952e372dc22cfc0"
},
"downloads": -1,
"filename": "a_pandas_ex_adb_to_df-0.15.tar.gz",
"has_sig": false,
"md5_digest": "d7eddb666b6af038bfae11a354c6d203",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7264,
"upload_time": "2022-12-06T02:56:32",
"upload_time_iso_8601": "2022-12-06T02:56:32.480525Z",
"url": "https://files.pythonhosted.org/packages/f0/bd/b678879b1997ac08e22ce4cc4564204ae7efbe86116c63addfbaae461056/a_pandas_ex_adb_to_df-0.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-06 02:56:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hansalemaos",
"github_project": "a_pandas_ex_adb_to_df",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "androidviewclient",
"specs": []
},
{
"name": "flatten_everything",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "regex",
"specs": []
}
],
"lcname": "a-pandas-ex-adb-to-df"
}