Fiio X5 - Custom/Modded firmwares

Jun 11, 2015 at 7:12 PM Post #2,326 of 2,615
The problem with rockbox is not knowing the chips instruction set, but as there have been devices that already run android on this cpu, it should be possible.


Also just flashed the AP100 firmware to it. Could work, need to fix some images probably. buttons not recognised, won't work.


I could never bring myself to flash firmwares just like that... I'm too afraid of bricking my X5.
I found a thread called "unofficial ClockworkMod Recovery 5 for Ingenic JZ4770/JZ4760 tablets" on XDA, and post 479 may basically mirror what the procedure would be to start up something on the X5.

It might be something similar to this:
Put X5 in USB Boot Mode
Install USBBootTool's drivers and run it
Select JZ4760 device
Load up whatever files to be flashed to the X5
Connect X5 to the PC via USB cable
Files will be flashed.

But then again, FiiO X5's partition structure must be wildly different from an Android tablet (Just system partition for fw + cache? vs the system/data/cache layout of Android), wrong files will definitely break the X5, and I don't know of any method of returning the X5 to original firmware once firmware is completely swapped out.

I think I'll refrain from experimenting with the X5 USB Boot mode for now until we can get more information or a solid way of restoring the X5.


I'm definitely not flashing things through the tools. I do believe the basic "flashing firmware" is like a BIOS and should never be erased if you flash using the X5 itself.

Found this on the rockbox site:

http://www.rockbox.org/wiki/FiioX3
http://www.rockbox.org/wiki/FiioX1

Which lead to

https://github.com/Rockbox/rockbox/tree/47d053735be0233a9821fdfdfd1d0a4651b6e61f/utils/jz4760_tools
 
Jun 11, 2015 at 7:19 PM Post #2,327 of 2,615
Also, managing to read/write to sys.bin will allow functional modifications. Maybe if we compare the sys.bin of the X5 and AP100, we can get some valuable info.

I'll try building the jz4760 tool from github on a Linux machine later.
 
Jun 12, 2015 at 12:00 AM Post #2,328 of 2,615
i recently updated my x5 with the lasted firmwares , its a lot better with some fix in file bugs and some minor change in user interface which is great from playlist , also seem like the fronts has changed al title to fit the pixel of the screen better  and some new feature in settings.will always keep on updating when ever new one is available great work fiio. for coming out with such good product 
 
Jun 12, 2015 at 2:57 AM Post #2,329 of 2,615
You guys are such risk takers.
 
On the other hand, from my Android experience, I would strongly advice not to try Android firmwares or other firmwares because they will not be able to use correctly all the hardware of X5. 
 
But you could make a custom theme for ap100, and make ap100 users happy knowing that thing. 
 
Jun 12, 2015 at 3:06 AM Post #2,330 of 2,615
Jun 12, 2015 at 6:33 AM Post #2,331 of 2,615
Jun 12, 2015 at 9:57 AM Post #2,333 of 2,615
Hopefully this thread won't die due to new X5 coming out, as I'm sticking with my old X5 for now
L3000.gif

 
I'll definitely keep theming the X5 for as long as I own it. I'm not jumping to the new X5II immediately, since I just got an amp for the X5.
Hopefully the X5's firmware will be updated to be more similar to the X5II to make porting easier.
 
Jun 12, 2015 at 2:02 PM Post #2,335 of 2,615
I'll definitely keep theming the X5 for as long as I own it. I'm not jumping to the new X5II immediately, since I just got an amp for the X5.
Hopefully the X5's firmware will be updated to be more similar to the X5II to make porting easier.


Actually, I know it's a more of a pain for theming, but I'd prefer to keep the current X5 menu structure with its easy access to the EQ.

Keep them coming AsianInvasion!!!

Joe Bloggs: Any word on whether original X5 firmware will be unified with the current generation DAPs?


Yup, sticking with my X5 with no intention of getting an X5ii either.

Also, contrary to my last post, couldn't resist one last theme... It'll get some refining before I release it, but a spot of 80's Hi-fi anyone?





Nice :wink_face:

Any preview for what the lists and menus will look like?
 
Jun 12, 2015 at 2:08 PM Post #2,336 of 2,615
  Yup, sticking with my X5 with no intention of getting an X5ii either.
 
Also, contrary to my last post, couldn't resist one last theme... It'll get some refining before I release it, but a spot of 80's Hi-fi anyone?
 
 

I fiind this very nice looking. It might inspire me to do some adjustments to mine, it is very nice looking. 
 
 
 
Actually, I know it's a more of a pain for theming, but I'd prefer to keep the current X5 menu structure with its easy access to the EQ.

Keep them coming @AsianInvasion!!!

@Joe Bloggs: Any word on whether original X5 firmware will be unified with the current generation DAPs?
Nice
wink_face.gif


Any preview for what the lists and menus will look like?

Now that you mention it, EQ was much better to be included in the main settings menu. I tend to access eq settings quite often. I wonder if we would be able to do anything about this by modding the X5II?
 
