Fiio X5 - Custom/Modded firmwares
Jun 12, 2015 at 4:44 PM Post #2,341 of 2,613

ai03

Previously known as AsianInvasion
Joined
Jun 22, 2014
Posts
189
Likes
296
  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. 

 
Actually, the descrambler uses xor to descramble the sys.bin, so the opposite would be another xor, or just another descramble. That would most likely return decrypted firmware to working state. Not tested though.
 
Yes, this will brick the player with a high chance if done incorrectly. Not sure if the firmware flashing code would survive and will allow you to just reflash the stock firmware for recovery, or if the firmware flasher would be removed as well.
 
I don't have any low level code knowledge, but I have experience with Linux-based OSs. 
I read somewhere that the FiiO X3 runs OpenDingux Linux as its OS, so the X5 may run the same OS as well.
I've done hexdump -C and strings -n 10 on the decrypted firmware. Lots of references to a SQLite3 database (For holding the music library) and stuff like libpng. Also, tons of paths to images near the end of the data.
 
Jun 12, 2015 at 5:58 PM Post #2,342 of 2,613

nmatheis

Headphoneus Supremus
Joined
Dec 30, 2013
Posts
14,525
Likes
9,509
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.


Would this mean you could get EQ back on the Main Menu screen like George wanted?
 
Jun 13, 2015 at 8:51 AM Post #2,343 of 2,613

Dobrescu George

Reviewer: AudiophileHeaven
Joined
Jan 30, 2011
Posts
15,009
Likes
7,544
Location
Bucharest, Romania
I do not know if anybody else is doing this, but I am porting theme 1 and theme 2 from X5II to X5. I do not like the other 3 themes, so if anybody else wants to port them, so that every X5 user can have a feeling of X5II temes, it would be great!
 
Jun 13, 2015 at 11:06 AM Post #2,344 of 2,613

ai03

Previously known as AsianInvasion
Joined
Jun 22, 2014
Posts
189
Likes
296
A quick guide to porting X5 themes to X5II
(Before the X5II is released)
 ​
It can be done in as little as an hour​
Usually, it will take anywhere between 1.5 to 3 hours.​
 ​
 
1. Download the X5II firmware 1.0 from this post
 
2. Download the latest firmware tools from this thread, just in case they have changed
 
3. Unpack the X5II firmware: (Replace the text following -i with the downloaded firmware name if different, and replace text following -o to change the created folder name)
 
packtools --unpack -i X5II.fw -o YourThemeName_X5II

 
4. Open the X5II theme and the X5 theme to port, if possible side-by-side so it's easy to compare files.
 
5. Open the Coordinate folder. If you have made any coordinate changes to any file other than launcher.ini in the original X5 firmware, make the changes in X5II. The coordinate files haven't changed too much, but have caution when copying. I suggest that the contents be copied, and not entire files, to prevent losing a few new lines.
 
6. To get the full-screen single images for the launcher, this should be the launcher.ini's contents in the X5II theme (Delete everything else). If not using fullscreen images for launcher, ignore this.
 
<big_icon_x>0<big_icon_x>
<big_icon_y>0<big_icon_y>

 
7. If you have a boot splash (logo.bmp), copy-paste that to the X5II firmware. As long as it's 32 bit and 400x360, it will work.
 
8. Go to litegui > boot_animation. Here you have a few choices:
    a. Slow down the animation to make it longer (The new animation is 46 frames)
    b. Make a brand new animation (Will take a while)
    c. Simply copy-paste the current bootanimation and fill the remaining frames with a copy of the last frame (Animation will be fast and will be stuck at the last frame for a while, but it's the fastest way)
 
9. Open theme1 on both firmwares.
 
10. Here is a giant table of things to copy, things to edit, things to remove, etc:
 
 
 
Folder name[size=inherit]                                            [/size]
 
Things to cop[size=inherit]y[/size][size=inherit]                                            [/size]
 
Things to not copy[size=inherit]                                    [/size]
Things to modify  
 
[size=inherit]Things to make new                                                           [/size]
Notes
about_devfiio.png    
adjust_barticks.png  There are many adjust bar backgrounds. Choices:
 
a. Ignore the tick marks and make all backgrounds adjust_bg from old theme
 
b. Manually add tick marks for each background
cursor.png (Slight difference, so it's best to make it new)The adjust_bg size is 10 pixels taller in the new theme
bg  wallpaper.png is now 400x360  Top 32 pixels of wallpaper behind topbar
boot_language Everything  Entire folder removed
charge bg.pngAll battery icons 2px wider  
collect collect0.png
collect1.png
box0.png
box1.png
menu_bg is 5 pixels shorter now
 
For the selectable buttons:
 
a. Redo them
 
b. Empty them and place the old image in the center of them
 It might be a good idea to go with option b for now, and redo them later
dock    dock_insert.png
dock_remove.png
 
eq cursor_arrow.png
all arrows
slider_gray.png
slider_orange.png
option_box_bg.png
slider_stick.png
scale.png
scale_num.png
  bg.png
See this paint.net layered image for making one
bg.png is basically slider_stick, scale, scale_num, and the background combined.
explorer dir_bg.png (May be pointless)
  box0/1.png
(They may be pointless)
 
TF_bg.png (Slight size diff)
 
Selectable buttons, see collect folder for info on how to change them.
  
fast_picking fp_focus_bg.png
fp_playing.png
fp_topbar.png
fp_topbar_shadow.png
fp_white_line.png
fp_white_point_1/2/3/4.png
fp_bg.png
 
  fp_white_line could possibly be made opaque to have a fast picking background
fs_uiAnything you changedbg.png   
launcher   If you were using the full-screen image trick before (with the single image for each item):
 
Step 1. Remove or empty all of the images except for big_anything.png files.
(In my case, I emptied them + resized them to 1x1)
 
Step 2. Copy the respective files, I.E. category_I_1 will now be big_category, etc.
 If not using fullscreen images, make sure you didn't edit out the coordinates file for the launcher before.
list All of the small icons
Toggles (on/off.png)
select.png
  bg.png
bg1.png
 
They both have the extra 32 pixels up top that goes behind the topbar.
 
bg1's line spacing may have changed slightly.
select2.png (No clue what it is used for. Maybe it appears when clicking with central button.) 
msg button.png
button_sel.png
lock.png
ok.png
warning.png
  bg.png size change
 You may want to redo the button images later
music_updateAll the number imagesbg.png   
numberEverything    
play_settingsEverything    
playing box0.png
box1.png
All icons like collec0, cycle0, etc
All menu images
process0/1.png
black.png (Unless you modified it) menu_short_bg size change
 
shade_bg/bg1 size change (400x360 with 32 pixels behind topbar)
  
playlistSmall iconsbox.png bg.png size change. Best to copy from the list folder if you have already modified it there.
 
menu_bg.png size change
 
menu_remove.png size change
box0/1.png (But they're empty, so most likely no need) 
powerlowEverything    
scrollbarEverything    
sys_setEverything except what not to copy bg.png
key_lock_bg.png
   
topbar All the icons
shade.png
  topbar_bg.png (See notes)
 topbar_bg has transparency now. This means that making topbar_bg opaque will have it block off part of album art in playing screen.
usb connect.png
disconnect.png
bg.png   
usb_dac Everything except dac_play_bg.pngdac_play_bg.png. Size change, again, 32 pixels up top  
volumeBasically everythingPotentially v_arc.png? It's empty in the II firmware.   
config.iniDon't copy it whole; a line of config will be lost There is a new line in the file. Make sure you take a look and copy what you need.  
 
11. If you are going to theme the remaining themes, do so:
    a. Delete the other theme folders, copy-paste the already themed theme1 to be the remaining themes, and work from there
    b. Go back to step 10 and redo it from scratch
If you changed any coordinates, they will apply to all themes. This includes the launcher fullscreen mod.
 
12. Pack up the firmware: (Replace the text following -i with your actual theme folder name, and replace text following -o to change the product firmware name)
 
packtools --pack -i YourThemeName_X5II -o YourBrandNewX5IITheme.fw -m x5ii
 


The x5ii needs to be lowercase. (The part following -m)
 
13. Test the firmware if you have a X5II
 
14. Upload it/post it to the new X5II themes thread/etc.
 
Jun 13, 2015 at 12:13 PM Post #2,345 of 2,613

nmatheis

Headphoneus Supremus
Joined
Dec 30, 2013
Posts
14,525
Likes
9,509
I do not know if anybody else is doing this, but I am porting theme 1 and theme 2 from X5II to X5. I do not like the other 3 themes, so if anybody else wants to port them, so that every X5 user can have a feeling of X5II temes, it would be great!


You and me both, George!

To me, X5ii Theme 1 looks best until you get to an album with a white cover which renders the topbar text almost completely unreadable.

X5ii is better for all-around legibility, but I really didn't like the metal look for icons.

The other three X5ii themes look like preiOS 7 iPhone gaudiness - denim, leather, and wood? Really? :blink:
 
Jun 13, 2015 at 12:24 PM Post #2,346 of 2,613

Dobrescu George

Reviewer: AudiophileHeaven
Joined
Jan 30, 2011
Posts
15,009
Likes
7,544
Location
Bucharest, Romania
You and me both, George!

To me, X5ii Theme 1 looks best until you get to an album with a white cover which renders the topbar text almost completely unreadable.

X5ii is better for all-around legibility, but I really didn't like the metal look for icons.

The other three X5ii themes look like preiOS 7 iPhone gaudiness - denim, leather, and wood? Really?
blink.gif

I totally agree!
 
The entire 3, 4, and 5 themes looks like cheap remedies for something. 
 
In fact, there are parts of the original X5 theme that I like better than all x5II themes.
 
A quick guide to porting X5 themes to X5II
(Before the X5II is released)

This is a killer guide!
 
Thanks!
 
 
 
EDIT1::: On theme 1 I do not like the background. I would much have preffered a smooth one, instead of a realistic, grainy one. 
 
EDIT2::: On theme 2, some of the icons could have been better, if not all. I need to experiment a little. 
 
EDIT3::: If the covert art is full screen on X5II is there something in coordinate files, or any way to make it in x5 too?
 
Jun 13, 2015 at 12:29 PM Post #2,347 of 2,613

Dobrescu George

Reviewer: AudiophileHeaven
Joined
Jan 30, 2011
Posts
15,009
Likes
7,544
Location
Bucharest, Romania
This might sound a little weird, but it is related to the new X7, I want to try to build a launcher theme and such, is anyone interested in trying to build an android theme for a launcher, or an entire lightweight launcher, if possible?
 
Jun 13, 2015 at 1:01 PM Post #2,349 of 2,613
Joined
Feb 2, 2014
Posts
9,326
Likes
10,498
Location
Hawaii/Japan/Your Head
  This might sound a little weird, but it is related to the new X7, I want to try to build a launcher theme and such, is anyone interested in trying to build an android theme for a launcher, or an entire lightweight launcher, if possible?


I'm already working on it.
 I did some blogs that use CSS and XHTML and it's pretty similar. I'll not talk about it in this thread since it's OT and not respectful to the OP.
 
Jun 13, 2015 at 1:06 PM Post #2,350 of 2,613

Nicolas2305

500+ Head-Fier
Joined
Jun 11, 2008
Posts
552
Likes
199
I've added a new section in the first post concerning the new X5II. Basically I'm telling people that firmwares for the second gen player are in a different thread (with link to the thread started by @x RELIC x). And I also added a link to @AsianInvasion guide to port themes from the X5 to the X5II.
 
I see that some of you are trying to get to the next level of X5 modding. If you ever post a theme with modified binary files, please be clear about it so I can put them in a separate section and properly warn people about it. Thank-you.
 
Jun 13, 2015 at 2:00 PM Post #2,351 of 2,613

Dobrescu George

Reviewer: AudiophileHeaven
Joined
Jan 30, 2011
Posts
15,009
Likes
7,544
Location
Bucharest, Romania
I am begging to understand how the location .ini files works..
 
I have only one question, and just to make sure. they indicate the left bottom corner from where the image beggins?
 
EDIT1::: anyone knows what happens if I use bigger images on some things? I mean, are we able to, without bricking the X5?
 
EDIT2::: I had run into some bad problems, if anybody else wants to port the themes from X5II to X5, they should do it, I stop here. It run into some bad bugs, I had to use reset. I am unable to identify the problem. On the other hand, porting icons from x5 to XII is totally compatible and will not lead to errors. 
 
EDIT3::: Can we use bigger Icons for topbar? I kinda like those from X5II, but they are bigger than X5 Icons.
 
Jun 13, 2015 at 3:03 PM Post #2,352 of 2,613

ai03

Previously known as AsianInvasion
Joined
Jun 22, 2014
Posts
189
Likes
296
  I am begging to understand how the location .ini files works..
 
I have only one question, and just to make sure. they indicate the left bottom corner from where the image beggins?
 
EDIT1::: anyone knows what happens if I use bigger images on some things? I mean, are we able to, without bricking the X5?
 
EDIT2::: I had run into some bad problems, if anybody else wants to port the themes from X5II to X5, they should do it, I stop here. It run into some bad bugs, I had to use reset. I am unable to identify the problem. On the other hand, porting icons from x5 to XII is totally compatible and will not lead to errors. 
 
EDIT3::: Can we use bigger Icons for topbar? I kinda like those from X5II, but they are bigger than X5 Icons.

 
Question 1: I think they're the top left, but I could be wrong.
Edit 1: Usually, the larger image is simply displayed.
Edit 3: It's possible to use the larger icons, you will need to copy the coordinates from the X5II firmware to the X5 as well as the images.
 
I think I'll try porting and see how it goes.
 
Jun 13, 2015 at 3:24 PM Post #2,354 of 2,613

Dobrescu George

Reviewer: AudiophileHeaven
Joined
Jan 30, 2011
Posts
15,009
Likes
7,544
Location
Bucharest, Romania
   
Question 1: I think they're the top left, but I could be wrong.
Edit 1: Usually, the larger image is simply displayed.
Edit 3: It's possible to use the larger icons, you will need to copy the coordinates from the X5II firmware to the X5 as well as the images.
 
I think I'll try porting and see how it goes.

If you want, I can send you what I got so far. It has dire bugs, and if you access settings, or play settings, you need to reset it. 
 
But it is a good 3 hours of work and trying to port X5II to X5.
 
EDIT::
The name of the FW is X5.fw, you can download it, and use the tools to un-pack it. I felt like sending a single file is better for all the good reasons. 
 
EDIT2:: The link : https://www.dropbox.com/s/76jpw9cgktfzr22/x5.fw?dl=0
 
For everyone else, please download only if you want to develop further, it is highly unstable at this point. 
 
Jun 13, 2015 at 4:32 PM Post #2,355 of 2,613

x RELIC x

Headphoneus Supremus
Joined
Mar 8, 2014
Posts
11,987
Likes
7,608
Location
The West Coast, Canada
I am begging to understand how the location .ini files works..

I have only one question, and just to make sure. they indicate the left bottom corner from where the image beggins?

EDIT1::: anyone knows what happens if I use bigger images on some things? I mean, are we able to, without bricking the X5?

EDIT2::: I had run into some bad problems, if anybody else wants to port the themes from X5II to X5, they should do it, I stop here. It run into some bad bugs, I had to use reset. I am unable to identify the problem. On the other hand, porting icons from x5 to XII is totally compatible and will not lead to errors. 

EDIT3::: Can we use bigger Icons for topbar? I kinda like those from X5II, but they are bigger than X5 Icons.


You can use bigger images but in many cases they will look strange.

The coordinates define the upper left corner of the image and are mapped starting from the upper left of the screen. For the launcher images it's at the upper left of the 400x328 area of the screen. For the top bar it's the upper left of the 400x360 area of the screen.

The only image I found to be mapped to the upper right so far is the scroll bar on the right hand side that appears when going through lists. It's weird the way some of the layout is mapped and we can't change the coordinates of everything.

You can use bigger icons. For example, if you use a 32 pixel image you would set the Y coordinate to 0 and it will sit flush with the top of the screen and finish at the bottom of the top bar. But if they are larger than 32 pixels high they will overlap the edge of the topbar and may look weird. Or it may look cool depending on what the theme is. Best thing to do is try it and report back.
 

Users who are viewing this thread

Top