yashsingh1/xdaforums huggingface dataset:
[Sprint Samsung Galaxy S III] sudhamana:
But i got two different images in system ui and edit notification panel.

Please see the attachment.

Can you give any clue to solve this issue?
[Sprint Samsung Galaxy S III] tdunham:
I think you need the S5 style flashlight files. It was posted way back in the thread so I have no idea who posted it but try looking through the attached file.

And I 'think' I had an issue with the icons being slightly too large even though they were the same size resolution as the rest so I had to downsize one or more of them a little at a time until I was happy with the way they displayed.
[Sprint Samsung Galaxy S III] sudhamana:
Thanks a lot.

Now the problem solved. .

Thank you once again.
[Sprint Samsung Galaxy S III] edwardsiow:
Hi

I have done everything stated in OP but my settings force closed when I try to edit quick panel settings...

Is it because I changed the string name of notification_panel_flashlight to Torch? I MUST use the name Flashlight?

any clue? please help me....

Here are the file (I already changed the string name back to Flashlight):

https://docs.google.com/uc?export=download&confirm=jNub&id=0B0NFJR3xcB2jNFV0S1VsNVRTQlk

Dear [MENTION=1042140]tdunham[/MENTION], do you know why?
[Sprint Samsung Galaxy S III] tdunham:
In strings.xml, you only changed this (see below)? The string name notification_panel_flashlight must stay the same unless you also change it in smali.

<string name="notification_panel_flashlight">[COLOR="Red"]Torch[/COLOR]</string>

---------- Post added at 02:45 PM ---------- Previous post was at 02:37 PM ----------

Also Edward, you have this working 100% without making that change too?
[Sprint Samsung Galaxy S III] thisisapoorusernamechoice:
So I searched this thread and a couple similar ones, is there any way to adjust the brightness that this toggle activates? Alternatively, I converted the Torch app from the play store into a system app because it gives a brighter light than the system default and other third-party apps. Would there be a way to make this toggle use the Torch app instead? Basically I just want a way for this flashlight to be brighter, any ideas?
[Sprint Samsung Galaxy S III] brandoncampbell:
I'm having an issue where I can get it to show up on the available buttons but will not show up on the notification. Any ideas? When I drag the available button to the notification it looks like it is there but it is not. Updated with some screenshots if it helps.
[Sprint Samsung Galaxy S III] PineSmokes:
Note 3 (NK3 4.4.2) | I'm SOO close I can almost taste it XD

I worked all through the night figures hah :) I managed to get the entire mod of the SystemUI.apk and SecSettings.apk and my phone didn't hand on the boot screen or have any sort of issues after restarting! YAY! But wait, I still have no flashlight toggle... ?? Yes I did the "/system/csc/feature.xml" edit with a reboot and still nothing, hmmm. I pulled my SystemUI.apk and SecSettings.apk to decompile and check them out. They look legit, they have all the needed mods to my knowledge. Could someone check them out for me or tell me what I'm doing wrong? The flashable zip to enable the toggles isn't on the home page anymore it's broken so the features.xml is the only way I can do it.

EDIT: Additional information, I purchased the SQL Editor and used it to add ";Flashlight" to the end of the needed 3 lines and still nothing. I'm using the .smali file from post 283 and the edits from post 289, if I try the S5 files from post 404 I get errors recompiling so that's probably just the wrong file. I have no errors with .smali 283, all the public id's are correct and everything.

These were too big to attach on XDA so Dropbox it is :)

MODS

SystemUI.apk (Modded):

https://www.dropbox.com/s/swzz46c2adt1kyb/SystemUI.apk?dl=0

SystemUI (Decompiled):

https://www.dropbox.com/s/rrft93dcjdou20j/SystemUI-Decompiled.zip?dl=0

SecSettings.apk (Modded):

https://www.dropbox.com/s/fkm43yfdjkfponw/SecSettings.apk?dl=0

SecSettings-Decompiled.zip (Modded):

https://www.dropbox.com/s/mu2hg3kgvd55fqx/SecSettings-Decompiled.zip?dl=0

ORIGINALS

:

SystemUI (Odex) (NK3 4.4.2):

https://www.dropbox.com/s/vw7raajgs9go9sa/SystemUI (Odex).zip?dl=0

SystemUI (Deodexed) (NK3 4.4.2):

https://www.dropbox.com/s/abn6p0y6nt2hzjl/SystemUI-Original.apk?dl=0

SecSettings (Odex) (NK3 4.4.2):

https://www.dropbox.com/s/4d08zw0hg1286o2/SecSettings (Odex).zip?dl=0

SecSettings (Deodexed) (NK3 4.4.2):

https://www.dropbox.com/s/syanbhjdlbaicpk/SecSettings-Original.apk?dl=0

Stock.tar.md5 Extracting Tip

For anyone who doesn't know the only way I was able to get files out of my "system.img.ext4" was to first extract it from my stock.tar.md5 with 7-Zip/WinRar, then convert it by dragging it into sgs2toext4. Sgs2toext4 outputs a file "system.img.ext4.img" which you mount with ext2explore. From there you browse through the files and save whatever files you would like to work on. :cool:
[Sprint Samsung Galaxy S III] The Sickness:
Has anyone been able to use this on the Galaxy S5 on Lollipop?
[Sprint Samsung Galaxy S III] PineSmokes:
Hmmm

After I do any modification inside the SystemUI.apk, recompile and push it onto my phone, nothing changes. I've edited the color of some of the graphics to see if I could even notice a minor change and nothing. Am I missing something? This is probably the reason the mod isn't working after I complete it and replace the SystemUI.apk in the /system/priv-app/ folder

Confused :cool:
[Sprint Samsung Galaxy S III] tx_dbs_tx:
I'm doing it now. i'll let you all know when I get it working. I'm on the Note 4 but it should be the same. I've done this mod several times already.

Edit: Upon initially going over of the flashlight smali and lollipop smali, there will need to be some changes made to FlashlightQuickSettingButton.smali which I'm doing now. Java sources are different in Lollipop so this is the biggest reason for fails on Lollipop right now. It still may not work and may need to be completely rewritten. I'll find out soon enough.
[Sprint Samsung Galaxy S III] The Sickness:
This method doesn't work on LP.

Look here for working method

http://xdaforums.com/showthread.php?t=2799050
[Sprint Samsung Galaxy S III] tx_dbs_tx:
Thanks for the heads up. I had already come to the conclusion that this method would not work shortly after my last post. I'm glad somebody already figured a way to enable it for L. Quick & easy now.Thanks again.
[Sprint Samsung Galaxy S III] josephpatrick:
Notification Panel settings FC

Hi, I got the systemui mod working and have the flashlight toggle in the notification panel, however it does not show up under 'Notification Panel' under 'Settings'. If i use the reset button it removes the toggle, because it does not show up under settings, i cannot really move it around.

Modded secsettings as per OP however Settings crashes/FC when i click on option 'Notification Panel'.
[Sprint Samsung Galaxy S III] Wuby986:
of course you need to mod differently if it fc.. you are not supposed to apply code, without understanding.. however you can set it in database and it should appear in both section
[Sprint Samsung Galaxy S III] josephpatrick:
The systemui code is more complicated and I was able to get it working, the settings apk does not have hex code replacement editing and so it is weird it is FC'ing.
[Sprint Samsung Galaxy S III] Wuby986:
there could be several reasons for it.. logcat can help you get where the problem is.. or as i said above you can leave stock and use db to set the toggle.. you should have already the hidden files for it in settings so enabling in db should be enough to show in both places
[Sprint Samsung Galaxy S III] erikalin:
:confused: This thread is more than two years old. I am only replying here because for some reason you have now sent me a PM about this mod. It is not my mod. I don't know why you are asking me for help with your decompiled files. And because this is a really old thread, you won't get a reply here either. I have to post on this thread to reply TO YOU because even though you sent me a PM about this other person's work, your profile is set to not receive PMs, so I couldn't reply to tell you any of this, lol.
[Sprint Samsung Galaxy S III] erikalin:
I don't know what you are expecting from me to "just control your files" but like I have said, this is not my mod. This is not my thread. I don't know why you have messaged me, or asked me to help you with your work. Perhaps you are confusing me with someone else. Good luck with whatever this is that you are trying to do.

Edit:

