[KERNEL] FiiO X5iii custom kernel (RK3188) | 2016MHz | ZRAM | ZCACHE | AROMA

Search This thread

Techguy777

Senior Member
If anyone has the first firmware the fiio came on or a copy of the boot img aka kernel in a backup I would take that to. We might be able to get magisk to work maybe I think its not true but im willing to try. 1.0.9 firmware has been removed from the fiio site and no one has a copy there rumours that the early kernel can be rooted with magisk but we need a copy so if anyone can help out please do thank you. If we get magisk running it would be possible to systemless get viper to work system wide. That doesnt mean it'll work with Fiio stock sound though it might just sound the same as a phone with viper because thats what it does with bluetooth but bluetooth isnt setup like headphones on the fiio the bluetooth always sound the same in my opinion. Im over the codecs they dont sound any different I havent tried LDAC though. No bs either I dont want some kid to come on here and say I got it and it worked but im not going to give you the kernel cause we know your lying and I hear that every day on XDA because if anyone did do it they would be bragging they figured it out.
 

Techguy777

Senior Member
A heads up guys this kernel will not work if you go over 1400mhz. It will freeze and lock up everytime. Its not very safe and if I was you I would do what I do and stay on stock. This isnt a game you can hard brick your device with bad software. But most likely you end up with hours of restoring just to have it happen again. I can appreciate the effort but this is not new he knows it messes up and he blames it on your device being poor quality. It happens to everyone dont listen your device is fine. THanks anyway though love the effort.
 

straubreyyy

New member
Dec 19, 2019
1
1
Thanks for your work! My x5iii has drastically improved! However, I do have some questions. Is this an overclock? Is this something that's considered harmful over long periods of time? Also, I followed your instructions by first installing twrp and installing the custom kernel via bootloader mode. How do I install fidelizer? Do I just follow the standard steps? Thanks!
 
  • Like
Reactions: jkbuha

jkbuha

Member
May 31, 2009
47
23
Thanks for your work! My x5iii has drastically improved! However, I do have some questions. Is this an overclock? Is this something that's considered harmful over long periods of time? Also, I followed your instructions by first installing twrp and installing the custom kernel via bootloader mode. How do I install fidelizer? Do I just follow the standard steps? Thanks!

Thanks! So a few points:

RK3188's have a default clockspeed of 1800MHz. However the actual proper clockspeed for the FiiO will depend on the other passive components on the board. FiiO downclocked the max speed to 1416MHz however I've found that quite a good range of these players support clockspeeds of 1704 and even 2016 (some can get even higher but they are very rare to find).

Fidelizer is easy to install - the developer has created a great update.img that you can install just using the normal FiiO windows tool. However you'll probably need to reinstall twrp and my kernel again on top of fidelizer. I don't recall if the latest version (1.2.5) overwrites all partitions but let me know if so!
 
  • Like
Reactions: mi_reiche

randytsuch

Member
Sep 25, 2018
9
2
This sw works great for me, so I want to say thanks for it.

It improved responsiveness for me, I was thinking about selling my X5, but after installing this sw I decided to keep the X5 for now.

I did have one question.
I'm using bluetooth, and when I'm out walking I get a lot of glitches with bluetooth in aptX.
Was wondering if there is anyway to turn off aptX?

I enabled developer mode, but there are no bluetooth options that I could see there.

Thanks
Randy
 
  • Like
Reactions: jkbuha

jkbuha

Member
May 31, 2009
47
23
This sw works great for me, so I want to say thanks for it.

It improved responsiveness for me, I was thinking about selling my X5, but after installing this sw I decided to keep the X5 for now.

I did have one question.
I'm using bluetooth, and when I'm out walking I get a lot of glitches with bluetooth in aptX.
Was wondering if there is anyway to turn off aptX?

I enabled developer mode, but there are no bluetooth options that I could see there.

Thanks
Randy

Sorry only got to read this now, don't have notifications on XDA for some reason.

Unfortunately I don't know of any way to switch off aptX (and/or replace it with a lower-bandwidth codec). However, I've also noticed that the X5iii WiFi/blueooth antenna is poorly designed (very low gain and high attenuation) and I've found the best way is to minimise distance between the headphones and player outdoors due to lower path reflection. So the best solution is to keep the player in an upper jacket pocket (not waist or trouser unfortunately). The type of headset (specifically the size of antenna) also helps - eg: my Sony 1000XM3 has much better range than my 1More true wireless.

