Since I have been working more on Linux and Android together, I just wanted to keep people up to date on what I've been doing with my projects and the website. I managed to get the VLC source code compiled into an APK and working. It runs smoothly for various formats, I'd like to do a write up on how I got that working soon and also make an automated script to download the lasted script from their git repository. My hope is to allow the user to learn about it and also give them a quick alternative to updating their APK for the phone that they can swap out for the latest build of VLC while it's still in the alpha state.
The other thing I've been working on is automating as much of the Android SDK / Eclipse process as possible for people that want to start programming and are afraid to come to Linux. I want to do this because I love the idea of an open source community, be it in Linux or Android and really want them to thrive. Linux can be intimidating when you first start using it and can require you to format your computer every time you screw up your system. At least until you figure out the file system and then you can fix almost every problem pretty easily. Google however, seems to make it fairly difficult for a first time person coming to Linux to start programming and I'd like to try to bridge that gap by automating as much of the Eclipse set up as necessary to get more developers working on Android in a Linux environment. I don't know if I'll be able to automate everything required to get a system installed with ADB, but possibly one or two steps away and just requiring GUI interaction in Eclipse (I'm still researching this part, to see if I can do any of this).
In the mean time, if you'd like to make any suggestions for write-ups I'll gladly take suggestions in the comments section or on twitter at @ArchDukeDoug (still waiting for the title to be granted in any country, probably not going to happen). Suggestions allow me to help you and also help myself, so don't be shy with them. If I'm able to do them I will definitely try.
A blog describing what I've learned and breaking things down into (hopefully) simple terms in Linux so that people will be willing to step away from Windows and be less afraid of their computers breaking.
Sunday, June 12, 2011
Saturday, June 11, 2011
Auto-Mount Hard Drives in Linux
Since it has been a few days since I have made a post and I am working on trying my luck at bash script writing, I've been a little preoccupied. So I decided to do a short write up on auto-mounting (the easy way) hard drives. We're going to take a look at a program called "pysdm" located in the Software Manager:

When the program is installed, you can run it under Administration -> Storage Device Manager. This program will provide a graphical solution for editing your hard drives boot options, the owners, and various options. My problem is that I have two hard drives that are auto-mounted and one that is not. So I'm going to configure the one that is not. When you start the program up, you'll be greeted by the screen below:

Expand the trees for the hard drives and click on the partition listed on the drive. In my case, I'm going to be auto-mounting sdc1. When I click on it for the first time, it asks me if I want to prepare the hard drive, say yes. Click on "Dynamic Configuration Rules" for some information about your hard drive (model, vendor) and the ability to assign some custom rules. Back under General is where the assistant is though and that's the feature I'm going to be going over. Click on Assistant now for this screen:

When you're satisfied with the settings, hit apply and you've got a hard drive that auto-mounts. Simple!
When the program is installed, you can run it under Administration -> Storage Device Manager. This program will provide a graphical solution for editing your hard drives boot options, the owners, and various options. My problem is that I have two hard drives that are auto-mounted and one that is not. So I'm going to configure the one that is not. When you start the program up, you'll be greeted by the screen below:
Expand the trees for the hard drives and click on the partition listed on the drive. In my case, I'm going to be auto-mounting sdc1. When I click on it for the first time, it asks me if I want to prepare the hard drive, say yes. Click on "Dynamic Configuration Rules" for some information about your hard drive (model, vendor) and the ability to assign some custom rules. Back under General is where the assistant is though and that's the feature I'm going to be going over. Click on Assistant now for this screen:
When you're satisfied with the settings, hit apply and you've got a hard drive that auto-mounts. Simple!
Labels:
Auto-Mount,
Hard Drives,
Linux Mint 11 Katya,
pysdm
Sunday, June 5, 2011
Sync Music to your Android OS Device in Linux with Banshee Media Player
I always had a hard time finding a way to sync my music and playlists easily to my Android phone in Windows. I tried using Doubletwist, Winamp, and even some strange AdobeAIR playlist editor. There was just never a clear cut way to go back and forth with my playlist. Once you figure out how to get Banshee and your Android phone on the same page, the two coexist wonderfully with only a few exceptions. "What are those exceptions?" You might ask. Or you may just skim past this and completely ignore this part and figure out that it's difficult to sync certain file types later. Those exceptions are that you have to edit a file with the MIME Type of the extensions that you want to add. I'll give you a sample of the file I used which includes as many of the MIMES as I could think of at the time and try to include an example in case I missed one so that you can add more to the list.
First thing we want to do is switch Banshee to daily build to get the most up-to-date version. To do this open up terminal and type:
If for some reason Banshee is not installed right now (it is by default with Linux Mint 11), you can install it with: sudo apt-get install banshee
Now connect your phone by USB to your computer and set your phone to USB Mass Storage. Open the root SD card directory with nautilus and create a new empty file (right click -> create document -> empty file) called .is_audio_player and edit it with gedit.

In the empty gedit file put the following information (like above) into the text file:
Adding the file to the folder allows Banshee to see that your Android phone is actually a music player. Editing the contents of it will tell Banshee what file formats that the phone supports. The one format that I've had trouble getting to work are *.avi because they use different codecs and I get an error. Now start Banshee up and you should see your phone listed under "Devices" now.

You can import the music from your phone by right clicking on right clicking on the x GB Filesystem and selecting "Import to Library" and that will copy all of your files into the folders. Otherwise you could manually copy the folders from your SD card to the ~/Music and ~/Video folders as well as the playlists and import them into Banshee. If you're importing a playlist, you need to open the playlist with gedit and convert all of the backslashes (\) to forward slashes (/) with the search -> replace -> replace all feature. Once you've replaced all the slashes, try importing the playlist under File -> Import Playlist (try doing them one at a time if you have problems with them leaving songs out).
That's it. Your device should now be capable of syncing to your Banshee Media Player. It may take a little playing with to get the playlists set up for your device and your music set up in Linux and organized. Your videos may also error out depending on if it is supported by the .is_audio_player.
** Extra Notes**
If your video is unsupported by Banshee, you can try adding the MIME-Type to the .is_audio_player by following the format: video/name or audio/name and you can find the name from looking up the extension on wikipedia. For example: audio/mpeg,audio/x-wav,video/mpeg,video/quicktime
I believe Apple devices (iPhone, iPad, and iPod) should all work out of the box with this program because of a plugin that comes installed by default. I'm not 100% positive though, but under Extensions there is one listed for Apple Devices Support listing the three I previously mentioned. I just am not sure what is required to set that up.
First thing we want to do is switch Banshee to daily build to get the most up-to-date version. To do this open up terminal and type:
sudo add-apt-repository ppa:banshee-team/banshee-daily
sudo apt-get update
apt-get upgrade
If for some reason Banshee is not installed right now (it is by default with Linux Mint 11), you can install it with: sudo apt-get install banshee
Now connect your phone by USB to your computer and set your phone to USB Mass Storage. Open the root SD card directory with nautilus and create a new empty file (right click -> create document -> empty file) called .is_audio_player and edit it with gedit.
In the empty gedit file put the following information (like above) into the text file:
audio_folders=Music/, Video/
folder_depth=2
output_formats=audio/mpeg,audio/mp3,audio/x-aac,audio/ogg,audio/aac,video/mp4,video/mp4-generic,video/mpeg4,video/quicktime,video/x-matroska,audio/x-matroska,video/vnd.avi,video/avi,video/msvideo,video/x-msvideo
Adding the file to the folder allows Banshee to see that your Android phone is actually a music player. Editing the contents of it will tell Banshee what file formats that the phone supports. The one format that I've had trouble getting to work are *.avi because they use different codecs and I get an error. Now start Banshee up and you should see your phone listed under "Devices" now.
You can import the music from your phone by right clicking on right clicking on the x GB Filesystem and selecting "Import to Library" and that will copy all of your files into the folders. Otherwise you could manually copy the folders from your SD card to the ~/Music and ~/Video folders as well as the playlists and import them into Banshee. If you're importing a playlist, you need to open the playlist with gedit and convert all of the backslashes (\) to forward slashes (/) with the search -> replace -> replace all feature. Once you've replaced all the slashes, try importing the playlist under File -> Import Playlist (try doing them one at a time if you have problems with them leaving songs out).
That's it. Your device should now be capable of syncing to your Banshee Media Player. It may take a little playing with to get the playlists set up for your device and your music set up in Linux and organized. Your videos may also error out depending on if it is supported by the .is_audio_player.
** Extra Notes**
If your video is unsupported by Banshee, you can try adding the MIME-Type to the .is_audio_player by following the format: video/name or audio/name and you can find the name from looking up the extension on wikipedia. For example: audio/mpeg,audio/x-wav,video/mpeg,video/quicktime
I believe Apple devices (iPhone, iPad, and iPod) should all work out of the box with this program because of a plugin that comes installed by default. I'm not 100% positive though, but under Extensions there is one listed for Apple Devices Support listing the three I previously mentioned. I just am not sure what is required to set that up.
Subscribe to:
Posts (Atom)