T-Mobile HTC One M8 Gets Selfie-Friendly Android 4.4.4 OTA

The T-Mobie variant of HTC One (M8) just now received an over-the-air update … more

Android L is for Lockdown

Root is, without a doubt, the (un)holy grail of the Android world. Those wonderful permissions that allow you as … more

XDA Xposed Tuesday: XHangouts Will Improve Your Hangouts

Ever since Google started supporting text messaging in Hangouts many people have … more

Shattered Screen? Turn Your Broken Device into a Complete Media Center!

A cracked screen usually means you’ll have to spend a hefty … more
Post Reply

Script Writing

OP mrminor13

16th January 2014, 12:34 AM   |  #1  
mrminor13's Avatar
OP Senior Member
Thanks Meter: 61
 
100 posts
Join Date:Joined: Mar 2013
More
I would like to write a script to make a custom toggle in quick settings open up the power widget. Anyone willing to either help me learn about writing script or to tell me the script to enter to make this magick happen?

Thank you in advance...:beer:

Sent from my Nexus 7 using xda app-developers app
Hammer_Of_The_Gods
16th January 2014, 09:06 AM   |  #2  
Guest
Thanks Meter: 0
 
n/a posts
Hi,

It's not with a script that you can do that, but you have multiple solutions:

- Decompile/modifie/recompile the SystemUI.apk and Framework (at least), there is some guides but it's the harder thing (like this for example then edit the quick settings).

The easy way is to use:

- A custom rom that allows quick settings management (see dev section).

- Use an app like Power Toggles or Notification Toggle.

- Use Xposed framework with Xposed modules like Gravity Box.

It depends if you are rooted or not, if you want to flash a custom rom, etc...

Last edited by Hammer_Of_The_Gods; 16th January 2014 at 09:22 AM.
16th January 2014, 11:56 AM   |  #3  
mrminor13's Avatar
OP Senior Member
Thanks Meter: 61
 
100 posts
Join Date:Joined: Mar 2013
More
I'm sorry, I probably should've mentioned this before hand. I'm currently running slimkat 2.3, which, I don't know if your familiar with. But it has "The Chamber of Secrets", which allows you to basically write a custom shortcut to edit any setting within the build prop. ( Now you should know I'm guessing at its full capabilities because I don't know how to use it and I'm asking for help)

I'm not new to flashing ROMs, kernels or apks, but I've never compiled my own ROM. And I don't really have the capability or need to do so. From what I understand, the chamber of secrets is pretty amazimg , I just want to know how to use it.

Sent from my Nexus 7 using xda app-developers app
17th January 2014, 12:26 PM   |  #4  
Jubakuba's Avatar
Recognized Developer
Flag Pueblo, Colorado
Thanks Meter: 5,405
 
2,355 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Quote:
Originally Posted by mrminor13

I'm sorry, I probably should've mentioned this before hand. I'm currently running slimkat 2.3, which, I don't know if your familiar with. But it has "The Chamber of Secrets", which allows you to basically write a custom shortcut to edit any setting within the build prop. ( Now you should know I'm guessing at its full capabilities because I don't know how to use it and I'm asking for help)

I'm not new to flashing ROMs, kernels or apks, but I've never compiled my own ROM. And I don't really have the capability or need to do so. From what I understand, the chamber of secrets is pretty amazimg , I just want to know how to use it.

Sent from my Nexus 7 using xda app-developers app

Hai. Author here.
I routinely search xda for the chamber to make sure nobody has done anything TOO stupid with it lol.
Anyway.
Power menu isn't in it's capabilities.
However...wrote up a powemenu shortcut for slim shortcuts.
Merged...so will be in the next build.
The Following 2 Users Say Thank You to Jubakuba For This Useful Post: [ View ]
17th January 2014, 11:23 PM   |  #5  
mrminor13's Avatar
OP Senior Member
Thanks Meter: 61
 
100 posts
Join Date:Joined: Mar 2013
More
Quote:
Originally Posted by Jubakuba

Hai. Author here.
I routinely search xda for the chamber to make sure nobody has done anything TOO stupid with it lol.
Anyway.
Power menu isn't in it's capabilities.
However...wrote up a powemenu shortcut for slim shortcuts.
Merged...so will be in the next build.

Thanks juba. I didn't want to clog up the thread with my ignorance. I would really like to learn though. I tried doing some research on my own last night on the Settings.java file. But not sure what in looking at.

If you could please point me in the right direction to start learning it would be much appreciated. I understand that I could really needs things up if I do the wrong thing. And don't want to do that. However, I'm a pretty competent person and want to learn.

Thank you for all the work you have done for our perfect ROM!

Sent from my Nexus 5 using xda app-developers app
17th January 2014, 11:36 PM   |  #6  
Jubakuba's Avatar
Recognized Developer
Flag Pueblo, Colorado
Thanks Meter: 5,405
 
2,355 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Quote:
Originally Posted by mrminor13

Thanks juba. I didn't want to clog up the thread with my ignorance. I would really like to learn though. I tried doing some research on my own last night on the Settings.java file. But not sure what in looking at.

If you could please point me in the right direction to start learning it would be much appreciated. I understand that I could really needs things up if I do the wrong thing. And don't want to do that. However, I'm a pretty competent person and want to learn.

Thank you for all the work you have done for our perfect ROM!

Sent from my Nexus 5 using xda app-developers app

Well.
The settings.java file lists all possible system settings.

For example...
Say I wanted to make a shortcut to turn my status bar clock a different color.
I'd search the file for something that looks like a match...
Like Ctrl+f > "clock"

Next...next...next...etc.
Oh, look. "statusbar_clock_color"
That sounds right.

Add to chamber.
Checkbox? No...that isn't a checkbox setting.
Values?
Here's where it gets tricky.
Check boxes and colors...simple.
Colors: input like it tells you to in the dialog.
-2 means default for us...so you could do red,#ff00aacc,-2
For example...to switch between those three values.

List preferences...
https://github.com/SlimRoms/packages...lim_arrays.xml

As you can see...the top bunch is for what looks like led timeout settings...
So if I wanted to change those...
I'd find the setting in settings.java...
Input desired values. Such as 0,2500
Which matches to always on and long.
18th January 2014, 02:50 AM   |  #7  
mrminor13's Avatar
OP Senior Member
Thanks Meter: 61
 
100 posts
Join Date:Joined: Mar 2013
More
Thank you. I'm going to be delving into this this weekend.

Sent from my Nexus 5 using xda app-developers app

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 5 Q&A, Help & Troubleshooting by ThreadRank