Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to transfer files using aft-mtp-cli with examples #301

Open
jidanni opened this issue Mar 15, 2022 · 3 comments
Open

Document how to transfer files using aft-mtp-cli with examples #301

jidanni opened this issue Mar 15, 2022 · 3 comments

Comments

@jidanni
Copy link

jidanni commented Mar 15, 2022

https://whoozle.github.io/android-file-transfer-linux/ and also the aft-mtp-cli man page have no examples of how to copy a file or directory or anything.

@jidanni jidanni changed the title Document aft-mtp-cli Document how to transfer files using aft-mtp-cli with examples Mar 15, 2022
@jidanni
Copy link
Author

jidanni commented Mar 15, 2022

https://whoozle.github.io/android-file-transfer-linux/FAQ.html shows one uses "get Pictures". Perhaps this will copy all the files in that directory.

Best would be a complete shell session example.

@jehoshua7
Copy link

jehoshua7 commented Apr 25, 2022

Yes, some documents would be great. I have finally been able to get the CLI working ( #307 (comment) ), and now not knowing what commands I can use ..

Samsung Electronics Co., Ltd. SM-G930F / Galaxy S7 [93%]:Phone>

Although there is help ..

aft-mtp-cli -h

usage:
-h --help show this help
-v --verbose show debug output
-i --interactive force interactive mode
-b --batch batch command processing
-e --events allow event processing
-f --input-file use file to read input commands
-C --no-claim no usb interface claim
-R --reset-device reset usb device before connecting
-d --device-name use device name (could be partial name, e.g. model or manufacturer)
-l --device-list list devices
-V --version show version information

@BostX
Copy link

BostX commented Jun 10, 2022

File transfer: Phone -> Computer

~/dev/android-file-transfer-linux/build ──────────────────────────────────────────────────
❯ cli/aft-mtp-cli
selected storage 65537 SECZ9519043CHOHB Phone
android file transfer for linux version v4.2-33-g299a01f
Samsung Electronics Co., Ltd. SM-G398FN G398FNXXSGCVE1
extensions: microsoft.com: 1.0; samsung.com/kies: 5.0; samsung.com/devicestatus: 0; 
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> ls
1          Signal
2          Movies
3          Sounds
4          DualApp
5          Documents
6          Pictures
7          Alarms
8          Audiobooks
9          Podcasts
10         Ringtones
11         Telegram
12         DCIM
13         Notifications
14         Download
15         Music
16         Threema
17         Samsung
18         Android
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> cd DCIM/ 
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> ls
19         Screenshots
20         Camera
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> cd Camera/ 
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> ls
21         20211023_142458.jpg
22         20210604_143613.jpg
[... abbreviated ... ]
679        20211022_221417.jpg
680        20220109_184918.jpg
681        20200815_121730.jpg
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> get 20200815_121730.jpg 
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> exit
~/dev/android-file-transfer-linux/build ──────────────────────────────────────────────────
❯ ls -la
total 9536
drwxr-xr-x  6 bost users    4096 Jun 10 20:06 .
drwxr-xr-x 12 bost users    4096 Jun 10 19:22 ..
-rw-r--r--  1 bost users 8483417 Aug 15  2020 20200815_121730.jpg
drwxr-xr-x  3 bost users    4096 Jun 10 19:44 cli
-rw-r--r--  1 bost users   26274 Jun 10 19:27 CMakeCache.txt
drwxr-xr-x  7 bost users    4096 Jun 10 19:44 CMakeFiles
-rw-r--r--  1 bost users    2298 Jun 10 19:27 cmake_install.cmake
-rw-r--r--  1 bost users 1181298 Jun 10 19:44 libmtp-ng-static.a
-rw-r--r--  1 bost users   35164 Jun 10 19:27 Makefile
drwxr-xr-x  3 bost users    4096 Jun 10 19:44 python
drwxr-xr-x  3 bost users    4096 Jun 10 19:27 qt

File transfer: Computer -> Phone

~/dev/android-file-transfer-linux/build ──────────────────────────────────────────────────
❯ cli/aft-mtp-cli
selected storage 65537 SECZ9519043CHOHB Phone
android file transfer for linux version v4.2-33-g299a01f
Samsung Electronics Co., Ltd. SM-G398FN G398FNXXSGCVE1
extensions: microsoft.com: 1.0; samsung.com/kies: 5.0; samsung.com/devicestatus: 0; 
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> cd DCIM/Camera/ 
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> put CMakeCache.txt
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> ls CMakeCache.txt
error: Get: invalid response code InvalidParentObject (0x201a)
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> ls
21         20211023_142458.jpg
22         20210604_143613.jpg
[... abbreviated ... ]
679        20211022_221417.jpg
680        20220109_184918.jpg
681        20200815_121730.jpg
702        CMakeCache.txt
Samsung Electronics Co., Ltd. SM-G398FN / Galaxy XCover 4s [100%]:Phone> exit
~/dev/android-file-transfer-linux/build ──────────────────────────────────────────────────

The ls CMakeCache.txt shows an error however the file was transferred successfully. (I also checked it on the phone)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants