[DISCUSS] General Questions/Problems with Theming

decalex

Senior Member
Apr 21, 2009
3,101
1,441
0
Boston, MA
Hey Sonny (or anyone else).
I've done a bit of themeing in the past-- have bounced between APKManager4.9 and 4.7, whichever happens to be working atm. I seem to run into this problem often (error posted below).

In this instance, I was trying to decompile the latest Dropbox version. Downloaded from market, pulled from /data/app/ -- I know not to make any modifications to anything before decompiling.
So, this attempt was on the untouched version from the market.

Any ideas?


Code:
--------------------------------------------------------------------------
|Fri 05/27/2011 -- 10:49:21.81|
--------------------------------------------------------------------------
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
Could Not Find C:\SDK\APKManager49\place-apk-here-for-modding\../place-apk-here-
for-modding/signedsignedDropbox-1.1.1-Ver.2.apk
Could Not Find C:\SDK\APKManager49\place-apk-here-for-modding\../place-apk-here-
for-modding/unsignedsignedDropbox-1.1.1-Ver.2.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\AlexR\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
hardwareAccelerated, value=0xffffffff
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x010102d3
        at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
        at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
        at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
        at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
        at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknow
n Source)
        at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(Unknown Source)
        at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(Unknown Source)
        at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unkno
wn Source)
        at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)

        at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown So
urce)
        at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
        at brut.androlib.res.AndrolibResources.decode(Unknown Source)
        at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
        at brut.androlib.ApkDecoder.decode(Unknown Source)
        at brut.apktool.Main.cmdDecode(Unknown Source)
        at brut.apktool.Main.main(Unknown Source)
Press any key to continue . . .
 

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
Hey Sonny (or anyone else).
I've done a bit of themeing in the past-- have bounced between APKManager4.9 and 4.7, whichever happens to be working atm. I seem to run into this problem often (error posted below).

In this instance, I was trying to decompile the latest Dropbox version. Downloaded from market, pulled from /data/app/ -- I know not to make any modifications to anything before decompiling.
So, this attempt was on the untouched version from the market.

Any ideas?
Hey, can you try Apkmanager 4.9 with the Apktool posted on the post above yours. That is the magic combo that works for me everytime :).
 

decalex

Senior Member
Apr 21, 2009
3,101
1,441
0
Boston, MA
Hmm. it still errors, but it does seem to decompile. It worked to compile as a system apk, and same with signing (copying over files). I just installed it to /data/ and it apparently worked fine. .. so, now to the modding!!

Thanks Sonny -- is it common to get errors when you're putting together apks? I don't usually.
 
Last edited:

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
Hmm. it still errors, but it does seem to decompile. It worked to compile as a system apk, and same with signing (copying over files). I just installed it to /data/ and it apparently worked fine. .. so, now to the modding!!

Thanks Sonny -- is it common to get errors when you're putting together apks? I don't usually.
I sometimes get errors when using Apktool 1.3.2 (the one that comes default with Apkmanager 4.9).
 

decalex

Senior Member
Apr 21, 2009
3,101
1,441
0
Boston, MA
If I upload a zip (dropbox app) of the uncompiled stuff, anyone willing to compile and sign (if needed) for me to test it? killin me.
lol, dropbox just updated to newer version too.
 

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
Thanks man. it may look like craps, btw.. obv haven't had to check out the color mix. ;) Attached is just a zip of the modded 'project' folder -- only xml edits done. Once compiled, I'll drop in modded pngs.

So appreciated
The recompilation resulted in an error. Just upload a fresh apk and tell me what edits you want to make in the xmls.
 
  • Like
Reactions: decalex

decalex

Senior Member
Apr 21, 2009
3,101
1,441
0
Boston, MA
The recompilation resulted in an error. Just upload a fresh apk and tell me what edits you want to make in the xmls.
Man, thx so much. I'll buy one of your themes for this :)

Attached untouched apk

