Joel Bastos bio photo

Joel Bastos

Automation engineer with a keen interest on devops culture, geek by definition and curious by nature

Email Twitter LinkedIn Github
Well, now that I'm a proud Samsung Galaxy Ace owner and just entered the amazing world of Android, let the hacking begin!

For my first post on Android I'll explain how to mount the SDcard through a ssh filesystem on your netbook using wifi.



The requirements are pretty strait forward, a rooted Android device with sshdroid installed, a netbook with sshfs and both connected using wireless.

After starting sshdroid it will present you the IP and port of the ssh server:


You may connect to your device using the netbook with the provided information:
ssh root@10.0.2.15 -p 2222
(The default password is "admin", I use ssh keys instead as you should too, but I'll not cover that unless someone asks)

Now you're inside Android, you may list the partition table, just to check, by using:
#df
My SDcard is mounted on /mnt/sdcard, this will be useful.
You may exit Android ssh connection by typing:
#exit
On the notebook make a directory to mount the Android SDcard:
mkdir /media/android
and run sshfs mounting the Android SDcard partition (/mnt/sdcard) on the newly created directory (/media/android)
sshfs root@10.0.2.15:/mnt/sdcard /media/android -p 2222
(As before it will ask a password, the default password is "admin")

Leave that shell as is and open another one. Type the following on the new shell:
ls -la /media/android
As you can see you have now access to the SDcard locally with read/write permissions.
When you're done, just unmount the ssh filesystem using:
sudo umount /media/android