[FRAMEWORK MODS] Disable Screen On/Off on USB plug + Center Clock + others 11/27/2016

CZ Eddie

Senior Member
Sep 27, 2011
6,079
2,301
253
Austin, TX
The mods listed below are for the "V" version of Google Pixel XL images.

They probably work for non-XL as well as "U" and "X" images, but I can't guarantee this. I would definitely NOT flash this if you're on "N" or anything else.
Do note this is my first time providing framework mods, so... yeah. :eek:

Installing this mod probably won't wipe any data or pre-configured settings, but I can't guarantee that either.

The mod may or may not conflict with WETA framework mods, I'm not sure. Please let me know?

LIST OF CUSTOMIZATION YOU GET AFTER DOING THIS MOD:
  • ---Disable screen wake-on when unplug or plug USB
  • ---Disable IME Switcher Notification
  • ---Enable all rotations
  • ---Enable lockscreen rotation
  • ---Disable safe media volume
  • ---Centered Clock
  • ---Enable double-tap to wake (no idea if it works or not, may require kernel)

UPDATE: @Tulsadiver has added battery percentage/numeral options.
Please see post #7 for his zip and give him some thanks!

I'm going to eventually explore more mods, such as getting the 1% battery icon and adjusting status bar icon/clock/battery sizes.

Download the framework-res.apk and SystemUIGoogle.apk here:
http://www.filedropper.com/frameworkfiles

To install, you'll need a file browser with root privileges.
I use Root Explorer and that's what these directions are for.

Before proceeding, I do recommend that you copy your original framework-res and SystemUIGoogle to your PC in case you need to restore them.

1) Download the zip from link above.
2) Extract the zip on your PC.
3) Copy both APK files to your /sdcard.
4) Open Root Explorer and locate the files.


5) Copy both APK's to the /system_root/system folder.






6) Long press each APK and go to Root Explorer settings to change permissions.



7) Change permissions to RW/R/R for both APK's.



8) Copy Framework-res.apk to /system_root/system/framework and replace the existing file.
Your phone will automatically reboot.



9) Let phone boot back up and test to make sure you're okay.
10) Copy SystemUIGoogle.apk to /system_root/system/priv-app/SystemUIGoogle folder and replace the existing file.
Your UI will quickly restart.
I highly recommend manually initiating a full reboot son afterward to avoid UI force-closes.


I hope you enjoy this mod! :)



Many thanks to the folks in this thread for helping me get this far:
http://forum.xda-developers.com/pixel-xl/help/edit-framework-services-jar-t3504708
 
Last edited:

jaredtritsch

Senior Member
Feb 24, 2014
54
10
0
Salt Lake City, UT
Root Browser is not letting me set permissions on the APKs once it is in the system_root/system folder....
Stock rooted Pixel XL NDE63V with no other modifications. Root Browser does have permissions in SuperSU.

 
Last edited:

CZ Eddie

Senior Member
Sep 27, 2011
6,079
2,301
253
Austin, TX
Root Browser is not letting me set permissions on the APKs once it is in the system_root/system folder....
Stock rooted Pixel XL NDE63V with no other modifications. Root Browser does have permissions in SuperSU.
I have duplicated your issue with Root Browser.
Maybe that's why it's a free root app or maybe there is some setting it needs or maybe it's just not capable of understanding the file system to make the changes needed.

Try using Root Explorer.
It's worth the $.
https://play.google.com/store/apps/details?id=com.speedsoftware.rootexplorer&hl=en

Or you can try to use ADB to change permissions.
You'll have to Google the directions for that though.
 
  • Like
Reactions: Scott

death2all110

Senior Member
Sep 21, 2010
515
295
0
Illinois
...
I'm going to eventually explore more mods, such as getting the 1% battery icon and adjusting status bar icon/clock/battery sizes.
...
You can already get battery percentage in the battery icon, via System UI Tuner. See screenshots below for reference.

Steps to enable System UI Tuner:
Code:
1. Pull down the Notification drawer.
2. Long Press the Cog icon (Settings)
3. Cog should spin and phone should give some haptic feedback with a toast about System UI Tuner being enabled.
4. Settings>System UI Tuner (right above 'About Phone'). 
5. Tap 'Status Bar' and scroll down.
6. Tap 'Battery'.
7. Choose 'Always show percentage'.


 
Last edited:

