• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[KERNEL] [September 8] Pixel 4 ElementalX 2.04 (Android 11)

Search This thread

blueyes

Senior Member
@flar2 I've been following you for years and have regarded you to be a Google device master so if ok I'd like to pick your brain. I have a Pixel 4xl and all I have issues when plugging in a USB (c) directly to the phone. All but 1 I own and I have a lot says "corrupted" when plugged in. I know their not because they work fine in my computers and also my pixel 2xl. They also mount fine in my 4xl while in TWRP so I've been toying with it and finally found 1 option that works. Setting selinux to permissive. (added a script through the ElementalX app to run at boot). Thought maybe you could enlighten me on why it's doing this and is it ok to run permissive? Ideally I'd like to only run the script automatically when plugging in a USB but I'm not a script master. For context the coral I have is running latest stock Android, rooted with TWRP and of course your kernel. Use and love your kernel manager app so much I've bought it twice (think you had to make changes to it at some point to get it back on the play store) Thanks for your time
 

flar2

Recognized Developer
Jun 11, 2012
18,683
87,597
Southwestern Ontario
elementalx.org
@flar2 I've been following you for years and have regarded you to be a Google device master so if ok I'd like to pick your brain. I have a Pixel 4xl and all I have issues when plugging in a USB (c) directly to the phone. All but 1 I own and I have a lot says "corrupted" when plugged in. I know their not because they work fine in my computers and also my pixel 2xl. They also mount fine in my 4xl while in TWRP so I've been toying with it and finally found 1 option that works. Setting selinux to permissive. (added a script through the ElementalX app to run at boot). Thought maybe you could enlighten me on why it's doing this and is it ok to run permissive? Ideally I'd like to only run the script automatically when plugging in a USB but I'm not a script master. For context the coral I have is running latest stock Android, rooted with TWRP and of course your kernel. Use and love your kernel manager app so much I've bought it twice (think you had to make changes to it at some point to get it back on the play store) Thanks for your time
It's not good to run in permissive mode.

Turn selinux back on, then capture a kernel log while plugging in. You will see some logs showing selinux denials and can then tailor your script to fix the selinux permissions using sepolicy (a utility that comes with Magisk)
 

blueyes

Senior Member
It's not good to run in permissive mode.

Turn selinux back on, then capture a kernel log while plugging in. You will see some logs showing selinux denials and can then tailor your script to fix the selinux permissions using sepolicy (a utility that comes with Magisk)
I plugged it successfully, then using terminal I setenforce back to 1 then reinserted the USB and it indeed showed corrupt seconds after mounting it. Used your app to grab current kernel logs. If you get a minute to look at the logs I'd appreciate it. Until I figure it out I'll just use the terminal to set it to permissive when I need to transfer data via USB.
 

Attachments

  • logs.zip
    255.4 KB · Views: 5

flar2

Recognized Developer
Jun 11, 2012
18,683
87,597
Southwestern Ontario
elementalx.org
I plugged it successfully, then using terminal I setenforce back to 1 then reinserted the USB and it indeed showed corrupt seconds after mounting it. Used your app to grab current kernel logs. If you get a minute to look at the logs I'd appreciate it. Until I figure it out I'll just use the terminal to set it to permissive when I need to transfer data via USB.

I'm not sure what's going on, why busybox is trying to do something, maybe you have an app that's trying to mount he usb?

Anyway, here are the denials after you plugged in the USB, you could use sepolicy command to specifically allow these instead of selinux permissive. But I would just flash without wiping and check your installed apps to see if it can be fixed properly. Perhaps FX file explorer is doing something

