[Shield Android TV Q&A, Help & Troubleshooting] saulin78:
JJ-KwiK which tool or which commands are You using to decompile and recompile the apk?

I keep getting an error when recompiling with apktool after I made my modifications with Notepad++

I usually don't have issues with other apps. That's why I'd like to know what you are using to decompile, recompile and sign the apk

I think we can remove 3 checks if we bypass these checks. If anyone wants to do these and also remove the Amazon Store Check from the latest FireTV version maybe we can get a working version for the Shield.

in ---> \smali\com\comscore\applications\AppStartMeasurement.smali

invoke-static {}, Lcom/comscore/utils/RootDetector;->isDeviceRooted()Z

move-result v1

if-eqz v1, :cond_1

In ---> \smali\com\insidesecure\drmagent\v2\internal\DRMAgentNativeBridge.smali
invoke-static {}, Lcom/comscore/utils/RootDetector;->a()Z

move-result v1

if-eqz v1, :cond_1

In ---> \smali\com\comscore\analytics\Census.smali
invoke-virtual {v1}, Lcom/comscore/analytics/Core;->isSecure()Z

move-result v0

if-eqz v0, :cond_2

In ---> smali\com\comscore\analytics\comScore.smali
invoke-virtual {p0}, Lcom/comscore/analytics/Core;->isSecure()Z

move-result v0

if-eqz v0, :cond_1

In ---> \smali\com\comscore\utils\OfflineMeasurementsCache.smali
invoke-virtual {v0}, Lcom/comscore/analytics/Core;->isSecure()Z

move-result v0

if-eqz v0, :cond_5

There is also the check that throws an error if outside USA even behind a VPN. But I'd like to know if bypassing these checks help

This is what I get with apktool when recompiling

C:\Users\Vero>C:\apk2tv1.1\apktool b C:\apk2tv1.1\temp
I: Using Apktool 2.2.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether resources has changed...
I: Building resources...
W: C:\apk2tv1.1\temp\res\layout\preference_list_fragment.xml:4: error: Error: Re
source is not public. (at 'id' with value '@android:id/menu').
W:
W: C:\apk2tv1.1\temp\res\layout\preference_widget_switch.xml:2: error: Error: Re
source is not public. (at 'id' with value '@android:id/right_icon').
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec (exit code = 1): [C:\User
s\Vero\AppData\Local\Temp\brut_util_Jar_8423560757252002085.tmp, p, --forced-pac
kage-id, 127, --min-sdk-version, 19, --target-sdk-version, 24, --version-code, 1
0002106, --version-name, 1.0.0.2106, -F, C:\Users\Vero\AppData\Local\Temp\APKTOO
L8970358793249648231.tmp, -0, arsc, -0, res/raw/quickplay_authentec_opl150_pr_ce
rt, -0, res/raw/quickplay_authentec_opl150_pr_privatekey, -0, res/raw/quickplay_
authentec_opl150_wm_cert, -0, res/raw/quickplay_authentec_opl150_wm_privatekey,
-0, res/raw/quickplay_authentec_opl2000_pr_cert, -0, res/raw/quickplay_authentec
_opl2000_pr_privatekey, -0, res/raw/quickplay_authentec_opl2000_wm_cert, -0, res
/raw/quickplay_authentec_opl2000_wm_privatekey, -0, res/raw/quickplay_authentec_
opl400_pr_cert, -0, res/raw/quickplay_authentec_opl400_pr_privatekey, -0, res/ra
w/quickplay_authentec_opl400_wm_cert, -0, res/raw/quickplay_authentec_opl400_wm_
privatekey, -0, arsc, -I, C:\Users\Vero\AppData\Local\apktool\framework\1.apk, -
S, C:\apk2tv1.1\temp\res, -M, C:\apk2tv1.1\temp\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:473)
at brut.androlib.Androlib.buildResources(Androlib.java:407)
at brut.androlib.Androlib.build(Androlib.java:306)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec (exit code = 1): [C:\Users\Vero\AppData\Local\Temp\brut_util_Jar_842356075
7252002085.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk
-version, 24, --version-code, 10002106, --version-name, 1.0.0.2106, -F, C:\Users
\Vero\AppData\Local\Temp\APKTOOL8970358793249648231.tmp, -0, arsc, -0, res/raw/q
uickplay_authentec_opl150_pr_cert, -0, res/raw/quickplay_authentec_opl150_pr_pri
vatekey, -0, res/raw/quickplay_authentec_opl150_wm_cert, -0, res/raw/quickplay_a
uthentec_opl150_wm_privatekey, -0, res/raw/quickplay_authentec_opl2000_pr_cert,
-0, res/raw/quickplay_authentec_opl2000_pr_privatekey, -0, res/raw/quickplay_aut
hentec_opl2000_wm_cert, -0, res/raw/quickplay_authentec_opl2000_wm_privatekey, -
0, res/raw/quickplay_authentec_opl400_pr_cert, -0, res/raw/quickplay_authentec_o
pl400_pr_privatekey, -0, res/raw/quickplay_authentec_opl400_wm_cert, -0, res/raw
/quickplay_authentec_opl400_wm_privatekey, -0, arsc, -I, C:\Users\Vero\AppData\L
ocal\apktool\framework\1.apk, -S, C:\apk2tv1.1\temp\res, -M, C:\apk2tv1.1\temp\A
ndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:439)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:459)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\
Vero\AppData\Local\Temp\brut_util_Jar_8423560757252002085.tmp, p, --forced-packa
ge-id, 127, --min-sdk-version, 19, --target-sdk-version, 24, --version-code, 100
02106, --version-name, 1.0.0.2106, -F, C:\Users\Vero\AppData\Local\Temp\APKTOOL8
970358793249648231.tmp, -0, arsc, -0, res/raw/quickplay_authentec_opl150_pr_cert
, -0, res/raw/quickplay_authentec_opl150_pr_privatekey, -0, res/raw/quickplay_au
thentec_opl150_wm_cert, -0, res/raw/quickplay_authentec_opl150_wm_privatekey, -0
, res/raw/quickplay_authentec_opl2000_pr_cert, -0, res/raw/quickplay_authentec_o
pl2000_pr_privatekey, -0, res/raw/quickplay_authentec_opl2000_wm_cert, -0, res/r
aw/quickplay_authentec_opl2000_wm_privatekey, -0, res/raw/quickplay_authentec_op
l400_pr_cert, -0, res/raw/quickplay_authentec_opl400_pr_privatekey, -0, res/raw/
quickplay_authentec_opl400_wm_cert, -0, res/raw/quickplay_authentec_opl400_wm_pr
ivatekey, -0, arsc, -I, C:\Users\Vero\AppData\Local\apktool\framework\1.apk, -S,
C:\apk2tv1.1\temp\res, -M, C:\apk2tv1.1\temp\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:433)
... 6 more

Basically if we can patch the app to let it know that the device is secure and not rooted it might work. This is how I patched the AT&T U-Verse app and I can stream with it on the Nvidia Shield Android TV