[MOD] MyVerizon For LTE - Thunderbolt Android Development

EDIT: these changes have to be made using baksmali/smali by someone that knows how to do it. I do not post apks on XDA, unless they are mine, I have permission, or are part of the stock rom.
Please don't post the APK links in my thread, this is solely for educational purposes, I don't recommend you run a patched app on your phone. Running a patched verzion of this could be harmful to your device, or Verizon's network. I don't run it.
We were notified by a confirmed Verizon developer that this might cause damage to your phone. Don't use it. Leaving it here for historical knowledge.
I am posting the patch details not the apk. So hate all you want, someone else can apply it and upload if they want.
Credit to vinylfreak
Change
com/vzw/hss/myverizon/main/mediator/SplashMediator.smali
line: 789
Code:
if-eqz v4, :cond_1
change to
Code:
if-nez v4, :cond_1
re-assemble.
Might not work for all, might not have all features working, but works for me on 3g.
{
"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...nice

*sigh* need to fix my vmware to get me dev environment back. Wish someone would mod it. If I got to it first (doubtful) I'll upload.

Wow this thread is going places....
Sent from my ADR6400L using Tapatalk

So back on topic! Any reason we can see why verizon won't release this officially? Any know issues with this?

Jcase,
You should know there are hundreds of people who enjoy your work and it works for them so well they never post.
You know what they say, someone with something negative to say is ten times more likely to talk about it than someone with a positive opinion.
I've been meaning to get off my butt and learn how to do this stuff anyway, so its just as well you didn't post the apk. Thx for the tip!
Jaywan: you do know women contribute to / frequent xda too, right? Respect them much?
Sent from my ADR6400L using Tapatalk

So back on topic again. Anyone willing to hack this so I can save me some time?

since it was my idea... im kinda working on its... its half working... dont wanna post something that i'll get *****ed at about...
my changes: DeviceManager$LTE Checker.smali
.line 558
if-nez v2, :cond_69
if-nez v1, :cond_69
const/4 v4, 0x1
to
.line 558
if-nez v2, :cond_69
if-nez v1, :cond_69
const/4 v4, 0x0
and....
.line 558
:cond_69
const/4 v4, 0x1
to
.line 558
:cond_69
const/4 v4, 0x0

vinylfreak89 said:
since it was my idea... im kinda working on its... its half working... dont wanna post something that i'll get *****ed at about...
my changes: DeviceManager$LTE Checker.smali
.line 558
if-nez v2, :cond_69
if-nez v1, :cond_69
const/4 v4, 0x1
to
.line 558
if-nez v2, :cond_69
if-nez v1, :cond_69
const/4 v4, 0x0
and....
.line 558
:cond_69
const/4 v4, 0x1
to
.line 558
:cond_69
const/4 v4, 0x0
Click to expand...
Click to collapse
I cheated on my version haha

yea but it still works better than mine right now LOL

Great patch jcase! Question: Where the heck does all of that 377GB go? One last thing...

377GB, wow that is impressive. Tether much? lol

necosino said:
377GB, wow that is impressive. Tether much? lol
Click to expand...
Click to collapse
That is only ~368 MB. A few days worth of streaming pandora

Pretty sad that the community fixed verizon's app before them

evillozer said:
That is only ~368 MB. A few days worth of streaming pandora
Click to expand...
Click to collapse
Yup.. That's what I get for just glancing over the photo and reading posts, lol..

luniz7 said:
Pretty sad that the community fixed verizon's app before them
Click to expand...
Click to collapse
Ha that is what I thought..
Bolted.....

Anyway we can get this in a .apk or a flashable zip?

first edit was extraneous... still not 100 % on it working tho. certainly does over wifi. 3g/4g.... im still getting errors... will continue to look in to it.
.line 558
:cond_69
const/4 v4, 0x1
to
.line 558
:cond_69
const/4 v4, 0x0
is the only needed edit.

where on the phone do u make these changes???

poloboogie said:
where on the phone do u make these changes???
Click to expand...
Click to collapse
Changes are being made in My Verizon App

Related

[HowTo] Add a Reboot option to the power menu (Froyo)

Advanced users only!
I get soo many PM's asking how to do this, even tho I have never done anything like this before, so, here it is;
Grab baksmali/smali
Grab a deodexed version of android.policy.jar, or do it yourself.
Open the jar file with a zip program and extract classes.dex (7zip)
Decompile classes.dex
java -jar baksmali1.2.4.jar -o classout/ classes.dex
Navigate to \classout\com\android\internal\policy\impl
Make a copy of GlobalActions$4.smali in the same directory
Name it GlobalActions$8.smali
Open GlobalActions$8.smali in a decent text editor (Notepad++)
Find and replace all instances of GlobalActions$4 with GlobalActions$8
Replace the onPress method with this one:
Code:
.method public onPress()V
.registers 3
const-string v0, "Reboot Now"
invoke-static {v0}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
.end method
save and close
Open GlobalActions.smali
In the createDialog method we need to increase the array length by 1
Find: (line 430)
Code:
const/4 v9, 0x4
Change to:
Code:
const/4 v9, 0x5
next we add the new menu item
Add before "const/4 v1, 0x3" on line 508
Code:
const/4 v1, 0x4 # position in the menu array
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;
const v3, 0x1080030 # power icon
const v4, 0x010402d7 # reboot string
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
save and close
Compile a new classes.dex
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
Open the jar file with a zip program and add the new classes.dex overwritting the old one (7zip)
Push it back to your phone and reboot!
All done!
{
"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 to untermensch in the Vibrant forum for his original mod.
Nice writeup...again lol. May be handy
smokestack76 said:
Nice writeup...again lol. May be handy
Click to expand...
Click to collapse
Thanks
NiXXed is making a n00b friendly pre-edited version...
smokestack76 said:
Nice writeup...again lol. May be handy
Click to expand...
Click to collapse
Nice write up indeed.
for me, i'll have to settle with mobile terminal and "reboot" command.
ppl dun bother DG. he's busy.. lol
Just use switch pro.
Sent from my SAMSUNG-SGH-I897 using XDA App
Working on this now for my existing mods (http://forum.xda-developers.com/showthread.php?t=799511).
I'll have a version up shortly for:
-JI6 stock + reboot now only
-Android/Tap lock + reboot now
-Android/Tap lock + reboot now deodexed
NiXXeD said:
Working on this now for my existing mods (http://forum.xda-developers.com/showthread.php?t=799511).
I'll have a version up shortly for:
-JI6 stock + reboot now only
-Android/Tap lock + reboot now
-Android/Tap lock + reboot now deodexed
Click to expand...
Click to collapse
Nice job NiXXeD!
This was already/originally posted by untermensch on the vibrant forums...
http://forum.xda-developers.com/showthread.php?t=811532
rafyvitto said:
This was already/originally posted by untermensch on the vibrant forums...
http://forum.xda-developers.com/showthread.php?t=811532
Click to expand...
Click to collapse
Not sure what your intent is, but...
Read the op, credit was given, also read the code, its not the same, I also posted in his thread saying I ported it over.
Can we get this worked into CDE pls. I was searching forever for this
Sent from my SAMSUNG-SGH-I897 using Tapatalk
irtehun said:
Can we get this worked into CDE pls. I was searching forever for this
Sent from my SAMSUNG-SGH-I897 using Tapatalk
Click to expand...
Click to collapse
NiXXeD is making some files you can just push onto the phone, I was going to post mine buy it has stock lock as well...
http://forum.xda-developers.com/showthread.php?t=799511
He will be posting them soon I am sure.
I'm too chicken to try this myself, but I would love to see it in Cog Beta 8
xtremeskier said:
I'm too chicken to try this myself, but I would love to see it in Cog Beta 8
Click to expand...
Click to collapse
It is already in
Doing some other stuff too, will be a couple days...
designgears said:
Not sure what your intent is, but...
Read the op, credit was given, also read the code, its not the same, I also posted in his thread saying I ported it over.
Click to expand...
Click to collapse
What a Hater.... Thanks dg I'm going to give this a shot... I appreciate your work..
Sent from my SAMSUNG-SGH-I897 using Tapatalk
designgears said:
It is already in
Doing some other stuff too, will be a couple days...
Click to expand...
Click to collapse
You da man DG! Love your work. Keep fighting the good fight!
designgears said:
It is already in
Doing some other stuff too, will be a couple days...
Click to expand...
Click to collapse
I'm starting to fear my phones strength. Cant wait to flash beta 8.
JBLogic said:
I'm starting to fear my phones strength. Cant wait to flash beta 8.
Click to expand...
Click to collapse
As long as it doesn't become self aware I think we are safe. But with DG (and the others) on the job who knows what's coming in the next ROM
I tried to work it into CDE Beta 3, but the GlobalActions.smali portion was different; i couldn't find the code to change. I found simularities, but it resulted in a hardcrash whenever I tried to bring the menu up. Anyone have any insight on how to do this in CDE Beta 3?
geokhentix said:
I tried to work it into CDE Beta 3, but the GlobalActions.smali portion was different; i couldn't find the code to change. I found simularities, but it resulted in a hardcrash whenever I tried to bring the menu up. Anyone have any insight on how to do this in CDE Beta 3?
Click to expand...
Click to collapse
Hmm, should be the same, that it was I used to start with.
designgears said:
Hmm, should be the same, that it was I used to start with.
Click to expand...
Click to collapse
Code:
const/4 v0, 0x4
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
was nowhere to be found in the document, the closest i could find was
Code:
new-array v0, v9, [Lcom/android/internal/policy/impl/GlobalActions$Action;
and const/4 v0, 0x4 is nowhere near that line.
Late edit; this is the only time in my GlobalActions.smalo where "new-array" exists;
Code:
.line 222
new-array v0, v9, [Lcom/android/internal/policy/impl/GlobalActions$Action;
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v2, v0, v1

Back Button Unresponsiveness SOLVED! :)

Hi guys. Just got the SII two week ago. I thought I was imagining things but the back button was a bit unresponsive. Tried Googling it and I stumbled upon a site talking about back button problems for the first Galaxy S. It recommended to type in *#*#2663#*#* and it brought out a touch screen version menu. Clicked update on both buttons, reboot, and it fixed my problem! Amazing!
I'd like to ask though if there are other update hardware firmware commands like this for the Galaxy S II? It's strange that firmware updates for the hardware aren't automatically performed along with the software updates.
P.S.
The update changed my phone's "Part's Touch key FW version" from 0x4 to 0x7 and it solved my back button unresponsiveness.
Just tried this. Will see if its helps.
Thanks
Do you know if this solution improves responsiveness of the MENU button as well? I posted a thread here earlier describing what I thought was one small issue on my S2: http://forum.xda-developers.com/showthread.php?p=17084207
I noticed a decreased sensitivity in both the soft touch buttons (Menu & Back) as opposed to the sensitivity on the actual touchscreen area. I just thought it was strange. Maybe you had the same scenario?
Thanks for the tip, but mine stays same after the update, 0x4 for the touch key version and 0x16 TSP FW version. I think the updated version depends on the firmware, as I am on KF3, an older build 0x4 is the upper limit
Also I've noticed that only inputting *#2663# works, no need to type that much
Regards.
I think the menu button isn't responsive because if the software itself?
Try rebooting the phone after the update. You might see your firmware version change like I did.
Sent from my GT-I9100 using xda premium
prinzhernan said:
I think the menu button isn't responsive because if the software itself?
Try rebooting the phone after the update. You might see your firmware version change like I did.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Rebooted, still same. Now I am sure it's related with your firmware
ithehappy said:
Rebooted, still same. Now I am sure it's related with your firmware
Click to expand...
Click to collapse
Hmm. Odd. Try it again? Because I pressed a few times on mine to update. I'm on lightning 6.1. Been having the back button thing since stock kf1
Sent from my GT-I9100 using xda premium
Мine stays at 04 after a couple of clicks too.
It shows updating but my data connection stays idle. So it doesnt do anything network related.
Ofcourse it can be wi fi only but i cant try it right now.
Regards.
Im on kh3 - no change from 0x16 &0x4
Sent from my GT-I9100 using XDA App
I did this update for kicks, it say update completed but still at 0x4
Try to reboot it. Mine got updated to 0x7.
Sent from my GT-I9100 using XDA App
Still at 0x4 for me.
Another updates like that: camera firmware update, but be careful with it. (there is whole topic about that)
so how many frimwares do we have here?
we have rom ,modem,csc,camera,buttons... are there more, like touch screen firmware or smthn
Update worked 0x7
Kg2 2.3.4
{
"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"
}
Sent from my GT-I9100
soyef said:
Update worked 0x7
Kg2 2.3.4
View attachment 709987
Sent from my GT-I9100
Click to expand...
Click to collapse
Its worked for me without a reboot. The change was visible after I've entered the code again.
soyef said:
Update worked 0x7
Kg2 2.3.4
View attachment 709987
Sent from my GT-I9100
Click to expand...
Click to collapse
I also got that same update on KG3.
I tried this (on O2's stock XWKF3). Before, it was:
Phone's Touch key FW version: 0x4
Part's Touch key FW version: 0x7
Now, it is:
Phone's Touch key FW version: 0x4
Part's Touch key FW version: 0xff
Could 0xff indicate a problem?
I'm on KG3. Before the update it was Phone's...: 0x4 and Part's...:0x7 .
Now it is Phone's...:0x4 and Part's...: 0x3 !!
What could this possibly mean? A downgrade??
Sent from my GT-I9100 using Tapatalk
No change after updating on kf6. Only became a problem after I applied a screen protector, but I don't want to scratch it, so I'm leaving it on. Switching to a kg3 based rom now. Lets see if that does anything
Sent from my GT-I9100 using XDA App
Use these codes at your own risk
http://www.2mknetwork.net/364/samsung-galaxy-s2-secret-codes.html
Sent from my GT-I9100 using XDA App

[HOWTO]Enable the Ripple lockscreen for XXLSJ

I don't know is there anyone having posted a guide to make ripple lockscreen works on XXLSJ with 240dpi~
So I just post it~
It's very easy for any people~
just decompile framework-res.apk with apktool;
then go to /res/values-hdpi/bools.xml, change the only "false" to "true";
rebuild it & done ~
( I've spended lots of time on looking for this on classes of android.policy.jar...
WTH.....)
PS:
after this there will be a option to toggle on/off the Ripple Effect in your Lock screen options~~
and the Ripple Effect will also been disable automaticly when you set a live wallpaper as your lockscreen background...
--------------------------------------------------------------------------------------------------------------------------------------------
I also find a way to make the max Lockscreen shortcuts numbers up to 4 ,instead of stock 3 ~
just easy, too
decompile SecSettings.apk with apktool;
go to smali\com\android\settings\lockscreenshortcut\LockScreenShortcutSettings.smali;
locat this line:
sput v0, Lcom/android/settings/lockscreenshortcut/LockScreenShortcutSettings;->MAX_SHORTCUT_ICON:I
then edit the line before it:
--const/4 v0, 0x3
++const/4 v0, 0x4
rebuild it & done ~
just one thing
To decompile and compile back framework-res.apk without errors, you must use apktool v1.4.2 to decompile and apktool v1.4.3 to compile back.
Best regards,
goolby
what we need now is a way to enable multi window support
the code is there but we need to find a way to use it
Or you could Download the zip to flash that someone made yesterday in the theme section.
Sent from my GT-I9100 using xda premium
How?
Could you, please, write a detailed step by step instruction on how to decompile and recompile with apktool.
Never done it, have no idea how to do that...
Thanks in advance
can u post a modified apk thx
bluefa1con said:
what we need now is a way to enable multi window support
the code is there but we need to find a way to use it
Click to expand...
Click to collapse
Won't work, as its systemUI dependent too i heard, or we can change dpi. lulz
<bool name="config_multiWindowSupportMultiInstance">false</bool>
what about ?
Get a zip file and Flash it
Sent from my GT-I9100 using xda premium
AW: [HOWTO]Enable the Ripple lockscreen for XXLSJ
I've got the Ripple-Effect.zip file.
Can i use Mobile Odin to flash this ?
My Firmware is the new released German JellyBean 4.1.2 DBT ?
Gesendet von meinem GT-I9100 mit Tapatalk 2
i suppose we can't get ink effect ?
sugni said:
i suppose we can't get ink effect ?
Click to expand...
Click to collapse
It think you can, read this http://forum.xda-developers.com/showthread.php?t=2034565
AngelWare said:
I've got the Ripple-Effect.zip file.
Can i use Mobile Odin to flash this ?
My Firmware is the new released German JellyBean 4.1.2 DBT ?
Gesendet von meinem GT-I9100 mit Tapatalk 2
Click to expand...
Click to collapse
Flash it in cwm recovery
Sent from my GT-I9100 using xda premium
Hey guys.. I need some SERIOUS Help!! Now I'm not a S2 owner but the Software we run (Android 4.1) is the exact same - that's why I had to post it here....
I tried this a few minutes back and the Ripple effect works really well but there's another problem which arises when I enable Ripple effect.... Look at the two pictures below - one before enabling and one after enabling....
{
"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"
}
Why is there loss of quality/contrast at the edges...? Whats even more weird is that I tried it from first again and things went even worst now.. before it was just the lockscreen... now the entire display of my phone went CRAZY - its almost completely dull with low contrast - full brightness doesn't help either.. its WORSE than before now!
I flashed back my stock framework-res.apk to get things back to normal......
(any help would be appreciated) THANKS!
Sami Kabir said:
Hey guys.. I need some SERIOUS Help!! Now I'm not a S2 owner but the Software we run (Android 4.1) is the exact same - that's why I had to post it here....
I tried this a few minutes back and the Ripple effect works really well but there's another problem which arises when I enable Ripple effect.... Look at the two pictures below - one before enabling and one after enabling....
Why is there loss of quality/contrast at the edges...? Whats even more weird is that I tried it from first again and things went even worst now.. before it was just the lockscreen... now the entire display of my phone went CRAZY - its almost completely dull with low contrast - full brightness doesn't help either.. its WORSE than before now!
I flashed back my stock framework-res.apk to get things back to normal......
(any help would be appreciated) THANKS!
Click to expand...
Click to collapse
I know if I enable ripple effect I lose colour. Its meant to be like that on the lock screen only.
Sent from my GT-I9100 using xda premium
Spartan199 said:
I know if I enable ripple effect I lose colour. Its meant to be like that on the lock screen only.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
I tried it again, and although the problem persisted it was only on the Lock Screen (again) but the entire screen went back to normal now...
but the thing is why does this happen?
(POST ADDED)
Did you take a look at this by any chance... this dude enabled a lot of things, including Ripple Effect - but doesn't have any Contrast issues on lock screen?
I know this thread is about ripple effect... any idea on smart stay?
im sure it's gotta be an option cause we have it on systemui and framework, it's there a way to enable it or any code?
any suggestions?
thanks!
SmartStay is included with my rom.
Signature
Sent from my Samsung GT-i9100M
ROM NeatRom Lite 4.6.1 XWLSN
Kernel: Philz 4.93.6 XWLSN (fixed)
Mods:
23 Fancy Toggles blue w/rt clock
Automatic Call Recorder
NeatRom Boot Animation
NeatRom Lockscreen button
Fixes
MW & Ripple Lockscreen On/Off fix
I asked maybe it's the same way for smartstay as it is for ripple
When I use a black wallpaper its noticeable. Probably because the water or something.
Sent from my GT-I9100 using xda premium
Made all your steps, but seems that there is no changes, used LS3 indian ROM, and there is no option for enable ripple on lockscreen, may I have to edit SystemUI or SecSettings?

[Tutorial] Adding new Activity Header/Sub Menu to Settings.apk

Hi Geeks
Here's a tutorial on how to add an Activity Header to Settings.apk​
Requirements:
1.Settings.apk
2.Notepad ++ or Editor Alternatives
3.Apktool to Decompile apk
4.A Little Common sense
Tutorial:
1. Decompile Settings.apk
2.Open to res/xml/settings_headers.xml
3.Lets take an example i want to Add "Maddy" as a activity header
{
"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"
}
add this line
Code:
<header android:icon="[COLOR="Brown"]@drawable/ic_settings_maddy[/COLOR]" android:id="[COLOR="SeaGreen"]@id/maddy_settings[/COLOR]" android:title="[COLOR="Purple"]@string/maddy_settings[/COLOR]" android:fragment="[COLOR="DarkOrange"]com.android.settings.Maddy[/COLOR]" />
The layout in settings_headers.xml is categorized. If you want submenu "Maddy" to appear after 'Apps' as shown,add the line after the line that says <header android:icon="@drawable/ic_settings_applications"..... as shown
Code:
<header android:icon="@drawable/ic_settings_applications" android:id="@id/application_settings" android:title="@string/applications_settings" android:fragment="com.android.settings.applications.ManageApplications" />
<header android:icon="@drawable/ic_settings_maddy" android:id="@id/maddy_settings" android:title="@string/maddy_settings" android:fragment="com.android.settings.Maddy" />
3.1-@drawable/ic_settings_maddy=This refers to the png in res/drawable-*dpi/ folder
Add a new png named ic_settings_maddy.png in res/drawable-*dpi/
It will be the Image that will show up in settings menu (The Wifi like icon in my case)
* = hdpi / mdpi /xhdpi /xxhdpi /xxxhdpi (Depends on your device)
3.2-@id/maddy_settings=This refers to id value in /res/values/ids.xml
Open res/values/ids.xml and add this code
Code:
<item type="id" name="maddy_settings">false</item>
3.3 - @string/maddy_settings = Refers to a string in res/values/strings.xml
Open strings.xml and add this code
Code:
<string name="maddy_settings">Your String here</string>
Add the string you wish to see in settings Submenu in place of 'Your String Here'
3.4-com.android.settings.Maddy = Refers to the smali file in smali/com/android/settings/
4. Open res/values/public.xml
and find the last line that says
<public type="xml" ...
like
Code:
<public type="xml" name="[I]somethig_something[/I]" id="[COLOR="Blue"]0x7f050053[/COLOR]" />
Note the Hex code in Blue.It can be different for you
and now add this line just after the last line of type="xml"
Code:
<public type="xml" name="maddy_settings" id="[COLOR="Red"]0x7f050054[/COLOR]" />
Also Note that the previous address in my case was 0x7f050053
so the new address will be "Previous address + 1(Hex addition)" i.e 0x7f050054
Replace 0x7f050054 with your calculated Address.
If your Address is 0x7f050039
Next Addres = 0x7f05003a
if your address is 0x7f05003f
next address = 0x7f050040
and so on..
5.Go to res/xml/
and add a new file named maddy_settings.xml
This xml would contain the Apps/Actions you wish to see inside the Submenu "Maddy"
Just like you see
Brightness
Screen timeout
etc etc
options when you click Display in Settings Menu
an example of what maddy_settings.xml may contain
PHP:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/maddy_settings"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<com.sonymobile.settings.preference.PreferenceCategory android:title="@string/uipref_title">
<PreferenceScreen android:icon="@drawable/cust_bar_wallpapers" android:title="@string/wallpaper_settings_title" android:key="wallpaper" android:fragment="com.android.settings.WallpaperTypeSettings" />
<com.sonymobile.settings.preference.IntentPreference android:icon="@drawable/ic_lighteffects" android:title="@string/light_effects_settings_title" android:key="light_effects" settings:dependOnIsValidIntent="true" settings:after="theme">
<intent android:targetPackage="com.sonymobile.settings.illumination" android:action="android.intent.action.MAIN" android:targetClass="com.sonymobile.settings.illumination.IlluminationSetting" />
</com.sonymobile.settings.preference.IntentPreference>
<com.sonymobile.settings.preference.IntentPreference android:icon="@drawable/homescreen_application_launcher" android:key="lockscreen" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
<intent android:action="com.sonyericsson.settings.intent.action.LOCKSCREEN" />
</com.sonymobile.settings.preference.IntentPreference>
</com.sonymobile.settings.preference.PreferenceCategory>
<com.sonymobile.settings.preference.PreferenceCategory android:title="@string/systemuipref_title">
<com.sonymobile.settings.preference.IntentPreference android:icon="@drawable/ic_systemui1" android:key="quicksettings" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
<intent android:action="com.sonymobile.intent.action.TOOLBAR_SETTINGS" />
</com.sonymobile.settings.preference.IntentPreference>
<com.sonymobile.settings.preference.IntentPreference android:icon="@drawable/ic_systemui2" android:key="power_toggles" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
<intent android:action="com.serajr.powertoggles.preferences.intent.PREFERENCES" />
</com.sonymobile.settings.preference.IntentPreference>
</com.sonymobile.settings.preference.PreferenceCategory>
</PreferenceScreen>
To Add these Apps/shortcuts to the submenu you just created,refer this guide [Tutorial] How to add any App/Option in Settings.apk by saqib nazm
Just use the new maddy_settings.xml to link your new apps/actions.
6.Open smali/com/android/settings/ and add a new file named Maddy.smali
paste this code in it
Code:
.class public Lcom/android/settings/Maddy;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "Maddy.java"
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 17
invoke-direct {p0}, Lcom/android/settings/SettingsPreferenceFragment;-><init>()V
return-void
.end method
# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
.locals 1
.parameter "savedInstanceState"
.prologue
.line 21
invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V
.line 23
const v0, [COLOR="Blue"]0x7f050054[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/settings/Maddy;->addPreferencesFromResource(I)V
.line 24
return-void
.end method
Find and replace "Maddy" with your smali name.
Smali names should always start with Capital Letters.
Also note the Hex code you added in Step 5.
replace 0x7f050054 with your Hex value.
7.Recompile your Apk and Done!
Note:
Should work with any versions of Xperia.
Also may work on other Devices,Please try and report.
Credits:
Saqib nazm : For teaching me all this!
DbcCabuslay : For Smali ideas
Jishnu Sur™ : For some Advice
Hit Thanks and Rate Good if you find it helpful and Motivate :good:​
Great guide, very nicely explained and elaborated :good: I hope this will help lots of users
saqib nazm said:
Great guide, very nicely explained and elaborated :good: I hope this will help lots of users
Click to expand...
Click to collapse
Thank you sir,for teachin me all this.
Good stuff.. glad to see you going ahead slowly..
Sent from my Nexus 5 using Tapatalk
Keep going Good work :good: All the Best !
Sent from my Nexus 5 using Tapatalk
Useful guide. Keep sharing this kind of stuffs.
vishal_android freak said:
Good stuff.. glad to see you going ahead slowly..
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Thank you!
Yes,the word slowly is so very important
Aman_Arora said:
Keep going Good work :good: All the Best !
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
BDFreak said:
Useful guide. Keep sharing this kind of stuffs.
Click to expand...
Click to collapse
Thank you Aman and Bd
Very good guide. Simple but very detailed. Better than many of the clustered one's! Congratulations..Keep up the good work!
Nice guide I was looking for something like this just this day.
Is it the same when adding sub menu inside another header like device_info_settings.xml?
Jishnu Sur™ said:
Very good guide. Simple but very detailed. Better than many of the clustered one's! Congratulations..Keep up the good work!
Click to expand...
Click to collapse
Thank you Jishnu
knightzero07 said:
Nice guide I was looking for something like this just this day.
Is it the same when adding sub menu inside another header like device_info_settings.xml?
Click to expand...
Click to collapse
This one is only for adding sub menus in main settings
For sub menu in device info,try studing "status" or "legal info" inside About to get an idea of how its referenced
Sent from my MT27i using Tapatalk
ok thanks @Madaditya
I was checking on that too. I'm adding codes without android:key
I guess it needs a key so it won't get fc.
Madaditya said:
Hi Geeks
Here's a tutorial on how to add an Activity Header to Settings.apk​
Click to expand...
Click to collapse
Why are you creating a new setting fragment? This is useless and complicated
You could have used this:
Code:
android:fragment="com.sonymobile.settings.GenericSettingsFragment"
This have been added by Sony since JB 4.2 and is allowing to create any new header with sub menus
Cheers
Great job !!!
Amazing tut, really useful!!!
@Pandemic ... was not exactly what were you needing?
niaboc79 said:
Why are you creating a new setting fragment? This is useless and complicated
You could have used this:
Code:
android:fragment="com.sonymobile.settings.GenericSettingsFragment"
This have been added by Sony since JB 4.2 and is allowing to create any new header with sub menus
Cheers
Click to expand...
Click to collapse
Wasn't aware of it
Thank you for guiding
Ill update this to the tut as well if the one doesn't exist
serajr said:
Amazing tut, really useful!!!
@Pandemic ... was not exactly what were you needing?
Click to expand...
Click to collapse
Thank u serajr
Yeah,pandemic got it.
We talked over the pm
Sent from my MT27i using Tapatalk
serajr said:
Amazing tut, really useful!!!
@Pandemic ... was not exactly what were you needing?
Click to expand...
Click to collapse
Yes bro @serajr
but i have it already i have moonwalker xposed in my settings with Xposed Modules and Xperia Xposed ^^
Brothers @serajr & @Madaditya
Sorry for spam but here just awesome ^^
Verstuurd vanaf mijn LT22i met Tapatalk
Pandemic said:
Brothers @serajr & @Madaditya
Sorry for spam but here just awesome ^^
Verstuurd vanaf mijn LT22i met Tapatalk
Click to expand...
Click to collapse
Wow... great bro... you got it!!
Once again, @Madaditya ... great job!
This kind of thread we want to see over xda!!
bro when i want recompaile i have this errors :
..\3-Out\Settings.apk\smali\com\android\settings\Maddy.smali[21,4] Error for input '.parameter': Invalid directive
..\3-Out\Settings.apk\smali\com\android\settings\Maddy.smali[21,15] mismatched input '"savedInstanceState"' expecting END_METHOD_DIRECTIVE
.
alinolaw71 said:
bro when i want recompaile i have this errors :
..\3-Out\Settings.apk\smali\com\android\settings\Maddy.smali[21,4] Error for input '.parameter': Invalid directive
..\3-Out\Settings.apk\smali\com\android\settings\Maddy.smali[21,15] mismatched input '"savedInstanceState"' expecting END_METHOD_DIRECTIVE
.
Click to expand...
Click to collapse
Are you using apktool 2? If so, you need to be using 1.5.2..
Sent from my C6603 using Tapatalk
Ticklefish said:
Are you using apktool 2? If so, you need to be using 1.5.2..
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
bro pls send link to me.

[TUT]How To Change The Battery Icon On Stock Xperia KitKat..UPDATED!!

(***NOW UPDATED WITH CHARGING ICONS!!****)​
** THIS GUIDE IS FOR STOCK XPERIA KITKAT ROMS ONLY. IF YOU'RE ON A KK ROM THAT ISN'T MADE BY SONY, LOOK AT MY FRIEND @Erhany'S GUIDE HERE: http://forum.xda-developers.com/showpost.php?p=56300485&postcount=1 **
Changing the battery icon on a stock KitKat rom isn't easy. Google have changed how the icon is created and it's no longer possible to just change some icons and a few xml files.
Or is it?
Sony have put their own spin on KitKat and, if you've got an official stock Xperia 4.4 rom, you can still change the icon very easily. You just have to do something a little different to before..
How To Do It
So this is what the stock icon looks like:
{
"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"
}
It's okay..but we wouldn't be here if we weren't the sort who liked to change things.
First, you'll need to decompile your SystemUI.apk.
I'm not going to tell you how to do that, there's lots of guides already on xda. Although I do recommend taking a look at Tickle My Android (tinyurl.com/ticklemyandroid). It's made by a very good friend of mine..
You're also going to need four types of tiles:
a lot of files called 'stat_sys_battery_100.png', 'stat_sys_battery_99.png', 'stat_sys_battery_98.png', etc
a lot of files called 'stat_sys_battery_charge_anim100.png', 'stat_sys_battery_charge_anim99.png, 'stat_sys_battery_charge_anim98.png, etc
a file called 'stat_sys_battery.xml'
and a file called 'stat_sys_battery_charge.xml'
You'll find those all over xda as well. I've attached the ones I've used in this post, just so you can try them out.
Adding The Images
You'll need to copy those image files into your 'drawable-?dpi' folder. This will vary according to your device, on my XZ it's 'drawable-xxhdpi'.
This will give Android images to use as your battery icon.
Then comes the fun part.
Editing The XML
Normally, you'll copy 'stat_sys_battery.xml' and 'stat_sys_battery_charge.xml' into your drawable folder, overwriting the files that are already there.
There is no 'stat_sys_battery.xml' or 'stat_sys_battery_charge.xml' in KitKat.
Instead, rename 'stat_sys_battery.xml' to 'somc_sys_battery.xml'. And rename 'stat_sys_battery_charge.xml to 'somc_sys_charging.xml'. Then copy them into your drawable folder.
This will tell Android which images to use for each amount of charge in the battery.
Now edit status_bar.xml and change this piece of code:
Code:
<LinearLayout android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginStart="4.0dip">
<ImageView android:layout_gravity="center_vertical" android:id="@id/status" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<LinearLayout android:id="@id/battery_meter" android:layout_width="wrap_content" android:layout_height="fill_parent">
<ImageView android:layout_gravity="center_vertical" android:id="@id/battery_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/stamina_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/somc_sys_powersaver" />
</LinearLayout>
<FrameLayout android:id="@id/battery_percent" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.sonymobile.systemui.statusbar.BatteryImage android:layout_gravity="start|center" android:id="@id/battery_percent_bg" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>
to:
Code:
<LinearLayout android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginStart="4.0dip">
<LinearLayout android:id="@id/battery_meter" android:layout_width="wrap_content" android:layout_height="fill_parent">
<ImageView android:layout_gravity="center_vertical" android:id="@id/status" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/battery_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/stamina_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/somc_sys_powersaver" />
</LinearLayout>
<FrameLayout android:id="@id/battery_percent" android:layout_width="wrap_content" android:layout_height="fill_parent">
<com.sonymobile.systemui.statusbar.BatteryImage android:layout_gravity="start|center" android:id="@id/battery_percent_bg" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>
This will place the charging icon next to the battery icon, inside the @id/battery_meter Layout. This will cause the charging icon to vanish if you turn on the percentage option in the Settings app.
We're nearly there..
Editing The Smali
Now comes the really fun part. It's time to edit some smali!
For this part, we need to do some detective work. Open your 'res/values/public.xml' and find these two lines:
<public type="drawable" name="somc_sys_battery" id="0x7f0200c9" />
<public type="drawable" name="somc_sys_charging" id="0x7f0200d6" />
Click to expand...
Click to collapse
They might be next to each other...or they might not.
The parts in red are the hex references that we're going to need to look for in our smali. It's likely the references will be different in your rom to mine.
Edit 'com\android\systemui\statusbar\policy\BatteryController.smali' and look for your 'somc_sys_charging' reference. The code you'll find should look like this:
const v11, 0x7f0200d6
invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setImageResource(I)V
goto/16 :goto_3
Click to expand...
Click to collapse
You'll want to change this so it looks like this:
.local v10, "icon":Landroid/widget/ImageView;
const v11, 0x7f0200d6
invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setImageResource(I)V
move-object/from16 v0, p0
iget v11, v0, Lcom/android/systemui/statusbar/policy/BatteryController;->mLevel:I
invoke-virtual {v10, v11}, Landroid/widget/ImageView;->setImageLevel(I)V
goto/16 :goto_3
Click to expand...
Click to collapse
Make sure you change the code in red to your own reference!
This will make Android change the charging icon when the battery level changes.
Then look for your 'somc_sys_battery' reference. The code you'll find should look like this:
.local v5, "icon":Landroid/widget/ImageView;
const v11, 0x7f0200c9
invoke-virtual {v5, v11}, Landroid/widget/ImageView;->setImageResource(I)V
Click to expand...
Click to collapse
Change it to:
.local v5, "icon":Landroid/widget/ImageView;
move-object/from16 v0, p0
iget-boolean v11, v0, Lcom/android/systemui/statusbar/policy/BatteryController;->mPlugged:Z
if-nez v11, :cond_40
const/4 v11, 0x0
goto: cond_50
:cond_40
const/16 v11, 0x8
:cond_50
invoke-virtual {v5, v11}, Landroid/widget/ImageView;->setVisibility(I)V
const v11, 0x7f0200c9
invoke-virtual {v5, v11}, Landroid/widget/ImageView;->setImageResource(I)V
Click to expand...
Click to collapse
Again, make sure you change the code in red to your own reference!
This will make the battery icon vanish when your phone's charging.
Now just save, recompile and push to your device as normal. Wait a while for it to reboot and...
(You'll also need to disable the battery percentage in the Settings app, if you haven't already.)
Of course, these aren't perhaps the best icons I could have chosen for these screenshots. I didn't have much time for this post, I just picked some at random and it looks a little lost. But that's the fun of battery icons..there are so many to choose from!
**HUGE Thanks Go To The Master, @serajr, For The Smali Help!**
**Thanks also go to @krzycho96 for their YouTube video**​
Amazing!!!
Great job bro!!!!! ... as always!!!
Masterpiece.... always dazzling our Xperias with mods!
Good job, but the hardest thing is make icon look good when stamina is activated , and low-battery mode activated,and when battery charging. I'm trying to do that
devilmaycry2020 said:
Good job, but the hardest thing is make icon look good when stamina is activated , and low-battery mode activated,and when battery charging. I'm trying to do that
Click to expand...
Click to collapse
I can take a look at this tomorrow, right now I'm away from computer.
The stamina icon could just be redrawn. Maybe we could reuse the one from 4.3?
Charging is a bit more complicated. In stock, a lightning bolt is displayed. I think we might be able to replace that with the same sort of level-list we had before..
Sent from my C6603 using Tapatalk
Great work bro :good: as what Ive expected again
hi all
i want the battery charging icon flashing like as video below, someone can help me. thanks
http://youtu.be/qkOgedJCKCI
devilmaycry2020 said:
hi all
i want the battery charging icon flashing like as video below, someone can help me. thanks
http://youtu.be/qkOgedJCKCI
Click to expand...
Click to collapse
I've got an idea about that. I'm trying something right now, in fact. Watch this space!
Ticklefish said:
I've got an idea about that. I'm trying something right now, in fact. Watch this space!
Click to expand...
Click to collapse
What's news ?
devilmaycry2020 said:
What's news ?
Click to expand...
Click to collapse
Not much, unfortunately. I tried changing a stat_sys_battery_charging.xml to somc_sys_charging.xml. But it didn't work the way I wanted.
The level-list was ignored and only the first drawable was shown. Which is a bit of a puzzle.
Hi, is there a chance to modify the Z2 systemUI into something like this? Please guide me to do this.
XPS_93 said:
Hi, is there a chance to modify the Z2 systemUI into something like this? Please guide me to do this.
Click to expand...
Click to collapse
Should be simple enough. Can you share your status_bar.xml please?
Sent from my C6603 using Tapatalk
Awesome Guide but something off-topic
How did you change the font of the lockScreen
Ticklefish said:
Should be simple enough. Can you share your status_bar.xml please?
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
Alright, this is it. Is pulling it out from systemui.apk using winrar enough or I have to decompile the apk for it?
Edit: I've reuploaded the xml file decompiled from systemui.apk
XPS_93 said:
Alright, this is it. Is pulling it out from systemui.apk using winrar enough or I have to decompile the apk for it?
Click to expand...
Click to collapse
no no, you have to decompile system.apk, take out by winrar can not use because it was encrypted
John98Zakaria said:
Awesome Guide but something off-topic
How did you change the font of the lockScreen
Click to expand...
Click to collapse
I didn't. There isn't a picture of my lockscreen in this thread..
XPS_93 said:
Alright, this is it. Is pulling it out from systemui.apk using winrar enough or I have to decompile the apk for it?
Edit: I've reuploaded the xml file decompiled from systemui.apk
Click to expand...
Click to collapse
Thanks, I'll check it out. You know, xml files aren't exactly big. There's no need to archive them.
Sent from my C6603 using Tapatalk
That font isn't usual ?
John98Zakaria said:
That font isn't usual ?
Click to expand...
Click to collapse
Oh, you mean my clock widget. I made it using 'Make Your Clock Widget' and a font called Respective.
I used the same font for my dock icons and my softkeys.
Sent from my C6603 using Tapatalk
Ticklefish said:
Thanks, I'll check it out. You know, xml files aren't exactly big. There's no need to archive them.
Sent from my C6603 using Tapatalk
Click to expand...
Click to collapse
You're welcome, and sorry I wasn't able to upload it straight as xml attachment isn't allowed in post so simply I compressed it. :laugh: I'm looking forward for your guidance, thank you :good:
XPS_93 said:
You're welcome, and sorry I wasn't able to upload it straight as xml attachment isn't allowed in post so simply I compressed it. :laugh: I'm looking forward for your guidance, thank you :good:
Click to expand...
Click to collapse
That's okay.
There's nothing unusual or different about your XML. Which is good.
The easiest thing to do is use this mod here: http://forum.xda-developers.com/showthread.php?t=2356012
You'll be wanting to put the new line just under the signal_cluster line.
Sent from my C6603 using Tapatalk

Categories

Resources