• 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

cantsingh

Senior Member
Nov 10, 2013
71
17

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,429
5,954
Thanks! So from briefly reading, at a high level, I would need to...

- pull the framework-res.apk from the phone
- decompile the apk
- find the "Value" folder
- modify the status_bar.xml
- recompile the apk
- resign the apk
- push it to my phone with proper permissions

Am I missing anything?

The status bar XML is in the SystemUI.apk. You first install the framework-res.apk into the framework. Then you can decompile the systemui.apk. That would be for the center clock and battery percent in statusbar. Usually you use the original signing for the framework-res and systemui apk's. You would sign new signatures to most everything else.
 
Last edited:

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,429
5,954

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,429
5,954
  • Like
Reactions: cantsingh

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,429
5,954
Tried to install the framework-res.apk and SustemUICC.apk, but got stuck at the "Android is Starting..." screen for 10 minutes before I gave up. Flashing my Nadroid backup now. Not sure what went wrong, or if I may have missed a step along the way, but no cigar for me.

Try just the framework-res.apk

Edit: maybe I tried to do too much. This one is only CC.
 

Attachments

  • SystemUIGoogle.apk
    12.8 MB · Views: 7
Last edited:

cantsingh

Senior Member
Nov 10, 2013
71
17
Try just the framework-res.apk

Edit: maybe I tried to do too much. This one is only CC.

I'll try this and the framework-res.apk from above now.

---------- Post added at 03:04 PM ---------- Previous post was at 02:50 PM ----------

Try just the framework-res.apk

Edit: maybe I tried to do too much. This one is only CC.

Same issue again - stuck on the "Android is Starting" screen.

Am I missing something? I set their permissions to 0644, put the framework-res.apk in /system_root/system/framework and the SystemUIGoogle.apk in /system_root/system/priv-app/SystemUIGoogle folder, reboot and get stuck on this boot screen. Flashing Nandroid again.
 

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,429
5,954
I'll try this and the framework-res.apk from above now.

---------- Post added at 03:04 PM ---------- Previous post was at 02:50 PM ----------



Same issue again - stuck on the "Android is Starting" screen.

Am I missing something? I set their permissions to 0644, put the framework-res.apk in /system_root/system/framework and the SystemUIGoogle.apk in /system_root/system/priv-app/SystemUIGoogle folder, reboot and get stuck on this boot screen. Flashing Nandroid again.

I don't have this phone but when I install something manually I first copy the apk from my sdcard to the root of the root drive. Then change permissions, then copy-replace the existing apk's.
 

Felix_222

Senior Member
Jan 18, 2015
83
32
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
 
Last edited:

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,429
5,954
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.
 

Attachments

  • services.jar
    2.9 MB · Views: 3
Last edited:
  • Like
Reactions: Felix_222

Tulsadiver

Recognized Contributor
Jul 11, 2013
8,429
5,954
I'll try this and the framework-res.apk from above now.

---------- Post added at 03:04 PM ---------- Previous post was at 02:50 PM ----------



Same issue again - stuck on the "Android is Starting" screen.

Am I missing something? I set their permissions to 0644, put the framework-res.apk in /system_root/system/framework and the SystemUIGoogle.apk in /system_root/system/priv-app/SystemUIGoogle folder, reboot and get stuck on this boot screen. Flashing Nandroid again.

Try what I mentioned above. Just do the framework-res.apk alone and see if it boots. If you a want, try the services.jar from the post above. It should be done by itself and could take several minutes to boot up.
 

CZ Eddie

Senior Member
Sep 27, 2011
6,096
2,301
Austin, TX
Why can't mods be flashed via twrp for the Pixel Xl? I saw some for the regular pixel.

Before Pixel, it was easy to copy the actions of a another users flashable zip to make a new flashable zip for something else.
Now on the Pixel, the flashable zips seem to work differently and I haven't figured them out yet.
Used to be you just changed a few lines in the updater script to do what you wanted but now there is all kinds of weird stuff going on?
 

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.