Post by NPAudio on Jan 11, 2022 at 5:05pm

As I don't have the time to sit and create custom roms for all these daps for free for everyone I'm sharing the tools and config for other like minded entbusiasts.

This is purposly not a spoon feeding guide for anyone so if you know what this is you probably know how to use it and how not to brick your DAP :)

I would ask for people to please keep discussions here rather than head-fi

I don't want to promote any traffic to those bunch of crooks.

To be used with the Qualcomm QFIL tool.
QFIL is part of the Qualcomm QPST suite of tools here:
qpsttool.com/category/download

The latest QFIL can be obtained from here:
qfiltool.com/category/download

NPAudio_[iBasso_DX240_DX300_DX300MAX]_[Hiby_R6II_RS6_R8-464]_[FiiO_M11Plus_M17] Here

Once you have that you can read all partitions from the following devices.
NOTE: QFIL NEEDS TO BE SET TO EMMC - BOTTOM RIGHT

iBasso DX240
iBasso DX300
iBasso DX320
iBasso DX300MAX
Hiby R6 2020
Hiby RS6

Hiby R8 (Only 4/64gb)
FiiO M11Plus (AKM & ESS)
FiiO M17

(Not all will write (edit FiiO M17) but you can use fastboot flash for those that don't) edit Hiby devices don't flash from Fastboot)

NPAudio_[Cayin_N8ii]_[Hiby_R8-6128]_QFIL-UFS Here

Once you have that you can read all partitions from the following devices.
NOTE: QFIL NEEDS TO BE SET TO UFS - BOTTOM RIGHT

Cayin N8II 
Hiby R8 (Only 6/128gb)


Your DAP need to be in EDL mode and visible in QFIL 
Sometimes you have to manually restart into EDL even if your already in EDL mode.

QFIL and Fastboot also prefer USB 2.0 ports even if it's a USB 2.0 hub plugged in a USB 3.0 or USB-C port
Also changing USB data cables can make a difference.

Your Windows 7/8/10/11 will probably need to be configured to allow allow unsigned drivers for the fastboot drivers.

Basically you save the boot partition, copy it to your device, patch it with magiskmanager and flash the patched boot back

It's advisable to backup the system partition too before commencing to tweak (but you knew that right?)

The FiiOs are using a super-partition so you won't see system. You can use magisk modules just fine though (viper4android etc)
If you want to edit the system you will need to use a tool to extract the system from the super-partition, modify and rebuild. There are tools that can do it on the device on the fly too (obviously backup the super partition first)

An example of what can be acheived with tweaking build.prop and the kernel is almost double battery life but still playing upsampled to 384khz in neutron with screen off and less heat. Some of these daps were set to only use 2 cpu cores for music apps instead of 8 lol πŸ˜‚ With 8 you can set the cpu to a much lower frequency. So if you ever notice glitchy sound if for example you open a web browser whilst playing music it's because your web browser has a high priority as foreground app and all 8 cores whilst your music app is limping along and falling over on 2 cores, bonkers πŸ˜‚

Additional troubleshooting:

Does 'fastboot devices' show the dap serial?
Also is your adb/fastboot on the latest?

For fastboot not working;

1. Your fastboot drivers may not be installed properly/allow unsigned drivers in Windows.
You usually needs to manually point to the driver type rather than let Windows automangle itself.

2. Use a USB 2.0 port

3. Use a different cable

Last Edit: Jun 4, 2022 at 11:23pm by NPAudio

Post by domiji on Jan 29, 2022 at 9:38am

Hello together :-)

I am pretty new to Android DAPs and I want to try rooting my Hiby RS6 but to be honest I don’t know where to start πŸ˜…

I have managed to remove a lot of services and apps via ADB but in terms of rooting I simply have no glue how to do that.

Is there maybe a good tutorial out there?
I already installed the Qualcomm USB drivers and QLiTe πŸ˜…

Thanks for your help and have a great day
Dominik

Post by whitigir on Feb 17, 2022 at 2:58pm

I have successfully rooted the Dx300, and I am a newbie in this as well. Would be nice to see more people tweaking and tuning and or sharing discussions here

So, there are 2 boot partitions and you will need to patch and reflash on both before your dx300 is rooted

Now, onto tweaking and optimizing the system with Build.prop and Kernel auditor.

Last Edit: Feb 17, 2022 at 3:11pm by whitigir

Post by whitigir on Feb 17, 2022 at 5:33pm

NPAudio Avatar

