FORUMS
Remove All Ads from XDA

[HOW TO] Add Ambient Display on Settings [Lollipop]

2,528 posts
Thanks Meter: 9,300
 
By raffaele88, Senior Member on 17th November 2014, 12:09 AM
Post Reply Email Thread
Hey guys! Today I'll be showing you how to add the Ambient Dislpay in Settings:



Quote:

You will need
framework-res.apk from the rom you are modding
SystemUI.apk from your Rom
Notepad++ or another text editor of your choice
apktool



Ok now we can start


First decompile Systemui.apk with this comand
Code:
apktool d systemui.apk
Navigate to systemui/res/values/bools and open it with Notepad++ and change this line:

from
PHP Code:
<bool name="doze_display_state_supported">false</bool>    
<
bool name="doze_pulse_on_pick_up">false</bool
to
PHP Code:
<bool name="doze_display_state_supported">true</bool>    
<
bool name="doze_pulse_on_pick_up">true</bool
Save and ricompile systemui with this comand:
Code:
apktool b systemui

Now start to mod framework-res.apk


Decompile framework-res.apk with apktool with this comand:
Code:
apktool d framework-res.apk
Navigate to framework-res/res/values/string and open it with notepad++ and change this line:

from
PHP Code:
<string name="config_dozeComponent"></string
to
PHP Code:
<string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string
Save and close.....



Now in the same folder open bool.xml and with notepad++ and mod this line:

from
PHP Code:
<bool name="config_dozeAfterScreenOff">false</bool>
<
bool name="config_powerDecoupleInteractiveModeFromDisplay">false</bool
to
PHP Code:
<bool name="config_dozeAfterScreenOff">true</bool>
<
bool name="config_powerDecoupleInteractiveModeFromDisplay">true</bool
Save it and close....


Now in the same folder open Interger.xml with notepad++ andmod this line:

from
PHP Code:
<integer name="config_screenBrightnessDoze">1</integer
to
PHP Code:
<integer name="config_screenBrightnessDoze">17</integer
Now recompile with this comand:
Code:
apktool b framework-res.apk
That's it!!! Enjoy with your new mod

NB... Remember to insert original Signature after recompile APK,you can find in original folder on apktool


In attachment file there is my apktool if you need

thanks to david279 for update guide
Attached Files
File Type: zip apktool_lolly.zip - [Click for QR Code] (11.34 MB, 9386 views)
The Following 82 Users Say Thank You to raffaele88 For This Useful Post: [ View ] Gift raffaele88 Ad-Free
 
 
17th November 2014, 12:35 AM |#2  
KennyDumah's Avatar
Senior Member
Thanks Meter: 143
 
More
Just please post the framework for Stock Lollipop Rom
The Following User Says Thank You to KennyDumah For This Useful Post: [ View ] Gift KennyDumah Ad-Free
17th November 2014, 12:55 AM |#3  
david279's Avatar
Senior Member
Flag New Orleans
Thanks Meter: 1,904
 
Donate to Me
More
Thanks man but I can't do any of that from my phone right now

---------- Post added at 05:55 PM ---------- Previous post was at 05:50 PM ----------

Oops Nevermind Ubuntu to the rescue
17th November 2014, 01:37 AM |#4  
Dirk64's Avatar
Senior Member
Flag Kiel
Thanks Meter: 96
 
Donate to Me
More
Thank you very much for the apktool
The Following User Says Thank You to Dirk64 For This Useful Post: [ View ] Gift Dirk64 Ad-Free
17th November 2014, 01:45 AM |#5  
Account currently disabled
Thanks Meter: 6,789
 
Donate to Me
More
thanks for the apktool
The Following User Says Thank You to flex360 For This Useful Post: [ View ] Gift flex360 Ad-Free
17th November 2014, 01:57 AM |#6  
david279's Avatar
Senior Member
Flag New Orleans
Thanks Meter: 1,904
 
Donate to Me
More
Ok what am i doing wrong

I: Using Apktool 2.0.0-dirty on framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java: 247)
at brut.androlib.Androlib.build(Androlib.java:266)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Abst ractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java: 243)
... 4 more
The Following User Says Thank You to david279 For This Useful Post: [ View ] Gift david279 Ad-Free
17th November 2014, 03:02 AM |#7  
feizhel_vandrago's Avatar
Senior Member
Flag South Kalimantan
Thanks Meter: 53
 
More
get bootlop after doing this will try it again later btw, thanks OP
17th November 2014, 03:04 AM |#8  
raffaele88's Avatar
OP Senior Member
Flag Salerno
Thanks Meter: 9,300
 
Donate to Me
More
Quote:
Originally Posted by david279

Ok what am i doing wrong

I: Using Apktool 2.0.0-dirty on framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java: 247)
at brut.androlib.Androlib.build(Androlib.java:266)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Abst ractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java: 243)
... 4 more

You have java installed?
17th November 2014, 03:06 AM |#9  
david279's Avatar
Senior Member
Flag New Orleans
Thanks Meter: 1,904
 
Donate to Me
More
I though i did. Installing stuff now...
17th November 2014, 03:11 AM |#10  
raffaele88's Avatar
OP Senior Member
Flag Salerno
Thanks Meter: 9,300
 
Donate to Me
More
Quote:
Originally Posted by feizhel_vandrago

get bootlop after doing this will try it again later btw, thanks OP

You need to put old signature inside framework after compile...same all mods when you use apktool
17th November 2014, 03:14 AM |#11  
feizhel_vandrago's Avatar
Senior Member
Flag South Kalimantan
Thanks Meter: 53
 
More
Quote:
Originally Posted by raffaele88

You need to put old signature inside framework after compile...same all mods when you use apktool

i just put original Meta INF & Android Manifest to my decompiled apk, is it wrong or i left something?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes