[Guide]Move lidroid toggles freely - Galaxy Y Duos S6102 Android Development

First this is not my work. original thread http://forum.xda-developers.com/showthread.php?t=1952943
credits
@dcsms original poster
@samsoul16 the one i pulledout the codes from his mod
Steps
1.decompile systemUI.apk
2. go to public.xml... find the last id and add one more... in my case the last id is 0x7f090028 ....and then i add one id with name="lidroid" id="0x7f090029"
3. then open ids.xml and add new id name lidroid and give
it false value.
4. open statusbarservice.smali paste these code below #instance fields
Code:
.field powerwidget:Landroid/widget/LinearLayout;
5. on the statusbarservice.smali ...go to .line 334 and paste this below thoose group's line
Code:
.line 335
const v26, 0x7f090029 //these id must define in public.xml and ids.xml also
move-object v0, v10
move/from16 v1, v26
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v26
check-cast v26, Landroid/widget/LinearLayout;
move-object/from16 v0, v26
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/statusbar/StatusBarService;->powerwidget:Landroid/widget/LinearLayout;
6. then search for .line 418 and make it look like this
Code:
.line 418
.local v12, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v12}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->powerwidget:Landroid/widget/LinearLayout;
move-object/from16 v26, v0
const/16 v27, 0x0
move-object/from16 v0, v26
move-object v1, v12
move/from16 v2, v27
invoke-virtual {v0, v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
7.then on statusbar_expanded.xml and statusbar_expanded_dual_sim.xml. paste this in the place u want
Code:
<LinearLayout android:orientation="vertical" android:id="@id/lidroid" android:layout_width="fill_parent" android:layout_height="wrap_content" />
then recompile apk and push
this have been tested and worked on galaxy y duos and y pro duos
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
any questions ????

Oh...I was going to post it ... anyway nice guide.....i used @PineappleOwl's SystemUI to move lidroid

Himan Boro said:
Oh...I was going to post it ... anyway nice guide.....i used @PineappleOwl's SystemUI to move lidroid
Click to expand...
Click to collapse
I posted it before u
I would appreciate if u hit thanks.
Sent from my GT-B5512 using Carbon rom

acermedo said:
I posted it before u
I would appreciate if u hit thanks.
Sent from my GT-B5512 using Carbon rom
Click to expand...
Click to collapse
earn thnkx bro..dnt ask it lioe tht

acermedo said:
First this is not my work. original thread http://forum.xda-developers.com/showthread.php?t=1952943
credits
@dcsms original poster
@samsoul16 the one i pulledout the codes from his mod
Steps
1.decompile systemUI.apk
2. go to public.xml... find the last id and add one more... in my case the last id is 0x7f090028 ....and then i add one id with name="lidroid" id="0x7f090029"
3. then open ids.xml and add new id name lidroid and give
it false value.
4. open statusbarservice.smali paste these code below #instance fields
Code:
.field powerwidget:Landroid/widget/LinearLayout;
5. on the statusbarservice.smali ...go to .line 334 and paste this below thoose group's line
Code:
.line 335
const v26, 0x7f090029 //these id must define in public.xml and ids.xml also
move-object v0, v10
move/from16 v1, v26
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v26
check-cast v26, Landroid/widget/LinearLayout;
move-object/from16 v0, v26
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/systemui/statusbar/StatusBarService;->powerwidget:Landroid/widget/LinearLayout;
6. then search for .line 418 and make it look like this
Code:
.line 418
.local v12, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v12}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/systemui/statusbar/StatusBarService;->powerwidget:Landroid/widget/LinearLayout;
move-object/from16 v26, v0
const/16 v27, 0x0
move-object/from16 v0, v26
move-object v1, v12
move/from16 v2, v27
invoke-virtual {v0, v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V
7.then on statusbar_expanded.xml and statusbar_expanded_dual_sim.xml. paste this in the place u want
Code:
then recompile apk and push
this have been tested and worked on galaxy y duos and y pro duos
View attachment 2710461
any questions ????
Click to expand...
Click to collapse
Thankx to do this. I had wrote a whole guide on how to add all modes of my systemui to all ui's and not once but twice but lost the file due to pc issues both times so gave up. Was working on my own toggles and learning java but took a break on development since February now I have a moto g so this fone is with my mom. But still I gonna release the mod which I had made soon which has my own java made toggles and which don't need any Id comparison to add in other systemui + all other toggle mods u can get
Sent from my XT1033 using Tapatalk

samsoul16 said:
Thankx to do this. I had wrote a whole guide on how to add all modes of my systemui to all ui's and not once but twice but lost the file due to pc issues both times so gave up. Was working on my own toggles and learning java but took a break on development since February now I have a moto g so this fone is with my mom. But still I gonna release the mod which I had made soon which has my own java made toggles and which don't need any Id comparison to add in other systemui + all other toggle mods u can get
Sent from my XT1033 using Tapatalk
Click to expand...
Click to collapse
Waiting for your mod.
I'm sure it will be great and will help us a lot
Sent from my GT-B5512 using Carbon rom

is this gonna work for galaxy Y sir ? im desperately looking for similar guide like this

my problem is , every time i modded SystemUI.apk i lost my Status bar ... i dont know why :S on stock rom ..

Related

Sense Landscape Mod?

Any one know of a mod to get 3.6 ics to go landscape? I know I could use another launcher but I actually like sense.
Sent from my HTC PH39100 using XDA
cwhittl said:
Any one know of a mod to get 3.6 ics to go landscape? I know I could use another launcher but I actually like sense.
Sent from my HTC PH39100 using XDA
Click to expand...
Click to collapse
waiting forever for this...nothing so fare
i think it has to be built into sense. I know they ported a rom to the evo 3d that had that feature but i think that is the only way to get landscape rosie
ZeRo2o9 said:
i think it has to be built into sense. I know they ported a rom to the evo 3d that had that feature but i think that is the only way to get landscape rosie
Click to expand...
Click to collapse
I'm trying this with this (http://forum.xda-developers.com/showthread.php?t=1718489) as a guide, though we don't appear to have the method mentioned. We do have this method:
Code:
.method public static isSupportLandscape()Z
.registers 2
invoke-static {}, Lcom/htc/launcher/settings/SettingUtil;->isTabletDevice()Z
move-result v0
if-nez v0, :cond_1e
sget-short v0, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v1, 0x78
if-eq v0, v1, :cond_1e
sget-short v0, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v1, 0xa8
if-eq v0, v1, :cond_1e
sget-short v0, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v1, 0x93
if-eq v0, v1, :cond_1e
sget-short v0, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v1, 0x5a
if-ne v0, v1, :cond_20
:cond_1e
const/4 v0, 0x1
:goto_1f
return v0
:cond_20
const/4 v0, 0x0
goto :goto_1f
.end method
That I tried changing to (only things changed are the on/off values of cond_1e and cond_20):
Code:
.method public static isSupportLandscape()Z
.registers 2
invoke-static {}, Lcom/htc/launcher/settings/SettingUtil;->isTabletDevice()Z
move-result v0
if-nez v0, :cond_1e
sget-short v0, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v1, 0x78
if-eq v0, v1, :cond_1e
sget-short v0, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v1, 0xa8
if-eq v0, v1, :cond_1e
sget-short v0, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v1, 0x93
if-eq v0, v1, :cond_1e
sget-short v0, Lcom/htc/htcjavaflag/HtcBuildFlag;->Htc_DEVICE_flag:S
const/16 v1, 0x5a
if-ne v0, v1, :cond_20
:cond_1e
const/4 v0, 0x0
:goto_1f
return v0
:cond_20
const/4 v0, 0x1
goto :goto_1f
.end method
But unfortunately HTC Sense has stopped when applying the change I tried clearing HTC Sense Data, cache, and Dalvik-cache.. but the same thing. I'm not smart enough with .smali to start messing around too much more, but this seems to be the method that needs edited. I'll keep playing a little more this afternoon and see if I get lucky.
Found this too:
If you would like to manually edit your Rosie.apk this is what you have to do
Decompile Rosie.apk
Open the AndroidManifest.xml with a text editor
Find:
android:screenOrientation="nosensor"
Change it to:
android:screenOrientation="sensor"
Recompile
Click to expand...
Click to collapse
Source Thread
But in our manifest.xml android:screenOrientation="portrait". I just tried it as "sensor" and Rosie is now rotating! Only problem is it's holding the original aspect ratio, so when rotated, the screen only takes up the left 540 pixels, leaving a ton of empty black on the right and leaving you unable to see the bottom 420 pixels. Let me try them together and see what happens..
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Wow so it is possible. Nice work. I bet a themed would know how to do it. I get confused looking at all that stuff I'm more hardware hands on type of person
Sent from my HTC Holiday using xda premium
ZeRo2o9 said:
Wow so it is possible. Nice work. I bet a themed would know how to do it. I get confused looking at all that stuff I'm more hardware hands on type of person
Sent from my HTC Holiday using xda premium
Click to expand...
Click to collapse
It's possible that we don't have the proper resources/drawables for landscape to work properly, which would mean rewriting a bunch of .xmls and possibly/probably .smali, and editing a ton of .pngs and .m10s. I hope not cause that's definitely way over my head and available free time
Looks like I broke Rosie in my last attempt yesterday (appears Sense and Rosie aren't installed, and won't install. Which doesn't completely bother me since I don't use it anyway.. just playing around for yous guys) - I'm gonna reflash my ROM and keep playing around.

[How-To]CRT-OFF Animation Toggle (made using XXEMB5 [4.1.2])

I'm posting this here as I helped Kryten2k35 make this for his base XXEMB5 (4.1.2) but they are all likely very similar.
The code is very similar to the SGS2 and I have edited it for this base. My original thread is here: http://forum.xda-developers.com/showthread.php?t=2194003
I've been having many PM's on how to create this toggle and honestly I have been meaning to post this for a while.
Firstly thanks to Mirko-ddd for enabling Crt-Off Animation which allowed me to do this. Thank him HERE
No need to enable from the link above as I have included it with this toggle How-To.
Also Thanks to my teammate Jeboo for teaching me some smali and helping me with this function!
So I'm not a posting master and I do have 2 kids buzzing around me while I type this!.. LOL :highfive:
Here we start with SecSettings.apk
1)
/res/values/Strings.xml
Code:
<string name="crtanimation_title">CRT Animation</string>
<string name="crtanimation_summary">Enables animation when powering off screen</string>
2)
/res/xml/Display_Settings.xml (Input this line where you want it to show.)
Code:
<CheckBoxPreference android:title="@string/crtanimation_title" android:summary="@string/crtanimation_summary" android:key="crtanimation_toggle" />
3)
\SecSettings\smali\com\android\settings\DisplaySettings.smali
Add the RED
Code:
.field mSupportFolderType:Z
.field private mTouchKeyLight:Landroid/preference/ListPreference;
[COLOR="red"].field private mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
4)
Code:
const-string v13, "key_multi_window"
move-object/from16 v0, p0
invoke-virtual {v0, v13}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v13
check-cast v13, Landroid/preference/CheckBoxPreference;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
[COLOR="red"] const-string v13, "crtanimation_toggle"
move-object/from16 v0, p0
invoke-virtual {v0, v13}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v13
check-cast v13, Landroid/preference/CheckBoxPreference;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;[/COLOR]
invoke-virtual/range {p0 .. p0}, Lcom/android/settings/DisplaySettings;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v13
const-string v14, "com.sec.feature.multiwindow.phone"
invoke-virtual {v13, v14}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z
5)
Code:
:cond_15
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
[COLOR="Red"]if-eqz v0, :cond_new[/COLOR]
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :cond_16
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v2, "multi_window_enabled"
invoke-static {v0, v2, v1}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
:cond_16
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
[COLOR="red"] :cond_new
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 987
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
.line 988
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "crtanimation_toggle"
if-nez v0, :cond_newA
const/4 v0, 0x0
goto :cond_newB
:cond_newA
const/4 v0, 0x1
:cond_newB
invoke-static {v3, v4, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
[/COLOR]
.end method
6)
Code:
const-string v4, "multi_window_enabled"
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-ne v3, v1, :cond_5
:goto_2
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "multi_window_enabled"
invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v1
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowModeObserver:Landroid/database/ContentObserver;
invoke-virtual {v0, v1, v2, v3}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V
:cond_2
[COLOR="red"] iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mCrtAnimationPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "crtanimation_toggle"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :goto_2b
const/4 v1, 0x1
goto :goto_2c
:goto_2b
const/4 v1, 0x0
:goto_2c
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V[/COLOR]
return-void
:cond_3
move v0, v2
goto :goto_0
:cond_4
iget v0, p0, Lcom/android/settings/DisplaySettings;->mDirect:I
That's it for SecSettings.
Recompile and test it functions before continuing.
Once that works lets enable the function.
I'm including the function to enable as previously linked to mirko_ddd's thread.
Next we mod services.jar
7)
\services\smali\com\android\server\PowerManagerService$ScreenBrightnessAnimator.smali
Code:
#setter for: Lcom/android/server/PowerManagerService;->mHighestLightSensorValue:I
invoke-static {v7, v9}, Lcom/android/server/PowerManagerService;->access$8202(Lcom/android/server/PowerManagerService;I)I
:cond_1
:goto_1
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
[COLOR="Red"] move-object v0, p0
iget-object v2, v0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/server/PowerManagerService;->access$2300(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v9, "crtanimation_toggle"
const/4 v10, 0x0
invoke-static {v2, v9, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :cond_new2
if-eqz p2, :cond_new2
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_new2
[/COLOR]
const/16 v9, 0xa
invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
const/16 v9, 0xa
invoke-virtual {v7, v9, p1, v3}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v2
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
And that's it!
Recompile and enjoy.
All I ask is for credit in your Mod or Rom.
Re: [How-To]CRT-OFF Animation Toggle (made using XXEMR2 [4.1.2])
thanx, I will try to add it to my frmaework
Chaos ^_^ said:
thanx, I will try to add it to my frmaework
Click to expand...
Click to collapse
when i tried to recompile SecSettings.apk i got this message
C:\apktoolv3>apktool b working/SecSettings built/SecSettings-unsigned.apk
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuil der.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:243)
at brut.androlib.Androlib.buildSources(Androlib.java: 200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
any idea ?
Chaos ^_^ said:
when i tried to recompile SecSettings.apk i got this message
C:\apktoolv3>apktool b working/SecSettings built/SecSettings-unsigned.apk
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: [email protected]
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuil der.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:243)
at brut.androlib.Androlib.buildSources(Androlib.java: 200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
any idea ?
Click to expand...
Click to collapse
Please attach/post the decompiled XML's and Smali that were modded so I can look at what was done.
ok
shoman94 said:
Please attach/post the decompiled XML's and Smali that were modded so I can look at what was done.
Click to expand...
Click to collapse
here is the files
Chaos ^_^ said:
here is the files
Click to expand...
Click to collapse
So I can see a typo (extra space) in string.xml which is likely not a problem but should be fixed.
You didn't attach display_settings.xml so I can't see that one.
But the main Issue I see is Edit#5.
You changed the line to cond_new but you didn't add the :cond_new code at the end of that method. Scroll down edit#5 in the OP and you will see.
I hope that helps.
shoman94 said:
So I can see a typo (extra space) in string.xml which is likely not a problem but should be fixed.
You didn't attach display_settings.xml so I can't see that one.
But the main Issue I see is Edit#5.
You changed the line to cond_new but you didn't add the :cond_new code at the end of that method. Scroll down edit#5 in the OP and you will see.
I hope that helps.
Click to expand...
Click to collapse
unfortunately its still not working, thanks anyway
Chaos ^_^ said:
unfortunately its still not working, thanks anyway
Click to expand...
Click to collapse
Sorry you are having trouble. Before adding the changes make sure you can compile it to begin with. I know it works as Kryten2k35 compiled it without issue and it all works fine.
Good luck.
shoman94 said:
Sorry you are having trouble. Before adding the changes make sure you can compile it to begin with. I know it works as Kryten2k35 compiled it without issue and it all works fine.
Good luck.
Click to expand...
Click to collapse
its working without adding your mod, anyway I will try again tonight
Works fine for me. CRT-OFF is correct enabled/disabled with this mod
I have only one problem with display correct name of the toggle added.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
slim80 said:
Works fine for me. CRT-OFF is correct enabled/disabled with this mod
I have only one problem with display correct name of the toggle added.
Click to expand...
Click to collapse
What language is that?
I'm taking a guess here, but you need to add translations to other strings for different languages.
Like for example you want to add the mod to the russian language, you have to mod strings-ru.
Try that...
---------- Post added at 06:22 PM ---------- Previous post was at 06:18 PM ----------
Thanks for this mod.
Works perfect for me.
I cannot find :cond_0 from step #5 in the OP.
I even looking in Wanam's MB5 smali and could not find a match for it in there either. Was this a typo or can someone give me some surrounding code to port this over please? Tnx
Edit: Should it be :cond_new maybe?
tdunham said:
I cannot find cond_0 from step #5 in the OP.
I even looking in Wanam's MB5 smali and could not find it in there either. Was this a typo or can someone give me some surrounding code to port this over please? Tnx
Click to expand...
Click to collapse
What the condition was that you changed to cond_new will go in place of cond_0 in step 5. Understand?
Edit: that cond can depend on the decompiler.
Edit2: don't forget to scroll down in step 5 for more code to put in.
Sent from my Transformer Prime TF201 using Tapatalk 2
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
You cannot, you need a custom kernel to do that and there are'nt for leaked roms. Maybe you can have it working to some degree but it always be defective. That mod requires support by the kernel, smali modifications apart.
Ive done this mod on stock 4.1.2 also and there wasnt any problem.
And it works with stock kernel as long as your connected to wifi.
My question is since i cant find that specific smali, do i edit another smali or search in another folder?
I can do the rest x)
Sent from my GT-N7100 using Tapatalk 4 Beta
AskinSavascisi said:
Ive done this mod on stock 4.1.2 also and there wasnt any problem.
And it works with stock kernel as long as your connected to wifi.
My question is since i cant find that specific smali, do i edit another smali or search in another folder?
I can do the rest x)
Sent from my GT-N7100 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Sorry buddy, I think I misunderstood the thread for another one.
Sorry I can't help, though.
AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
Maybe you can ask @criscan to help you out
AskinSavascisi said:
any idea how to get CRT working on S3 4.2.2 leaked? cuz i cant find PowerManagerService$ScreenBrightnessAnimator.smali
Click to expand...
Click to collapse
It's totally different on 4.2.2.... look in the sgs4 section under themes and apps.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta
@shoman94
Thanks to your awesome tutorial, I've added CRT Off animation to my ROM.. But there is something I'd like to mention... The CRT off effect works great.. no lag, no nothing.. but if I turn CRT animation off from Settings then there is always a "slight delay" when I lock my phone (i.e power off the display with the power button).. like the screen will be "almost dark" for a second then it will shut off completely..
Its kind of hard for me to explain this in words but I hope that you understood what I meant.. PS: In addition to your tutorial, I also followed this to prevent a "glitch turning off effect"

