Galaxy nexus tweaks for performance and battery life (work in progress)

Discussion in 'Galaxy Nexus Development' started by metalspring, May 4, 2012.

  1. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    Galaxy nexus all-in-one guide with tweaks for performance and battery life

    This is a continuation of my other thread of tweaks and tips and guides I made for the Droid 1 updated for the galaxy nexus
    Many of the same tweaks do apply but there are some that don't and some new ones...
    I also plan on linking both of the most popular unlocking and rooting tools and as many useful and cool mods I can...

    However still being fairly new to the gnex any and all input and suggestions and feedback will be of great help so please post here or pm me

    ***disclaimer- I am not responsible for any damage you may do to your device, please make sure to have a backup before doing any of these tweaks***
    Last edited: Jun 24, 2012
  2. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
  3. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    Build.prop tweaks

    To use these just mount /system rw, open build.prop in a text editor, add/modify whichever lines you want, save, reboot recovery, wipe cache and dalvik cache, then reboot


    Screen/scrolling/gpu/video/photo tweaks


    # This defines the max event window manager can
    # handle in 1 s. We may adjust this # for performance
    # reason later
    windowsmgr.max_events_per_sec= (recommended 275)

    debug.performance.tuning=1
    video.accelerate.hw=1

    #Improve screen responsiveness/scrolling
    ro.max.fling_velocity=12000
    ro.min.fling_velocity=8000

    #Improve screen quality at the cost of performance (1 enabled 0 disabled)
    persist.sys.use.dithering=1

    #Raise Photo and video quality?
    ro.media.enc.jpeg.quality=100
    ro.media.dec.jpeg.memcap=8000000
    ro.media.enc.hprof.vid.bps=8000000
    ro.media.enc.hprof.vid.fps=65

    #change lcd density (already in build.prop), which is like changing the resolution on a windows computer can be anywhere from 240 to 360 (stock 320)
    ro.sf.lcd_density=

    Performance/battery tweaks


    #disable the zygote loader for performance
    ro.wmt.blcr.enable=0

    #help to free up unused ram
    persist.sys.purgeable_assets=1

    #sleep mode for battery savings. 0 power collapse suspend, 1 power collapse (best), 2 apps go to sleep, 3 show clock and wait, 4 wait for interrupt
    pm.sleep_mode=

    #battery savers
    ro.ril.disable.power.collapse=0
    #change to 2000 if having issues connecting after signal loss
    ro.mot.eri.losalert.delay=1000

    #disable sending usage data to google
    ro.config.nocheckin=1

    Miscellaneous tweaks

    #disable camera sound?
    persist.sys.camera-sound=0

    #stop usb debugging on notification
    persist.adb.notify=0

    #incoming ringer delay (already in build.prop) sets how soon the phone starts ringing when a call comes in. set between 0 and 3000
    ro.telephony.call_ring.delay=

    Dalvik vm tweaks

    #dalvik cache virtual memory size
    dalvik.vm.heapsize= (stock 256m, recommended 320m)
    dalvik.vm.heapstartsize= (stock 16m)
    dalvik.vm.heapgrowthlimit= (stock 128m)

    #disable extended dalvik jni checking
    ro.kernel.android.checkjni=0
    ro.kernel.checkjni=0
    dalvik.vm.checkjni=0

    #Use dalvik JIT compiler (Just In Time compiler is much faster and should be enabled by default)
    dalvik.vm.execution-mode=int:jit

    option 1- disable dalvik checking, increases free ram but less optimized dalvik cache
    dalvik.vm.verify-bytecode=false
    dalvik.vm.dexopt-flags=v=n,u=n,o=v

    option 2 (preferred)- enable more checking for a better performing dalvik cache but may use a little more ram
    dalvik.vm.verify-bytecode=true
    dalvik.vm.dexopt-flags=v=f,u=n,o=v


    Highly experimental tweaks

    The following tweaks are currently still in the testing phase (not yet determined to improve performance/battery life/work at all/etc...)
    use at your own risk (should not really hurt your phone in any permanent way, should boot just fine, no random freezes reboots, etc)

    Enjoy testing and feel free to report back here


    #GPU/Video/Scrolling/Media tweaks
    persist.sys.ui.hw=1
    ro.config.disable.hw_accel=false
    debug.composition.type=gpu
    ro.min_pointer_dur=8
    debug.egl.profiler=1
    debug.egl.hw=1
    ro.media.dec.vid.wmv.enabled=1
    ro.media.dec.aud.wma.enabled=1
    ro.media.dec.aud.flac.enabled=1
    ro.media.dec.vid.avi.enabled=1
    #Remove FPS cap. May be unstable - better have it activated
    debug.gr.swapinterval=0

    # Enable Stagefright helps stream Video and Music Faster
    media.stagefright.enable-player=true
    media.stagefright.enable-meta=true
    media.stagefright.enable-scan=true
    media.stagefright.enable-http=true
    media.stagefright.enable-rtsp=true
    media.stagefright.enable-record=false

    #Disable debugging/error reporting/logging
    logcat.live=disable
    profiler.force_disable_err_rpt=1
    profiler.force_disable_ulog=1

    #signal/data tweaks
    persist.cust.tel.eons=1
    ro.ril.enable.amr.wideband=1
    ro.config.hw_fast_dormancy=1
    persist.telephony.support.ipv6=1
    persist.telephony.support.ipv4=1

    # MMS APN retry timer set to 2 sec( if SMS/MMS couldn`t be sent, it retries after 2 instead of 5 seconds)
    ro.gsm.2nd_data_retry_config=max/_retries=3, 2000, 2000, 2000

    #Battery tweaks
    persist.sys.shutdown.mode=hibernate

    #Miscellaneous tweaks
    debug.enabletr=true
    persist.android.strictmode=0\
    dalvik.vm.jmiopts=forcecopy

    # Disable boot animation for faster boot
    debug.sf.nobootanimation=1
    #Faster boot.
    ro.config.hw_quickpoweron=true

    #Better video and picture taking quality
    ro.media.capture.maxres=8m
    ro.media.panorama.defres=3264x1840
    ro.media.panorama.frameres=1280x720
    ro.camcorder.videoModes=true
    Last edited: Jul 6, 2012
  4. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    Init.d tweaks

    To use mount /system rw, go to /system/etc/init.d create new file with #!/system/bin/sh as the first line, add the lines in, save, and set permissions to rwxr-xr-x


    #disable logcat for performance increase
    rm dev/log/main


    #Flags blocks as non-rotational and increases cache size for performance increase
    LOOP=`ls -d /sys/block/loop*`;
    RAM=`ls -d /sys/block/ram*`;
    MMC=`ls -d /sys/block/mmc*`;
    for j in $LOOP $RAM
    do
    echo "0" > $j/queue/rotational;
    echo "2048" > $j/queue/read_ahead_kb;
    done


    #Disable normalize sleeper for performance
    mount -t debugfs none /sys/kernel/debug
    echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features


    #Defrags database files for increased I/O perfomance (requires sqlite3 binary in /system/xbin)
    for i in \
    `find /data -iname "*.db"`
    do \
    sqlite3 $i 'VACUUM;';
    done


    # File System Mounts for I/O performance
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /dev
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /proc
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /sys
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nodev,data=writeback,barrier=0 -t auto /system
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /data
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /data/data
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /cache
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /acct
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /dev/pts
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /dev/cpuctl
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /mnt/asec
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /mnt/obb
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /mnt/sdcard
    busybox mount -o remount,noatime,nodiratime,discard,noauto_da_alloc,nosuid,nodev,data=writeback,barrier=0 -t auto /storage/sdcard0


    # SD Card Speed Boost
    if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]; then
    echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
    fi


    #Disable color-control safety + color presents for Ezekeel color control (not the same as cm9/aokp settings style)
    #
    echo "0" > /sys/class/misc/colorcontrol/safety_enabled
    echo "0 0 0" > /sys/class/misc/colorcontrol/v1_offset
    echo "0" > /sys/class/misc/colorcontrol/blue_v1_offset
    echo "0" > /sys/class/misc/colorcontrol/green_v1_offset
    echo "0" > /sys/class/misc/colorcontrol/red_v1_offset
    echo "2004318071 2004318071 2004318071" > /sys/class/misc/colorcontrol/multiplier
    echo "0" > /sys/devices/platform/omapdss/manager0/gamma
    Last edited: Jul 6, 2012
  5. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
  6. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    Mods/other

    Suggested color control settings-
    whitest whites-
    red 200
    green 200
    blue 265
    gamma red -6
    gamma green 0
    gamma blue 8
    omap4 gamma 6 (1.2 via franco app)
    Morfic battery saving settings-
    Red 135
    green 135
    blue 200
    gamma red 0
    gamma green 0
    gamma blue 0
    omap4 gamma 6 (1.2 via franco app)
    Franco suggested settings-
    Red 180
    Green 192
    Blue 200
    gamma red -4
    gamma green 0
    gamma blue 5
    omap4 gamma 6 (1.2 via franco app)


    Custom auto brightness tweaks (super power save + conservative power save settings)
    For both sets of settings-
    Light sensor filter enabled yes
    Window length 5s
    Reset threshold 400 lux
    Sample interval 5s
    Use custom yes
    Screen dim level 1
    Allow light decrease yes
    Decrease hysteresis 50%

    Conservative power save settings-
    Edit other levels under screen column-
    15
    17
    19
    21
    23
    25
    27
    30
    32
    40
    49
    54
    65
    75
    100
    125
    146
    179
    211
    225

    Super power save settings-
    Edit other levels under screen column-
    6
    8
    9
    11
    12
    14
    16
    19
    23
    27
    33
    40
    50
    64
    85
    97
    111
    146
    178
    225
    Last edited: Jun 24, 2012
  7. johnnyb15613
    Offline

    johnnyb15613 Theme Developer Theme Developer

    Joined:
    Apr 16, 2010
    Messages:
    259
    Likes Received:
    2
    Trophy Points:
    0
    Subscribing
  8. Droid-Xer
    Offline

    Droid-Xer DF Super Moderator Premium Member

    Joined:
    Nov 24, 2010
    Messages:
    2,414
    Likes Received:
    55
    Trophy Points:
    48
    Location:
    El Paso, TX
    Looking forward to see what ya churn out!
  9. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    Well I know at least one thing I'm trying to work on now should be a very helpful tweak for battery life for those on custom roms that support it- customized auto brightness levels, get the lowest brightness setting possible and still be able to see the screen clearly...any suggestions on this are appreciated...
    So far I found the lowest light level to be just about perfect between 4 and 6, it helped me get an awesome 4 hours on screen time WITH overclocking
  10. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
  11. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
  12. biz79
    Offline

    biz79 New Member

    Joined:
    May 3, 2010
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    SF, CA
    Hi Metalspring,

    Thanks for posting your custom brightness levels. I've recently installed AOKP Milestone 5 on my Galaxy Nexus LTE and was looking into trying this feature out. I'll let you know in a few days how I like it.

    Thanks,
    Biz
  13. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    ok, FINALLY got to update all this (sorry verizon took forever to get 4g here so i can easily check and modify this)
    still working on adding in A LOT more stuff but enjoy everything i put up so far
  14. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    Added custom auto brightness tweaks for custom roms with that option to op (should help save a lot of battery, actually can go lower than manual brightness)
  15. JSM9872
    Offline

    JSM9872 DF Super Moderator Staff Member Premium Member

    Joined:
    Dec 21, 2010
    Messages:
    12,936
    Likes Received:
    287
    Trophy Points:
    83
    Location:
    Somewhere In Pennsylvania...
    Great stuff. Thanks metal!
  16. metalspring
    Offline

    metalspring New Member

    Joined:
    Jan 9, 2011
    Messages:
    2,228
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    hermitage, pa
    finally got to get the updates up, new tweaks include manual color control settings via terminal or init.d to auto set on boot, more build.prop tweaks including my still in testing tweaks (highly experimental)...they shouldnt really hurt your phone at all, its just yet to be determined whether they improve anything or do anything at all yet. Feel free to test them out and report back
Search tags for this page
build prop tweaks galaxy nexus
,
build.prop tweaks galaxy nexus
,
delvik heapsize growth limit start size tweak for jellybean
,
franco kernel tweaks
,
galaxy nexus build prop tweaks
,
galaxy nexus build.prop tweaks
,

galaxy nexus buildprop tweaks

,
galaxy nexus performance tweaks
,

galaxy nexus tweaks

,
tweak samsung galaxy nexus
,
tweaking galaxy nexus
,
tweaks for galaxy nexus