arft 0.5.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
arft-0.5.8/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Stephen Karl Larroque
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
arft-0.5.8/PKG-INFO ADDED
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: arft
3
+ Version: 0.5.8
4
+ Summary: ARFT (Android Robust File Transfer): robust resumable Android file transfer over ADB with atomic operations, resuming, cached discovery and progress reporting.
5
+ Author: OpenCode User
6
+ License: MIT
7
+ Keywords: adb,android,backup,transfer,tqdm
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Console
10
+ Classifier: Intended Audience :: End Users/Desktop
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: System :: Archiving :: Backup
20
+ Classifier: Topic :: Utilities
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: tqdm>=4.66
25
+ Dynamic: license-file
26
+
27
+ # arft
28
+
29
+ **arft** stands for **Android Robust File Transfer**.
30
+
31
+ It provides robust Android file-by-file transfer over ADB with resumable behavior, atomic writes, lazy remote metadata fetching, cached remote file discovery, and `tqdm` progress reporting for checking, metadata prefetch, and transfer.
32
+
33
+ It was tested on Android 10 and Windows 11 Pro.
34
+
35
+ ## Features
36
+
37
+ - atomic operations (ie, crashing in the middle of a file download ensures it will get redownloaded on resuming)
38
+ - resumes safely and fast after interruption
39
+ - resumes downloading even if provided with a partial download started with another app or manually (ie, can be used to incrementally update a backup, previously downloaded files will be checked and only newer/different files will be updated/added)
40
+ - never exposes partial files as completed output
41
+ - validates file size and optionally SHA-256
42
+ - preserves timestamps as closely as Android exposes them
43
+ - caches the discovered remote file list to speed up later restarts
44
+ - can rebuild its local bookkeeping state from an already partially downloaded folder
45
+ - supports `--refresh-file-list` to append newly discovered files without forcing full re-copy
46
+ - supports `--force-all` to refresh discovery and re-copy everything
47
+ - supports `--skip-all-checks` for the fastest possible resume when you trust already-downloaded files
48
+ - supports `--verbose` to log every issued ADB command
49
+
50
+ ## Installation or updating
51
+
52
+ First you need to download and unzip the latest version of ADB (part of [Google's Platform Tools](https://developer.android.com/tools/releases/platform-tools)).
53
+
54
+ Secondly you need a Python interpreter. Miniconda is awesome and small.
55
+
56
+ Thirdly you need to enable `USB debugging` = adb debugging on your Android phone (so you need to enable the Developer options).
57
+
58
+ Fourthly, you can then install `arft` using:
59
+
60
+ ```bash
61
+ pip install --upgrade arft
62
+ ```
63
+
64
+ ## Usage
65
+
66
+ ### As a module
67
+
68
+ ```bash
69
+ python -m arft \
70
+ --adb-path "C:\platform-tools\adb.exe" \
71
+ --remote-root "/storage/emulated/0/DCIM" \
72
+ --local-root "D:\AndroidBackup\DCIM"
73
+ ```
74
+
75
+ ### As a console script
76
+
77
+ ```bash
78
+ arft \
79
+ --adb-path "C:\platform-tools\adb.exe" \
80
+ --remote-root "/storage/emulated/0/DCIM" \
81
+ --local-root "D:\AndroidBackup\DCIM"
82
+ ```
83
+
84
+ ## Common options
85
+
86
+ - `--verbose`: log every issued ADB command into the console and `.arft.log`
87
+ - `--verify-hash`: enable SHA-256 verification after size verification
88
+ - `--refresh-file-list`: refresh the cached remote file list but still skip already complete local files
89
+ - `--force-all`: refresh the remote file list and re-copy all files
90
+ - `--check-all-files`: strictly revalidate already-downloaded files against the phone before skipping them; if combined with `--verify-hash`, this also re-checks hashes for those files
91
+ - `--skip-all-checks`: trust any already-present local file immediately and skip all existing-file validation checks; this takes precedence over `--check-all-files` and resume-time hash checking
92
+ - `--exclude REGEXP`: exclude remote relative paths matching a Python regular expression before metadata prefetch, checking, dry-run output, and transfer planning
93
+ - `--dry-run`: print planned files without copying them
94
+
95
+ ### Excluding subpaths with regular expressions
96
+
97
+ `--exclude` uses a regular expression that is applied to each remote relative path. This is useful for skipping generated media caches or app metadata folders anywhere under the chosen remote root.
98
+
99
+ Example:
100
+
101
+ ```bash
102
+ arft \
103
+ --adb-path "C:\platform-tools\adb.exe" \
104
+ --remote-root "/storage/emulated/0" \
105
+ --local-root "D:\AndroidBackup" \
106
+ --exclude "(\.thumbnails|\.Gallery2)"
107
+ ```
108
+
109
+ That example excludes any remote relative path containing either `.thumbnails` or `.Gallery2`.
110
+
111
+ ## Bookkeeping files created in `--local-root`
112
+
113
+ ARFT creates a few hidden bookkeeping files in the destination folder so it can resume safely and quickly:
114
+
115
+ - `.arft-local-sync-state.json`: the local sync state manifest. It records which files were already completed successfully, along with the locally known size and timestamp metadata used for fast resume decisions.
116
+ - `.arft-remote-files-list.json`: the cached recursive remote file list. It lets ARFT skip the expensive remote re-listing step on later runs unless you use `--refresh-file-list` or `--force-all`.
117
+ - `.arft-failed-files.tsv`: a tab-separated list of files that failed during the run, together with the failure reason.
118
+ - `.arft.log`: the persistent run log. With `--verbose`, it also contains every issued ADB command prefixed with `ADB CMD:`.
119
+
120
+ ## Resume and recovery behavior
121
+
122
+ - Normal resume is fast by default: if `.arft-local-sync-state.json` says a file already finished successfully and the local file still matches the saved local size, ARFT skips it without querying the phone again.
123
+ - `--check-all-files` restores a stricter mode where existing local files are revalidated against remote metadata before they are skipped.
124
+ - `--skip-all-checks` is the fastest mode: any already-existing local file is trusted immediately.
125
+ - If the destination folder already contains downloaded payload files but the local sync state file is missing, ARFT automatically rebuilds its state and behaves as if `--check-all-files` were enabled for that bootstrap run.
126
+
127
+ ## License
128
+
129
+ Published under the opensource MIT License.
130
+
131
+ ## Author
132
+
133
+ This project was developed by Stephen Karl Larroque with agentic AI (OpenCode + Oh-My-Openagent harness/agentic orchestration system with the model OpenAI ChatGPT Codex-5.3).
134
+
135
+ ## Alternatives
136
+
137
+ * [ADB Explorer](https://github.com/Alex4SSB/ADB-Explorer) which offers a much more features complete GUI, but it fails with large files/folders and is much slower (this is why this script was made).
138
+ * [better-adbsync](https://github.com/jb2170/better-adb-sync), a rsync-like tool to synchronize files between Android and a desktop computer.
arft-0.5.8/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # arft
2
+
3
+ **arft** stands for **Android Robust File Transfer**.
4
+
5
+ It provides robust Android file-by-file transfer over ADB with resumable behavior, atomic writes, lazy remote metadata fetching, cached remote file discovery, and `tqdm` progress reporting for checking, metadata prefetch, and transfer.
6
+
7
+ It was tested on Android 10 and Windows 11 Pro.
8
+
9
+ ## Features
10
+
11
+ - atomic operations (ie, crashing in the middle of a file download ensures it will get redownloaded on resuming)
12
+ - resumes safely and fast after interruption
13
+ - resumes downloading even if provided with a partial download started with another app or manually (ie, can be used to incrementally update a backup, previously downloaded files will be checked and only newer/different files will be updated/added)
14
+ - never exposes partial files as completed output
15
+ - validates file size and optionally SHA-256
16
+ - preserves timestamps as closely as Android exposes them
17
+ - caches the discovered remote file list to speed up later restarts
18
+ - can rebuild its local bookkeeping state from an already partially downloaded folder
19
+ - supports `--refresh-file-list` to append newly discovered files without forcing full re-copy
20
+ - supports `--force-all` to refresh discovery and re-copy everything
21
+ - supports `--skip-all-checks` for the fastest possible resume when you trust already-downloaded files
22
+ - supports `--verbose` to log every issued ADB command
23
+
24
+ ## Installation or updating
25
+
26
+ First you need to download and unzip the latest version of ADB (part of [Google's Platform Tools](https://developer.android.com/tools/releases/platform-tools)).
27
+
28
+ Secondly you need a Python interpreter. Miniconda is awesome and small.
29
+
30
+ Thirdly you need to enable `USB debugging` = adb debugging on your Android phone (so you need to enable the Developer options).
31
+
32
+ Fourthly, you can then install `arft` using:
33
+
34
+ ```bash
35
+ pip install --upgrade arft
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ### As a module
41
+
42
+ ```bash
43
+ python -m arft \
44
+ --adb-path "C:\platform-tools\adb.exe" \
45
+ --remote-root "/storage/emulated/0/DCIM" \
46
+ --local-root "D:\AndroidBackup\DCIM"
47
+ ```
48
+
49
+ ### As a console script
50
+
51
+ ```bash
52
+ arft \
53
+ --adb-path "C:\platform-tools\adb.exe" \
54
+ --remote-root "/storage/emulated/0/DCIM" \
55
+ --local-root "D:\AndroidBackup\DCIM"
56
+ ```
57
+
58
+ ## Common options
59
+
60
+ - `--verbose`: log every issued ADB command into the console and `.arft.log`
61
+ - `--verify-hash`: enable SHA-256 verification after size verification
62
+ - `--refresh-file-list`: refresh the cached remote file list but still skip already complete local files
63
+ - `--force-all`: refresh the remote file list and re-copy all files
64
+ - `--check-all-files`: strictly revalidate already-downloaded files against the phone before skipping them; if combined with `--verify-hash`, this also re-checks hashes for those files
65
+ - `--skip-all-checks`: trust any already-present local file immediately and skip all existing-file validation checks; this takes precedence over `--check-all-files` and resume-time hash checking
66
+ - `--exclude REGEXP`: exclude remote relative paths matching a Python regular expression before metadata prefetch, checking, dry-run output, and transfer planning
67
+ - `--dry-run`: print planned files without copying them
68
+
69
+ ### Excluding subpaths with regular expressions
70
+
71
+ `--exclude` uses a regular expression that is applied to each remote relative path. This is useful for skipping generated media caches or app metadata folders anywhere under the chosen remote root.
72
+
73
+ Example:
74
+
75
+ ```bash
76
+ arft \
77
+ --adb-path "C:\platform-tools\adb.exe" \
78
+ --remote-root "/storage/emulated/0" \
79
+ --local-root "D:\AndroidBackup" \
80
+ --exclude "(\.thumbnails|\.Gallery2)"
81
+ ```
82
+
83
+ That example excludes any remote relative path containing either `.thumbnails` or `.Gallery2`.
84
+
85
+ ## Bookkeeping files created in `--local-root`
86
+
87
+ ARFT creates a few hidden bookkeeping files in the destination folder so it can resume safely and quickly:
88
+
89
+ - `.arft-local-sync-state.json`: the local sync state manifest. It records which files were already completed successfully, along with the locally known size and timestamp metadata used for fast resume decisions.
90
+ - `.arft-remote-files-list.json`: the cached recursive remote file list. It lets ARFT skip the expensive remote re-listing step on later runs unless you use `--refresh-file-list` or `--force-all`.
91
+ - `.arft-failed-files.tsv`: a tab-separated list of files that failed during the run, together with the failure reason.
92
+ - `.arft.log`: the persistent run log. With `--verbose`, it also contains every issued ADB command prefixed with `ADB CMD:`.
93
+
94
+ ## Resume and recovery behavior
95
+
96
+ - Normal resume is fast by default: if `.arft-local-sync-state.json` says a file already finished successfully and the local file still matches the saved local size, ARFT skips it without querying the phone again.
97
+ - `--check-all-files` restores a stricter mode where existing local files are revalidated against remote metadata before they are skipped.
98
+ - `--skip-all-checks` is the fastest mode: any already-existing local file is trusted immediately.
99
+ - If the destination folder already contains downloaded payload files but the local sync state file is missing, ARFT automatically rebuilds its state and behaves as if `--check-all-files` were enabled for that bootstrap run.
100
+
101
+ ## License
102
+
103
+ Published under the opensource MIT License.
104
+
105
+ ## Author
106
+
107
+ This project was developed by Stephen Karl Larroque with agentic AI (OpenCode + Oh-My-Openagent harness/agentic orchestration system with the model OpenAI ChatGPT Codex-5.3).
108
+
109
+ ## Alternatives
110
+
111
+ * [ADB Explorer](https://github.com/Alex4SSB/ADB-Explorer) which offers a much more features complete GUI, but it fails with large files/folders and is much slower (this is why this script was made).
112
+ * [better-adbsync](https://github.com/jb2170/better-adb-sync), a rsync-like tool to synchronize files between Android and a desktop computer.
@@ -0,0 +1,42 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "arft"
7
+ version = "0.5.8"
8
+ description = "ARFT (Android Robust File Transfer): robust resumable Android file transfer over ADB with atomic operations, resuming, cached discovery and progress reporting."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "OpenCode User" }
14
+ ]
15
+ dependencies = [
16
+ "tqdm>=4.66"
17
+ ]
18
+ keywords = ["adb", "android", "backup", "transfer", "tqdm"]
19
+ classifiers = [
20
+ "Development Status :: 4 - Beta",
21
+ "Environment :: Console",
22
+ "Intended Audience :: End Users/Desktop",
23
+ "License :: OSI Approved :: MIT License",
24
+ "Operating System :: OS Independent",
25
+ "Programming Language :: Python :: 3",
26
+ "Programming Language :: Python :: 3 :: Only",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
31
+ "Topic :: System :: Archiving :: Backup",
32
+ "Topic :: Utilities"
33
+ ]
34
+
35
+ [project.scripts]
36
+ arft = "arft.cli:main"
37
+
38
+ [tool.setuptools]
39
+ package-dir = {"" = "src"}
40
+
41
+ [tool.setuptools.packages.find]
42
+ where = ["src"]
arft-0.5.8/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """Android 10 robust file transfer package."""
2
+
3
+ __version__ = "0.4"
@@ -0,0 +1,7 @@
1
+ """Module entry point for arft."""
2
+
3
+ from .cli import main
4
+
5
+
6
+ if __name__ == "__main__":
7
+ raise SystemExit(main())