[ ROM ] Calkulin's Nexus 4 v1.5 [ 4.4.2 | KOT49H | Tweaked | Battery Saver Script ]

Search This thread

Calkulin

Recognized Developer
Sep 3, 2008
1,647
9,109
Samsung Galaxy S21+
Nexus 4 Series

akj3.png
k7yv.png
507g.png
d5av.png
pk3d.png



Based on 4.4.2 / KOT49H (Google)

ROM includes:
Stock Google kernel w/ init.d support
Google Experience Launcher
Working ART runtime
Deodexed system
Superuser
Busybox
and more

MODs included:
Tweaked system (Very FAST)
Raised contact sync resolution (requires resyncing of contacts if you don't factory reset before installing)
Enabled LTE option in mobile network settings (requires LTE enabled modem)
Battery % on status bar (thanks to Erhany for the code) (disable zip in FAQ)
Exchange security bypass (thanks to Apascual89 for the code)
Enabled Multi-User support (rotate lockscreen to change users)
4 way reboot power menu (thanks to Kahvitahra for the code)
Enabled menu button to be always on (disable zip in FAQ)
Enabled volume keys to skip tracks while screen is off
Relaxed MMS compression ratio (Hangouts & Messaging)
Enabled access to App Ops in Settings/Security
Disabled alarm set icon (enable zip in FAQ)
Blocked annoying ads in programs
Enabled NFC while on lockscreen
APN settings for a lot of carriers
Colored notification icons
And other misc tweaks/mods


Notes about Battery Saver script

Can be used with any kernels that have init.d support

It completely eliminates the need for an application to set CPU speeds or profiles
Easily customizable - See FAQ for instructions
During sleep, it will set Max CPU speed to 1.0GHz & Min CPU speed to 384MHz
If Android Overclock, No-Frills CPU Control, Overclock Widget, QuickClock Advanced Overclock, SetCPU or System Tuner are detected, the script is ignored, so it will not affect them
The script can also control how the second, third & fourth cores works, they can be enabled full time, per profile or disabled completely

Preset profiles are:
1.45GHz - 100-85%
1.35GHz - 84-36%
1.24GHz - 35-0%

And just an FYI, even at 1.24GHz, the phone still operates very well & smooth, it's the battery savings that are the real benefit


v1.5
Enabled Multi-User support (rotate lockscreen to change users)
Simplified some of the battery saver script code
Enabled NFC while on lockscreen

Added
UV support for m_plus kernel

Updated
YouTube v5.3.28

Code:
[B][COLOR="Red"]v1.4[/COLOR][/B]
Enabled access to App Ops in Settings/Security
Removed CloudPrint & HPPrintPlugin [SIZE="1"](can be downloaded from the Play Store)[/SIZE]

[I][B]Updated[/B][/I]
Calendar v201308023
Gmail v4.7.1 (946962)
Google Music v5.3.1317M.940995
Hangouts v2.0.217 (944332-30)
LatinIme v2.0.19133.927933a
Maps v7.5.0
QuickSearchBox v3.1.24.94.1712.arm
SuperSU v1.86

[B][COLOR="Red"]v1.3.1[/COLOR][/B]
[B]Based on 4.4.2/KOT49H build[/B]
Enabled access to App Ops, as 4.4.2 killed it [SIZE="1"](v1.3.1)[/SIZE]
Enabled volume keys to skip tracks while screen is off
Exchange security bypass [SIZE="1"](thanks to [B]apascual89[/B] for the code)[/SIZE]
Removed QuickOffice & Wallet [SIZE="1"](can be downloaded from the Play Store)[/SIZE]
Removed extra ringtones to save space
Removed libs for removed apps [SIZE="1"](v1.3.1)[/SIZE]
Tweaked apks to save space

[I][B]Updated[/B][/I]
Hangouts v2.0.216 (939144-30)

[B][COLOR="Red"]v1.2.1[/COLOR][/B]
[B]Based on 4.4.1/KOT49E build[/B]
Enabled LTE option in mobile network settings
Made kernel insecure so adb remount, etc now work
Fixed lag when adding contact picture in quick settings [SIZE="1"](v1.2.1)[/SIZE]

[I][B]Updated[/B][/I]
Google Music v5.3.1316M.934206

[B][COLOR="Red"]v1.0[/COLOR][/B]
Initial Release

Important Notes - Due to how this ROM is setup, a wipe is recommended BEFORE flashing if coming from another ROM

If your are updating, then nothing extra is needed during flashing as the update script wipes what is needed, unless other wise stated in the change log

Be sure to do a backup before flashing and read the change log


Nexus 4 ROM (v1.5) - Mirror
md5 - 967881c86a58f9c8c305c114b80c5ff0

Nexus 4 ROM Update (v1.4 to v1.5)


Previous ROM versions
 
Last edited:

Calkulin

Recognized Developer
Sep 3, 2008
1,647
9,109
Samsung Galaxy S21+
FAQ

How to modify the battery saver script?
(requires knowledge of how to run terminal or adb commands)

These are the available commands to set parameters. To check what the available commands are for each, type available after the command

For ex.

cpu available

To check what the current settings are

cpu status

To verify what the cpu is currently set to

cpu verify

To reset the script back to stock

cpu default

To disable the script

cpu off
Code:
cpu - Controls the script

cpu_awake - Enables or disables awake boost feature

cpu_awake_duration - Duration of awake boost

cpu_awake_governor - Enables or disables awake boost governor and sets governor

cpu_awake_max - Max cpu speed for awake

cpu_awake_min - Min cpu speed for awake

cpu1_awake - Enables or lets the kernel handle CPU1 for awake

cpu2_awake - Enables or lets the kernel handle CPU2 for awake

cpu3_awake - Enables or lets the kernel handle CPU3 for awake

cpu_bp - Enables or disables battery profiles feature

cpu_bp1_batt - Battery percent of when profile 1 ends

cpu_bp1_governor - Enables or disables battery profile 1 governor and sets governor

cpu_bp1_max - Max cpu speed for battery profile 1

cpu_bp1_min - Min cpu speed for battery profile 1

cpu1_bp1 - Enables or lets the kernel handle CPU1 for battery profiles 1

cpu2_bp1 - Enables or lets the kernel handle CPU2 for battery profiles 1

cpu3_bp1 - Enables or lets the kernel handle CPU3 for battery profiles 1

cpu_bp2_batt - Battery percent of when profile 2 starts

cpu_bp2_governor - Enables or disables battery profile 2 governor and sets governor

cpu_bp2_max - Max cpu speed for battery profile 2

cpu_bp2_min - Min cpu speed for battery profile 2

cpu1_bp2 - Enables or lets the kernel handle CPU1 for battery profiles 2

cpu2_bp2 - Enables or lets the kernel handle CPU2 for battery profiles 2

cpu3_bp2 - Enables or lets the kernel handle CPU3 for battery profiles 2

cpu_governor - Main governor

cpu_max - Max cpu speed when profiles are off and in between battery profiles 1 & 2

cpu_min - Min cpu speed when profiles are off and in between battery profiles 1 & 2

cpu_sleep - Enables or disables sleep feature

cpu_sleep_delay - Delay before sleep feature kicks in

cpu_sleep_governor - Enables or disables sleep governor and sets governor

cpu_sleep_max - Max cpu speed for sleep

cpu_sleep_min - Min cpu speed for sleep

cpu_uv - Controls undervolting for kernels like Franco's, 0-200mV in increments of 25

cpu1 - Enables, disables or lets the kernel handle CPU1

cpu2 - Enables, disables or lets the kernel handle CPU2

cpu3 - Enables, disables or lets the kernel handle CPU3

devlog - Enables or disables logging


NOTE: Most parameters can be set without restarting but you need to cycle the screen on/off and wait the time set in cpu_sleep_delay. If the setting isn't taking effect, then reboot


Want to disable the battery percent in the status bar and the menu button in the navigation bar?

Flash the Calkulin's_Disable_Battery_Percent_and_Menu_Button_for_Nexus_4_v* zip attached


Want to disable the menu button in the navigation bar?

Flash the Calkulin's_Disable_Menu_Button_for_Nexus_4_v* zip attached


Want to enable the alarm set icon in the status bar?

Flash the Calkulin's_Enable_Alarm_Icon_for_Nexus_4_v* zip attached


Having problems with included hosts file or want to see advertisements again?

Flash the Stock_Android_Hosts_for_Nexus_4 zip attached
 

Attachments

  • Stock_Android_Hosts_for_Nexus_4.zip
    143.9 KB · Views: 112
  • Calkulin's_Disable_Battery_Percent_and_Menu_Button_for_Nexus_4_v1.3+.zip
    958.4 KB · Views: 212
  • Calkulin's_Disable_Menu_Button_for_Nexus_4_v1.3+.zip
    959 KB · Views: 124
  • Calkulin's_Enable_Alarm_Icon_for_Nexus_4_v1.3+.zip
    1.5 MB · Views: 120
  • Stock_Calkulin's_Nexus_4_ROM_v1.3+_Kernel.zip
    6.3 MB · Views: 188
  • franco.Kernel-nightly-r201-Calkulin.zip
    5 MB · Views: 333
Last edited:

jonathan413

Senior Member
Apr 3, 2010
999
37
if i flash a different kernel will that mess with any of the system tweaks youve done and will i have to flash the dalvik patch from moto x also if i flash different kernel?
 

Calkulin

Recognized Developer
Sep 3, 2008
1,647
9,109
Samsung Galaxy S21+
if i flash a different kernel will that mess with any of the system tweaks youve done and will i have to flash the dalvik patch from moto x also if i flash different kernel?


If the kernel is just a boot.img, then no, if it for some reason includes libs and binaries, depending on which ones it's overwriting, then maybe but I highly doubt it it's overwriting dalvik/bionic libs. Best bet would be to look in the kernel zip and see what files are included.
 

JOEOZUNA4U

Senior Member
Nov 30, 2007
1,054
205
L.A, CA
I love your work . You have always had the most stable roms. I have 2 questions. Can you create a zip file to disable the menu button? Can I delete the stock SMS app without causing any problems?
 
  • Like
Reactions: Calkulin

brantzlee

Senior Member
Jan 18, 2013
62
7
Everything works fine!

Sent from my Nexus 4 using XDA Premium 4 mobile app
 
Last edited:

Calkulin

Recognized Developer
Sep 3, 2008
1,647
9,109
Samsung Galaxy S21+
I love your work . You have always had the most stable roms. I have 2 questions. Can you create a zip file to disable the menu button? Can I delete the stock SMS app without causing any problems?


I can create one, it will have to be later tonight tho as I have my daughter's birthday today. As for the SMS app, yes it can be removed(I removed it the sec I flashed 4.4) and everything will work just fine

Is the Battery Saver script included by default in the rom ?


Yes but if you flash a kernel that doesn't have init.d support, then the script will not run unless you start it manually
 

shayan1103

Senior Member
Dec 30, 2011
110
62
ART working?

hi Calkulin :laugh:
In your rom(deodex),ART working?
because ART working with odex roms
 

Top Liked Posts

  • There are no posts matching your filters.
  • 103
    Nexus 4 Series

    akj3.png
    k7yv.png
    507g.png
    d5av.png
    pk3d.png



    Based on 4.4.2 / KOT49H (Google)

    ROM includes:
    Stock Google kernel w/ init.d support
    Google Experience Launcher
    Working ART runtime
    Deodexed system
    Superuser
    Busybox
    and more

    MODs included:
    Tweaked system (Very FAST)
    Raised contact sync resolution (requires resyncing of contacts if you don't factory reset before installing)
    Enabled LTE option in mobile network settings (requires LTE enabled modem)
    Battery % on status bar (thanks to Erhany for the code) (disable zip in FAQ)
    Exchange security bypass (thanks to Apascual89 for the code)
    Enabled Multi-User support (rotate lockscreen to change users)
    4 way reboot power menu (thanks to Kahvitahra for the code)
    Enabled menu button to be always on (disable zip in FAQ)
    Enabled volume keys to skip tracks while screen is off
    Relaxed MMS compression ratio (Hangouts & Messaging)
    Enabled access to App Ops in Settings/Security
    Disabled alarm set icon (enable zip in FAQ)
    Blocked annoying ads in programs
    Enabled NFC while on lockscreen
    APN settings for a lot of carriers
    Colored notification icons
    And other misc tweaks/mods


    Notes about Battery Saver script

    Can be used with any kernels that have init.d support

    It completely eliminates the need for an application to set CPU speeds or profiles
    Easily customizable - See FAQ for instructions
    During sleep, it will set Max CPU speed to 1.0GHz & Min CPU speed to 384MHz
    If Android Overclock, No-Frills CPU Control, Overclock Widget, QuickClock Advanced Overclock, SetCPU or System Tuner are detected, the script is ignored, so it will not affect them
    The script can also control how the second, third & fourth cores works, they can be enabled full time, per profile or disabled completely

    Preset profiles are:
    1.45GHz - 100-85%
    1.35GHz - 84-36%
    1.24GHz - 35-0%

    And just an FYI, even at 1.24GHz, the phone still operates very well & smooth, it's the battery savings that are the real benefit


    v1.5
    Enabled Multi-User support (rotate lockscreen to change users)
    Simplified some of the battery saver script code
    Enabled NFC while on lockscreen

    Added
    UV support for m_plus kernel

    Updated
    YouTube v5.3.28

    Code:
    [B][COLOR="Red"]v1.4[/COLOR][/B]
    Enabled access to App Ops in Settings/Security
    Removed CloudPrint & HPPrintPlugin [SIZE="1"](can be downloaded from the Play Store)[/SIZE]
    
    [I][B]Updated[/B][/I]
    Calendar v201308023
    Gmail v4.7.1 (946962)
    Google Music v5.3.1317M.940995
    Hangouts v2.0.217 (944332-30)
    LatinIme v2.0.19133.927933a
    Maps v7.5.0
    QuickSearchBox v3.1.24.94.1712.arm
    SuperSU v1.86
    
    [B][COLOR="Red"]v1.3.1[/COLOR][/B]
    [B]Based on 4.4.2/KOT49H build[/B]
    Enabled access to App Ops, as 4.4.2 killed it [SIZE="1"](v1.3.1)[/SIZE]
    Enabled volume keys to skip tracks while screen is off
    Exchange security bypass [SIZE="1"](thanks to [B]apascual89[/B] for the code)[/SIZE]
    Removed QuickOffice & Wallet [SIZE="1"](can be downloaded from the Play Store)[/SIZE]
    Removed extra ringtones to save space
    Removed libs for removed apps [SIZE="1"](v1.3.1)[/SIZE]
    Tweaked apks to save space
    
    [I][B]Updated[/B][/I]
    Hangouts v2.0.216 (939144-30)
    
    [B][COLOR="Red"]v1.2.1[/COLOR][/B]
    [B]Based on 4.4.1/KOT49E build[/B]
    Enabled LTE option in mobile network settings
    Made kernel insecure so adb remount, etc now work
    Fixed lag when adding contact picture in quick settings [SIZE="1"](v1.2.1)[/SIZE]
    
    [I][B]Updated[/B][/I]
    Google Music v5.3.1316M.934206
    
    [B][COLOR="Red"]v1.0[/COLOR][/B]
    Initial Release

    Important Notes - Due to how this ROM is setup, a wipe is recommended BEFORE flashing if coming from another ROM

    If your are updating, then nothing extra is needed during flashing as the update script wipes what is needed, unless other wise stated in the change log

    Be sure to do a backup before flashing and read the change log


    Nexus 4 ROM (v1.5) - Mirror
    md5 - 967881c86a58f9c8c305c114b80c5ff0

    Nexus 4 ROM Update (v1.4 to v1.5)


    Previous ROM versions
    39
    FAQ

    How to modify the battery saver script?
    (requires knowledge of how to run terminal or adb commands)

    These are the available commands to set parameters. To check what the available commands are for each, type available after the command

    For ex.

    cpu available

    To check what the current settings are

    cpu status

    To verify what the cpu is currently set to

    cpu verify

    To reset the script back to stock

    cpu default

    To disable the script

    cpu off
    Code:
    cpu - Controls the script
    
    cpu_awake - Enables or disables awake boost feature
    
    cpu_awake_duration - Duration of awake boost
    
    cpu_awake_governor - Enables or disables awake boost governor and sets governor
    
    cpu_awake_max - Max cpu speed for awake
    
    cpu_awake_min - Min cpu speed for awake
    
    cpu1_awake - Enables or lets the kernel handle CPU1 for awake
    
    cpu2_awake - Enables or lets the kernel handle CPU2 for awake
    
    cpu3_awake - Enables or lets the kernel handle CPU3 for awake
    
    cpu_bp - Enables or disables battery profiles feature
    
    cpu_bp1_batt - Battery percent of when profile 1 ends
    
    cpu_bp1_governor - Enables or disables battery profile 1 governor and sets governor
    
    cpu_bp1_max - Max cpu speed for battery profile 1
    
    cpu_bp1_min - Min cpu speed for battery profile 1
    
    cpu1_bp1 - Enables or lets the kernel handle CPU1 for battery profiles 1
    
    cpu2_bp1 - Enables or lets the kernel handle CPU2 for battery profiles 1
    
    cpu3_bp1 - Enables or lets the kernel handle CPU3 for battery profiles 1
    
    cpu_bp2_batt - Battery percent of when profile 2 starts
    
    cpu_bp2_governor - Enables or disables battery profile 2 governor and sets governor
    
    cpu_bp2_max - Max cpu speed for battery profile 2
    
    cpu_bp2_min - Min cpu speed for battery profile 2
    
    cpu1_bp2 - Enables or lets the kernel handle CPU1 for battery profiles 2
    
    cpu2_bp2 - Enables or lets the kernel handle CPU2 for battery profiles 2
    
    cpu3_bp2 - Enables or lets the kernel handle CPU3 for battery profiles 2
    
    cpu_governor - Main governor
    
    cpu_max - Max cpu speed when profiles are off and in between battery profiles 1 & 2
    
    cpu_min - Min cpu speed when profiles are off and in between battery profiles 1 & 2
    
    cpu_sleep - Enables or disables sleep feature
    
    cpu_sleep_delay - Delay before sleep feature kicks in
    
    cpu_sleep_governor - Enables or disables sleep governor and sets governor
    
    cpu_sleep_max - Max cpu speed for sleep
    
    cpu_sleep_min - Min cpu speed for sleep
    
    cpu_uv - Controls undervolting for kernels like Franco's, 0-200mV in increments of 25
    
    cpu1 - Enables, disables or lets the kernel handle CPU1
    
    cpu2 - Enables, disables or lets the kernel handle CPU2
    
    cpu3 - Enables, disables or lets the kernel handle CPU3
    
    devlog - Enables or disables logging


    NOTE: Most parameters can be set without restarting but you need to cycle the screen on/off and wait the time set in cpu_sleep_delay. If the setting isn't taking effect, then reboot


    Want to disable the battery percent in the status bar and the menu button in the navigation bar?

    Flash the Calkulin's_Disable_Battery_Percent_and_Menu_Button_for_Nexus_4_v* zip attached


    Want to disable the menu button in the navigation bar?

    Flash the Calkulin's_Disable_Menu_Button_for_Nexus_4_v* zip attached


    Want to enable the alarm set icon in the status bar?

    Flash the Calkulin's_Enable_Alarm_Icon_for_Nexus_4_v* zip attached


    Having problems with included hosts file or want to see advertisements again?

    Flash the Stock_Android_Hosts_for_Nexus_4 zip attached
    15
    ...............
    8
    v1.3 is up, enjoy :good:
    7
    v2.0 is going to be a hybrid CM/Stock mix, so you will be able to upgrade from the current ROM without wiping

    tcju.png