yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] :
I had major stuttering at the Swiftkey app menu using stock kernel.

I just flashed Mirage's overclocked kernel, upped CPU to 1.7~ and it's super smooth.

Will test battery tomorrow and report back.
[Nexus 4 Original Android Development] mrg666:
Guys, I don't see any stuttering on my phone.
[Nexus 4 Original Android Development] icu64:
Same here
[Nexus 4 Original Android Development] ihancioglu:
I configured governor to performance but still some animations (while open sms with messenger, dialing to someone from recents tab) were laging a little. Anyway forget about the animations but battery life is terrible with Lollipop even with Mirage. So I just flashed back to KitKat and decide to wait everything is compatible with it.(Supersu and a few apps)

What about your battery life with it?
[Nexus 4 Original Android Development] icu64:
Still running rock solid from when I posted yesterday. No tweaks to the kernel or ROM.... Epic
[Nexus 4 Original Android Development] mrg666:
Sorry to say this but .... Lollipop's battery life is better than kitkat for me. It seems to me you have special issue with your configuration. I would double check the installed apps.
[Nexus 4 Original Android Development] icu64:
Yet again... I have to agree with you lol
[Nexus 4 Original Android Development] mrg666:
Anybody tried Viper4Android and made it work?
[Nexus 4 Original Android Development] xenyz:
I noticed something funny with Mirage and Lollipop: battery saver mode reduces the cpufreq to 1026 MHz, but when it's turned off, it sets the cpufreq to 1458 MHz. Probably because the default 1512 MHz step is missing, replaced by the 1566 MHz step in Mirage.

I wonder where in Lollipop this setting would be located? It has to be device specific code.
[Nexus 4 Original Android Development] -Asskicker-:
My battery life with lollipop is horrible, only get 2.5 hours SOT. This is just with the stock image, mirage, root and greenify. Pretty sad. :(
[Nexus 4 Original Android Development] mrg666:
I can confirm this. It would be much better if Google just checked the existing max frequency instead of hard coding it. We can add 1512 back to fix it. However battery saver will reset the overclock/underclock every time it is switched on and off.

I am watching the SuperSU development. There are rapid developments and it affects my kernel work too. I will wait until a stable SuperSU is released and change MiRaGe accordingly. This frequency problem can wait until then.

I don't see any battery life problem with Lollipop. Please consider doing your research to find the reason or giving more information for others to help. Or going back to KitKat is a real option until root and selinux problems are resolved and all of your apps are updated for lollipop.
[Nexus 4 Original Android Development] icu64:
I tried that the other day and the drive status kept saying abnormal

---------- Post added at 02:47 PM ---------- Previous post was at 02:17 PM ----------

Am I the only one that noticed that everything in my phone got moved to a folder named 0?
[Nexus 4 Original Android Development] lilgiz:
This post might help you. http://xdaforums.com/showthread.php?t=2938749
[Nexus 4 Original Android Development] icu64:
I don't get it lol
[Nexus 4 Original Android Development] Mercado_Negro:
Run this command using Terminal emulator from the Play Store:
[Nexus 4 Original Android Development] xenyz:
Post in that thread; it's completely off topic in a kernel thread.
[Nexus 4 Original Android Development] raburs:
please give me link to stock kernel.... need a link
[Nexus 4 Original Android Development] Ryanrioz:
nice kernel ever I used.. stock CPU clock and undervolted stuff :D
[Nexus 4 Original Android Development] ihancioglu:
I would like to pointing that, I installed LMT Launcher on Lollipop with Stock kernel. I does not work without disable SELinux. But It works with Mirage on Lollipop without disable SELinux , So maybe some missing security enhancements with Mirage kernel or initramfs. I don't know If it is good or bad :)

Thanks,
[Nexus 4 Original Android Development] mrg666:
Let me check how can I break that LMT launcher. Maybe i missed a configuration setting.

I had also disabled recovery service since SuperSU needed disabling it. Latest beta of SuperSU 2.27 seems to work with that service enabled. If it becomes stable SuperSU I will revert the ramdisk change.
[Nexus 4 Original Android Development] mrg666:
New MiRaGe builds are available in the OP with the following changes:

- use rtmutex instead of mutex in surfaceflinger/binder calls to improve GUI performance

- enable DM_VERITY (used for secureboot)

- enable recovery flash service again in init.rc

SuperSU has reached stable 2.35 version. Flash SuperSU 2.35 (and thank [MENTION=631273]Chainfire[/MENTION]) before updating MiRaGe. Otherwise you will lose root since I am not disabling the recovery flash service anymore.

I think that is all. Enjoy!
[Nexus 4 Original Android Development] icu64:
What's the recovery flash service?
[Nexus 4 Original Android Development] mrg666:
You can read here
[Nexus 4 Original Android Development] icu64:
OK that makes sense, in all honesty I really only use your kernel and Franco's kernel now....you both are awesome and I like your kernel more honestly it just didn't play nice with pa when it came to root for some reason.... But now with the ROM I'm using? Epic lol
[Nexus 4 Original Android Development] bertans:
Hi all,

after a very long time I'm back again with my DT2W experiments!

I'm trying not to use 3rd party utilities

to enable it so I found in my previous posts what it seems a partial solution. Everything works flawless but I'm loosing DT2W after every reboot... anyone knows where's my error?

1) enable USB Debug; --> ok

