
I love to regularly watch new episodes of American series and I prefer to watch them with English or Dutch subtitles. I use a script called subliminal to download them right after downloading an episode or movie from usenet (my Cubox-i4Pro handles this automatically, I can much recommend it as upgrade for your Raspberry Pi!).
Unfortunately subliminal can’t always find the right subtitles, and especially not for downloading an episode that has just been broadcasted in America. This made me look for a way to directly download subtitles from my couch, and I came across this Android app called ‘MightySubs‘ which let you download subtitles from all popular subtitle sites to your samba or ftp share.
MightySubs has a free version and a premium version that costs 99 cents. The free version has some limitations including:
- There are only two languages available: English and your device’s language setting (premium version has 22 languages).
- Not more than 10 daily downloads allowed (premium version increases this limit by providing custom account details for addic7ed).
When trying to edit a premium setting it gives a toast message like in the picture above, stating it is not available in the free version and the premium version must be bought to enable this option. That got me thinking whether it only blocks the settings panel or actually blocks the functionality inside the app itself. I figured it’s only blocking the option and that it must be possible to change this directly in the saved settings.
Most of the time, an app saves user’s settings by using the Android SharedPreferences class. It writes saved data to an xml file stored inside the ‘shared_prefs’ folder located at /data/data/com.yourpackage where com.yourpackage is the package name of the app.
This is most likely also how MightySubs works. The only thing we need is the package name. That is easy to find by looking at the Google Play store URL: https://play.google.com/store/apps/details?id=info.toyonos.mightysubs. So the app’s prefs data is stored at /data/data/info.toyonos.mightysubs/shared_prefs
.
The device needs to be rooted to get inside this dir. Mine is, so I browsed to /data/data/info.toyonos.mightysubs/shared_prefs
and there was indeed a file named info.toyones.mightysubs_preferences.xml
with the following contents:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<string name="PrefCurrentProfileIp">192.168.1.10</string>
<string name="PrefSubtitlesFetchersList">{"activeFetchers":[2,1,6]}</string>
<string name="PrefDailyDownloadCounter">20150814:0</string>
<boolean name="PrefOnlyWithoutSubtitles" value="false" />
<boolean name="PrefCurrentProfileDownloadPathEnable" value="false" />
<string name="PrefSubtitlesManualSelection">1</string>
<string name="PrefAdditionalExtensions"></string>
<string name="PrefAddic7edPassword"></string>
<string name="PrefAddic7edUsername"></string>
<string name="PrefCurrentProfilePath">/path/to/series/</string>
<boolean name="PrefFullLanguageExtension" value="false" />
<string name="PREF_VERSION_KEY">1.5.0</string>
<string name="PrefCurrentProfileName">Local profile</string>
<string name="PrefHearingImpaired">2</string>
<string name="PrefCurrentProfileType">1</string>
<boolean name="PrefKeepSubtitleFilename" value="false" />
<string name="PrefActiveProfile">1</string>
<string name="PrefDefaultLanguage">EN</string>
<string name="PrefLanguageExtension">0</string>
<string name="PrefCurrentProfileMediaType">0</string>
<null name="PrefCurrentProfileUsername" />
<null name="PrefCurrentProfilePassword" />
</map>
This is the file where all the settings are stored. And it is possible to edit them thanks to our root access. Looking at the names of the strings, it seems like PrefDefaultLanguage
is the one that contains the enabled languages. It is currently set to “EN”.
Editing this string should give us more languages. My first try was to change it to “EN NL” to enable Dutch subtitles, but that made the app crash. I tried “EN,NL”, but same result. My last try was “EN;NL” and that worked. It unlocked the premium feature.
I also entered my addic7ed account details, which also bypasses the daily download limit. There is no need to buy the premium version anymore.
Contacting the developer
I sent an email about my discovery to the MightySubs developer on 31th of July, to the email provided in the Google Play Store. Unfortunately I have not received a response and the app has not been updated. (article updated, see below)
I would still suggest buying the premium version of the app if you are going to use premium features. It’s a great working app and well worth the 99 cents.
If you make premium features and you want to make sure people aren’t directly editing your settings, do not just disable the settings dialog, but also confirm in the app itself whether the right options are chosen. Even better would be to completely remove unused functionality: this would also decrease the app’s download size (only removing is probably a bit more work).
By all means, make sure that people are not able to use a setting that you don’t want them to use. This counts for a lot of things in security though, and sometimes people tend to forget this, also often on website dropdown forms.
Update 16/08/2015: I received a reply from the developer. He wrote (click here for all):
“I read your blog entry 🙂 Nice job. Just one thing. The trick you explained, about the language, is not accurate. You transformed the language setting from EN to EN;NL (both English and Dutch). But it is permitted in the free version. Both languages are already here and can be selected together. A real hack would have been turning EN to DE or FR (not allowed in the free version for you).
About Addic7ed credentials, filling them doesn’t overcome the limitation (10 per day). It just allows premium users to have a better quota on this site. It could be a real pain to be unlimited on MightySubs but limited on Addic7ed.Anyway your demonstration is accurate, the hack is real and I should fix that.”
He says that both English and Dutch are permitted in the free version, but Dutch was not available for me and it showed a message “Purchase the premium version to get more languages”. Any how, it doesn’t matter, as it is possible to change it to whatever language you want including DE;FR (I tested it).
I wasn’t aware that the account details didn’t bypass the limitation, however in the file above there is also a string called PrefDailyDownloadCounter which probably counts the number of subtitles downloaded so far. I did not test it, but resetting it to zero after ten downloads would probably work.
The developer further wrote that he will bring out a new version in September with new features. Hopefully this hack is also fixed by then.