[MOD][DEV][SMALI] Transparent Navbar for 4.1/4.2/4.3

MOD/DEV/SMALI TRANSPARENT NAVBAR
Hello guys , I want to share how to modded your navbar to have transparent background
Credit & Thanks to : Senior Member legend evilisto
ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- Know how to decompile/recompiling jar Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
How to enable Navbar
go here : http://forum.xda-developers.com/showthread.php?t=1364757
GUIDE NOW FIXED !!
It also work to, CM10 / CM10.1/ JB 4.1.1/ JB 4.1.2 / JB 4.2.1/JB 4.2.2/ JB 4.3
CREDIT & THANKS TO :
- Senior Member @evilisto
- Recognized themer @rodman01
- @mulbyungjahri
- @BOND1987
1. DECOMPILE android.policy.jar
\com\android\internal\policy\impl\ PhoneWindowManager.smali
find this method :
Code:
.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I
DELETE the RED CODE
AND REPLACE it with the BLUE CODE
Code:
.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I
.registers 3
.parameter "systemRect"
.prologue
.line 3057
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemLeft:I
iput v0, p1, Landroid/graphics/Rect;->left:I
.line 3058
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemTop:I
iput v0, p1, Landroid/graphics/Rect;->top:I
.line 3059
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemRight:I
iput v0, p1, Landroid/graphics/Rect;->right:I
.line 3060
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I
iput v0, p1, Landroid/graphics/Rect;->bottom:I
.line 3061
[COLOR="Red"]iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_1b
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
.line 3063
:goto_1a
return v0
.line 3062
:cond_1b
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_26
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
goto :goto_1a
.line 3063
:cond_26
const/4 v0, 0x0
goto :goto_1a
.end method[/COLOR]
and replace with this BLUE CODE
Code:
[COLOR="Blue"]const/4 v0, 0x0
return v0
.end method[/COLOR]
DONE & COMPILE
android.policy.jar code is the same like in my Transparent status bar guide : http://forum.xda-developers.com/showpost.php?p=40278450&postcount=2
2. DECOMPILE SystemUI.apk
go to :
com/android/systemui/statusbar/phone/PhoneStatusBar.smali
Delete the RED CODE
and Add the BLUE CODE
- find this method :
Code:
.method private getNavigationBarLayoutParams()Landroid/view/WindowManager$LayoutParams;
.locals 6
.prologue
const/4 v1, -0x1
.line 943
new-instance v0, Landroid/view/WindowManager$LayoutParams;
const/16 v3, 0x7e3
const v4, 0x840068
[COLOR="Blue"]const/4 v5, -0x3[/COLOR]
move v2, v1
[COLOR="Red"]move v5, v1[/COLOR]
invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
.line 954
invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z
move-result v1
if-eqz v1, :cond_0
.line 955
iget v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I
const/high16 v2, 0x100
or-int/2addr v1, v2
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I
.line 958
:cond_0
const-string v1, "NavigationBar"
invoke-virtual {v0, v1}, Landroid/view/WindowManager$LayoutParams;->setTitle(Ljava/lang/CharSequence;)V
.line 959
const/4 v1, 0x0
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I
.line 960
return-object v0
.end method
- NEXT :
Edit the BLUE CODE
go to :
SystemUI.apk\res\layout\navigation_bar.xml
Code:
<com.android.systemui.statusbar.phone.NavigationBarView [COLOR="Blue"]android:background="#88000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent"
SystemUI.apk\res\layout-sw600dp\navigation_bar.xml
Code:
<com.android.systemui.statusbar.phone.NavigationBarView [COLOR="Blue"]android:background="#88000000"[/COLOR] android:layout_width="fill_parent" android:layout_height="fill_parent"
SystemUI.apk\res\values\drawables.xml
Code:
<item type="drawable" name="system_bar_background">[COLOR="Blue"]#88000000[/COLOR]</item>
<item type="drawable" name="notification_icon_area_smoke">[COLOR="Blue"]#88000000[/COLOR]</item>
DONE AND COMPILE
THIS MOD NOW ONLY WORKING FINE WITH APEX LAUNCHER AND NOVA LAUNCHER., NOT TESTED YET ON OTHER LAUNCHER
THAT'S IT AND ENJOY :good::laugh:
SCREENSHOTS
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
[MOD][CM10.1] GALAXY WONDER - GT-I8150 Transparent Navbar & Transparent Status Bar for CM10.1 Alpha -7
reserved 2
Updated :
The mod Working fine with Apex launcher & Nova launcher
hey bro, i fllow your Guide, and you can see my attachmens. I don't know why!
chutanh7 said:
hey bro, i fllow your Guide, and you can see my attachmens. I don't know why!
Click to expand...
Click to collapse
Have you merge the source code for trebuchet ?
Done that, push Trebuchet. and
Do clear data Trebuchet, and don't change/check list any option of Trebuchet in Settings-Launcher-
Sent from my GT-I8150 using xda app-developers app
ok bro, i got it. [email protected]@
Thank you :good:
CM10.1 20130716 NIGHTLY on Nexus 4
Hey adi,
Would this work with cm10 too? I cant right now take look to code, but its different in cm10 than cm10.1 , right?
peetu20 said:
Hey adi,
Would this work with cm10 too? I cant right now take look to code, but its different in cm10 than cm10.1 , right?
Click to expand...
Click to collapse
Try it petu and report here
For CM10 (4.1) Use same code/step for android.policy.jar and SystemUI.apk , but skip Trebuchet.apk step and don't use the launcher, try it with Nova or Apex
Sent from my GT-I8150 using xda app-developers app
I will
Just a thought could these edits be applied to work on a tablet ui..
lacoursiere18 said:
Just a thought could these edits be applied to work on a tablet ui..
Click to expand...
Click to collapse
Tablet UI is not transparent navbar.
But it is transparent system_bar.xml.
Follow the android.policy.jar code.
Next go to
Res/layout/system_bar.xml
Or
Res/values/drawables.xml
Find system_bar_background.
Make it to #00000000
Sent from my GT-I8150 using xda app-developers app
Very nice Thank you for the details I will try and report back my results!
Sent from my SCH-I605 using xda app-developers app
my classex.dex in android policy jar sounds different, ie the method is
Code:
.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I
.registers 3
.parameter "systemRect"
.prologue
.line 3046
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemLeft:I
iput v0, p1, Landroid/graphics/Rect;->left:I
.line 3047
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemTop:I
iput v0, p1, Landroid/graphics/Rect;->top:I
.line 3048
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemRight:I
iput v0, p1, Landroid/graphics/Rect;->right:I
.line 3049
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I
iput v0, p1, Landroid/graphics/Rect;->bottom:I
.line 3050
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_1b
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
.line 3052
:goto_1a
return v0
.line 3051
:cond_1b
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_26
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
goto :goto_1a
.line 3052
:cond_26
const/4 v0, 0x0
goto :goto_1a
.end method
can I safely substitute it with yours, even if line numbers are different?
(cm 10.1.2 for nook hd+)
stegg said:
my classex.dex in android policy jar sounds different, ie the method is
Code:
.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I
.registers 3
.parameter "systemRect"
.prologue
.line 3046
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemLeft:I
iput v0, p1, Landroid/graphics/Rect;->left:I
.line 3047
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemTop:I
iput v0, p1, Landroid/graphics/Rect;->top:I
.line 3048
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemRight:I
iput v0, p1, Landroid/graphics/Rect;->right:I
.line 3049
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I
iput v0, p1, Landroid/graphics/Rect;->bottom:I
.line 3050
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_1b
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
.line 3052
:goto_1a
return v0
.line 3051
:cond_1b
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
if-eqz v0, :cond_26
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mNavigationBar:Landroid/view/WindowManagerPolicy$WindowState;
invoke-interface {v0}, Landroid/view/WindowManagerPolicy$WindowState;->getSurfaceLayer()I
move-result v0
goto :goto_1a
.line 3052
:cond_26
const/4 v0, 0x0
goto :goto_1a
.end method
can I safely substitute it with yours, even if line numbers are different?
(cm 10.1.2 for nook hd+)
Click to expand...
Click to collapse
Yes, tested on GalNex 10.1.2
Link : http://forum.xda-developers.com/showthread.php?t=2371216
Sent from my GT-I8150 using xda app-developers app
thank you for the quick answer!
I am modifiyng a tablet UI (better, the default phablet UI of CM 10.1)
in this post, you mean I should make #1 of Original Post, but completely ignore #2 of OP as there's no PhoneStatusBar.smali file?
Adi Aisiteru Reborn said:
Tablet UI is not transparent navbar.
But it is transparent system_bar.xml.
Follow the android.policy.jar code.
Next go to
Res/layout/system_bar.xml
Or
Res/values/drawables.xml
Find system_bar_background.
Make it to #00000000
Sent from my GT-I8150 using xda app-developers app
Click to expand...
Click to collapse
sorry for my noobness!
stegg said:
thank you for the quick answer!
I am modifiyng a tablet UI (better, the default phablet UI of CM 10.1)
in this post, you mean I should make #1 of Original Post, but completely ignore #2 of OP as there's no PhoneStatusBar.smali file?
sorry for my noobness!
Click to expand...
Click to collapse
for transparent System bar/Tablet Status Bar )
no need PhoneStatusBar.smali editing.
just do like you quoted above
Adi Aisiteru Reborn said:
for transparent System bar/Tablet Status Bar )
no need PhoneStatusBar.smali editing.
just do like you quoted above
Click to expand...
Click to collapse
When I do this I edit the drawables.xml to #000000 in system_bar and when i push the new systemui i get systemui fc would anything else have to be modified..
EDIT: BTW i am on tw 4.1.2 but my android policy jar matches yours pretty much to the exact.. Would that make that much a difference
lacoursiere18 said:
When I do this I edit the drawables.xml to #000000 in system_bar and when i push the new systemui i get systemui fc would anything else have to be modified..
Click to expand...
Click to collapse
it should #00000000 ( 8 digits )
not #000000 ( 6 digits ) <- that's why you got fcs

