[MOD][HOW-TO] Add Flashlight quick toggle [4.3|4.4]

DarkAngel

Senior Member
Aug 1, 2006
639
357
0
Arizona
Quick question to see if anyone may know right off. I did the flashlight mod for 4.4 on the L600 Mega. Both SecSettings and SystemUI compiled correctly and had no errors. I can view it in the notification panel where I can modify the tabs in the order I want but when it comes to the pull down it does not show. Everything has been modded including the settings.db as well. I am trying to see what else I can probably do to make it show. Any suggestions?
 

tdunham

Recognized Contributor
Jun 21, 2008
13,686
36,462
0
TampaBay
Quick question to see if anyone may know right off. I did the flashlight mod for 4.4 on the L600 Mega. Both SecSettings and SystemUI compiled correctly and had no errors. I can view it in the notification panel where I can modify the tabs in the order I want but when it comes to the pull down it does not show. Everything has been modded including the settings.db as well. I am trying to see what else I can probably do to make it show. Any suggestions?
Did you try the smali file from post 283 yet?

Sent from my SM-G900P using XDA Premium 4 mobile app
 

DarkAngel

Senior Member
Aug 1, 2006
639
357
0
Arizona
Finally! Thank you tdunham. I needed a nudge on the final steps. Been busting my brains on this for some time now. I did what you suggested of course but found that I also needed to do what Versatile1 also had done on post#289. After, I compiled and pushed over to the Mega. There was about a 30 second to 1 minutes delay before the light turned on for the first time but after, it switched on and off at every toggle there after.

Also working on the S5 Launcher. Everything works except one thing on the S5 Launcher which is in the "Edit Page" mode. Need to figure out the values to increase the dp and why I can not add pages. Last pic shows it. After, the S5 Launcher with Theme Chooser and all it's perks will be working perfectly.

Thank you all for the great tuts and info. The SPH-L600 on NE4 KitKat officially has the Flashlight Mod now to also include the 4-way Reboot Menu that I ported as well.






 
Last edited:
  • Like
Reactions: LeftyGR

mxmr

Senior Member
Jan 25, 2012
203
227
0
Wisconsin
[Troubleshooting] Help getting toggle to show

Perhaps one of you can shed some light on the issue I'm having...Cooking a personal custom NG2 rom for the Sprint Galaxy S4.

Modded SecSettings and SystemUI according to OP and post #283 (and the few that followed).
Compiled, decompiled, edited the references, recompiled. Everything seems to be good.

Put the two APKs in /system/priv-app and built a test version of the rom. SystemUI doesn't load (no status bar and settings appear to fc).
So I pulled the logcat and it fails signature verification. Did some googling and edited services.jar to skip signature verification.

Pushed that and rebooted. This time systemui loads fine, the status bar is there and notifications all work. But there is no flashlight toggle. So I tried flashing the enabletogglezip in the Update portion of the OP, but to no avail - it did not add the toggle.

Frustrated, I flashed this mod, and interestingly enough two flashlight toggles are added (both work fine). This leads me to believe the apks compiled correctly and have the new images and smali where it needs to be. But it's not getting added to the notification toggles.

Thoughts? Any tips are appreciated.
 

Attachments

Last edited:

bombaybadboy

Senior Member
Apr 22, 2012
7,782
16,693
0
Wolverhampton
Hi guys i wanted to ask how to fix a problem with adding this mod to a theme. I have made this mod a few times without any problems but i built a s5 themed version and lost toggle text and wondered if anyone has any advice how to fix. Im building for i9500 i should add and works fine except text

Sent from my GT-I9500
 

Attachments

tdunham

Recognized Contributor
Jun 21, 2008
13,686
36,462
0
TampaBay
Hi guys i wanted to ask how to fix a problem with adding this mod to a theme. I have made this mod a few times without any problems but i built a s5 themed version and lost toggle text and wondered if anyone has any advice how to fix. Im building for i9500 i should add and works fine except text

Sent from my GT-I9500
I can't remember. Did you add both entries together in notificationpanelmenu.smali where one of them is reversed?

Sent from my SM-G900P using XDA Premium 4 mobile app

---------- Post added at 04:12 AM ---------- Previous post was at 04:11 AM ----------

Oh, check your quicksetting flashlight smali for the text public value too. I think that's where it really is.

Sent from my SM-G900P using XDA Premium 4 mobile app
 

bombaybadboy

Senior Member
Apr 22, 2012
7,782
16,693
0
Wolverhampton
Yes m8 i added both entries in notificationpanelmenu.smali and its worked normally in a number of the mods i built. I will take a look at the flashlight smali thanks also i did make some edits in value/drawable. xml but i would have thought if thats the problem i would lose all text.

Sent from my GT-I9500
 

mxmr

Senior Member
Jan 25, 2012
203
227
0
Wisconsin
Perhaps one of you can shed some light on the issue I'm having...Cooking a personal custom NG2 rom for the Sprint Galaxy S4.

Modded SecSettings and SystemUI according to OP and post #283 (and the few that followed).
Compiled, decompiled, edited the references, recompiled. Everything seems to be good.

Put the two APKs in /system/priv-app and built a test version of the rom. SystemUI doesn't load (no status bar and settings appear to fc).
So I pulled the logcat and it fails signature verification. Did some googling and edited services.jar to skip signature verification.

Pushed that and rebooted. This time systemui loads fine, the status bar is there and notifications all work. But there is no flashlight toggle. So I tried flashing the enabletogglezip in the Update portion of the OP, but to no avail - it did not add the toggle.