CZ Eddie

Senior Member
Sep 27, 2011
6,079
2,301
253
Austin, TX
You can already get battery percentage in the battery icon, via System UI Tuner.
Thank you, that's not what I'm looking for.
That percentage inside the battery sucks.
People with bad eyes can't see it at all.
I'm looking for the larger numbers you got all by theirselves with a percentage symbol next to it.
Like what you saw in Marshmallow's System UI Tuner options.
And ideally, I want to get rid of the percentage symbol too.
 

death2all110

Senior Member
Sep 21, 2010
515
295
0
Illinois
Thank you, that's not what I'm looking for.
That percentage inside the battery sucks.
People with bad eyes can't see it at all.
I'm looking for the larger numbers you got all by theirselves with a percentage symbol next to it.
Like what you saw in Marshmallow's System UI Tuner options.
And ideally, I want to get rid of the percentage symbol too.
Oh ok. Makes sense. Misunderstood what you were looking for.
 

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,068
5,707
253
Thank you, that's not what I'm looking for.
That percentage inside the battery sucks.
People with bad eyes can't see it at all.
I'm looking for the larger numbers you got all by theirselves with a percentage symbol next to it.
Like what you saw in Marshmallow's System UI Tuner options.
And ideally, I want to get rid of the percentage symbol too.
I was thinking about getting a Pixel if they ever come on sale and was cruising around. I'm not trying to but-in but i hate to see someone wanting a mod and just ignore it. Again, I don't have this phone but if you want to try these out to see if they work, feel free. Credit goes to this OP. All I did was use his framework and systemui and try to add battery percent to it. I also tried to remove the percent symbol on one and adjust the keyguard statusbar to the same height as the statusbar. Try them at your own risk and OP, if they work, you are welcome to offer them yourself on your main post.
 

Attachments

  • Like
Reactions: Veid71 and CZ Eddie

CZ Eddie

Senior Member
Sep 27, 2011
6,079
2,301
253
Austin, TX
I was thinking about getting a Pixel if they ever come on sale and was cruising around. I'm not trying to but-in but i hate to see someone wanting a mod and just ignore it. Again, I don't have this phone but if you want to try these out to see if they work, feel free. Credit goes to this OP. All I did was use his framework and systemui and try to add battery percent to it. I also tried to remove the percent symbol on one and adjust the keyguard statusbar to the same height as the statusbar. Try them at your own risk and OP, if they work, you are welcome to offer them yourself on your main post.
I freaking love you, Man! :laugh:
It works perfectly! It's exactly what I wanted!!!
Could you tell me or PM me the direction I should look to see how you made the mods so I can learn to do it for the monthly Google images that roll out?

I need to update the OP soon.
 

Attachments

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,068
5,707
253
I freaking love you, Man! :laugh:
It works perfectly! It's exactly what I wanted!!!
Could you tell me or PM me the direction I should look to see how you made the mods so I can learn to do it for the monthly Google images that roll out?

I need to update the OP soon.
Not a problem. Easy and ancient mod.
 
  • Like
Reactions: CZ Eddie

CZ Eddie

Senior Member
Sep 27, 2011
6,079
2,301
253
Austin, TX
Easy?
LOL
I spent at least 90 minutes changing the framework to add 1=1, 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, etc. etc. to battery and battery_charging.
Only to have it not work.
I guess I was following the wrong guide or I messed something up or just gave up too soon. :)

Thanks again. :good:
 
  • Like
Reactions: guaneet

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,068
5,707
253
Easy?
LOL
I spent at least 90 minutes changing the framework to add 1=1, 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, etc. etc. to battery and battery_charging.
Only to have it not work.
I guess I was following the wrong guide or I messed something up or just gave up too soon. :)

Thanks again. :good:
I tried something similar with the same results. Let me know if you have any questions about my pm.
 

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,068
5,707
253
Have anyone try this on a pixel yet?

Sent from my Pixel using Tapatalk
As opposed to a Pixel Xl? This is a systemui.apk swap so it will not work on a Pixel.

If you are talking about the battery percent, PM me a copy of the latest firmware version systemui.apk and framework.apk for the Pixel I'll make one for it.
 
Last edited:
  • Like
Reactions: ansontyl96

CZ Eddie

Senior Member
Sep 27, 2011
6,079
2,301
253
Austin, TX
Have anyone try this on a pixel yet?

Sent from my Pixel using Tapatalk
Yes, like a doofus I posted this mod on the Pixel forum letting folks know I didn't know if it would work or not (I thought it would).
One guy tried it and it bootlooped him.

Pixel & XL have the same V, X, U designations and filenames on firmware so with that and some other reasoning, I suspected the framework would be same.
My bad.

#learningasigo
 
  • Like
Reactions: ansontyl96

ansontyl96

Senior Member
May 13, 2012
400
60
0
As opposed to a Pixel Xl? This is a systemui.apk swap so it will not work on a Pixel.

If you are talking about the battery percent, PM me a copy of the latest firmware version systemui.apk and framework.apk for the Pixel I'll make one for it.
Thanks mate, i guess i will wait for a pixel version now, but thanks for your work anyway!

Sent from my Pixel using Tapatalk

---------- Post added at 01:23 AM ---------- Previous post was at 01:22 AM ----------

Yes, like a doofus I posted this mod on the Pixel forum letting folks know I didn't know if it would work or not (I thought it would).
One guy tried it and it bootlooped him.

Pixel & XL have the same V, X, U designations and filenames on firmware so with that and some other reasoning, I suspected the framework would be same.
My bad.

#learningasigo
I think its because they have different display resolution? So there must be some different that have to be made

Sent from my Pixel using Tapatalk
 

CZ Eddie

Senior Member
Sep 27, 2011
6,079
2,301
253
Austin, TX
I think its because they have different display resolution? So there must be some different that have to be made

Sent from my Pixel using Tapatalk
Yup, the resolution was one thing I was worried about but I'm not familiar enough with the framework to know if there is anything in it specific to resolution or not.

If you want to upload your framework and let me know which specific mods you want, I'll try to find time to do those edits for you.
So far I only know how to do the mods I listed in the OP.
I haven't had a chance yet to review TulsaDiver's mods to learn them.
 
  • Like
Reactions: ansontyl96

ansontyl96

Senior Member
May 13, 2012
400
60
0
Then its probably a good idea to wait for the next update i guess? TBH if there could be double tap lockscreen/status bar to sleep that would be perfect but maybe we should wait for the new update first? If you want to check out the framework for pixel I am more than happy to upload it to you thought

Sent from my Pixel using Tapatalk
 

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,068
5,707
253
Yup, the resolution was one thing I was worried about but I'm not familiar enough with the framework to know if there is anything in it specific to resolution or not.

If you want to upload your framework and let me know which specific mods you want, I'll try to find time to do those edits for you.
So far I only know how to do the mods I listed in the OP.
I haven't had a chance yet to review TulsaDiver's mods to learn them.
Resolution isn't the problem. The public Id's do not match. All it takes is one being different and everything afterwards is out of order. The smali's think they are grabbing the dimension for the statusbar and they might be getting back the color of the battery icon instead.

I looked at the pixel files for nde63x. Pixel's apps come already deodexed? How cool is that.
 
  • Like
Reactions: CZ Eddie

CZ Eddie

Senior Member
Sep 27, 2011
6,079
2,301
253
Austin, TX
Maybe that would explain why the guide I tried to follow at one point, on how to deodex, kept failing on me. lol

It's so weird because most guides assume stuff is at /system when the Pixel has a /system but everything at /system_root/system instead.

I'm just glad the stock ROM from Google (my first Google phone) is so great "as is".
I still can't wait for Dirty Unicorns to drop.
But if it never does, I'll probably be happy with Xposed and stock Google + framework mods.

The next big thing on my wishlist is to get rid of the "Car Mode" in the drop-down when you're in Car Mode.
You can't tell it to go away and never come back, like Google now lets you do with many other drop-down messages.
Xposed + NotifyClean (or the other app by the same team) will resolve that.
 
Last edited: