jkbuha
100+ Head-Fier
- Joined
- Jan 2, 2014
- Posts
- 286
- Likes
- 405
Dear Head-Fi community
Following on from the posts on the dedicated X5iii thread, this is a thread that will solely 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 vanilla 1.2.4 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 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 enhancing 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.
Important - this version *should* also be compatible with Fidelizer 1.2.4. I’ve spoken with the developer and he’s taken the (wise) decision not to de-odex the files in system partition on the basis of sound changes, so there should be ample space to install. Nonetheless, please test and report back.
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 the latest version:
https://bit.ly/FiiOX5iiiV331
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.
Next Steps
As of Version 3.x, the amount of outstanding (tangible) functionality is now limited, and in developing this version it’s become apparent that there is a lot of Android/OS based limitations. Thus I’d like to next focus on building a proper bespoke X5iii custom firmware that best enhances the audio and performance functionality at an OS level as well. I don’t have a depth of knowledge on this, so am now reaching my own (limited) understanding of kernel and Android development, thus I’ll also be creating a specific topic on xda-developers and reddit to reach out for more specific help on the technical aspect; but this topic will still remain active and focused on the audio part.
As always, any queries, comments etc - please shout.
Changelog
=========
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-V2.6-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
As always, any queries, comments etc - please shout.
Following on from the posts on the dedicated X5iii thread, this is a thread that will solely 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 vanilla 1.2.4 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 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 enhancing 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.
Important - this version *should* also be compatible with Fidelizer 1.2.4. I’ve spoken with the developer and he’s taken the (wise) decision not to de-odex the files in system partition on the basis of sound changes, so there should be ample space to install. Nonetheless, please test and report back.
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 the latest version:
https://bit.ly/FiiOX5iiiV331
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.
Next Steps
As of Version 3.x, the amount of outstanding (tangible) functionality is now limited, and in developing this version it’s become apparent that there is a lot of Android/OS based limitations. Thus I’d like to next focus on building a proper bespoke X5iii custom firmware that best enhances the audio and performance functionality at an OS level as well. I don’t have a depth of knowledge on this, so am now reaching my own (limited) understanding of kernel and Android development, thus I’ll also be creating a specific topic on xda-developers and reddit to reach out for more specific help on the technical aspect; but this topic will still remain active and focused on the audio part.
As always, any queries, comments etc - please shout.
Changelog
=========
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-V2.6-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

As always, any queries, comments etc - please shout.
Last edited: