[MOD] Disable low battery, battery temperature pop-ups and full battery notification - Galaxy S III Themes and Apps

The reason for this little hack is the fact those 2 pop-ups can become an extreme double-annoyance while driving in hot weather. Imagine, your battery is below 15%, yet scorching hot, beyond the charging cut-off threshold. Connect a charger and you get bombarded with the "charging paused, battery temperature too high" pop-ups. Disconnect it and you get a low battery ones. This little patch deals with the issue by simply disabling the annoying pop-ups. It also disables the annoying battery full notification.
Please note, this doesn't modify any functionality, it just disables the pop-ups. The battery will not and should not charge when overheated.
Instructions:
Download and unpack "BatteryPatch.zip", you should now have "Patch.js" jscript along with the "utils" directory.
Fetch your "/system/app/SystemUI.apk" from the device, place it in the same directory, along with the "Patch.js".
Apply the patch by launching "Patch.js" and push the patched SystemUI.apk back to the device.
Updates:
Not every ROM seems to have the battery full notification and/or battery overheating popup. Patching those is now optional, the script will show a warning in case it fails to patch those instead of erroring out completely.
There are some ROMs out there with showLowBatteryWarning method looking somewhat different from what i've seen on my S3. In order to try & let the patch work on more ROMs, the showLowBatteryWarning method is now being bypassed entirely. Hopefully, no ROM does anything important inside that method, besides showing the annoying low battery popups. In any case, as usual, you use the patch - you take the risk.
PS: For those willing and able to apply the patch manually, download the second zip and do a 3 way merge.

===> reserved <===

Nice mod...just added it to my rom.. purposely drained the battery...no notification pop up (hopefully won't get the temp warning anyway)
Lovely work
Already given 8 thanks today...I will come back!

_neutron_ said:
Nice mod...just added it to my rom.. purposely drained the battery...no notification pop up (hopefully won't get the temp warning anyway)
Lovely work
Already given 8 thanks today...I will come back!
Click to expand...
Click to collapse
Thanks. Temp warning should not be there any longer, too. But the rest of them (bad charger, overcurrent, stuff like that) are still there, i don't think killing those is a good idea.
The reason i did this was primarily the temperature warning. I've been looking all over the forum on how to disable it, but couldn't find any info, so i though, "what the hell, i can find it myself, it's not such a big deal"... during the search i've noticed the low bat one, too, and though "hmm, i hate that one too, lets kill it as well".
Thats about it.

Just patched and tested the full battery notification as well, first post updated.

Lovely, gonna test this when I get home
Thanks for the update

sorry to sound like a total noob, but im completely new to apktool. was reading up on it and trying it, but im slightly confused. what options do you chose exactly when decompiling? i couldnt find the power smali file after decompiling

There are plenty of explanations/tutorials on this around the forum. About not having the smali after decompiling... any chance your rom is odexed? In this case you wont be getting any smali files, cause all the code is in the odex file, not the apk. You will have to deodex it in this case and, possibly, reodex it before placing it back on the device (not sure about it, specifically i am unsure how the odex dependecies work).
Sadly, i cannot provide a ready to use apk, there are too many versions being in use, especially considering the 15 toggles mod, the battery icon mod as well as many other visual mods also patch stuff inside this apk, increasing the number of variations even further. So, sorry, no ready to use apk.

Is there a flashable file?
Sent from my GT-I9300 using Tapatalk 2

baste07 said:
Is there a flashable file?
Click to expand...
Click to collapse
Nope, and it is extremely hard to make. In fact, impossible, with the currently available CWM tools, as far as i know. It would be "for ROM version <insert_version_here> with 15 toggles and circle battery", "for ROM version <insert_version_here> without 15 toggles and green battery" etc etc etc kind of variations, and as i already mentioned, i doubt this is a viable option.
Anyone can prove me wrong and provide a way of writing a CWM script that would decompile (deodex if needed) an existing apk, apply a patch, recompile it and than replace it ? Out of all the things needed, i only know how to do the "replacing" part

Can i ask a massive favour?
im now havin problems with my systemui in regards to it recording the changes (decompiling & recompiling - i think i have an issue with my pc but i cant figure it out)
Could you apply the changes to the attached file for me?

InfX said:
There are plenty of explanations/tutorials on this around the forum. About not having the smali after decompiling... any chance your rom is odexed? In this case you wont be getting any smali files, cause all the code is in the odex file, not the apk. You will have to deodex it in this case and, possibly, reodex it before placing it back on the device (not sure about it, specifically i am unsure how the odex dependecies work).
Sadly, i cannot provide a ready to use apk, there are too many versions being in use, especially considering the 15 toggles mod, the battery icon mod as well as many other visual mods also patch stuff inside this apk, increasing the number of variations even further. So, sorry, no ready to use apk.
Click to expand...
Click to collapse
ah that explains why there is no smali file. thanks for the help!

I also cannot get this mod to work, wishing easier method coming soon, like one zip file thru recovery or similar... i dont have patience to this sorta things.
Sent from my GT-I9300 using xda app-developers app

_neutron_ said:
Can i ask a massive favour?
im now havin problems with my systemui in regards to it recording the changes (decompiling & recompiling - i think i have an issue with my pc but i cant figure it out)
Could you apply the changes to the attached file for me?
Click to expand...
Click to collapse
Done. Enjoy.

GalaxyS3man said:
I also cannot get this mod to work, wishing easier method coming soon, like one zip file thru recovery or similar... i dont have patience to this sorta things.
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Well, if you know of someone that could have possibly coded an infrastructure for doing this kind of patches onboard, automatically, i would be glad to get pointed to the right direction, and will integrate it there. Currently, i don't know of any.
Seriously, though... is it possible to baksmali in recovery mode somehow ? Can one run patch, sed and similar utilities there ? If yes, can i see an example ? Cause if that's possible, it can make a "flashable zip" for stuff like that possible.

hmm, so if i have these files in my app folder:
systemui.apk
systemui.odex
I cannot just add/replace the code as described?

reprazent said:
hmm, so if i have these files in my app folder:
systemui.apk
systemui.odex
I cannot just add/replace the code as described?
Click to expand...
Click to collapse
You can deodex, patch the smali while having it handy during deodexing, and, possibly, reodex it back into an odex file and replace just the odex. Never did it myself, though. I find odexed roms to be too much of a hassle while modding stuff to use those.

Is it ok if i ask help too?
InfX said:
You can deodex, patch the smali while having it handy during deodexing, and, possibly, reodex it back into an odex file and replace just the odex. Never did it myself, though. I find odexed roms to be too much of a hassle while modding stuff to use those.
Click to expand...
Click to collapse
I been trying for days...help, i go crazy with those popups

Thats what i have on my rooted S3 I just like Omega rom, tried several others non Samsung based aswell.
Sent from my GT-I9300 using xda app-developers app

GalaxyS3man, your apk is NOT odexed. Took me barely 2 minutes to apply the patch. Here we go...
PS: TBH, i've been under impression people on XDA are perfectly familiar applying and/or finding out this kind of stuff, really

Related

[Q] Changing framework-res

I'm familiar with changing the icons/files in framework-res on the phones, I assume the process would be the same on the Archos Gen 8s. I understand we don't have a nandroid backup to load if we screw it up but messing with the SDE version of Android somewhat alleviates that fear.
Am I right that it should be the same?
Yes.
Just keep in mind that you need to use a version like UrukDroid that gives you writeAccess to /system, because SDE only doesn't work.
Thanks. I'm using Uruk 0.4.1, so I'm ready to get to work.
This is mostly to fix the stupid Talk notification icon (am I the only one that has two white pixels on top of the talk bubble?) but I know from past experience it will soon progress to sick days, missed family events, and late night arguments with my wife as I desperately attempt to tweak just one more thing to get rid of the urge. . .
Yes its time for some themes...stock looks ugly when compared to my epic 4g
Sent from epic 4g
http://forum.xda-developers.com/showthread.php?t=889963
txtmikhail said:
http://forum.xda-developers.com/showthread.php?t=889963
Click to expand...
Click to collapse
Thanks for the link but don't think this will really help as it is. The script tries to mount the /system folder on the internal nand, which won't work for us (well, not using the UrukDroid root, anyway). Should be able to tweak the script though.
Have tried replacing the framework.apk manually with an edited one, and set the correct permissions (on UrukDroid 0.4.2), but all I get is a black screen after the second Archos splash screen. Have done it the same way I did on my Desire, by editing the contents of framework-res.apk, rather than unpacking and repacking, but I guess there may be a signing issue here. I forget how much of the hard work Clockwork recovery does for you! Also, it may require edited the services.jar, but I'm not sure how to do that, or what needs editing. So far, all I did was try to change icons etc.
fisha21 said:
Have tried replacing the framework.apk manually with an edited one, and set the correct permissions (on UrukDroid 0.4.2), but all I get is a black screen after the second Archos splash screen. Have done it the same way I did on my Desire, by editing the contents of framework-res.apk, rather than unpacking and repacking, but I guess there may be a signing issue here. I forget how much of the hard work Clockwork recovery does for you! Also, it may require edited the services.jar, but I'm not sure how to do that, or what needs editing. So far, all I did was try to change icons etc.
Click to expand...
Click to collapse
Thanks for boldly going where no man had (reportedly) gone before. I hadn't gotten around to doing my best bootloop job yet, but you saved me the time.
We need to find a themer with a lot of spare time and Uruk!
p0rk burn said:
Thanks for boldly going where no man had (reportedly) gone before. I hadn't gotten around to doing my best bootloop job yet, but you saved me the time.
We need to find a themer with a lot of spare time and Uruk!
Click to expand...
Click to collapse
Haven't given up yet! Keep your eyes on this space....
EDIT
In fact, keep your eyes on this space! Thoughts/comments welcome

How do you disable the crt animations on Calk's rom?

Hey all, the crt animations are just plain buggy. Is there any way to permanently disable and remove it when running calks rom?
I know how to disable it via settings and display settings under turn off all animations but I want all animations minus the crt?
Thanks in advance you all.
Sent from my SPH-D710 using Tapatalk
Try downloading Spare Parts from Market and set transition animation to fast and leave window animation normal
Sent from my SPH-D710 using xda premium
I tried this method and it worked but now I just flashed a all in one theme for hotspot fix and rotational lag and it is showing crt again. Does anyone have a permanent disable or fix for this? To me the crt is extremely buggy and inefficient to use as it wastes my time. The wake is already slow as is I don't need to wait for the extra delay.
Sent from my SPH-D710 using Tapatalk
If you know how to decompile your framwork-res.apk file with apktool, you can disable.
Change "<bool name="config_animateScreenLights">false</bool>" to "<bool name="config_animateScreenLights">true</bool>"
Don't do that if you don't know how or haven't done a backup though. You'll get bootloop if you mess it up.
Hi - Any other way than spare parts to disable this? I'm not familier with the APK tool. I can look into if I need be, but if there is a more straight forward way.....
Spare parts isn't currently changing anything for me.
EpicAOSP ROM, AIO Mod
i beleive the most recent 2 new ROM versions have it disabled by default. but there is a zip somewhere in E4GT forums that allos you to disable. i'd do a search for that if you dont want to flash a new ROM.
do people really like it that much that it has to be included on every ROM? I was always kind of indifferent to it
Im with the OP. I cannot stand the CRT annimation. It was cool at first. For the first week or so, but now its just old. I don't get why all roms include it now. Is there a .ZIP that could be flashed or any other methods to remove (that dont risk bootloading)
PimpDaddyInc said:
Im with the OP. I cannot stand the CRT annimation. It was cool at first. For the first week or so, but now its just old. I don't get why all roms include it now. Is there a .ZIP that could be flashed or any other methods to remove (that dont risk bootloading)
Click to expand...
Click to collapse
The action is in the one of the xml files within your framework-res.apk. Now there seems to be work arounds but to to fix it you have to decompile the file and change the setting. Its honestly not a big deal to do and you may learn something along the way.
I believe these developers do a lot for us and certain small things like this we should all try and learn so we can help ourselves and not have to bother them.. IMHO
bralkan said:
Hi - Any other way than spare parts to disable this? I'm not familier with the APK tool. I can look into if I need be, but if there is a more straight forward way.....
Spare parts isn't currently changing anything for me.
EpicAOSP ROM, AIO Mod
Click to expand...
Click to collapse
Go to this link: http://forum.xda-developers.com/showthread.php?t=1307635
It explains how to decompile/recompile. Note that you will be working on framework.apk and not on systemui.apk
Then do as $roid said and
Change "<bool name="config_animateScreenLights">false</bool>" to "<bool name="config_animateScreenLights">true</bool>"
meatwadathf said:
Go to this link: http://forum.xda-developers.com/showthread.php?t=1307635
It explains how to decompile/recompile. Note that you will be working on framework.apk and not on systemui.apk
Then do as $roid said and
Change "<bool name="config_animateScreenLights">false</bool>" to "<bool name="config_animateScreenLights">true</bool>"
Click to expand...
Click to collapse
Still got to use APK tool for this though and honestly its not that hard...
CRT is the shiznit !
I love my counter rotational transponder !
Sent from my tofu plasma converter.

[FIX][ICS][Stock ROMs and derivates][08/07]CRT-On and CRT-Off effects

As reported in multiple places on the forum, stock ICS ROMs do not come with the CRT-Off effect available, although the code is there and lots of existing mods already exist to be able to turn it on.
The implementation, however, contains a glitch and every once in a while the full screen image will blink right after the beam collapses.
I have managed to apply the fix to the Sammy's custom library that implements this, even though the source code is not available. (this wouldn't be possible without the good folks on CM9, though!).
The discussion that lead to this work can be found here, on the awesome JKay mod. BTW, if this fix is useful to you, do me a favor a buy that man's Deluxe app (it's really a favor you're doing to yourself, not me ).
For any ROM cookers, MOD developers, or end-users, I leave the patched file and a few instructions to make sure the provided lib only changes the flicker part. This is because I have performed the changes on the file shipped on XWLP9, and if other different files exist in other builds, it's more convenient to apply the fix there instead of using the lib from a different ROM and possibly lose some other improvements or fixes applied by Samsung.
Please check the Readme file in the archive for instructions on what to confirm and how to apply the change, and let me know if there's any question or if you have a different base version.
EDIT:
The library has been updated to handle CRT-On effect as well. You can safely replace it with the attached version, although you'll need to have a mod to activate the CRT-On effect as well.
If you want to install a standalone patch to activate this, have a look at this post and follow the instructions.
Technical notes
The code has been revised to display 8 frames when turning on - as opposed to 24 when turning off - in order to have a faster response. This is however still dependent on the time taken by the kernel to wake the CPU, before drawing can begin (currently about 1s). This delay will not happen if you don't wait long enough after turning off, as the CPU will not enter deep sleep.
Changes from Kamma have also been applied, in order to have a similar effect when turning On - "normal" screen colors instead of random color spikes. This might be barely noticeable due to the animation speed.
EDIT2:
No more issues with the library, it now works perfectly with Youtube playing videos, etc. Also the CRT-On effect is now very smooth (although faster than CRT-Off, on purpose).
Major kudos to rovo89 for turning an initial hack to fix the glitches in a polished final product!!!
Be aware that this just contains the library for the effects to work properly. You'll still need your ROM to be modded to activate them (instructions included in this zip file), or, better yet, install rovo89's Xposed Tweakbox module which overrides the behavior without replacing any files and should work even with non-stock roms.
Out of the box solutions for getting the CRT effects
Tweakbox by rovo89 (and a bit of help from myself) - works for pretty much all stock roms and derivatives, odexed or deodexed. It's even working for S3, since it contains a patched file from that model.
If you're using Deodexed XWLPG, you can also go to this post by The Undertakerr and fetch a flashable zip that contains everything that's needed to have CRT_On and CRT_Off effects always active.
Works great on Wanam V11.7 (LPD)
Wow thanks a lot for this
Enviado desde mi GT-I9100 usando Tapatalk 2
Thanks man!
Applied JKay's CRT mod just today and noticed the bug, now you fixed it!
I try on Turkbeyrom V9 Lpd. Its working perfect.
Wysłane z mojego GT-I9100 za pomocą Tapatalk 2
@ Tungstwenty
... Carried over from jkays thread,
You're right i didn't have any anything to turn crt on, i presumed it enabled it by default, since i flashed a similar fix from another thread and it enabled it straight off.
So hopefully jkay includes it in his mod and 'jobs a goodin'
Cheers
Sent via courier pigeon
Works perfect on Wanam V11.7.
Thank man!!
This is working great, also on LPQ. I also thought about patching the library directly, but didn't know where I could get the replacement code from. Great work!
I have been working hard today to bring some binary patching functionality to Xposed. Finally, I think I was successful. Learned some new things, like modifying a different process' memory. That will make it possible to patch the library on the fly, just if the MD5 sum matches etc. I believe this will make it easier to use for those who are not as experienced with adb/SSH/...
rovo89 said:
This is working great, also on LPQ. I also thought about patching the library directly, but didn't know where I could get the replacement code from. Great work!
I have been working hard today to bring some binary patching functionality to Xposed. Finally, I think I was successful. Learned some new things, like modifying a different process' memory. That will make it possible to patch the library on the fly, just if the MD5 sum matches etc. I believe this will make it easier to use for those who are not as experienced with adb/SSH/...
Click to expand...
Click to collapse
Wow, that would be yet another massive leap in your framework. Patching e.g. native libs on running processes from within java would really be awesome
If you've reached that stage already, you probably already know that "cat /proc/nnnn/maps" yields interesting information on where each library's segment is mapped. Other pseudo-files on that path also hold tons of information just waiting to be explored and hacked
Works perfectly well on LPF build.
I'm wondering whether its possible for you to make a flash able version?
SGSII GT-i9100 via Tapatalk II
I pasted it using romtoolbox but it didnt work so I rebooted and it works !!
Thanks
Tungstwenty said:
Wow, that would be yet another massive leap in your framework. Patching e.g. native libs on running processes from within java would really be awesome
If you've reached that stage already, you probably already know that "cat /proc/nnnn/maps" yields interesting information on where each library's segment is mapped. Other pseudo-files on that path also hold tons of information just waiting to be explored and hacked
Click to expand...
Click to collapse
Indeed, I'm using the files in /proc for patching. Plus "ptrace" to manipulate the /system/bin/surfaceflinger process, after I noticed that the library isn't used directly by any process started by Zygote. And for the patch file, I'm using bsdiff and a MD5 sum comparison.
If anyone would like to try out, here are betas of the upcoming Xposed framework and the Tweakbox. Installing instructions are in the linked threads. Afterwards, you can check "Patch libsurfaceflinger.so" in the Tweakbox settings, which will become effective after a reboot (but doesn't require replacing any files).
Please note that I have also added new helper methods for developers. Let me know in case setting the statusbar clock color is not working for you.
Tungstwenty said:
Wow, that would be yet another massive leap in your framework. Patching e.g. native libs on running processes from within java would really be awesome
If you've reached that stage already, you probably already know that "cat /proc/nnnn/maps" yields interesting information on where each library's segment is mapped. Other pseudo-files on that path also hold tons of information just waiting to be explored and hacked
Click to expand...
Click to collapse
I've been testing your lib for 2 days now and as i told you in Jkay's thread flicker bug is gone
The only thing i noticed,happened only 2 times ,i had no crt off effect at all.
The screen locked as in stock.
Thank you for this
Please check and confirm guys..
Unlock screen, do not do anything. Just wait 7-8 Seconds without touching on the screen and then turn off screen, there will not be any CRT Off effect.
This, Tungstwenty, is a huge step forwards in development of the I9100. Even on Gingerbread the CTROff effect wasn't as beautiful as it is now!
CtrON is also available allready for ICS 4.0.3, only not for our device.
XDA member Kamma made it work on the Galaxy Nexus, and also posted the sources for it.
It involves changes in the libsurfaceflinger.so and in the services.jar.
Since you seem to be able to make changes in the .lib, my hope is on you, perhaps you could also bring the CRTON to the I9100 with ICS!
Sources+ info you can find in this thread:
http://forum.xda-developers.com/showthread.php?t=1490127
Thanks in advance for looking into it and bringing us a perfect CrtOff!!!
The Undertakerr said:
This, Tungstwenty, is a huge step forwards in development of the I9100. Even on Gingerbread the CTROff effect wasn't as beautiful as it is now!
CtrON is also available allready for ICS 4.0.3, only not for our device.
XDA member Kamma made it work on the Galaxy Nexus, and also posted the sources for it.
It involves changes in the libsurfaceflinger.so and in the services.jar.
Since you seem to be able to make changes in the .lib, my hope is on you, perhaps you could also bring the CRTON to the I9100 with ICS!
Sources+ info you can find in this thread:
http://forum.xda-developers.com/showthread.php?t=1490127
Thanks in advance for looking into it and bringing us a perfect CrtOff!!!
Click to expand...
Click to collapse
It is not perfect, please check my post above and confirm..
mzeshanhakeem said:
Please check and confirm guys..
Unlock screen, do not do anything. Just wait 7-8 Seconds without touching on the screen and then turn off screen, there will not be any CRT Off effect.
Click to expand...
Click to collapse
Tried to reproduce this a couple of times, but it always worked fine. I turned the phone on, unlocked (using WidgetLocker), then didn't do anything for few seconds and pressed the power button to lock the phone. The effect is showing for me.
mzeshanhakeem said:
It is not perfect, please check my post above and confirm..
Click to expand...
Click to collapse
I cannot confirm the behaviour you have, I'm sorry. It's nothing new. The thing you describe also happened before the change made to libsurfaceflinger.so by Tungstwenty.
It even also happened on Gingerbread!
Sometimes the lockscreen also freeze for a few secs, but that's also not because of this change. You can read about it in the Siya kernel thread, seems to be related to the newest Siyakernel...
The Undertakerr said:
I cannot confirm the behaviour you have, I'm sorry. It's nothing new. The thing you describe also happened before the change made to libsurfaceflinger.so by Tungstwenty.
It even also happened on Gingerbread!
Sometimes the lockscreen also freeze for a few secs, but that's also not because of this change. You can read about it in the Siya kernel thread, seems to be related to the newest Siyakernel...
Click to expand...
Click to collapse
That may be the reason.
I am on Wanam v11.8 with CF Root Kernel.
mzeshanhakeem said:
Please check and confirm guys..
Unlock screen, do not do anything. Just wait 7-8 Seconds without touching on the screen and then turn off screen, there will not be any CRT Off effect.
Click to expand...
Click to collapse
I cannot reproduce this also.
Tried just turning on screen and leave it alone, it will automatically CRT Off after 10s with my current settings. If I press Power 1 or 2 seconds before that, it still does the effect.
Also tried it with actual unlocking (going to the home screen), and effect also displays when turning off after 8s idle.
Does it always happen to you?
Running on XWLPF with JKay and Siyah 3.2.6.3

[Q] Nexus screen buttons

Does anyone know if there is a working app mod or hack to enable the incredible2 to have nexus-like on-screen buttons and disabling the lights and functions of the hardware buttons like on ParanoidAndroid has it?
cowboyv said:
Does anyone know if there is a working app mod or hack to enable the incredible2 to have nexus-like on-screen buttons and disabling the lights and functions of the hardware buttons like on ParanoidAndroid has it?
Click to expand...
Click to collapse
This is the main reason I stick with PA. If someone can mod the framework of the rom you are using, it may be option, but most of the roms don't have that built in. You might mention it in the thread of the rom you use and see if someone can hook you up.
Yeah, I'm wondering if maybe you can copy and paste the frameworks folder from PA rom to the other rom and if that would activate the on screen buttons.
I doubt that would be a good idea, but I'm not the one to answer that one.
Sent from my Incredible 2 using xda premium
cowboyv said:
Yeah, I'm wondering if maybe you can copy and paste the frameworks folder from PA rom to the other rom and if that would activate the on screen buttons.
Click to expand...
Click to collapse
Just a warning, that very well may put your phone into a boot loop, if you decide to try it......BACKUP first
Sent from my Incredible 2 using xda app-developers app
@Phantom: according to this thread it's just a matter of decompiling framework-res.apk, making some changes and then recompiling the whole thing, which is why I'm thinking maybe it is as simple as copying/pasting the apk.
@Tricsuit: Yeah, I know. I already learned my lesson and before attempting stupid ideas like this one, I run a full back up of the rim, settings, apparently and data, and then make sure to save the back up file in my box to be able to retrieve it from my computer just in case something else hiccups.
cowboyv said:
@Phantom: according to this thread it's just a matter of decompiling framework-res.apk, making some changes and then recompiling the whole thing, which is why I'm thinking maybe it is as simple as copying/pasting the apk.
@Tricsuit: Yeah, I know. I already learned my lesson and before attempting stupid ideas like this one, I run a full back up of the rim, settings, apparently and data, and then make sure to save the back up file in my box to be able to retrieve it from my computer just in case something else hiccups.
Click to expand...
Click to collapse
Thanks for the share m8, I will try to look into this one more over the weekend. If you decide to give it a go with a copy and past let me know how it works out.
Yeah, I'm on call for the next couple of days so I won't be able to play with the rom, but if I'm able to make it work I'll post it here. :beer:
Welp, I began to toiler around with this, succeed in decompiling res-framework.apk, changing the bools, arrays and dimens values and added the menu images, basically all the way down to step 5, but I can't seem to recompile it back into .apk... uhm... a little help guys? ^^;

[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!
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. :angel:
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.
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/showthread.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!
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.
Perseus71 said:
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.
Click to expand...
Click to collapse
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

Categories

Resources