2) connect to your computer and install proper drivers; --> ok

3) open a command window; --> ok

4) type 'adb shell'; --> ok

5) type 'su'; --> ok

6) type 'echo 1 > /sys/devices/virtual/input/lge_touch/dt_wake_enabled' --> ok

7) reboot device --> the setting is lost :eek:

Thank you all, thank you [MENTION=4203114]mrg666[/MENTION] for your fantastic kernel!

ps. I'm on Lollipop stock, with SuperSU 2.35 installed before MiRaGe LRX 112714

pps. I'm also open to 3rd party utilities but I'm looking for

a very basic one

, just to activate DT2W, I don't need anything else
[Nexus 4 Original Android Development] vampire36:
Correct bound to happen cos value you set is only for the session :)

Not permanent one...

If permanent you will need to use app like Semaphore Kernel Manager :)
[Nexus 4 Original Android Development] Franklin Bernard:
Probably u can write a init.d script for enabling...which will set the value during boot up
[Nexus 4 Original Android Development] xenyz:
With the latest SuperSU, unfortunately there's no way of running init.d scripts without patching the ramdisk on Lollipop. Perhaps [MENTION=4203114]mrg666[/MENTION] will add init.d support into stock Mirage for us if we ask nicely. :)
[Nexus 4 Original Android Development] mrg666:
Isn't this working as shown in the second post? Please let me know.
[Nexus 4 Original Android Development] xenyz:
I will give it a shot when I'm back at the computer. In the meantime, I know you love feature requests ... :)

Since the introduction of Smart Lock on Lollipop, and because apps cannot switch off the screen without doing a screen lock, would you ever consider adding sweep to sleep feature in order for us to switch the screen off without using the power key?

This would allow us to turn off the screen and still use Smart Lock to keep the device unlocked.

(I believe code examples can be found in flar2's elementalx and defconoi's unleashed.)
[Nexus 4 Original Android Development] mrg666:
Turning the screen off is an OS function not kernel. Kernel shouldn't be bypassing the OS to interact with the user input. This kernel wouldn't be MiRaGe anymore with addition of such features.

I made a small exception with dt2w since kernel was shutting down the touch sensor when sleeping. But screen off is completely possible using an app or a different ROM. Or you can use one of these apps with the stock ROM.
[Nexus 4 Original Android Development] xenyz:
The reason I requested it is only because of the new Smart Lock feature in Lollipop. There is no way for any app to turn off the display without locking the screen, so a kernel level method would be necessary.

Thanks for considering it though.
[Nexus 4 Original Android Development] xenyz:
Update: I have found a method to turn the screen off without using the power key, leaving Smart Lock enabled.

I'm planning on writing up a guide but the key is that you need root access and this command:

# input keyevent 26

OT I know, so PM me for more info if interested.
[Nexus 4 Original Android Development] mrg666:
How about a button widget? Just a little bit Java required. You can find an example widget in AOSP or CM source code.
[Nexus 4 Original Android Development] xenyz:
The way I did it was by using Tasker and the assist gesture (swipe up from home button):

- Clear defaults on Google Now Launcher if you use Google Now

- Swipe up from home, set default action to Tasker, always

- Tasker Profile: Event - UI - Assistance Request

- Tasker Task: Run Shell - Command "input keyevent 26", Use Root

It allows a quick swipe to turn off the screen and keep Smart Lock enabled.

I believe you can hook Tasker into Power Toggles, or a button widget if you wanted to do it that way instead, but the swipe is so quick and easy.

Combined with double tap to wake in Mirage, this is so handy -- using the power key is obsolete now. :)
[Nexus 4 Original Android Development] RolF2:
Does really install-recovery.sh is used in lollipop ?