Just so you know, I would help you if I could. I'm not the right person to message about someone else's stuff. If I knew what this was, or if I could answer a question for you, I would do that. Take care.
[Sprint Samsung Galaxy S III] elswerky:
the flashble file isn't present
[Sprint Samsung Galaxy S III] Gunthermic:
Hmmm, still a no go.

package_extract_file("scripts/toggle.sh", "/tmp/sqlite3/toggle.sh");

package_extract_file("scripts/flashlight.sql", "/tmp/sqlite3/flashlight.sql");

package_extract_file("scripts/sqlite3", "/tmp/sqlite3/sqlite3");

set_perm_recursive(0, 0, 0777, 0777, "/tmp/sqlite3");

run_program("/tmp/sqlite3/toggle.sh")

Nothing updated in settings.db..
[Sprint Samsung Galaxy S III] CNexus:
Can you post the contents of your toggle.sh?
[Sprint Samsung Galaxy S III] Gunthermic:
#!/sbin/sh

/sbin/mount -a

/tmp/sqlite3 /data/data/com.android.providers.settings/databases/settings.db < /tmp/flashlight

flashlight.sql file contents:

UPDATE system SET value = (SELECT value || 'Flashlight;' FROM system WHERE name = 'notification_panel_active_app_list') WHERE name = 'notification_panel_active_app_list';
[Sprint Samsung Galaxy S III] CNexus:
Ah there you go

Since you are putting all the files into the /tmp/sqlite3 folder as opposed to just /tmp, toggle.sh should.be:

#!/sbin/sh

/sbin/mount -a

/tmp/sqlite3/sqlite3 /data/data/com.android.providers.settings/databases/settings.db < /tmp/sqlite3/flashlight.sql

You also left off the .sql for /tmp/flashlight.sql
[Sprint Samsung Galaxy S III] Gunthermic:
I just saw that before you posted. but didnt catch the .sql error.

Opps: I see the mistake.. I added the extra sqlite3, folder but toggle.sh was looking in tmp folder only... a Doh moment, sorry to waste your time. lol

Retesting....

---------- Post added at 01:22 PM ---------- Previous post was at 01:16 PM ----------

package_extract_file("scripts/toggle.sh", "/tmp/toggle.sh");

package_extract_file("scripts/flashlight.sql", "/tmp/flashlight.sql");

package_extract_file("scripts/sqlite3", "/tmp/sqlite3");

set_perm_recursive(0, 0, 0777, 0777, "/tmp");

run_program("/tmp/toggle.sh");

Toogle.sh:

#!/sbin/sh

/sbin/mount -a

/tmp/sqlite3 /data/data/com.android.providers.settings/databases/settings.db < /tmp/flashlight.sql

flashlight.sql:

UPDATE system SET value = (SELECT value || 'Flashlight;' FROM system WHERE name = 'notification_panel_active_app_list') WHERE name = 'notification_panel_active_app_list';

all three files in scripts..

toggle.sh

flashlight.sql

and your sqlite file, not extensions.

Nothing shows..

Did not do a fresh flash

Didn't do a secsettingsprovider edit to arrays(only needed for a fresh rom flash to add to db upon flashing).

Didn't do any csc file editing.. shouldnt be needed if this works.

Now I am kinda stumped..
[Sprint Samsung Galaxy S III] CNexus:
Since I'm not sure where you're going wrong, download my zip here: http://cnexus.co/downloads/files/Misc/Enable_more_toggles.zip

Then unzip and replace the contents of the toggles.sql file with the contents of the flashlight.sql file you already have

Then zip and flash and it should work :thumbup:
[Sprint Samsung Galaxy S III] baseballfanz:
This look about right for step 11? TIA
[Sprint Samsung Galaxy S III] baseballfanz:
This step, do I just add the word Flashlight to the string.xml file?
[Sprint Samsung Galaxy S III] JonSCSL:
Wow this all looks like a big pain in the butt. Think I am gonna wait for a flashable zip. No rush, but can't wait.?
[Sprint Samsung Galaxy S III] CNexus:
No,.it.should actually show.up like in my screenshot attached...the web view seems to.be getting rid of.the tags
[Sprint Samsung Galaxy S III] CNexus:
This is a guide for devs. No flashable zips will be provided as there are multiple devices and build versions that this applies to
[Sprint Samsung Galaxy S III] Rushing:
Hahaha =] Thank you I thought for sure Id lost it when I decided to start making up ids!

