[MOD] HBO Nordic on root (app+guide)

Search This thread

Hurtcake

Member
Feb 17, 2010
42
24
Gjøvik
So HBO decided to block access to their service as long as you were trying to watch from a rooted device. If I'm gonna pay for the service I want to choose which devices I want to use. Un-rooting is definitely not an option.

So here's a little guide to avoid the root-check done by the application.
I've created one and attached it to the post.

There are some issues with CM10, and some tablets. I'm not a app developer, nor do i know java. Would appreciate if anyone could give a hand with any issues that should come to light.

*******Guide*********
First you need a couple of things
1. Download the latest APKTool and the equlient apktool-install for your preferred OS.
2. Download SignApk.zip

3. Extract files to a folder. e.g "c:\Apktool"

4. Extract "framework-res.apk" from /system/framework/ on your device.
Place this in the same folder as you extracted the previous files.

5. Extract the HBO-app using Titanium backup or similar
Place this in the same folder as you extracted the previous files.

6. Open CMD and navigate to folder
Code:
cd c:\Apktool

7. Install Framework and give a friendly name to your framework. You might get multiple if you create for different devices. In this case i name it M8
Code:
apktool.jar if framework-res.apk m8

8. Extract the APK with you framework of choice. Use t (tag) to choose
Code:
apktool.jar d -t m8 com.hbo.android.app.apk

9. Edit files
From the newly extracted folder, open MainActivity.smali in notepad
com.hbo.android.app\smali\com\hbo\android\app\activity\MainActivity.smali

10. Find and delete
Code:
    .line 196
    invoke-virtual {p0}, Lcom/hbo/android/app/activity/MainActivity;->checkRoot()V
Save the file

11. Rebuild the application
Code:
apktool.jar b com.hbo.android.app com.hbo.android.app.new.apk

12. Sign the application
Code:
signapk.jar certificate.pem key.pk8 com.hbo.android.app.new.apk com.hbo.android.app.new.signed.apk

Transfer and install app on device
Clear Dalvik Cache just to be sure.
Enjoy

Note. If you get any compiling errors at one time, I cant really help you.
Go to this thread and ask politely.
Be sure you have the latest "aapt.exe" from the thread above.
Also be sure to use the right framework.res.apk for you device. That might also create these errors.

Please leave a response if its working or not, and what ROM\Device you're using
:)


Update:
HBO v1.1:
Guide still works and confirmed working on my I9300. Attached file to post

HBO v1.2:
Hadn't noticed the latest update.
Guide still works and confirmed working on my I9300. Attached file to post

HBO v1.3 Attached



Confirmed working on:
S3 i9300 (Omega 34, Stock, UltimaROM, WanamLite), TF101 (Revolver ICS), TF707 (HW overlays enabled), Note II (Stock), Nexus 7 (SmootROM, Stock), G-Box Midnight (Stock), Nexus (Stock)
 

Attachments

  • com.hbo.android.app.signed.apk
    1.5 MB · Views: 901
  • com.hbo.android.app.v1.1.signed.apk
    1.5 MB · Views: 410
  • com.hbo.android.app.v1.2.signed.apk
    1.5 MB · Views: 1,389
  • com.hbo.android.app.v1.3.signed.apk
    1.6 MB · Views: 1,958
Last edited:

braverterror

Member
Feb 7, 2011
8
1
Log-in okay but FC on playback.

HTC Sensation / ARHD 6.8

Sent from my HTC Sensation XE with Beats Audio using xda premium
 

Tiketti

Member
Feb 21, 2011
12
2
Nexus 7 3G, 4.2.1 works

Nexus 7 3G, stock rooted 4.2.1.

And it's working beautifully! Thank you very much, Hurtcake.


edit: Mentioned a wrong device. Forgot it wasn't the phone I installed this on but the tablet...
 
Last edited:

ookkeri

Member
Apr 15, 2012
30
7
Working beautifully with Note2 (HyperNote 0.4, RedPill 1.0) and Nexus7 (CleanRom v3 franco kernel r31).

Thank you!
 

m@f

Senior Member
Aug 9, 2009
187
78
Denmark
Hi..
Is this the procedure the same for another apps?

I have an app from the Danish television provider Stofa given me the same problem that i can't play the app on rooted devices..


Sendt fra min GT-I9305 med Tapatalk2
 

Hurtcake

