Running Hulu on Android

Written 2011-01-29

Tags:User agent Mac OS X Flash Hack Web browser Android Adobe Flash 

***Don't try this at home. Don't blame me if it breaks your phone. It didn't break my phone though.***

Recently, I posted how to change your flash version. I looked into this because I was curious how the web applications like Hulu could detect that your device was an Android client instead of a real web browser. Initially, I looked into packet dumps that I compared between my Droid phone and my laptop. The user-agent strings can be changed to match, but some web apps can still detect they are running on a phone. The key is in the Flash version string. This string, accessible through the Adobe Flash API, is built into the library. So to make a phone look like a real browser, you both need a user-agent string from a real browser, and a flash version from a real browser.

What flash version should we use? Since the 'Desktop' user-agent option emulates an Intel Mac running 10.5, "MAC 10,1,103,19" is a valid OS X flash version. (You can find this by asking a friend with a Mac to go check their flash version.)

If you have a hexeditor on your phone, you can do this without ADB. I used ADB because I haven't yet installed my favorite hexeditor, Pixel's Hexedit, on my phone.

  • Close all browsers ( use a task killer )
  • adb pull /data/data/com.adobe.flashplayer/lib/libflashplayer.so /tmp/libflashplayer.so
  • cp /tmp/libflashplayer.so /<backup-path>/libflashplayer.android.orig.so
  • Use hexeditor to change flash version to "MAC 10,1,103,19"
  • adb push /tmp/libflashplayer.so /data/data/com.adobe/flashplayer/lib/libflashplayer.so

At this point, I cleared all caches, cookies, and history from my browser and rebooted my phone. Finally, and before going to Hulu.com, set your user-agent to desktop mode, which acts like an Intel Mac.

And then...
Hulu on Android

The sound is clean, but the videos are pretty laggy. I'll have to try this on a friend's phone to see if a newer, perhaps 1+GHz CPU, will improve things.