Using Android Smartphone (or Tablet/MINI) as Subsonic Server

General discussions.

Moderator: moderators

Using Android Smartphone (or Tablet/MINI) as Subsonic Server

Postby alphawave7 » Wed Jan 02, 2013 9:26 pm

So here I was, on holiday with time to kill, and one of my favorite things to do when otherwise doing nothing, is figure out a way to run Subsonic using less power and resources. I tried this a year or two ago on a Seagate Dockstar, only to discover the RAM in that device simply wasn't sufficient for my 500 gig collection..very sluggish. Sun Java may have been a bit better solution to openjdk, but I lost interest in hacking that solution, and went back to a desktop WinXP solution. Now, I want to retire that desktop, I'm tired of running it 24/7 just to serve my tunage (mp4 vids might come later, but so far Youtube fills my needs). So, I decided to revisit options, and recent posts about the raspberry pi only encouraged me.

Interestingly, I was in the first round of Nexus 4 orders, and I grabbed a 16GB N4. I gave my wife my Samsung GS3, upgrading her from her Sensation, and was about to sell the Sensation on Swappa. It dawned on me that the Sensation has plenty of dual-core CPU, and with 768MB of ram, enough to run a large collection, so the hardware was already under my roof, and my next step was to wedge a linux distro onto it. I reviewed several sites:
http://sven-ola.dyndns.org/repo/debian-kit-en.html
was my first, and I tried the full Deb install first...it went without a hitch until some strange error about directory not found and hung. VNC wasn't getting in either, so I started from scratch. A link on that page above also gave me:
http://linuxonandroid.org/
http://linuxonandroid.org/complete-linu ... v2-beta-2/

I started with the Sensation rooted, EXT4 Recovery, and full factory reset. Added Astro/ES File manager, terminal app, and a couple VNC apps, since settings vary between them, and Complete Linux Installer APK, which wanted to update my busybox..I let it.

I was surprised Linux, and Ubuntu were already so far along in development...and this apk-as-toolkit speaks to me, as a Linux beginner (I only relearned wget and apt-get last night!). The latest APK of Complete Linux Installer V2 worked as advertised, and I got Ubuntu 12 running in no time...I was able to VNC right in and then downloaded openjdk and the Ubuntu Subsonic deb package. It all worked! There's only a few tunes on the phone now, and they stream perfectly (even no download 'blip' we see at that 20-25 second mark!), and I have over 130MB of ram left running both Ubuntu and Android, so I *think* I'll be fine once I complete the full project.

I ordered a micro-USB to USB with power splitter off of eBay (China airmail will take a few days), and then I hope to have both the WD Passport external drive AND the phone powered off a single wallwart, and finally have my low-power, quiet Subsonic Server solution. :D
http://www.ebay.com/itm/Micro-USB-OTG-H ... 2325ef96f1

And just after 3AM, I finally gave up with sweet success, only to wake up to even more good news:
http://www.pcmag.com/article2/0,2817,2413775,00.asp
We live in exciting times, if you're a geek. LOL!
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby mr_nobody » Wed Jan 02, 2013 10:53 pm

I love posts like this. I currently run subsonic on an asus eee 2g surf netbook (the first and lowest end netbook). It only has a 2gb ssd which was fine running ubuntu server 8.04 lts for a while. I recently upgraded to ubuntu server 12.04 lts on an 8gb sd card in the same netbook and it's working great.

I may soon have a surplus android tablet lying around but not sure I'm brave enough to try what you did though...
mr_nobody
 
Posts: 202
Joined: Thu May 31, 2012 8:17 pm

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby alphawave7 » Thu Jan 03, 2013 12:44 am

mr_nobody wrote:I love posts like this. I currently run subsonic on an asus eee 2g surf netbook (the first and lowest end netbook). It only has a 2gb ssd which was fine running ubuntu server 8.04 lts for a while. I recently upgraded to ubuntu server 12.04 lts on an 8gb sd card in the same netbook and it's working great.

