New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
l3v5y
Old
(Last edited by tnyynt; 12th August 2008 at 05:54 AM.)
#1  
l3v5y's Avatar
Retired Senior Moderator - OP
Thanks Meter 35
Posts: 7,390
Join Date: Sep 2007
Location: Bristol

 
DONATE TO ME
Default [TUT]Editing manilla!

Whilst not strictly related to the Diamond ROM development, the ideas could be used to make custom ROMs...

I've been trying to crack open the Manilla files, and have got somewhere on customisation...

Because all of the manilla files (other than the few DLLs used as the today plugin) are extensionless files, I've had to look at all the files with a hex editor/notepad to get some idea of what they are.

There are some XML files, some Plain text config files, some "LuaQ" files (function unknown...), some files which have "GLES" in them a lot which I'm assuming are graphics handlers, and some *.qtc files (the graphics themselves...)

The files:

TTF (GPOS Header)
6582c9b1_manila
1e8c4d7d_manila
XML
GLES type files...
LuaQ files (and there is a Lua.dll file)
SQL File (contains the weather data)
2330fc3c_manila
The music player config file (Plain text)
4cdb88a5_manila
The other files all have the "QTC1" file header, and as such, I believe they are the graphics...

Editing the text:
Each of the XML files listed above is essentially just localization.
For example:
In the 74673833_manilla file, the Music Player text is stored
Code:
<?xml version="1.0" encoding="utf-16"?>
<xliff version="1.0" lang="zh-tw">
  <file datatype="plaintext" original="musicsonglist">
    <header />
    <body>
      <trans-unit id="IDS_MUSIC_ADDTOPLAYLIST">
        <source>新增至播放清單</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_NOWPLAYING">
        <source>現正播放</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_ARTISTS">
        <source>演出者</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_ALBUMS">
        <source>專輯</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_UP">
        <source>上一層</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_MENU">
        <source>功能表</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_ALLSONGS">
        <source>所有歌曲</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_PURCHASED">
        <source>已購買的</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_EDIT">
        <source>編輯</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_INFO">
        <source>資訊</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_DELETE">
        <source>刪除</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_PLAYLISTS">
        <source>播放清單</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_GENRES">
        <source>內容類型</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_COMPOSERS">
        <source>作曲者</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_DELETE_TITLE">
        <source>確認</source>
      </trans-unit>
      <trans-unit id="IDS_MUSIC_DELETE_CONTENT">
        <source>此標題將被刪除。 是否要繼續?</source>
      </trans-unit>
    </body>
  </file>
</xliff>
This is clearly localised for Asia (it came from the HK ROM release), and can be identified by the "<xliff version="1.0" lang="zh-tw">" at the top. The "<trans-unit id="">" nodes contain the text of what is to be localised, and the ext there can be edited to suite the language.
The Following User Says Thank You to l3v5y For This Useful Post: [ Click to Expand ]
 
l3v5y
Old
(Last edited by l3v5y; 11th June 2008 at 11:10 AM.)
#2  
l3v5y's Avatar
Retired Senior Moderator - OP
Thanks Meter 35
Posts: 7,390
Join Date: Sep 2007
Location: Bristol

 
DONATE TO ME
To edit the music player layout, you need to edit 4cdb88a5_manilla.
This file is a plain text file (open it with notepad).
Code:
Audio textures

Controls.png
 
Shuffle-off = 0,0,0.09765625,0.07421875
(0,0) 25x19

Shuffle-on
(32,0) 25x19

Repeat-off
(64,0) 22x22 = 0.25,0,0.3359375,0.0859375

Repeat-on
(96,0) 22x22

Pause
(128,0) 20x23 = 0.5,0,0.578125,0.08984375

Play
(156,0) 19x28 = 0.609375,0.68359375,0.109375

Button-big
(0,36) 66x66 = 0,0.140625,0.2578125,0.3984375

Button-small
(76,36) 56x56 = 0.296875,0.140625,0.515625,0.359375

Time-line-indicator
(188,0) 11x11 = 0.734375,0,0.77734375,0.04296875

Previous(Next)
(208,0) 18x12 = 0.8125,0,0.8828125,0.046875

Album-shadow
(0,211) 256x42

Time-line-gray
(0,180) 256x20 = 0,0.703125,1,0.78125

Time-line-green
(0,156) 256x20 = 0,0.609375,1,0.6875
Each button (and the slider) have a configuration line.

The first section - the one in brackets - is the X/Y co-ordinates of the top left hand corner of manilla (they mark the position of the top left of the image as well) in the format (X,Y) with pixels being the measurement.

The second section - two digits seperated by "x" - is the size of the image used, with pixels as the default length. It is in the format XxY.

After the "=" I have no idea what it does, but I think it is to do with the image source. I shall look into that more closely when I have the time...
 
l3v5y
Old
#3  
l3v5y's Avatar
Retired Senior Moderator - OP
Thanks Meter 35
Posts: 7,390
Join Date: Sep 2007
Location: Bristol

 
DONATE TO ME
Reserved this one...
 
l3v5y
Old
#4  
l3v5y's Avatar
Retired Senior Moderator - OP
Thanks Meter 35
Posts: 7,390
Join Date: Sep 2007
Location: Bristol

 
DONATE TO ME
And one last one for fun...
 
tom_codon
Old
#5  
tom_codon's Avatar
Retired Moderator
Thanks Meter 78
Posts: 2,122
Join Date: Sep 2006
nice find bro
If you like my work and want to offer some support please click on the Paypal button below





Niki Project Rom release
Topaz WM6.5 Roms
Tom Text Messaging

Status :
Playing risky game
 
l3v5y
Old
#6  
l3v5y's Avatar
Retired Senior Moderator - OP
Thanks Meter 35
Posts: 7,390
Join Date: Sep 2007
Location: Bristol

 
DONATE TO ME
Quote:
Originally Posted by tom_codon View Post
nice find bro
Thanks! If anyone has a T-Mobile/other operator branded ROM for the Diamond, it may help working out what to change image wise...
 
Quentin-
Old
#7  
Senior Member
Thanks Meter 0
Posts: 248
Join Date: Apr 2006
Quote:
Originally Posted by l3v5y View Post
... some "LuaQ" files (function unknown...) ...
While I haven't looked at any of this myself, based on your description I'm going to go out on a limb here and guess they are LUA script files. Check out www.lua.org for more info.
If you find what I do useful, please

T-Mobile Rhodium (USA)
SPL: HardSPL v1.20R2
ROM: Q-Mobile 2.0 Alpha
Radio: 3.45.25.14
Accessories: SanDisk 16GB Micro SDHC Class 4, Motorola S705 SoundPilot
 
l3v5y
Old
#8  
l3v5y's Avatar
Retired Senior Moderator - OP
Thanks Meter 35
Posts: 7,390
Join Date: Sep 2007
Location: Bristol

 
DONATE TO ME
Quote:
Originally Posted by Quentin- View Post
While I haven't looked at any of this myself, based on your description I'm going to go out on a limb here and guess they are LUA script files. Check out www.lua.org for more info.
Cool! I'll look into that!
 
badaas
Old
#9  
badaas's Avatar
Senior Member
Thanks Meter 16
Posts: 632
Join Date: Feb 2008
i was gonna say LUA scripts

Android G1 -> unlocked TC5-RC8 Rooted & Booted - RIP
XOOM 3G MZ601 -> My Android 4.2.2 + ElementalX
Xperia Mini ST15i -> Real ICS 6 + LuPuS
 
leomandelbrot
Old
#10  
Member
Thanks Meter 0
Posts: 49
Join Date: Apr 2006
Location: Budapest
Unhappy how to translate?

Hi l3v5y!

I'm working in a italian translation of these xml, currently I have done this in all files by replacing the <source>所有歌曲</source> with a translated one...but I cannot get it work.
My Diamond has the locale full set to italian (os is now in italian but TF3D don't), has the parameter lang="zh-tw" changed to lang="it" and the registry locale=it under manila branch...

What I'm missing?????

thanks in advance!