FORUMS

[GUIDE] How to get Transparent App Drawer [Launcher2.apk or Trebuchet.apk]

6,521 posts
Thanks Meter: 26,738
 
By wesamothman, Recognized Contributor on 22nd December 2012, 08:48 PM
Post Reply Email Thread
Hi Guys,

I have been asked many times how I was able to do transparent app drawer.

Description:
Transparent app drawer by definition means you can see the homescreen wallpaper whilst in app drawer instead of the default black background.

Tools needed:
1) apktool
2) notepad++
3) 7zip

Files needed: (Depending on ROM type)
1) trebuchet.apk, or
2) Launcher2.apk

Steps [HOW TO]:

1) decompile trebuchet.apk or Launcher2.apk
2) go to \res\layout\apps_customize_pane.xml
replace android:background="#ff000000" with android:background="#00000000"
There are two instances in this file.
3) now SMALI CODE.
go to
\smali\com\cyanogenmod\trebuchet\
or
smali\com\android\launcher2\
4) open Launcher.smali and delete the following method: updateWallpaperVisibility
Also delete all its references in Launcher.smali and other smali files. Usually this method is referenced in Launcher$13.smali and Launcher$17.smali and AppsCustomizePagedView.smali

However, it could be different from file to file depending on how it was built from source. Therefore, to know the file names exactly, just use notepad++ and use Search in Files feature and search for updateWallpaperVisibility in the decompiled apk samli folder. It will tell you where this method is referenced.

Example of Smali:
Delete all this method starting from .method to .end mothod.
This code is in Launcher.smali.
Quote:

.method updateWallpaperVisibility(Z)V
.locals 3
.parameter

.prologue
const/high16 v1, 0x10

.line 2322
if-eqz p1, :cond_1

move v0, v1

.line 2323
:goto_0
invoke-virtual {p0}, Lcom/android/launcher2/Launcher;->getWindow()Landroid/view/Window;

move-result-object v2

invoke-virtual {v2}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

move-result-object v2

iget v2, v2, Landroid/view/WindowManager$LayoutParams;->flags:I

and-int/2addr v2, v1

.line 2325
if-eq v0, v2, :cond_0

.line 2326
invoke-virtual {p0}, Lcom/android/launcher2/Launcher;->getWindow()Landroid/view/Window;

move-result-object v2

invoke-virtual {v2, v0, v1}, Landroid/view/Window;->setFlags(II)V

.line 2328
:cond_0
return-void

.line 2322
:cond_1
const/4 v0, 0x0

goto :goto_0
.end method

Having done this deletion, use notepad++ to search for updateWallpaperVisibility
Use fine in files function in Notepadd++, it will tell you exactly where this method is referenced. Then delete all the lines containing this method reference.

Example:
Quote:

invoke-virtual {p0, v0}, Lcom/android/launcher2/Launcher;->updateWallpaperVisibility(Z)V

so, you have to delete the above line completely, and also any lines in all smali files containing "updateWallpaperVisibility"

After deleting the method and all of its references, just compile the apk and make your flashsable zip.

I use APKTOOL and 7zip for that.

Example:

Before:



After:



Enjoy
The Following 50 Users Say Thank You to wesamothman For This Useful Post: [ View ] Gift wesamothman Ad-Free
23rd December 2012, 11:25 AM |#2  
Superman's Avatar
Senior Member
Thanks Meter: 182
 
More
Quote:
Originally Posted by wesamothman

Hi Guys,

I have been asked many times how I was able to do transparent app drawer.

Description:
Transparent app drawer by definition means you can see the homescreen wallpaper whilst in app drawer instead of the default black background.

Tools needed:
1) apktool
2) notepad++
3) 7zip

Files needed: (Depending on ROM type)
1) trebuchet.apk, or
2) Launcher2.apk

Steps [HOW TO]:

1) decompile trebuchet.apk or Launcher2.apk
2) go to \res\layout\apps_customize_pane.xml
replace android:background="#ff000000" with android:background="#00000000"
There are two instances in this file.
3) now SMALI CODE.
go to
\smali\com\cyanogenmod\trebuchet\
or
smali\com\android\launcher2\
4) open Launcher.smali and delete the following method: updateWallpaperVisibility
Also delete all its references in Launcher.smali and other smali files. Usually this method is referenced in Launcher$13.smali and Launcher$17.smali and AppsCustomizePagedView.smali

