Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package android-file-transfer-linux for openSUSE:Factory checked in at 2025-05-07 19:18:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/android-file-transfer-linux (Old) and /work/SRC/openSUSE:Factory/.android-file-transfer-linux.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "android-file-transfer-linux" Wed May 7 19:18:14 2025 rev:3 rq:1275025 version:4.4.0~git.20250506T233238.058dbe1 Changes: -------- --- /work/SRC/openSUSE:Factory/android-file-transfer-linux/android-file-transfer-linux.changes 2024-09-19 21:17:28.514800692 +0200 +++ /work/SRC/openSUSE:Factory/.android-file-transfer-linux.new.30101/android-file-transfer-linux.changes 2025-05-07 19:18:22.091963040 +0200 @@ -1,0 +2,27 @@ +Tue May 06 22:35:38 UTC 2025 - llyyr <ll...@yukari.in> + +- Update to version 4.4.0~git.20250506T233238.058dbe1: + * fuse3 port + * fix GetObjectPropDesc - missing object format in API/request + * bump version to 4.5 + * macosx CI fix + * remove travis config + * made clear halt optional - it seems to break newer android devices + * claim token later and don't disconnect existing devices if they are not MTP + * remove debug traces + * use USBDEVFS_DISCONNECT_CLAIM + * Add screenshot to README.md + * add screenshot + * pass transactionId to session getDeviceInfo + * skip fs entries which start with . + * check access before calling opendir (reduce number of exception) + * Revert "switch macosx builder to qt@6" + * switch macosx builder to qt@6 + * downgrade macosx builder + * Revert "fix macosx bundle" + * fix macosx bundle + * bump cmake version + * fix qt path + * Allow building with Qt 6.x + +------------------------------------------------------------------- Old: ---- android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df.tar.gz New: ---- android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ android-file-transfer-linux.spec ++++++ --- /var/tmp/diff_new_pack.A8eGCl/_old 2025-05-07 19:18:22.963999318 +0200 +++ /var/tmp/diff_new_pack.A8eGCl/_new 2025-05-07 19:18:22.967999484 +0200 @@ -1,7 +1,7 @@ # # spec file for package android-file-transfer-linux # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: android-file-transfer-linux Summary: Android file fransfer for Linux -Version: 4.3.0~git.20240730T195303.cf7036c7f7df +Version: 4.4.0~git.20250506T233238.058dbe1 Release: 0 URL: https://github.com/whoozle/android-file-transfer-linux Source0: %{name}-%{version}.tar.gz @@ -27,12 +27,12 @@ BuildRequires: hicolor-icon-theme BuildRequires: readline-devel BuildRequires: update-desktop-files -BuildRequires: cmake(Qt5LinguistTools) -BuildRequires: cmake(Qt5NetworkAuth) -BuildRequires: pkgconfig(Qt5Core) -BuildRequires: pkgconfig(Qt5Gui) -BuildRequires: pkgconfig(Qt5Widgets) -BuildRequires: pkgconfig(fuse) +BuildRequires: cmake(Qt6LinguistTools) +BuildRequires: cmake(Qt6NetworkAuth) +BuildRequires: pkgconfig(Qt6Core) +BuildRequires: pkgconfig(Qt6Gui) +BuildRequires: pkgconfig(Qt6Widgets) +BuildRequires: pkgconfig(fuse3) BuildRequires: pkgconfig(libcrypto) %description ++++++ _service ++++++ --- /var/tmp/diff_new_pack.A8eGCl/_old 2025-05-07 19:18:23.000000815 +0200 +++ /var/tmp/diff_new_pack.A8eGCl/_new 2025-05-07 19:18:23.004000982 +0200 @@ -3,8 +3,8 @@ <service name="obs_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://github.com/whoozle/android-file-transfer-linux</param> - <param name="revision">cf7036c7f7dff99be19c2c15e6051c4704287574</param> - <param name="versionprefix">4.3.0~git</param> + <param name="revision">058dbe1b5405d8d46fdeec5573956762f0b9bded</param> + <param name="versionprefix">4.4.0~git</param> <param name="versionformat">%ci.%h</param> <param name="changesgenerate">enable</param> </service> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.A8eGCl/_old 2025-05-07 19:18:23.040002479 +0200 +++ /var/tmp/diff_new_pack.A8eGCl/_new 2025-05-07 19:18:23.044002646 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/whoozle/android-file-transfer-linux</param> - <param name="changesrevision">cf7036c7f7dff99be19c2c15e6051c4704287574</param></service></servicedata> + <param name="changesrevision">058dbe1b5405d8d46fdeec5573956762f0b9bded</param></service></servicedata> (No newline at EOF) ++++++ android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df.tar.gz -> android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/.github/workflows/actions.yml new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/.github/workflows/actions.yml --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/.github/workflows/actions.yml 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/.github/workflows/actions.yml 2025-05-07 00:32:38.000000000 +0200 @@ -70,7 +70,7 @@ token: ${{ secrets.GITHUB_TOKEN }} artifacts: ./Android*.AppImage* MacOSX: - runs-on: macos-latest + runs-on: macos-13 steps: - name: Install Dependencies... run: | @@ -79,7 +79,7 @@ - name: Checking out sources... uses: actions/checkout@v4 - name: Configuring... - run: cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/usr/local/opt/qt@5/" -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -DOPENSSL_LIBRARIES=/usr/local/opt/openssl@1.1/lib -DCMAKE_INSTALL_PREFIX=appdir -B build -G Ninja . + run: cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(brew --prefix qt@5) -DOPENSSL_ROOT_DIR=$(brew --prefix openssl@1.1) -DOPENSSL_LIBRARIES=$(brew --prefix openssl@1.1)/lib -DCMAKE_INSTALL_PREFIX=appdir -B build -G Ninja . - name: Building... run: ninja -j$(sysctl -n hw.ncpu) -C build - name: Installing... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/.travis.yml new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/.travis.yml --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/.travis.yml 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,74 +0,0 @@ -language: cpp - -sudo: required -dist: trusty - -matrix: - include: - - os: linux - compiler: gcc - - os: freebsd - compiler: clang - - os: osx - osx_image: xcode10.1 - compiler: clang - -install: - - | - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then - sudo apt-get -y install qt5-default qttools5-dev qttools5-dev-tools libfuse-dev libmagic-dev libtag1-dev libssl-dev - elif [ "${TRAVIS_OS_NAME}" = "freebsd" ]; then - sudo pkg install -y ninja qt5-qmake qt5-buildtools qt5-widgets qt5-linguist fusefs-libs pybind11 taglib - elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then - export HOMEBREW_NO_AUTO_UPDATE=1 - brew tap homebrew/cask - brew install qt5 homebrew/cask/osxfuse pybind11 taglib openssl@1.1 - fi - -script: - - | - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then - cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr && - make -j$(nproc) && - make DESTDIR=appdir -j$(nproc) install ; find appdir/ && - sed -i -e 's|^Name=.*|Name=Android File Transfer|g' appdir/usr/share/applications/android-file-transfer.desktop && - wget -c -q "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" && - chmod a+x linuxdeployqt-continuous-x86_64.AppImage && - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH && - export VERSION=$(git rev-parse --short HEAD) && - ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs && - ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage - elif [ "${TRAVIS_OS_NAME}" = "freebsd" ]; then - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DUSB_BACKEND_LIBUSB=YES -DBUILD_PYTHON=OFF - cmake --build build - elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then - mkdir build && - cd build && - cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -DOPENSSL_LIBRARIES=/usr/local/opt/openssl@1.1/lib -DCMAKE_INSTALL_PREFIX=$(pwd)/installdir && - make -j$(sysctl -n hw.ncpu) && - make install && - mv installdir/android-file-transfer.app installdir/Android\ File\ Transfer\ for\ Linux.app && - git clone https://github.com/andreyvit/create-dmg.git && - cd create-dmg && - ./create-dmg --volicon "../../osx/android-file-transfer.icns" --icon-size 96 --icon "Android File Transfer for Linux" 110 100 --app-drop-link 380 100 AndroidFileTransferForLinux.dmg ../installdir/Android\ File\ Transfer\ for\ Linux.app - fi - -after_success: - - | - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then - find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq && - wget https://github.com/d1vanov/ciuploadtool/releases/download/continuous-master/ciuploadtool_linux.zip && - unzip ciuploadtool_linux.zip && - chmod 755 ciuploadtool && - ./ciuploadtool ./Android*.AppImage* - elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then - wget https://github.com/d1vanov/ciuploadtool/releases/download/continuous-master/ciuploadtool_mac.zip && - unzip ciuploadtool_mac.zip && - chmod 755 ciuploadtool && - ./ciuploadtool AndroidFileTransferForLinux.dmg - fi - -branches: - only: - - master - - /^v\d+\.\d+$/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/CMakeLists.txt new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/CMakeLists.txt --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/CMakeLists.txt 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/CMakeLists.txt 2025-05-07 00:32:38.000000000 +0200 @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(android-file-transfer) set (CMAKE_CXX_STANDARD 11) @@ -58,7 +58,7 @@ endif() if (BUILD_FUSE) - pkg_check_modules ( FUSE fuse ) + pkg_check_modules ( FUSE fuse3 ) endif() if (BUILD_TAGLIB) @@ -70,7 +70,7 @@ if (FUSE_FOUND) message(STATUS "fuse found, building mount helper") - add_definitions(${FUSE_CFLAGS} -DFUSE_USE_VERSION=26) + add_definitions(${FUSE_CFLAGS} -DFUSE_USE_VERSION=35 -DFUSE_DARWIN_ENABLE_EXTENSIONS=0) endif() if (PYTHON_FOUND) @@ -258,7 +258,7 @@ list(APPEND MACOSX_BUNDLE_LIBS /usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib) endif() if (TAGLIB_FOUND) - list(APPEND MACOSX_BUNDLE_LIBS /usr/local/opt/taglib/lib/libtag.1.dylib) + list(APPEND MACOSX_BUNDLE_LIBS /usr/local/opt/taglib/lib/libtag.2.dylib) endif() if (FUSE_FOUND) list(APPEND MACOSX_BUNDLE_LIBS /usr/local/lib/libosxfuse.2.dylib) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/README.md new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/README.md --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/README.md 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/README.md 2025-05-07 00:32:38.000000000 +0200 @@ -1,11 +1,13 @@ # Android File Transfer For Linux (FreeBSD and macOS, too!) [](https://github.com/whoozle/android-file-transfer-linux/blob/master/LICENSE) -[](https://github.com/whoozle/android-file-transfer-linux) +[](https://github.com/whoozle/android-file-transfer-linux) [](https://github.com/whoozle/android-file-transfer-linux/actions/workflows/actions.yml) Android File Transfer for Linux — a reliable [MTP](https://en.wikipedia.org/wiki/Media_Transfer_Protocol) client with minimalistic UI similar to [Android File Transfer](https://www.android.com/intl/en_us/filetransfer/). + + It just works™. ## Do I need it? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/android-file-transfer-linux.json new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/android-file-transfer-linux.json --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/android-file-transfer-linux.json 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/android-file-transfer-linux.json 2025-05-07 00:32:38.000000000 +0200 @@ -13,7 +13,7 @@ "config-opts": [ "-DCMAKE_BUILD_TYPE=Release" ], "sources": [{ "type": "git", - "tag": "v4.4", + "tag": "v4.5", "url": "https://github.com/whoozle/android-file-transfer-linux.git" }] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/cli/Session.cpp new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/cli/Session.cpp --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/cli/Session.cpp 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/cli/Session.cpp 2025-05-07 00:32:38.000000000 +0200 @@ -948,7 +948,7 @@ mtp::print("properties supported: "); for(mtp::ObjectProperty prop: ops.ObjectPropertyCodes) { - PrintFormat(_session->GetObjectPropertyDesc(prop), _session->GetObjectProperty(id, prop)); + PrintFormat(_session->GetObjectPropertyDesc(prop, format), _session->GetObjectProperty(id, prop)); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/fuse/FuseEntry.h new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/fuse/FuseEntry.h --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/fuse/FuseEntry.h 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/fuse/FuseEntry.h 2025-05-07 00:32:38.000000000 +0200 @@ -22,6 +22,9 @@ #include <mtp/ptp/ObjectFormat.h> +#include <fuse/Exception.h> +#include <fuse/FuseId.h> + #include <fuse_lowlevel.h> namespace mtp { namespace fuse diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/fuse/fuse.cpp new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/fuse/fuse.cpp --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/fuse/fuse.cpp 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/fuse/fuse.cpp 2025-05-07 00:32:38.000000000 +0200 @@ -478,7 +478,6 @@ void Init(void *, fuse_conn_info *conn) { mtp::scoped_mutex_lock l(_mutex); - conn->want |= conn->capable & FUSE_CAP_BIG_WRITES; } void Lookup (fuse_req_t req, FuseId parent, const char *name) @@ -732,7 +731,7 @@ void RemoveDir (fuse_req_t req, FuseId parent, const char *name) { Unlink(req, parent, name); } - void Rename(fuse_req_t req, FuseId parent, const char *name, FuseId newparent, const char *newName) + void Rename(fuse_req_t req, FuseId parent, const char *name, FuseId newparent, const char *newName, unsigned int flags) { if (parent != newparent) { //no renames across directory boundary, sorry @@ -824,18 +823,14 @@ void Init (void *userdata, struct fuse_conn_info *conn) { mtp::debug("Init: fuse proto version: ", conn->proto_major, ".", conn->proto_minor, - ", capability: 0x", mtp::hex(conn->capable, 8), - ", async read: ", conn->async_read, - //", congestion_threshold: ", conn->congestion_threshold, - //", max bg: ", conn->max_background, + ", capability: 0x", mtp::hex(conn->capable_ext, 8), ", max readahead: ", conn->max_readahead, ", max write: ", conn->max_write ); //If synchronous reads are chosen, Fuse will wait for reads to complete before issuing any other requests. //mtp is completely synchronous. you cannot have two transaction in parallel, so you have to wait any operation to finish before starting another one - conn->async_read = 0; - conn->want &= ~FUSE_CAP_ASYNC_READ; + fuse_unset_feature_flag(conn, FUSE_CAP_ASYNC_READ); try { g_wrapper->Init(userdata, conn); } catch (const std::exception &ex) { mtp::error("init failed:", ex.what()); } } @@ -866,8 +861,8 @@ void Open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi) { mtp::debug(" Open ", ino); WRAP_EX(g_wrapper->Open(req, FuseId(ino), fi)); } - void Rename(fuse_req_t req, fuse_ino_t parent, const char *name, fuse_ino_t newparent, const char *newname) - { mtp::debug(" Rename ", parent, " ", name, " -> ", newparent, " ", newname); WRAP_EX(g_wrapper->Rename(req, FuseId(parent), name, FuseId(newparent), newname)); } + void Rename(fuse_req_t req, fuse_ino_t parent, const char *name, fuse_ino_t newparent, const char *newname, unsigned int flags) + { mtp::debug(" Rename ", parent, " ", name, " -> ", newparent, " ", newname); WRAP_EX(g_wrapper->Rename(req, FuseId(parent), name, FuseId(newparent), newname, flags)); } void Release(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi) { mtp::debug(" Release ", ino); WRAP_EX(g_wrapper->Release(req, FuseId(ino), fi)); } @@ -966,41 +961,50 @@ ops.statfs = &StatFS; struct fuse_args fuse_args = FUSE_ARGS_INIT(static_cast<int>(args.size() - 1), args.data()); - struct fuse_chan *ch; - char *mountpoint; + struct fuse_cmdline_opts opts = {}; int err = -1; - int multithreaded = 0, foreground = 0; - if (fuse_parse_cmdline(&fuse_args, &mountpoint, &multithreaded, &foreground) != -1) + if (fuse_parse_cmdline(&fuse_args, &opts) == 0) { - if (!mountpoint) + if (opts.show_version) { - auto mp = g_wrapper->GetMountpoint(); - mountpoint = strdup(mp.c_str()); - mkdir(mountpoint, 0700); + fuse_lowlevel_version(); + exit(0); + } + if (opts.show_help) + { + fuse_cmdline_help(); + fuse_lowlevel_help(); + exit(0); } - if (mountpoint != NULL && (ch = fuse_mount(mountpoint, &fuse_args)) != NULL) + if (opts.mountpoint != NULL) { - struct fuse_session *se = fuse_lowlevel_new(&fuse_args, &ops, sizeof(ops), NULL); + struct fuse_session *se = fuse_session_new(&fuse_args, &ops, sizeof(ops), NULL); if (se != NULL) { - if (fuse_set_signal_handlers(se) != -1) + if (fuse_set_signal_handlers(se) == 0) { - fuse_session_add_chan(se, ch); - if (fuse_daemonize(foreground) == -1) - perror("fuse_daemonize"); - err = (multithreaded? fuse_session_loop_mt: fuse_session_loop)(se); + if (fuse_session_mount(se, opts.mountpoint) == 0) + { + if (fuse_daemonize(opts.foreground) == -1) + perror("fuse_daemonize"); + if (opts.singlethread) + err = fuse_session_loop(se); + else + err = fuse_session_loop_mt(se, nullptr); + + fuse_session_unmount(se); + } fuse_remove_signal_handlers(se); - fuse_session_remove_chan(ch); } fuse_session_destroy(se); } - fuse_unmount(mountpoint, ch); } } else { mtp::error("fuse_parse_cmdline failed"); } + free(opts.mountpoint); fuse_opt_free_args(&fuse_args); return err ? 1 : 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/backend/linux/usb/Device.cpp new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/backend/linux/usb/Device.cpp --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/backend/linux/usb/Device.cpp 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/backend/linux/usb/Device.cpp 2025-05-07 00:32:38.000000000 +0200 @@ -52,7 +52,9 @@ InterfaceToken::InterfaceToken(int fd, unsigned interfaceNumber): _fd(fd), _interfaceNumber(interfaceNumber) { - IOCTL(_fd, USBDEVFS_CLAIMINTERFACE, &interfaceNumber); + usbdevfs_disconnect_claim claim = {}; + claim.interface = interfaceNumber; + IOCTL(_fd, USBDEVFS_DISCONNECT_CLAIM, &claim); } InterfaceToken::~InterfaceToken() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/ptp/Device.cpp new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/ptp/Device.cpp --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/ptp/Device.cpp 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/ptp/Device.cpp 2025-05-07 00:32:38.000000000 +0200 @@ -107,7 +107,6 @@ for(int j = 0; j < interfaces; ++j) { usb::InterfacePtr iface = conf->GetInterface(device, conf, j, 0); - usb::InterfaceTokenPtr token = claimInterface? device->ClaimInterface(iface): nullptr; debug("Device usb interface: ", i, ':', j, ", index: ", iface->GetIndex(), ", endpoints: ", iface->GetEndpointsCount()); #ifdef USB_BACKEND_LIBUSB @@ -155,8 +154,10 @@ name = stream.ReadString((len - 2) / 2); } #endif + //device->SetConfiguration(i); if (name.find("MTP") != name.npos) { + usb::InterfaceTokenPtr token = claimInterface? device->ClaimInterface(iface): nullptr; usb::BulkPipePtr pipe = usb::BulkPipe::Create(device, conf, iface, token); return std::make_shared<Device>(pipe); } else @@ -164,6 +165,7 @@ if (iface->GetClass() == 6 && iface->GetSubclass() == 1) { + usb::InterfaceTokenPtr token = claimInterface? device->ClaimInterface(iface): nullptr; usb::BulkPipePtr pipe = usb::BulkPipe::Create(device, conf, iface, token); return std::make_shared<Device>(pipe); } @@ -208,7 +210,7 @@ } msg::DeviceInfo Device::GetInfo() - { return Session::GetDeviceInfo(_packeter); } + { return Session::GetDeviceInfo(_packeter, /*transactionId=*/0); } bool Device::Matches(const std::string & filter) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/ptp/Session.cpp new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/ptp/Session.cpp --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/ptp/Session.cpp 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/ptp/Session.cpp 2025-05-07 00:32:38.000000000 +0200 @@ -42,12 +42,27 @@ throw InvalidResponseException(__func__, (RCODE)); \ } while(false) + class Session::Transaction + { + Session * _session; + public: + u32 Id; + + Transaction(Session *session): _session(session) + { session->SetCurrentTransaction(this); } + ~Transaction() + { _session->SetCurrentTransaction(0); } + }; + Session::Session(const PipePacketer & packeter, u32 sessionId): _packeter(packeter), _sessionId(sessionId), _nextTransactionId(1), _transaction(), _getObjectModificationTimeBuggy(false), _separateBulkWrites(false), _defaultTimeout(DefaultTimeout) { - _deviceInfo = GetDeviceInfo(_packeter, _defaultTimeout); + { + Transaction tr(this); + _deviceInfo = GetDeviceInfo(_packeter, tr.Id, _defaultTimeout); + } if (_deviceInfo.Manufacturer == "Microsoft") _separateBulkWrites = true; @@ -63,18 +78,6 @@ Session::~Session() { try { Close(); } catch(const std::exception &ex) { } } - class Session::Transaction - { - Session * _session; - public: - u32 Id; - - Transaction(Session *session): _session(session) - { session->SetCurrentTransaction(this); } - ~Transaction() - { _session->SetCurrentTransaction(0); } - }; - void Session::SetCurrentTransaction(Transaction *transaction) { scoped_mutex_lock l(_transactionMutex); @@ -157,10 +160,10 @@ return Get(transaction.Id, response); } - msg::DeviceInfo Session::GetDeviceInfo(PipePacketer& packeter, int timeout) + msg::DeviceInfo Session::GetDeviceInfo(PipePacketer& packeter, u32 transactionId, int timeout) { ByteArray response; - Send(packeter, OperationRequest(OperationCode::GetDeviceInfo, 0), timeout); + Send(packeter, OperationRequest(OperationCode::GetDeviceInfo, transactionId), timeout); auto info = Get(packeter, 0, response, timeout); return ParseResponse<msg::DeviceInfo>(info); } @@ -223,8 +226,8 @@ msg::ObjectPropertiesSupported Session::GetObjectPropertiesSupported(ObjectFormat format) { return ParseResponse<msg::ObjectPropertiesSupported>(RunTransaction(_defaultTimeout, OperationCode::GetObjectPropsSupported, static_cast<u32>(format))); } - ByteArray Session::GetObjectPropertyDesc(ObjectProperty code) - { return RunTransaction(_defaultTimeout, OperationCode::GetObjectPropDesc, static_cast<u32>(code)); } + ByteArray Session::GetObjectPropertyDesc(ObjectProperty code, ObjectFormat format) + { return RunTransaction(_defaultTimeout, OperationCode::GetObjectPropDesc, static_cast<u32>(code), static_cast<u32>(format)); } void Session::GetObject(ObjectId objectId, const IObjectOutputStreamPtr &outputStream) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/ptp/Session.h new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/ptp/Session.h --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/ptp/Session.h 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/ptp/Session.h 2025-05-07 00:32:38.000000000 +0200 @@ -107,7 +107,7 @@ { return std::make_shared<ObjectEditSession>(session, objectId); } msg::ObjectPropertiesSupported GetObjectPropertiesSupported(ObjectFormat format); - ByteArray GetObjectPropertyDesc(ObjectProperty code); + ByteArray GetObjectPropertyDesc(ObjectProperty code, ObjectFormat format); void SetObjectProperty(ObjectId objectId, ObjectProperty property, const ByteArray &value); void SetObjectProperty(ObjectId objectId, ObjectProperty property, u64 value); @@ -144,7 +144,7 @@ //windows specific void EnableSecureFileOperations(u32 cmac1[4]); - static msg::DeviceInfo GetDeviceInfo(PipePacketer& packeter, int timeout = 0); + static msg::DeviceInfo GetDeviceInfo(PipePacketer& packeter, u32 transactionId, int timeout = 0); private: template<typename ... Args> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/usb/BulkPipe.cpp new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/usb/BulkPipe.cpp --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/usb/BulkPipe.cpp 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/usb/BulkPipe.cpp 2025-05-07 00:32:38.000000000 +0200 @@ -25,18 +25,26 @@ namespace mtp { namespace usb { - BulkPipe::BulkPipe(DevicePtr device, ConfigurationPtr conf, InterfacePtr interface, EndpointPtr in, EndpointPtr out, EndpointPtr interrupt, ITokenPtr claimToken): + BulkPipe::BulkPipe(DevicePtr device, ConfigurationPtr conf, InterfacePtr interface, EndpointPtr in, EndpointPtr out, EndpointPtr interrupt, ITokenPtr claimToken, bool clearHalt): _device(device), _conf(conf), _interface(interface), _in(in), _out(out), _interrupt(interrupt), _claimToken(claimToken) { - try - { device->ClearHalt(in); } - catch(const std::exception & ex) - { error("clearing halt for in ep: ", ex.what()); } + if (clearHalt) + { + try + { device->ClearHalt(_interrupt); } + catch(const std::exception & ex) + { error("clearing halt for in ep: ", ex.what()); } - try - { device->ClearHalt(out); } - catch(const std::exception & ex) - { error("clearing halt for in ep: ", ex.what()); } + try + { device->ClearHalt(in); } + catch(const std::exception & ex) + { error("clearing halt for in ep: ", ex.what()); } + + try + { device->ClearHalt(out); } + catch(const std::exception & ex) + { error("clearing halt for in ep: ", ex.what()); } + } } BulkPipe::~BulkPipe() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/usb/BulkPipe.h new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/usb/BulkPipe.h --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/usb/BulkPipe.h 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/usb/BulkPipe.h 2025-05-07 00:32:38.000000000 +0200 @@ -54,7 +54,7 @@ class CurrentStreamSetter; public: - BulkPipe(DevicePtr device, ConfigurationPtr conf, InterfacePtr interface, EndpointPtr in, EndpointPtr out, EndpointPtr interrupt, ITokenPtr claimToken); + BulkPipe(DevicePtr device, ConfigurationPtr conf, InterfacePtr interface, EndpointPtr in, EndpointPtr out, EndpointPtr interrupt, ITokenPtr claimToken, bool clearHalt = false); ~BulkPipe(); DevicePtr GetDevice() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/usb/DeviceBusyException.cpp new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/usb/DeviceBusyException.cpp --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/mtp/usb/DeviceBusyException.cpp 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/mtp/usb/DeviceBusyException.cpp 2025-05-07 00:32:38.000000000 +0200 @@ -90,9 +90,14 @@ if (pid == myPid) continue; - debug("got process dir ", pidPath); + // debug("got process dir ", pidPath); auto fdsRoot = "/proc/" + pidPath + "/fd"; + if (access(fdsRoot.c_str(), R_OK) != 0) + { + // debug("skipping inaccessible path ", fdsRoot); + continue; + } try { Directory fds(fdsRoot); @@ -102,6 +107,9 @@ if (fdPath.empty()) break; + if (fdPath[0] == '.') + continue; + auto fdTarget = ReadLink(fdsRoot + "/" + fdPath); if (fdTarget.empty()) continue; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/qt/CMakeLists.txt new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/qt/CMakeLists.txt --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/qt/CMakeLists.txt 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/qt/CMakeLists.txt 2025-05-07 00:32:38.000000000 +0200 @@ -1,12 +1,19 @@ if(DESIRED_QT_VERSION) if(DESIRED_QT_VERSION MATCHES 4) find_package(Qt4 QUIET) - else() + elseif(DESIRED_QT_VERSION MATCHES 5) find_package(Qt5Widgets QUIET) find_package(Qt5Network QUIET) find_package(Qt5LinguistTools QUIET) + else() + find_package(Qt6Widgets QUIET) + find_package(Qt6Network QUIET) + find_package(Qt6LinguistTools QUIET) endif() else() + find_package(Qt6Widgets QUIET) + find_package(Qt6Network QUIET) + find_package(Qt6LinguistTools QUIET) find_package(Qt5Widgets QUIET) find_package(Qt5Network QUIET) find_package(Qt5LinguistTools QUIET) @@ -53,7 +60,23 @@ translations/android-file-transfer-linux_zh-CN.ts ) -if (Qt5Widgets_FOUND) +if (Qt6Widgets_FOUND) + message(STATUS "Using Qt6") + qt6_wrap_cpp(HEADERS_MOC ${HEADERS}) + qt6_wrap_ui(FORMS_HEADERS ${FORMS}) + + qt6_add_translation(QM_FILES ${TS_FILES}) + set(QM_FILES_XML "") + foreach(_QM ${QM_FILES}) + get_filename_component(_QM ${_QM} NAME) + set(QM_FILES_XML "${QM_FILES_XML}<file>${_QM}</file>") + endforeach() + configure_file(translations/translations.qrc.in translations.qrc) + + qt6_add_resources(RESOURCES android-file-transfer.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc) + include_directories(${Qt6Widgets_INCLUDE_DIRS} ${Qt6Network_INCLUDE_DIRS}) + set(EXTRA_QT_LINK ${Qt6Widgets_LIBRARIES} ${Qt6Network_LIBRARIES}) +elseif (Qt5Widgets_FOUND) message(STATUS "Using Qt5") qt5_wrap_cpp(HEADERS_MOC ${HEADERS}) qt5_wrap_ui(FORMS_HEADERS ${FORMS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/qt/commandqueue.h new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/qt/commandqueue.h --- old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/qt/commandqueue.h 2024-07-30 20:53:03.000000000 +0200 +++ new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/qt/commandqueue.h 2025-05-07 00:32:38.000000000 +0200 @@ -23,6 +23,7 @@ #include <QObject> #include <QQueue> #include <QMap> +#include <QDebug> #include <mtp/ptp/ObjectId.h> #include <mtp/ptp/ObjectFormat.h> #include <mtp/metadata/Library.h> Binary files old/android-file-transfer-linux-4.3.0~git.20240730T195303.cf7036c7f7df/screenshot.png and new/android-file-transfer-linux-4.4.0~git.20250506T233238.058dbe1/screenshot.png differ