[MOD][GUIDE]Enable %battery in 4.4 KitKat - Galaxy Note 3 Themes and Apps

Things you'll need:
APKTool
Notepad++
SystemUI.apk from your 4.4 ROM
{
"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"
}
1. Using APKTool, decompile SystemUI.apk
2. Open \smali\com\android\systemui\BatteryMeterView.smali in Notepad++
3. If you don't already have the white %battery enabled, enable it now. Find:
Code:
const-string v7, "status_bar_show_battery_percent"
const/4 v9, [COLOR="Red"]0x0[/COLOR]
and change 0x0 to 0x1
4. Now find:
Code:
iget-object v7, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
[COLOR="Red"]const/4 v7, -0x1[/COLOR]
and change "const/4 v8, -0x1" to "const/high16 v8, -0x100" (this is changing white (-0x1) to black (-0x100))
5. Save the changes and recompile the APK making sure to retain the original signature. Push back to /system/priv-app/ and set with RW/R/R permissions. Voila, now you have black text for your %battery
downlad Enable _battery in 4.4 KitKat N900.zip
http://sourceforge.net/projects/vnr...able _battery in 4.4 KitKat N900.zip/download

nguyenxuanhoa said:
Things you'll need:
APKTool
Notepad++
SystemUI.apk from your 4.4 ROM
1. Using APKTool, decompile SystemUI.apk
2. Open \smali\com\android\systemui\BatteryMeterView.smali in Notepad++
3. If you don't already have the white %battery enabled, enable it now. Find:
Code:
const-string v7, "status_bar_show_battery_percent"
const/4 v9, [COLOR="Red"]0x0[/COLOR]
and change 0x0 to 0x1
4. Now find:
Code:
iget-object v7, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
[COLOR="Red"]const/4 v7, -0x1[/COLOR]
and change "const/4 v8, -0x1" to "const/high16 v8, -0x100" (this is changing white (-0x1) to black (-0x100))
5. Save the changes and recompile the APK making sure to retain the original signature. Push back to /system/priv-app/ and set with RW/R/R permissions. Voila, now you have black text for your %battery
Click to expand...
Click to collapse
thank you for the instruction.
would you mind to do the flashable change?
thank you in advance

Daster_x said:
thank you for the instruction.
would you mind to do the flashable change?
thank you in advance
Click to expand...
Click to collapse
download:good:
http://sourceforge.net/projects/vnr...able _battery in 4.4 KitKat N900.zip/download