Hope this helps :)
 

randytsuch

Member
Sep 25, 2018
9
2
Sorry only got to read this now, don't have notifications on XDA for some reason.

Unfortunately I don't know of any way to switch off aptX (and/or replace it with a lower-bandwidth codec). However, I've also noticed that the X5iii WiFi/blueooth antenna is poorly designed (very low gain and high attenuation) and I've found the best way is to minimise distance between the headphones and player outdoors due to lower path reflection. So the best solution is to keep the player in an upper jacket pocket (not waist or trouser unfortunately). The type of headset (specifically the size of antenna) also helps - eg: my Sony 1000XM3 has much better range than my 1More true wireless.

Hope this helps :)
No problem with the delay, my response is kind of delayed too lol.
That does help, jacket I walk in doesn't have upper pockets but I bought an armband which will be more convenient to use my X5 will walking. Your response made me go and buy one, so thanks.
 

bmueller

New member
Feb 16, 2020
1
0
Playback speed skipping

First off, thanks for doing this. Truly awesome stuff here.

After running the new kernel/Fidelizer ROM for a few days, one issue in particular has made things totally unusable. When attempting to adjust audio playback speed for podcasts in Antennapod, the sound begins to freeze constantly at anything higher than 1.25x speed (and even there it occasionally skips). I've tried other apps, firmware versions, both the stock and Fidelizer ROM, kernel speeds, etc. and the issue still persists no matter what. I'm a software developer by day but not overly experienced with Android (though I daily drive Debian) so if you need any logs or have an idea of where to start, I'll do my best to help.

Thanks!
 

jkbuha

Member
May 31, 2009
47
23
First off, thanks for doing this. Truly awesome stuff here.

After running the new kernel/Fidelizer ROM for a few days, one issue in particular has made things totally unusable. When attempting to adjust audio playback speed for podcasts in Antennapod, the sound begins to freeze constantly at anything higher than 1.25x speed (and even there it occasionally skips). I've tried other apps, firmware versions, both the stock and Fidelizer ROM, kernel speeds, etc. and the issue still persists no matter what. I'm a software developer by day but not overly experienced with Android (though I daily drive Debian) so if you need any logs or have an idea of where to start, I'll do my best to help.

Thanks!

Interesting - hadn't seen this before. But I suspect it could be linked to a Tidal MQ bug I found on v3.4x.

Could you try the following:

1) See if the issue persists in kernel v3.32
2) If it works, could you give me a dump (both dmesg and adb logcat) when the issue occurs in kernel v3.4x?
 
  • Like
Reactions: mi_reiche

mi_reiche

New member
Sep 12, 2019
1
1
Interesting - hadn't seen this before. But I suspect it could be linked to a Tidal MQ bug I found on v3.4x.

Could you try the following:

1) See if the issue persists in kernel v3.32
2) If it works, could you give me a dump (both dmesg and adb logcat) when the issue occurs in kernel v3.4x?

Hi,
At very first, thank you so much for all your efforts! I was massively disappointed after I bought an used X5 III but now it’s fun to use.

Moreover, I want to give some feedback on Metall process:
I had the very same install issue when installing the custom kernel on top of Fidelizer reported earlier in this thread. (Installer error 7, reported by Speniopantollor)
However, I could circumvent it by the following: at the end of the faulty process, when you normally would reboot, I quitted the installer and installed the kernel again. On reboot, I got stuck in a bootloop displaying an old „Android“ word logo with some 3D effect animation I haven’t seen otherwise in the usage of the DAP. When forced to reboot into TWRP I started the installer of the kernel again and it went flawlessly and works as intended. I could replicate this behavior after flashing the original Fiio 1.2.5 (not sure about the number, but latest version) firmware for other reasons.

Moreover, I can also confirm I‘m experiencing the Tidal MQ bug on the latest kernel. Referring to the post quoted above, should kernel v3.32 fix the issue?
 
  • Like
Reactions: jkbuha

greigor78

