[HTC EVO 3D] tommytomatoe:
Hey gang!

My first Evo 3d thread started. hehe. I had a couple users ask me how this is done and this is how in a few simple steps!

This will not be a comprehensive how-to for apktool and/or android-utility. There are many many guides! Consult here for awesome advice!

For this to work, you need these tools:

apktool by Brut.all

Alternately, you can use Android Utility by yours truly (for Mac OS X and Linux)

Java JRE and JDK (for apktool to work)

Text Editor (Bluefish or Gedit on Linux works wonders, TextWrangler on Mac OS X, Unsure for Windows)

A bit of Knowledge on android references to styles and framework

That should be it!​

First, acquire those tools above.

Second, acquire frameworks-res.apk and com.htc.resources.apk from your ROM (either adb pull or simply from the rom.zip you downloaded)

Third, for our intents and purposes, I will be working from a directory on the Desktop called SettingsCustom. So place all three files into that directory.

Fourth, let's get down to the commands for dissembling the apk:

cd $HOME/Desktop/SettingsCustom

# the following "for" command is a one-liner, just copy and paste entire command into terminal
# hint, to copy and paste inside terminal, use CTRL+SHIFT+C and CTRL+SHIFT+V

for a in framework-res.apk com.htc.resources.apk ; do apktool if $a custom ; done

apktool d -t custom Settings.apk Settings

Fifth, I will list the files you need to edit and what to do add to them one by one. This is for setting a custom transparency but not a custom background. It will use the current wallpaper.

Settings/AndroidManifest.xml:

ORIGINAL:

<application android:theme="@style/Theme" android:label="@string/settings_label" android:icon="@com.htc:drawable/common_app_ic_launcher_settings" android:taskAffinity="" allowSkinChange="false" pluto:isThemeable="true">

CHANGE TO:

<application android:theme="@style/Theme.Custom" android:label="@string/settings_label" android:icon="@com.htc:drawable/common_app_ic_launcher_settings" android:taskAffinity="" allowSkinChange="false" pluto:isThemeable="true">

Settings/res/values/colors.xml:

ADD LINE:

<color name="classic_transparent">#7f111111</color>

Keep in mind for this one you can make the transperancy whaever you choose! 00 is full transperancy and 7f is roughly 50%. I like 50%.​

Settings/res/values/styles.xml:

FIND:

<style name="Theme">
<item name="htcPreferenceStyle">@style/HtcIconPreference</item>
<item name="htcCheckBoxPreferenceStyle">@style/HtcIconPreference.HtcCheckBoxPreference</item>
</style>

ADD DIRECTLY UNDER:

<style name="Theme.Custom" parent="@android:style/Theme">
<item name="android:windowBackground">@color/classic_transparent</item>
<item name="android:windowShowWallpaper">true</item>
<item name="android:colorBackgroundCacheHint">@null</item>
</style>

Keep in mind it you can technically paste that chunk anywhere but it is cleaner code-wise to keep like snippets close togther.​

Settings/res/values-hdpi/styles.xml:

ADD TO BOTTOM OF FILE [before </resources>]:

<style name="Theme.Custom" parent="@android:style/Theme">
<item name="android:windowBackground">@color/classic_transparent</item>
<item name="android:windowShowWallpaper">true</item>
<item name="android:colorBackgroundCacheHint">@null</item>
</style>

Sixth, the following is what you need to do to add a custom background instead of having to use the wallpaper:

Hang tight. Coming later. This is rather easy but I want to make sure I have the best way possible​

I really hope this helps you some! If you know of a more efficient way to do this let me know. I know that you can just reference the styles Theme.Wallpaper from framework-res but that is tricky because you cannot set a custom transparency without having to edit framework-res.apk as well. This way, all of your work is localized inside Settings.apk.

This is for Sense based Settings.apk. I am pretty certain AOSP will be different.

Enjoy the possibilities...

Tommy Nguyen

​