[guide][jb][3-way] easily enable extended power menu for mtk devices

Hello Everyone ,
In this guide i'll show u how to add Reboot and Recovery option to power menu
There is lots of Guides on how to add recovery option to power menu but none worked perfectly on my device(MTK)
so i found a new way , in which we need not to find proper globalaction files
Requirements :
apktool
Notepad++
android.policy.jar
framework-res.apk
Time and Patience
Click to expand...
Click to collapse
Part-1
Decompile Your framework-res.apk and navigate to - res/value/strings.xml
add these lines at the end.
Code:
<string name="reboot_text">Reboot</string>
<string name="recovery_text">Recovery</string>
Like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
and add the attached pngs to - res/drawable-hdpi/ and compile the apk
again decompile the modded apk and open res/values/public.xml
Part-2
Now Decompile your "android.policy.jar" and add the attached files to - "android.policy.jar.out\smali\com\android\internal\policy\impl"
Now open GlobalActions.smali and find this method
Code:
.method private createDialog()Lcom/android/internal/policy/impl/GlobalActions$GlobalActionsDialog;
Below that you will see
Code:
.locals 11
change it to
Code:
.locals [COLOR="Red"]12[/COLOR]
Now find
Code:
.prologue
Below that paste this
Code:
const [COLOR="Red"]v11[/COLOR], 0x1080030 <------------ Replace the id with ic_lock_power_off (power off drawable) in the opened public.xml
Now Find this
Code:
new-instance [COLOR="Purple"]v1[/COLOR], Lcom/android/internal/policy/impl/GlobalActions$2;
const [COLOR="DarkGreen"]v2[/COLOR], 0x10400e7
change the id 0x10400e7 with the new id in public.xml
Code:
<public type="string" name="global_action_power_off"
now below that you will see
Code:
const [COLOR="Magenta"]v3[/COLOR], 0x10400e7
now delate the above line and paste this below
Code:
invoke-direct {v1, p0, v11, v2}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 317
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$98;
const [COLOR="Red"]v2[/COLOR], 0x108061a <----------id of <public type="drawable" name="ic_lock_reboot"
const [COLOR="Magenta"]v3[/COLOR], 0x104054f <----------id of <public type="string" name="reboot_text"
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$98;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 327
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;
const [COLOR="Red"]v2[/COLOR], 0x1080619 <---------- id of <public type="drawable" name="ic_lock_recovery"
const [COLOR="Magenta"]v3[/COLOR], 0x1040550 <-----------id of <public type="string" name="recovery_text"
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
Replace the above ids with the id in your public.xml
Before :
Code:
.line 281
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
.line 284
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
[COLOR="RoyalBlue"]new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
const v2, 0x1080030
const v3, 0x10400e7
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[/COLOR]
.line 309
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 312
After :
Code:
.line 281
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
.line 284
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$2;
[COLOR="Blue"] const v2, 0x10400e7
invoke-direct {v1, p0, v11, v2}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 317
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$98;
const v2, 0x108061a
const v3, 0x104054f
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$98;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 327
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$99;
const v2, 0x1080619
const v3, 0x1040550
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[/COLOR] .line 309
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
Now compile and flash both the files
I have attached my GlobalActions.smali for comparision just change the extension from .zip to .smali
Result :
Hints :
1 . While Replacing the id from public.xml replace only last 7 digits
like this
2. keep track of registers (like v1 v2 v11 etc) and .Line numbers should be unique
3. Register values (like 0x108061a) will be Different for Different roms
I've Tested this guide on 3 different roms and it is working fine without any errors
If u Have any Problems Post here i'll try my best to help you
Credits/ Thanks
SuperDroidBond
Adi Aisiteru Reborn
Learnt many things from their guides ...
Click to expand...
Click to collapse
If you like my work Hit Thanks ..dont forget ​​
Reserved ...
+1
reserved ..
Great guide bro :good:
hello aweasome guide sir thanks alot
put can you give me a smali tool you used
the guide is aweasome realy want to do it thanks
i have done the tutorial and when i press and hold power volume it softreboots
so where is the problem
hope any one here helps me
working for my device Xperia C
after changing Const V3 with V2 that u said in the section of putting the line 317 and 327
u have to fix it more as things are going wrong cause thereis gona be amiss in the last line
Mohamed Yahia San said:
working for my device Xperia C
after changing Const V3 with V2 that u said in the section of putting the line 317 and 327
u have to fix it more as things are going wrong cause thereis gona be amiss in the last line
Click to expand...
Click to collapse
hello how do you mean changing Const V3 with V2 ????
i mean instead OF
const v3, 0x10400e7
i made it
const v2, 0x10400e7
but with different id of course
Thanx sir it works on my mt6589 cross a88