I may soon have a surplus android tablet lying around but not sure I'm brave enough to try what you did though...


Heh..for a while (nearly a year) I was running Subby on a Dell Mini 9 with an 8GB SSD and that WD Passport hanging off it...and it worked fine...until the SSD drive up and died on me, I'm too cheap to replace it. :P What was odd about the SSD dying, was it wasn't doing much of anything...I had already migrated Subby to RAM per the RAM tweak. :roll:

On the Sensation, I just d/l'd Antek App Manager and froze or deleted some bloat, gained another 40-60MB available consistently.
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby alphawave7 » Thu Jan 03, 2013 5:29 am

Just to update on performance:
mp3 (no transcode) appears to hit the processor for spikes from a few hundred milliseconds to the 20% range, with most of the duration in the 2-5% range (which appears to be normal 'background' for Android in general).
mp4 video appears to spike the processor, sometimes 80-100%, but only for approx. 100-300 milliseconds, then drops to the 60-70% range, and occasional fall-off into idle range of 2-5%. Playback is barely acceptable, with a 1 minute/42MB file stopping playback 2-3 times awaiting buffer, for about 1-2 seconds each. Doubt this will be a movie install for some time, but works fine on tunes not needing transcoding. 8)
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby alphawave7 » Sat Jan 19, 2013 10:11 pm

UPDATE: My micro-USB to USB powered cable (linked above) arrived, so I set upon rigging up my Sensation server. First order was getting external hdd access, and despite USB Host support built into the Sensation's mobo, it wasn't supported in the stock kernel. ENTER XDA:
http://forum.xda-developers.com/showthr ... ?t=1424345
http://forum.xda-developers.com/showthr ... ?t=1820375
After flashing this updated kernel, I overclocked to 1.5GHZ, and plugged in my WD Passport drive, which spun up easily. Nav'd to /sdcard and added a 'USB' folder, reconnected the drive....and nothing. Rebooted the phone bare, rehooked the Passport and BINGO! Astro and ES File Explorer all see the contents of /sdcard/USB, so I now need to bush up on command-line skillz to mount said drive to Ubuntu...if that's even possible. Feel like I'm almost there! 8)
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby alphawave7 » Sun Feb 03, 2013 9:35 am

IT WORKS! IT EFFEN WORKS!

Okay, I had a tough time wrapping my head around mounting a FAT32 harddrive to Ubuntu when Android doesn't perceive the harddrive as a physical drive but only as a directory. I was assuming the reason I couldn't see it in Ubuntu was related to failure mounting a FAT32 DRIVE, when all I needed was to mount the Android directory (none of the mount vfat sda1 nonesense).

Other GREAT news is that despite updating my kernel to enable USB host mode, it may not be necessary for others: enter Stickmount! Chainfire has created a USB host 'app' that essentially does the same thing...mounts a harddrive as a directory on the sdcard called 'usbStorage', which contains all my content. It happens to run concurrently with the default 'usb' folder on my re-kernel'd Sensation, and I've verified both mounts work fine.
https://play.google.com/store/apps/deta ... ount&hl=en

Sensation now runs CM9 Android on top, Ubuntu/Subsonic server on sdcard, is perfectly accessible as any Subsonic installation, but has the added advantage of VERY low power/resources (portable harddrive chews the most power), but is also so portable as to be the ultimate road warrior rig...Android App and DSub work fine (using 127.0.0.1 as 'Mobile' server, normal sub.org addy as Home/Work when a net connection exists, and you want to share). I recall in the 90's setting up a Dell behind the driver's seat, external desktop drive dangling off, expensive power inverters/remote touchscreen terminals and a nightmare to prepare for every use. Now the rig is two handsize units with a small y-cable! I may be the first person to run Subsonic and a 500 GB collection off a cell phone...I feel accomplished! 8)
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby alphawave7 » Sun Feb 17, 2013 5:49 pm