Frustrated, I flashed this mod, and interestingly enough two flashlight toggles are added (both work fine). This leads me to believe the apks compiled correctly and have the new images and smali where it needs to be. But it's not getting added to the notification toggles.

Thoughts? Any tips are appreciated.
So after starting from scratch and re-doing everything, hoping I made a simple error, I am getting the same result.

So instead of adding the flashlight toggle, I figured I'd experiment and try REPLACING one of the standard toggles with the flashlight toggle to see if that made any difference. So in SystemUI and SecSettings I replaced all of the Reading Mode strings with the corresponding flashlight toggle strings (but I did not remove reading mode images in drawable-xxhpi). After I compiled, decompiled, edited references, and recompiled, I pushed to system/priv-app and flashed the zip in the OP to add the toggles to system.db. Nothing changed! it still is displaying a working reading mode icon in the quicksetting toggles :(

Thoughts? I am determined to break this horse despite my lack of knowledge and skill. Any feedback or tips are appreciated.
 
Last edited:
G

GuestK00143

Guest
I'm trying to do this mod on the VZW S5 and the toggles do not show correctly and are not labeled correctly. It works but it looks funny. Everything compiled correctly but this is what I get. Where it says device overheating is where the flashlight toggle should be. The other shows up fine, I just need to change my ping image to match. Can anyone help please, I would love to share the completed mod with the VZW community.

View attachment 2943337 View attachment 2943338 View attachment 2943339
 
Last edited:

deuce_biggins

Senior Member
Mar 14, 2014
1,006
2,192
0
Detroit
I'm trying to do this mod on the VZW S5 and the toggles do not show correctly and are not labeled correctly. It works but it looks funny. Everything compiled correctly but this is what I get. Where it says device overheating is where the flashlight toggle should be. The other shows up fine, I just need to change my ping image to match. Can anyone help please, I would love to share the completed mod with the VZW community.

View attachment 2943337 View attachment 2943338 View attachment 2943339
Did you read through all the posts, there's another smali posted by tdunham (I think around post 283) that was tailored for the S5. Glad to see you here Misterxtc...
 
G

GuestK00143

Guest
Did you read through all the posts, there's another smali posted by tdunham (I think around post 283) that was tailored for the S5. Glad to see you here Misterxtc...
Good to see you around too. Yes, I tried that one a couple updates ago and it didn't work so I ended up using this one from Versatile1 because I'm using apktool 2.0.0rc1. It got me this far anyway. Now VZW threw another monkey wrench at us by using .qmq files instead of png files but the one png shows up so that might not be a issue. We have been through three updates within the last month or so with the S5.
 

deuce_biggins

Senior Member
Mar 14, 2014
1,006
2,192
0
Detroit
Good to see you around too. Yes, I tried that one a couple updates ago and it didn't work so I ended up using this one from Versatile1 because I'm using apktool 2.0.0rc1. It got me this far anyway. Now VZW threw another monkey wrench at us by using .qmq files instead of png files but the one png shows up so that might not be a issue. We have been through three updates within the last month or so with the S5.
Check this thread out, may solve your qmg issue, possibly letting you use the mod as is. I don't have an S5 so I cannot confirm

http://forum.xda-developers.com/showthread.php?p=55573948
 
  • Like
Reactions: roirraW "edor" ehT
G

GuestK00143

Guest
Check this thread out, may solve your qmg issue, possibly letting you use the mod as is. I don't have an S5 so I cannot confirm

http://forum.xda-developers.com/showthread.php?p=55573948
Thanks but sorry to say it only made the flashlight icon that was mismatched in the add menu match. The other two still say "device overheating" but it dose turn the flashlight on. Maybe I'll just rename the mod to match the button and call it a day... lol. Ah oh well, I'll keep trying until I run out of options.
 

Gunthermic

Retired Forum Moderator
Mar 19, 2011
3,534
12,584
0
Thanks but sorry to say it only made the flashlight icon that was mismatched in the add menu match. The other two still say "device overheating" but it dose turn the flashlight on. Maybe I'll just rename the mod to match the button and call it a day... lol. Ah oh well, I'll keep trying until I run out of options.
Which update u on?

From sounds of it, looks like a publicID mismatch?

Sent from my SM-T320 using Xparent BlueTapatalk 2
 
G

GuestK00143

Guest
Which update u on?

From sounds of it, looks like a publicID mismatch?

Sent from my SM-T320 using Xparent BlueTapatalk 2
I'm on the newest NI2 update and I believe you are correct. I never tried messing with the publicIDs but now looks like a good time to try and learn. I saw it posted here before what to look for so I'll see if I can find it again and try. I'm definitely a newb at this but I have to start somewhere. Thanks for the info.
 
G

GuestK00143

Guest
Which update u on?

From sounds of it, looks like a publicID mismatch?

Sent from my SM-T320 using Xparent BlueTapatalk 2
Thank you so much for the tip, it's working well now. The only thing is the icons don't match 100%, the one in the add menu is bigger than the other two. I think I know how to fix that. That's not a big deal at all, I'm happy.:victory:

EDIT: Icon is now fixed.
 
Last edited:

sudhamana

Senior Member
Jan 7, 2012
265
75
0
chennai
please upload flashlight png files

Hi,
I made successfully the flashlight toggles as per the tutorial.
Working fine.
Thanks for the author of this tutorial.
But I have different image files in system ui and edit notification drawer.
Can you please upload here the png files for flashlight?
Thanks.