I just added "echo 1 > /sys/devices/virtual/input/lge_touch/dt_wake_enabled" line to install-recovery.sh and that's not working ...

In KitKat that worked without any problems ...

R.
[Nexus 4 Original Android Development] mrg666:
Did you make the change in the ramdisk? The changes in install-recovery.sh cannot be permanent without changing it in the ramdisk.

I am glad you have achieved what you wanted to do. See, kernel change is not necessary :)
[Nexus 4 Original Android Development] xenyz:
install-recovery.sh was convenient because it was outside of the ramdisk, located in /system/etc/install-recovery.sh

Something else is going on, I'm trying to sort it out. So far I think that the new SuperSU hooks into app_process, but I'm not sure why install-recovery.sh does not run any longer. Either app_process forked the install-recovery.sh hook, and SuperSU now stops it, or some other mechanism triggers it.

Your original answer made me curious, and I haven't had time to try it yet, but perhaps flashing stock recovery, and then custom recovery will get it going again?

Edit: more than likely SELinux label on flash_recovery service not allowing full access, which was probably what the CF-Autoroot zip patched in the ramdisk.

It also likely means no more hooks in the system partition, and init.d support having to be added to the ramdisk instead. I'll try to dig up an anykernel installer with init.d support as a quick fix. Stay tuned...
[Nexus 4 Original Android Development] RolF2:
looks like we can't use install-recovery.sh anymore in lollipop :
[Nexus 4 Original Android Development] mrg666:
I can remove selinux restriction on install-recovery.sh again. Let me check any possible problems or security risks first.
[Nexus 4 Original Android Development] vr5411:
Shouldn't install-recovery-2.sh be used instead? As per [MENTION=631273]Chainfire[/MENTION] instructions.

install-recovery.sh is reserved for SuperSU usage.
[Nexus 4 Original Android Development] mrg666:
Latest stable SuperSU is not using install-recovery.sh anymore. That is why I have reverted the selinux restrictions on it. You can read more if you follow the link above.

Everyone, let me see how is lollipop different regarding init.d support. I didn't have time to check that yet.
[Nexus 4 Original Android Development] xenyz:
The best solution is probably leave the flash_recovery service alone, and add a separate entry for init.d support as in other kernel's ramdisk.

(Example from Code Blue)

(In init.rc, after last import line at the top)

...
import /init.${ro.zygote}.rc
...
# Include vendor ramdisk
import /init.mirage.rc

(In init.mirage.rc)

# Mirage Extras

# Run runparts
start userinit

# runparts (/system/etc/init.d)
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
class late_start
user root
group root
[Nexus 4 Original Android Development] guimendes:
Hello [MENTION=4203114]mrg666[/MENTION]!

Since last version of MiRaGe I started facing some WiFi issues. Some times it drops my connection and I'm not able to reconnect, even in another network. I have to restart my device. May this be kernel related or incompatibility between stock ROM and my WiFi network?

Thanks!
[Nexus 4 Original Android Development] ziovelvet:
Sorry guys what's the difference between LRX and KTU?

Is LRX perhaps for Lollipop and KTU for KitKat?
[Nexus 4 Original Android Development] ohitspat:
Yep you got it
[Nexus 4 Original Android Development] mrg666:
I haven't seen any WiFi problem. But I can check it out if you can post a kernel log after this happens before rebooting.

xenyz, I will leave the recovery script alone and add the required lines into ramdisk to make init.d functional if it is already set up. But I am not planning to modify anything in the /system partition.
[Nexus 4 Original Android Development] xenyz:
Great, thanks! Maybe make a change in the OP re: init.d support. The only thing needed is busybox installed and an init.d dir with correct owner/permissions.
[Nexus 4 Original Android Development] mrg666:
I am testing a new build now. I will post the new build in a couple of days with init.d support in the ramdisk.
[Nexus 4 Original Android Development] bertans:
DT2W UPDATE

Since I almost surrender to the difficulties, I've asked to [MENTION=2817101]naxir[/MENTION] (the author of Nexus 6 Doubletap To Wake) to modify his "so lean" app to run on our N4...

He did it and now I'm running the first "beta" without any issue (Android 5.0, TWRP, SuperSU and nothing more). :victory:

Be prepared

because he said:

:cool:
[Nexus 4 Original Android Development] mrg666:
New MiRaGe builds are posted in the OP

- Linux 3.4.105

- MSM/KGSL updates

- init.d supported if it is configured

Please let me know if there are problems with init.d support. If there is no /system/etc/init.d setup, there shouldn't be any problem. If you don't need init.d support, there is still nothing changed outside /boot partition

Thanks to xenyz for the init.d support. I have directly used his suggestion.
[Nexus 4 Original Android Development] RolF2:
thanks, there's instructions in second post how to add init.d support to rom and that's absolete now for lollipop i think ...
[Nexus 4 Original Android Development] xenyz:
Term-init should still work. It's going to create the install-recovery.sh file that's no longer required, but it should set up the paths and permissions the same way. I'll test it later on, in the meantime here's an example of my init.d script 00mirage:

#!/system/bin/sh

# bundi22 'iPhone 5' gamma

echo "0 39 119 1 6 0 2 0 1" > /sys/devices/virtual/misc/gamma_control/gamma_b
echo "0 39 119 1 6 0 2 0 1" > /sys/devices/virtual/misc/gamma_control/gamma_g
echo "0 39 119 1 6 0 2 0 1" > /sys/devices/virtual/misc/gamma_control/gamma_r

# -50 mV undervolt on all frequencies

echo "-50000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels

# enable double tap to wake

echo 1 > /sys/devices/virtual/input/lge_touch/dt_wake_enabled
[Nexus 4 Original Android Development] mrg666:
You mean init.d support is working fine?
[Nexus 4 Original Android Development] xenyz:
Yes, it's working fine here.
[Nexus 4 Original Android Development] dougiefresh36:
Great update to the kernel Mrg666
[Nexus 4 Original Android Development] Utkarsh-ezzo:
What kernel control you guys are using on 5.0? synapse+UKM aint work for me, shows no UCI support always.
[Nexus 4 Original Android Development] jimyiak:
Try semaphore manager to get the colors you want and the trickster mod ;)

sent by nexy 4
[Nexus 4 Original Android Development] naxir:
Hey [MENTION=2149302]bertans[/MENTION], it is posted now. Sorry it took so long to post it, it's been a busy last week or two. If anyone else wants a double tap to wake toggle switch for this kernel, you can find it here:

http://xdaforums.com/nexus-4/themes-apps/app-double-tap-to-wake-toggle-mirage-t2967168
[Nexus 4 Original Android Development] mrg666:
MiRaGe is updated to 5.0.1 (LRX22C) release. Downloads are in the OP.

Enjoy!
[Nexus 4 Original Android Development] guimendes:
[MENTION=4203114]mrg666[/MENTION]

Anything has changed on latest kernels about mounting /sdcard? I built my own version of your kernel today, with MultiROM enabled, and I cannot mount /sdcard. May the problem be related to any-kernel updater? Or is something with my configs?

I haven't build my kernel for a while, so I reforked your code and reimplemented kexec patch from a patch.
[Nexus 4 Original Android Development] mrg666:
I didn't change anything specifically. But seccomp was added in the 5.0.1 build. I'm not aware of any other possible cause.

This sdcard mounting should be for compatibility of an app, right? Otherwise can you explain why this is required?

All, lollipop changed many things in the security department. Many apps need update to work right with lollipop. I just recently received a request to make the kernel permissive. I can do this easily but the implication will be less security for everyone. For example, malware can also disable selinux exploiting the root permissions. For my use (a knowledgeable user/dev), this is not much of a risk although there is no benefit of a permissive kernel. The main benefit for others will be compatibility with some apps such as viper4android which will hopefully be updated soon to work without a permissive kernel. Please post your opinion here. Do you want a permissive kernel and accept losing a part of android security?
[Nexus 4 Original Android Development] guimendes:
Thanks for replying!

The problem is I lost the mount point /sdcard for all system. Android printed a message warning for low storage and no app could access my data partition, but system->storage reported correctly both free and used portions of the partition.

I read all code I've changed in my version and I didn't identify any portion that can cause the problem. Also, with your latest release, I have no problem with mounting. So, I'll try to make an image for my kernel to test and report.

About a more permissive kernel, I don't like so much this idea, because of the security risk.
[Nexus 4 Original Android Development] DrummerMuppet:
Definitely, no. Being a developer myself, I believe we should take care of things instead of relying on workarounds like that (unless there's really no other option, but that's not the case here).
[Nexus 4 Original Android Development] cant0nese:
+1. By changing a major security feature of Lollipop, I feel it's no longer just enhancing it but changing it.
[Nexus 4 Original Android Development] mrg666:
It seems like a common response is shaping up. And I agree with the feedback so far.
[Nexus 4 Original Android Development] xenyz:
With init.d support, users who would like a permissive kernel just have to add a file to /etc/init.d with the command:

setenforce 0

Edit: I don't use viper4android so I'm not sure if it runs early enough to get it to work.
[Nexus 4 Original Android Development] guimendes:
[MENTION=4203114]mrg666[/MENTION]

This method worked, so I guess you should remove any-kernel method from OP, or, if you can and don't mind, update it, because it's not working anymore.
[Nexus 4 Original Android Development] mrg666:
I will remove it. MiRaGe is not using any kernel updater anyway.
[Nexus 4 Original Android Development] mrg666:
I have uploaded new builds with the ondemand governor updates.

[MENTION=3118524]xenyz[/MENTION], my testing was wrong possibly and sorry for taking so long to add these commits. Or, this could be "second time's the charm" effect :) There are no heat problems this time and I see a clear improvement in frequency response.

Thanks to stratosk once again.

Edit:

I have also two test kernels with the following commit.

http://www.mediafire.com/download/3ecgp3uoq6btkbv/MiRaGe_mako_test_kernel_LRX_121314.zip

http://www.mediafire.com/download/m3d44ld14skh12m/MiRaGe_mako_oc_test_kernel_LRX_121314.zip

I need help with testing these changes. If you can help, please post your experience.

Thanks in advance!
[Nexus 4 Original Android Development] xenyz:
Speaking of testing, if anyone else wants to try this out and see if they notice any difference in battery, it would be appreciated.

You need busybox for this to work.

Save in /etc/init.d/02ignorenice, and reboot.

#!/system/bin/sh

# abuse ignore_nice_load

ignorenice() {

echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load

sleep 100

#renice +1 -p `pidof system_server`
#renice +1 -p `pidof com.android.systemui`
renice +2 -p `pidof lmkd`
renice +2 -p `pidof logd`
renice +2 -p `pidof netd`
renice +2 -p `pidof sensors.qcom`
renice +2 -p `pidof ueventd`
renice +2 -p `pidof com.google.android.gms`
renice +2 -p `pidof com.google.process.gapps`
renice +2 -p `pidof com.google.process.location`
renice +2 -p `pidof com.google.android.googlequicksearchbox:search`
renice +2 -p `pidof com.google.android.googlequicksearchbox`
}

ignorenice &
[Nexus 4 Original Android Development] famewolf:
Fast Charge?

Is there any chance that fast charge could be added to the feature list or is there a specific reason it was NOT added I'm unaware of? I would think allowing faster recharging would be within the scope of the project?

Thanks for your hard work!

I guess I should mention I am using your oc Kitkat kernel until lollipop supports xposed framework.
[Nexus 4 Original Android Development] xenyz:
I've noticed that the governor doesn't select the lowest frequency that often. It seems to be running well, so I'm not sure if this is necessarily a problem though.

Edit: Could it be because the 432 MHz step should actually be 438 MHz to match the others with a 54 MHz difference?

Or perhaps it requires the 405 MHz step as well for stratosk's changes?

Edit 2: Found another related patch, looks like this is it.
[Nexus 4 Original Android Development] mrg666:
That was my reason when I reverted those ondemand patches after trying the first time.

No, 432 matches all other frequencies that use HPLL, other than 384 which uses PLL-8. Check the acuplock file, you will see the multipliers/dividers that match with 432.

Performance seems to suffer at that PLL_8 frequency. If there is not much drain, I will not add that patch. Can you please test and post your experience especially in battery life. We will decide what to do after test results.
[Nexus 4 Original Android Development] xenyz:
Sorry, I think my post got a bit confusing, I wrote it right after waking up. :)

Check the 2nd edit I made, it has a link to the necessary patch to select the low frequency on idle loads.
[Nexus 4 Original Android Development] mrg666:
See this post :)

Edit: I have tested that patch quickly. It works great. I have been testing since yesterday and decided to update the builds in the OP since this build is better than the previous without any problem I can see.

I have work to do next week and it is better I release it now. So there it is.

Everyone, I will be away for a couple of weeks. Happy holidays and wonderful new year!
[Nexus 4 Original Android Development] famewolf:
I take it the october version is the final kitkat version with no more future updates? If so can someone recommend an actively developed KK kernel for nexus 4? I really like this kernel but I don't want to fall behind on improvements to governors etc either.

I'm stuck with KK until xposed framework works under lollipop. I use way to many modules to give them up.