• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

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

Search This thread

CZ Eddie

Senior Member
Sep 27, 2011
6,096
2,301
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
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.

ZH8BoEE.png
 
Last edited:

CZ Eddie

Senior Member
Sep 27, 2011
6,096
2,301
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
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'.

PmiHu7HDl9wQU0a1KY0-BANSjLPJjHv77vpebj3VDmSatv-jES07YG62GoZzkK48PePkmnKWI4wNy0ywLZ8BlrJQ6DuJkP0tYzPc7GVyPX9fkqbazE63ZAwrh15f0GxBs-k9tfccaX5Uof6ZEoUH5P8ZNDBwuGqXOB76L8mB0E5vmroFiYb-NF47dXC__0SabWGdU4c9BKK4UzxU4BwaRTcy2rAYMgCxbFetvHfA4iv2rcfYZ-5BFV5R9KdqpozeZrHOq1ABD4iB7MaYHP4-DcbdmdlfCHbpJRqirAIY00_Aa3xxDzkLJOqoXEXL8pMtWvDp1-ayFE-dH0sTjglUVOyYky5MWOKq_JBApcGDk6XRQ2jKhNJOLUvp6InmNXWDlEaE0sra_p6RpN1N36dXRyOrXm1n5pdHj03Q5-doEjnLPvnqRYCS0LicZbAtPzGkknXvQ4ZzWDdyInTbt0koLQuScmrF3vv3nzECAtKrJDnHTbA3zIJsSrPMQCprmtGa_0SDD8aTgzbgO5FgNgeA4w-oXlQArI2FkcC2AJLj8Ai-6GFvVHSt8xYfo-FV-iXIDwxlouhTWn14nRRWvdRoIOS8S-vgOX6EXMGYcycHV_qVq_YlpQ=w608-h1080-no


l6jp4GYm_PFdny_RnAPnJJyOxP5U7HyzPX5axzeQgdZe7xsmDyUv-Sn_G5kHJoZ19VWL8fWqIPVMnwXzC9KC0iriTJFSifw9ixCNIhQRYp9QTYBTE0ztjCOVT0_zLkouJxQXdNFiF_8SiNdYSEOZGr9Vxf7SznAEbj0Uq-A0A26blvE_y5mPy59U2mRVbIUArczQQseikVazRfpswv0wRMnFW1AOtUFNIWdUhwY6g0p6NtPxPyKrwc-3rERv95wxppk6JGc-gMrIW9Nzh03g00H80qZ-8nhY5z4ex34wnBLiLyZItXmeAU9nETahRRZN4ym6I6sEWv8PkyK6R2r50DLQQZFhi669E1f5z22w-13_SoscYLxwqGPqLSGza0FvnpWjAd3p9Xa8_NE3Blt0c_p7WIbNZVUnp1oe5e5F23dJtvlEGxTO0kmvn7HatENmGAnqyVvDdp2rsoEKmvqiuI_8ziZYVpQPRyRhyATBiLEhgf3Nmd0FtBwcSqEo1lpjDah52iooaCIXa1qcYI94jbF059A3W4FZjS6nusLq3Qt5sIDtliuMXkgHX97mUkAvfPq6nc8QBzURivs2UnWUZIH2GKj-d2htuUFCC1K9WV0Cfke3_g=w608-h1080-no
 
Last edited:

CZ Eddie

Senior Member
Sep 27, 2011
6,096
2,301
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
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,430
5,954
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

  • percent.zip
    19.2 MB · Views: 59
  • Like
Reactions: Veid71 and CZ Eddie

CZ Eddie

Senior Member
Sep 27, 2011
6,096
2,301
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

  • Screenshot_20161129-105801.jpg
    Screenshot_20161129-105801.jpg
    49.5 KB · Views: 334

CZ Eddie

