Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,298 Members 41,808 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Remove Quick Settings Toggles - JB Custom ROM I'm Building

Tip us?
 
vhfw
Old
(Last edited by vhfw; 9th February 2014 at 09:12 AM.)
#1  
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Feb 2014
Default [Q] Remove Quick Settings Toggles - JB Custom ROM I'm Building

Hi there guys!

I am a new account/poster, so I apologize if this is the wrong place for this question. I read the sticky, so I would think I'm good, but feel free to enlighten me

Long story short, I'm working on making a VERY simplified custom ROM for the SGH-T999 (TMobile's Galaxy S III). This is a project for school, so the idea was to make it simple for average users: remove certain settings, remove bloatware apps, customize icons etc. For this project, I only wanted to focus on one thing to see if I could do it. That was to remove the GPS quick toggle from the notification panel and remove the "Location settings" option from Settings. Again, this was just a simple test for school, so I'm aware this doesn't completely remove GPS

I have built my ROM off of TMobile's 4.3 stock ROM using the oh-so-time-and-noob saving Android Kitchen and APK Multi Tool, both most up to date version. After reading and testing the wonderful tutorials on XDA about Systemui and Secsettings apk modification, I am having trouble removing the GPS quick toggle. It seems that with this version of Touchwiz, or Jellybean, or TMobile stock, it has become MUCH harder to edit the toggles/notification xml without editing all of them at once. The tutorials for modding this area are at least a year old, and I know that the current stock version of Touchwiz has implemented customizable toggles anyway. My goal was to remove the GPS toggle completely so the user could not have access to it to customize.

I've seriously been reading everything I can on this stuff, so I don't think I missed a post about this specific problem on the Galaxy SIII. I have been testing and re-testing for about three days now, with no results at all. Literally. My XML edits do not seem to have any effect (arrays.xml for arrangement for example). I was able to successfully remove the Location settings option, so I know my edits work in certain places. I've seen tons of people talking, but I just wanted to clarify that I'm not missing something about the way this is coded. I've been trying to trace the code path, and it seems to lead to dreaded hex IDs and Smali. Which if I have to get that deep, I'm pretty confident my professor would just tell me to forget it and mod other things.

I know people have made some pretty sweet mods for this that I could just deploy, but I want to learn to do it myself. I am a programmer after all I have a lot of experience with XML and JavaScript, just not Smali. I would really like to know if anyone else has noticed this change in toggle modification, or if I'm completely missing the ball. If any of you guys know where I might continue my search, it would be appreciated. I don't want to just make a transparent .png to replace the icon, because then it's still clickable Another workaround option I just thought of could be to set the default toggles. (Only want Wi-Fi and Drive-Mode when the ROM deploys for example). Even then, I don't know where to set those, and actually have my edits apply.

Guess this turned into a long story heh, but I wanted to give as much info as possible. Thanks again guys! Long time reader, first time poster. If I learn this stuff I'd love to help others using what I've learned. Peace!
 
Perseus71
Old
#2  
Perseus71's Avatar
Recognized Contributor
Thanks Meter 3389
Posts: 5,698
Join Date: Feb 2011
Location: Atlantis

 
DONATE TO ME
At first Glance, I had half a mind to suggest setting up Parental Controls and use Xposed Apps to turn off Locations. But I understand your professor won't take kindly to that.

So how does one go about this ? Well, you are on right track. Here's the thing. I am a Rom developer but I do not support this device. (Long story there....) So you may want to reach out some of the Developers who do support this device if need be. But be mindful that you want someone that actually makes TouchWiz (henceforth TW) Roms, since that's what you are trying.

Here's some of my suggestions. Let's start with the basics ones. The Stock Roms are all Odexed. So in order to mod the part you need, you'd have to first De-Odex them all. I am sure you must have considered that but didn't see you mention it.

Second, especially with APK Tool, you do need the 2 APKs that are specific to TW framework. One's called TWFramework-res.apk and the other one is something to do with SystemUI. I believe its these two you may have to mod or at least keep them in right path for APK Tool.

SecSettings will remove the Location Option from Settings Menu. Quick Settings I believe would be in System UI. I doubt you'd need to go to Smali level or Services.jar. Look around the mods for Status Bar. In particular @Ticklefish tutorials are pretty good ones. Go through them if not done so already.
The Following 2 Users Say Thank You to Perseus71 For This Useful Post: [ Click to Expand ]
 
vhfw
Old
(Last edited by vhfw; 11th February 2014 at 07:24 AM.)
#3  
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Feb 2014
Lol, I would agree. Though he is pretty chill, so maybe he would appreciate the humor behind it.

Yeah sorry I forgot to mention, I did deodex the ROM before modding. Learned that one the hard way. Thank you very much for replying. I already had the frameworks and systemui installed as well, but I took a look at the @Ticklefish tutorials. It didn't help me directly but it led me to somewhere great. Right here: http://forum.xda-developers.com/show....php?t=2594659

Turns out we were kind of in the wrong place. The array.xml that I needed to edit for default toggles upon deployment was actually in SecSettingsProvider and not SystemUI. I have a feeling that the array inside SystemUI worked a while back, but new stock updates have left dead code. I'm starting to see that everywhere in various edits.

The above tutorial adds toggles, but I worked backwards and used it remove individual toggles as well. The settings I was looking for were located in settings.db in the /data/data/android.com.... blah blah blah (you can see it on the great tutorial above). So after modifying that and testing, it worked! My brain then figured there has to be something telling settings.db to be configured that way, and that was where I found arrays.xml in secsettingsprovider.apk\res\values.

This gives a lot of control, and allows you to add/remove individual toggles you want as default in the ROM. Plus there are tons of Boolean defaults as well you can set in the same folder.

Not sure if this applies to older versions of Android or even Samsung, but if the other tutorials don't prove tried and true, THIS is the way to go.

Thanks again mate, I really appreciate the links. Hope this helps others too!
The Following User Says Thank You to vhfw For This Useful Post: [ Click to Expand ]
 
Perseus71
Old
#4  
Perseus71's Avatar
Recognized Contributor
Thanks Meter 3389
Posts: 5,698
Join Date: Feb 2011
Location: Atlantis

 
DONATE TO ME
Glad it all worked out. Do be mindful that the Array in SystemUI is true AOSP file. Samsung's edits have left it unusable on Touchwiz.
 
vhfw
Old
(Last edited by vhfw; 11th February 2014 at 10:21 PM.)
#5  
Junior Member - OP
Thanks Meter 1
Posts: 6
Join Date: Feb 2014
Quote:
Originally Posted by Perseus71 View Post
Glad it all worked out. Do be mindful that the Array in SystemUI is true AOSP file. Samsung's edits have left it unusable on Touchwiz.
Ah got it. That makes perfect sense. So not "dead" code per-se but Touchwiz is overwriting AOSP code with their own. So the tactics discussed above only work with Samsung related products. Cool I'm learning! heh
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes