[App] RGUber v1.21a, RGUOrder v1.4 - Windows Mobile Software Development

Purpose:
This purpose of this VBScript is to process and organize data in RGU/REG files to remove duplicates, identify faulty entries, and move entries to ascending alphabetical order (the same way it is displayed in a registry editor).
Requirements:
Windows Scripting Host (included in most versions of windows)
rgucomp.exe and cereg400.dll located somewhere in your path (same folder as the script probably won't work if the script is run from another folder)
.reg and .rgu files are expected to be UTF-16LE with BOM
Usage:
Drag a .rgu, .reg, or .hv onto RGUber.vbs OR run "wscript.exe RGUber.vbs example.rgu"
Details:
When an rgu|reg file is specified, RGUber will:
1) create backup of input file
2) rename input file to boot.rgu
3) use rgucomp to convert it to *.hv
4) use rgucomp to convert new .hv to original rgu path\name
5) Reorder all keys in ascending alphabetical order and all values for each key in ascending alphabetical order with default value first
When an hv file is specified, RGUber will:
1) use rgucomp to convert it to *.rgu
2) Reorder all keys in ascending alphabetical order and all values for each key in ascending alphabetical order with default value first
Options
Open RGUber.vbs in your favorite text editor. All options are set at the beginning with (hopefully) meaningful descriptions.
Code:
'//Path to rgucomp (leave this as default if rgucomp.exe is located in your system path)
Const RGUCOMP = "rgucomp.exe"
'//Path to notepad, only needed if %OPENAFTER% is true
Const NOTEPAD = "notepad.exe"
'//The following options can be set to True/False or 0/1
'//Organize registry entries in ascending alphabetical order
Const REORDER = True
'//Open in %NOTEPAD% after conversion is done
Const OPENAFTER = False
'//Save any errors from rgu -> hv conversion
Const LOGERRORS = True
'//Save a backup copy of %INPUTRGU% as "%INPUTRGU%_Backup.rgu"
Const BACKUPRGU = True
Other info
If target file already exists, RGUber will ask if you want to overwrite.
Text files (the MS way) typically contain CRLF for next line. Output from rgucomp.exe contains many CRCRLF. RGUber removes the extra CR.
I have very few comments in the code. If requested, I will upload another copy with as many detailed comments as I can manage.
I tried to code this as efficiently as VBScript can possibly be. I kept getting errors when trying to run 'rgucomp.exe -b -nologo' so instead of running it directly, RGUber creates a bat file, executes it, then deletes it.
On my AMD Phenom 9600 with Vista64 and 3 SATA in Raid5, RGUber completes rgu->hv->rgu of 2084 lines in <3s
RGUber always saves output from rgu->hv conversion but deletes the file if there were no errors.
RGUber crashes on files with no reg entries (e.g. empty app.reg in an EXT package that does not add any registry entries)
Changelog:
v1.21a
Values are now sorted in alphabetical order for each key
v1.2
Replaced Organize function with one from RGUOrder
Lost ability to reorder values for each key (To be readded in next version)
v1.1
Fixed a bug with removing hashdata from output (RGUber would mix data from two keys under one)
Changed sorting algorith with a much faster one
v1.02
Added option to remove RegistryUpdate key from rgucomp output
Fixed a typo where RGUber was not removing the system attribute from input rgu files
v1.01
Fixed typo where RGUber was waiting for backup file instead of log file
Change 'Done' msgbox to one that shows beginning time and ending time
v1.0
Initial Release
RGUOrder v1.4
This script will only reorder the contents of an rgu without processing with RGUComp, thereby keeping comments and delete key entries. RGUComp/cereg400.dll are not needed to use this app.
Changelog:
v1.4
Fixed a bug where if the original rgu did not end with a new line then the last entry after being sorted would be lost.
Fixed two bugs where only the first 25 tabs and first 25 spaces would be removed before sorting (This did not affect data integrity or performance, but the checksum would be different each time you run the output back through RGUOrder until all the original tabs/spaces were removed)
Added code to prevent multiple entries of the same key from being reordered
Fixed other miscellaneous bugs/oddities introduced with v1.3
v1.3
Added code to add a delete key for each subkey of a deleted key so that when reordered, the key deletion isn't broken
v1.2
Fixed a bug where the last key processed was being concatenated to another with no CRLF producing an invalid rgu file

I'm not sure if this relates to your app but I have a small question:
If a dumped a rom (raw, not kitchen type) and removed several apps/programs but did not clean the registry (very tedious), will this help me clean it up (remove dead paths, etc)?
And if so, how will it know just by dragging the .hv file? I mean how will your app know if a registry entry does not have the app/program included in the rom anymore?
Please forgive me if my question does not relate to your app

There is no way for my app to know, it isnt that smart
It would take an extensive app/database to know which keys are related to which apps.

Thanks for this post

updated to v1.1
v1.02 had a bug in the code which removed hash data from output which made it mix data from the key before it with the key after it
If I ever get around to updating again, I will use hvedit instead of rgucomp

I get an error.
Script: D:\RGUber.vbs
Line: 136
Char: 2
Error: File not found
Code: 800A0035
Source: Microsoft VBScript runtime error
Any reason why?
I attach the file i want to sort alphabetically.

I have no idea
It worked for me with no problem (file attached)
Please tell me the location of RGUber.vbs and of 51329f91-0017-4364-bcff-e032c5d45b01.rgu

Great application bro!!
Only limitation is that I have to put reg400.dll and rgucomp in C:\windows

c_shekhar said:
Great application bro!!
Only limitation is that I have to put reg400.dll and rgucomp in C:\windows
Click to expand...
Click to collapse
yeah, I tried to get around that but I didn't find anything feasible with vbscript :-/
Actually, they don't have to go in C:\windows
I reinstall windows regularly so I keep as many apps portable as I can. I have a bin folder on another partition that I add to the system path variable after a new install for stuff like this.

selyb said:
yeah, I tried to get around that but I didn't find anything feasible with vbscript :-/
Actually, they don't have to go in C:\windows
I reinstall windows regularly so I keep as many apps portable as I can. I have a bin folder on another partition that I add to the system path variable after a new install for stuff like this.
Click to expand...
Click to collapse
can you elaborate this a bit more. Because I too would like a similar arranfements...

My C:\ partition has Vista64
My F:\ partition has all my documents, downloads, music, movies, etc and a folder F:\bin\
F:\bin contains >100 downloaded command line programs and vbs scripts that I have written including
RGUber.vbs
lame.exe
rgucomp.exe
cereg400.dll
FixVTS.exe
faad.exe
nuerecmod.exe
Tag.exe
find Advanced System Properties (I can't remember how, it's different for XP/Vista/7) go to the Advanced tab and hit the Environment Variables button
Under system variables, scroll down to 'Path', double click it. This defines your 'system path'. It contains a list of folders separated by semicolon ";". At the end, add a semicolon and the path to the folder you want to add (e.g. ;F:\bin) after that, hit ok. XP may need to reboot to reflect the change but I'm not sure. Vista and 7 are affected immediately.
With this setup, you can open a command prompt in any folder on your computer and type "RGUber.vbs xyz.rgu" and it would work as if all the files are in that folder.

Thanks a lot bro!!!
I am grateful...

I'd really like to use this, but unfortunately I get this error regardless of the app.reg I drag onto the script:
Script: C:\RGUber\RGUber.vbs
Line: 232
Char: 3
Error: The system cannot find the path specified.
Code: 80070003
Source: (null)
Thanks if you can advise.

Quetzecotyl said:
I'd really like to use this, but unfortunately I get this error regardless of the app.reg I drag onto the script:
Script: C:\RGUber\RGUber.vbs
Line: 232
Char: 3
Error: The system cannot find the path specified.
Code: 80070003
Source: (null)
Thanks if you can advise.
Click to expand...
Click to collapse
Hmmm... this line asks the system for what is in the %temp% variable and attempts to change the working directory to the result.
Open RGUber.vbs in notepad and go to line 232
Modify
Code:
WSH.CurrentDirectory = WSH.Environment("SYSTEM")("temp")
to
Code:
WSH.CurrentDirectory = "C:\RGUber\"
then try again

Works great after your fix, selyb. Thank you for this useful app and your many helpful contributions to the Kaiser forums.

Quetzecotyl said:
Works great after your fix, selyb. Thank you for this useful app and your many helpful contributions to the Kaiser forums.
Click to expand...
Click to collapse
Yeah, I may relocate from Kaiser forums to Rhodium. I have an AT&T Tilt 2 in the mail to me ATM

Grats on getting a Rhodium. Found a question after using it for a while. This is just one example of such behavior, but why does:
Code:
[HKEY_CURRENT_USER\Software\HTC\TaskManager\ExclusiveList\System]
"CMBandSwitching.exe"=dword:0
get turned into:
Code:
"CMBandSwitching.exe"=dword:0
How do I make it regard CURRENT_USER keys?

Quetzecotyl said:
Grats on getting a Rhodium. Found a question after using it for a while. This is just one example of such behavior, but why does:
Code:
[HKEY_CURRENT_USER\Software\HTC\TaskManager\ExclusiveList\System]
"CMBandSwitching.exe"=dword:0
get turned into:
Code:
"CMBandSwitching.exe"=dword:0
How do I make it regard CURRENT_USER keys?
Click to expand...
Click to collapse
I had this problem with an earlier version. If you are using v1.1 then please attach the original rgu/reg. I have tried and I can't seem to reproduce it since I fixed it already.

Please, replace rgucomp with hvedit . I really need your help because rgucomp doesn't work for me . Thanks in advance .

tomcug said:
Please, replace rgucomp with hvedit . I really need your help because rgucomp doesn't work for me . Thanks in advance .
Click to expand...
Click to collapse
why doesn't rgucomp work? I would be surprised to learn that hvedit will work when rgucomp won't.

Related

Question on "hand modified XIP chain"

