[ROOT][APP] Logo+ - OSS Implementation of Lighting Effects for Razer Phone 2

JDubbed

Senior Member
Feb 18, 2011
168
27
0
CurtisMJ,

I'm having some interesting results while using your app. I'll be switching between passive effects and effect length and then randomly the backlight won't light up at all with your app. I even try turning the service off then on in your app. Only way to make it work with your app when this happens is if I reboot the phone or use Chroma to toggle the backlight and then your app works again. But then the problem can come back. Rinse and repeat.

Also the pocket mode doesn't appear to work. I'll toggle that option on and cover the phone with a dark blanket and I'll peak underneath to see if the backlight goes off while the phone's screen is on and while it's off. Both times the backlight stays on.

Should I have Chroma toggled off while using Logo+?

Any suggestions?

Thanks!
 

CurtisMJ

Senior Member
May 23, 2013
633
531
0
CurtisMJ,

I'm having some interesting results while using your app. I'll be switching between passive effects and effect length and then randomly the backlight won't light up at all with your app. I even try turning the service off then on in your app. Only way to make it work with your app when this happens is if I reboot the phone or use Chroma to toggle the backlight and then your app works again. But then the problem can come back. Rinse and repeat.

Also the pocket mode doesn't appear to work. I'll toggle that option on and cover the phone with a dark blanket and I'll peak underneath to see if the backlight goes off while the phone's screen is on and while it's off. Both times the backlight stays on.

Should I have Chroma toggled off while using Logo+?

Any suggestions?