However, it could be different from file to file depending on how it was built from source. Therefore, to know the file names exactly, just use notepad++ and use Search in Files feature and search for updateWallpaperVisibility in the decompiled apk samli folder. It will tell you where this method is referenced.

After deleting the method and all of its references, just compile the apk and make your flashsable zip.

I use APKTOOL and 7zip for that.

Example:

Before:



After:



Enjoy



Superman™

---------- Post added at 07:25 PM ---------- Previous post was at 07:24 PM ----------

THis is nice

Superman™
The Following 2 Users Say Thank You to Superman For This Useful Post: [ View ] Gift Superman Ad-Free
13th January 2013, 05:43 PM |#3  
Member
Flag Marseille
Thanks Meter: 12
 
More
Thumbs up Simple, usefull
Thanks for the tutorial, this really helped me, that's my first time modding.
I was looking for a transparent app drawer since i turn on my phone for the very first time.
THANK YOU
From france.
19th January 2013, 03:36 AM |#4  
bfo12's Avatar
Member
Thanks Meter: 12
 
More
Quote:

4) open Launcher.smali and delete the following method: updateWallpaperVisibility
Also delete all its references in Launcher.smali and other smali files. Usually this method is referenced in Launcher$13.smali and Launcher$17.smali and AppsCustomizePagedView.smali

However, it could be different from file to file depending on how it was built from source. Therefore, to know the file names exactly, just use notepad++ and use Search in Files feature and search for updateWallpaperVisibility in the decompiled apk samli folder. It will tell you where this method is referenced.

This confused me but i figured it out so i thought i might share incase others get confused as well.
To delete the method look in the Launcher.smali for a line that says ".method updateWallpaperVisibility" , delete everything after that until you get to ".end method" (make sure you delete the ".method updateWallpaperVisibility" and ".end method" line as well), to delete the references find each line that has "updateWallpaperVisibility" (using the "find in files" function in notepad++ as stated in OP) and delete the WHOLE LINE. after that recompile and sign the apk and put it into your phone
19th January 2013, 11:20 AM |#5  
wesamothman's Avatar
OP Recognized Contributor
Flag Dallas - TX
Thanks Meter: 26,738
 
Donate to Me
More
Re: [GUIDE] How to get Transparent App Drawer [Launcher2.apk or Trebuchet.apk]
Quote:
Originally Posted by bfo12

This confused me but i figured it out so i thought i might share incase others get confused as well.
To delete the method look in the Launcher.smali for a line that says ".method updateWallpaperVisibility" , delete everything after that until you get to ".end method" (make sure you delete the ".method updateWallpaperVisibility" and ".end method" line as well), to delete the references find each line that has "updateWallpaperVisibility" (using the "find in files" function in notepad++ as stated in OP) and delete the WHOLE LINE. after that recompile and sign the apk and put it into your phone

Deleting a method implicitly means all of it. From function header .method until .end.
I am glad you managed.

--------------------------------------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO
The Following User Says Thank You to wesamothman For This Useful Post: [ View ] Gift wesamothman Ad-Free
27th January 2013, 10:24 PM |#6  
Senior Member
Thanks Meter: 14
 
More
Hey, I don't get it at all, what to do here, is this windows os or android os :S (sry for my unknowledge :/ ) , and also don't get why would I need to use a laucher.apk when I already have a launcher on my CM9, I mean I just don't get it, do I modify the apk and then install it ? :/ Could you explain it to a beginner (who knows how to flash and root ) ?
28th January 2013, 08:56 AM |#7  
wesamothman's Avatar
OP Recognized Contributor
Flag Dallas - TX
Thanks Meter: 26,738
 
Donate to Me
More
Re: [GUIDE] How to get Transparent App Drawer [Launcher2.apk or Trebuchet.apk]
Quote:
Originally Posted by CroVeXx

Hey, I don't get it at all, what to do here, is this windows os or android os :S (sry for my unknowledge :/ ) , and also don't get why would I need to use a laucher.apk when I already have a launcher on my CM9, I mean I just don't get it, do I modify the apk and then install it ? :/ Could you explain it to a beginner (who knows how to flash and root ) ?

-APK is android related.
-CM roms use trebuchet.apk while aokp uses launcher2.apk. modding way is the same for both. So you pick up the apk related to your rom type.
-then you follow the guide and make a flashable zip to install from recovery.


--------------------------------------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO
The Following 2 Users Say Thank You to wesamothman For This Useful Post: [ View ] Gift wesamothman Ad-Free
12th February 2013, 04:18 PM |#8  
Member
Flag Madrid
Thanks Meter: 5
 
More
link to Trebuchet.apk
Quote:
Originally Posted by wesamothman

Hi Guys,

I have been asked many times how I was able to do transparent app drawer.

Description:
Transparent app drawer by definition means you can see the homescreen wallpaper whilst in app drawer instead of the default black background.

Tools needed:
1) apktool
2) notepad++
3) 7zip

Files needed: (Depending on ROM type)
1) trebuchet.apk, or
2) Launcher2.apk

Steps [HOW TO]:

1) decompile trebuchet.apk or Launcher2.apk
2) go to \res\layout\apps_customize_pane.xml
replace android:background="#ff000000" with android:background="#00000000"
There are two instances in this file.
3) now SMALI CODE.
go to
\smali\com\cyanogenmod\trebuchet\
or
smali\com\android\launcher2\
4) open Launcher.smali and delete the following method: updateWallpaperVisibility
Also delete all its references in Launcher.smali and other smali files. Usually this method is referenced in Launcher$13.smali and Launcher$17.smali and AppsCustomizePagedView.smali

However, it could be different from file to file depending on how it was built from source. Therefore, to know the file names exactly, just use notepad++ and use Search in Files feature and search for updateWallpaperVisibility in the decompiled apk samli folder. It will tell you where this method is referenced.

After deleting the method and all of its references, just compile the apk and make your flashsable zip.

I use APKTOOL and 7zip for that.

Example:

Before:



After:



Enjoy

Could you please paste a link to download original Trebuchet.apk, so that we can work on it? Thanks!
12th February 2013, 04:52 PM |#9  
wesamothman's Avatar
OP Recognized Contributor
Flag Dallas - TX
Thanks Meter: 26,738
 
Donate to Me
More
Re: [GUIDE] How to get Transparent App Drawer [Launcher2.apk or Trebuchet.apk]
Quote:
Originally Posted by jago84

Could you please paste a link to download original Trebuchet.apk, so that we can work on it? Thanks!

The original trebuchet.apk differs from rom to rom on how it was built from source. But you can get it from cm10. It is default launcher in cm10.
If you use another trebuchet from another rom of a different device, it might not work with your device.

--------------------------------------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO
The Following 2 Users Say Thank You to wesamothman For This Useful Post: [ View ] Gift wesamothman Ad-Free
16th February 2013, 06:18 PM |#10  
gpvecchi's Avatar
Senior Member
Flag 44°43'25.35"N 10°23'55.72"E
Thanks Meter: 391
 
More
I get an error rebuilding apk: integer types not allowed, referred to the 00000000 value of background color...
16th February 2013, 06:46 PM |#11  
wesamothman's Avatar
OP Recognized Contributor
Flag Dallas - TX
Thanks Meter: 26,738
 
Donate to Me
More
Re: [GUIDE] How to get Transparent App Drawer [Launcher2.apk or Trebuchet.apk]
Quote:
Originally Posted by gpvecchi

I get an error rebuilding apk: integer types not allowed, referred to the 00000000 value of background color...

This error comes if your aapt of your apktool is not referring to the correct framework. So you have to get the framework apk file from the same rom where you got the launcher or trebuchet and install it in apktool first
Apktool -f framework-res.apk and then decomplile and do your changes and then build it.

-------------------------
Omega's Team Member
-------------------------
Devices:
---------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO

The Following 2 Users Say Thank You to wesamothman For This Useful Post: [ View ] Gift wesamothman Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes