Hi all,
A few interesting updates, initially only for the (software) tech savvy for testing. Hopefully I'll be able to release an easily flashable kernel for everyone soon.
As promised, I've reached out to
@FiiO to request the latest kernel source code for the X5iii as per the GPL, and they have kindly released the code for general use. So after careful review of the code (spoiler alert: there's lots of low hanging fruit), I've created a build environment and compiled the first (basic) optimised kernel for the FiiO X5iii FW 1.2.1.
Features:
- Overclocked CPU from 1416MHz to 1704MHz (buttery smooth UI)
- Overclocked GPU from 400 to 700MHz (more responsive screen)
- Undervolted CPU & GPU (less heat, longer battery life)
- Re-compiled toolset with Linaro toolchain as opposed to GCC (more optimised, leaner meaner kernel)
- More to come soon
Warning/Disclaimer:
i) Whilst this will not brick your player, it is likely to invalidate your warranty. Usual disclaimers apply.
ii) The voltage/clock settings have worked well for my specific RK3188 chip, but can (and will) vary on other chipsets because of the die material. YMMV.
Download
http://www.mediafire.com/file/wjqivdd2y7pbnl2/boot.zip/file
Installation:
Requirements:
- Vanilla X5iii v1.2.1 firmware
- TWRP 2.8.5.0
- rkflashtool (Linux, MacOS preferrably, though you can find the binaries for Windows)
- kernel performance tool, eg: Kernel Adiutor or similar
- patience...
1) Backup existing kernel
1.1) reboot to bootloader (adb reboot bootloader from Windows/MacOS/Linux)
1.2) rkflashtool r boot > boot_backup.img (this is important - it will be your backup boot.img if ever you need to restore)
2) Flash new kernel
2.1) rkflashtool w boot < boot.img
(Don't worry if you get a message saying 'premature end-of-file reached' - it just means that the new kernel is smaller than the old one. Which is a Good Thing.)
2.2) Reboot: rkflashtool b
3) On first boot, reboot to TWRP (adb reboot recovery)
3.1) Wipe-> Advanced Wipe _> wipe only kernel and dalvik partition
3.2) Reboot
4) Enjoy!
Troubleshooting
If for whatever reason the player doesn't boot or you wish to return to previous firmware:
i) Unplug USB cable
ii) Press Power button for 30+ seconds until blue power button turns off
iii) Press and hold Previous + Power button for 30 seconds until player turns on and boots to TWRP
iv) adb push boot_backup.img /sdcard/
v) Install -> images -> boot_backup.img -> Boot
vi) Flash and boot back to previous kernel
Observations/Tips
i) For those of you who have complained that media search times are poor, there's a reason why. The default scheduler is cfq, which is a fair-balanced scheduler but performs poorly with large media folders. If you have root and/or flashed my test kernel, select deadline and report back to see if media seek/play times are improved
ii) Run Kernel Adiutor and try and get a long-term report of the CPU states the FiiO player spends most time in. With the performance governor (the fastest) you should see the maximum clock speed of 1704MHz being the longest time spent, but YMMV. Please report back so I'll implement and fine-tune governors and schedulers as required for best musical enjoyment
iii) Some of the kernel drivers are pretty outdated, no fault to FiiO as they've wisely chosen to use the most stable performing ones (instead of bleeding edge). I'd like this new kernel stream to focus on performance and optimisation, but some things may break in the process. If so please report back and I'll post fixes as quickly as they come.
Next Steps
Quite a lot actually. There's a lot of potential with this player now that the kernel source code has been opened up. I'm focussing on the following as next steps:
i) Optimised NAND algorithms by Rockchip to increase memory read performance
ii) F2FS support to support one of the fastest android filesystems
iii) exFAT/NTFS updated drivers
iv) Texas Instruments drivers upgrade
v) Cirrus Logic drivers upgrade
vi) And requests
Depending on how technical this thread becomes I might decide to move it to the xda forum for a more cohesive discussion and feedback on this specific kernel. It will depend on the level of interest for an optimised kernel for the FiiO players.
I'd also be happy to build an optimised kernel for the FiiO X7ii but (cough) I don't have one. So if anyone is interested in helping me...
Enjoy your new leaner, faster, cooler, feature-rich kernel. As always, feedback and comments much appreciated!