Member
Feb 17, 2010
42
24
Gjøvik
Hi..
Is this the procedure the same for another apps?

I have an app from the Danish television provider Stofa given me the same problem that i can't play the app on rooted devices..
I believe so. The function name may be called something different. The rest should be similar.

Solution found. Change of bootloader from HTC dev unlocked to JuopunutBear HBOOT didt the trick. Thanks
Glad you found a solution :)
 

m@f

Senior Member
Aug 9, 2009
187
78
Denmark
Manage to get the framework working now... ;)

Looking forward to find the solution.. I´ll try as well now deleting some of the line I belive can be the tricker and test it..
If you find the "golden key / line" please advise me...

/M@F
 

m@f

Senior Member
Aug 9, 2009
187
78
Denmark
Damn.?
Have some problems with compilation.. could be issues related to my Java.. tried with easyapktool as well.. even without modification of my apk I get compiled errors..

Don't have the time right now for errorhandling this problem, so if other find the way to do it I would appreciate...

Sendt fra min GT-I9305 med Tapatalk2
 

Hurtcake

Member
Feb 17, 2010
42
24
Gjøvik
You'll might have more success asking around in this thread
I've also sent you a PM

Damn.?
Have some problems with compilation.. could be issues related to my Java.. tried with easyapktool as well.. even without modification of my apk I get compiled errors..

Don't have the time right now for errorhandling this problem, so if other find the way to do it I would appreciate...

Sendt fra min GT-I9305 med Tapatalk2
 

Silppa

Senior Member
Sep 25, 2011
129
17
What is wrong?

Code:
c:\apktool>apktool b com.hbo.android.app com.hbo.android.app.new.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
c:\apktool\com.hbo.android.app\res\values\styles.xml:118: error: Error retrievin
g parent for item: No resource found that matches the given name '@*android:styl
e/Theme.Light'.
c:\apktool\com.hbo.android.app\res\values\styles.xml:129: error: Error retrievin
g parent for item: No resource found that matches the given name '@*android:styl
e/Theme.Holo.Light.Dialog.MinWidth'.
c:\apktool\com.hbo.android.app\res\values\styles.xml:142: error: Error retrievin
g parent for item: No resource found that matches the given name '@*android:styl
e/Widget.ProgressBar.Small'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 7, --target-sdk-vers
ion, 16, -F, C:\Users\Aleksi\AppData\Local\Temp\APKTOOL1140071533913893449.tmp,
-I, C:\Users\Aleksi\apktool\framework\1.apk, -S, c:\apktool\com.hbo.android.app\
res, -M, c:\apktool\com.hbo.android.app\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:255)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
        at brut.androlib.Androlib.buildResources(Androlib.java:269)
        at brut.androlib.Androlib.build(Androlib.java:192)
        at brut.androlib.Androlib.build(Androlib.java:174)
        at brut.apktool.Main.cmdBuild(Main.java:188)
        at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 7, --target-sdk-version, 16, -F, C:\Users\Aleksi\AppData\Local\Temp\A
PKTOOL1140071533913893449.tmp, -I, C:\Users\Aleksi\apktool\framework\1.apk, -S,
c:\apktool\com.hbo.android.app\res, -M, c:\apktool\com.hbo.android.app\AndroidMa
nifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
        ... 6 more

c:\apktool>
 

samiljan

New member
Dec 26, 2012
1
2
A perhaps easier way is: (tested with version 1.0 of the HBO app)

1. Edit /system/build.prop and make sure that ro.build.tags is something other than test-keys.
2. Remove the Superuser app (and use SuperSU instead)
3. Delete /system/xbin/which (this might make some scripts fail to work, but i doubt it. It is just a symlink to busybox anyways)

