I plugged my Kit-kat android phone up to my Ubuntu 14.04 computer and I enter the terminal and I want to be able to access files on my phone like the media and music folders through the terminal... is this possible?
Android devices usually uses the Media Transfer Protocol (MTP) when connecting via the USB. This protocol works differently than the traditional USB.
Simply put, this is a way to ensure that the phone does not share too much data with the computer. The computer makes a query, and the phone answers it. The phone may decide to share the file or ignore the query. Similarly, when the computer deletes a file, the phone has the ability to decide whether to actually delete the file or not.
Okay, enough introduction. To access a device connected via MTP, you need the information about it's #Bus and #Dev. To do so, you can run the following command.
This will provide you with a list of connected usb-devices. You need to find your device from this list. It can be a bit tiring, so you can search for the device with the available Manufacturer option. Simply use the following command.
usb-devices | grep "Manufacturer=OnePlus" -B 3
This will provide you with 4 lines of information, where the firs line is as follows.
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 13 Spd=480 MxCh= 0
As you can see here, the associated Bus is 02, and Dev is 13.
Now change your directory to /run/user/1000/gvfs/ and see the list of folders there.
You will find the associated MTP device with the #Bus and #Dev in the list. For example, mine was mtp:host=%5Busb%3A002%2C013%5D. Now simply change your directory using the following command.
Voila! You are inside the file storage!