[GUIDE][4.4][rooted] How to force enable low RAM mode and status bar transparent

thichthat

Senior Member
Nov 1, 2012
464
810
0
I've heard somebody told that they had to disable low RAM function in Kitkat to enable status bar transparent. So in this post, I'll show you how to enable low Ram but the status bar still can be transparent when you're in launcher or lockscreen

First, we need:
- your phone rooted, deodexed running android 4.4+
- Nandroid backup (very important)
- Apktool and you know how to use it
- Notepad++

Ok, so let's start:
Step 1: copy these file from your phone to your computer:
/system/framework/framework.jar
/system/priv-app/SystemUI.apk
/system/build.prop

Step 2: open build.prop in notepad++, find this line:

Code:
ro.config.low_ram=
if it say "true", skip to step 4
if it say "false", just change to "true" and reboot your phone
if you can not find this line, or nothing change after you changed it to "true" and reboot, follow step 3

Step 3: (force enable low Ram)
Add this line to your build.prop

Code:
ro.config.low_ram.mod=true
Now use apktool to decompile your framework.jar
Navigate to \framework.jar.out\smali\android\app\ActivityManager.smali, open it in notepad++
Find this line:

Code:
ro.config.low_ram
And change it to

Code:
ro.config.low_ram.mod
Compile, push it back to your phone and reboot
Wait until your phone booted up

Step 4: (force enable status bar transparent)
Decompile SystemUI.apk
Navigate to \SystemUI\smali\com\android\systemui\statusbar\phone\BarTransitions.smali
find these line:

Code:
    invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z

    move-result v0
Change it to

Code:
    const/4 v0, 0x1
Compile and push it back to your phone

Done :highfive:

Sorry for my bad english. This is my first post since I used xda. Hope you like it!
 
Last edited:

Bert98

Senior Member
Jul 24, 2012
1,091
393
0
22
Padova
Bro I'd love to have this, but my de-recompiling skills are next to 0. If I upload the files, would you mind doing it for me? Thanks ?

Inviato dal mio Xperia U utilizzando Tapatalk
 

thichthat

Senior Member
Nov 1, 2012
464
810
0
Bro I'd love to have this, but my de-recompiling skills are next to 0. If I upload the files, would you mind doing it for me? Thanks ?

Inviato dal mio Xperia U utilizzando Tapatalk
Please check your code again. You saw that error when you compile framework-res or SystemUI?
 

ponnex

Senior Member
Nov 5, 2010
486
367
0
Cagayan de Oro
I was able to do the changes up to the framework.jar and also edited systemui.apk but got systemui force close at boot. One question though I got odexed systemui.apk that has a systemui.odex do I need to deodex them at a single systemui.apk? either way I tried them both but same, results to force close :D hoping for help in this one :good:
 

Technohacker1995

Senior Member
Apr 6, 2015
107
107
0
technohackerblog.blogspot.com
For those on Lollipop or above:

I was poking around in the Android Source when i found these two functions
Code:
/**
     * Used by persistent processes to determine if they are running on a
     * higher-end device so should be okay using hardware drawing acceleration
     * (which tends to consume a lot more RAM).
     * @hide
     */
    static public boolean isHighEndGfx() {
        return (!isLowRamDeviceStatic() &&
                !Resources.getSystem().getBoolean(com.android.internal.R.bool.config_avoidGfxAccel))
                || isForcedHighEndGfx();
    }

    /**
     * @hide
     */
    public static boolean isForcedHighEndGfx() {
        return SystemProperties.getBoolean("persist.sys.force_highendgfx", false);
}
So, to enable high end graphics, all you have to do is set a new property "persist.sys.force_highendgfx" to true and it should work :)
Tried and working :)
Cheers!
Technohacker
 
Last edited:

_XblackshadowX_

Senior Member
Mar 21, 2014
58
5
0
Taguig City
If the original code of the option is "ro.config=low_ram" why add a ".mod" in the end of the code when adding it to build.prop? Will that still have any effects? Sincr i dont have that option available in build.prop
And in what part of the build.prop should i put the code?
What other .jar files or other files contain the code? Only framework.jar? What about the services.jar??