AndroidManifest.xml
Replace Theme.Light with Theme.Black


res/values/colors.xml (hopefully just copy and paste-- all besides colors should be the same)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
    <color name="whiteBackground">#ff000000</color>
    <color name="blueBackground">#ff990000</color>
    <color name="dialogBoxTitleBackground">#aa000000</color>
    <color name="blackBackground">#ff000000</color>
    <color name="buttonHighlight">#ffde0000</color>
    <color name="textFieldStroke">#ffff0000</color>
    <color name="filelistBackground">#ff000000</color>
    <color name="fileTextSmall">#ffe6e6e6</color>
    <color name="fileTextName">#ffffffff</color>
    <color name="fileTextDisabled">#ffe6e6e6</color>
    <color name="textHighlight">#ffde0000</color>
    <color name="textDisable">#ffe6e6e6</color>
    <color name="text">#ff000000</color>
    <color name="loginText">#ffffffff</color>
    <color name="loginButtonText">#ff000000</color>
    <color name="settingsHeaderBackground">#ffde0000</color>
    <color name="settingsHeaderForeground">#ff000000</color>
    <color name="settingsDimmedText">#ffe6e6e6</color>
    <color name="settingsRegularText">#ffffffff</color>
    <color name="tourBackground">#ff9c0000</color>
    <color name="tourText">#ffde0000</color>
</resources>
And.. I think that's it! (besides the drawables later...)
 

Attachments

decalex

Senior Member
Apr 21, 2009
3,101
1,441
0
Boston, MA
Gotchya - glad its not just me :) I've picked apart some of the theme Chooser apks, but haven't built one myself. I'll definitely check it out.

. . NS4G . . CM7 . .
 

decalex

Senior Member
Apr 21, 2009
3,101
1,441
0
Boston, MA
Hey, I just tried it. It doesn't recompile with any of my Apkmanager/Apktool versions.

Another alternative is to add the desired changes in a CM7 Theme Chooser apk.
Hey Sonny -- so I'm trying your alternative approach, making the dropbox changes in the CM7 Theme Chooser. I'm currently using your Vivid theme from the market.

I have your Self-Theming Vivid.zip, and following the Guide you posted on compiling theme chooser apks. But doesn't this process still involve decompiling the dropbox app, making the xml changes (above, to colors.xml and android manifest), then recompiling? -- the part that's giving me errors. Or were you talking about another method?
Thx again for your help! :)
 

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
Hey Sonny -- so I'm trying your alternative approach, making the dropbox changes in the CM7 Theme Chooser. I'm currently using your Vivid theme from the market.

I have your Self-Theming Vivid.zip, and following the Guide you posted on compiling theme chooser apks. But doesn't this process still involve decompiling the dropbox app, making the xml changes (above, to colors.xml and android manifest), then recompiling? -- the part that's giving me errors. Or were you talking about another method?
Thx again for your help! :)
That guide is only for flashable themes, for theme chooser themes, follow this guide:

http://forum.xda-developers.com/showthread.php?t=964391
 
  • Like
Reactions: decalex

sonnysekhon

Recognized Themer
Aug 15, 2010
4,166
5,479
0
Vancouver
k.. feel like I'm making progress here..
The part where I'm stuck is, how to incorporate an app's AndroidManifest.xml > "Theme.Light" to "Theme.Black" in the theme chooser xml.

I don't want to repost the whole thing, but here's the question I asked in the theme chooser guide section:

http://forum.xda-developers.com/showpost.php?p=14388550&postcount=414
In res/xml/com_dropbox_android.xml:
instead of using:

Code:
<color name="whiteBackground">#ff000000</color>
<color name="blueBackground">#ff990000</color>
use

Code:
<item name="color/whiteBackground">@color/whiteBackground</item>
<item name="color/blueBackground">@color/blueBackground</item>
Also, I am almost certain that you can't declare anything from the Manifest. Try experimenting with styles instead.