Thanks!
The stock Chroma app actually needs to be disabled in order for the app to work yes (it still sends the command to power down the lights even if it's off)

I tried being clever with pocket mode (emphasis on "tried"). It only actually disables the lights if the proximity sensor is covered, there is low light AND the phone is tilted to the side. The idea was that you could have placed the phone face down on a table and in that case you would definitely not want the lights to turn off. Lastly, the sensors are only checked about 5 seconds after the screen is turned off (to allow for time to put the device in your pocket) and only checked once as the power saved by turning of the lights is offset by the power needed to keep the sensors running and waking the device regularly. I'm open to suggestions on some better criteria here though.
 
  • Like
Reactions: JDubbed

dutchsines

New member
Apr 15, 2019
2
1
0
Cleavland
Ideas

I had a few ideas, not sure if they're possible or not. My first idea was it would be cool if we could individually change the LED's color in static mode. Another idea i had is making it so the logo changes colors according to what app that you're in. One i saw that was being worked on was the music visualizer that would be sweet! I wish I could code lol great work and I look forward to updates!
 
  • Like
Reactions: CurtisMJ

xttweaponttx

Senior Member
May 23, 2013
56
16
0
Idaho Falls
Absolute gold. Thanks a million!

Although, I noticed I had to go fine the notification access switch myself (it wasn't prompted in the app) before it'd change depending on notifications.. not sure what I did there or if it's a bug.

Thanks again!! ❤❤
 
  • Like
Reactions: dutchsines

GuitarGuy96

Senior Member
Mar 17, 2012
145
43
0
Bermuda Triangle.. HELP!
So apparently there's a bit of a catch 22 when it comes to a rootless version. The Razer service won't talk to you if you don't hold a specific permission, but that permission is one of those special ones only system apps are allowed to hold.

So in order to be rootless on the stock ROM, Logo+ needs to be a system app. But if you're systemizing an app, you probably already have Magisk installed anyway, and the service isn't available in custom ROMs where we can feasibly include it as a system app without Magisk's help, so what's the point? It's an interesting exercise, but it's just sort of... futile.
Hey would there be a way to provide the access your app needs via ADB commands? Like the way Naptime or XDA's Swipe Gestures app grants itself elevated privileges by having adb grant access via commands like

Code:
adb -d shell pm grant com.example.app android.permission.WRITE_SECURE_SETTINGS
would something like this be helpful?

Or is there another way of making your app be a system app via ADB commands?

I'm no expert at this so I might be wrong, but thought I'd ask since such commands let you provide an app certain access without rooting the device.
 

CurtisMJ

Senior Member
May 23, 2013
633
531
0
Hey would there be a way to provide the access your app needs via ADB commands? Like the way Naptime or XDA's Swipe Gestures app grants itself elevated privileges by having adb grant access via commands like



would something like this be helpful?

Or is there another way of making your app be a system app via ADB commands?

I'm no expert at this so I might be wrong, but thought I'd ask since such commands let you provide an app certain access without rooting the device.
That was the first idea I had but it got met with some variety of "This is not a modifiable permission" when I tried to grant it, or something to that effect. In this case it wasn't the secure settings permission but one Razer actually added.

I could look into this stuff again but I make no promises rootless mode will be possible.
 

GuitarGuy96

Senior Member
Mar 17, 2012
145
43
0
Bermuda Triangle.. HELP!
That was the first idea I had but it got met with some variety of "This is not a modifiable permission" when I tried to grant it, or something to that effect. In this case it wasn't the secure settings permission but one Razer actually added.

I could look into this stuff again but I make no promises rootless mode will be possible.
Understandable.
Thanks for the time and effort you're putting into this. Genuinely appreciate it.
I'll definitely be trying out this app after I get around to rooting the phone in the future. :)
 

davo2470

New member
May 1, 2019
1
0
0
The stock Chroma app actually needs to be disabled in order for the app to work yes (it still sends the command to power down the lights even if it's off)

I tried being clever with pocket mode (emphasis on "tried"). It only actually disables the lights if the proximity sensor is covered, there is low light AND the phone is tilted to the side. The idea was that you could have placed the phone face down on a table and in that case you would definitely not want the lights to turn off. Lastly, the sensors are only checked about 5 seconds after the screen is turned off (to allow for time to put the device in your pocket) and only checked once as the power saved by turning of the lights is offset by the power needed to keep the sensors running and waking the device regularly. I'm open to suggestions on some better criteria here though.
Hey can anyone tell me how to unlock bootloader on razer2
 

CurtisMJ

Senior Member
May 23, 2013
633
531
0
  • Like
Reactions: davo2470

tmorath5471

New member
May 22, 2019
1
1
0
Community development

First off, thank you for all the work you've put in on making this app into a reality. Really awesome stuff.

I'm a bit of a noob when it comes to modding and developing apks, but would love to take a crack at creating my own custom lighting options. I feel like at least a few people could agree.

Now, it may just be because I'm a noob, but I'm finding it difficult to pinpoint where various 'strings' ("pinwheel," "rolling," etc.) are being defined. I'm assuming that these hold what all is being run to control the lights themselves, however I have seen various "fade in/fade out" files and such.

If you're feeling a little gracious, I think a lot of us would appreciate a bit of insight into how everything is mapped out.

Anything is appreciated. Nothing is expected. :good:
 
  • Like
Reactions: CurtisMJ

CurtisMJ

Senior Member
May 23, 2013
633
531
0
I might try to update the GitHub readme with a more detailed description of how it works when I get home. I had a thread in the mods section explaining the technical details of the LEDs.
For now, you wouldn't find any resources associated with the effects in the APK as the LED controller uses microcode. Included in the app is a small compiler which builds the microcode on the fly, so all the lighting patterns are rooted in the Java code itself (this allows the app to change the colours and timing dynamically)

I did think of creating some kind of editor so that people could build their own controller programs. Making this actually accessible to "normal" users seemed like a bit of a task though. I guess I can assume most people browsing XDA aren't normal, so I might just go through with it.
 
  • Like
Reactions: dutchsines and RKBD

CurtisMJ

Senior Member
May 23, 2013
633
531
0
New version released!
Now has support for custom effects!!!
I've added some details in the second post of this thread. This mostly links to my Chroma research thread.
Adding effects is a bit involved at the moment but I'm still thinking of ways to make it a bit easier
 

flyera343

Senior Member
Sep 19, 2009
99
26
0
Thanks for your great work. I am enjoying your app.
I am getting notification effects during do not disturb. I can't find any setting allowing Logo+ to bypass dnd, but I may be missing something..
Any suggestions to stop those effects during dnd?
Thanks again for your time developing this..
 
  • Like
Reactions: CurtisMJ

CurtisMJ

Senior Member
May 23, 2013
633
531
0
Thanks for your great work. I am enjoying your app.
I am getting notification effects during do not disturb. I can't find any setting allowing Logo+ to bypass dnd, but I may be missing something..
Any suggestions to stop those effects during dnd?
Thanks again for your time developing this..
Ah, that would be because I did not develop such a function... Seems notification listeners might have different rules. I'll add that to the list of fixes I need to do
 

CurtisMJ

Senior Member
May 23, 2013
633
531
0
Is the music visualizer still a work in progress or has it been dropped completely? I'd love to have it.
Dropped for now as it requires system app privileges. It's weirdly hard to get them even with root. If I figure out a way to run in system context I actually already have the visualiser code ready
 
  • Like
Reactions: Trevor022