Hi OSXFUSE,
I've tried to connect on two devices and these are the logs for each device. The first, AaronsPhone, is the Android device, and the second, Sophie's Phone, is an iPhone.
Running SSHFS version 2.5 (OSXFUSE SSHFS 2.5.0) with OSXFUSE library version: FUSE 2.7.3 / OSXFUSE 2.6.0. Can anyone shed any light?
Thanks
--
You received this message because you are subscribed to the Google Groups "OSXFUSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osxfuse-grou...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "OSXFUSE" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/osxfuse-group/aJElhuRInR4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to osxfuse-grou...@googlegroups.com.


> Sophies-MacBook-Pro:~ sophiegunter$ ls
> Aaron Documents Movies Public sshfs
> Applications Downloads Music git
> Desktop Library Pictures hello-world.txt
> Sophies-MacBook-Pro:~ sophiegunter$ scp hello-world.txt ro...@192.168.1.14:/storage/sdcard0/
> SSHDroid
> Use 'root' as username
> Default password is 'admin'
> ro...@192.168.1.14's password:
> TRACE (8366): enter sign_key_free
> TRACE (8366): enter dsa_key_free
> TRACE (8366): leave dsa_key_free
> TRACE (8366): enter rsa_key_free
> TRACE (8366): leave rsa_key_free
> TRACE (8366): leave sign_key_free
> hello-world.txt 100% 13 0.0KB/s 00:00
> Sophies-MacBook-Pro:~ sophiegunter$ ssh ro...@192.168.1.14
> SSHDroid
> Use 'root' as username
> Default password is 'admin'
> ro...@192.168.1.14's password:
> TRACE (8383): enter sign_key_free
> TRACE (8383): enter dsa_key_free
> TRACE (8383): leave dsa_key_free
> TRACE (8383): enter rsa_key_free
> TRACE (8383): leave rsa_key_free
> TRACE (8383): leave sign_key_free
> root@m4:/ # ls
> acct firmware_radio ramdump
> cache fstab.m4 root
> config init sbin
> cwkeys init.network.sh sdcard
> d init.power.rc seapp_contexts
> data init.rc sepolicy
> default.prop init.target.rc storage
> dev init.target.recovery.rc sys
> devlog init.trace.rc system
> etc init.usb.rc tombstones
> file_contexts mnt ueventd.rc
> firmware_dsps proc ueventd.target.rc
> firmware_q6 property_contexts vendor
> root@m4:/ # cd storage/sdcard0/
> root@m4:/storage/sdcard0 # ls
> Alarms Movies _nero_sync
> Albums Music amazonmp3
> Android Notifications ftpsvr
> AndroidHtcSync.apk Pictures hello-world.txt
> AndroidHtcSync1.apk Podcasts kindle
> AndroidHtcSync2.apk Ringtones nmdsdcid
> DCIM TWRP superuser.zip
> Download Undelete
> root@m4:/storage/sdcard0 #
Sophies-MacBook-Pro:~ sophiegunter$ sshfs ro...@192.168.1.14:/storage/ / -p 2222 -o auto_cache,volname=Android,reconnect
mount_osxfusefs: failed to mount /@/dev/osxfuse0: Operation not permitted
ro...@192.168.1.14's password:
Sophies-MacBook-Pro:~ sophiegunter$ sshfs ro...@192.168.1.14:/storage/ ~/ -p 2222 -o auto_cache,volname=Android,reconnect
ro...@192.168.1.14's password:
Sophies-MacBook-Pro:~ sophiegunter$ mount_osxfusefs: failed to mount /Users/sophiegunter@/dev/osxfuse0: Operation not supported on socket
Sophies-MacBook-Pro:~ sophiegunter$ sshfs ro...@192.168.1.14:/storage/ /Volumes -p 2222 -o auto_cache,volname=Android,reconnect
mount_osxfusefs: failed to mount /Volumes@/dev/osxfuse0: Operation not permitted
ro...@192.168.1.14's password:
Sophies-MacBook-Pro:~ sophiegunter$ sshfs ro...@192.168.1.14:/storage/ ~/sshfs -p 2222 -o auto_cache,volname=Android,reconnect
ro...@192.168.1.14's password:
Sophies-MacBook-Pro:~ sophiegunter$ mount_osxfusefs: failed to mount /Users/sophiegunter/sshfs@/dev/osxfuse0: Operation not supported on socket
Sophies-MacBook-Pro:~ sophiegunter$ sshfs ro...@192.168.1.14:/storage/ ~/sshfs -p 2222 -odebug,sshfs_debug,loglevel=debug
SSHFS version 2.5
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-oPort=2222> <-ologlevel=debug> <-2> <ro...@192.168.1.14> <-s> <sftp>
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug1: Connecting to 192.168.1.14 [192.168.1.14] port 2222.
debug1: Connection established.
debug1: identity file /Users/sophiegunter/.ssh/id_rsa type -1
debug1: identity file /Users/sophiegunter/.ssh/id_rsa-cert type -1
debug1: identity file /Users/sophiegunter/.ssh/id_dsa type -1
debug1: identity file /Users/sophiegunter/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version dropbear_0.53.1
debug1: no match: dropbear_0.53.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 86:c3:f3:ce:89:39:9c:4b:91:30:dd:05:18:af:67:6a
debug1: Host '[192.168.1.14]:2222' is known and matches the RSA host key.
debug1: Found key in /Users/sophiegunter/.ssh/known_hosts:3
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
SSHDroid
Use 'root' as username
Default password is 'admin'
debug1: Authentications that can continue: password
debug1: Next authentication method: password
ro...@192.168.1.14's password:
debug1: Authentication succeeded (password).
Authenticated to 192.168.1.14 ([192.168.1.14]:2222).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LC_CTYPE = UTF-8
debug1: Sending subsystem: sftp
TRACE (9280): enter sign_key_free
TRACE (9280): enter dsa_key_free
TRACE (9280): leave dsa_key_free
TRACE (9280): enter rsa_key_free
TRACE (9280): leave rsa_key_free
TRACE (9280): leave sign_key_free
Server version: 3
Extension: posix-...@openssh.com <1>
Extension: sta...@openssh.com <2>
Extension: fsta...@openssh.com <2>
unique: 0, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.8
flags=0x00000000
max_readahead=0x00100000
remote_uid = 0
INIT: 7.8
flags=0x00000000
max_readahead=0x00100000
max_write=0x01000000
unique: 0, error: 0 (Undefined error: 0), outsize: 40
unique: 0, opcode: STATFS (17), nodeid: 1, insize: 40
[00002] EXTENDED
[00002] STATUS 42bytes (7ms)
unique: 0, error: -102 (Operation not supported on socket), outsize: 16
mount_osxfusefs: failed to mount /Users/sophiegunter/sshfs@/dev/osxfuse0: Operation not supported on socket
sent: 1 messages, 45 bytes
received: 1 messages, 42 bytes
rtt min/max/avg: 7ms/7ms/7ms
num connect: 1
Sophies-MacBook-Pro:~ sophiegunter$ debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
Transferred: sent 2488, received 1848 bytes, in 0.1 seconds
Bytes per second: sent 21318.7, received 15834.8
debug1: Exit status 0
What I am really trying to do recover some data from the internal storage of my HTC One Mini. I wiped my phone and didn't realise that some photos and videos were saved onto my internal storage, I thought they were all saved onto the sdcard. I was going to use PhotoRec (http://www.cgsecurity.org/wiki/PhotoRec) to recover the files, something I've used successfully in the past, and so I'm trying to find a way of mounting the internal storage of the device onto my MacBook so PhotoRec can scan the disk/image.
Unsure if this is related, however I have the most successful mount when the mount drive is within the "home" folder of the Mac user. See the difference between attempting the mount on the root of the Macbook, against folders within the user's directory:Sophies-MacBook-Pro:~ sophiegunter$ sshfs ro...@192.168.1.14:/storage/ / -p 2222 -o auto_cache,volname=Android,reconnect
mount_osxfusefs: failed to mount /@/dev/osxfuse0: Operation not permitted
ro...@192.168.1.14's password:
Sophies-MacBook-Pro:~ sophiegunter$ sshfs ro...@192.168.1.14:/storage/ ~/ -p 2222 -o auto_cache,volname=Android,reconnect
ro...@192.168.1.14's password:
Sophies-MacBook-Pro:~ sophiegunter$ mount_osxfusefs: failed to mount /Users/sophiegunter@/dev/osxfuse0: Operation not supported on socket
Sophies-MacBook-Pro:~ sophiegunter$ sshfs ro...@192.168.1.14:/storage/ /Volumes -p 2222 -o auto_cache,volname=Android,reconnect
mount_osxfusefs: failed to mount /Volumes@/dev/osxfuse0: Operation not permitted
ro...@192.168.1.14's password:
Sophies-MacBook-Pro:~ sophiegunter$ sshfs ro...@192.168.1.14:/storage/ ~/sshfs -p 2222 -o auto_cache,volname=Android,reconnect
Sophies-MacBook-Pro:~ sophiegunter$ ssh ro...@192.168.1.14 "dd if=/storage/emulated/0 -1 -" | dd of=~/android.img
SSHDroid
Use 'root' as username
Default password is 'admin'
ro...@192.168.1.14's password:
TRACE (15533): enter sign_key_free
TRACE (15533): enter dsa_key_free
TRACE (15533): leave dsa_key_free
TRACE (15533): enter rsa_key_free
TRACE (15533): leave rsa_key_free
TRACE (15533): leave sign_key_free
BusyBox v1.21.0 (2013-07-08 16:00:47 CEST) multi-call binary.
Usage: dd [if=FILE] [of=FILE] [ibs=N] [obs=N] [bs=N] [count=N] [skip=N]
[seek=N] [conv=notrunc|noerror|sync|fsync]
Copy a file with converting and formatting
if=FILE Read from FILE instead of stdin
of=FILE Write to FILE instead of stdout
bs=N Read and write N bytes at a time
ibs=N Read N bytes at a time
obs=N Write N bytes at a time
count=N Copy only N input blocks
skip=N Skip N input blocks
seek=N Skip N output blocks
conv=notrunc Don't truncate output file
conv=noerror Continue after read errors
conv=sync Pad blocks with zeros
conv=fsync Physically write data out before finishing
Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),
MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)
0+0 records in
0+0 records out
0 bytes transferred in 1.779195 secs (0 bytes/sec)
Sophies-MacBook-Pro:~ sophiegunter$
That said, there are special tools for recovering deleted files on Android phones. PhotoRec seems to be able to recover files from the internal storages of your Android Phone if you plug your phone into your computer and enable USB debugging (on your phone). See http://www.cgsecurity.org/wiki/PhotoRec_FAQ#How_to_enable_the_USB_mass_storage_mode for details. I hope this helps.
Because the "internal sdcard" is not a true FAT file system, you can't mount it via USB storage. Well, that's not technically true, but the vast majority of people use Windows computers and Windows doesn't recognize ext4. If we were to allow you to mount the data partition via USB storage, Windows would claim that the device wasn't formatted and offer to format it for you, which, as you can imagine, would be a disaster. The whole ext4 setup is another reason that Android switched to using MTP for transferring files. Most of these devices don't have the necessary kernel configuration to even support USB storage mode, so it's not very easy to enable USB storage if we even wanted to try. Unfortunately at this time, MTP isn't available in recovery, so if you have no other option, you will have to use adb to push and pull files to/from your device.
FAT/FAT32 filesystems lack permissions, so naturally, some other filesystem was used (again, probably ext3/4). To maintain compatibility/abstraction/whatever, /sdcard would now become a fake fuse mount that lacks permissions, the actual data however, is in /data/media (permissions still applied there).
The issue here is, you can’t unmount /data (and since /sdcard is /data/media, you can’t unmount /sdcard alone). Besides possible data loss, unmounting /data would probably cause your device to reboot (or soft reboot, I’m not really sure how it would react).
This meant Google had to change to a different USB protocol to get the device to show up on your PC, and this protocol was, MTP (Media Transfer Protocol). This would allow the contents of /sdcard to show on a compatible device (running a compatible OS) without unmounting it.

--
You received this message because you are subscribed to a topic in the Google Groups "OSXFUSE" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/osxfuse-group/aJElhuRInR4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to osxfuse-grou...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "OSXFUSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osxfuse-grou...@googlegroups.com.
~ # mount | grep /data
/dev/block/mmcblk0p35 on /data type ext4 (rw,seclabel,relatime,data=ordered)
~ # dd if=/dev/block/mmcblk0p35 | gzip -1 - | ssh Aa...@192.168.1.10 dd of=/Users/Aaron/HTC\ One/dd/system.gz