[KERNEL] Butterfly for daisy

Search This thread

eremitein

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

Captain_Hungary

Senior Member
Nov 14, 2013
231
132
Budapest
Redmi Note 9 Pro
Thank you. I have a backup of the stock boot.img, /system & /vendor folders respectively. Is it possible for me to just replace the files replaced by the kernel by pasting it in "/" using such File explorers?

No, you can't. boot, vendor and system are on different partitions. You can use "fastboot flash..." command from a computer, or maybe, if you have twrp, you might be able to to restore those partitions from a backup (but I haven't tried it)
 

eremitein

Senior Member
May 16, 2017
1,178
1,520
Xiaomi Mi A2 Lite
Thank you. I have a backup of the stock boot.img, /system & /vendor folders respectively. Is it possible for me to just replace the files replaced by the kernel by pasting it in "/" using such File explorers?

you can try, but you need proper backup/restore method (preserve all permissions & selinux context)

so better and cleaner way is restoring whole stock images

anyway i don't care about stock and OTA, because not using it and didn't test
 

Niroshft

Senior Member
Oct 30, 2016
191
49
Wadduwa
I just installed "Butterfly-daisy-20190824-Pie-v5.5+". Oh my gosh, it works like magic. My phone was killing every app & when I switch between & it was reloading every time. Now it's fixed like magic. :D:D:D
I'm using AOSiP ROM..
 
  • Like
Reactions: HeyImVitor

eremitein

Senior Member
May 16, 2017
1,178
1,520
Xiaomi Mi A2 Lite
  • Like
Reactions: hacker812c

neosickle

Member
Feb 23, 2017
33
2
Sorry but I am a noob in flashing kernels. It's my first time to flash a kernel. After I flashed it in AOSPEx, my wifi won't work anymore. What seems to be the problem?
 

adriakus

Senior Member
Dec 26, 2015
110
33
I have another noob question. Is it possible to keep the zip files in the device (sd) and flash them whenever needed?
I'll explain. For example, if I need to be away from a reliable electricity source for longer than normal (talking about days), I can just flash the underclock zip to make the battery last longer, and flash the default version as soon as I get back to civilization. The same goes if a I need extra cpu power for whatever reason. Flash the overclock and unleash the beast. Then, get back home and flash the default again fue everyday use.
Flashing kernels doesn't make me change boot partition (a/b) not anything, right? (just like old times, when flashing was straightforward).
Does this sound right? Just asking for the possibilities.
 

romulocarlos

Senior Member
Oct 10, 2011
552
153
Belo Horizonte
I have another noob question. Is it possible to keep the zip files in the device (sd) and flash them whenever needed?
I'll explain. For example, if I need to be away from a reliable electricity source for longer than normal (talking about days), I can just flash the underclock zip to make the battery last longer, and flash the default version as soon as I get back to civilization. The same goes if a I need extra cpu power for whatever reason. Flash the overclock and unleash the beast. Then, get back home and flash the default again fue everyday use.
Flashing kernels doesn't make me change boot partition (a/b) not anything, right? (just like old times, when flashing was straightforward).
Does this sound right? Just asking for the possibilities.

In my opinion, an easier option is install "Kernel Auditor". With this app you can change kernel settings for battery or performance as you need.

Another option is buy a battery pack.
 

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 & Broomber@4pda)
    • 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

    .