Could you explain please (very short description) how you modified the xip chain for rom kitchen?
All I can see is the following:
- no length (0)
- no RSA1 signature
- only file entries
What I want to know:
- how to find phys. (ROM) position (do you use unused holes in rom?)
- is 0 length for ROM = autolength
- how to choose the RAM position
- why can length of RAM be 0
Please help. (I need this info for a smartphone project)
I did not bother setting the length, only the 'pvAddr' field is used.
I only make fileentries, because I have yet to implement the generation of modules. ( if I ever do ).
yes, I use unused holes in the rom.
actually, if you don't care about xip updates of other sections, you
may use addresses anywhere in the rom, where your data fits.
It does not nescesarily have to be contigous.
I just copied the ram setting from the other xip entries.
Thank you for the information.
Why don't you take romimage.exe from platformbuilder to generate a XIP block. You only have to write a little .bib file for it. This tool can handle modules and compression as well.
John
P.S. Source code for romimage.exe is available in PB 4.2 private build tree.
I hadn't found that tool yet when I wrote makexip, and then we couldn't have made the romkitchen with it, since romimage.exe runs only under windows.
Don't waste your time with this crap tool (romimage.exe). Some needed files are missing (e.g. bin2xip.exe).
How can I be sure to choose a good phys. addr.? There might be some memory mapped devices...
I have one additional difficult question:
Modules are relocated when embedded into XIP's. Even there seems to be a modification to the import table of the module (e.g. references to coredll.dll will be checked/updated?)
If I extract a module (e.g. a *.dll) from a XIP of an other phone do I have to re-relocate it / modify it's import section even if I place it in a FILES section?
Thanks
John
converting bin to xip is not that difficult. see http://www.xs4all.nl/~itsme/projects/xda/wince-flashfile-formats.html
do you mean the 'physfirst' field in the romheader? that is just the startaddress in the rom.
since the relocation information is not stored in rom, the only way to really
recover it, is to disassemble the file, and find the offsets to stuff that
needs to be reallocated.
so that is a lot of work. and dumprom only extracts nonrelocatable .exe and .dll modules.
if your extracted dll is fixed to a memory location that overlaps with an already existing dll, you will have a problem I think.
I am not even sure, if an extracted dll works at all, I only use them for reverse engineering.
Yes, I mean phys first field. But how can I be sure to choose a valid address for the new XIP block?. My idea is to use address space between existing XIP blocks. Or can I simply choose a very high address (e.g. 8F000000) and hope not to use a region where memory mapped devices are located?
Since I used (your?) dumprom to extract the *.dll files do you think they are "nonrelocated"?
John
I ask so much because I crashed my lovely smartphone a week ago. :-(
My new XIP seems to be invalid... so it doesn't boot anymore. Unfortunately I've killed the bootloader too...
When I try next time (I've ordered a new one) this must not happen!
I am sure they are nonrelocated, fixed to run from a specific memory location.
( just wrote another post about this )
maybe even the module loader does not allow non-xip modules to be loaded in xip reserved memory.
THANK YOU VERY MUCH
I've got it. My Smartphone now have a new XIP block with some files in it...
Only thing left is to rewrite some *.dll files (only resource dlls with no function exports) to extend the language of the MIO 8380.
Are you familiar with languages on smartphone? There are multiple .mui files (resource dlls containing all the dialogs and strings). I've exported all resources and (re)created the dll's as resource only. Unfortunately they don't work ... yet ...
Are there some other files for language extension? What about "wince.nls" or "mxip_lang.vol" ?
Thanks again for your great tools. I will setup a site containing detailed information about this hack soon.
John Smith
cool, I am always interested to see how things work out that I haven't actually tried myself yet.
is this how you create resource only dll's:
http://www.xs4all.nl/~itsme/projects/programming/icondll.html
Currently I'am a little bit confused. PB 4.2 docu says MUIs are resource only .dlls and sample in smartphone sdk adds a dllmain...
I will have to investigate this things a little bit more...
John
O.K.
I've tried anything. The only thing left is that the new resource dlls are not XIPed as modules...
The sample mui app works fine (regardless of resource only / normal dll).
John
P.S. I've successfully changed all other settings some things already appear in the new language. Only poutlook, homescreen and control panel will not change!
Now after some more testing (included a dllmain into the mui file which logs the loading/unloading to file) it seems that my mui.dll is never loaded by system (if I load it manually with LoadLibrary the log is written).
Here is my question:
I've looked a little bit deeper into the dumped mui.dll and found a pointer in security section (pe header) which points to nowhere (just after the [virtual] end [rva] of all of the e32/o32 sections).
Could it be, that I've missed something? Does dumprom fill in this values correctly?
One other interesting idea could be to exchange only the data section of the module (since I want to patch resource only .dlls). But since english is a very short term language all other files will be bigger...
John
>>> I've got it <<<
the new (mui-language) modules have to be REAL xip modules...
So I've build a custom.bib file and used RomImage from CE3.0 Platformbuilder. Even compression is possible now.
Note: romimage.exe does the same thing as makexip.pl
To share my results here is the content of the .bib file I've used:
Code:
MEMORY
; Name Address Size Type
MYXIP 81f00000 0013f000 RAMIMAGE
RAM 8c020000 00fe0000 RAM
CONFIG
COMPRESSION = ON
PROFILE = OFF
ROMFLAGS = 2
ROMSTART=81f00000
ROMSIZE=13f000
ROMWIDTH=32
DLLHIGHADDR=00b00000
MODULES
; Name Path Memory Type
; ------------------------- ------------------------------- ------ ----
outres.dll.0407.mui input\outres.dll.0407.mui MYXIP SHU
syncres.dll.0407.mui input\syncres.dll.0407.mui MYXIP SHU
tapres.dll.0407.mui input\tapres.dll.0407.mui MYXIP SHU
tshres.dll.0407.mui input\tshres.dll.0407.mui MYXIP SHU
wmplayer.exe.0407.mui input\wmplayer.exe.0407.mui MYXIP SHU
FILES
; Name Path Memory Type
; ------------------------- ------------------------------- ------ ----
Busy.0407.mid input\Busy.0407.mid MYXIP
mxip_lang_799.rgu input\mxip_lang_799.rgu MYXIP
ms_splash.gif input\ms_splash.gif MYXIP
carrier_splash.gif input\carrier_splash.gif MYXIP
- The MYXIP region in MEMORY section is a hole in the ROM I've found with calcgaps.pl.
- The RAM region is copied from the other sections (they all use the same)
- ROMSTART and ROMSIZE have to be the same values as defined in MYXIP
- DLLHIGHADDR has to be the !!!lowest!!! loading address found with dumprom (header: dlls=...-... ).
Example: If the lowest address found is "header: dlls=00b00000-00c90000 ..." then DLLHIGHADDR has to be 00b00000
Don't care about the warning the warning "Unable to do imports from ... to COREDLL.dll - will late bind". Thats because coredll is in another XIP.
John
P.S. Thanks a lot for all of your support.
DETAILED INFORMATION ABOUT THIS HACK CAN BE FOUND HERE:
http://smartphonerom.tripod.com (only download the "detailed information")

[APP][DISCONTINUED] TF3D manila mode9 editor

6Fg8 proudly presents:
m9editor
development discontinued
​
m9editor is your little helper when it comes to editing manila files. It lets you edit nearly all aspects of a mode9 file. Additionally it will assist you with graphics, allowing import, export and CFC compression. And It includes a directory viewer with information specific to manila files.
requirements:
m9editor is written in .net, so .netCF3.5 (currently SP1) must be installed (usually its already there). It has been developed and tested using Windows XP x64, but should run on any Windows platform.
usage:
see the manual contained in the download package (PDF)
making of / credits:
thanks to: D-MAN666, sztupy, nixx-X1, Chainfire, pcarvalho, showaco, guap, 12aon, xboxmod, NisseDILLIGAF, smotrs, for contributing knowledge, ideas, testing. Thank you guys (& gals of course) !
version history:
2009-03-10 - v3.3.0.1
BUGFIX: crashed when using selections
2009-03-09 - v3.3.0.0
- LuaConv is now included in the m9editor download package
- CHG: all sourcecode related functions use ".lua" as default extension
- NEW: compile and import function for lua script sourcefiles:
for mode9 files (embedded scripts):
m9editor remembers the filename of the source on a per-node basis and lets you subsequently edit the recently used file from the particular node. You may also attach/detach such a link manually. If a link is established, you may edit the sourcefile (check if you set the "SourceCodeViewer" option in m9editor.cfg) and recompile/import in a single step. When saving the mode9 file the links are saved too (mode9file.ann) and reloaded on next open.
for standalone scripts:
m9editor checks if a correspondig xxxxxxxx_manila.lua exists in the script directory. If yes, you are offered edit and compile options.
- NEW: editor context menu: view source for embedded scripts
- NEW: search previous button
- FIX: editing characterreference threw exception
- NEW: dirviewer context menu for mode9 files: compare with: compare two mode9 files without loading it first
- NEW: dirviewer context menu for all files: hex compare with: compare two files with hexview.
Only available if AptDiff is installed. Edit m9editor.cfg and insert the following line (use the path on your system):
AptDiffPath=c:\Program Files (x86)\Brother Technology\AptDiff 1.5\aptdiff.exe
If AptDiff is installed and configured in m9editor.cfg, text compares are done with AptDiff instead of ExamDiff
WARNING:
during directory analyze, if a lua script is found, m9editor checks for existence of <filename>.luac.lua. If its found it will be renamed to <filename>.lua. In directory viewer the line will be shown blue colored to indicate the presence of a sourcecode file.
during mode9 file load, if a embedded script is found, m9editor checks for existence of <filename>_<bytepos>.luac.lua. If its found it will be renamed to <filename>_<bytepos>.lua. In mode9 editor you will notice the link to the script sourcecode. Dont forget to save the mode9 file to make the link permanent (otherwise if you modify the structure, links might be lost due to changing byteposition).
WARNING2:
The pdf attached doesnt reflect the latest changes to m9editor, update follows.
2009-02-22 - v3.2.0.1
- fixed definitions for weather.mode9 and landscape.mode9 which rendered them unusable after modifying
2009-02-22
I removed the QtcConv and LuaConv tools because they lack of syntactical checks and the same functionality is available in m9editor.
EDIT: added the old LuaConv again, seems to work not that bad i thought it would
2009-02-21 - v3.2.0.0
- font changes for various fields to avoid overlapping
- if "manila files dir" is changed in settings, directoryview will be reloaded
- new: directory viewer context menu option for mode9 files: "extract embedded scripts", writes them to script directory
- changed interpretation of UV property (16.16 instead of INT32)
- picture view: new "save as PNG" and "save as QTC" buttons will save your graphic to a selectable directory
2009-02-19 - v3.1.0.1
bugfix for "save tree to file" function
2009-02-19 - v3.1.0.0
time for a new version
- m9editor now remembers last window/splitter positions and restores them on start and returning from minimize
- HOT compare feature: if a mode9 file is loaded, rightclick on the toplevel node to compare with another mode9 file, or save the treeview as a textfile. Compares are done with a freeware tool named "ExamDiff" from PrestoSoft.
2009-02-18 - v3.0.5.0
new context menu functions in directory viewer: delete, copy to
2009-02-17 - v3.0.4.0
content of XML, HTML displayed in lower right panel
evaluation of XML locales in directory viewer
manual is complete, and now a part of the package
2009-02-16 - v3.0.3.1
annotations now work for new tags as well, and will be copied between instances (+corrected a few flaws during display)
new: search within decompiled lua scripts
new: copy annotations between instances of m9editor
2009-02-11 - v3.0.2.0
bugfix: empty value crash
minor improvements
2009-02-10 - v3.0.1.0
some little improvements:
- sourcecode of embedded scripts and .luac files is shown whenever possible
- zoom percentage display for graphics display
2009-02-09 - v3.0.0.0
I've made a lot of changes to improve m9editor. The most important are:
- integration with sztupy's luadec (thanks and credits to sztupy for great decompiler and permission to use, and of course once again to D-MAN666 for providing knowledge)
- import of compiled lua scripts (ANSI or Unicode, autodetected)
- UI reworked: editor, directory viewer, image viewer combined in one window
planned for next releases of m9editor:
- copy files to/from PDA if connected via ActiveSync
- smart-select referenced graphic files in a mode9 file
- selfcheck for consistent mode9 writing
- analysis of lua script "require"'s for valid manila names
download stats:
v.3.2.0.1: 1554 views (wow! impressed!)
Guess I'll have to try that, seems great !
Your editor seems (as you describe it) only able to change values, but not the structure of the mode9 file, do you intend to change that ?
I have an ongoing project of mode9/xml converter in C, if I can be of some help, don't hesitate to ask
Hi Ximoon,
guess you belong to the "intended audience"
At the moment only changing values is allowed, correct. The main reason for this is that i'm unable to interpret and understand the complete structure, and to make sure that writing of m9 files produces valid files. If there's more info on that i could build it into the editor of course.
What i could imagine is a more generic approach, e.g. allow insertion/deletion of tags based on hex-values. I'll give that a thought.
Do you have any detailed info about the tag-structure? It can be seen in the tagfile but as hexvalues. Ive been able to interpret some of them, but the meaning of many others is unknown to me. So m9editor filters most of them for better reading.
Anyway, there's more to come with m9editor. I already built routines to disassemble lua scripts which run fine, but as its output is only relevant to p-code its pretty useless at this time. Also planned is a tool to allow image replacement. That could go to a point where we have a complete workbench for TF3D, including preview and the like. But thats far beyound my current scope.
Nice anyway !
I have no more information than you do, all I got is from the manilla thread where you posted earlier
But in the end, names of the tags doesn't really matter.
For LUA, I found some decompiler on the web, so I guess a tool to convert lua-unicode to lua-ascii and reverse could work to use those tools.
I guess I'll go on with my editor and see what I could do in the end, for two different approches could be constructive !
Must have been ChunkSpy, right? I found many more but mostly outdated and not working for Lua 5.1.
The Lua routines i've already written allow converting unicode to ascii, and save the scripts in ascii respectively. I'll have to recode them in .net as the first quick approach has been VB
Nice start, man
I was waiting for so long since somebody starts public Manila DevKit since i posted specs i reversed
Drop me a PM if you have any questions
Can't wait to use those lua tools
yeah, right D-MAN, most of that thing is based on your findings, my respect m8.
I'll PM you later, gotta go shopping now for newyears eve
6Fg8 said:
yeah, right D-MAN, most of that thing is based on your findings, my respect m8.
I'll PM you later, gotta go shopping now for newyears eve
Click to expand...
Click to collapse
Yah, sure, after NY eve when my hangover is over
oh oh, nice tool thank you
new version has been released, details here
got ean error if i want to open a file..
System.UnauthorizedAccessException: Der Zugriff auf den Pfad C:\Dokumente und Einstellungen\Administrator\Desktop\HTC\tf3d\2c684cd8_manila wurde verweigert.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
bei System.IO.FileStream..ctor(String path, FileMode mode)
bei m9editor.m9efunctions.readm9(String fname, Boolean writedebug)
bei m9editor.m9editor.fileopen_Click(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Click to expand...
Click to collapse
edit: i was write protected.....
schreda said:
got ean error if i want to open a file..
System.UnauthorizedAccessException: Der Zugriff auf den Pfad C:\Dokumente und Einstellungen\Administrator\Desktop\HTC\tf3d\2c684 cd8_manila wurde verweigert.
Click to expand...
Click to collapse
sorry, i dont have that file on my touch HD, cannot test. Are you sure its a mode9 file? Can you upload it here?
schreda said:
edit: i was write protected.....
Click to expand...
Click to collapse
that explains something
hmm.. i'm trying to port the analog clock from the Diamond to the HD.. i must change the Resolution i think but i got a bad result if i change the size var... ( i took the original file from the Hd to compare it
schreda said:
hmm.. i'm trying to port the analog clock from the Diamond to the HD.. i must change the Resolution i think but i got a bad result if i change the size var... ( i took the original file from the Hd to compare it
Click to expand...
Click to collapse
great idea, i'd appreciate to see a analog clock on the HD
new version has been released, details here
wow! finally someone is doing it
thanks and keep up the good work!!!
what i show in screenshot, is it portion of unparsed data?
can one edit them? i tried and failed cause i dont know what to change...
i'm missing: RectF, X, Y, Width, Height
pcarvalho said:
wow! finally someone is doing it
thanks and keep up the good work!!!
what i show in screenshot, is it portion of unparsed data?
can one edit them? i tried and failed cause i dont know what to change...
i'm missing: RectF, X, Y, Width, Height
Click to expand...
Click to collapse
its the value of the tag above, "Viewport". Currently i dont know how to parse that, as its binary and i dont understand the meaning. Could be 8 x Int16, or 4x Int32, or a mixture of that, and even then i wouldnt understand what these values mean. Obviously parameters for Viewport.
Yes, you can edit that, simply overwrite the hexvalues and press enter, it will be written.
Can you shed light into the purpose of these values? I'll be glad to parse them right.
BTW there is a baaad bug in v1.0.2.0 when writing m9, i'm currently correcting that.
6Fg8 said:
its the value of the tag above, "Viewport". Currently i dont know how to parse that, as its binary and i dont understand the meaning. Could be 8 x Int16, or 4x Int32, or a mixture of that, and even then i wouldnt understand what these values mean. Obviously parameters for Viewport.
Yes, you can edit that, simply overwrite the hexvalues and press enter, it will be written.
Can you shed light into the purpose of these values? I'll be glad to parse them right.
BTW there is a baaad bug in v1.0.2.0 when writing m9, i'm currently correcting that.
Click to expand...
Click to collapse
take your time my friend
those ones for Viewport i only know that they are:
<Property Name="Viewport" Type="RectF" X="0" Y="0" Width="31457280" Height="35127296" Animated="False"/>
cause i used D-MAN666's mode9parser, talk with him cause he might help, i hope

(Updated 04.02.11) HIVE AND REGISTRY FILE EDITOR

Hive and registry file editor 2.0.112
A command line utility to work with hv files.
Full Unicode support, and more.
!!! WARNING !!!
Do not use CeRegEditor (cereg) to work with .hv !!!
!!! WARNING !!!
Usage:
HVEdit.exe <rgu>|<dump>|<hive>|<hvm> [-r] [<outputdir>]
<rgu> Build boot.hv from rgu file.
<dump> Build default.hv and user.hv from project folder.
<hive> Output hive file contents to the <hivename.hvm> text file.
<hvm> Build hive file from hvm file.
-r Don't insert *.rgu hash value to the hive.
Release history:
---------------------
V. 2.0.112
+ Some changes.
V. 2.0.035
+ Extract hive to the .hvm text file.
+ Build hive from .hvm file.
V. 1.0.000 (Initial Release)
Don't need Unicode??
and I'm wondering whether the "REGEDIT4" is needed.
btxakita said:
Don't need Unicode??
Click to expand...
Click to collapse
Who spoke?
btxakita said:
and I'm wondering whether the "REGEDIT4" is needed
Click to expand...
Click to collapse
Yes.
NEW Release
V. 2.0.035
Added new functions:
+ Extract hive to the .hvm text file in Unicode format.
+ Build hive from .hvm file.
AnDim
AnDim said:
NEW Release
V. 2.0.035
Added new functions:
+ Extract hive to the .hvm text file in Unicode format.
+ Build hive from .hvm file.
AnDim
Click to expand...
Click to collapse
A dump question I'm sure, I started cooking recently and I'm wondering what I could accomplish with this application. In what scenario would I use it? Thanks, 12
Thanks. One problem I had w/ rgucomp is missing unicode support.
12aon said:
A dump question I'm sure, I started cooking recently and I'm wondering what I could accomplish with this application. In what scenario would I use it? Thanks, 12
Click to expand...
Click to collapse
What exactly is not clear?
Thanks AnDim, this makes GSM -> CDMA SYS porting much easier.
AnDim said:
What exactly is not clear?
Click to expand...
Click to collapse
Well I think I'm starting to understand. As I always have had the luxury of initflashfiles.txt or app.reg and never edited the .hv manually. It was unclear to me why I would need this or what it would add to a kitchen that supports those features (initflashfiles.txt and app.reg)
So does this app have a function in such a kitchen, I mean is there anything I will need to do manually that can't be done otherwise or is this more like a general app so that the hives on any phone can be more easily changed?
Thanks 12
@AnDim, PMed you.
Have anyone used this program? It's not working well for me. I use it fo rgu to hv convert but when i compare the output hv file with cereg alot different files
prpetrov said:
I use it fo rgu to hv convert but when i compare the output hv file with cereg alot different files
Click to expand...
Click to collapse
!!! WARNING !!!
Do not use CeRegEditor (cereg) to work with .hv !!!
how does project folder need to be set up to build default and user hv's?
BUG: Default value is imported and exported incorrectly
If I convert an rgu which contains
Code:
@="one"
"Default"="two"
hvedit overwirtes the default value with "two"
Request: option to specify output file
selyb said:
how does project folder need to be set up to build default and user hv's?
Click to expand...
Click to collapse
HVEdit.exe <My project folder>
Don`t need to be setup. Rgu´s, packages.sof and so on, can be in any sub folders.
selyb said:
BUG: Default value is imported and exported incorrectly
If I convert an rgu which contains
Code:
@="one"
"Default"="two"
hvedit overwirtes the default value with "two"
Click to expand...
Click to collapse
Hey man .... Key name "Default" == Key name @
selyb said:
Request: option to specify output file
Click to expand...
Click to collapse
??? f.e.
AnDim
sorry, I misunderstood. Until now, I didn't know you could use "Default"=
selyb said:
Request: option to specify output file
Click to expand...
Click to collapse
What I mean is like
Code:
hvedit myhive.hv myhive.txt
so hvedit would export myhive.hv to myhive.txt
selyb said:
What I mean is like
Code:
hvedit myhive.hv myhive.txt
so hvedit would export myhive.hv to myhive.txt
Click to expand...
Click to collapse
Usage:
HVEdit.exe <rgu>|<dump>|<hive>|<hvm> [-r] [<outputdir>]
<rgu> Build boot.hv from rgu file.
<dump> Build default.hv and user.hv from project folder.
<hive> Output hive file contents to the <hivename.hvm> text file.
<hvm> Build hive file from hvm file.
-r Don't insert *.rgu hash value to the hive.
AnDim
AnDim said:
Usage:
HVEdit.exe <rgu>|<dump>|<hive>|<hvm> [-r] [<outputdir>]
<rgu> Build boot.hv from rgu file.
<dump> Build default.hv and user.hv from project folder.
<hive> Output hive file contents to the <hivename.hvm> text file.
<hvm> Build hive file from hvm file.
-r Don't insert *.rgu hash value to the hive.
AnDim
Click to expand...
Click to collapse
Hi,
thanks for this software it works great, if you now how to put this commands.
My experience was this:
D:\>hvedit.exe hive d:\hive
or:
D:\>hvedit.exe hive d:\hive\user.hv
I'm getting this:
(HVEdit) !ERROR: failed building DEFAULT hives.
When I copy HVEdit.exe and cereg400.dll to d:\hive and run this:
D:\hive>hvedit.exe d:\hive\user.hv
I'm getting this:
Admsoft (R) HVEdit Version 2.0.035
Hive and registry file editor.
(C) 2009 AnDim, XDA-Developers.
(HVEdit) Extracting user.hv ...
(HVEdit) Done! and only 21.kB of 69kB .hv file
When I run it on system.hv like this:
D:\hive>hvedit.exe d:\hive\system.hv
I'm getting this:
(HVEdit) Extracting system.hv ...
ERROR: C:\MacB\private\winceos\COREOS\filesys\reg\reghive\.\registry.c line 172: Reg: Invalid reghandle 0x20000a61
and 144kB .hvm file of 105kB .hv
I didn't mention it but I was trying to convert .hv to .hvm
Maybe my dump has got some errors in it.
Any idea what is wrong, why the user.hvm is so small?
Thank you AnDim for great software. It is quite difficult to find out utility for ce hive.
After use for a period I would to to report some small problem.
1. Long multi string was trimed. (Maybe fixed length variable in code) See Ex.
Registry key in my rgu file is
REGEDIT4
[HKEY_LOCAL_MACHINE\System\StorageManager\Filters\fsreplxfilt]
"DirsToExclude"=multi_sz:"\\mxip_initdb.vol",
"\\mxip_system.vol",
"\\mxip_notify.vol",
"\\mxip_lang.vol",
"\\cemail.vol",
"\\pim.vol",
"\\Documents and Settings\\default\\user.hv",
"\\Documents and Settings\\system.hv",
"\\Windows\\Profiles\\guest\\Temporary Internet Files\\",
"\\Windows\\Profiles\\guest\\Cookies\\",
"\\Windows\\Profiles\\guest\\History\\",
"\\Windows\\Activesync\\",
"\\Windows\\messaging\\",
"\\Temp\\"
After change to boot.hv and extract back to boot.hvm the Registry is as hereunder.
; Admsoft (R) HVEdit Version 2.0.035
; Hive and registry file editor.
; (C) 2009 AnDim, XDA-Developers.
;
;
; Source file: boot.hv
; Size: 28672 byte
; Hash: e9e4f2edd12c78eeed7aceeaea22c36f
; Boothash: 1ef4fb8f2b109c0757709e7f46c71a20
; Build tool: HVEdit v2.0
[HKEY_CLASSES_ROOT]
[HKEY_CURRENT_USER]
[HKEY_LOCAL_MACHINE\System\ObjectStore\RegistryUpdate]
"boot.rgu"=hex:1E,F4,FB,8F,2B,10,9C,07,57,70,9E,7F,46,C7,1A,20
[HKEY_LOCAL_MACHINE\System\StorageManager\Filters\fsreplxfilt]
"DirsToExclude"=multi_sz:"\\mxip_initdb.vol",
"\\mxip_system.vol",
"\\mxip_notify.vol",
"\\mxip_lang.vol",
"\\cemail.vol",
"\\pim.vol",
"\\Documents and Settings\\default\\user.hv",
"\\Documents and Settings\\system.hv",
"\\Windows\\Profiles\\guest\\Temporary Internet Files\\",
"\\Windows\\Profiles\\guest\\Cookies\\",
"\\Windows\\Profiles\\guest\\History\\",
"\\Windows\\Activesync\\"
[HKEY_USERS]
; (HVEdit) Done!
2.The size of hv file is larger than original. (This is not effect functional just file size is increase from 732kb to 744kb for instance.)
After investigate, there was extra length on data key which have length just fit 32 bits size. (Maybe when adjust cell size to fit 32 bits)
Hope my comment will be some benefit for you for next version.
Regards,
AnDim said:
Hive and registry file editor 2.0.035 (C) 2009 AnDim
A command line utility to work with hv files.
Full Unicode support, and more.
!!! WARNING !!!
Do not use CeRegEditor (cereg) to work with .hv !!!
!!! WARNING !!!
Usage:
HVEdit.exe <rgu>|<dump>|<hive>|<hvm> [-r] [<outputdir>]
<rgu> Build boot.hv from rgu file.
<dump> Build default.hv and user.hv from project folder.
<hive> Output hive file contents to the <hivename.hvm> text file.
<hvm> Build hive file from hvm file.
-r Don't insert *.rgu hash value to the hive.
Release history:
---------------------
V. 2.0.035
+ Extract hive to the .hvm text file.
+ Build hive from .hvm file.
V. 1.0.000 (Initial Release)
(C) 2009 AnDim
Click to expand...
Click to collapse
This seems to be JUST what I am looking for .... but I am having problems trying to use I suspect is simply a case of finger-trouble on my part, so will greatly appreciate any help available from AnDim or any other users who can point me in the right direction, please.
I think I correctly understand the command line syntax and have run HVEdit to unpack a default.hv registry file taken from a dumped ROM (Toshiba TG01). I then made some basisc edits to the resulting .hmv file and used HVEdit again to recompile back to .hv.
When the ROM is recompiled and flashed it refused to boot. So I went back and tried using HVEdit to convert to .hmv and back without making any changes. Same problem.
I have attached the .bat files i used to run for reference....View attachment 305797
I have been reading about a need to insert REGEDIT4 at the start of the file; have tried doing so but that just results in an error.
Any guidance will be greatly appreciated
Request Response !!
Is anyone able to offer any assistance on this question please
Help will be much appreciated !
kevinpwhite said:
This seems to be JUST what I am looking for .... but I am having problems trying to use I suspect is simply a case of finger-trouble on my part, so will greatly appreciate any help available from AnDim or any other users who can point me in the right direction, please.
I think I correctly understand the command line syntax and have run HVEdit to unpack a default.hv registry file taken from a dumped ROM (Toshiba TG01). I then made some basisc edits to the resulting .hmv file and used HVEdit again to recompile back to .hv.
When the ROM is recompiled and flashed it refused to boot. So I went back and tried using HVEdit to convert to .hmv and back without making any changes. Same problem.
I have attached the .bat files i used to run for reference....View attachment 305797
I have been reading about a need to insert REGEDIT4 at the start of the file; have tried doing so but that just results in an error.
Any guidance will be greatly appreciated
Click to expand...
Click to collapse

Auto Installer Tool

Auto Installer V1.0
Synopsis:
I've written a small utility with a whole mix of features, primarily designed to enable easy setup of your favourite cabs, shortcuts, icons etc...
It's written in Mortscript, but you don't need to worry about that... everything is installed from a plain text INI file:
Features:
-Specify which cab files to install automatically (silently, or with user interaction)
-Specify which registry entries to create / modify
-Specify Hi-Res custom icons for your applications and tools (WM6.5 Only)
-Specify which shortcuts to create in the Start/Program Files menu
-Specify the Start/Program Files menu structure (groups/folders etc)
-Specify TF3D shortcuts for Manila 2 and 2.5
-Specify TF3D weather locations for Manila 2 and 2.5
-Specify HTC Task Manager 'x' button options
-Specify Windows Screen Font Size
-Choose to execute every item in your setup config, or just execute specific sections.
Coming Soon Features:
-Specify files you'd like to back up
-Specify tasks to kill before install
-Specify tasks to start after install
Installation Instructions:
-Download zip file here: AutoInstaller V1.0
-Extract the zip file to a folder of your choice on your device (preferably on the SD Card so that it's not lost after a hard reset!
-Read the usage guidelines
-That's it
Usage Guidelines
Usage Guidelines:
The application contains 3 files:
1) AutoInstaller.exe (this is the main executable file)
2) AutoInstaller.mscr (this is the source code for the script. Do not modify this file unless you're a script programmer)
3) AutoInstaller.ini (this the file that you edit to configure)
All three files MUST reside together in the same folder (any folder)
AutoInstaller.ini and how to:
Cab File Installation
You can install multiple cab files using the [Cab Install] section of the ini file.
The format of each entry in the section must be as follows:
<Unique Friendly Name>=<Cab filename>,<Silent install>
<Unique Friendly Name> MUST be unique, but is just any friendly string identifying the cab to be installed.
<Cab filename> is the full path to the cab file to install
<Silent install> determines if the installation should be silent (TRUE) or interactive (FALSE). Note: Most cab files will install silently, but some will still force user interaction. This is not a problem, but be aware that some files do this.
Also be aware, that if a cab file forces a reboot of the device without asking, then this cab is not suitable for installation via this script, since a reboot will terminate the script.
Example:
[Cab Install]
Facebook =\Storage Card\Setup\Install Cabs\Facebook\Facebook_v1.0.0.7p.cab,TRUE
Google Maps=\Storage Card\Setup\Install Cabs\Google Maps\GoogleMaps.cab,TRUE
My Mail Settings=\Storage Card\Setup\Install Cabs\My Mail Settings\MyMailSettings.cab,TRUE
SPB Wireless Monitor=\Storage Card\Setup\Install Cabs\SPB Wireless Monitor\SpbWirelessMonitor3.arm.cab,TRUE
Total Commander=\Storage Card\Setup\Install Cabs\Total Commander\tcmdpocketarm.cab,TRUE
WunderRadio=\Storage Card\Setup\Install Cabs\WunderRadio\wunderradio_ppc.cab,TRUE
Panoramic Calc Pro=\Storage Card\Setup\Install Cabs\Panoramic Calc Pro\PanoramicCalcPro.cab,TRUE
Neos Driver Pack=\Storage Card\NeoS2007_Driverpack_3.cab,TRUE
Registry Writes
Registry entries to be created/written can be specified in the [Registry_Writes] section of the ini file.
The format for each entry in the section must be as follows:
<RegistryKey>=<>,<Value>
<RegistryKey> is the full path of the key to be written
<Type> is the type of value to be written to the registry, it may be STRING, DWORD or BINARY
<value> is the actual value to be written
Example:
[Registry_Writes]
HKCR\CLSID\{DD9B73F6-9EED-4ED0-84CF-422AF83512DB}\fileext=STRING,6a5KkkrKKwKK
HKLM\Software\jeyo\WunderRadio\regcode=STRING,12345678931B
HKLM\Software\jeyo\WunderRadio\regver=STRING,151W14
Usage Guide
Create Shortcuts
Shortcuts to be created can be specified in the [Create Shortuts] section of the ini file.
The format for each entry in the section must be as follows:
<shortcut file to create>=<file to link to>
<shortcut file to create> is the full path of the shortcut file to be created
<file to link to> is the full path of the target file being linked to
Example:
[Create Shortcuts]
\Windows\Start Menu\Programs\iGO8.lnk=\Storage Card\igo8\iGO8.exe
\Windows\Start Menu\Programs\Reboot.lnk=\Storage Card\Scripts\reboot.mscr
Move Files
Files to be moved may be specified in the [Move Files] section of the ini file.
The format for each entry in the section must be as follows:
<Source File>=<Destination File>
<Source File> is the full path of the file you wish to move
<Destination File> is the full path of the file you wish to move it to
Example:
[Move File]
\Windows\Start Menu\Programs\iGO8.lnk=\Windows\Start Menu\Programs\Navigation\iGO8.lnk
\Windows\Start Menu\Programs\reboot.lnk=\Windows\Start Menu\Programs\Utils\iGO8.lnk
Create Custom Icons (WM6.5 Only)
Custom Hi Res Icons in PNG (with transparency) may be specified in the [Custom Icons] section of the ini file.
The format for each entry in the section must be as follows:
<Start menu link file>=<png file>
<Start menu link file> is the path of the lnk file RELATIVE to the \Windows\Start Menu\Programs folder
<png file> is the full path of the desired png file to use for the custom icon. NOTE: the png file MUST be exactly 90x90 pixels.
Example:
[Custom Icons]
iGO8.lnk=\Storage Card\Custom Icons\iGO8.png
Google Maps.lnk=\Storage Card\Custom Icons\Google Maps.png
TF3D Shortcuts
TF3D V2 or V2.5 shortcuts can be specified using the [TF3DV2 Shortcuts] or [TF3DV2.5 Shortcuts] section of the ini file.
The format of each entry in the section must be as follows:
<shortcut index>=<friendly name>,<shortcut target>
<shortcut index> is the position / index of the shortcut entry (0 to 17 for TF3D V2) or (0 to 8 for TF3D V2.5)
<friendly name> is the friendly name of the shortcut that will be displayed on the TF3D screen
<shortcut target> is the full path of the target file
Example:
[TF3DV2 Shortcuts]
0=Igo8,\Storage Card\igo8\iGO8.exe
[TF3DV2.5 Shortcuts]
0=Igo8,\Storage Card\igo8\iGO8.exe
3=Google Maps,\Google\Google Maps.exe
TF3D Weather Locations
TF3D (V2 or V2.5) weather locations can be specified in the [TF3D Weather Locations] section of the ini file.
The format of each entry in the section must be as follows:
<weather index>=<weather location>
<weather index> is a value from 0 to n representing the order/index of the weather locations
<weather location> is a specially formatted location string identifying the location (more in this later, there's a utility to 'grab' them included in the installer!
Example:
[TF3D Weather Locations]
0=EUR|UK|UK001|ABERDEEN
1=EUR|UK|UK001|LONDON
2=EUR|UK|UK001|BRISTOL
3=EUR|UK|UK001|LIVERPOOL
Screen Options
Screen option can be specified using the [Screen Options] section of the ini file.
The format of each entry in the section must be as follows:
<option name>=<value>
<option name> is either TextSize or TrueType
<value> depends on the <option name> for TextSize it can be Tiny, Small, Medium, Large or ExtraLarge. For TrueType it's either True or False.
Example:
[Screen Options]
TextSize=Tiny
TrueType=True
Reserved 3
Reserved for even more instructions
I'll give it a bash next time I flash a rom but it sounds a lot like Sashimi
crankshaft said:
I'll give it a bash next time I flash a rom but it sounds a lot like Sashimi
Click to expand...
Click to collapse
I strongly suspect it is... although I'm guessing a lot smaller and simpler...
I wasn't aware of Sashimi until you mentioned it, and I'm checking it out, although it looks pretty comprehensive, it also looks quite daunting.... meaning you may as well have written the installation in Mortscript in the first place by the time it's all configured!
However, I suspect there's a couple of nice little things in my script (like the custom icons, and TF3D weather etc that folks might find useful... I wrote it for myself, but thought I'd share!
have a little problem
when i run the AutoInstall.exe this error comes
There is no application associated with "AutoInstaller". Run the application first, then open this file from within the application
abzza,
You need MortScript installed.
I did tried. For some of my application which required manual interaction,
runwait doesn't do the proper thing as it continue on next cab installtion when some
manual dialog popped up.

[APP][27-Dec-09] LuaTool 1.2 - Lua Decompiler, Compiler and Compare

Intro:
This is an all-in-one tool for decompiling, compiling and comparing lua scripts found in Manila (TouchFLO 3D / Sense).
All this is a continuation of sztupy's original work: Lua 5.1 tools.
General:
LuaTool consists of 4 parts: Lua decompiler, Lua compiler, Lua compare utility and a Manila file type detection utility.
LuaDec 3.2 - Lua decompiler
Notes on latest version:
Major overhaul of the local finding algorithm. Most lua scripts can now be fully decompiled without a problem.
Manila 2.5.1921 has a total of 703 scripts (including embedded scripts). LuaDec can fully decompile 663 files. That's a success rate of 94.31%.
General notes:
LuaDec automatically checks if the output file was decompiled successfully.
If it wasn't, LuaDec will also output the disassembly and compare file.
In case the decompile was 100% good, LuaDec will only output the standard .lua file as before.
LuaC 1.2 - Lua compiler
Binary function replacement:
LuaC can directly replace functions in compiled luac files. This can be useful if the luac file can't be fully decompiled, but only a small part of the file needs to be edited. Some more info on function replacement.
Continue statement:
The "continue" statement has been added to the Lua Compiler.
Lua doesn't officially support continue statements, but it looks like HTC added it for their needs, so I'm following their lead.
Usage and versions:
Code:
LuaTool 1.2 by Co0kieMonster
Usage: LuaTool <task_select> [task_options] <task_input>
Tasks:
/decompile (or /d) -- Lua Decompiler
/compile (or /c) -- Lua Compiler
/compare (or /cr) -- Lua Compare utility
/detect (or /dt) -- Manila file type detect utility
LuaDec 3.2
Usage: LuaTool /decompile [options] <inputfile>
Available Options:
-o <filename> specify output file name
-dis don't decompile, just disassemble
-f <number> decompile/disassemble only function number (0 = global block)
LuaC 1.2
Usage: LuaTool /compile [options] <inputfile>
Available Options:
-o <filename> specify output file name
-s strip debug information
-r <n> <luac_file> replace function <n> in <luac_file> with <inputfile>
LuaCompare 1.2.1
Usage: LuaTool /compare [options] <original.luac> <newfile.lua(c)>
Available Options:
-o <filename> specify output file name
-s side by side file comparison
-du disable underline
ManilaDetect
Usage: LuaTool /detect <inputfile>
LuaTool changelog:
# LuaTool v1.2
-updated LuaDec to v3.2, LuaC to v1.2 and LuaCompare to v1.2.1
# LuaTool v1.1
-updated LuaDec to v3.1, LuaC to v1.1 and LuaCompare to v1.2
LuaDec changelog:
# LuaDec v3.2
-Local guesser improvements
---major overhaul - gives much better results
-Conditionals handling improvements
---fixed elseif not being recognised in some cases
---added partial support for complex inline boolean assingment
-General improvements
---fixed single function decompile
---fixed table assignments where there are more then 16 values
---better error handling
# LuaDec v3.1
-Conditionals handling improvements
---wrote a brand new algorithm for handling complex logic expressions
---fixed falsely detected generic for loops
---fixed misplaced if end, because of end-to-break optimization
-Local guesser improvements
---declarations at CALL before RETURN
-General improvements
---fixed indents not behaving properly in some cases
---fixed LOADNIL assignments where the destinations are local variables
---decompiler now displays success rate after decompile
---added SETLIST handling
# LuaDec v3.0.4
-General improvements:
---added back error messages
---fixed variable arguments handling
---fixed multiple inline assignments
---fixed a rare if ending misplacement
-Local guesser improvements at:
---inline bool assignments
---table in table situations
---TAILCALLs
---CALLs which return multiple results
---locals declared just before TEST ops
---SETTABLE where b isn't a constant
# LuaDec v3.0
-core rewrite and cleanup
-more accurate especially with conditionals and loops
-some miscellaneous accuracy improvements
-added extra info to script header (date, time, file name and manila name)
-LuaCompare updated to v1.0.1 (compatibility)
# LuaDec v2.1
- Less crashing:
--- added a failsafe for crashing on bad registers
--- fixed crash on SETUPVAL
--- fixed crash on SETLIST
- Better conditional handling:
--- fixed handling of deeper nested else and elseif
--- fixed handling of empty if-end and else-end blocks
--- added break handling
- Better table handling:
--- fixed inline table assignments
--- fixed handling of numerically indexed tables
- Adjustments to local guesser:
--- fixed guessing for inline table assignments
--- fixed guessing for SETGLOBAL and SETUPVAL at PC 1
LuaC changelog:
# LuaC v1.2
-added binary function replacement
# LuaC v1.1
-added "continue" statement
LuaCompare changelog:
# LuaCompare v1.2.1
-small change to support single function decompile
# LuaCompare v1.2
-pre-compare disassembly is now done internally instead of writing to disk and reading
-added a console message with match percentage
# LuaCompare v1.1
-initial version integrated in LuaTool
Go co0kiemonster! You da man!
boy oh boy ... cant believe that, thanks
time to get back to the keyboard and do some hack0r's stuff
see you guys
I like the new compare output a lot! Saves some lines in the manilatool.cmd as well. Do you plan on updating all the ruby tools or just the compare?
Muchos gracias
12aon said:
Do you plan on updating all the ruby tools or just the compare?
Click to expand...
Click to collapse
Probably all (except luadecguess, which is redundant because luadec has an internal guesser since version 2.0). But I hadn't planned on doing it any time soon - right now, luadec is keeping me pretty busy. I'm doing a semi-rewrite of it in order to inject some OOP love (port to C++) and then hopefully make a proper conditionals and loops engine.
I don't mind OOP love . Hey I somebody came with this idea about luadec but as it turned out I misunderstood him. He was actually talking about the m9editor. Nevertheless the idea is good. You tell me if it's doable.
Wouldn't it be a good idea to include the full manila name in the lines of code as well (If known). Going a bit further might it not be an even better idea to include some more diagnostic info there.
Thing I can think of are manila version (although I can't imagine a foolproof method), date, full manila path name maybe some diagnostics.
You know I'm going to keep you occupied right?
12aon said:
Wouldn't it be a good idea to include the full manila name in the lines of code as well (If known). Going a bit further might it not be an even better idea to include some more diagnostic info there.
Thing I can think of are manila version (although I can't imagine a foolproof method), date, full manila path name maybe some diagnostics.
Click to expand...
Click to collapse
Full manila name and date aren't a problem. I'll add them in the next release.
Manila version would have to be set by the user so that's a bit problematic. But it would be great to have. I'll try to think of good way to add it.
As for diagnostics: Did you mean adding something other than the "-- DECOMPILER ERROR: ... " lines, or just making those lines a bit more useful?
12aon said:
You know I'm going to keep you occupied right?
Click to expand...
Click to collapse
I'm counting on it
Co0kieMonster said:
Full manila name and date aren't a problem. I'll add them in the next release.
Manila version would have to be set by the user so that's a bit problematic. But it would be great to have. I'll try to think of good way to add it.
As for diagnostics: Did you mean adding something other than the "-- DECOMPILER ERROR: ... " lines, or just making those lines a bit more useful?
I'm counting on it
Click to expand...
Click to collapse
The version number can be found in a package here:
Code:
[HKEY_LOCAL_MACHINE\Software\HTC\Manila]
"Version"="2.1.19193517.0"
That's either the .reg or .rgu file
It can also sometimes be found in the package name. But these things are very unpredictable. In that sense it could only be used as an extra. I don't know if any of the exe's in the package hold the info.
By diagnostics I was referring to my lack to come up with anything else. I hoped your developer instincts would lead you to add in the rest for me. But now that I think of it maybe something amount of errors in the script or amount of opcodes, maybe the number of functions. I don't know why, or how it would be useful so probably just leave out that part. Unless you disagree of course,
12
12aon said:
You know I'm going to keep you occupied right?
Click to expand...
Click to collapse
LOL 12 has a new toy!
I guess it would be dumb to ask if you intend to use this in your Manila kitchen! LOL
Asphyx said:
LOL 12 has a new toy!
I guess it would be dumb to ask if you intend to use this in your Manila kitchen! LOL
Click to expand...
Click to collapse
It is already part of the kitchen , co0kie has been helping us for a while now. He is the one who added the lua scheme to notepad2
Ive been trying to use this on the lua files in the sprint hero but no matter what i try i get the error "Bad header in precompiled chunk"
Any thoughts/ideas?
You sure hero's got lua files? Would you mind sharing them?
12
pentace said:
Ive been trying to use this on the lua files in the sprint hero but no matter what i try i get the error "Bad header in precompiled chunk"
Any thoughts/ideas?
Click to expand...
Click to collapse
Might be a different encoding.
Can you upload a few of the files so I can check it out?
Version 3.0 is up
Some info:
Version 3.0 is a complete rewrite of LuaDec. It's more accurate then 2.1, especially when large loops are involved. It might just need a little bit more tweaking but conditional and loop handling is almost perfect. The next big thing to tackle is local guessing, and that will come in a later version.
LuaDec has also generally been cleaned up, so no more obsolete command line switches or memory leaks.
It can also retrieve the full manila name and add it to the file header. E.g.: if you decompile 0bd9db81_manila, LuaDec will add \windows\htc\people\scripts\people\peoplegroupdeta il.luac to the decompiled script header for better reference. For this to work you need to have the m9editor.names.txt file in the same folder as LuaDec.
Now that I've done this rewrite I should be able to accelerate development. And there are some cool new feature coming in future versions.
Decompile Luaplugins for lightroom
Hi,
I just wondering if it is possible to use this to decompile any lua files, the one i'm looking for is decompiling lightroom plugins
skrollster said:
Hi,
I just wondering if it is possible to use this to decompile any lua files, the one i'm looking for is decompiling lightroom plugins
Click to expand...
Click to collapse
LuaDec has been tuned specifically to HTC's Lua variant. Theoretically it should decompile any Lua 5.1 scripts, but it might be incompatible with the character and number encodings of non-HTC scripts. I'm not sure about the specifics, since those adaptation were done before my development efforts - see here for some of the details: http://forum.xda-developers.com/showpost.php?p=3466886&postcount=249
You can always give it a try and see what happens. It can't hurt
Co0kieMonster said:
LuaDec has been tuned specifically to HTC's Lua variant. Theoretically it should decompile any Lua 5.1 scripts, but it might be incompatible with the character and number encodings of non-HTC scripts. I'm not sure about the specifics, since those adaptation were done before my development efforts - see here for some of the details: http://forum.xda-developers.com/showpost.php?p=3466886&postcount=249
You can always give it a try and see what happens. It can't hurt
Click to expand...
Click to collapse
It just gave me an almost blank file, the only thing in it was some stuff i guess you add to all files
skrollster said:
It just gave me an almost blank file, the only thing in it was some stuff i guess you add to all files
Click to expand...
Click to collapse
Yeah, that's definitely because of the different encodings. Sorry, but I guess it's not going to work.
Too bad really, is it possible to create a decompiler for the encoding used for adobes applications? if so, is it much work to change it?
I'm not sure. Upload one or two lua files so I can take a look.

Categories

Resources