whoozle / android-file-transfer-linux Goto Github PK
View Code? Open in Web Editor NEWAndroid File Transfer for Linux (and macOS!)
Home Page: http://whoozle.github.io/android-file-transfer-linux/
License: GNU Lesser General Public License v2.1
Android File Transfer for Linux (and macOS!)
Home Page: http://whoozle.github.io/android-file-transfer-linux/
License: GNU Lesser General Public License v2.1
Configuring devices often leads to timeouts. Intercepted traffic shows that proper device response was delayed until exiting from app. libusb bug?
If I'm trying to upload some tar.gz/tar.bz2 archive it's not accepted by application:
uploadFiles ("/home/civil/Music/music.tar.gz")
usbfs limit: 2048 Mib
uploading file "/home/civil/Music/music.tar.gz"
unknown format for "music.tar.gz"
progress size 1159775167
finished
And it actually looks like "successful upload", but in fact file wasn't upload and no error message was shown.
Expected behavior - upload anything, even unknown formats, because it's up to user to decide what to upload and why.
The program incorrectly displays non-English file names on the device and downloads them that way. Looks like they are stored as UTF-8, but AFTL converts them from ISO-8859-1 to UTF-8. For example, «Раскопанная Библия» превратилось в «Ð Ð°Ñ?копаннаÑ? Ð?иблиÑ?.»
When a user traverses the directory tree and goes up one level (e.g. by pressing Esc), nothing indicates where did he come from. It would be more convenient, if the marker was placed on the last visited directory.
If you press "Upload File", select several files with Ctrl-clicks and press Cancel, the selected files will be uploaded anyway.
Is it possible to add Windows Phone support? Currently nothing could connect my Lumia 1020 under Kubuntu. http://pastebin.com/HPTpFEDc
I cannot reproduce this bug reliably, but occasionally deleting all files in a directory results in segmentation fault. The console output looks like this (there were 3 files):
remove rows 1 1
remove rows 0 1
remove rows 2 1
Segmentation fault
The last file is not deleted. Deleting it fron the second try works.
Regarding file uploading I would like to note that if you try to upload a file which already exist on device you'll get no warnings in GUI and this in console output:
uploading file "/home/truf/Изображения/wallp/marceline_final_lr_by_artgerm-d7pvus5.jpg"
failed: SendObjectInfo: invalid response code InvalidParameter (0x201d)
progress size 398504
finished
Would be great if GUI user will be informed.
When I use the "Upload Directory" command, it only uploads the topmost level of the selected directory. If it contained subdirectories, their contents won't be uploaded.
Is there any particular reason why older version was chosen?
If you create/delete/move/rename file or directory on the device using the device controls, the program won't notiice the changes until you unplug the device and plug it in again. Quitting and restarting the program doesn't seem to help.
Hi,
I'm trying to build the project via QtCreator and faced with few problems which I would like to discuss here. Let's move step by step.
I'm opening qt/qt.pro
and trying to build it. Getting:
../../android-file-transfer-linux/mtp/usb/BulkPipe.h:22:24: fatal error: usb/Device.h: No such file or directory
#include <usb/Device.h>
Same for #include <usb/Interface.h>
There are 3 Device.h and 2 Interface.h in project. Which one shall be linked? If it depends than could you add some switch to qt.pro for these build modes?
In version 2.0, the file list is unsorted. It would be nice if files and directories were displayed in standard alphabetical order, with folders first.
for both mount/cli binaries
I'm getting Get: Invalid response code InvalidParameter (0x201d)
any time I'm trying to delete a file on WP device. Console:
./qt/android-file-transfer
upload worker started
device info "NOKIA" "909"
device found, opening session...
session opened, starting
remove rows 4 1
File isn't removed neither from device disk nor from GUI.
wireshark trace: http://1drv.ms/1d8dswD
(Only file deletion attempt is captured)
Now it looks too low-level:
$ ./aft-mtp-cli list
Canon Inc. Canon PowerShot SX160 IS 1-13.0.1.0 B65F3B9BC7414886A6FA40044A7D5D80
supported op codes: 1014 1015 1016 1017 1001 1002 1003 9013 905c 905d 9999 901f 1004 1005 1006 1007 1008 1009 100a 101b 100c 100d 100b 100f 1012 9001 9021 901b 901e 9019 9006 901c 9002 904c 9024 9025 9038 9039 903a 903b 904b 9060 9062 900e 900f 9010 9011 9801 9802 9803 9804 9805 9050 9051
supported properties: d045 d04a d02e d02f 5001 d002 d003 d034 d047 d046 d030 d049 d032 d033 d031 d050 d051 d052 d402 d406 d407 d303
524288 3001 DCIM 0 0x0,
262144000 3001 MISC 0 0x0,
262171 bf01 PS.FI2 155664 0x0,
$ ./aft-mtp-cli list 524288
Canon Inc. Canon ...
...
26214400 3001 100CANON 0 0x0,
29622272 3001 113___04 0 0x0,
$ ./aft-mtp-cli list 29622272
...
29654085 b105 MVI_1988.MOV 215596544 1280x720, 20150402T003839.0
29654101 b105 MVI_1989.MOV 637654732 1280x720, 20150402T004005.0
$ ./aft-mtp-cli get 29654101
...
object id = 29654101
filename = MVI_1989.MOV
^C
I should be more like ftp
program:
$ ./aft-mtp-cli
Canon Inc. Canon PowerShot SX160 IS 1-13.0.1.0 B65F3B9BC7414886A6FA40044A7D5D80
supported op codes: 1014 1015 1016 1017 1001 1002 1003 9013 905c 905d 9999 901f 1004 1005 1006 1007 1008 1009 100a 101b 100c 100d 100b 100f 1012 9001 9021 901b 901e 9019 9006 901c 9002 904c 9024 9025 9038 9039 903a 903b 904b 9060 9062 900e 900f 9010 9011 9801 9802 9803 9804 9805 9050 9051
supported properties: d045 d04a d02e d02f 5001 d002 d003 d034 d047 d046 d030 d049 d032 d033 d031 d050 d051 d052 d402 d406 d407 d303
> help
ls - list current or specified directory
ls_raw - verbose list
get - download file to current directory
get_raw - download file by number instead of by name
cd - change current directory
cd_raw - change current directory by number instead of by name
> ls
DCIM
MISC
PS.FI2
> ls_raw
524288 3001 DCIM 0 0x0,
262144000 3001 MISC 0 0x0,
262171 bf01 PS.FI2 155664 0x0,
> cd DCIM
> list
100CANON
113___04
> cd 113___04
> list
MVI_1988.MOV
MVI_1989.MOV
> get MVI_1989.MOV
filename = MVI_1989.MOV
^C
$ ./aft-mtp-cli get DCIM/113___04/MVI_1989.MOV
Canon Inc. Canon ........ d407 d303
object id = 29654101
filename = MVI_1989.MOV
^C
I don't like switching myself from command line mode to GUI mode, so command-line android-file-transfer would be useful for me, as aft-mtp-mount
fails to work with this camera.
Arch Linux 3.19.2, никакие MTP девайсы не подключены.
% ./qt/android-file-transfer
upload worker started
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/004/002: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/004/001: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/002: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/001: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/003: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/002: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/001: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/005: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/003: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/004: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/002: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/007: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/006: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/001: Отказано в доступе
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
device was not found
Аварийный останов (core dumped)
Observed for ru_RU.UTF8 locale. When I mount the device with aft-mtp-mount and then try to launch android-file-transfer, a messagebox appears with something like:
ioctl(_fd, USBDEVFS_CLAIMINTERFACE, &interfaceNumber): Đ£ÑœÑŸÑ€Đ¾Đ¹ÑœÑŸĐ¹Đ¾ ...
The message seems to have been converted from ISO-8859-1 to UTF-8, like in issue #34. This bug is observed in a version where #34 has already been fixed.
Your library is currently more stable/sane than most of other libraries (at least it works better than other libraries). Maybe it'll be good idea to make fuse interface or at least some CLI stuff, cause current GUI is really looks like "proof of concept" stuff, not as something usable.
The last comment there:
https://code.google.com/p/android/issues/detail?id=75259
Though uploading files works ok.
Device: OnePlus One, CM12 Nightly (Android 5.0)
Error: SendObjectInfo: invalid response code GeneralError (0x2002)
Please add free space (df) report for FUSE mount.
libmtp supports this feature.
If you select a directory in the main program window and try to download it as a file, an empty file with that name is created.
exact reproduce pattern is unknown, deleting the whole failing hierarchy helps.
consider adding workaround?
I've tried to download previously uploaded photo and got it back broken. The console:
downloading to "/home/truf/Изображения"
downloading 14 to "/home/truf/Изображения/marceline_final_lr_by_artgerm-d7pvus5.jpg"
progress size 398504
finished
The reported file size is correct. Files could be downloaded here. It's clear that broken file has some byte ordering issues at the end.
Investigate and implement copying/pasting files from/to clipboard
When I upload to a tab large volume at once (over 1.2G), the progress bar seems to reach 100% at about 1100-1200 M regardless of actual volume, be it 1.5G or 5G.
android-file-transfer displays the below message on start:
ioctl(_fd, USBDEVFS_CLAIMINTERFACE, &interfaceNumber): Device or resource busy
And then the program exits.
P.S. sudo ./android-file-transfer displays the same error message
P.P.S. At the same time, adb push
works fine even under non-root user:
xx@xxx ~/Downloads/android-file-transfer-linux-2.2/build/qt $ adb push ./android-file-transfer /storage/sdcard1
4532 KB/s (531148 bytes in 0.114s)
xxx@xxx ~/Downloads/android-file-transfer-linux-2.2/build/qt $
P.P.P.S. OS=Linux Mint 17.1 64-bit
copy from QFileDialog::getExistingDirectory ?
Currently only "Esc" is supported for going up one level. It would be batter to add more familiar "BkSp" and "Alt-up arrow".
Also it would be more convenient to allow to use numpad "Enter" to go into a directory (in addition to main block "Enter").
It can be useful to have a library, so it'll be a lot easier to write custom interfaces (CLI one, gtk one, etc).
The application should have an icon and a .desktop file to properly integrate with Linux desktops.
Here is an example .desktop file (to be placed in /usr/share/applications/android-file-transfer.desktop)
[Desktop Entry]
Name=Android File Transfer
Comment=Transfer files to and from MTP devices
Exec=android-file-transfer
Icon=android-file-transfer
StartupNotify=false
Terminal=false
Type=Application
Categories=Utility;FileTools;Filesystem;Qt;
$ cp test.txt ~/mtp/SECZ9519043CHOHB/Documents/test.txt
cp: невозможно создать обычный файл «/home/repsac/mtp/SECZ9519043CHOHB/Documents/test.txt»: Ошибка ввода/вывода
$ ls ~/mtp/SECZ9519043CHOHB/Documents/
итого 0
-rw-r--r-- 1 root root 0 янв 1 1970 test.txt
Пробовал и так и сяк, и на разные storage создается файл 0 длины и всё.
I am using Samsung Galaxy Tab Pro SM-T525. Uploading files to the tab's internal storage works fine. Uploading the same files to the tab's removable flash card doesn't work. I keep getting errors like
uploading file "/home/user/books/Spoor/Spoor2.htm" failed: Get: invalid response code GeneralError (0x2002)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.