[Nexus 5 Themes and Apps] Wrapp:
Thanks again for the HowTo.

I successfully compiled framework-res. Just 2 comments to the HowTo as david 279 pointed out:

--it should be 'apktool b framework-res' instead of 'apktool b framework-res.apk'

--do we have to delete res/values-watch?

I followed the steps but ran into problems compiling systemui:

c:\tmp\Ambient2>apktool b systemui

I: Using Apktool 2.0.0-dirty on systemui

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

c:\tmp\Ambient2\systemui\res\values\styles.xml:35: error: Error retrieving paren

t for item: No resource found that matches the given name '@android:style/TextAp

pearance.StatusBar'.

c:\tmp\Ambient2\systemui\res\values\styles.xml:36: error: Error retrieving paren

t for item: No resource found that matches the given name '@android:style/TextAp

pearance.StatusBar'.

c:\tmp\Ambient2\systemui\res\values\styles.xml:41: error: Error retrieving paren

t for item: No resource found that matches the given name '@android:style/TextAp

pearance.StatusBar'.

c:\tmp\Ambient2\systemui\res\values\styles.xml:51: error: Error retrieving paren

t for item: No resource found that matches the given name '@android:style/TextAp

pearance.StatusBar'.

c:\tmp\Ambient2\systemui\res\values\styles.xml:151: error: Error retrieving pare

nt for item: No resource found that matches the given name '@android:style/TextA

ppearance.StatusBar.Ticker'.

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl

ibException: brut.common.BrutException: could not exec command: [C:\Users\TAS

~1.OER\AppData\Local\Temp\brut_util_Jar_3412160872090246521.tmp, p, --forced-pac

kage-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 2

1, --version-name, 5.0-1570415, -F, C:\Users\THOMAS~1.OER\AppData\Local\Temp\APK

TOOL1552775608318957639.tmp, -0, arsc, -I, C:\Users\tas.oer\apktool\frame

work\1.apk, -S, c:\tmp\Ambient2\systemui\res, -M, c:\tmp\Ambient2\systemui\Andro

idManifest.xml]

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:449)

at brut.androlib.Androlib.buildResources(Androlib.java:383)

at brut.androlib.Androlib.build(Androlib.java:286)

at brut.androlib.Androlib.build(Androlib.java:258)

at brut.apktool.Main.cmdBuild(Main.java:240)

at brut.apktool.Main.main(Main.java:89)

Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not

exec command: [C:\Users\THOMAS~1.OER\AppData\Local\Temp\brut_util_Jar_341216087

2090246521.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk

-version, 21, --version-code, 21, --version-name, 5.0-1570415, -F, C:\Users\THOM

AS~1.OER\AppData\Local\Temp\APKTOOL1552775608318957639.tmp, -0, arsc, -I, C:\Use

rs\tas.oer\apktool\framework\1.apk, -S, c:\tmp\Ambient2\systemui\res, -M,

c:\tmp\Ambient2\systemui\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav

a:487)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:434)

... 5 more

Caused by: brut.common.BrutException: could not exec command: [C:\Users\TAS.OER\AppData\Local\Temp\brut_util_Jar_3412160872090246521.tmp, p, --forced-packa

ge-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21,

--version-name, 5.0-1570415, -F, C:\Users\TAS.OER\AppData\Local\Temp\APKTO

OL1552775608318957639.tmp, -0, arsc, -I, C:\Users\thomas.oerther\apktool\framewo

rk\1.apk, -S, c:\tmp\Ambient2\systemui\res, -M, c:\tmp\Ambient2\systemui\Android

Manifest.xml]

at brut.util.OS.exec(OS.java:89)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav

a:481)

... 6 more

Edit: Solved the SystemUI compile problem. Framework-res must be installed first with the command 'apktool if Framework-res.apk' before the SystemUI.apk is modified.

Thanks again for all the help and the nice HowTo!