Code:
[16586.763869] type=1400 audit(1633754178.269:6800): avc: denied { entrypoint } for comm="Binder:617_3" path="/system/bin/busybox" dev="dm-8" ino=102185 scontext=u:r:blkid_untrusted:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=0
[16586.779806] type=1400 audit(1633754178.282:6801): avc: denied { search } for comm="Thread-33" name="vendor" dev="tmpfs" ino=6005 scontext=u:r:untrusted_app_29:s0:c15,c257,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=nextapp.fx
[16586.781273] type=1400 audit(1633754178.285:6802): avc: denied { write } for comm="Thread-33" name="/" dev="bpf" ino=1 scontext=u:r:untrusted_app_29:s0:c15,c257,c512,c768 tcontext=u:object_r:fs_bpf:s0 tclass=dir permissive=0 app=nextapp.fx
[16586.782141] type=1400 audit(1633754178.285:6803): avc: denied { write } for comm="Thread-33" name="busybox" dev="dm-8" ino=102185 scontext=u:r:untrusted_app_29:s0:c15,c257,c512,c768 tcontext=u:object_r:system_file:s0 tclass=file permissive=0 app=nextapp.fx
 

flar2

Recognized Developer
Jun 11, 2012
18,683
87,597
Southwestern Ontario
elementalx.org
@flar2 when im trying to flash a kernel ( no matter which kernel is)..im getting this error..

unzip: can't open 'Image, 1z4': Read-only file system Unzip failed. Aborting...
Works fine for me on all Pixel devices and all Android versions. Did you choose a directory for storage? Have root? Make sure you don't uninstall the system files app.
 

blueyes

Senior Member
I'm not sure what's going on, why busybox is trying to do something, maybe you have an app that's trying to mount he usb?

Anyway, here are the denials after you plugged in the USB, you could use sepolicy command to specifically allow these instead of selinux permissive. But I would just flash without wiping and check your installed apps to see if it can be fixed properly. Perhaps FX file explorer is doing something

Code:
[16586.763869] type=1400 audit(1633754178.269:6800): avc: denied { entrypoint } for comm="Binder:617_3" path="/system/bin/busybox" dev="dm-8" ino=102185 scontext=u:r:blkid_untrusted:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=0
[16586.779806] type=1400 audit(1633754178.282:6801): avc: denied { search } for comm="Thread-33" name="vendor" dev="tmpfs" ino=6005 scontext=u:r:untrusted_app_29:s0:c15,c257,c512,c768 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir permissive=0 app=nextapp.fx
[16586.781273] type=1400 audit(1633754178.285:6802): avc: denied { write } for comm="Thread-33" name="/" dev="bpf" ino=1 scontext=u:r:untrusted_app_29:s0:c15,c257,c512,c768 tcontext=u:object_r:fs_bpf:s0 tclass=dir permissive=0 app=nextapp.fx
[16586.782141] type=1400 audit(1633754178.285:6803): avc: denied { write } for comm="Thread-33" name="busybox" dev="dm-8" ino=102185 scontext=u:r:untrusted_app_29:s0:c15,c257,c512,c768 tcontext=u:object_r:system_file:s0 tclass=file permissive=0 app=nextapp.fx
FX is doing something it doesn't do on the 2xl, it's showing BusyBox as if it were a filesystem (only while permissive). I disabled FX (froze it) but still shows corrupted (while enforcing but mounts successfully with permissive). Grabbed screencaps of FX and System storage with enforcing vs permissive. As well as fresh log. Honestly baffled now. The TWRP file manager has no issues mounting. Anyway gonna look at it more later just wanted to thank you for your time and insight.
 

Attachments

  • screenshots_log.zip
    1.3 MB · Views: 2

beeshyams

Senior Member
Dec 29, 2014
1,612
548
Bangalore
@flar2 running your kernel on Pixel 4a stable Android.. All fine so far 👍(though it's been just a day)

A request, can you please also publish on the app the kernel and ROM relation/compatibility ? Similar to what you now have for beta versions.

Reason being, I don't update on a monthly basis and therefore don't know if the latest kernel would work on older stock ROM.

I faced this problem while on Android 11
TIA
 

flar2

Recognized Developer
Jun 11, 2012
18,683
87,597
Southwestern Ontario
elementalx.org
@flar2 running your kernel on Pixel 4a stable Android.. All fine so far 👍(though it's been just a day)

A request, can you please also publish on the app the kernel and ROM relation/compatibility ? Similar to what you now have for beta versions.

Reason being, I don't update on a monthly basis and therefore don't know if the latest kernel would work on older stock ROM.

I faced this problem while on Android 11
TIA

It's rare that the kernel breaks compatibility on pixel devices. I make a note of it on the changelog screen in EXKM when that happens.
 
  • Like
Reactions: beeshyams

beeshyams

Senior Member
Dec 29, 2014
1,612
548
Bangalore
@flar2

Pixel 4a,Android 12 running your kernel

I noticed that battery idle mode is supported 👍👍👍

Wondering if it's in the original kernel (it wasn't supported in Android 11) or your addition (which you were not in favor in past when requested)?

Thanks
 

beeshyams

Senior Member
Dec 29, 2014
1,612
548
Bangalore
@flar2

Pixel 4a,Android 12 running your kernel

I noticed that battery idle mode is supported 👍👍👍

Wondering if it's in the original kernel (or wasn't in Android 11) or your addition (which you were not in favor in past when requested)?