Senior Member
Sep 27, 2011
6,096
2,301
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,430
5,954
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,430
5,954
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,096
2,301
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
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,096
2,301
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
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,430
5,954
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,096
2,301
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:

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    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
    4
    +1.

    CZ_Eddie, any plans to release an updated center clock mod?

    I made an attempt at a framework-res.apk and an assortment of systemui.apk mods if you would like to try them. Cc is for center clock. Some have ampm. These are for the latest version NMF26Q

    https://www.androidfilehost.com/?w=files&flid=138431
    2
    ...
    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'.

    PmiHu7HDl9wQU0a1KY0-BANSjLPJjHv77vpebj3VDmSatv-jES07YG62GoZzkK48PePkmnKWI4wNy0ywLZ8BlrJQ6DuJkP0tYzPc7GVyPX9fkqbazE63ZAwrh15f0GxBs-k9tfccaX5Uof6ZEoUH5P8ZNDBwuGqXOB76L8mB0E5vmroFiYb-NF47dXC__0SabWGdU4c9BKK4UzxU4BwaRTcy2rAYMgCxbFetvHfA4iv2rcfYZ-5BFV5R9KdqpozeZrHOq1ABD4iB7MaYHP4-DcbdmdlfCHbpJRqirAIY00_Aa3xxDzkLJOqoXEXL8pMtWvDp1-ayFE-dH0sTjglUVOyYky5MWOKq_JBApcGDk6XRQ2jKhNJOLUvp6InmNXWDlEaE0sra_p6RpN1N36dXRyOrXm1n5pdHj03Q5-doEjnLPvnqRYCS0LicZbAtPzGkknXvQ4ZzWDdyInTbt0koLQuScmrF3vv3nzECAtKrJDnHTbA3zIJsSrPMQCprmtGa_0SDD8aTgzbgO5FgNgeA4w-oXlQArI2FkcC2AJLj8Ai-6GFvVHSt8xYfo-FV-iXIDwxlouhTWn14nRRWvdRoIOS8S-vgOX6EXMGYcycHV_qVq_YlpQ=w608-h1080-no


    l6jp4GYm_PFdny_RnAPnJJyOxP5U7HyzPX5axzeQgdZe7xsmDyUv-Sn_G5kHJoZ19VWL8fWqIPVMnwXzC9KC0iriTJFSifw9ixCNIhQRYp9QTYBTE0ztjCOVT0_zLkouJxQXdNFiF_8SiNdYSEOZGr9Vxf7SznAEbj0Uq-A0A26blvE_y5mPy59U2mRVbIUArczQQseikVazRfpswv0wRMnFW1AOtUFNIWdUhwY6g0p6NtPxPyKrwc-3rERv95wxppk6JGc-gMrIW9Nzh03g00H80qZ-8nhY5z4ex34wnBLiLyZItXmeAU9nETahRRZN4ym6I6sEWv8PkyK6R2r50DLQQZFhi669E1f5z22w-13_SoscYLxwqGPqLSGza0FvnpWjAd3p9Xa8_NE3Blt0c_p7WIbNZVUnp1oe5e5F23dJtvlEGxTO0kmvn7HatENmGAnqyVvDdp2rsoEKmvqiuI_8ziZYVpQPRyRhyATBiLEhgf3Nmd0FtBwcSqEo1lpjDah52iooaCIXa1qcYI94jbF059A3W4FZjS6nusLq3Qt5sIDtliuMXkgHX97mUkAvfPq6nc8QBzURivs2UnWUZIH2GKj-d2htuUFCC1K9WV0Cfke3_g=w608-h1080-no
    2
    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.
    1
    Pasting the WETA systemuigoogle.apk for center clock is supposed to work. Hasn't for me, though. The UI never reboots so the clock never moves. Substratum possibly interferes

    No substratum here. Just XML modding. I did just disable signature checks in the services.jar. This is necessary on my phone when flashing individual xml's instead of the whole apk. Maybe it would help.

    You need to wipe dalvik after installing this and it takes a while to boot if someone wants to try it. It goes in the framework folder.