I skipped recompilation cause I thought that was just to check if it recompiled.

and I was sure that I had correctly done everything... do not skip steps, note to self.

'' this guide is genius, will let all know if it works on 4.2.2
[Sprint Samsung Galaxy S III] 1brainsurgeon:
Worked like a charm. Thanks buddy!
[Sprint Samsung Galaxy S III] rawintellect:
Great write up! I've compiled both apks and added them just fine (plus the torch.apk). The Flashlight works perfectly. I've even made the csc edits as well. I haven't tested them on a new install but that's coming up.

One small issue is that when I attempt to edit the quicksettings The Flashlight button isn't there as an available choice. Any advice?
[Sprint Samsung Galaxy S III] CNexus:
[MENTION=1274198]rawintellect[/MENTION] that means you didn't add it to SecSettings properly. Try doing just that part again
[Sprint Samsung Galaxy S III] VillainDivine:
deleted
[Sprint Samsung Galaxy S III] rawintellect:
Ahhh no...I just clean flashed the ROM and used the same SecSettings.apk I compiled earlier. All is well now sir! thank you for the speedy response though!

The csc edit is definitely the way to go! I just did the SQLite edit before and that was when it wasn't showing up in the available buttons.

Thank you very much for this!
[Sprint Samsung Galaxy S III] dannyben:
[MENTION=4645794]CNexus[/MENTION]

Great write up!!! Thanks.

Ive got the SystemUI setup perfectly, but having problems compiling the SecSettings.

Think I did everything by the book (below are two pics) but getting the enclosed error trying to compile.

Any help would be appreciated.

Thanks.

EDIT: Weird.... needed to change my framework in apktool to an I9505 version and all worked well!

Thanks again!
[Sprint Samsung Galaxy S III] VillainDivine:
Im having trouble with my SecSettings too. It compiles fine, but one I install the ROM, my settings icon and status bar are no where to be found. Am I doing something wrong? Also, where does the thumbs.db file in your flashlight zip go?
[Sprint Samsung Galaxy S III] calebsb:
Nice tutorial CNex:D could you edit it a little to say smali/com/google etc? Took me a second to realize that's where I was going. Other than that I got it up and running. Thanks big guy :D:thumbup::beer:
[Sprint Samsung Galaxy S III] CNexus:
[MENTION=3824019]Gunthermic[/MENTION] [MENTION=5098295]markbencze[/MENTION]

I figured it out, my updater-script was incorrect in places so heres a working zip. Also added to OP for others who come across and implement this mod!
[Sprint Samsung Galaxy S III] vasiaeva:
What is Mod Control toggle ???
[Sprint Samsung Galaxy S III] MrMeeseeks:
Thanks for this guide. I got it all working but the images and text aren't showing up in the toggle. Any ideas what I did wrong?
[Sprint Samsung Galaxy S III] CNexus:
Are the resource ids.set correctly?
[Sprint Samsung Galaxy S III] MrMeeseeks:
I had them set as :

#0x7f0c0181

const v3, 0x0

Whereas they should have replaced 0x0 beside the const.

All is good now.

Thank you for your help!
[Sprint Samsung Galaxy S III] VillainDivine:
Could someone please take a look at my SystemUI.apk and SecSettings.apk? I cant figure out whats wrong with them. As far as I know, I have followed the instructions 100%.

SystemUI: https://www.dropbox.com/s/kqxfiy53kybf4cr/SystemUI.apk

SecSetting: https://www.dropbox.com/s/sbokwdk6xekol2w/SecSettings.apk

