[HOWTO] Transparent dialer, custom background for AOSP-lockscreen

scheichuwe

Senior Member
Sep 23, 2009
473
270
0
happy place
I posted some screenshots a long time ago that show a transparent dialer and a custom background for the AOSP-lockscreen.
I’m tired of answering pm’s so for people who are familiar with apktool and xml-editing, here’s what to do.


Custom background for AOSP-lockscreen

Decompile framework-res.apk and open
keyguard_screen_tab_unlock
in res/layout.

In line 2 change
Code:
android:background="#70000000"
to
Code:
android:background="@drawable/default_wallpaper"
In line 15 you can change the position if the sliders if you want. Change
Code:
android:layout_marginBottom="80.0dip"
to
Code:
android:layout_marginBottom="0.0dip"
and you’ll find the sliders at the very bottom of the lockscreen.

Save and close.

Open res/drawable-hdpi(-v4) and delete default_wallpaper.jpg.
Go and find a wallpaper (480 x 800), rename to default_wallpaper.png and copy to res/drawable-hdpi(-v4).

Now recompile framework-res.apk and you’re done.
Be careful with using apktool, you’ll get problems with the latest version so I recommend to use apktool 1.3.1.


Transparent dialer

Decompile DialerTabActivity.apk and open
colors.xml
in res/values.

In line 36 change
Code:
<color name="tw_color002">#ff000000</color>
to
Code:
<color name="tw_color002">#00000000</color>
Save and close.

Open
styles.xml
in res/values.

Change line 3-6
Code:
<style name="DialtactsTheme" parent="@android:style/Theme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
to
Code:
<style name="DialtactsTheme" parent="@android:style/Theme.Wallpaper">
<item name="android:windowBackground">@drawable/call_default_btn_normal</item>
<item name="android:windowNoTitle">true</item>
</style>
Save and close.

Open
dialer_searchdialog_contents.xml
in res/layout.

In lines 7, 9, 12 and 14 change
Code:
android:textColor="@color/tw_color002"
to
Code:
android:textColor="@color/black"
Save and close.

Recompile DialerTabActivty.apk.

These files in res/drawable-hdpi have to be transparent:
call_dial_btn_normal.png
call_dial_btn_normal_h.png
call_dial_edit_btn_normal.png
call_dial_panel_bg.png
call_dial_panel_bg_01.png
call_dial_panel_bg_01_h.png
call_dial_panel_bg_02_h.png

You can now change your background in the dialer by editing/changing
call_default_btn_normal.9.png.

You might want to change the buttons (numbers, video-call,...) as well...

Edit:
found my screenshots...
http://forum.xda-developers.com/showpost.php?p=9428697&postcount=1162
 
Last edited:

BlackDino

Senior Member
Sep 11, 2010
2,007
2,338
0
OP: Any way you could help?
All my builds are failing, am I missing something?

$:smali ***********$ ./apktool b DialerTabActivity/ DialerTabActivity2
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /var/folders/kd/kdNOA0YVGdiaUt9uZypokE+++TI/-Tmp-/APKTOOL6167853566269819461.tmp, -I, /Users/***********/apktool/framework/1.apk, -I, /Users/***********/apktool/framework/2.apk, -S, /Users/***********/smali/DialerTabActivity/res, -M, /Users/***********/smali/DialerTabActivity/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /var/folders/kd/kdNOA0YVGdiaUt9uZypokE+++TI/-Tmp-/APKTOOL6167853566269819461.tmp, -I, /Users/***********/apktool/framework/1.apk, -I, /Users/***********/apktool/framework/2.apk, -S, /Users/***********/smali/DialerTabActivity/res, -M, /Users/***********/smali/DialerTabActivity/AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
Caused by: java.io.IOException: Cannot run program "aapt": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
... 8 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 10 more
I am using framework-res.apk & twframework-res.apk
Am I missing any frameworks?
 
Last edited:

scheichuwe

Senior Member
Sep 23, 2009
473
270
0
happy place
OP: Any way you could help?
All my builds are failing, am I missing something?



I am using framework-res.apk & twframework-res.apk
Am I missing any frameworks?
This one is interesting

...Cannot run program "aapt"...
You need aapt.exe :)

http://code.google.com/p/android-apktool/
Requirements:

JRE 1.6 (Java Runtime Environment)
aapt command in a PATH
basic knowledge of what is SDK, aapt, PATH, smali and Google search engine may be useful
 
  • Like
Reactions: BlackDino

Banger242

Senior Member
Aug 25, 2010
119
24
0
Edmonton
Followed the guide and was able to get a transparent background but only for the top portion. I edited the call_default_btn_normal.9.png to just be transparent. I started to mess with some of the png's and you can see that I made the dialer buttons black rather than transparent. I am guessing I need to leave the png's alone as there are transparent ones in the drawable folders and edit the correct xml's to attain a keyboard like the screen shots from the first post. Any tips on this?

 
  • Like
Reactions: scheichuwe

Banger242

Senior Member
Aug 25, 2010
119
24
0
Edmonton
Did you saved the transparency of the png files while editing? Did you correctly oatch the. 9.pngs after editing? Tis could be the problem.

I just erased the color in PS so there is nothing but the checkered background. Changed Mode to indexed 8/bit, Palette = Exact, Forced = None, Transparency is checked Options= None and saved as png.

Then I used Draw9Patch to draw a single row around the png and save9.