[GUIDE][SMALI]Disable StatusBar notifications[GUIDE][SMALI]

Disable Bluetooth/Alarm/Volume Notifications in StatusBar​
This MOD disables the ongoing Notifications for Bluetooth, Alarm and Volume
and can easily be modified to remove other ongoing statusbar notifications.
this MOD operates a little different it not only removes the icon but also the notification
as well, thus freeing up the statusbar. I tried several different mods for this and none seemed to work
the way I wanted them to so with a lot of searching and a little luck i found the smali code to disable
them rather than just hide the icons.​
STEP 1:
Pull SystemUI.apk either from your device or from your ROM.zip file
from device: adb pull /system/priv-app/SystemUI.apk
from ROM.zip: extract /system/priv-app/SystemUI.apk
STEP 2:
using available tools decompile the apk (either using apktool or Virtuous Ten Studio) I recomend VTS
Locate smali/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.smali
make the changes listed below:
For Bluetooth notifications:
Search for .method private final updateBluetooth(Landroid/content/IntentV
in that method search for const-string v6, "bluetooth" it should look like this
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_aa[/COLOR]
const-string v6, "bluetooth"
invoke-virtual {v4, v6, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
iget-boolean v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
invoke-virtual {v4, v5, v6}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_aa[/COLOR]
:cond_0
return-void"
For Alarm search for .method private final updateAlarm(Landroid/content/IntentV
Add the lines in BLUE
Code:
.method private final updateAlarm(Landroid/content/Intent;)V
.locals 3
const-string v1, "alarmSet"
const/4 v2, 0x0
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
[COLOR="Blue"]goto :goto_cc[/COLOR]
const-string v2, "alarm_clock"
invoke-virtual {v1, v2, v0}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_cc[/COLOR]
return-void
.end method
For volume search for .method private final updateVolume()V
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_bb[/COLOR]
const-string v7, "volume"
invoke-virtual {v6, v7, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
:cond_1
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
if-eq v4, v5, :cond_2
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v6, "volume"
invoke-virtual {v5, v6, v4}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
[COLOR="Blue"]:goto_bb[/COLOR]
:cond_2
return-void
STEP 3:
Save the smali file, recompile the SystemUI.apk and push to your device to test
adb push SystemUI.apk /system/priv-app/SystemUI.apk
adb shell
cd /system/priv-app
chmod 0644 SystemUI.apk
reboot
This smali fragment contains many other ongoing statusbar notifications that can be disabled using the same methods as above.
@cstayton
You made the community alive .... Till we have Official LP.... Awesome work as always Sir[emoji106]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
cstayton said:
Disable Bluetooth/Alarm/Volume Notifications in StatusBar​
This MOD disables the ongoing Notifications for Bluetooth, Alarm and Volume
and can easily be modified to remove other ongoing statusbar notifications.
this MOD operates a little different it not only removes the icon but also the notification
as well, thus freeing up the statusbar. I tried several different mods for this and none seemed to work
the way I wanted them to so with a lot of searching and a little luck i found the smali code to disable
them rather than just hide the icons.​
STEP 1:
Pull SystemUI.apk either from your device or from your ROM.zip file
from device: adb pull /system/priv-app/SystemUI.apk
from ROM.zip: extract /system/priv-app/SystemUI.apk
STEP 2:
using available tools decompile the apk (either using apktool or Virtuous Ten Studio) I recomend VTS
Locate smali/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.smali
make the changes listed below:
For Bluetooth notifications:
Search for .method private final updateBluetooth(Landroid/content/IntentV
in that method search for const-string v6, "bluetooth" it should look like this
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_aa[/COLOR]
const-string v6, "bluetooth"
invoke-virtual {v4, v6, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v5, "bluetooth"
iget-boolean v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mBluetoothEnabled:Z
invoke-virtual {v4, v5, v6}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_aa[/COLOR]
:cond_0
return-void"
For Alarm search for .method private final updateAlarm(Landroid/content/IntentV
Add the lines in BLUE
Code:
.method private final updateAlarm(Landroid/content/Intent;)V
.locals 3
const-string v1, "alarmSet"
const/4 v2, 0x0
invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
[COLOR="Blue"]goto :goto_cc[/COLOR]
const-string v2, "alarm_clock"
invoke-virtual {v1, v2, v0}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
[COLOR="Blue"]:goto_cc[/COLOR]
return-void
.end method
For volume search for .method private final updateVolume()V
Add the lines in BLUE
Code:
[COLOR="Blue"]goto :goto_bb[/COLOR]
const-string v7, "volume"
invoke-virtual {v6, v7, v2, v5, v1}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;IILjava/lang/String;)V
:cond_1
iget-boolean v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
if-eq v4, v5, :cond_2
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mService:Landroid/app/StatusBarManager;
const-string v6, "volume"
invoke-virtual {v5, v6, v4}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;->mVolumeVisible:Z
[COLOR="Blue"]:goto_bb[/COLOR]
:cond_2
return-void
STEP 3:
Save the smali file, recompile the SystemUI.apk and push to your device to test
adb push SystemUI.apk /system/priv-app/SystemUI.apk
adb shell
cd /system/priv-app
chmod 0644 SystemUI.apk
reboot
This smali fragment contains many other ongoing statusbar notifications that can be disabled using the same methods as above.
Click to expand...
Click to collapse
Hey man! Thanks for this!
I was wondering if you could help me out with the following, I want to hide my bluetooth icon if bluetooth is enable and not connected to a paired device, but show it if I am connected to a paired device.
Thanks.
Rkr87 said:
Hey man! Thanks for this!
I was wondering if you could help me out with the following, I want to hide my bluetooth icon if bluetooth is enable and not connected to a paired device, but show it if I am connected to a paired device.
Thanks.
Click to expand...
Click to collapse
that'll take a little digging i'll see what i can find, no guarantees tho

Categories

Resources