whitigir Avatar

I have successfully rooted the Dx300, and I am a newbie in this as well. Would be nice to see more people tweaking and tuning and or sharing discussions here

So, there are 2 boot partitions and you will need to patch and reflash on both before your dx300 is rooted

Now, onto tweaking and optimizing the system with Build.prop and Kernel auditor.

Well done mate πŸ‘

I recommend SmartPack not only as its free but it's one of the best.
Tip: create profiles for eg performance, battery, normal, you can tick one to apply at boot and you can toggle the others when you want.
Profiles can be exported and shared on here.

github.com/SmartPack/SmartPack-Kernel-Manager/releases/tag/v17.1

I'll share some too for all the devices i've rooted. Not all have the same kernel options.
I'll post build prob entries too.

Agreed, using smartpack now and I can enjoy maximizing the neutron upsampling and upscaling performances, even with screen off and live processing all pcm to dsd256. Just exactly what I was asking for even at the expenses of the digital battery

Last Edit: Feb 17, 2022 at 5:38pm by whitigir

Post by whitigir on Feb 17, 2022 at 7:27pm

Disclaimer: All risks are your responsiblity.  This is my first time doing this and it was perfectly safe.  I went ahead and prepare the boots partitions for you as well.  IMO, this is well and safe procedures.  
Download Android SDK Platform tools
mac.softpedia.com/get/Developer-Tools/Google-Android-SDK.shtml

Unzip and install it to a folder directory. FE, C:\Download\platform-tool

Now Open this folder directory, then use keyboard to input "Shift+Right click", and choose to Open Powershell Windows here. This will be your ADB terminals for all kind of commands.

Download Android USB Driver, otherwise you will be stuck at Device state "Locked" screen. Follows the direction to install your USB driver througoutly. Restart your PC
developer.android.com/studio/run/win-usb

Now, Download these Boot IMG, prepared for you by me with the helps of Steve. Remember, this is prepared for the Firmware of 1.05.343
drive.google.com/drive/folders/1t9EqbAb1J8O5oEw3hyz5wZuCFK6qfa_D?usp=sharing

There are 2 Boot files (DX300Boot1.img and DX300Boot2.img). Now, copy/paste or drag it and drop into the Platform-tool directory.

Back to the Powershell window.

Prepare your DX300
Go to Setting>System>About device> Tap build number until you are "Now a developer"
Back to System, open up Developer Option, Flip OEM Unlocking On, and USB Debugging On
Connect DX300 to your PC with stock USB cables

Now back to Powershell window
Type in command: .\adb devices
You will see List of Device attached and it series number

Putting it into fastboot bootloader mode with command: .\adb reboot bootloader
Now unlocking the Bootloader with command: .\fastboot flashing unlock
Your Dx300 will ask you to confirm that you are assuming the risk etc....use the side buttons to navigate and press power button to choose
Now you are ready to flash the Boot images
Flashing the boots Remember to define the location where of the Dx300Boot IMG is located at, which should be inside the Platform Tool directory and by the command: .\fastboot flash boot DX300Boot1.img
When Done, flash the next one
Flashing the second boots by the command: .\fastboot flash boot DX300Boot2.img

The best way is to drag the Boot Image and drop it right into Powershell after the command .\fast boot flash boot
Now, Your player should be done flashing, and wait for it to be up and running again.

Download your Google playstore and find SmartPack. This app is free and the best there is to tinker with Tools, Terminal, CPU government....etc....it is a playground to unlock your DX300 to it potentials.

At this point, there are so many more tweaks, and I am hoping that people will start contributing to this thread, so we can further benefit from this wonderful DAP

You can always Download RootChecker to make sure and verify that you have successfully Rooted your DX300.

Last Edit: Feb 19, 2022 at 9:06am by whitigir

Post by whitigir on Feb 17, 2022 at 7:32pm

Smartpack performances mode for All PCM to DSD256 by Neutron Player

Download Smartpack, and open it, grand it Super User permanently

Homescreen will have overall statistic. On the lower right corner of that window, there are 6 little dot, click on it, pick "More". You will see all Cores are flipped on Big CPU 5-6-7-8. I set minimum to 1958 Mhz and max is 2208 Mhz. Then CPU Governor to Performances. Scroll downward to Little CPU Usage core 1-2-3-4 with Max 1843 Mhz and Minimum 1747 Mhz. CPU Governor to Performances. Then scroll all the way top and flick on Apply on boot.

Now, you will be able to enjoy DSD256 Mode with Neutron while screen is off. This will drain battery fast, and the player heating up. Recommend to have the player out in the open and not in the pocket or covered.

Last Edit: Feb 17, 2022 at 7:40pm by whitigir

Post by whitigir on Feb 17, 2022 at 8:31pm

samandhi Avatar

WOW! Nice work y'all! Phones are one thing, but this opens up a lot of possibilities for DAPs.

Welcome aboard, and yes, the possibilities are now endless :). I will be interested in finding out the MangoOS and how to tweak it as well

Post by whitigir on Feb 17, 2022 at 8:40pm

NPAudio Avatar

You can gain some battery and lower temp by reducing the gpu frequency to minimum and power level to 1

Also limit cpu cores on other tasks other than music apps.

Disable/uninstall all google junk, its a huge battery drain.

How do I limit cpu cores on other tasks as said ?

Post by NPAudio on Feb 18, 2022 at 10:24am

This is from an RS6 for better battery yet still allow upsampling to 384khz in neutron and no lag.
But you can import into a different dap

Save as a .json file and import onto profiles and apply/modify at will or at boot.

{"version":1,"profile":{"commands":[{"path":"\/sys\/class\/kgsl\/kgsl-3d0\/max_gpuclk","command":"echo 160000000 > \/sys\/class\/kgsl\/kgsl-3d0\/max_gpuclk"},{"path":"\/sys\/class\/kgsl\/kgsl-3d0\/default_pwrlevel","command":"echo 1 > \/sys\/class\/kgsl\/kgsl-3d0\/default_pwrlevel"},{"path":"\/sys\/class\/leds\/lcd-backlight\/max_brightness","command":"echo 125 > \/sys\/class\/leds\/lcd-backlight\/max_brightness"},{"path":"dumpsys deviceidle","command":"dumpsys deviceidle enable && dumpsys deviceidle force-idle"},{"path":"\/sys\/class\/timed_output\/vibrator\/vmax_mv","command":"echo 116 > \/sys\/class\/timed_output\/vibrator\/vmax_mv"},{"path":"\/dev\/cpuset\/audio-app\/cpus","command":"echo 0-7 > \/dev\/cpuset\/audio-app\/cpus"},{"path":"\/sys\/module\/msm_performance\/parameters\/cpu_max_freq4","command":"echo 4:1113600 > \/sys\/module\/msm_performance\/parameters\/cpu_max_freq"},{"path":"\/sys\/module\/msm_performance\/parameters\/cpu_max_freq5","command":"echo 5:1113600 > \/sys\/module\/msm_performance\/parameters\/cpu_max_freq"},{"path":"\/sys\/module\/msm_performance\/parameters\/cpu_max_freq6","command":"echo 6:1113600 > \/sys\/module\/msm_performance\/parameters\/cpu_max_freq"},{"path":"\/sys\/module\/msm_performance\/parameters\/cpu_max_freq7","command":"echo 7:1113600 > \/sys\/module\/msm_performance\/parameters\/cpu_max_freq"},{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_max_freq4","command":"#{\"path\":\"\\/sys\\/devices\\/system\\/cpu\\/cpu%d\\/cpufreq\\/scaling_max_freq\",\"value\":\"1113600\",\"min\":4,\"max\":7,\"bigCpus\":[4,5,6,7],\"MidCpus\":[0,1,2,3],\"LITTLECpus\":[0,1,2,3],\"corectlmin\":2}"},{"path":"\/sys\/module\/msm_performance\/parameters\/cpu_max_freq0","command":"echo 0:633600 > \/sys\/module\/msm_performance\/parameters\/cpu_max_freq"},{"path":"\/sys\/module\/msm_performance\/parameters\/cpu_max_freq1","command":"echo 1:633600 > \/sys\/module\/msm_performance\/parameters\/cpu_max_freq"},{"path":"\/sys\/module\/msm_performance\/parameters\/cpu_max_freq2","command":"echo 2:633600 > \/sys\/module\/msm_performance\/parameters\/cpu_max_freq"},{"path":"\/sys\/module\/msm_performance\/parameters\/cpu_max_freq3","command":"echo 3:633600 > \/sys\/module\/msm_performance\/parameters\/cpu_max_freq"},{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_max_freq0","command":"#{\"path\":\"\\/sys\\/devices\\/system\\/cpu\\/cpu%d\\/cpufreq\\/scaling_max_freq\",\"value\":\"633600\",\"min\":0,\"max\":3,\"bigCpus\":[4,5,6,7],\"MidCpus\":[0,1,2,3],\"LITTLECpus\":[0,1,2,3],\"corectlmin\":2}"},{"path":"\/dev\/cpuset\/background\/cpus","command":"echo 0-3 > \/dev\/cpuset\/background\/cpus"},{"path":"\/dev\/cpuset\/system-background\/cpus","command":"echo 0-3 > \/dev\/cpuset\/system-background\/cpus"},{"path":"\/sys\/fs\/selinux\/enforce","command":"echo 0 > \/sys\/fs\/selinux\/enforce"},{"path":"\/sys\/module\/lowmemorykiller\/parameters\/enable_adaptive_lmk","command":"echo 0 > \/sys\/module\/lowmemorykiller\/parameters\/enable_adaptive_lmk"},{"path":"\/sys\/module\/process_reclaim\/parameters\/enable_process_reclaim","command":"echo 0 > \/sys\/module\/process_reclaim\/parameters\/enable_process_reclaim"},{"path":"\/sys\/module\/lowmemorykiller\/parameters\/lmk_fast_run","command":"echo 1 > \/sys\/module\/lowmemorykiller\/parameters\/lmk_fast_run"},{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_governor4","command":"#{\"path\":\"\\/sys\\/devices\\/system\\/cpu\\/cpu%d\\/cpufreq\\/scaling_governor\",\"value\":\"interactive\",\"min\":4,\"max\":7,\"bigCpus\":[4,5,6,7],\"MidCpus\":[0,1,2,3],\"LITTLECpus\":[0,1,2,3],\"corectlmin\":2}"},{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_governor0","command":"#{\"path\":\"\\/sys\\/devices\\/system\\/cpu\\/cpu%d\\/cpufreq\\/scaling_governor\",\"value\":\"interactive\",\"min\":0,\"max\":3,\"bigCpus\":[4,5,6,7],\"MidCpus\":[0,1,2,3],\"LITTLECpus\":[0,1,2,3],\"corectlmin\":2}"},{"path":"\/sys\/module\/workqueue\/parameters\/power_efficientchmod","command":"chmod 644 \/sys\/module\/workqueue\/parameters\/power_efficient"},{"path":"\/sys\/module\/workqueue\/parameters\/power_efficient","command":"echo N > \/sys\/module\/workqueue\/parameters\/power_efficient"},{"path":"\/sys\/module\/lowmemorykiller\/parameters\/minfreechmod","command":"chmod 666 \/sys\/module\/lowmemorykiller\/parameters\/minfree"},{"path":"\/sys\/module\/lowmemorykiller\/parameters\/minfreechown","command":"chown root \/sys\/module\/lowmemorykiller\/parameters\/minfree"},{"path":"\/sys\/module\/lowmemorykiller\/parameters\/minfree","command":"echo 9579,19158,28737,38316,47895,57474 > \/sys\/module\/lowmemorykiller\/parameters\/minfree"},{"path":"\/sys\/class\/kgsl\/kgsl-3d0\/devfreq\/governor","command":"echo performance > \/sys\/class\/kgsl\/kgsl-3d0\/devfreq\/governor"},{"path":"\/sys\/block\/mmcblk0\/queue\/scheduler","command":"echo noop > \/sys\/block\/mmcblk0\/queue\/scheduler"},{"path":"\/sys\/block\/mmcblk0\/queue\/add_random","command":"echo 0 > \/sys\/block\/mmcblk0\/queue\/add_random"},{"path":"\/sys\/block\/mmcblk0\/queue\/iostats","command":"echo 0 > \/sys\/block\/mmcblk0\/queue\/iostats"},{"path":"\/sys\/block\/mmcblk1\/queue\/iostats","command":"echo 0 > \/sys\/block\/mmcblk1\/queue\/iostats"},{"path":"\/sys\/block\/mmcblk1\/queue\/scheduler","command":"echo noop > \/sys\/block\/mmcblk1\/queue\/scheduler"},{"path":"\/sys\/module\/msm_thermal\/parameters\/enabled","command":"echo Y > \/sys\/module\/msm_thermal\/parameters\/enabled"},{"path":"\/sys\/module\/msm_thermal\/vdd_restriction\/enabled","command":"echo 1 > \/sys\/module\/msm_thermal\/vdd_restriction\/enabled"}],"onboot":true}}

Last Edit: Feb 18, 2022 at 12:45pm by NPAudio