title: Mounting a Samsung Galaxy Tab 2 7.0 with MTP on Linux
body: <p>I'm trying to get a Samsung Galaxy Tab2 7.0" connected to a Debian Wheezy box over MTP.  The askubuntu page at <a href="https://askubuntu.com/questions/186681/getting-mtp-to-work-with-a-galaxy-tab-2-7-0">https://askubuntu.com/questions/186681/getting-mtp-to-work-with-a-galaxy-tab-2-7-0</a> details precisely my problem, but none of the suggested remedies work.</p>
  
  <p>To reiterate, I installed mtp-tools and mtpfs.  mtp-detect yields this:</p>
  
  <pre><code>libmtp version: 1.1.3
  
  Listing raw device(s)
  Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300   Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
      Found 1 device(s):
      Samsung: GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y  (04e8:6860) @ bus 1, dev 3
  Attempting to connect device(s)
  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
  Unable to open raw device 0
  OK.
  </code></pre>
  
  <p>I created a /etc/udev/rules.d/51-android.rules file using the values 04e8 for the vendor ID and 6860 for the device ID.  I finished up the aforementioned howto and did this:</p>
  
  <pre><code>mkdir foo
  mtpfs -o allow_other foo
  </code></pre>
  
  <p>Now doing "ls foo" stalls.  Checking out the directory above foo also stalls.  I cannot get the command lines back without doing "killall -9 mtpfs" (similar to dealing with stale sshfs mounts).  I then see this:</p>
  
  <pre><code>ls: cannot access foo: Transport endpoint is not connected
  </code></pre>
  
  <p>Tried <a href="https://askubuntu.com/a/88630/27480">https://askubuntu.com/a/88630/27480</a> and got the same results.</p>
  
  <p>go-mtpfs from <a href="https://github.com/hanwen/go-mtpfs" rel="nofollow noreferrer">https://github.com/hanwen/go-mtpfs</a> also fails:</p>
  
  <pre><code>mkdir foo
  ./go-mtpfs foo
  2013/01/07 02:39:33 compiled against libmtp 1.1.3
  Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
  2013/01/07 02:39:33 found device Samsung: GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y (04e8:6860) @ bus 1, dev 3
  : 
  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
  2013/01/07 02:41:33 rdev.open failed: open: open returned nil
  </code></pre>
  
  <p>jmptfs from <a href="https://github.com/kiorky/jmtpfs.git" rel="nofollow noreferrer">https://github.com/kiorky/jmtpfs.git</a> also fails:</p>
  
  <pre><code>Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
  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
  Aborted
  </code></pre>