Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 6624  / 1 Year ago, tue, march 7, 2023, 5:44:36

After upgrading from 12.10 to 13.04 I am having issues with connecting my Google Nexus to my Ubuntu machine.



I have found this script somewhere on the Internet but it does not seem to work now :



#!/bin/bash

if [ `lsusb |grep Google |wc -l` == 0 ]; then
echo "plug in the device"
exit 1
fi

if [ `dpkg -l mtpfs |wc -l` == "0" ]; then
sudo apt-get update && sudo apt-get install mtpfs
fi

rules_file=/etc/udev/rules.d/60-android.rules
if [ ! -f $rules_file ]; then
vp=`lsusb|grep Google|cut -d " " -f 6`
vendor=`echo $vp | cut -d ':' -f 1`
product=`echo $vp | cut -d ':' -f 2`
rule="SUBSYSTEM=="usb", ATTR{idVendor}=="$vendor", ATTR{idProduct}=="$product", MODE="0600", GROUP="plugdev" OWNER="$USER""
sudo bash -c "echo $rule > $rules_file"
fi

mount_point=/media/nexus
if [ ! -d $mount_point ]; then
sudo mkdir $mount_point
sudo chmod 775 $mount_point
fi
sudo mtpfs -o allow_other $mount_point


After launching it I get :



Unable to open ~/.mtpz-data for reading, MTPZ disabled.Listing raw device(s)
Device 0 (VID=xxxx and PID=yyyy) is a Google Inc (for LG Electronics/Samsung) Nexus 4/10 (MTP).
Found 1 device(s):
Google Inc (for LG Electronics/Samsung): Nexus 4/10 (MTP) (xxxx:yyyy) @ bus 2, dev 4
Attempting to connect device
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags
Error 1: Get Storage information failed.
Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.
Error 2: Error 02fe: PTP: Protocol error, data expected
Listing File Information on Device with name: (NULL)
LIBMTP_Get_Storage() failed:-1

More From » 13.04

 Answers
1

Try updating mtp?



sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update


Then, launch Software Updater (previously known as Update Manager) and install the available updates


[#31343] Tuesday, March 7, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
emuralm

Total Points: 290
Total Questions: 111
Total Answers: 117

Location: China
Member since Thu, Sep 1, 2022
2 Years ago
;