Performance Update: For unknown reasons, after my entire collection is scanned (50K+ files), Subsonic becomes mostly unusable on Sensation. During testing, it seems the db size has a direct impact on performance, as I can navigate and play back fine with approx. 20K files loaded, but performance drops and CPU spikes increase as I add more files to the mix. Each scan also takes a LOT of time, so don't judge performance anywhere near a file addition or re-scan. There are no errors in any subsonic logs that would indicate issues, and I can find nothing in ubuntu either, so I have to wonder where the bottleneck is, and think it's just a limitation of running the OS and Subsonic on the external sd (read/write speeds perhaps?), despite seemingly having plenty of RAM and CPU available on the Sensation.

Next up will be the Nexus 7 and Nexus 4: Just beginning on both, and I've already noticed the Nexus 7 does NOT charge when the Y-adapter cable is attached (the micro-usb/mhl outs are different) so I'll need to overcome that (custom cable?), and Stickmount appears to need sideloading.
Nexus 4 only just got a kludgy fix to USB-host mode:
http://forum.xda-developers.com/showthr ... ?t=2151159
and dev appears interested in further fixes, so I'll wait a bit to see how that project pans out...it will also need Stickmount sideloaded.
This route has me wondering what the limitiations would be for actually running Subsonic IN Android. With so many android devices and upcoming settop boxen with plenty cpu and ram on the horizon, it would seem a natural fit for Subsonic on Android.
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby alphawave7 » Mon Feb 18, 2013 6:36 pm

http://gadgets.ndtv.com/mobiles/news/ub ... s-4-332319

Says Nexus 4! Luckily, my N4 unlocked and rooted, but running stock with some ROM Toolbox tweaks, and I've held off on the recent update, it's still sitting in cache. The new update supposedly hoses the current radio, rendering LTE an impossibility, while the current radio only requires some minor tweaking to receive LTE, and I know LTE is VERY close to going live in my area, and I want to be prepared for it. Thinking now to swap SIMs from N4 to Sensation to use as daily driver, while I hack Ubuntu on N4. Hope to see few issues getting SS on Ubuntu, and host mode hopefully is automagic...
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby alphawave7 » Mon Feb 18, 2013 6:42 pm

I've also been researching 'mini' computers, ala
http://www.amazon.com/iMito-MX1-Bluetoo ... pd_sim_e_8

There are quite a few of these little things, all varying a bit, and I think the Rockchip versions are the most recent. For some reason, the AllWinner chips don't seem compatible with XBMC, even though I don't use XMBC, I wouldn't mind exploring it (or Plex) and want as much compatibility as I can muster. As a result, I'm still doing a lot of research on these before pulling a trigger. Some will boot another OS hanging off their USB first (much like my old Seagate Dockstar), which is handy, but I REALLY wish Subsonic could be ported to Android.../sigh

(added MINI to title)

edit: narrowing down to two recent Rockchip models:
http://www.minitvstick.com/blog/buying/
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby mr_nobody » Mon Feb 18, 2013 9:15 pm

alphawave7 wrote:and host mode hopefully is automagic...


Nope but it apparently can be made to work:

http://forum.xda-developers.com/showthr ... ?t=2151159
mr_nobody
 
Posts: 202
Joined: Thu May 31, 2012 8:17 pm

Re: Using Android Smartphone (or Tablet) as Subsonic Server

Postby alphawave7 » Mon Feb 18, 2013 10:05 pm

mr_nobody wrote:
alphawave7 wrote:and host mode hopefully is automagic...


Nope but it apparently can be made to work:

http://forum.xda-developers.com/showthr ... ?t=2151159


That would be an alternate Android kernel...I meant in UbuntuOS. :)
alphawave7
 
Posts: 1042
Joined: Thu Feb 11, 2010 9:54 am

Re: Using Android Smartphone (or Tablet/MINI) as Subsonic Se

Postby mr_nobody » Mon Feb 18, 2013 11:08 pm

Ah yes. Let us know what you find... I'm curious if it does work automatically.
mr_nobody
 
Posts: 202
Joined: Thu May 31, 2012 8:17 pm


Return to General

Who is online

Users browsing this forum: No registered users and 7 guests