[KERNEL] Butterfly for daisy

Search This thread

romulocarlos

Senior Member
Oct 10, 2011
552
152
Belo Horizonte
Hello.

Can't install Magisk 19.3 with this kernel on 5.5 (normal). My steps:

1. Unlock bootloader
2. Boot to TWRP (not install, just boot), install Butterfly, reboot
3. Install Magisk Manager and generate my patched boot.img

When I try to 'fastboot boot patched_boot.img", the phone freezes for a while, and reboots. When I go again to Magisk Manager, there is no "Direct Install" option.

I'm on 10.0.13.0. Can you point me a solution, please?

EDIT! For information: with stock boot, I can install Magisk.
 
Last edited:

Pat750

Senior Member
Sep 12, 2016
600
263
With Butterfly-daisy-20190824-Oreo-v5.5+.ZIP I have the smoothest experience ever with Havoc2.8 GSI.
Thanks a lot :good:
 

anzhaki

Senior Member
Sep 19, 2014
290
48
Just flashed the latest version 4.4 and now finger print is broken. The previous version was working fine. I had Magisk and I didn't know that I had to reflash it but due to the twrp bug I couldn't flash it so I lost Magisk ?.

Edit: I just have to add fingerprint again.
 
Last edited:

ovejota

Member
Aug 1, 2013
37
4
Is anyone using this kernel on latest LOS? If yes, do I have to follow any specific instructions to install?
 

Captain_Hungary

Senior Member
Nov 14, 2013
231
132
Budapest
Redmi Note 9 Pro
Is anyone using this kernel on latest LOS? If yes, do I have to follow any specific instructions to install?

Just boot into twrp and then
-install kernel
-install twrp and magisk (if you use it)
-wipe cache (optional, but recommended
-reboot system

If you update the rom later via ota:
-install update
-install twrp A/B redemption module in magisk
-reboot to twrp
And then follow the previous steps about the custom kernel installation.

If you want to keep the custom kernel, then magisk is really helpful, otherwise you can't keep twrp and thus can't reinstall the kernel after an update.
(Also you don't need to install magisk to the inactive slot from magisk manager right after installing the update, because you will do it from twrp after the custom kernel)
 
  • Like
Reactions: ovejota

Captain_Hungary

Senior Member
Nov 14, 2013
231
132
Budapest
Redmi Note 9 Pro
if twrp installed before then no need re-install it after kernel (bcs twrp will be preserved so) - it cause bootloop

But twrp is installed to the boot partition, so installing a new kernel would delete it, isn't it?
I'm not a developer, so you probably know it better, but I always installed twrp after custom kernel and I never had bootloop (I'm using los16 btw)
 

eremitein

Senior Member
May 16, 2017
1,186
1,520
Xiaomi Mi A2 Lite
But twrp is installed to the boot partition, so installing a new kernel would delete it, isn't it?
installing kernel from zip will do not delete twrp,
but flashing clean boot.img - delete

I'm not a developer, so you probably know it better, but I always installed twrp after custom kernel and I never had bootloop (I'm using los16 btw)
idk what inside boot.img in the LOS, but after secondary installing normal twrp in the normal boot it give you bootloop)
 

moksy_1

Member
Sep 27, 2015
49
2
fts_ts DT2W

Hi there & thank you for all involved people in this project

I have fts_ts pannel, is there any chance to get dt2w one day working with custom kernel ? if not is there any solution to get only part of kernel that do undervolting & make a new kernel that don't break dt2w for fts_ts pannel ? please note thant I am new bie if there is a tutorial to get only undervolting part of kernel without breaking dt2w fot fts_ts pannel
 

eremitein

Senior Member
May 16, 2017
1,186
1,520
Xiaomi Mi A2 Lite
Hi there & thank you for all involved people in this project

I have fts_ts pannel, is there any chance to get dt2w one day working with custom kernel ? if not is there any solution to get only part of kernel that do undervolting & make a new kernel that don't break dt2w for fts_ts pannel ? please note thant I am new bie if there is a tutorial to get only undervolting part of kernel without breaking dt2w fot fts_ts pannel
hi

driver for fts_ts with dt2w have a bug (periodically ghost touches on the home button), so i don't want include it to the regular builds. and i don't want fixing it

maybe i will build separated versions with broken driver. if i have mood & time for this
 

Captain_Hungary

Senior Member
Nov 14, 2013
231
132
Budapest
Redmi Note 9 Pro
[ Control dt2w via Kernel Adiutor ]

Download necessary plugin, rename it to .json, import and use))


.

I'm using stock 10.0.13 rom, with the latest butterfly kernel. I found that the location of the dt2w enabler file has changed, and therefore these .json files won't work.
(It used to be on /proc/tp_wakeup_gesture
But now it's on /proc/touchpanel/wakeup_gesture)
I share the .json files with the new file location, that I have modified for those who are interested. Just delete the ".txt" from the end of the file name, and import in kernel adiutor custom controls.
(Of course this is for goodix panel only)
 

Attachments

  • dt2w_stock_new.json.txt
    350 bytes · Views: 23
  • Like
Reactions: Pat750

eremitein

Senior Member
May 16, 2017
1,186
1,520
Xiaomi Mi A2 Lite

prodang2509

Member
Jan 20, 2019
25
3
hi

driver for fts_ts with dt2w have a bug (periodically ghost touches on the home button), so i don't want include it to the regular builds. and i don't want fixing it

maybe i will build separated versions with broken driver. if i have mood & time for this

ghost touch on home button is on rom LOS, Superior OS, RR, ... but not encountered on rom PE, Evolution X. I am using Evolution X rom with kernel butterfly v4 and have not encountered that error
 

Top Liked Posts

  • There are no posts matching your filters.
  • 34
    =BUTTERFLY KERNEL=

    Your warranty is now void!

    We're not responsible for bricked devices, dead SD cards,
    thermonuclear war, or you getting fired because the alarm app failed. Please
    do some research if you have any concerns about features included in this ROM
    before flashing it! YOU are choosing to make these modifications, and if
    you point the finger at us for messing up your device, we will laugh at you



    Features:
    Pie base: CAF & Prima Tag by LA.UM.7.6.r1-04500-89xx.0
    Oreo base: CAF & Prima Tag by LA.UM.6.6.r1-11000-89xx.0
    Legacy base: not updated pure sources from MiCode github
    (prima tag LA.UM.7.6.r1-05500-89xx / LA.UM.6.6.r1-11300-89xx.0)
    • KCAL color control
    • Vibration intensity control
    • Sound gain control
    • Audio codec quality improved
    • exFAT Support
    • NTFS support
    • F2FS support
    • SquahFS support
    • CIFS/SMB support
    • Added CPU Hotplug (default disabled)
    • Set lz4 for better zram work
    • Boeffla wakelock blocker
    • Added defaults rules for Boeffla wakelock blocker
    • Disable vendor verify and set no verity
    • CRC32: disable by default & enable toogle (average 30% I/O performance profit)
    • Few patches from Franco kernel (disabled a lot of debugging stuff)
    • Fsync: on/off support
    • Battery deep optimisation: undervolting & additional tweaks
    • Added Adreno Real Idler (supported turning it on/off)
    • Improved interactive governor (patch from Franco kernel)
    • Improved CPU boost, default is disabled (patch from Franco kernel)
    • Improved conservative governor (patch from Franco kernel)
    • I/O schedulers: noop, deadline, bfq, cfq (default), sio, fiops, maple, tripndroid, zen, anxiety, sioplus, fifo, v(r)
    • Added CPU governors: darkness, zzmoove, relax, impulse, electron, nonconservative, lionheart, clarity, blu_active, yankactive, intelliactive, conservativex, ondemandx, interactivex, bioshock, darknessv5, alucard, smartmax_eps, pegasusq, lionfish, hyper, despair, barry_allen, xperience, alessa, chill, ondemandplus, ironactive, culvitation, tripndroid
    • Added GPU governors: guardian, balanced, msm-adreno-plus
    • TCP congestion algorithms: cubic, reno, westwood (default)
    • Installer include fix for Wi-Fi SELinux permission
    • Kernel installer also support custom ROMs
    • GCam focus fix (thanks @teftel1608 and @33bca)
    • GPU: clocks table reworked (lags free, performance grew). OC max gpu freq now is 725MHz
    • Added WireGuard 0.0.20190601
    • Fix for goodix-fp gestures on stock (thanks to @artyom5613 & @Broomber)
    • Also in the v4 installer included fix fpc-fp gestures for the customs rom
    now gestures for both fingerprints is are:
    * swipe2right - paste text
    * others like in rom's setting
    (if you not like this - change it in the /system/usr/keylayout/uinput-*.kl)
    • Memory & battery life optimization due config settings for kernel
    • Added a block to wakelock from wifi
    • I/O optimization
    • Hide unlocked bootloader state (for apps like bank clients etc)
    • Patches from Franco "mido" kernel for battery life improvement
    • Added gpu Adreno simple algorithm (beast!!)
    • Found a reason for which the CPU could for a long time not to raise the frequency to the maximum, it's all in the file /vendor/etc/thermal-engine.conf
    See samples how to improve situation
    • Compiled with GCC 9.1.0, which gave an increase in performance and speed of the kernel
    • Reworked undervolting, battery lives even longer
    • Added voltage control
    • Maximum CPU frequency is now 2.4GHz
    • EUOC version has a maximum GPU frequency of 750MHz
    • added support for display status for CPU Hotplug & some schedulers
    • all schedulers that have display status support:
    alucard, chill, clarity, cultivation, darkness, electron, impulse, intelliactive, ironactive, nightmare, relaxed, anxiety-iosched and maple-iosched
    • added drivers for few USB-Ethernet adapters
    • added nightmare and dancedance CPU governors
    • updated version with 2.2GHz overclocking
    • removed the patch for hiding the bootloader state (there are more problems than good with it)
    • new settings for a smooth interface in installer (applied for GSI only)
    - DT2W fix for fts_ts [default disabled] (thanks @33bca) * tested on customs and GSIs. for latest maybe need to enable "Handwave gesture" in "Phh Treble Settings" > "Doze features" * #TODO
    - Installer include Magisk preserve #TODO

    << download Pie v5.5 || download Pie v4.4 >>
    << download Oreo v5.5 || download Oreo v4.4 >>

    undervolted (U) lower voltage for decrease overheat. also incredible battery saving
    overclocked (OC) CPU max frequency is 2.4GHz, GPU max frequency is 725MHz
    extra-overclocked (E) GPU max frequency is 750MHz (if you will face with graphical glitches - don't use it!)

    Installations:
    Backup boot.img, /system/lib/modules, /system/usr/keylayout and /vendor/lib/modules folders, /vendor/bin/init.qcom.post_boot.sh file if you want to go back
    Flash Zip file with any TWRP recovery, wipe Dalvik cache, reboot and enjoy ^_^
    Notice: if you have Magisk with modules installed maybe you'll get bootloop.
    If you have Magisk don't need reinstall it after kernel because installer will save Magisk #TODO
    Right way: if you have Magisk and modules - deinstall all. Then flash stock boot.img, then custom kernel, then other stuff like TWRP and Magisk.
    Enough just dirty flashing kernel and then Magisk if you need it. All yours Magisk modules will preserved.

    Issues:
    - DT2W not work for fts_ts touchscreen
    - tell me if find :)




    XDA:DevDB Information
    Butterfly kernel for Xiaomi Mi A2 Lite "daisy"

    Contributors:
    eremitein
    Source Code:
    https://github.com/eremitein/xiaomi_kernel_msm8953_daisy_butterfly

    CREDITS:
    All people, who made good code for this platform


    Version Information
    Status: Stable/Experimental
    Release Date: 2019-04-15 (UTC +0)

    Created: 2019-04-07
    Last Updated: 2019-08-08


    .
    11
    =VARIOUS POWER PROFILES=

    [BATTERY DEEP BACKUP]
    CPU governor: conservative
    CPU max freq: 1804 MHz
    GPU governor: msm-adreno-tz or guardian
    Adreno idler: on
    Tune Boeffla Wakelock Blocker: read this manual
    CPU Hotplug: see attached screenshot
    # Give ~10 minutes SOT per 1% battery while web browsing #

    [NORMAL MODE]
    CPU governor: ondemand / interactive
    CPU max freq: set highest
    GPU governor: msm-adreno-tz or balanced if lagzzs)
    Adreno idler: on
    CPU Hotplug: off
    # Give ~8 minutes SOT per 1% battery while web browsing #

    [PERFORMANCE MODE]
    CPU governor: intelliactive, blue_active or nonconservative
    CPU max freq: set highest
    GPU governor: performance or msm-adreno-plus
    Adreno idler: on
    CPU boost: on
    CPU boost freq: set to 1.84, 2.0 or 2.2GHz
    CPU Hotplug: off
    # Give ~5 minutes SOT per 1% battery while web browsing #


    .
    8
    Kernel updated to v4

    Normal || Normal Undervolted
    OverClocked || OverClocked & Undervolted

    Changelog for Pie legacy v4:

    • WireGuard 0.0.20190601
    • prima WiFi updated to LA.UM.7.6.r1-04800-89xx
    • fix for goodix-fp gestures on stock (thanks to @artyom5613 & [email protected])
    • also in the installer included fix fpc-fp gestures for the customs rom
    now gestures for both fingerprints is are:
    * swipe2right - paste text
    * others like in rom's settings
    (if you not like this - change it in the /system/usr/keylayout/uinput-*.kl)
    • DT2W [off by default] (now it's /proc/touchpanel/wakeup_gesture for both panels) and fixed gcam focus as in the latest commits of Offain;
    • memory optimization;
    • added a couple of governors - xperience & alessa;
    • I/O optimization;
    • battery life optimization;
    • added a block to wakelock from wifi;
    • I returned all frequencies to stock (all even builds without serious experiments, if everything is normal, I'll upload the legacy normal code to the github)

    Overclocking and undervolting changes:
    • GPU max freq now is 725MHz
    • voltage reworked for more stability for all users - slightly increased

    Bugfix: installer reworked to saving SELinux context for init file (2019.06.12)


    BEFORE INSTALL YOU MUST READ THIS and THIS


    .
    8
    Kernel updated (download v2)

    Changelog v2:
    Pie CAF & Prima updated to LA.UM.7.6.r1-04500-89xx.0

    Improved interactive CPU governor (patch from Franco kernel)
    Improved CPU boost and enable it (patch from Franco kernel)
    Reworked conservative and nonconservative CPU governors
    Reworked guardian, balanced and msm-adreno-plus GPU governors
    Kernel installer now also support custom ROMs

    Also have some changes in Power profiles
    6
    @eremitein: pie-legacy breaks fp recognition for new fingers on stock 10.0.7.0. Existing fingers work. From the moment fp recognition broke, I can not use fp for any other rom anymore.

    problems with fp in the 10.0.7.0 base

    i specially using original code from xiaomi for legacy build

    with stock kernel people reported about similar problem too

    try fix from attachment

    .