Thanks in advance!
[Sprint Samsung Galaxy S III] 1brainsurgeon:
All of your edits are correct. What issue are you having?
[Sprint Samsung Galaxy S III] VillainDivine:
Once I try to install the ROM, I have no statusbar or settings app icon. The setup wizard FC's. Ive tried swapping just the SystemUI.apk alone, but still get the same thing. I guess it could be the ROM, but I really dont see how. Also, i noticed a thumbs.db file in the flashlight zip. Does that go anywhere? Thanks for taking a look man!
[Sprint Samsung Galaxy S III] 1brainsurgeon:
No problem. The thumb.db was placed in the zip on accident. Did you add the torch apk to system/app, and did you you make the proper edits to system/csc/features,xml?
[Sprint Samsung Galaxy S III] not-i:
Hi guys. Just wondering if anyone has tried this on kit kat?

I have tried on Note 3 4.4.2 and all seems fine. Correct ids. Icons in correct folders & smail. Flashlight toggle shows in settings toggle edit and can be moved around with no fc.

All is good in notification_active_app_list but no torch toggle showing in systemui .

Any ideas?
[Sprint Samsung Galaxy S III] CNexus:
Hmm. Try doing the SystemUI again
[Sprint Samsung Galaxy S III] VillainDivine:
Yes, as far as I know. Even if I didn't edit the features.xml, wouldn't the ROM still install correctly? All i can tell is that the ROM I edited isnt allowing the SecSettings.apk edits. Im trying this on another ROM as I type this. Thanks for all of your help man. If you notice anything, please let me know.
[Sprint Samsung Galaxy S III] Bramton1:
So I followed all the steps, and then... I didn't have a status bar, and when I tried to go into System Settings, it said it wasn't installed. Restored the original files for now. Any ideas?

When I rebuilded the SecSettings apk, I got a lot of messages like this.

apt: warning: string 'high_level' has no default translation in /Users/admin/untitled/SecSettings/res; found: ar as az bg bn ca cs da de el en_PH en_US es_ES es_US et eu fa fi fr fr_CA ga gl gu hi hr hu hy in is it iw ja ka kk km kn ko lo lt lv mk ml mr ms my nb ne nl or pa pl pt_BR pt_PT ro ru si sk sl sq sr sv ta te th tr uk ur uz vi zh_CN zh_HK zh_SG zh_TW
[Sprint Samsung Galaxy S III] not-i:
Done it a number of times. Same result. Thinking there must be changes in firmware as the 4.3 circle battery & call record mods dont work either. Well call record works but the output is just random screechy noise.

If anyone gets it going I would love to know how.

Thanks anyway guys
[Sprint Samsung Galaxy S III] CNexus:
Only other thing I can think of is to try to get a logcat and see if anything odd shows up for systemui
[Sprint Samsung Galaxy S III] benny3:
Thanks CNexus , Its great to see this guide, It seems everything is moving toward xposed and i prefer the old school ways myself.
[Sprint Samsung Galaxy S III] CNexus:
If you guys are just decompilimg/then recompiling with apktool, you need to sign the files unless your rom has signature checking disabled, otherwise the system will detect that the files have been changed and will not allow them to load (ie missing settings and status bar when you boot up, or fcs)
[Sprint Samsung Galaxy S III] s3rgio4:
I'm stuck on step 7 of the systemui. when i try to compile the apk i get errors. I attached a log of the errors.
[Sprint Samsung Galaxy S III] CNexus:
Try decompiling the original systemui and then recompiling without any changes. If it still shows errors, then it's an issue with your systemui, not with the mod you are implementing.
[Sprint Samsung Galaxy S III] android.zealot.fervor:
Can anyone share its modded system.ui ? For flashlight. If yes please share that would be so much grateful .....

Thanks....
[Sprint Samsung Galaxy S III] s3rgio4:
I finally got it! Hell yeah! Thanks for the great mod
[Sprint Samsung Galaxy S III] CNexus:
Here are my working modded files: https://www.dropbox.com/s/3606fetj8ujwbhi/toggle_mod_files.zip

And here's my framework-res and twframework so you can actually decompile those files: https://www.dropbox.com/s/jdauix49e79tz3s/framework_mk3_cnex.zip

Glad you figured it out :thumbup:

Do you know what the problem was or did it just work one of those times?
[Sprint Samsung Galaxy S III] s3rgio4:
It was a problem with my systemui. I decided it to google why it didnt compile and there is a thread here on xda on how to fix that problem. The problem was under res/layout. I had to edit some xmls from there
[Sprint Samsung Galaxy S III] Bramton1:
Tried again. I used the apksign program on this link.

http://xdaforums.com/showthread.php?t=573498

When I rebooted my phone, things went bad. No statusbar, and SystemUI kept force closing. Last time (unsigned), I got no statusbar, but I didn't get the FCs. I had to boot into TWRP and use that to restore my original apks.
[Sprint Samsung Galaxy S III] hissam8:
Thank you, it works, one problem though the flashlight turns off when the screen goes off. Is there a way that would allow it to be remained on?
[Sprint Samsung Galaxy S III] CNexus:
It must just be your device, because mine stays on
[Sprint Samsung Galaxy S III] hissam8:
What could be the problem? Or am I doing something wrong? Thanks
[Sprint Samsung Galaxy S III] VillainDivine:
Thanks for the reply. I will try that out.
[Sprint Samsung Galaxy S III] hissam8:
Started all over again. Now the flash stays on. Thanks a million. Cheers :)
[Sprint Samsung Galaxy S III] hissam8:
Actually no sorry. It still turns off after a few seconds when the screen goes off. And when you turn on the screen the Flashlight turns on again. How can fix it please? Tried everything :(
[Sprint Samsung Galaxy S III] CNexus:
What device? And I'm not sure though, this didn't happen to me
[Sprint Samsung Galaxy S III] Mongo23ny:
[MENTION=4645794]CNexus[/MENTION]

Thanks for the guide man, worked great. Did the mod w/ a fresh install of STS Venom. Thanks again for all you do.
[Sprint Samsung Galaxy S III] gadget069:
I would love to do this, wish i had time learn.
[Sprint Samsung Galaxy S III] hissam8:
Galaxy Note 2 at&t using ditto note 3 rom
[Sprint Samsung Galaxy S III] Mongo23ny:
Mine does it too. Sprint Note 2 with STS Venom by Slesh.
[Sprint Samsung Galaxy S III] CNexus:
For everyone who's implemented this mod ( [MENTION=744737]JoshBeach[/MENTION] [MENTION=912863]strongsteve[/MENTION]), heres a Torch.apk hidden from the app drawer and with the "Torch on" notification disabled

http://www.androidfilehost.com/?fid=23329332407568702
[Sprint Samsung Galaxy S III] Mongo23ny:
Any idea why the light goes off with the screen going off dude? I just checked the app and it also goes off when the screen goes off.
[Sprint Samsung Galaxy S III] Chad The Pathfinder:
Thanks again CNexus. The new torch.apk works perfectly on Dandroid (mk3) even with the screen off.
[Sprint Samsung Galaxy S III] CNexus:
I honestly don't know :(

Find some sort of torch app that will work with the screen off on your device and I'll help you with the parts you need to change to link that one to your flashlight toggle
[Sprint Samsung Galaxy S III] Mongo23ny:
I have the assistive light widget.
[Sprint Samsung Galaxy S III] CNexus:
A torch app. That's just a widget
[Sprint Samsung Galaxy S III] Chad The Pathfinder:
Try using the torch apk from MOAR and let CNexus know your results.

CNexus, the new torch apk's widget isn't showing up as available in the lock screen. Its no big deal, just reporting in case you need to know.

Dandroid (mk3)
[Sprint Samsung Galaxy S III] hissam8:
Well I'm using dash light. It works perfectly with the screen off. Can you help me link that with the notification toggle. Thanks
[Sprint Samsung Galaxy S III] CNexus:
I know, that's because I set it to be hidden in the app drawer..
[Sprint Samsung Galaxy S III] CNexus:
I'll decompile it and see if that one can be activated in the same way :thumbup:
[Sprint Samsung Galaxy S III] Mongo23ny:
Let me know, I'll try that one as well.
[Sprint Samsung Galaxy S III] Chad The Pathfinder:
What did you have to change to disable the "torch on" notification?
[Sprint Samsung Galaxy S III] CNexus:
Comment out the part where the notification gets posted in TorchService.smali

Smali equivalent of the java code:

mnotificationManager.notify(mNotification)
[Sprint Samsung Galaxy S III] stas333:
I would love to do this, but this decompile/compile crap gets me every time.

Can someone just post the original moded files for TW 4.3?

Thanks