Trying to “fix” android-device-usb-connect.sh

Forum Forums antiX-development Development Trying to “fix” android-device-usb-connect.sh

  • This topic has 27 replies, 10 voices, and was last updated Jun 11-3:27 pm by marcelocripe.
Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
    Posts
  • #95661
    Forum Admin
    rokytnji

      Well. I was under the impression those with phones that don’t mount with menu in stock antiX.

      Were to test out these scripts. Or am I wrong thinking this? Hence my duh statement.

      I felt pretty dumb breaking things last time. Not panicky. More of a roll eyes am I a dummy or what?

      harry@scooter:~
      $ inxi -r
      Repos:
        Active apt repos in: /etc/apt/sources.list.d/antix.list
          1: deb http://mirrors.rit.edu/mxlinux/mx-packages/antix/bullseye bullseye main nosystemd nonfree
        Active apt repos in: /etc/apt/sources.list.d/bullseye-backports.list
          1: deb http://deb.debian.org/debian bullseye-backports main contrib non-free
        Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
          1: deb http://ftp.us.debian.org/debian/ bullseye-updates main contrib non-free
        Active apt repos in: /etc/apt/sources.list.d/debian.list
          1: deb http://ftp.us.debian.org/debian/ bullseye main contrib non-free
          2: deb http://security.debian.org/ bullseye-security main contrib non-free
        Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
          1: deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
        No active apt repos in: /etc/apt/sources.list.d/various.list
      

      Tested on this NUC box install. This is the stock script from menu.

      $ inxi -b
      System:
        Host: scooter Kernel: 5.10.153-antix.1-amd64-smp arch: x86_64 bits: 64
          Desktop: IceWM v: 3.2.3 Distro: antiX-22_x64-full Grup Yorum 18 October 2022
      Machine:
        Type: Desktop Mobo: Intel model: NUC5i3RYB v: H41000-505
          serial: <superuser required> UEFI-[Legacy]: Intel
          v: RYBDWi35.86A.0361.2016.1202.1005 date: 12/02/2016
      CPU:
        Info: dual core Intel Core i3-5010U [MT MCP] speed (MHz): avg: 1995
          min/max: 500/2000
      Graphics:
        Device-1: Intel HD Graphics 5500 driver: i915 v: kernel
        Display: server: X.Org v: 1.20.11 driver: X: loaded: modesetting
          unloaded: fbdev,vesa dri: iris gpu: i915 resolution: 1360x768~60Hz
        API: OpenGL v: 4.6 Mesa 20.3.5 renderer: Mesa Intel HD Graphics 5500 (BDW
          GT2)
      Network:
        Device-1: Intel Ethernet I218-V driver: e1000e
        Device-2: Intel Wireless 7265 driver: iwlwifi
        Device-3: Intel Bluetooth wireless interface type: USB driver: btusb
      Drives:
        Local Storage: total: 961.33 GiB used: 312.23 GiB (32.5%)
      Info:
        Processes: 174 Uptime: 23m Memory: 3.72 GiB used: 1.29 GiB (34.6%)
        Shell: Bash inxi: 3.3.23
      

      Sometimes I drive a crooked road to get my mind straight.
      I don't suffer from insanity. I enjoy every minute off it.
      Motorcycle racing is rocket science.

      Linux Registered User # 475019
      How to Search for AntiX solutions to your problems

      #116245
      Member
      2U

        ANDROID FILE TRANSFER
        *Phone set to PTP or File Transfer -i have no MTP option. AT&T Branded, Model:U304AA, Android ver.9 USB set to file-transfer. Changed cables usb port works with flash drives.
        Everything I tried:

        
        sudo apt-get update && sudo apt install android-file-transfer
        sr0 [no media]
        Finished with error  ( exit status 32 )
        udevil: /dev/sr0 is known to mount - running mount as current user
        udevil: warning 45: options ignored for device in fstab (or specify mount point)
        mount: /media/sr0: no medium found on /dev/sr0.
        fusermount -u ~/android_device
        fusermount: entry for /home/ET/android_device not found in /etc/mtab
        sr0[no media]
        sudo mount ~/android_device
        mount: /home/ET/android_device: can't find in /etc/fstab.
        

        Used this and paste output to forum:

        
        android-device-usb-connect.sh
        Clearing files and preparing directories
        Checking availability of required utilities
        Checking availability of required utilities finished successfully
        No device connected
        User pressed Retry
        No device connected
        User pressed Exit

        Thanks everyone @rokynji Tried everything above except the script changes, I don’t know where scripts are stored for Android Device File Transfer. Where do I find scripts?

        • This reply was modified 9 months, 3 weeks ago by 2U.
        • This reply was modified 9 months, 3 weeks ago by 2U.

        antiX noob ///
        Toshiba L500 2.67GB RAM
        antiX 22+
        i5 12600K PopOS; AMD5 3600 antiX 23

        #116247
        Member
        Xunzi_23

          #Script will mount Honor Phone. Thanks to PPC.

          Please try this script from PPC, it is the only way to mount my phones…

          rm ~/.jmtpfs-output2.txt
          dir=”$HOME/android-device”
          mkdir -p “$dir”
          jmtpfs -o auto_unmount “$dir” |& tee -a ~/.jmtpfs-output2.txt # if output includes “bad mount point” then user has to press “Allow” on device’s screen and try to mount it again
          xdg-open “$dir”
          ##check if user has to “allow”: check if output includes has the expected content:
          mount_check=$(cat ~/.jmtpfs-output2.txt | grep -c “bad mount point”)
          echo $mount_check
          if [ “$mount_check” -eq “1” ]; then
          read -n 1 -s -r -p ” Select Allow on you android device then press any key” && fusermount -u “$dir” && jmtpfs “$dir” && xdg-open “$dir”
          fi
          #116719
          Member
          anti-apXos

            This script needs to be run with sudo in order to mount my phone. Otherwise, I get the following error:

            
            Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
            libusb_open() failed!: Permission denied
            LIBMTP PANIC: Unable to initialize device
            terminate called after throwing an instance of 'MtpErrorCantOpenDevice'
              what():  Can't open device
            Aborted
            

            Just using jmtpfs on its own is the same. As far as I know there’s no MTP permission setting available on this phone (a circa 2017 Samsung Galaxy Express with Android 5.1) and MTP mounting just works in Windows and ChromeOS.

            Actually, I’ve disabled the password requirement for sudo since I use it so much and I found the jmtpfs ‘-o other_user’ switch so that the mount shows up in my non-root zzzFM window, so there’s really no big deal here, but maybe this is part of the issue some users have. I don’t know why some systems or phones would require root and others wouldn’t.

            The other issue I have is that file transfers to/from the mounted phone stall regularly. I think this might be because the fuse mount is loading data into some kind of buffer and then moving it to the phone and the stall happens when transferring to the phone. It freezes the entire zzzFM window, though. Nothing like this seems to happen on other OSes. Does anyone have any experience with this and know if there’s a fix?

            #116726
            Member
            PPC

              Yep, I do have experience with it… yet I found no way to solve the “freeze” problem, when sharing large files to/from android devices, via cable in antiX.
              If you have a wi-fi network available and you can install PlainApp in your android device (not sure if it runs in android 5.1), it’s an easy, cable free and relatively fast way to share files with android devices.
              I never noticed any difference of speed, when I had to send pictures from my android phone to a windows 10 pc… it seemed about the same speed that I got on my antiX. But I never tried sharing very large files on a Windows device, to compare the speed of the transfer.
              You could try installing some other software that allows file transfer with android devices… Fortunately, antiX’s GUI always worked great for my devices (that ranged to android 2.X to android 10, over many years). For more problematic devices, I created the script that Xunzi shared here…

              P.

              #141875
              Member
              boy

                Hello PPC.

                marcelocripe helped me do the tests with my phone Moto G6 Model: XT1925-3 that I can access the data with the “File Transfer” options and the “PTP” option in antiX 22. With the “File Transfer” option I have access to all folders on the Android phone and with the “PTP” option I only have access to the phone’s camera folder, as shown in the attached images. In other words, in antiX 22 all options work perfectly.

                Olá, PPC.

                O marcelocripe me ajudou a fazer os testes com o meu telefone Moto G6 Modelo: XT1925-3 que consigo acessar os dados com as opções “Transferência de Arquivos” e a opção “PTP” no antiX 22. Com a opção “Transferência de Arquivos” eu tenho acesso a todas as pastas do telefone Android e com a opção “PTP” eu só tenho acesso a pasta da câmera do telefone, conforme as imagens anexas. Ou seja, no antiX 22 funciona todas as opções perfeitamente.

                cp6@antix6:~
                $ inxi -S
                System:
                Host: antix6 Kernel: 5.10.142-antix.2-amd64-smp arch: x86_64 bits: 64
                Desktop: IceWM v: 3.4.7 Distro: antiX-22_x64-full Grup Yorum 18 October 2022
                cp6@antix6:~
                $ android-device-usb-connect.sh
                Limpeza de arquivos e preparando os diretórios (pastas)
                Verificando a disponibilidade dos utilitários necessários
                A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                O dispositivo está conectado
                Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                Android device detected, assigning default bug flags
                desktop-defaults-run -fm –follow /home/cp6/android_device
                O dispositivo está desmontado!
                Tentativa de montar o dispositivo para exibir o seu conteúdo
                Confirmando se o dispositivo pode ser montado, solicitando a autorização do usuário para tentar montar novamente
                O dispositivo parece estar montado corretamente!
                zzzfm /home/cp6/android_device
                Confirmação final para tentar montar o dispositivo. Se não for possível, desmonte-o para evitar erros
                O dispositivo parece estar montado corretamente.
                cp6@antix6:~
                $ android-device-usb-connect.sh
                Limpeza de arquivos e preparando os diretórios (pastas)
                Verificando a disponibilidade dos utilitários necessários
                A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                O dispositivo está conectado
                Device 0 (VID=22b8 and PID=2e84) is a Motorola Moto G (XT1032).
                LIBMTP WARNING: no MTP vendor extension on device 7 on bus 1LIBMTP WARNING: VendorExtensionID: 00000000LIBMTP WARNING: VendorExtensionDesc: (null)LIBMTP WARNING: this typically means the device is PTP (i.e. a camera) but not an MTP device at all. Trying to continue anyway.desktop-defaults-run -fm –follow /home/cp6/android_device
                O dispositivo está desmontado!
                Tentativa de montar o dispositivo para exibir o seu conteúdo
                Confirmando se o dispositivo pode ser montado, solicitando a autorização do usuário para tentar montar novamente
                O dispositivo parece estar montado corretamente!
                zzzfm /home/cp6/android_device
                Confirmação final para tentar montar o dispositivo. Se não for possível, desmonte-o para evitar erros
                O dispositivo parece estar montado corretamente.
                cp6@antix6:~

                #141880
                Member
                boy

                  Now, the same tests in antiX 23 with my phone Moto G6 Model: XT1925-3 I cannot access the data with the “File Transfer” option, I can only access the data with the “PTP” option. In other words, in antiX 23, all the options for accessing the phone’s data do not work.

                  I hope this information is useful in helping to improve the functioning of the Android Device Connection via USB program (android-device-usb-connect.sh)

                  Boy

                  Agora, os mesmos testes no antiX 23 com o meu telefone Moto G6 Modelo: XT1925-3 eu não consigo acessar os dados com a opção “Transferência de Arquivos”, só consigo acessar os dados com a opção “PTP”. Ou seja, no antiX 23 não funciona todas as opções de acesso aos dados do telefone.

                  Eu espero que estas informações sejam úteis para ajudar a melhorar o funcionamento do programa Conexão de Dispositivos Android via USB (android-device-usb-connect.sh)

                  Boy

                  boy@antix1:~
                  $ inxi -S
                  System:
                  Host: antix1 Kernel: 6.1.60-antix.1-amd64-smp arch: x86_64 bits: 64
                  Desktop: IceWM v: 3.4.7 Distro: antiX-23.1_x64-full Arditi del Popolo 21
                  February 2024
                  boy@antix1:~
                  $ sudo apt update
                  [sudo] senha para boy:
                  Atingido:1 http://deb.debian.org/debian bookworm-backports InRelease
                  Atingido:2 http://security.debian.org bookworm-security InRelease
                  Atingido:3 http://ftp.br.debian.org/debian bookworm-updates InRelease
                  Atingido:4 http://ftp.br.debian.org/debian bookworm InRelease
                  Atingido:5 http://mirror.ufam.edu.br/mx/antix/bookworm bookworm InRelease
                  Atingido:6 https://dl.google.com/linux/chrome/deb stable InRelease
                  Lendo listas de pacotes… Pronto
                  Construindo árvore de dependências… Pronto
                  Lendo informação de estado… Pronto
                  All packages are up to date.
                  boy@antix1:~
                  $ sudo apt upgrade
                  Lendo listas de pacotes… Pronto
                  Construindo árvore de dependências… Pronto
                  Lendo informação de estado… Pronto
                  Calculando atualização… Pronto
                  0 pacotes atualizados, 0 pacotes novos instalados, 0 a serem removidos e 0 não atualizados.
                  boy@antix1:~
                  $ android-device-usb-connect.sh
                  Limpeza de arquivos e preparando os diretórios (pastas)
                  Verificando a disponibilidade dos utilitários necessários
                  A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                  O dispositivo está conectado
                  Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                  libusb_open() failed!: Permission denied
                  LIBMTP PANIC: Unable to initialize device
                  terminate called after throwing an instance of ‘MtpErrorCantOpenDevice’
                  what(): Can’t open device
                  /usr/local/bin/android-device-usb-connect.sh, linha 76: 4552 Abortado jmtpfs “$dir”
                  Tentativa de montar o dispositivo para exibir o seu conteúdo
                  Confirmando se o dispositivo pode ser montado, solicitando a autorização do usuário para tentar montar novamente
                  Por favor, verifique se você PERMITIU o acesso aos seus arquivos no seu dispositivo Android para prosseguir
                  fusermount: entry for /home/boy/android_device not found in /etc/mtab
                  Confirmação final para tentar montar o dispositivo. Se não for possível, desmonte-o para evitar erros
                  Por favor, verifique se você PERMITIU o acesso aos seus arquivos no seu dispositivo Android para prosseguir
                  fusermount: entry for /home/boy/android_device not found in /etc/mtab
                  Done
                  boy@antix1:~
                  $ android-device-usb-connect.sh
                  Limpeza de arquivos e preparando os diretórios (pastas)
                  Verificando a disponibilidade dos utilitários necessários
                  A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                  O dispositivo está conectado
                  Device 0 (VID=22b8 and PID=2e84) is a Motorola Moto G (XT1032).
                  LIBMTP WARNING: no MTP vendor extension on device 9 on bus 1LIBMTP WARNING: VendorExtensionID: 00000000LIBMTP WARNING: VendorExtensionDesc: LIBMTP WARNING: this typically means the device is PTP (i.e. a camera) but not an MTP device at all. Trying to continue anyway.desktop-defaults-run -fm –follow /home/boy/android_device
                  O dispositivo está desmontado!
                  Tentativa de montar o dispositivo para exibir o seu conteúdo
                  Confirmando se o dispositivo pode ser montado, solicitando a autorização do usuário para tentar montar novamente
                  O dispositivo parece estar montado corretamente!
                  zzzfm /home/boy/android_device
                  Confirmação final para tentar montar o dispositivo. Se não for possível, desmonte-o para evitar erros
                  O dispositivo parece estar montado corretamente.
                  boy@antix1:~
                  $

                  #141920
                  Member
                  PPC

                    Many thanks for that report. Currently, I’m busy with other projects, but I hope to eventually come back and work on this program. Your terminal output offered some useful information, as did the information that it works in older antiX versions but not in more modern ones!

                    P.

                    #141989
                    Member
                    marcelocripe

                      Boy was very kind to allow me to test on antiX 22 and then on antiX 23.1 that he has installed on his computer. As soon as possible, I will try to report the same situation on another Android phone model.
                      Thank you very much for wanting to review the program when you have free time to work on the source code.

                      – – – – –

                      O Boy foi muito gentil em permitir que eu fizesse o teste em um antiX 22 e depois no antiX 23.1 que ele tem instalado no seu computador. Assim que for possível, eu tentarei reportar a mesma situação de um outro modelo de telefone Android.
                      Muito obrigado por querer revisar o programa quando você tiver tempo livre para trabalhar no código de fonte.

                      #145053
                      Member
                      marcelocripe

                        Hello PPC.

                        I’m at the boy’s house and I carried out the following test:

                        1 – I copied from antiX 22 the program “android-device-usb-connect.sh”, the translation file “pt_BR” of “android-device-usb-connect.mo” and the file “android-device-usb-connect .desktop”.

                        2 – I renamed the files to “android-device-usb-connect_03-06-2020.sh”, the “pt_BR” translation file of “android-device-usb-connect_03-06-2020.mo” and the file “android-device-usb-connect_03-06-2020.desktop”.

                        3 – I changed the lines described below:

                        “android-device-usb-connect_03-06-2020.sh”:

                        TEXTDOMAIN=android-device-usb-connect_03-06-2020

                        “android-device-usb-connect_03-06-2020.desktop”:

                        Name[pt_BR]=Conexão de Dispositivos Android via USB Versão do antiX 22

                        Exec=/usr/local/bin/android-device-usb-connect_03-06-2020.sh

                        4 – I pasted the files that I renamed into the folders: /usr/local/bin, /usr/share/applications and /usr/share/locale/pt_BR/LC_MESSAGES of antiX 23.1.

                        5 – I applied the command “sudo desktop-menu –write-out-global” in the Terminal Emulator to have two menus, that is, one for the antiX 23.1 program and the second menu for antiX 22.

                        6 – I restarted the computer and tried to mount the Moto G6 phone with the antiX 22 program running on antiX 23.1.

                        7 – But the behavior of the antiX 22 program was identical to the antiX 23.1 program, that is, it was unable to mount with the “File Transfer” option, making it possible to mount only with the “PTP” option.

                        8 – The program in antiX 22 can always mount the Moto G6 phone with the “File Transfer” option.

                        The execution below was performed in antiX 23.1:

                        boy@antix1:/usr/local/bin
                        $ ./android-device-usb-connect_03-06-2020.sh
                        Limpeza de arquivos e preparando os diretórios (pastas)
                        Verificando a disponibilidade dos utilitários necessários
                        A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                        O dispositivo está conectado
                        Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                        libusb_open() failed!: Permission denied
                        LIBMTP PANIC: Unable to initialize device
                        terminate called after throwing an instance of ‘MtpErrorCantOpenDevice’
                        what(): Can’t open device
                        ./android-device-usb-connect_03-06-2020.sh, linha 76: 4502 Abortado jmtpfs “$dir”
                        Tentativa de montar o dispositivo para exibir o seu conteúdo
                        Confirmando se o dispositivo pode ser montado, solicitando a autorização do usuário para tentar montar novamente
                        Por favor, verifique se você PERMITIU o acesso aos seus arquivos no seu dispositivo Android para prosseguir
                        fusermount: entry for /home/boy/android_device not found in /etc/mtab
                        Confirmação final para tentar montar o dispositivo. Se não for possível, desmonte-o para evitar erros
                        Por favor, verifique se você PERMITIU o acesso aos seus arquivos no seu dispositivo Android para prosseguir
                        fusermount: entry for /home/boy/android_device not found in /etc/mtab
                        Done
                        boy@antix1:/usr/local/bin
                        $ inxi -S
                        System:
                        Host: antix1 Kernel: 6.1.60-antix.1-amd64-smp arch: x86_64 bits: 64
                        Desktop: IceWM v: 3.5.0 Distro: antiX-23.1_x64-full Arditi del Popolo 21
                        February 2024
                        boy@antix1:/usr/local/bin
                        $

                        – – – – –

                        Olá, PPC.

                        Eu estou na casa do boy e realizei o seguinte teste:

                        1 – Copiei do antiX 22 o programa “android-device-usb-connect.sh”, o arquivo da tradução “pt_BR” do “android-device-usb-connect.mo” e o arquivo “android-device-usb-connect.desktop”.

                        2 – Renomeei os arquivos para “android-device-usb-connect_03-06-2020.sh”, o arquivo da tradução “pt_BR” do “android-device-usb-connect_03-06-2020.mo” e o arquivo “android-device-usb-connect_03-06-2020.desktop”.

                        3 – Alterei as linhas descritas abaixo:

                        “android-device-usb-connect_03-06-2020.sh”:

                        TEXTDOMAIN=android-device-usb-connect_03-06-2020

                        “android-device-usb-connect_03-06-2020.desktop”:

                        Name[pt_BR]=Conexão de Dispositivos Android via USB Versão do antiX 22

                        Exec=/usr/local/bin/android-device-usb-connect_03-06-2020.sh

                        4 – Colei os arquivos que renomeei para as pastas: /usr/local/bin, /usr/share/applications e /usr/share/locale/pt_BR/LC_MESSAGES do antiX 23.1.

                        5 – Apliquei o comando “sudo desktop-menu –write-out-global” no Emulador de Terminal para ter dois menus, ou seja, um do programa do antiX 23.1 e o segundo menu do antiX 22.

                        6 – Reiniciei o computador e tentei montar o telefone Moto G6 com o programa do antiX 22 sendo executado no antiX 23.1.

                        7 – Mas o comportamento do programa do antiX 22 foi idêntico ao programa do antiX 23.1, ou seja, não conseguiu montar com a opção “Transferência de Arquivos”, sendo possível montar apenas com a opção “PTP”.

                        8 – O programa no antiX 22 consegue sempre montar o telefone Moto G6 com a opção “Transferência de Arquivos”.

                        A execução abaixo foi realizada no antiX 23.1:

                        boy@antix1:/usr/local/bin
                        $ ./android-device-usb-connect_03-06-2020.sh
                        Limpeza de arquivos e preparando os diretórios (pastas)
                        Verificando a disponibilidade dos utilitários necessários
                        A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                        O dispositivo está conectado
                        Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                        libusb_open() failed!: Permission denied
                        LIBMTP PANIC: Unable to initialize device
                        terminate called after throwing an instance of ‘MtpErrorCantOpenDevice’
                        what(): Can’t open device
                        ./android-device-usb-connect_03-06-2020.sh, linha 76: 4502 Abortado jmtpfs “$dir”
                        Tentativa de montar o dispositivo para exibir o seu conteúdo
                        Confirmando se o dispositivo pode ser montado, solicitando a autorização do usuário para tentar montar novamente
                        Por favor, verifique se você PERMITIU o acesso aos seus arquivos no seu dispositivo Android para prosseguir
                        fusermount: entry for /home/boy/android_device not found in /etc/mtab
                        Confirmação final para tentar montar o dispositivo. Se não for possível, desmonte-o para evitar erros
                        Por favor, verifique se você PERMITIU o acesso aos seus arquivos no seu dispositivo Android para prosseguir
                        fusermount: entry for /home/boy/android_device not found in /etc/mtab
                        Done
                        boy@antix1:/usr/local/bin
                        $ inxi -S
                        System:
                        Host: antix1 Kernel: 6.1.60-antix.1-amd64-smp arch: x86_64 bits: 64
                        Desktop: IceWM v: 3.5.0 Distro: antiX-23.1_x64-full Arditi del Popolo 21
                        February 2024
                        boy@antix1:/usr/local/bin
                        $

                        #145128
                        Member
                        Robin

                          Tried the script also. Wouldn’t work, neither the original version nor your modified one taken from some postings above.

                          Original version:

                          $ android-device-usb-connect.sh
                          Dateien bereinigen und Verzeichnisse vorbereiten
                          Überprüfung der Verfügbarkeit der erforderlichen Dienstprogramme
                          Prüfung der Verfügbarkeit der erforderlichen Dienstprogramme erfolgreich abgeschlossen
                          Kein Gerät angeschlossen
                          Benutzer hat Wiederholen ausgewählt
                          Kein Gerät angeschlossen
                          Benutzer hat Beenden ausgewählt

                          Your version:

                          $ android-device-usb-connect.sh
                          No device connected
                          User pressed Retry
                          No device connected
                          User pressed Exit
                          fusermount: entry for /home/Robin/android_device not found in /etc/mtab
                          No device connected
                          No device connected
                          No device connected
                          User pressed Exit
                          fusermount: entry for /home/Robin/android_device not found in /etc/mtab
                          No device connected
                          User pressed Exit
                          fusermount: entry for /home/Robin/android_device not found in /etc/mtab
                          No device connected
                          User pressed Exit
                          fusermount: entry for /home/Robin/android_device not found in /etc/mtab
                          No device connected
                          User pressed Exit
                          fusermount: entry for /home/Robin/android_device not found in /etc/mtab
                          No device connected
                          User pressed Retry
                          No device connected
                          User pressed Exit
                          fusermount: entry for /home/Robin/android_device not found in /etc/mtab
                          No device connected
                          User pressed Retry
                          No device connected
                          No device connected
                          ^C

                          Well, the device IS connected, and USB connection was set to data transfer in its settings. Please see: https://www.antixforum.com/forums/reply/144709/ as you can read there, the zzzFM handler perfectly fine connects the very phone now, even without root permissions. (Android 8.1). Strange your script won’t connect.

                          This works, when manually entering on console:

                          $ jmtpfs -l
                          Device 0 (VID=0e8d and PID=201d) is a MediaTek Inc Elephone P8000.
                          Available devices (busLocation, devNum, productId, vendorId, product, vendor):
                          1, 14, 0x201d, 0x0e8d, Elephone P8000, MediaTek Inc
                          $ mkdir -p '/home/Robin/.cache/zzzfm/MTP'
                          $ jmtpfs '/home/Robin/.cache/zzzfm/MTP' -o allow_other
                          Device 0 (VID=0e8d and PID=201d) is a MediaTek Inc Elephone P8000.
                          Android device detected, assigning default bug flags

                          After applying these commands on console the folders and files in the android storage can be accessed:

                          $ ls '/home/Robin/.cache/zzzfm/MTP/Interner gemeinsamer Speicher'
                          Alarms  Android  DCIM  Documents  Download  Movies  mtklog  Music  Notepad  Notifications  Pictures  Podcasts  Ringtones

                          And then, your script doesn’t respect pressing the Exit button, the X in window border, Alt F4, or Close from taskbar context menu. Stays simply open. Could only make it go away again by Ctrl C on console. Would have had to hard kill it when called from GUI in antiX menu (or from a possible control centre entry). See console output from your script version above (while the original script version closes itself properly when pressing the exit button.

                          Windows is like a submarine. Open a window and serious problems will start.

                          #145178
                          Member
                          marcelocripe

                            Now we have the results of other tests, this time I copied the program “android-device-usb-connect.sh” from antiX 23.1 of the 64-bit full ISO and we successfully ran it on antiX 22 of the 64-bit full ISO and with “File Transfer” option selected on Android phone.

                            – – – – –

                            Agora temos os resultados de outros testes, desta vez eu copiei o programa “android-device-usb-connect.sh” do antiX 23.1 da ISO full de 64 bits e o executamos com sucesso no antiX 22 da ISO full de 64 bits e com a opção “Tranferência de Arquivos” selecionada no Android do telefone.

                            boy@antix2:/usr/local/bin
                            $ ./android-device-usb-connect_do_antiX_23.sh
                            Limpeza de arquivos e preparando os diretórios (pastas)
                            Verificando a disponibilidade dos utilitários necessários
                            A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                            O dispositivo está conectado
                            Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                            Android device detected, assigning default bug flags
                            desktop-defaults-run -fm –follow /home/boy/android_device
                            O dispositivo está desmontado!
                            Tentativa de montar o dispositivo para exibir o seu conteúdo
                            Confirmando se o dispositivo pode ser montado, solicitando a autorização do usuário para tentar montar novamente
                            O dispositivo parece estar montado corretamente!
                            zzzfm /home/boy/android_device
                            Confirmação final para tentar montar o dispositivo. Se não for possível, desmonte-o para evitar erros
                            O dispositivo parece estar montado corretamente.
                            boy@antix2:/usr/local/bin
                            $

                            boy@antix2:/usr/local/bin
                            $ ./android-device-usb-connect_do_antiX_23.sh
                            Limpeza de arquivos e preparando os diretórios (pastas)
                            Verificando a disponibilidade dos utilitários necessários
                            A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                            Um dispositivo Android parece estar montado
                            O usuário escolheu desmontar o dispositivo Android
                            ls: não foi possível acessar ‘/home/boy/android_device’: Arquivo ou diretório inexistente
                            O dispositivo Android foi desmontado; é seguro removê-lo!
                            boy@antix2:/usr/local/bin
                            $

                            boy@antix2:/usr/local/bin
                            $ ./android-device-usb-connect_do_antiX_23.sh
                            Limpeza de arquivos e preparando os diretórios (pastas)
                            Verificando a disponibilidade dos utilitários necessários
                            A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                            O dispositivo está conectado
                            Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                            Android device detected, assigning default bug flags
                            desktop-defaults-run -fm –follow /home/boy/android_device
                            O dispositivo está desmontado!
                            Tentativa de montar o dispositivo para exibir o seu conteúdo
                            Confirmando se o dispositivo pode ser montado, solicitando a autorização do usuário para tentar montar novamente
                            O dispositivo parece estar montado corretamente!
                            zzzfm /home/boy/android_device
                            Confirmação final para tentar montar o dispositivo. Se não for possível, desmonte-o para evitar erros
                            O dispositivo parece estar montado corretamente.
                            boy@antix2:/usr/local/bin
                            $

                            boy@antix2:/usr/local/bin
                            $ ./android-device-usb-connect_do_antiX_23.sh
                            Limpeza de arquivos e preparando os diretórios (pastas)
                            Verificando a disponibilidade dos utilitários necessários
                            A verificação da disponibilidade dos utilitários necessários foi concluída com sucesso
                            Um dispositivo Android parece estar montado
                            O usuário escolheu acessar o dispositivo Android
                            desktop-defaults-run -fm –follow /home/boy/android_device
                            boy@antix2:/usr/local/bin
                            $

                            boy@antix2:~
                            $ jmtpfs -l
                            Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                            Available devices (busLocation, devNum, productId, vendorId, product, vendor):
                            1, 6, 0x2e76, 0x22b8, Moto G (ID1), Motorola
                            boy@antix2:~

                            boy@antix2:~
                            $ mkdir -p ‘/home/boy/.cache/zzzfm/MTP’
                            boy@antix2:~

                            boy@antix2:~
                            $ jmtpfs ‘/home/boy/.cache/zzzfm/MTP’
                            Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                            Android device detected, assigning default bug flags
                            boy@antix2:~

                            boy@antix2:~
                            $ ls ‘/home/boy/.cache/zzzfm/MTP’
                            ‘Armazenamento interno compartilhado’
                            boy@antix2:~
                            $

                            boy@antix2:~
                            $ inxi -S
                            System:
                            Host: antix2 Kernel: 5.10.142-antix.2-amd64-smp arch: x86_64 bits: 64
                            Desktop: IceWM v: 3.5.0 Distro: antiX-22_x64-full Grup Yorum 18 October
                            2022
                            boy@antix2:~
                            $

                            boy@antix2:~
                            $ inxi -M
                            Machine:
                            Type: Desktop Mobo: INTELBRAS model: IE-G31TM7 v: 1.0
                            serial: <superuser required> BIOS: American Megatrends v: 080014
                            date: 08/03/2009
                            boy@antix2:~
                            $

                            #145183
                            Member
                            marcelocripe

                              Now I went back to antiX 23.1 from the full 64-bit ISO and ran its commands with the “File Transfer” option selected on the phone’s Android. And the phone was not assembled.

                              – – – – –

                              Agora voltei para o antiX 23.1 da ISO full de 64 bits e executei os seus comandos com a opção “Tranferência de Arquivos” selecionada no Android do telefone. E o telefone não foi montado.

                              boy@antix1:~
                              $ jmtpfs -l
                              Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                              Available devices (busLocation, devNum, productId, vendorId, product, vendor):
                              1, 11, 0x2e76, 0x22b8, Moto G (ID1), Motorola
                              boy@antix1:~
                              $

                              boy@antix1:~
                              $ mkdir -p ‘/home/boy/.cache/zzzfm/MTP’
                              boy@antix1:~
                              $

                              boy@antix1:~
                              $ jmtpfs ‘/home/boy/.cache/zzzfm/MTP’
                              Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
                              libusb_open() failed!: Permission denied
                              LIBMTP PANIC: Unable to initialize device
                              terminate called after throwing an instance of ‘MtpErrorCantOpenDevice’
                              what(): Can’t open device
                              Abortado
                              boy@antix1:~
                              $

                              Now I ran your commands with the “PTP” option selected on the phone’s Android. And it was successfully assembled.
                              Agora executei os seus comandos com a opção “PTP” selecionada no Android do telefone. E foi montado com sucesso.

                              boy@antix1:~
                              $ jmtpfs -l
                              Device 0 (VID=22b8 and PID=2e84) is a Motorola Moto G (XT1032).
                              Available devices (busLocation, devNum, productId, vendorId, product, vendor):
                              1, 12, 0x2e84, 0x22b8, Moto G (XT1032), Motorola
                              boy@antix1:~
                              $

                              boy@antix1:~
                              $ mkdir -p ‘/home/boy/.cache/zzzfm/MTP’
                              boy@antix1:~
                              $

                              boy@antix1:~
                              $ jmtpfs ‘/home/boy/.cache/zzzfm/MTP’
                              Device 0 (VID=22b8 and PID=2e84) is a Motorola Moto G (XT1032).
                              LIBMTP WARNING: no MTP vendor extension on device 12 on bus 1LIBMTP WARNING: VendorExtensionID: 00000000LIBMTP WARNING: VendorExtensionDesc: LIBMTP WARNING: this typically means the device is PTP (i.e. a camera) but not an MTP device at all. Trying to continue anyway.
                              boy@antix1:~
                              $

                              boy@antix1:~
                              $ inxi -S
                              System:
                              Host: antix1 Kernel: 6.1.60-antix.1-amd64-smp arch: x86_64 bits: 64
                              Desktop: IceWM v: 3.5.0 Distro: antiX-23.1_x64-full Arditi del Popolo 21
                              February 2024
                              boy@antix1:~
                              $

                              boy@antix1:~
                              $ inxi -M
                              Machine:
                              Type: Desktop System: Hewlett-Packard product: COMPAQ 300B MT v: N/A
                              serial: <superuser required>
                              Mobo: PEGATRON model: 2AABh v: 1.00 serial: <superuser required>
                              BIOS: IPM41-D3 v: 5.04 date: 04/16/2010
                              boy@antix1:~
                              $

                            Viewing 13 posts - 16 through 28 (of 28 total)
                            • You must be logged in to reply to this topic.