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

Search This thread

izzatmustakim

Senior Member
Oct 23, 2014
68
17
This mod will works on any rom, as long as you decompile, make changes and recompile the framework apk properly. I tried this mod on every custom rom on my note 5, with marshmallow. One quick question, anyone know how to make the proximity sensor working with ambient display? I mean, when you're waving your hand on proximity, then the ambient will light up. Thanks
 

Marília de Oliveira

Senior Member
Nov 11, 2012
2,127
2,117
Wonderful city of the sun
www.youtube.com
Working on my rom based on MM. good could add privacy options :good:

---------- Post added at 07:22 PM ---------- Previous post was at 07:21 PM ----------

This mod will works on any rom, as long as you decompile, make changes and recompile the framework apk properly. I tried this mod on every custom rom on my note 5, with marshmallow. One quick question, anyone know how to make the proximity sensor working with ambient display? I mean, when you're waving your hand on proximity, then the ambient will light up. Thanks

also wanted to know :D
 

nico_vo

Senior Member
Oct 15, 2014
457
124
München
I tried it, but I somehow have problems after booting, where the screen stays black and the device doesn't respond to anything... any advice?
I am trying to do this for cm14.1 on a galaxy s5 mini
 

yuwang19

Senior Member
Feb 14, 2017
142
26
sz
recompile systemui,error appear:how solve these issues?

Exception in thread "main" com.rover12421.shaka.b.l: W: D:\xiaomiapkzhizl_3.3.5_XiaZaiBa\Work\com.android.systemui\res\values\styles.xml:458: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.ActivityChooserView'.
W:
W: D:\xiaomiapkzhizl_3.3.5_XiaZaiBa\Work\com.android.systemui\res\values\styles.xml:537: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.ActivityChooserView'.
W:
W: D:\xiaomiapkzhizl_3.3.5_XiaZaiBa\Work\com.android.systemui\res\values\styles.xml:538: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.ActivityChooserView'.
W:
W: D:\xiaomiapkzhizl_3.3.5_XiaZaiBa\Work\com.android.systemui\res\values\styles.xml:543: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.ActivityChooserView'.
W:
W: D:\xiaomiapkzhizl_3.3.5_XiaZaiBa\Work\com.android.systemui\res\values\styles.xml:552: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.ActivityChooserView'.
W:

at b.a.d.a.a(Unknown Source)
at b.a.d.a.a(Unknown Source)
at b.a.a.a(Unknown Source)
at b.a.a.a(Unknown Source)
at b.a.a.e(Unknown Source)
at b.a.a.a(Unknown Source)
at b.b.a.b(Unknown Source)
at b.b.a.a(Unknown Source)
at com.rover12421.shaka.cli.Main.main(Unknown Source)
Caused by: b.a.B: b.c.a: could not exec (exit code = 1): [C:\Documents and Settings\Administrator\ShakaApktool\windows-x86\bin\aapt.exe, p, --forced-package-id, 127, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, --no-version-vectors, -F, C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\APKTOOL1170803226906208062.tmp, -0, arsc, -I, C:\Documents and Settings\Administrator\AppData\Local\apktool\framework\1.apk, -S, D:\xiaomiapkzhizl_3.3.5_XiaZaiBa\Work\com.android.systemui\res, -M, D:\xiaomiapkzhizl_3.3.5_XiaZaiBa\Work\com.android.systemui\AndroidManifest.xml]
at b.a.d.a.a(Unknown Source)
... 9 more
Caused by: b.c.a: could not exec (exit code = 1): [C:\Documents and Settings\Administrator\ShakaApktool\windows-x86\bin\aapt.exe, p, --forced-package-id, 127, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, --no-version-vectors, -F, C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\APKTOOL1170803226906208062.tmp, -0, arsc, -I, C:\Documents and Settings\Administrator\AppData\Local\apktool\framework\1.apk, -S, D:\xiaomiapkzhizl_3.3.5_XiaZaiBa\Work\com.android.systemui\res, -M, D:\xiaomiapkzhizl_3.3.5_XiaZaiBa\Work\com.android.systemui\AndroidManifest.xml]
at b.e.i.a(Unknown Source)
... 10 more
 

cnkzlyr

Senior Member
Oct 21, 2014
1,337
1,187
25
Ankara
Poco F5 Pro / Redmi K60 (China)
Okay bro thank you :)
SM-G935F cihazımdan Tapatalk kullanılarak gönderildi

---------- Post added at 08:10 AM ---------- Previous post was at 07:11 AM ----------

Guys Im trying to edit and compile an apk for first time. I edited bools xml for 3 lines. And got this error when trying to recompile it. Any suggestions?


W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:150: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.ZoomButtons'.
W:
W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:151: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.ZoomButtons'.
W:
W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:156: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.ZoomButtons'.
W:
W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:166: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.ZoomButtons'.
W:
W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:299: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.Wallpaper'.
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt6.0, p, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, -F, /data/data/per.pqy.apktool/APKTOOL937742853787201268.tmp, -0, arsc, -0, arsc, -I, /data/data/per.pqy.apktool/1.apk, -S, /storage/emulated/0/A/SystemUI_src/res, -M, /storage/emulated/0/A/SystemUI_src/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
at brut.androlib.Androlib.buildResources(Androlib.java:412)
at brut.androlib.Androlib.build(Androlib.java:311)
at brut.androlib.Androlib.build(Androlib.java:264)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt6.0, p, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, -F, /data/data/per.pqy.apktool/APKTOOL937742853787201268.tmp, -0, arsc, -0, arsc, -I, /data/data/per.pqy.apktool/1.apk, -S, /storage/emulated/0/A/SystemUI_src/res, -M, /storage/emulated/0/A/SystemUI_src/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:464)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt6.0, p, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, -F, /data/data/per.pqy.apktool/APKTOOL937742853787201268.tmp, -0, arsc, -0, arsc, -I, /data/data/per.pqy.apktool/1.apk, -S, /storage/emulated/0/A/SystemUI_src/res, -M, /storage/emulated/0/A/SystemUI_src/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)
... 6 more
I: Using Apktool 2.2.2-Black
I: Smaling smali folder into classes.dex...
I: Building resources...

---------- Post added at 08:17 AM ---------- Previous post was at 08:10 AM ----------

Btw Im using the latest apktool for android bcoz I dont have computer. Can you tell me if it is impossible to do it on mobile?
 
Last edited:

suriyaprakas

Senior Member
Feb 26, 2017
103
50
Okay bro thank you :)
SM-G935F cihazımdan Tapatalk kullanılarak gönderildi

---------- Post added at 08:10 AM ---------- Previous post was at 07:11 AM ----------

Guys Im trying to edit and compile an apk for first time. I edited bools xml for 3 lines. And got this error when trying to recompile it. Any suggestions?


W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:150: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.ZoomButtons'.
W:
W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:151: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.ZoomButtons'.
W:
W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:156: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.ZoomButtons'.
W:
W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:166: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.ZoomButtons'.
W:
W: /storage/emulated/0/A/SystemUI_src/res/values/styles.xml:299: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation.Wallpaper'.
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt6.0, p, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, -F, /data/data/per.pqy.apktool/APKTOOL937742853787201268.tmp, -0, arsc, -0, arsc, -I, /data/data/per.pqy.apktool/1.apk, -S, /storage/emulated/0/A/SystemUI_src/res, -M, /storage/emulated/0/A/SystemUI_src/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
at brut.androlib.Androlib.buildResources(Androlib.java:412)
at brut.androlib.Androlib.build(Androlib.java:311)
at brut.androlib.Androlib.build(Androlib.java:264)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt6.0, p, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, -F, /data/data/per.pqy.apktool/APKTOOL937742853787201268.tmp, -0, arsc, -0, arsc, -I, /data/data/per.pqy.apktool/1.apk, -S, /storage/emulated/0/A/SystemUI_src/res, -M, /storage/emulated/0/A/SystemUI_src/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:464)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt6.0, p, --min-sdk-version, 23, --target-sdk-version, 23, --version-code, 23, --version-name, 6.0.1, -F, /data/data/per.pqy.apktool/APKTOOL937742853787201268.tmp, -0, arsc, -0, arsc, -I, /data/data/per.pqy.apktool/1.apk, -S, /storage/emulated/0/A/SystemUI_src/res, -M, /storage/emulated/0/A/SystemUI_src/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)
... 6 more
I: Using Apktool 2.2.2-Black
I: Smaling smali folder into classes.dex...
I: Building resources...

---------- Post added at 08:17 AM ---------- Previous post was at 08:10 AM ----------

Btw Im using the latest apktool for android bcoz I dont have computer. Can you tell me if it is impossible to do it on mobile?
Use ApkEditor And Compare Both style.xml And Edit Them .
Then Try Recompiling.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 81
    Hey guys! Today I'll be showing you how to add the Ambient Dislpay in Settings:

    a.png


    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:
    <bool name="doze_display_state_supported">false</bool>	
    <bool name="doze_pulse_on_pick_up">false</bool>

    to
    PHP:
    <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:
    <string name="config_dozeComponent"></string>

    to
    PHP:
    <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:
    <bool name="config_dozeAfterScreenOff">false</bool>
    <bool name="config_powerDecoupleInteractiveModeFromDisplay">false</bool>

    to
    PHP:
    <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:
    <integer name="config_screenBrightnessDoze">1</integer>

    to
    PHP:
    <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
    13
    Ambient Notifications for stock Nexus 5 with stock Android 5.1 (LMY47D)

    Just created this and used adb sideload to install on my Nexus 5 with stock Android 5.1 (LMY47D). Phone boots without issue and ambient notifications work.

    Make a backup, install at your own risk, I'm not responsible for you being stupid, etc.

    EDIT: If your phone was updated to LMY47I (5.1.0r3), see post #204.
    10
    I made two flashable zip for LMY48B (5.1.1) to enable Ambient Display and revert to stock, available here: goo.gl/pNcpbV or attached below.
    8
    Hey guys,

    I edited the the zip file to install into the right directory (/system/priv-app/SystemUI) and double checked.
    Hope this helps! Thanks for the mod in the first place!
    8
    Hi everyone, I finally made 2 flashable zips for N5/Marshmallow MRA58K.
    Please let me know if everything works fine.

    Mirror on GDrive: https://goo.gl/ZPxwXG