Member
Dec 30, 2007
6
4
I just followed all steps to install newest kernel on my fiio X5 but noticed that after running for a few minutes my device just freezes. Is this normal before the 20 minute reboot time lapse or is the device suppose to run as normal before it reboots? I have tried all 3 kernel versions but I am still noticing the freezing. Any suggestions would be helpful thx.
 

WitzyZed

New member
Apr 17, 2020
2
1
I just followed all steps to install newest kernel on my fiio X5 but noticed that after running for a few minutes my device just freezes. Is this normal before the 20 minute reboot time lapse or is the device suppose to run as normal before it reboots? I have tried all 3 kernel versions but I am still noticing the freezing. Any suggestions would be helpful thx.

Sometimes it can be a problem with low system free space or formatting of microSD cards (exfat recommended over others to avoid freezing). I’d link to the instruction guide I wrote up, but I’m a new member :) was that the one you followed?
 

Sonorix

Member
Jan 8, 2011
13
1
Thanks @jkbuha for your great work on this!

Do you see it as possible to convert this mod for the FiiO X7 and FiiO X7II, this would be awesome.
I don't know how much work it would be, but I still want to ask for it.

Keep up your good work on the kernel.
 
  • Like
Reactions: jkbuha

WitzyZed

New member
Apr 17, 2020
2
1
Thanks @jkbuha for your great work on this!

Do you see it as possible to convert this mod for the FiiO X7 and FiiO X7II, this would be awesome.
I don't know how much work it would be, but I still want to ask for it.

Keep up your good work on the kernel.

I'm pretty sure FiiO only released source code for X5iii, and no other devices. They saw the success of this project as a threat to new device sales, and didn't continue to release any other devices' source code, old or current.
 
  • Like
Reactions: Projjwal Dhar

jkbuha

Member
May 31, 2009
47
23
I'm pretty sure FiiO only released source code for X5iii, and no other devices. They saw the success of this project as a threat to new device sales, and didn't continue to release any other devices' source code, old or current.

Unfortunately, that seems to be the case. Any subsequent FiiO players (X7, M5, M9, M11) seem to have incomplete source code. For example the X7 code is missing the source for the ESS DAC which we can all agree is necessary for the proper functioning of the player.

Our only hope is that someone smarter than me can figure out the gaps in the code and compile a fully working kernel for the players. It's stopped me personally from buying the M11Pro...
 
  • Like
Reactions: Projjwal Dhar

gulebagali

New member
Apr 18, 2015
1
0
Songpal dosent detect music from sdcard

After kernel install fiio music player crashed I installed new by downloaded from website, now it's working fine
But I always use to play from Sony music center, I installed that one also but it is not detecting songs from sd card please help me in this
 

szyx

Member
Feb 13, 2019
9
2
jkbuha Can you please tell me which file edit to overclock rockchip cpu? I want to overclock RK3318, i think the process is the same...
 

mclaudio