nguyenxuanhoa said:
download:good:
http://sourceforge.net/projects/vnr...able _battery in 4.4 KitKat N900.zip/download
Click to expand...
Click to collapse
thank you very much!!!
---------- Post added at 01:42 PM ---------- Previous post was at 01:28 PM ----------
nguyenxuanhoa said:
download:good:
http://sourceforge.net/projects/vnr...able _battery in 4.4 KitKat N900.zip/download
Click to expand...
Click to collapse
after I flashed it... no percentage (I'm on stock 4.4.2, n900)

it's for stock or custum rom ?

It works perfectly on Sweet Rom 7.01

Bold fonts
Find in BatteryMeterView.smali
Code:
.line 263
const-string v7, "sans-serif-condensed"
const/4 v8, 0x0
replaced
Code:
.line 263
const-string v7, "sans-serif"
const/4 v8, 0x1
result:

nguyenxuanhoa said:
Things you'll need:
APKTool
Notepad++
SystemUI.apk from your 4.4 ROM
Click to expand...
Click to collapse
termit901 said:
Bold fonts
result:
View attachment 2536151
Click to expand...
Click to collapse
Both codes confirmed to work. Thanks heaps guys great work :good:

Red text
Code:
.line 262
iget-object v7, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
const/high16 v8, -0x30
------
max brighter
Code:
-0x1

Thanks for share guys nice work
Hugs
Sent from my SM-N9005

Appreciated if you provide flashable zip for all your mod.
One by one.
Thanks.
Sent from my SM-N9005 using Tapatalk

I'm on echo rom v7, which is based on official stock 4.4.2
I flashed the above soundforge file and the battery background color didn't change. It's still white.
The only issue is that when the battery becomes less than 70%, the percentage text is hard to read! So I prefer the yellow background.

nguyenxuanhoa said:
Things you'll need:
APKTool
Notepad++
SystemUI.apk from your 4.4 ROM
1. Using APKTool, decompile SystemUI.apk
2. Open \smali\com\android\systemui\BatteryMeterView.smali in Notepad++
3. If you don't already have the white %battery enabled, enable it now. Find:
Code:
const-string v7, "status_bar_show_battery_percent"
const/4 v9, [COLOR="Red"]0x0[/COLOR]
and change 0x0 to 0x1
4. Now find:
Code:
iget-object v7, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
[COLOR="Red"]const/4 v7, -0x1[/COLOR]
and change "const/4 v8, -0x1" to "const/high16 v8, -0x100" (this is changing white (-0x1) to black (-0x100))
5. Save the changes and recompile the APK making sure to retain the original signature. Push back to /system/priv-app/ and set with RW/R/R permissions. Voila, now you have black text for your %battery
downlad Enable _battery in 4.4 KitKat N900.zip
http://sourceforge.net/projects/vnr...able _battery in 4.4 KitKat N900.zip/download
Click to expand...
Click to collapse
termit901 said:
Bold fonts
Find in BatteryMeterView.smali
Code:
.line 263
const-string v7, "sans-serif-condensed"
const/4 v8, 0x0
replaced
Code:
.line 263
const-string v7, "sans-serif"
const/4 v8, 0x1
result:
View attachment 2536151
Click to expand...
Click to collapse
termit901 said:
Red text
Code:
.line 262
iget-object v7, p0, Lcom/android/systemui/BatteryMeterView;->mTextPaint:Landroid/graphics/Paint;
const/high16 v8, -0x30
View attachment 2536312
------
max brighter
Code:
-0x1
View attachment 2536408
Click to expand...
Click to collapse
thank you all for the guides, successfully made one for Omega 7 rom.:good:

tried to flash the file attached but nothing after reboot.. i am on 4.4.2 kitkat stock rom

Related

[GUIDE][MOD] jelly bean pattern lock screen customization

This is for sharing what i learned.
I only tested it only on my cm10.1 based rom.(htc desire, jb4.22_VJCM10.1_vijendrahs_20130407)
So this may not work on other rom.
You need to have knowledge of decompiling.
I used APK-Multi-Tool, baksmali and smali to do this.
1. Increase widget maximum size.
{
"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"
}
Decompile framework-res.apk
In \res\layout-port\
Modify keyguard_widget_pager.xml
Change left, right, top padding and pageSpacing as follows.
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardWidgetPager
android:id="@id/app_widget_container" android:paddingLeft="[COLOR="red"]0dip[/COLOR]"
android:paddingTop="[COLOR="red"]0dip[/COLOR]" android:paddingRight="[COLOR="Red"]0dip[/COLOR]"
android:paddingBottom="@dimen/kg_widget_pager_bottom_padding"
android:clipToPadding="false" android:pageSpacing="[COLOR="red"]0dip[/COLOR]"/>
2. Disable initial page hint
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\KeyguardViewStateManager.smali
Remove following red string.
Code:
.method public showUsabilityHints()V
...
.line 307
iget-object v0, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardViewStateManager;->mKeyguardWidgetPager:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;
[COLOR="Red"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->showInitialPageHints()V[/COLOR]
...
.end method
3. Disable white box while scrolling
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
Modify KeyguardWidgetPager.smali
Change red string to green one as follows
Code:
.method animateOutlinesAndSidePages(ZI)V
...
.line 708
[COLOR="Red"].local v7, finalOutlineAlpha:F[/COLOR]
:goto_4e
invoke-virtual {v3, p0, p1, v7, p2}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->fadeFrame(Ljava/lang/Object;ZFI)V
...
.end method
Code:
.method animateOutlinesAndSidePages(ZI)V
...
.line 708
[COLOR="Lime"]const/4 v7, 0x0[/COLOR]
:goto_4e
invoke-virtual {v3, p0, p1, v7, p2}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->fadeFrame(Ljava/lang/Object;ZFI)V
...
.end method
4. Disable page hint when dragging beyond first or last page
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
Modify KeyguardWidgetPager.smali
Remove red string in the follwing.
Code:
.method protected screenScrolled(I)V
...
.line 533
invoke-static {v5}, Ljava/lang/Math;->abs(F)F
move-result v9
cmpg-float v7, v5, v10
if-gez v7, :cond_61
const/4 v7, 0x1
:goto_51
[COLOR="Red"]invoke-virtual {v6, v9, v7}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->setOverScrollAmount(FZ)V[/COLOR]
...
.end method
5. (similar to 4 but) Only disable white gradiant
Decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
Modify KeyguardWidgetFrame.smali
Change red string to green one.
Code:
.method setOverScrollAmount(FZ)V
...
.line 497
const/high16 v1, 0x3f00
mul-float/2addr v1, p1
const/high16 v2, 0x437f
mul-float/2addr v1, v2
[COLOR="Red"] invoke-static {v1}, Ljava/lang/Math;->round(F)I
move-result v1[/COLOR]
iput v1, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->mForegroundAlpha:I
...
.end method
Code:
.method setOverScrollAmount(FZ)V
...
.line 497
const/high16 v1, 0x3f00
mul-float/2addr v1, p1
const/high16 v2, 0x437f
mul-float/2addr v1, v2
[COLOR="Lime"]const/4 v1, 0x0[/COLOR]
iput v1, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->mForegroundAlpha:I
...
.end method
6. Only show bounding box boarder
decompile framework-res.apk
in /res/drawable-hdpi
Modify kg_bouncer_bg_white.9.png as follows
7. Remove carrier, emergency call, battery infomation
decompile framework-res.apk
in res\layout
modify keyguard_emergency_carrier_area.xml as follows (for emergency and carrier removal)
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout ... >
<com.android.internal.policy.impl.keyguard.CarrierText [COLOR="Lime"]android:visibility="gone"[/COLOR] ... />
<LinearLayout [COLOR="Lime"]android:visibility="gone"[/COLOR] ... >
<com.android.internal.policy.impl.keyguard.EmergencyButton ... />
<Button ... />
</LinearLayout>
</LinearLayout>
modify keyguard_message_area.xml as follows (for battery stat removal)
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardMessageArea ... [COLOR="Lime"]android:textSize="0sp"[/COLOR] ... />
8. Change small widget height
small widget height is determined by unlock UI height.
decompile framework-res.apk
in res\layout-port
modify keyguard_host_view.xml as follows.
change green number as you want.
If you set larger number, the widget height will be smaller.
Code:
<com.android.internal.policy.impl.keyguard.KeyguardHostView ...>
...
<com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer ... androidprv:layout_height="[COLOR="Lime"]410dp[/COLOR]" >
...
</com.android.internal.policy.impl.keyguard.KeyguardHostView>
9. Change widget inner padding
decompile android.policy.jar
in com\android\internal\policy\impl\keyguard\
modify KeyguardWidgetFrame.smali.
Add green text and change red number as you want.
you can remove default padding by setting 0.
Code:
.line 109
.local v0, density:F
invoke-virtual {v2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v3
iget v3, v3, Landroid/util/DisplayMetrics;->density:F
const/high16 v4, 0x4100
mul-float/2addr v3, v4
float-to-int v1, v3
[COLOR="Lime"]const v1, 0x[/COLOR][COLOR="Red"]20[/COLOR]
.line 110
.local v1, padding:I
invoke-virtual {p0, v1, v1, v1, v1}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->setPadding(IIII)V
10. Move pattern input section
You can move pattern input section by setting padding.
Decompile framework-res.apk
in res\layout-port\
Modify keyguard_host_view.xml
Inside KeyguardSecurityContainer element set padding value as you want.
Code:
<com.android.internal.policy.impl.keyguard.KeyguardHostView ... >
...
<com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer ... [COLOR="Lime"]androidprv:paddingTop="80dp" [/COLOR] ... >
...
</com.android.internal.policy.impl.keyguard.KeyguardHostView>
:good::good::good::good::good::good::good:
can you just make this mod flashable via CWM..??
or just instal like common .apk..??
Sorry, I can't
adeza69 said:
can you just make this mod flashable via CWM..??
or just instal like common .apk..??
Click to expand...
Click to collapse
I don't have ability to do that.
sonulohani said:
:good::good::good::good::good::good::good:
Click to expand...
Click to collapse
It's AMAZING!!! Going to recompile my files, now. Thanks for this. Awesome job! :thumbup::thumbup::thumbup:
lock screen
I can not find the lock screen when charging the developer with the font size to modify these two paths do not know if you know
I changed my dpi now this couldn't hide I want to decompile this so please tell me which file should I select to decompile??
Sent from my GT-I9082 using XDA Premium 4 mobile app
Not virtual buttons are fonts
yasirj said:
I changed my dpi now this couldn't hide I want to decompile this so please tell me which file should I select to decompile??
Sent from my GT-I9082 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Not virtual buttons are fonts
wil it be applicable for gb
I would love to see an XPOSED Mod with these customizations to the lock screen!
Anyone know if this is possible or having the skills to do so?
Thank you for the info, but how to change the wallpaper?? Setting either a color different than black or a picture?
why?
I'm not really seeing the usefulness of this?

[HOW-TO][Sense 5][4.1.2 & 4.2.2] Add an item to the Settings menu

What's up everyone, adding apps to the settings menu seems to have been really popular as of recently so here's a tutorial on adding apps to the settings menu for Sense 5. Normally, you would just have to modify XML code in settings_headers.xml like in previous Sense versions and other OEMs, but as of recent, HTC likes to put everything in java code...
So let's get to it
PART 1
First off, we are going to modify the app you want to add to the settings menu. I will use my app called "Axis Tweaks" as an example. So decompile the app, open up the AndroidManifest.xml, and look for the following line:
Code:
package="com.axis.tweaks"
Now that you found the name of the package, you will need to change this code:
Code:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
to this:
NOTE: The blue part will vary depending on the name of the package.
Code:
<intent-filter>
<action android:name="[COLOR="Blue"]com.axis.tweaks[/COLOR].action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
That's all we need to do with your app so recompile it. You also need to sign the app because you just modified the AndroidManifest.xml.
PART 2
Now we're going to decompile Settings.apk. This is where the majority of the work happens. After you decompile Settings.apk, navigate to res/values/ids.xml
Add the following id:
Code:
<item type="id" name="axis_tweaks">false</item>
Now, navigate to res/values/strings.xml and add the following line:
Code:
<string name="axis_tweaks">Tweaks</string>
Now, navigate to res/values/drawable-xxhdpi and drop in a PNG file. I called mine: ic_settings_axis_tweaks.png
After all that, recompile Settings.apk and immediately decompile your new Settings.apk
PART 3
In your new Settings.apk, navigate to smali/com/android/settings/framework/activity and open HtcGenericEntryProvider.smali
Add the green section to this file:
Code:
invoke-static {v2, v3, p1}, Lcom/android/settings/framework/activity/HtcGenericEntryProvider;->addWrapHeader(Lcom/android/settings/framework/activity/HtcWrapHeader;FLcom/android/settings/framework/activity/HtcWrapHeaderList;)Z
invoke-static {}, Lcom/android/settings/framework/activity/HtcWrapHeaderInfo;->getTransferMyStuff()Lcom/android/settings/framework/activity/HtcWrapHeader;
[COLOR="SeaGreen"]
move-result-object v2
add-int/lit8 v0, v1, 0x1
int-to-float v3, v1
invoke-static {v2, v3, p1}, Lcom/android/settings/framework/activity/HtcGenericEntryProvider;->addWrapHeader(Lcom/android/settings/framework/activity/HtcWrapHeader;FLcom/android/settings/framework/activity/HtcWrapHeaderList;)Z
invoke-static {}, Lcom/android/settings/framework/activity/HtcWrapHeaderInfo;->getTweaks()Lcom/android/settings/framework/activity/HtcWrapHeader;[/COLOR]
move-result-object v2
add-int/lit8 v1, v0, 0x1
Save that file and now open HtcWrapHeaderInfo.smali
Locate this method:
Code:
.method static getTransferMyStuff()Lcom/android/settings/framework/activity/HtcWrapHeader;
Add this new method right under that one:
Code:
[COLOR="SeaGreen"].method static getTweaks()Lcom/android/settings/framework/activity/HtcWrapHeader;
.locals 4
new-instance v0, Lcom/android/settings/framework/activity/HtcWrapHeader;
invoke-direct {v0}, Lcom/android/settings/framework/activity/HtcWrapHeader;-><init>()V
sget-object v1, Lcom/android/settings/framework/activity/HtcWrapHeader$Type;->NORMAL:Lcom/android/settings/framework/activity/HtcWrapHeader$Type;
iput-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->type:Lcom/android/settings/framework/activity/HtcWrapHeader$Type;
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const-wide/32 v2, [COLOR="blue"]0x7f0802bc # id[/COLOR]
iput-wide v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->id:J
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const v2, [COLOR="blue"]0x7f0201cb # drawable[/COLOR]
iput v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->iconRes:I
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const v2, [COLOR="blue"]0x7f0b1078 # string[/COLOR]
iput v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->titleRes:I
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
new-instance v2, Landroid/content/Intent;
const-string v3, "android.intent.action.MAIN"
invoke-direct {v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v3, "[COLOR="Blue"]com.axis.tweaks.action.MAIN[/COLOR]"
invoke-virtual {v2, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
move-result-object v2
iput-object v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->intent:Landroid/content/Intent;
const-string v1, "[COLOR="blue"]axis[/COLOR]"
iput-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->anchor:Ljava/lang/String;
invoke-static {}, Lcom/android/settings/framework/app/HtcSettingsApplication;->getApplication()Landroid/app/Application;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/android/settings/framework/activity/HtcWrapHeader;->prepareExtraInfo(Landroid/content/Context;)V
return-object v0
.end method[/COLOR]
The parts in BLUE are unique to you and you must change them accordingly. You can find your hex values in res/values/public.xml.
Example (all hex strings are in public.xml):
Code:
0x7f0802bc # id ----------------------------- locate the hex string for the ID you set for your app
0x7f0201cb # drawable ------------------- locate the hex string for the PNG you set for your app
0x7f0b1078 # string ------------------------ locate the hex string for the string you set for your app
com.axis.tweaks.action.LAUNCH ---- replace with what you added to the Manifest
axis ---------------------------------------------- rename this to whatever you want
You are done! Thanks chrisch
Maybe add how to add a custom tab to the settings menu? Just figured it out...
{
"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"
}
thanks...but some screenshoots might helpful & interesting ..
Thanks, in you opinion is possible add a new button (to launch new apk) in notification bar? If yes, do you know how?
wzu7 said:
thanks...but some screenshoots might helpful & interesting ..
Click to expand...
Click to collapse
I agree.
wzu7 said:
thanks...but some screenshoots might helpful & interesting ..
Click to expand...
Click to collapse
SkizzMcNizz said:
I agree.
Click to expand...
Click to collapse
Added
where is located the position of the entry? e.g. wifi-app over wifi-settings or tweak-app over htc-personalize-entry
Hmm, i try this with TD ROM 7.0.0 but dont work
Kiray1982 said:
where is located the position of the entry? e.g. wifi-app over wifi-settings or tweak-app over htc-personalize-entry
Click to expand...
Click to collapse
The order of the items in the Settings menu is in HtcGenericEntryProvider.smali so you will have to look in there for how to organize stuff. In my example, my code is directly under getTransferMyStuff, thus my tweaks app shows up beneath the Transfer option in Settings.
Atze001 said:
Hmm, i try this with TD ROM 7.0.0 but dont work
Click to expand...
Click to collapse
Make sure your IDs are set correctly with what's in public.xml. I did this multiple times and confirmed that it works.
Hero said:
Make sure your IDs are set correctly with what's in public.xml. I did this multiple times and confirmed that it works.
Click to expand...
Click to collapse
I will take a look
---------- Post added at 08:05 PM ---------- Previous post was at 08:00 PM ----------
Hmm, Everything seems to be correct.
---------- Post added at 08:07 PM ---------- Previous post was at 08:05 PM ----------
I upload my files to dropbox. Can you take a look? In "system/app" are the two files settings and superuser
https://www.dropbox.com/s/71kh9olbf614fsq/PrivatUpdate.zip
Superuser.txt contains litte hints for me
If this works your next step is to create submenus to settings i hope
Nice work @Hero. Good to see that pointing you in the right direction helped you
@Hero don't work for me. Can you look in this file
https://dl.dropboxusercontent.com/u/72778206/Settings.apk
I updated the OP with the correct code. So for those of you who tried the mod and it didn't work - it should now. Sorry about that. Also, I just figured out how to add a custom tab to the settings menu so I'll be updating my "reserved" post with instructions on how to do that a little later on.
chrisch1974 said:
Nice work Hero. Good to see that pointing you in the right direction helped you
Click to expand...
Click to collapse
Many thanks :good:
acer73 said:
@Hero don't work for me. Can you look in this file
https://dl.dropboxusercontent.com/u/72778206/Settings.apk
Click to expand...
Click to collapse
From what I can tell, you don't have any of the smali code from the OP in your Settings.apk. Correct me if I'm wrong.
Hero said:
I updated the OP with the correct code. So for those of you who tried the mod and it didn't work - it should now. Sorry about that. Also, I just figured out how to add a custom tab to the settings menu so I'll be updating my "reserved" post with instructions on how to do that a little later on.
Many thanks :good:
From what I can tell, you don't have any of the smali code from the OP in your Settings.apk. Correct me if I'm wrong.
Click to expand...
Click to collapse
@Hero, please tell me where i jump smali code. I'm going crazy to understand. Thanks
Hero said:
I updated the OP with the correct code. So for those of you who tried the mod and it didn't work - it should now. Sorry about that. Also, I just figured out how to add a custom tab to the settings menu so I'll be updating my "reserved" post with instructions on how to do that a little later on.
Many thanks :good:
From what I can tell, you don't have any of the smali code from the OP in your Settings.apk. Correct me if I'm wrong.
Click to expand...
Click to collapse
do you know how to add menu on homescreen and custom entries in that menu on sense 5 ?
JEANRIVERA said:
do you know how to add menu on homescreen and custom entries in that menu on sense 5 ?
Click to expand...
Click to collapse
What do you mean adding a menu to the homescreen? So far, I only know how to add a custom app to the settings menu and a custom tab to the settings menu (no guide for adding a custom tab to the settings menu yet).
Hero said:
What do you mean adding a menu to the homescreen? So far, I only know how to add a custom app to the settings menu and a custom tab to the settings menu (no guide for adding a custom tab to the settings menu yet).
Click to expand...
Click to collapse
This is what I mean it is not present on stock Rom just on some custom roms
Sent from my HTC One using Tapatalk 2
Settings Menu Background
Is there a script change to change the background colour of the settings menu ???
Any help appreciated.
Thanks,
Yans
Ok, maybe you can help. Using your tutorial I add all items. My new entry shows up but I'm getting an error when tapping it. Code is below
AndroidManifest.xml intent of my app I want to launch
Code:
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN"
<action android:name="com.jmz.led.enabler.LAUNCH" />
</intent-filter>
My HtcWrapHeaderInfo.smali method
Code:
.method static getTweaks()Lcom/android/settings/framework/activity/HtcWrapHeader;
.locals 4
new-instance v0, Lcom/android/settings/framework/activity/HtcWrapHeader;
invoke-direct {v0}, Lcom/android/settings/framework/activity/HtcWrapHeader;-><init>()V
sget-object v1, Lcom/android/settings/framework/activity/HtcWrapHeader$Type;->NORMAL:Lcom/android/settings/framework/activity/HtcWrapHeader$Type;
iput-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->type:Lcom/android/settings/framework/activity/HtcWrapHeader$Type;
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const-wide/32 v2, 0x7f080296 # id
iput-wide v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->id:J
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const v2, 0x7f0201f7 # drawable
iput v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->iconRes:I
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
const v2, 0x7f0b0f80 # string
iput v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->titleRes:I
iget-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->info:Lcom/htc/preference/HtcPreferenceActivity$Header;
new-instance v2, Landroid/content/Intent;
const-string v3, "android.intent.action.MAIN"
invoke-direct {v2, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v3, "com.jmz.led.enabler.action.LAUNCH"
invoke-virtual {v2, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
move-result-object v2
iput-object v2, v1, Lcom/htc/preference/HtcPreferenceActivity$Header;->intent:Landroid/content/Intent;
const-string v1, "jmz"
iput-object v1, v0, Lcom/android/settings/framework/activity/HtcWrapHeader;->anchor:Ljava/lang/String;
invoke-static {}, Lcom/android/settings/framework/app/HtcSettingsApplication;->getApplication()Landroid/app/Application;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/android/settings/framework/activity/HtcWrapHeader;->prepareExtraInfo(Landroid/content/Context;)V
return-object v0
.end method
And my error message in logcat
W/System.err(15369): android.content.ActivityNotFoundException: No Activity foun
d to handle Intent { act=com.jmz.led.enabler.action.LAUNCH }
I/ActivityManager( 552): START {act=com.jmz.led.enabler.action.LAUNCH u=0} from
pid 15369
W/System.err(15369): at android.app.Instrumentation.checkStartActivityResult(
Instrumentation.java:1671)
W/System.err(15369): at android.app.Instrumentation.execStartActivity(Instrum
entation.java:1542)
W/System.err(15369): at android.app.Activity.startActivityForResult(Activity.
java:3409)
W/System.err(15369): at android.app.Activity.startActivityForResult(Activity.
java:3370)
W/System.err(15369): at android.app.Activity.startActivity(Activity.java:3580
)
W/System.err(15369): at android.app.Activity.startActivity(Activity.java:3548
)
W/System.err(15369): at com.htc.preference.HtcPreferenceActivity.onHeaderClic
k(HtcPreferenceActivity.java:1292)
W/System.err(15369): at com.android.settings.Settings.onListItemClick(Setting
s.java:707)
W/System.err(15369): at android.app.ListActivity$2.onItemClick(ListActivity.j
ava:319)
W/System.err(15369): at android.widget.AdapterView.performItemClick(AdapterVi
ew.java:298)
W/System.err(15369): at android.widget.AbsListView.performItemClick(AbsListVi
ew.java:1144)
W/System.err(15369): at android.widget.ListView.access$401(ListView.java:94)
W/System.err(15369): at android.widget.ListView$CheckForItemReleased.run(List
View.java:4373)
W/System.err(15369): at android.os.Handler.handleCallback(Handler.java:615)
W/System.err(15369): at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err(15369): at android.os.Looper.loop(Looper.java:155)
W/System.err(15369): at android.app.ActivityThread.main(ActivityThread.java:5
520)
W/System.err(15369): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err(15369): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err(15369): at com.android.internal.os.ZygoteInit$MethodAndArgsCalle
r.run(ZygoteInit.java:1029)
W/System.err(15369): at com.android.internal.os.ZygoteInit.main(ZygoteInit.ja
va:796)
W/System.err(15369): at dalvik.system.NativeStart.main(Native Method)
E/Settings:Settings(15369): No activity found for header 2131431296, exception:a
ndroid.content.ActivityNotFoundException: No Activity found to handle Intent { a
ct=com.jmz.led.enabler.action.LAUNCH }
Click to expand...
Click to collapse

[APP] [XPERIA JB 4.2.2] Serajr Swiping Power Toggles - SystemUI - v2 - 28/11/13

I proudly brought to you my new creation, it´s titled: Swiping Power Toggles
Here´s a brief explanation:
As you can see here, android has been used Navigation Drawer as its main options panel on apps like Gmail, Play Store, and so on. And it has been used as main options panel on many other 3th party apps too.
Navigation Drawer was developed meant for Activites with Action Bar and Fragments (regular apps), and not be used within android services... worse, core system services like SystemUI (aka Status Bar).
But... why not? Here´s the funniest and the best part of this short history, IT SUITS THERE TOO!!!
Not directly with its DrawerLayout, but with mine one, tittled CustomDrawerLayout. That´s it!!
Here are some proofs:
Watch HD 720p video
Status Bar and Swiping Power Toggles v2
{
"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"
}
Swiping Power Toggles v2 - Preferences
Install:
TRY AT YOUR OWN RISK!!!
Requeriments:
- Xperia L deodexed Stock JB 4.2.2 firmware (any other one starting with 4.0.3, if properly ported)
- System signatures compare disabled (super-user mod) inside Services.jar (see 3th post for further info)
Download mirros:
- Dev-Host
- G-Drive
Flash
1. Download Serajr_Swiping_PowerToggles_v2.zip and put it on your sdcard root
2. Flash it while on recovery
3. Done!
Manually
1. Download Serajr_Swiping_PowerToggles_v2.zip to your computer
2. Extract its contents
3. Push SystemUI.apk and Settings.apk to system/app/ with rw-r--r-- permissions
4. Reboot phone
5. Done!
Developers/Rom cookers info:
How can I show up Power Toggles settings screen from my own code?
Power Toggles settings screen activity has "exported" flag set to "true", so:
Under Java:
PHP:
Intent intent = new Intent("com.serajr.powertoggles.preferences.intent.PREFERENCES");
startActivity(intent);
or
Inside Settings.apk \xml preferences folder:
Code:
<com.sonymobile.settings.preference.IntentPreference android:key="power_toggles" settings:dependOnResource="true" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
<intent android:targetPackage="com.android.systemui" android:targetClass="com.serajr.powertoggles.preferences.PowerTogglesPreferencesActivity" />
</com.sonymobile.settings.preference.IntentPreference>
Known issues:
- Some animations will seem slow due the system is processing its toggle in background
- Delaying top edge while swiping to open or close Power Toggles drawer (minor DrawerLayout bug?!)
- Sometimes Battery toggle icon becomes completly colored with accent color (minor issue, I´ll fixed it asap!)
To do:
You tell me!!
Special thanks: (if I forgot someone, please remember me!!)
- Sony
- CM Team
- @niaboc79 for "brainstorming" with me about everything you see here
- Other ones inside Power Toggles "About" screen
If you like it, press thanks... Simple so!!
.
.
Changelog
v2 - 28/11/2013
- Entirely new look and feel
- Fully working new Camera toggle (Tap it to start camera preview, tap it again to take pictures. Long-press it to stop camera preview)
- 29 toogles set (added Camera toggle)
- Double colored static icons with current theme accent color
- New icons set (A very big THANKS to my friend @niaboc79)
- New toggling flip animation
- Fixed "take screenshot" issue
v1 - 18/11/2013
- Initial 4.2.2 release
- New and unprecedented android Navigation Drawer (DrawerLayout) widget inside SystemUI service!!
- Swipe expanded status bar left edge to show up Power Toggles
- 28 toogles set
- Power Toggles buttons and preferences according to theme accent color
How to disable your system applications signature check
TRY IT AT YOUR OWN RISK!!
1. Decompile your deodexded services.jar
2. Open ...\com\android\server\pm\PackageManagerService.smali with notepad++
3. Find compareSignatures method (Original method)
4. Replape Original method with Patched method:
Original method:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.registers 9
.parameter "s1"
.parameter "s2"
.prologue
.line 2338
if-nez p0, :cond_8
.line 2339
if-nez p1, :cond_6
const/4 v6, 0x1
.line 2358
:goto_5
return v6
.line 2339
:cond_6
const/4 v6, -0x1
goto :goto_5
.line 2343
:cond_8
if-nez p1, :cond_c
.line 2344
const/4 v6, -0x2
goto :goto_5
.line 2346
:cond_c
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 2347
.local v3, set1:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p0
.local v0, arr$:[Landroid/content/pm/Signature;
array-length v2, v0
.local v2, len$:I
const/4 v1, 0x0
.local v1, i$:I
:goto_14
if-ge v1, v2, :cond_1e
aget-object v5, v0, v1
.line 2348
.local v5, sig:Landroid/content/pm/Signature;
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 2347
add-int/lit8 v1, v1, 0x1
goto :goto_14
.line 2350
.end local v5 #sig:Landroid/content/pm/Signature;
:cond_1e
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
.line 2351
.local v4, set2:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_26
if-ge v1, v2, :cond_30
aget-object v5, v0, v1
.line 2352
.restart local v5 #sig:Landroid/content/pm/Signature;
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 2351
add-int/lit8 v1, v1, 0x1
goto :goto_26
.line 2355
.end local v5 #sig:Landroid/content/pm/Signature;
:cond_30
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_38
.line 2356
const/4 v6, 0x0
goto :goto_5
.line 2358
:cond_38
const/4 v6, -0x3
goto :goto_5
.end method
Patched method:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.registers 9
.parameter "s1"
.parameter "s2"
.prologue
.line 2338
const/4 v2, 0x0
return v2
.end method
5. Compile it
Now you need to try to replace your services.jar with patched one... again, TRY IT AT YOUR OWN RISK!!
6. With Root Explorer copy patched services.jar to /system/ and give it rw-r--r-- permissions
[x] [x] [ ]
[x] [ ] [ ]
[x] [ ] [ ]
Thumbs
Proofs!!
serajr said:
- @niaboc79 for "brainstorming" with me about everything you see here
If you like it, press thanks... Simple so!!
.
.
Click to expand...
Click to collapse
Yeah :highfive:
Will port and try that right now :laugh:
Awesomenes I saw somwhere that this will be available for ICS?
Sent from my ST21i using Tapatalk 2
nice:good:
Working great on my Xperia Z my friend-
I am loving it!
Envoyé de mon C6603 en utilisant Tapatalk
it works but i cant make screenshot
Awesome!!
Nice work serajr. Cant describe how beauty this little baby
via Tapatalk.
djedjy said:
Awesomenes I saw somwhere that this will be available for ICS?
Sent from my ST21i using Tapatalk 2
Click to expand...
Click to collapse
Yep... It is!! I´m gonna prepare a guide showing how to implement Navigation Drawer inside SystemUI, and believe me, it´s easy with my CustomDrawerLayout widget!!
niaboc79 said:
Working great on my Xperia Z my friend-
I am loving it!
Envoyé de mon C6603 en utilisant Tapatalk
Click to expand...
Click to collapse
Oh... really fast bro!!! So porting it is easy isn´t it?
Please, if you create a thread for it, let me know!!
ZN6 said:
Awesome!!
Nice work serajr. Cant describe how beauty this little baby
via Tapatalk.
Click to expand...
Click to collapse
Thanks bro... This is just its begining!!
Its really awesome! Thank you Serajr!
You did it again @serajr, bravo...
thanks friends....for power toggle on 422
great...good...:good::good:
Serajr... my phone is kinda crazy after replacing services.jar... it boots, and after one minute, it reboots and shows "android is upgrading" and "optimizing 55 apps"...
I have a services.jar backup... how can i restore it?
You are the boss in xperia L development, i would also like to learn how you edited smali files , if you can write some tutorial for it !
Thanks serajr for the awsome toggles.
but by using this, I lost my "swipe up anywhere on the notification area to close notifications" feature of 4.2.2 I have to use the handler line (below carrier label) to close it as normal in previous versions please fix it when you have some time
Awesome work bro! Working perfectly!!
Can you increase width little? As in Xperia home launcher
Sent from my C2104 using Tapatalk
Can this be ported to Xperia p?
Sent from my Xperia P Running MoonWalker Rom and Nemesis Kernel Using XDA Premium
Svartehjerte said:
Serajr... my phone is kinda crazy after replacing services.jar... it boots, and after one minute, it reboots and shows "android is upgrading" and "optimizing 55 apps"...
I have a services.jar backup... how can i restore it?
Click to expand...
Click to collapse
Bro... just replace it manually with proper permissions, but at first boot (only on first) after replace services.jar system will create its dalvik-cache again!!
aniketroxx said:
You are the boss in xperia L development, i would also like to learn how you edited smali files , if you can write some tutorial for it !
Click to expand...
Click to collapse
Thanks bro... You can´t imagine amount of people asking me same thing!!! I think so.
It´s an old request and I´ll prepare something about... ok!!
shivamcheat said:
Thanks serajr for the awsome toggles.
but by using this, I lost my "swipe up anywhere on the notification area to close notifications" feature of 4.2.2 I have to use the handler line (below carrier label) to close it as normal in previous versions please fix it when you have some time
Click to expand...
Click to collapse
That is the onus from the bonus feature!
I guess I will not be able to fix that, cuz built-in Navigation Drawer consumes all touch events! But at least, I´m gonna try to fix ok!!
skad00sh said:
Awesome work bro! Working perfectly!!
Can you increase width little? As in Xperia home launcher
Sent from my C2104 using Tapatalk
Click to expand...
Click to collapse
Yep... If you want to do it by yourself, change dimens.xml red values (both same size):
Code:
<dimen name="custom_drawer_layout_width">[COLOR="Red"]210.0dip[/COLOR]</dimen>
<dimen name="power_toggles_button_height">70.0dip</dimen>
<dimen name="power_toggles_grid_width">[COLOR="red"]210.0dip[/COLOR]</dimen>
serajr;
Oh... really fast bro!!! So porting it is easy isn´t it?
Please said:
Don't you know that I am a serial porter
I will port it to JB 4.1.2 too
Of course I will ask you before to publish
Envoyé de mon C6603 en utilisant Tapatalk
Click to expand...
Click to collapse

[GUIDE][GB 2.3+]Add Android-N PlatLogo App To Your Device

{
"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"
}
SOURCE CODE AVAILABLE!
(Check At The End Of Post)​
/*I 'm Not Responsible For Any Damage Of Your Phone. Take Necessary Backup If You Are Indoubt.*/
Android is the most Popular, Flexible OS at present.
The number of smarphones users are increasing day-by-day, So as the Android Users.
Apparently, Android Official Updates are not availabe for all devices. So, some of you-Well Beings, Raise Up, Develop further their device's OS, Modify, Customize, and bring up the Android-Customization to its zenith.
Well, Customizing the Android is what makes us SMILE
So, I have a good news for you all Users (Devs & Noobs both)
Today, I, Aryan or you all can call me (A.R.), proudly presenting:
THE-​
Not wasting your that much precious time, lets jump on to the features:
Features:
1. All Density Support. No Matter, Whats Your Screen Size, This PlatLogo Will Surely Work Fine.
2. Customize your PlatLogo
3. Multiple Themes/Games
4. Beautiful Animations.​
Requirements:
1. De-compile your framework.jar. (In some cases like some Samsung Roms, and kitkat Roms it can be framework2.jar).
2. Know how to decompile JARs
3. PlatLogo app Download From-
mod edit - links removed
(If You Need To Just Test This App, You Are Free To Download It From Above)​
Procedure:
1. Decompile framework.jar
2. Go to smali/com/android/internal/app and open PlatLogoActivity.smali
3. Select all and replace it with this code:
Code:
.class public Lcom/android/internal/app/PlatLogoActivity;
.super Landroid/app/Activity;
.source "PlatLogoActivity.java"
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 12
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
.registers 7
.parameter "savedInstanceState"
.prologue
.line 16
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 18
new-instance v1, Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 19
.local v1, intent:Landroid/content/Intent;
new-instance v2, Landroid/content/ComponentName;
const-string v3, "com.aryan.nplatlogo"
const-string v4, "com.aryan.nplatlogo.PlatLogoActivity"
invoke-direct {v2, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v1, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 23
:try_start_16
invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/Intent;)V
:try_end_19
.catch Landroid/content/ActivityNotFoundException; {:try_start_16 .. :try_end_19} :catch_1d
.line 39
:goto_19
invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V
.line 41
return-void
.line 31
:catch_1d
move-exception v0
.line 35
.local v0, e:Landroid/content/ActivityNotFoundException;
const-string v2, "Install AndroidN PlatLogo By Aryan"
const/4 v3, 0x0
invoke-static {p0, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v2
invoke-virtual {v2}, Landroid/widget/Toast;->show()V
goto :goto_19
.end method
4. Recompile framework.jar, Push it into system/framework. Set correct permissions(rw-r--r--).
5. Install My Android-N Platlogo.
​
Credits:
iamareebjamal
[email protected]
Droidbuster​
If You Are Using This PlatLogo In Your ROM, Just Give A Credit To My Work.
If Your Liked My Work, Just Press Thanks Below:laugh:
-----------------------------------------------------------------------
LATEST EDIT: SOURCE CODE
mod edit - links removed ​
[emoji6] [emoji106]
https://youtu.be/DR2nhF3gf7E
Sent from my YU5510 using Tapatalk
thx, I wiil try
Awesome thank you
Awesome...I will try it asap...
awensome bro ???
Error recompiling... Here's the log and my modded file. Can you take a look? (I changed the extension of platlogo file, bc I can't attach smali files)
levone1 said:
Error recompiling... Here's the log and my modded file. Can you take a look? (I changed the extension of platlogo file, bc I can't attach smali files)
Click to expand...
Click to collapse
Well I have solved this before,,,
i know dont know what's the exact method...a bit confused...so i m posting two methods,
try each of them,,,hope it might work.
1. Use ROM TOOL BOX,, no other tool for decompiling nd recompiling jars.
VISIT HERE
2. Open PlatLogoActivity.java, paste my code, search ".parameters", and rename it to ".param"
I got the same error while recompiling what should I do ??
aryan_ar said:
Well I have solved this before,,,
i know dont know what's the exact method...a bit confused...so i m posting two methods,
try each of them,,,hope it might work.
1. Use ROM TOOL BOX,, no other tool for decompiling nd recompiling jars.
VISIT HERE
2. Open PlatLogoActivity.java, paste my code, search ".parameters", and rename it to ".param"
Click to expand...
Click to collapse
Thank you now its working fine ...
jayent said:
Thank you now its working fine ...
Click to expand...
Click to collapse
Which method did you use, 1 or 2? Did you just change parameter to param?
Thanks.Maybe I will try it.
Again same problem brother.I changed .parameter to .param in platlogoactivity.smali after pasting your code but unable to recompile framework2.jar.I attached my framework2.jar file.Can you do it for me?It will be nice of you
harsh09046 said:
Again same problem brother.I changed .parameter to .param in platlogoactivity.smali after pasting your code but unable to recompile framework2.jar.I attached my framework2.jar file.Can you do it for me?It will be nice of you
Click to expand...
Click to collapse
Sorry About That Problem, I Figured Out, The Problem Was In My smali Code.
Now, I 've Updated That.
By The Way, Here's Your Modded framework file:
aryan_ar said:
Sorry About That Problem, I Figured Out, The Problem Was In My smali Code.
Now, I 've Updated That.
By The Way, Here's Your Modded framework file:
Click to expand...
Click to collapse
Thanks brother.Thank You so much!
TJANKS
Thank you for this Guide sir.
@aryan_ar
This works well on Lollipop 5.1.1,but when I run this on GB 2.3,the Lollipop Land theme give me a force close.
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
cool! adding to my rom and will mention your name in credits
nice change works

[GUIDE][MOD][4.1+] How to add Blur background to your Recent Apps, Notification Panel

One line - One blur background
I will guide you to add blur background to recent apps panel, but you can add to any layout you want.​
Requirements
Apktool 2.0
SystemUI.apk (or any other app you want)
Notepad++ for editting
Brain.apk installed
LET'S START
- First, decompile your SystemUI.apk
- Download and extract simon_blur_background.zip (5.1 KB) then merge the smali folder to your decompiled folder.
- Open SystemUI.apk/smali/com/simonoid/blur/BlurImageView.smali
- Now find this method:
Code:
# direct methods
.method static constructor <clinit>()V
- Scroll a little bit down, you'll see this:
Code:
const/16 v0, 0x[B][COLOR="Blue"]320[/COLOR][/B]
sput v0, Lcom/simonoid/blur/BlurImageView;->HIGH:I
const/16 v0, 0x[COLOR="blue"][B]1e0[/B][/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->WIDHT:I
- Look at the BLUE hex code. It's my phone resolution (480x800 in hexadecimal is 1e0x320). You have to change it to match your device's resolution or it'll get FC error.
320 is the height
1e0 is the width
You can click HERE to convert decimal to hexadecimal number.
Or you can use some presets:
Code:
[COLOR="Red"]Decimal[/COLOR] = [COLOR="blue"]Hexadecimal[/COLOR]
[COLOR="Red"]480[/COLOR] = [COLOR="blue"]1e0[/COLOR]
[COLOR="Red"]540[/COLOR] = [COLOR="blue"]21c[/COLOR]
[COLOR="Red"]800[/COLOR] = [COLOR="blue"]320[/COLOR]
[COLOR="Red"]960[/COLOR] = [COLOR="blue"]3c0[/COLOR]
[COLOR="Red"]1080[/COLOR] = [COLOR="blue"]438[/COLOR]
[COLOR="Red"]1920[/COLOR] = [COLOR="blue"]780[/COLOR]
Then you can save it.
- Open SystemUI.apk/res/values/ids.xml and add this BLUE code (BLUE ONLY):
Code:
[COLOR="blue"]<item type="id" name="backgroundImageView">false</item>[/COLOR]
</resources>
Save it.
- Now go to the layout you want to add blur background, for example: SystemUI.apk/res/layout/status_bar_recent_panel.xml (for Recent Apps panel). Add the blue code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:background="@color/recents_background" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
[COLOR="Blue"]<com.simonoid.blur.BlurImageView android:id="@id/backgroundImageView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="centerCrop" />[/COLOR]
<FrameLayout android:id="@id/recents_bg_protect" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true">
<com.android.systemui.recent.NokiaRecentsHorizontalScrollView android:id="@id/recents_container" android:fitsSystemWindows="true" android:scrollbars="none" android:fadingEdgeLength="0.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layoutDirection="ltr">
<LinearLayout android:orientation="horizontal" android:id="@id/recents_linear_layout" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.recent.NokiaRecentsHorizontalScrollView>
</FrameLayout>
<include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>
- Now recompile your apk and push to your system. :fingers-crossed:
- Finally hit the Thanks :good: button and tell me if it works.
- If you're encountering any errors then post here (with log) so that I could help
NOTE: If you're going to add blur background in somewhere in framework-res.apk/res/layout and you don't know where to put the smali. Just put it in framework.jar :fingers-crossed:
For Android version lower than 4.3, try to change capture screenshot method in BlurImageView.smali
Find and replace all android/view/SurfaceControl with android/view/Surface
HOW TO CHANGE BLUR RADIUS, OPACITY, go to POST #8
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"
}
I have a silly question: Only work on 4.3+?How about GB 2.3?
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
zhaozihanzzh said:
I have a silly question: Only work on 4.3+?How about GB 2.3?
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
Click to expand...
Click to collapse
I've not tested on GB 2.3. But you can try it.
But there's a different method that should work on Gingbread.
Since GB doesnt support ScriptIntrinsicBlur, its getting hard to make it and throungh custom views, it became laggy. There is only one shot for here, FLAGS
Click to expand...
Click to collapse
It's "FLAG_BLUR_BEHIND". You can check it here: [GB]Blur Lockscreen (No moar bugs in statusbar)
SimonVN said:
I've not tested on GB 2.3. But you can try it.
But there's a different method that should work on Gingbread.
It's "FLAG_BLUR_BEHIND". You can check it here: [GB]Blur Lockscreen (No moar bugs in statusbar)
Click to expand...
Click to collapse
I have already followed this guide,but still thank you.And my friend tried your guideon JB 4.2 and he got a FC.Then from log,we realized that android/view/SurfaceControl is only for Android 4.4+.Lower system should use android/view/Surface.Finally,it works.[emoji4]
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
zhaozihanzzh said:
I have already followed this guide,but still thank you.And my friend tried your guideon JB 4.2 and he got a FC.Then from log,we realized that android/view/SurfaceControl is only for Android 4.4+.Lower system should use android/view/Surface.Finally,it works.[emoji4]
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
Click to expand...
Click to collapse
Thank you for notice that. android/view/SurfaceControl also works on my Android 4.3
I think lower version of JB works with android/view/Surface for capture screenshot method.
Glad to see it works on JB 4.2
how to more blur effect???
changing radius value
make it more bright
sorry dont know exactly how to ask
pankajdj007 said:
how to more blur effect???
changing radius value
make it more bright
sorry dont know exactly how to ask
Click to expand...
Click to collapse
You can edit these hex code to your decision.
Code:
[FONT="Tahoma"]# direct methods
.method static constructor <clinit>()V
.locals 1
const/4 v0, 0x[COLOR="Blue"]3[/COLOR] [COLOR="Red"]#This is for BLUR RADIUS[/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->RADIUS:I
const/16 v0, 0x[COLOR="blue"]320[/COLOR] [COLOR="red"]#HEIGHT[/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->HIGH:I
const/16 v0, 0x[COLOR="blue"]1e0[/COLOR] [COLOR="red"]#WIDTH[/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->WIDHT:I
const/high16 v0, 0x40f00000
sput v0, Lcom/simonoid/blur/BlurImageView;->DIVIDE:F
const/16 v0, 0x[COLOR="blue"]a5[/COLOR] [COLOR="red"]#OPACITY[/COLOR]
sput v0, Lcom/simonoid/blur/BlurImageView;->ALPHA:I[/FONT]
Thank you.
Hey there, great guide! Im looking to blur the background of notification shade, recent apps and the backgroud of the power menu on a 7.1.1 CM and AOSP rom but I dont think im editing the correct XMLs. You have any insight into where they would be on 7.1.1 roms?
There is no VALUE folder in my RES folder.
SimonVN said:
Click to expand...
Click to collapse
Thank you Simon. I tried 3 other guides and couldn't get the blur to work. This one works perfectly.
RealWelder said:
Thank you Simon. I tried 3 other guides and couldn't get the blur to work. This one works perfectly.
Click to expand...
Click to collapse
Hope you like it. You can also search for alliv settings guide to add an option to show/hide blur background.
SimonVN said:
Hope you like it. You can also search for alliv settings guide to add an option to show/hide blur background.
Click to expand...
Click to collapse
It is working, but the blurred image only changes if I reboot. I added an Observer and it still doesn't constantly update.
For example if I launch playstore the blurred image is still my homescreen wallpaper. How can I make constantly update?
SimonVN said:
Hope you like it. You can also search for alliv settings guide to add an option to show/hide blur background.
Click to expand...
Click to collapse
Sent from my SM-T210 using Tapatalk
Hey @SimonVN i'm adding ur smali code to a app to make it blur but i'm getting this error.
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getHeight()' on a null object reference
Thank you so much @SimonVN for this awesome mod
It works on my OnePlus 3 running 7.1.1
but there is a small problem ...when i use this in notification panel...the lockscreen wallpaper turns black
SilverElf1234 said:
Thank you so much @SimonVN for this awesome mod
It works on my OnePlus 3 running 7.1.1
but there is a small problem ...when i use this in notification panel...the lockscreen wallpaper turns black
Click to expand...
Click to collapse
Hi @SilverElf1234. I'm glad to hear that it works. Here how to solve problem with the lockscreen background on Android 4.4+. Remember to change the ids to match your system. Below quote is summarized for your case
and2 said:
...
Open PhaneStatusBar.smali and put the blue lines
Code:
.method makeExpandedInvisible()V
.locals 7
-
-
-
const-string v1, "makeExpandedInvisible is called when notifications are fling"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStackScroller:Lcom/android/systemui/statusbar/stack/NotificationStackScrollLayout;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/stack/NotificationStackScrollLayout;->setScrollPositionToTop()V
:cond_1
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
if-eqz v0, :cond_2
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
if-nez v0, :cond_3
:cond_2
:goto_0
[COLOR="Blue"] iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/NotificationPanelView;
const v1, 0x7f0e0473 [COLOR="Red"]#<public type="id" name="backgroundImageView"[/COLOR]
invoke-virtual {v3, v1}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->findViewById(I)Landroid/view/View;
move-result-object v4
check-cast v4, Landroid/widget/ImageView;
const/4 v3, 0x4
invoke-virtual {v4, v3}, Landroid/widget/ImageView;->setVisibility(I)V
[/COLOR]
return-void
:cond_3
sget-boolean v0, Lcom/android/systemui/statusbar/Feature;->upgradeLollipop:Z
if-nez v0, :cond_5
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mIsInQSEditMode:Z
if-eqz v0, :cond_5
open NotificationPanelView.smali and put the blue lines
Code:
.method private updateHeaderShade()V
.locals 3
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mHeaderAnimatingIn:Z
if-nez v1, :cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getPeekHeight()F
move-result v0
iget v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mExpandedHeight:F
cmpg-float v1, v1, v0
if-gtz v1, :cond_1
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mHideHeader:Z
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mHeader:Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;
iget v2, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mExpandedHeight:F
sub-float/2addr v2, v0
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setTranslationY(F)V
:cond_0
:goto_0
iget v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mQsExpansionHeight:F
invoke-direct {p0, v1}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->setQsTranslation(F)V
[COLOR="Blue"] const v1, 0x7f0e0473 [COLOR="Red"]#<public type="id" name="backgroundImageView"[/COLOR]
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Landroid/widget/ImageView;
const/4 v2, 0x0
invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setVisibility(I)V[/COLOR]
return-void
:cond_1
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mHideHeader:Z
goto :goto_0
.end method
Be sure the "v" is matching the surrounding code
...
Click to expand...
Click to collapse
nic work bro
---------- Post added at 01:45 PM ---------- Previous post was at 01:44 PM ----------
worked in my port rom
SimonVN said:
Hi @SilverElf1234. I'm glad to hear that it works. Here how to solve problem with the lockscreen background on Android 4.4+. Remember to change the ids to match your system. Below quote is summarized for your case
Click to expand...
Click to collapse
im really sorry but i dont have knowledge about whats going on inside those smali file and can't really find anything matching to the above stuff
i have attached my PhoneStatusbar.smali and NotificationPanelView.smali here can you please take a look at those
Thank You
@SimonVN I am on Oneplus 3T using oxygen os rom. After decompiling the systemui.apk there is no smali folder. Is there another way to add it?

Categories

Resources