Edit: Sharing unrelated point
Power save gets switched off on it's own. No user intervention to disable. Please look into it (notification enabled)

Thanks
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Did you figure out how to install this kernel with EX Kernel Manager? I am getting the same error.
    Do you have the latest Magisk? Remove any Magisk modules and make sure you've chosen a storage directory in EXKM.
    1
    Did you figure out how to install this kernel with EX Kernel Manager? I am getting the same error.
    I got same error with Magisk-Alpha, and solved with Magisk-Stable(maybe beta/canary are OK too)
  • 45
    ElementalX Kernel
    for Pixel 4 and 4XL
    p3890301369-11.jpg


    ElementalX is designed for maximum stability. It is made for people who depend on their phone every day.


    Features:
    -Optimized for performance and battery life
    -Advanced color control (RGB, hue, saturation, contrast, value, K-Lapse)
    -Wake gestures (S2W & DT2W)
    -Sweep2sleep
    -Block wakelocks
    -direct HBM
    -CFQ, noop, deadline, FIOPS, SIO, maple and zen i/o schedulers
    -Adrenoboost option
    -Option to disable fsync
    -WireGuard support
    -Pass SafetyNet (with Magisk)

    Installation
    1. Flash in TWRP recovery or flash directly in EX Kernel Manager



    Notes

    Stay up to date with EX Kernel Manager. The latest security updates are always available through the app, usually within hours of the latest OTA. EXKM can be used to configure settings, backup and flash zips and img files, run scripts and install kernel updates quickly and easily. EXKM is compatible with all devices and kernels and is the best supported and most complete kernel manager available.

    Sweep2wake/doubletap2wake will show no deep sleep. This is cosmetic only, it won't drain additional battery and is nothing to worry about..


    Downloads


    Android 11
    ElementalX-P4-2.04


    Android 10
    ElementalX-P4-1.09



    Source code:
    Github







    .


    XDA:DevDB Information
    ElementalX P4, Kernel for the Google Pixel 4 XL

    Contributors
    flar2
    Source Code: https://github.com/flar2/Pixel-4

    Kernel Special Features:

    Version Information
    Status: Stable

    Created 2020-02-06
    Last Updated 2020-09-08
    12
    Looks like no kernel update is necessary for July, continue using version 1.08
    11
    FYI... I went ahead and flashed 1.08. Not seeing any issues. All is well.

    There were a couple of very minor changes, it's fine to use 1.08. I am uploading 1.09 soon.
    9
    @flar2 wondering if you have a working rooted kernel for DP2? Thanks.

    No, I haven't built a kernel for the preview yet. I will look into it soon.
    9
    Some of you may remember a few years ago I had an app called Wake Gestures. It stopped working and I never got around to fixing it, but I left the wake gestures function in most of my kernels. Good news for those who liked that app, I've added support for Wake Gestures to Button Mapper and it is supported on the Pixel 4 as well as almost every other phone with sweep2wake built into the kernel (root is required)

    Wake Gestures allows you to set an action for a swipe in any direction or a double tap, while the screen is off. The actions can be anything from basic stuff like toggling the flashlight or wifi, to broadcasting custom intents or executing root commands. Lots of possibilities.

    You need version 1.45 of Button Mapper, which is only on XDA Labs for now:
    https://labs.xda-developers.com/store/app/flar2.homebutton


    PS: Button Mapper also allows remapping of Active Edge and Motion Sense