These are the three things the checkRoot function is checking. An interesting point is that it uses which to see if it can find su, but even if which can't find it it reports that the device is rooted. Only if the call fails (like when which is missing) is accepts the device.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    So HBO decided to block access to their service as long as you were trying to watch from a rooted device. If I'm gonna pay for the service I want to choose which devices I want to use. Un-rooting is definitely not an option.

    So here's a little guide to avoid the root-check done by the application.
    I've created one and attached it to the post.

    There are some issues with CM10, and some tablets. I'm not a app developer, nor do i know java. Would appreciate if anyone could give a hand with any issues that should come to light.

    *******Guide*********
    First you need a couple of things
    1. Download the latest APKTool and the equlient apktool-install for your preferred OS.
    2. Download SignApk.zip

    3. Extract files to a folder. e.g "c:\Apktool"

    4. Extract "framework-res.apk" from /system/framework/ on your device.
    Place this in the same folder as you extracted the previous files.

    5. Extract the HBO-app using Titanium backup or similar
    Place this in the same folder as you extracted the previous files.

    6. Open CMD and navigate to folder
    Code:
    cd c:\Apktool

    7. Install Framework and give a friendly name to your framework. You might get multiple if you create for different devices. In this case i name it M8
    Code:
    apktool.jar if framework-res.apk m8

    8. Extract the APK with you framework of choice. Use t (tag) to choose
    Code:
    apktool.jar d -t m8 com.hbo.android.app.apk

    9. Edit files
    From the newly extracted folder, open MainActivity.smali in notepad
    com.hbo.android.app\smali\com\hbo\android\app\activity\MainActivity.smali

    10. Find and delete
    Code:
        .line 196
        invoke-virtual {p0}, Lcom/hbo/android/app/activity/MainActivity;->checkRoot()V
    Save the file

    11. Rebuild the application
    Code:
    apktool.jar b com.hbo.android.app com.hbo.android.app.new.apk

    12. Sign the application
    Code:
    signapk.jar certificate.pem key.pk8 com.hbo.android.app.new.apk com.hbo.android.app.new.signed.apk

    Transfer and install app on device
    Clear Dalvik Cache just to be sure.
    Enjoy

    Note. If you get any compiling errors at one time, I cant really help you.
    Go to this thread and ask politely.
    Be sure you have the latest "aapt.exe" from the thread above.
    Also be sure to use the right framework.res.apk for you device. That might also create these errors.

    Please leave a response if its working or not, and what ROM\Device you're using
    :)


    Update:
    HBO v1.1:
    Guide still works and confirmed working on my I9300. Attached file to post

    HBO v1.2:
    Hadn't noticed the latest update.
    Guide still works and confirmed working on my I9300. Attached file to post

    HBO v1.3 Attached



    Confirmed working on:
    S3 i9300 (Omega 34, Stock, UltimaROM, WanamLite), TF101 (Revolver ICS), TF707 (HW overlays enabled), Note II (Stock), Nexus 7 (SmootROM, Stock), G-Box Midnight (Stock), Nexus (Stock)
    2
    A perhaps easier way is: (tested with version 1.0 of the HBO app)

    1. Edit /system/build.prop and make sure that ro.build.tags is something other than test-keys.
    2. Remove the Superuser app (and use SuperSU instead)
    3. Delete /system/xbin/which (this might make some scripts fail to work, but i doubt it. It is just a symlink to busybox anyways)

    These are the three things the checkRoot function is checking. An interesting point is that it uses which to see if it can find su, but even if which can't find it it reports that the device is rooted. Only if the call fails (like when which is missing) is accepts the device.
    2
    HBO v1.2 update.
    Hadn't seen the latest update. New apk is attached to original post.
    2
    @adamhassel
    Did you manage to decompile the apk, to check this? I think I managed, but as I am not a java developer, I couldn't figure out what kind of checks the app does.

    Yes, I decompiled and played around for quite a while. It does many checks, among them permissions checks, app blacklist checks, and more. In the end, it sends a payload (a hash of the different checks) to an HBO server, which then determines if you're allowed to play content. Then the app downloads video player software on the fly, with permissions to play the specific episode you're trying to watch.

    So it is non-trivial to circumvent. Most likely, a signature of the app itself is used to make this hash, which means that as soon as it's been tampered with, thus changing the app signature, the hash check will fail remotely, regardless of the other checks.

    In the end, I gave up.

    The reason it fails, even though you (and I) have all sorts of root hiding stuff going on may be a widevine security thing. My phone has L3 widevine access (as do most custom ROMs), and HBO may require L2 or L1. Use DRM Info from the Play Store to check your level.

    Disclaimer: I am not a smali ninja, so my conclusions may be wrong. But I'm fairly certain this is at least pretty close to what's happening.
    1
    Yeah, getting the new binary without the annoying root check would be nice: I'm still stuck on 1.2 for my Nexus 10 as well.

    Why not just recompile it yourself? Anyway here is a recompiled 1.3 version. :laugh:
    I'm not a developer. Just followed the guide, so if it don't work on your device, try to do it yourself. ;)