Should I be using an Alpha channel in PS? Sorry for my noobness :(
 

scheichuwe

Senior Member
Sep 23, 2009
473
270
0
happy place
Oh, sorry.
I forgot to mention some pngs that have to be edited :eek:


call_dial_btn_normal.png
call_dial_btn_normal_h.png
call_dial_edit_btn_normal.png
call_dial_panel_bg.png
call_dial_panel_bg_01.png
call_dial_panel_bg_01_h.png
call_dial_panel_bg_02_h.png

I hope that's it...
You'll then have a transparent background.
 
  • Like
Reactions: Banger242

Banger242

Senior Member
Aug 25, 2010
119
24
0
Edmonton
Also had to edit:

call_dial_btn03_normal.png
call_dial_btn01_normal.png
call_dial_btn01_normal_h_.png
call_dial_btn02_normal.png
call_dial_btn02_normal_h_.png
call_dial_btn04_normal_h_.png

Also I believe the dialer_tab_bg.png has to be modifed but I am too tired after night shift. Scheichuwe, thanks for posting this. I am quite enjoying messing around. It looks like you modified a lot of things in your custom dialer screen shot.

 

Banger242

Senior Member
Aug 25, 2010
119
24
0
Edmonton

PIRATA!

Senior Member
Dec 6, 2010
2,714
173
0
I posted some screenshots a long time ago that show a transparent dialer and a custom background for the AOSP-lockscreen.
I’m tired of answering pm’s so for people who are familiar with apktool and xml-editing, here’s what to do.


Custom background for AOSP-lockscreen

Decompile framework-res.apk and open
keyguard_screen_tab_unlock
in res/layout.

In line 2 change
Code:
android:background="#70000000"
to
Code:
android:background="@drawable/default_wallpaper"
In line 15 you can change the position if the sliders if you want. Change
Code:
android:layout_marginBottom="80.0dip"
to
Code:
android:layout_marginBottom="0.0dip"
and you’ll find the sliders at the very bottom of the lockscreen.

Save and close.

Open res/drawable-hdpi(-v4) and delete default_wallpaper.jpg.
Go and find a wallpaper (480 x 800), rename to default_wallpaper.png and copy to res/drawable-hdpi(-v4).

Now recompile framework-res.apk and you’re done.
Be careful with using apktool, you’ll get problems with the latest version so I recommend to use apktool 1.3.1.


Transparent dialer

Decompile DialerTabActivity.apk and open
colors.xml
in res/values.

In line 36 change
Code:
<color name="tw_color002">#ff000000</color>
to
Code:
<color name="tw_color002">#00000000</color>
Save and close.

Open
styles.xml
in res/values.

Change line 3-6
Code:
<style name="DialtactsTheme" parent="@android:style/Theme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
to
Code:
<style name="DialtactsTheme" parent="@android:style/Theme.Wallpaper">
<item name="android:windowBackground">@drawable/call_default_btn_normal</item>
<item name="android:windowNoTitle">true</item>
</style>
Save and close.

Open
dialer_searchdialog_contents.xml
in res/layout.

In lines 7, 9, 12 and 14 change
Code:
android:textColor="@color/tw_color002"
to
Code:
android:textColor="@color/black"
Save and close.

Recompile DialerTabActivty.apk.

These files in res/drawable-hdpi have to be transparent:
call_dial_btn_normal.png
call_dial_btn_normal_h.png
call_dial_edit_btn_normal.png
call_dial_panel_bg.png
call_dial_panel_bg_01.png
call_dial_panel_bg_01_h.png
call_dial_panel_bg_02_h.png

You can now change your background in the dialer by editing/changing
call_default_btn_normal.9.png.

You might want to change the buttons (numbers, video-call,...) as well...

Edit:
found my screenshots...
http://forum.xda-developers.com/showpost.php?p=9428697&postcount=1162
Wow! Finally I found you! I am enjoying a glass dialer, ad I really would like to edit my own one, but with some little variations to avoid lag in scrolling Logs and Favourites.

What are the images involved in the background of the tabs on top? I think I'll put them as default because the livewallpaper I use is dark, and I barely can see it through the trasparent dialerin those tabs.

Is therere a way to have different background images for each tab? I mean that I would like to have trasparento bg for Keypad, and black for Logs and Favourites.

If not, si there any possibility to create a modded image for the Logs and favourites tab when acrive so that they could be so big to have like a big black rectangle hanging underneath them so to get all over the trasparent bg, and so to give black bg underneath the Logs and Favourites scrolling???
I hope you understood.

Thank you.
 

scheichuwe

Senior Member
Sep 23, 2009
473
270
0
happy place
The tabs are in twframework-res.apk and DialerTabActivity.apk.
Look for tw_tab in res/drawable-hdpi(-v4).

No, you can't have different backgrounds for each tab. But just have a look at logs and favorites ;)
 

PIRATA!

Senior Member
Dec 6, 2010
2,714
173
0
The tabs are in twframework-res.apk and DialerTabActivity.apk.
Look for tw_tab in res/drawable-hdpi(-v4).

No, you can't have different backgrounds for each tab. But just have a look at logs and favorites ;)
I don't follow you.
I have already tried and modded several dialers for me own, editing images and looking at the xml files you mention in this topic, but always using the one made from the dialer that I edited (same xml editings mentioned in you thread), but I need to have complete NON trasparent background in logs and farourites because it lags!!
With black backgrond it would not lag!
Is there a way to put a custon image or set a custom color as the background of the focused Logs and Favourites tabs?
I was thinking at something not square, but big so to go even under the listings under the tabs...
Otherwise inver the things: all black but custom image (dark trasparent grey) for Keypad so to have it trasparent.
 
Last edited: