Development [KERNEL] [blu_spark r103 OP9/Pro] [A11 OOS/A12 Custom]

Search This thread

break.cold

Senior Member
Jun 25, 2014
299
98
nope I'm just restoring my device on stag OS

Yeah, It took me couple of hour of experiment in getting spark kernel to get it working, because it keep sending me back to fastboot menu even on LOS 28 June update. I installed it through Fk manager, it sent me to fastboot menu even though I flashed every img files. Then I adb sideload copy.zip after flashing LOS rom and Gapps, reboot to system and reboot to recovery to flash magisk and reboot to system again and then reboot to recovery and then use LOS recovery to flash spark kernel successfully.
 

xontax

Senior Member
Dec 17, 2011
246
46
FKM worked for me with the attached script right away. I copy.zip prior to the rom upgrade so cant judge on that
 

eng.stk

Senior Member
Mar 29, 2011
7,128
60,668
OnePlus 5T
OnePlus 6
I got it to flash and reboot no problem, on latest StagOS. But yest I went thru several different ROMs and sometimes I could flash BluSpark no problem and sometimes no matter if I had flashed it the last time I was on "said ROM" but this time it's wld not boot no matter what I did. I think maybe the problem is, if ur on a ROM w/BluSpark, if u switch ROMs if u don't reflash stock dtbo, vendor_boot, and boot imgs for "said" rom b4 and switching roms that is the problem that keeps u from flashing kernal after switching roms. So now I reflash those imgs, reboot into stock rom(no root, no kernal) then back to BL and then flash the 3 imgs to go into recovery to go to different rom(lol) then once set up and rooted I can flash BluSpark fine.. I am not sure.... 🤔

Edit/update

Ok, so testing my theory, I went from having StagOS on slotA(I restored dtbo, vendor_boot and boot) and then rebooted, went to BL, flashed new imgs for SparkOS, went to recovery, wiped and adb sideload the new ROM.. after setting up and rooting I attempted to flash BluSpark. I was on slotB, also I had went from one ROM on slotA and now different one on slotB. Forced to fastboot.. I had to reflash Spark imgs, then I went to recovery and adb sideloaded ROM again to get to slotA.. Then I successfully flashed BluSpark!

So for BluSpark to work you either 1) have to be on slotA or 2)u need to have whatever ROM u are on, on both slots..thank you eng.stk for great kernal!! Maybe u can confirm/deny my theory..
No, it works fine in either slot.
The problem is that sometimes both slots aren't exactly well populated and the installer trusts on certain conditions to successfully work.
Both slots should be on latest and exactly the same A12 firmware from stock ROM previously to install anything.
Both slots should be flashed with working custom ROM.

Partitions to restore are the ones touched: boot, vendor_boot and vbmeta, you can do dtbo also. vendor_dlkm is mandatory to be restored and I think people with issues are missing it (flash only is available via fastbootd, not regular fastboot). MOst of the time device is so fast flashing ROM zips, maybe it's easier to do it like that.
We are used to this stuff on the Pixel and you guys are lucky to have already auto logical partitions processing, avb patching and all that jazz. We didn't in the Pixel 6 series initially and it was ruff during some months.

Device needs to be rebooted after flashing kernel and certain conditions met because vendor_dlkm is a logical partition and for it to be active.
Also kernel shouldn't be flashed after anything that touches any logical partition before a reboot (like flashing a ROM zip, restoring partitions, etc).

In stock ROM there's no vendor_dlkm in place, but most custom ROMs, since they drink from AOSP, should be already using it.
Check the Pixel 6 series forums to read more on this.

Can you flash this via adb sideload instead? (Im unrooted/stock)
While is possible, I don't recommend because of what's above.
Even with all the things apparently working nicely, I ended up with issues when sideloading the kerrnel zips from LOS recovery for instance.
Logical partitions are nice to mod kernel installs in , but a pain to work with.
 
Last edited:

eng.stk

Senior Member
Mar 29, 2011
7,128
60,668
OnePlus 5T
OnePlus 6
If you guys want a nice free and open source app tp flash kernel zips, backup and restore stock partitions and so on, check out Kernel Flasher:

There's the ability to save the kernel flash log to Downloads folder and share it here in case of any hiccups.

It's done by @capntrips , which has been doing quite some work in all this logical partitions/avb stuff we've been talking about, both on AK3 and other mods/solutions.
Highly recommended.
 

1thomas

Member
Dec 28, 2017
16
9
OnePlus 9 Pro
If you guys want a nice free and open source app tp flash kernel zips, backup and restore stock partitions and so on, check out Kernel Flasher:

There's the ability to save the kernel flash log to Downloads folder and share it here in case of any hiccups.

It's done by @capntrips , which has been doing quite some work in all this logical partitions/avb stuff we've been talking about, both on AK3 and other mods/solutions.
Highly recommended.
thanks for that, i tried the r96 version on StagOs with FKM and it kept going to fastboot, it worked perfectly with Kernel Flasher ;)
 
  • Like
Reactions: xontax and eng.stk
Yeah, It took me couple of hour of experiment in getting spark kernel to get it working, because it keep sending me back to fastboot menu even on LOS 28 June update. I installed it through Fk manager, it sent me to fastboot menu even though I flashed every img files. Then I adb sideload copy.zip after flashing LOS rom and Gapps, reboot to system and reboot to recovery to flash magisk and reboot to system again and then reboot to recovery and then use LOS recovery to flash spark kernel successfully.
Can you please describe the steps you made in detail & what copy.zip file? Im in a bootloop altough i restored vendor_boot, dtbo and boot images.
 

break.cold

Senior Member
Jun 25, 2014
299
98
Can you please describe the steps you made in detail & what copy.zip file? Im in a bootloop altough i restored vendor_boot, dtbo and boot images.

It's bit complicated,

Obviously I started with C.48 of OOS stock, I flashed dtbo, vendor_boot and recovery.img files then reboot to recovery.
I flashed copy-partitions-20210323_1922.zip with doing factory wipe/ format.
Then reboot to recovery again, then I did factory and format data, then I flash LOS 28 June rom and then reboot to recovery again and flash Gapps, and again do format data/factory wipe.
Reboot to recovery again then again adb sideload copy-partitions-20210323_1922.zip for LOS to be on both slots just to be sure.
Reboot to recovery but didn't do factory wipe after flashing copy-partitions-20210323_1922.zip second time after flashing LOS and Gapps.
Reboot to system, did system setup. And then reboot to recovery flashed magisk 25.1 file in recovery and reboot to system again.
Again I reboot to recovery flash spark kernel through LOS recovery with adb sideload. Reboot to system. Success...
 
  • Like
Reactions: tathagatab

GreaterLesser

Senior Member
Sep 19, 2014
499
196
Chicago
OnePlus 9 Pro
Still not able to flash this kernel even with the new app. I'm on a LE2127 (TMO OP9P) w/ LOS 19.1 and Magisk 25.1. Everytime I try to flash the kernel, it fails and my phone gets soft-bricked if I reboot. I've been able to recover to stock LOS w/o having to wipe data fortunately. I've flashed C.48 firmware (and the copy partition zip) as well but still fails. I've attached the logs from the kernel flashing app. Thanks.

Edit: I can do a logcat if the app logs aren't sufficient. Thanks.
 

Attachments

  • ak3-log--2022-06-30--18-36.log
    2.7 KB · Views: 12

eng.stk

Senior Member
Mar 29, 2011
7,128
60,668
OnePlus 5T
OnePlus 6
Still not able to flash this kernel even with the new app. I'm on a LE2127 (TMO OP9P) w/ LOS 19.1 and Magisk 25.1. Everytime I try to flash the kernel, it fails and my phone gets soft-bricked if I reboot. I've been able to recover to stock LOS w/o having to wipe data fortunately. I've flashed C.48 firmware (and the copy partition zip) as well but still fails. I've attached the logs from the kernel flashing app. Thanks.

Edit: I can do a logcat if the app logs aren't sufficient. Thanks.
Your super partition is dirty. You probably got it while using that copy partition zip.
Growing partition 0
Not enough space to resize partition

Creating vendor_dlkm_ak3 failed. Aborting...

Also got it after use it a couple times. I advise people to stay away from that zip, it misses some stuff we have in newer devices.

Flash OOS 12 in both slots to get proper fw installed.

Go for regular LOS flash in both slots.

Unpack your LOS zip to get img and flash the logical partitions in fastbootd (NOT fastboot)
do it for slot a AND b

fastboot flash odm_a odm.img
fastboot flash product_a product.img
fastboot flash system_a system.img
fastboot flash system_ext_a system_ext.img
fastboot flash vendor_a vendor.img
fastboot flash vendor_dlkm_a vendor_dlkm.img
 

GreaterLesser

Senior Member
Sep 19, 2014
499
196
Chicago
OnePlus 9 Pro
Your super partition is dirty. You probably got it while using that copy partition zip.


Also got it after use it a couple times. I advise people to stay away from that zip, it misses some stuff we have in newer devices.

Flash OOS 12 in both slots to get proper fw installed.

Go for regular LOS flash in both slots.

Unpack your LOS zip to get img and flash the logical partitions in fastbootd (NOT fastboot)
do it for slot a AND b
Thanks for the info - Works perfectly now.
I'll definitely avoid using that zip in the future.
 

Top Liked Posts

  • 1
    Really? Worked for me on a clean cdroid and op9. Flashed in recovery
    That's interesting, because i get an error, if i try to flash it via EXKM.
    I also did a 100% clean flash of crDroid. I flashed the Firmware for Europe.

    Unpacking ramdisk always fails.

    #update: Seems like you can flash blu_spark on crDroid only via recovery. If you try via EXKM oder FKM it fails and does not boot anymore. I had to reflash dtbo, vendor and boot image again via fastboot to make it work and then i flashed the kernel via recovery without issues.
  • 11
    blu_spark_r99 release (A12 custom)

    New build is up (y)

    I tested with lineage-19.1-20220712-nightly-lemonadep-signed.zip, kernel build may work with other ROMs that use similar device/kernel trees.
    This kernel is tested for the 9 Pro but it's unified, so should work for the OP9 also.

    You can use FKM download kernel feature, just import the links bellow in the app.
    FKM download configs: custom

    In case of derps during flashing, check this first:


    Changelog:
    • ThinLTO build with custom upstream LLVM 14.x (Clang 14.0.5 + LLD linker + IAS)
    • Couple cleanup reverts
    • Fix some build naming and actions
    • For root, Magisk 25.1 or newer is mandatory


    Keep in mind: I will give no active support for custom ROMs (just kidding ;p).
    I am mostly interested on debugging stuff with logs and reproducible steps to replicate the issue.


    No mirrors please
    Don't forget to hit like, it's free :)
    10
    blu_spark_r100 release (A12 custom)

    New build is up (y)

    I tested with lineage-19.1-20220720-nightly-lemonadep-signed.zip, kernel build may work with other ROMs that use similar device/kernel trees.
    This kernel is tested for the 9 Pro but it's unified, so should work for the OP9 also.

    You can use FKM download kernel feature, just import the links bellow in the app.
    FKM download configs: custom

    Don't flash kernel zipright after LOS update and don't use LOS recovery.
    Have the system booted in a clean rooted state, don't flash any zips, reboot, flash kernel zip, reboot.
    In case of derps during flashing, check this first to get system back up running:
    https://forum.xda-developers.com/t/...-pro-a11-oos-a12-custom.4286037/post-87170985
    https://forum.xda-developers.com/t/...-pro-a11-oos-a12-custom.4286037/post-87092451
    https://forum.xda-developers.com/t/...-pro-a11-oos-a12-custom.4286037/post-87098111


    Changelog:
    • Merge lineage-19.1-20220719-nightly kernel updates
    • For root, Magisk 25.1 or newer is mandatory


    Keep in mind: I will give no active support for custom ROMs (just kidding ;p).
    I am mostly interested on debugging stuff with logs and reproducible steps to replicate the issue.


    No mirrors please
    Don't forget to hit like, it's free :)
    8
    blu_spark_r102 release (A12 custom)

    New build is up (y)

    I tested with lineage-19.1-20220726-nightly-lemonadep-signed.zip, kernel build may work with other ROMs that use similar device/kernel trees.
    This kernel is tested for the 9 Pro but it's unified, so should work for the OP9 also.

    You can use FKM download kernel feature, just import the links bellow in the app.
    FKM download configs: custom

    Don't flash kernel zipright after LOS update and don't use LOS recovery.
    Have the system booted in a clean rooted state, don't flash any zips, reboot, flash kernel zip, reboot.
    In case of derps during flashing, check this first to get system back up running:
    https://forum.xda-developers.com/t/...-pro-a11-oos-a12-custom.4286037/post-87170985
    https://forum.xda-developers.com/t/...-pro-a11-oos-a12-custom.4286037/post-87092451
    https://forum.xda-developers.com/t/...-pro-a11-oos-a12-custom.4286037/post-87098111


    Changelog:
    • Merge lineage-19.1-20220726-nightly kernel updates
    • Small rebase and cleanup
    • Flash vendor_dlkm temporary fix
    • AnyKernel3 updates (v20220727)
    • For root, Magisk 25.2 or newer is mandatory


    Keep in mind: I will give no active support for custom ROMs (just kidding ;p).
    I am mostly interested on debugging stuff with logs and reproducible steps to replicate the issue.


    No mirrors please
    Don't forget to hit like, it's free :)
    7
    blu_spark_r103 release (A12 custom)

    New build is up (y)

    I tested with lineage-19.1-20220802-nightly-lemonadep-signed.zip, kernel build may work with other ROMs that use similar device/kernel trees.
    This kernel is tested for the 9 Pro but it's unified, so should work for the OP9 also.

    Don't flash kernel zip right after LOS update and don't use LOS recovery (may work but not recommended).
    Kernel Flasher is recommended to flash this zips and it's easy to get install logs.
    Have the system booted in a clean rooted state, don't flash any zips, reboot, flash kernel zip, reboot.
    In case of derps during flashing, check this first to get system back up running and try again:
    https://forum.xda-developers.com/t/...-pro-a11-oos-a12-custom.4286037/post-87170985
    https://forum.xda-developers.com/t/...-pro-a11-oos-a12-custom.4286037/post-87092451
    https://forum.xda-developers.com/t/...-pro-a11-oos-a12-custom.4286037/post-87098111

    You can use FKM download kernel feature, just import the links bellow in the app.
    FKM download configs: custom


    Changelog:
    • Merge lineage-19.1-20220802-nightly kernel updates
    • AnyKernel3 updates (v20220802) + use lptools resize for vendor_dlkm by @capntrips
    • For root, Magisk 25.2 or newer is mandatory


    Keep in mind: I will give no active support for custom ROMs (just kidding ;p).
    I am mostly interested on debugging stuff with logs and reproducible steps to replicate the issue.


    No mirrors please
    Don't forget to hit like, it's free :)
    6
    With Crdroid based on OOS12 firmware C.61 you can't install this kernel it just out right fails. Hopefully it will be updated soon!
    Changes are needed for C.61 fw, will push a build today or tomorrow when I update my LOS.
  • 80
    DWHxIK

    Kernel features:
    • Build with custom upstream LLVM 14.x (Clang 14.0.5 + LLD linker + IAS)
    • full thinLTO -O2 build with device and target flags enhanced, build improvements and compiler fixes, etc
    • Less is more: stockish OP9 builds based on OnePlusOSS/android_kernel_oneplus_sm8350 for max stability
    • Systemless installer (doesn't touch system/vendor partition, OTA friendly), AnyKernel3 backend (compatible with autoflash apps)
    • Removed some debug and logging options
    • ARM enhanced performance and battery patches
    • CVE security patches, general upstream and CAF fixes for important subsystems
    • Modded schedutil governor merged from latest CAF sm8350 patchset
    • No OC, use 250HZ base timer frequency
    • msm_performance touchboost toggle on/off (enabled by default), tweaked cpu_boost driver
    • Enhanced TCP methods (westwood is default, BBR available), Network tweaks and updated drivers
    • Several I/O control tweaks, advanced filesystems enabled (F2FS, ExFAT, NTFS, CIFS & NFS)
    • ZRAM Swap (4GB LZ4 default) and with file disabled (2 GB storage gain), LZO-RLE and ZSTD are available
    • Vibrator Strength tunable and Gesture Haptic Feedback control (touchpanel and FPR)
    • KGSL fixes and general improvements for GPU driver
    • adrenoboost ready (disabled by default)
    • Backlight min brightness and brightness scaling (custom) option
    • Gamepad support enabled (xbox, ps4, switch)
    • USB2 Fast Charge (USB mode up to 900mA with MTP on)
    • FS fsync toggle on/off
    • Wakelock blockers available
    • wireguard support
    • Compatible with FKM, EXKM, Kernel Adiutor and others


    DOWNLOAD KERNEL ZIP
    FKM download configs: oos | custom
    (No mirrors please)​


    Setup and troubleshoot: To install just flash the zip on a stock setup with either TWRP or autoflash kernel app.
    If you come from other kernel or have any issues, you should restore your stock boot.img/vendor_boot.img or dirty flash your ROM before flashing blu_spark zip to avoid problems. Also uninstall or clean data of any kernel control app you're using.
    If you are upgrading between blu_spark versions, just flash the kernel zip.

    About bugs and reports: don't bother to post if a log isn't ready or without steps so the behavior can be replicated. I only active support stock OOS ROM with NO mods whatsoever (apart from root). That includes NO support if using xposed, Magisk with added modules, etc.
    If you're using custom ROMs (including stock based ones) and OOS Open Betas you're much on your own. I'm mostly interested on debugging stuff in stock and stable OOS.
    Also try not to spam the thread with OT. There's threads for all kind of stuff, use them.

    Going back to stock: This kernel installer doesn't change your filesystem. You can backup your boot.img/vendor_boot.img with TWRP or kernel app before flashing blu_spark if you want to go back to full stock or just dirty flash your full ROM.


    Source Code: https://github.com/engstk/op9
    Don't forget to hit thanks, it's free ;)


    OnePlus 9 Pro development unit donated by OnePlus. Big shouts to them :)
    Very proud for being on the OnePlus Developer Program, special thanks to dev relations team.
    31
    blu_spark_r23 release

    First blu_spark build for the OP9 series is up (y)

    This kernel is tested for the 9 Pro but it's unified, so should work for the OP9 also (need some fixes since code is broken). So backup you boot if you want to test and let me know :)
    Kernel already have some merged goodies and I think I have a good base to work with. For a couple days of work, it's not bad :)
    I'll take a look into more stuff to come, some things in OP are WIP. Stay tuned!

    You can use FKM download kernel feature, just import the links bellow in the app.
    FKM download configs: oos


    Changelog:
    • Build with Google Clang 12.0.5 + LLD linker
    • Synchronize codes for OnePlus 9/Pro Oxygen 11.2.6.6.LE25AA
    • Several build error fixes and quirks handled
    • Compilation improvements an cruf removed
    • Some goodies already merged like filesystem stuff, cpu governor & boost/msm perf, TCP algos, wakelock blocker, vibration and haptic feedback control, gpu adrenoboost, etc
    • All drivers builtin, wifi stack and datarmmnet merged from CAF
    • net/wireguard: merge v1.0.20210424


    Keep in mind: I will give no active support for custom ROMs (including OOS based ones).
    I am mostly interested on debugging stuff in stock stable OOS (with logs and reproducible steps to replicate the issue).


    No mirrors please
    Don't forget to hit thanks, it's free :)
    21
    [Thread Cleaned]

    Good (or perhaps not so good?) day everyone! I've removed a few posts but left the ones that matter: civilized closure of conflict – social media can learn a thing or two from this. As we sit behind our desks and in our couches (or on a plane, even that's a thing nowadays), protected by that anonymity shield, we easily throw our words out into the world. And sometimes we regret them. Unfortunately, we find it so easy to judge one another for that. But facing the fact that we're all just humans that make mistakes, I believe we know that we shouldn't judge so quickly. Now more than ever; kindness should prevail.

    Thank you for your attention and have an energetic day or quiet night in your part of the world. If you need a chat, drop me a line. Just keep our development threads focused on development and mutual respect.

    Cheers!
    Timmy
    Forum Moderator
    17
    blu_spark_r52 release

    New build is up (y)

    This kernel is tested for the 9 Pro but it's unified, so should work for the OP9 also.

    You can use FKM download kernel feature, just import the links bellow in the app.
    FKM download configs: oos


    Changelog:
    • Synchronize codes for OnePlus 9 Oxygen 11.2.10.10
    • f2fs: shrink node_write lock coverage
    • AnyKernel3 updates (v20211215)
    • Couple init runtime adjusts to better UX
    • For root, Magisk 23.0 or higher is mandatory


    Keep in mind: I will give no active support for custom ROMs (including OOS based ones).
    I am mostly interested on debugging stuff in stock stable OOS (with logs and reproducible steps to replicate the issue).


    No mirrors please
    Don't forget to hit thanks, it's free :)
    16
    blu_spark_r54 release

    New build is up (y)
    One last A11 hurrah before stuff start to line up for A12.

    This kernel is tested for the 9 Pro but it's unified, so should work for the OP9 also.

    You can use FKM download kernel feature, just import the links bellow in the app.
    FKM download configs: oos


    Changelog:
    • Build with Google Clang 14.0.1 + LLD linker
    • wakelock blocker updates
    • Couple build reverts
    • AnyKernel3 updates (v20220126)
    • For root, Magisk 24.1 or newer is mandatory


    Keep in mind: I will give no active support for custom ROMs (including OOS based ones).
    I am mostly interested on debugging stuff in stock stable OOS (with logs and reproducible steps to replicate the issue).


    No mirrors please
    Don't forget to hit like, it's free :)