Senior Member
Feb 12, 2010
1,082
69
Caldas da Rainha
hello !
congrats for your work.
i have Fiio M9 wich is great but too slow. your kernel seems great. would it be possible to make some improvements? thank you so much
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Dear xda community

    Following on from the work done to date in the active community in the head-fi.org forum, I have decided to post this work on xda to share the work done so far and, well, also elicit help from the best technical community I've spoken to in the past. This thread will solely focus on the RK3188-based FiiO X5iii player, and will thus contain any and all software modifications to the FiiO X5iii. The custom kernel contains the largest amount of new code, extra features and performance improvements for the X5, and really pushes the limits of the hardware to its fullest potential. The benchmarks alone are outstanding - using Geekbench and Antutu the performance is more than 400% that of the current vanilla firmware, and it will similarly feel more intuitive and responsive, as can be attested by the numerous users to date.

    As of Version 3.x, audio tuning is also taken one step further. A new custom AK4490 driver has been implemented, and a significant portion of the redundant and/or unnecessary code has been removed from the sound drivers. Therefore, if not better, the sound should at least feel ‘cleaner’ when compared with previous or vanilla versions. We still have a long way to go to enhance the audio on these DACs, but this driver is a start.

    Installation instructions are outlined further below; ie flash via TWRP, but first-time users can also find a more detailed set of instructions in the zip file.

    There are three versions - the 2GHz version for faster CPUs, the 1.7GHz for most players, and the 1.4GHz version for anyone experiencing random lockups or reboots.

    Unique Features
    - Custom AK4490 DAC driver (faster, better oversampling)
    - Support for DSD256
    - Increased clock speed from 1416MHz to 2016MHz
    - Increased GPU speed from 133MHz to 600MHz
    - Increased DDR speed from 200MHz to 800MHz
    - Better voltage regulation using all possible pwm and clocks on the board
    - Increased available RAM by 20%
    - LZ4 compression for better, faster swap and virtual memory usage
    - ZRAM usage for additional system memory
    - Fsync_disable for much faster system processing
    - UKSM for faster Kernel operations
    - Adaptive-LMK for better memory management
    - Undervolting for lower heat dissipation and battery consumption
    - New Faster CPU Governors: interactiveX, PegasusQ,
    - New Faster I/O Schedulers: zen, bfq, sio, vr, maple
    - New Faster Westwood TCP/IP congestion handler for faster wifi and internet access
    - CPUBoost algorithm for faster on-demand processing
    - CPU SMP feature for powering down unused cores on screen off
    - RQ Affinity for faster I/O scheduling
    - Linaro gcc toolkit for faster, leaner code
    - RK3188 neon vfp3 code optimisation for faster fixed-point and floating DSP operation
    - Full init.d support for script runtime loading
    - Frandom genrator (23x faster than standard random function)

    Download here: https://kernelmods.com

    Thanks and Rants

    Massive thanks to prispewnic from 4PDA for his incredible scripting experience, product features, suggestions and testing, and the great community of beta testers on Head-Fi and 4PDA.

    Thanks also to Fiio for releasing the GPL source code. If it weren’t for you we wouldn’t have this modded kernel.

    Changelog

    Version 3.32
    Fix: Minor AROMA Bugfixes
    Enhanced: Updated hosts file - 137409 exceptions for no spamware, faster browsing
    AROMA: expanded list for players automatic download

    Version 3.31
    Fix: Reverted Page writeback tweaks (caused random reboots)
    Fix: Minor AROMA fixes

    Version 3.3
    New: Enabled ARM ARCH_POWER feature
    New: Disabled Gentle_Fair_Sleepers (much faster)
    New: Enabled cache wakeup preemption
    New: Forced memory overcommit for better performance
    New: Ignore all ICMP echo requests
    New: Enable TCP low latency
    New: Removed noatime and nodiratime to improve ext4 and sys filesystem performance (much faster)
    New: Added asynchronous filesystem calls (much faster)
    New: Enable TCP reuse read mostly algorithm
    New: Enable TCP sysctl recycle algorithm
    New: Disable TCP slow start after idle
    Enhanced: Optimised SLUB memory allocator
    Enhanced: Reduced Mini Memory Map to from 32k to 0
    Enhanced: Reduced Max Block Dev size from 128 to 32
    Enhanced: Increased Max Queue length from 128 to 1024
    Enhanced: Tuned kernel fair scheduler workload parameters
    Enhanced: Increased memory threshold compaction from 500 to 800
    Enhanced: Reduced dirty write back interval
    Enhanced: Increased sysctl read interval for reduced latency
    Enhanced: Optimise TCP sack/fack/dsack read requests
    Enhanced: Optimise TCP memory pressure
    Enhanced: Optimise TCP proto packet length algorithm

    Version 3.2
    New : Added RCU Synchronization Mechanism (much faster)
    New : Optimised RCU Settings
    New : Added s2idle S0 state (better battery lifetime)
    Enhanced: Voltage optimisation for 2016MHz kernel
    Enhanced: Updated hosts file - 135385 exceptions for no spamware, faster browsing
    Fix: Minor Bugfixes
    AROMA: Added "Restore" section
    AROMA: Added "Support the Project" section
    AROMA: Reworked logic and scripts

    Version 3.11

    Miscellaneous bugfixes

    Version 3.1

    Single installer for all kernel versions
    New optimised voltages for 1416, 1704 and 2016 kernels (more stable and better performance)
    Customisable removal of unwanted system applications
    Customisable removal of system equalizer
    Customising different audio_flinger libraries (different sound profiles to suit taste)
    Enable/Disable Boot-up animation
    Enable/Disable custom application on bootup

    Version 3.02

    New: 1704MHz release for players that can work at higher frequencies than 1416MHz (install this version if you previously had reboots at 2016MHz)
    Enhanced: Increased stability without performance decrease
    Enhanced: CPU down-volting for performance kernel version (2016MHz)
    Fix: Removed additional CPU frequencies for 1416MHz kernel version (increased stability)

    Version 3.01

    New: 1752MHz intermediary version
    Enhanced: More step frequencies from 504 to 2016MHz
    Enhanced: Better handling of frequencies at high CPU loads
    Enhanced: Powersave governor enabled by default

    Version 3.0

    New: Upstreamed relevant portions of kernel source code to Linux 3.10.49
    New: AdFree hosts file - 67825 exceptions for no spamware, faster browsing
    New: Support for DSD256
    New: CPU Boost algorithm to increase frequency on screen touch
    New: RQ Affinity for faster I/O scheduling
    New: CPU SMP feature for faster processing
    New: PegasusQ CPU governor
    New: Improved interactiveX governor with increased performance and more power saving on idle (2 core shutdown)
    New: Custom AK4490 driver with up to 768kHz oversampling
    New: Custom plugin module for AK4490 to add more audio filters in future
    New: CPU Maximum overclocking to 2016MHz! (Super significant performance improvement)
    New: Current CPU frequency 1896MHz (Significant performance improvement and good stability)
    New: GPU overclocking to 500MHz (More fluid screen responsiveness)
    New: DDR overclocking to 720MHz (Ultra-fast memory and software processing)
    New: Reduced Graphics requirements from 225MB down to 80MB (20% more available RAM)
    New: Adaptive Low Memory Killer (A-LMK) algorithm
    New: A-LMK optimised scripting (thanks again to prispewnic)
    New: Compaction algorithm for low memory killer
    New: FiiO RK3188/RK3188T efuse algorithm handling
    New: VM Pressure algorithm implementation
    Enhanced: zram and zcache now compressed with LZ4
    Enhanced: better voltage regulation code
    Enhanced: support for apll, cpll and gpll clocks on RK30 board
    Enhanced: better GPIO code specific to FiiO player
    Enhanced: removed unnecessary encryption
    Enhanced: lowered minimum screen brightness for better battery lifetime

    Version 2.8
    Performance Build

    New: Disabled CRC checking in all kernel code (significant performance improvement)
    New: Optimised compilation parameters (-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer)
    New: Fine-tuned kernel optimisation for RK3188 (-mtune=cortex-a9)
    New: Optimised ARM RWSEM algorithm

    Version 2.7

    New: Redesigned Busybox installer
    New: Redesigned Permissive SE Linux installer
    New: Kernel version now displayed in settings
    Fix: Corrections to anyone who was not seeing the msg "Kernel optimisation Ready" prompt

    Version 2.6

    New: UKSM instead of KSM (much faster)
    New: ZRAM (more RAM)
    New: fsync_disable (much, much faster)
    New: ROW I/O scheduler for SD cards (much faster)
    New: LZ4 Compression instead of LZO (faster, more compression)
    New: zsmalloc implementation instead of xsmalloc
    New: zcache enabling (faster)
    New: ARM RSEM implementation (faster)
    New: frandom generator instead of random (much, much faster)
    New: MSG pop-up notification daemon
    Fix: Lowered voltage for some FiiO players with lower-grade VCOs
    Fix: Corrected git file dependencies
    Fix: Disabled system animation by default

    Version 2.5

    New: Increased max clock speed to 1752MHz (faster)
    New: BFQ I/O scheduler (faster)
    New: Westwood TCP/IP congestion protocol (much faster)
    New: InteractiveX governor (much, much, much faster)
    Fix: Stability checks to voltage
    Fix: iX handling changes

    Version 2.4

    New: Maple I/O Scheduler (faster)
    New: init.d full support (much, much faster)
    New: init.d scripts (thanks prispewnic @ 4PDA)

    Version 2.3

    New: Zen I/O scheduler (much faster)

    Version 2.2

    Fix: Changes to scheduler priorities during screen off (faster)

    Version 2.1

    New: Additional GPU and DDR overclocking (much, much faster)

    Version 1.4

    New: Update to Linaro gcc 4.9.4 (significantly much faster)

    Version 1.3

    New: SIO I/O scheduler (faster)
    New: VR I/O scheduler (faster)
    New: CPU clock to 1704MHz (much, much faster)

    Version 1.2

    New: Additional voltage optimisation and DDR overclocking

    Version 1.1

    New: GPIO optimisation and documentation
    New: CPU clock to 1518MHz (faster)

    Version 1.0

    Initial system release and branch-off from FiiO GPL code

    Installation instructions

    1) Windows and/or first-time users

    If you already have TWRP or a previous version of my kernel, go to step 2.

    a) If you don't yet have TWRP and/or any previous version of my kernel yet, download the Windows-based loader here and unzip to a folder

    https://www.androidfilehost.com/?fid=1395089523397899882
    (note: you need to have the FiiO USB Windows drivers correctly installed)

    b) Run the AndroidTool.exe program and connect the FiiO via USB.

    c) Put the player in bootloader mode (just as if you were going to upgrade the player the traditional FiiO way with the Windows based loader), by pressing power+pause+back.

    d) If all goes well you should see the green light with 'Found One Loader Device'. Make sure 'boot' and 'recovery_twrp' are selected and press Run. Once done, click the 'Advanced Function' tab and click Reset Device. You should have the new kernel and TWRP installed!

    2) TWRP users

    a) Download the latest version of the kernel (with new optimisation scripts) above and push to sdcard
    b) Reboot to TWRP recovery
    c) Install -> FiiO-X5iii-jkbuha-V3.1-TWRP.zip
    d) Wipe kernel and dalvik cache

    e) Reboot

    f) IMPORTANT: leave running for new scripts to do their magic (you will be prompted to reboot)

    g) Reboot

    h) Enjoy :)

    Any queries, comments etc - please shout :)
    2
    Thanks for the feedback. Yes - reverting to v3.32 solves the Tidal MQ issue. Am working on v3.5 which will fix this bug.


    Sent from my iPad using Tapatalk
    1
    hello

    thanks for this release. very useful
    1
    Thanks a lot for your work, jkbuha. Some friends also have the Fiio X5 iii and they all use your Kernel now. The Player is much smoother and faster.
    I use the 1704 MHz version. For me its the best compromise of speed and battery lifetime.
    With the 2016 MHz version my player gets very hot. Does your player also generate so much heat with this version?
    1
    Thats a placebo effect the kernel is pretty much stock. Its great he got twrp made because Ive talked to developers and they couldnt make it either. So I dont understand how. If you want better performance freeze google play services and the player will actually work way better. The fiio sucks I hate it Im so disgusted ill never buy fiio again its got about 10 dollar phone specs.

    I believe twrp 3.3.1 and up would root with magisk though thats what we need.

    I'm not going to enter once again into a year-old debate on whether my kernel is better or not than stock. There's the geekbench score differences, the ongoing users of my kernel on this forum and others that can attest to whether my kernel is just a placebo or not. As I've said before, my kernel is free and open source for a reason: you can use it, not pay anything for it, and it's up to you whether you continue using it or not.

    I do agree with you on two things, however:

    1) TWRP was the gamechanger, and porting it to the FiiO X5iii was a real pain in the butt. It was a nonstandard process and even now I'm not sure whether all the functionality is correct. I won't however be able to compile TWRP 3.3.1.x and above as it's lacking some important build elements - I tried a year ago and didn't manage.

    2) FiiO does a really poor job of wrapping (great) DACs around poor electronics. 1GB RAM for such a player is abysmal even for Android 5.1.1. And that's before we talk about the passive circuity (solid state devices et al) which really could be designed in a much better RF- and harmonics- based approach.

    As things stand I'm not really developing this kernel anymore unless there are a few serious issues with it. The main reason is that I'm not really using the X5iii as a daily player at the moment. I reached out to FiiO recently to see if they were willing to publish all the source code for the M9 and M11Pro, but they kindly declined - which I guess shows their real attitude towards full open source.