We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

Intex Aquafish Linux file browsing via USB

asked 2016-12-31 01:00:09 +0200

deloptes gravatar image

updated 2016-12-31 01:06:23 +0200

There is a little problem with Intex Aquafish when handled on my debian jessie linux system. I get it recognized only as MTP Imaging device and can not mount or unmount, so that I can transfer files from and to the phone.

After reading few threads I came to following based on similar issue with Jolla. It is not the best solution, but for the time being it works pretty well.

WARNING: Unfortunately it can handle only one device. If you intend to use more than one, adjust the script

Install jmtpfs and mtp-tools

apt-get install jmtpfs
apt-get install mtp-tools

save a file /usr/bin/intexMounter.sh with following content:

#!/bin/bash

usage() { echo "Usage: $0 -m (to mount) | -u (umount) " 1>&2; exit 1;}

########
#vars
userName=`whoami`
deviceName=`jmtpfs -l 2>/dev/null| grep 0a07 | tr ',' ' ' | awk '{print $5}' `
device=`jmtpfs -l 2>/dev/null| grep 0a07 | tr ',' ' ' | awk '{print $1","$2}' `

#if its unpluging theres no device so... deviceName=IntexSailfish
if [[ -z $deviceName || $deviceName == 'UNKNOWN' ]]; then
    deviceName="IntexSailfish-"$(echo $device|tr ',' '-')
fi

mountPath="/home/${userName}/${deviceName}"

#now its not used becuse mountPath is no equal at desktopPath

########
#chech arguments

if [ $# -ne 1 ]
then
        usage
        exit 1
fi

#parse options
while getopts ":mu" o; do
   case "${o}" in
        m)
                echo "mount "${device}" "${mountPath}
                test -d ${mountPath} || mkdir -p ${mountPath}
                jmtpfs -device=${device} ${mountPath}
        ;;
        u)
                echo "fusermount -u ${mountPath}"
                fusermount -u ${mountPath}
                rmdir ${mountPath}
        ;;
        *)
                usage
        ;;
   esac
done

NOTE: set 755 permissions to above file

NOTE: When plugging in USB cable and prompted, select PC-Suite

to mount

/usr/bin/intexMounter.sh -m

to umount

/usr/bin/intexMounter.sh -u
edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-12-31 01:43:10 +0200

h.berd gravatar image

Thank you for sharing! I also have big problems to write to sd card via usb and uninstalled modrana and installed gmtp etc. in the last hour ;-) USB Mode seems to be fishy with SFOS...

But when I use your script, I get the following;

/usr/bin/intexMounter.sh -m
mount 6,7 /home/h.berd/IntexSailfish-6-7
Device 0 (VID=05c6 and PID=0a07) is UNKNOWN in libmtp v1.1.10.
Please report this VID/PID and the device model to the libmtp development team
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
terminate called after throwing an instance of 'MtpErrorCantOpenDevice'
  what():  Can't open device
/usr/bin/intexMounter.sh: Zeile 31: 10935 Abgebrochen             (Speicherabzug geschrieben) jmtpfs -device=${device} ${mountPath}

Maybe I had done anything wrong?

edit flag offensive delete publish link more

Comments

1

you can try doing this manually. First identify the device numbers by running

jmtpfs -l

then use the first two numbers (from the example above)

jmtpfs -device=6,7 /mnt/target/where you want to mount

If you have the same error as above you need to find out why ... perhaps wrong library dependencies, kernel/usb stack or group permissions

The script I put together is really simple and the error supposes you have some issue at jmtpfs and below.

deloptes ( 2016-12-31 13:44:56 +0200 )edit

I have debian jessie and custom kernel 4.8.6 and I do not see any problem with USB. The only problem with AquaFish is that the chipset IDs are still not in libusb (usbids) lists.

Check also to use "PC Sync" - this is a must and it is not a bad idea to install usb switch.

Google LIBMTP libusb: Attempt to reset device lists a lot of pages where solutions are provided

regards

deloptes ( 2016-12-31 13:48:32 +0200 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2016-12-31 01:00:09 +0200

Seen: 556 times

Last updated: Dec 31 '16