Jun 12, 2015 at 2:46 PM Post #2,337 of 2,615
 
Now that you mention it, EQ was much better to be included in the main settings menu. I tend to access eq settings quite often. I wonder if we would be able to do anything about this by modding the X5II?

It will be difficult without sys.bin edits.
 
Hopefully the X5 will get some updates such as multi-theme capability and choosing the album art display between "fill the screen" and "fit in screen".
 
Completely unrelated, but I themed the Hidizs AP100's firmware the exact same way as the X5 using packtools. No clue if it works, but it's proof that any similar firmware that can be unpacked with packtools will be relatively easy to port themes to. Here's Elegance ported to it.
 
Jun 12, 2015 at 4:07 PM Post #2,338 of 2,615
I'm 99% sure that X5 fw can be used on the X5ii, just not the other way around.

So with this in mind, it's possible to create firmware for the X5 without having the X5.

I used to theme the X3 even when i didn't have it, but had to quit when they changed the filesystem, as the litegui.exe emulator didn't work anymore.
 
Jun 12, 2015 at 4:11 PM Post #2,339 of 2,615
I figured out how to decrypt sys.bin.
 
1. You need a Linux machine or at least a virtual machine. If you don't have one, create one.
 
2. Download the J4760 tools located here. This can be done by clicking "Download ZIP" from the main rockbox repo page. Total download size is above 50MB.
 
3. Once downloaded the zip, unzip the files, navigate to utils/jz4760_tools through terminal.
 
Code:
cd /home/YourUsernameHere/Downloads     (or wherever you downloaded the file)
unzip rockbox-master.zip                            (file name may not be exact, I forgot)
cd rockbox-master/utils/jz4760_tools           (Go to the jz4760_tools folder under the utils folder)
ls                                                               (ls should list there being Makefile and packtools.cpp.)

 
4. Build the tools. If you don't have build-essential and g++ stuff already, apt-get them.
 
Code:
sudo apt-get build-essential g++ gcc
(Wait for them to install, can take a bit of time on a slow connection)
g++ packtools.cpp -o packtools (You will end up with a file called packtools.)

 
5. If you haven't already, unpack any X5 firmware and grab its sys.bin.
 
6. Copy packtools (NOT PACKTOOLS.CPP) to the same folder as sys.bin.
 
Code:
 cp packtools /where/ever/the/sys/bin/is

 
7. Go to the folder containing packtools and decrypt sys.bin.
 
Code:
 cd /where/ever/the/sys/bin/is
./packtools --descramble -i sys.bin -o outputfile

 
The outputfile is a decrypted version of sys.bin. No clue how to reverse the process or what to do with it, but that's how to decrypt it.
I read through the packtools.cpp and it seems to be something with using Xor (line 525) to decrypt.
 
This process should work on most if not all players based on the JZ4760(b) chip, including X3, X5, X1, X3II, X5II, etc.
 
Message to FiiO: If I should remove this info, please tell me, and I'll remove it quickly.
 
Jun 12, 2015 at 4:29 PM Post #2,340 of 2,615
  I figured out how to decrypt sys.bin.
 
1. You need a Linux machine or at least a virtual machine. If you don't have one, create one.
 
2. Download the J4760 tools located here. This can be done by clicking "Download ZIP" from the main rockbox repo page. Total download size is above 50MB.
 
3. Once downloaded the zip, unzip the files, navigate to utils/jz4760_tools through terminal.
 
 
4. Build the tools. If you don't have build-essential and g++ stuff already, apt-get them.
 
 
5. If you haven't already, unpack any X5 firmware and grab its sys.bin.
 
6. Copy packtools (NOT PACKTOOLS.CPP) to the same folder as sys.bin.
 
 
7. Go to the folder containing packtools and decrypt sys.bin.
 
 
The outputfile is a decrypted version of sys.bin. No clue how to reverse the process or what to do with it, but that's how to decrypt it.
I read through the packtools.cpp and it seems to be something with using Xor (line 525) to decrypt.
 
This process should work on most if not all players based on the JZ4760(b) chip, including X3, X5, X1, X3II, X5II, etc.
 
Message to FiiO: If I should remove this info, please tell me, and I'll remove it quickly.

The only downside of someone actually doing this is that they could actually brick the DAP to a point of no return. I am pretty sure that from your instructions, if someone is to modify it, it is possible to repack it, using the same packtools, if you change the code sequence:
 
 
 
 cd /where/ever/the/sys/bin/is
./packtools --descramble -i sys.bin -o outputfile
 
 
to
 
cd/where/ever/the/sys/bin/is ./packtools --scramble -i [name of the decrypted file] -o sys.bin
 
 
Amazing fiind. 
 
Now, who has enough low code knowledge to do it? I am still early to try, and I mainly work with high level coding, C# is not about doing low level hardware stuff. 
 
Also, I would avoid using the same tehnique to X5II, as it involves a FPGA, that is un-related to the J4760, and ommiting it's code might have much more dangerous side effects. 

 

Users who are viewing this thread

Back
Top