yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Development and Hacking General] smotrs:
Aghh, ok, I see what you mean now. For XP, I believe it's the following,

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting] DoReport = 0

Gotta try it thought to make sure, but I believe that's it.
[Windows Mobile Development and Hacking General] sztupy:
203 ready, 153 to go
[Windows Mobile Development and Hacking General] smotrs:
Here's a slightly offtopic question for you guys. In a mode9 file when it comes to a list selection you get the following line,

<CharacterReference> LibraryName=listselector.mode9 Value="0"​

which references a couple images that show hilight and pressed states. Now, I know I can change the physical image, but I don't want to do that because the images are used elsewhere in other mode9 files.

What I'd like to do is change the overall height of the image within the mode9 file. So that when that mode9 file is using the selector, its one height and all other mode9 files use the default. But I haven't see an instance of specifying the dimensional state of the listselector.

Anyone else seen a method to control it?
[Windows Mobile Development and Hacking General] showaco:
Glad your getting those ready, I'm hoping to be running tp2 manila on my touch pro by tomorrow:D(hoping pfcsabre gets his rom out as promised anyway, keeping fingers crossed)
[Windows Mobile Development and Hacking General] xboxmod:
wonderfull news

thanks a lot sztupy this is really a good news for my project.

bye
[Windows Mobile Development and Hacking General] sztupy:
220 ready. starts getting harder :) Found a lot of scripts that have screen size infos embedded (lots of references to numbers 480 and 800)

If someone modifies these scripts then please share the modified source code too!
[Windows Mobile Development and Hacking General] NisseDILLIGAF:
Great work sztupy!

Any progress on 2a3d01cc_manila (manila.luac)...?

I'm trying to decompile it, but ends up with errors every time :(
[Windows Mobile Development and Hacking General] sztupy:
2a3d01cc_manila is a big fish :) I'm working from the trivial ones to the complex ones, so that will come later, but I think I'll look at it next... Looks nice ;) Is this one that handles the tabbar, or is that some else?

EDIT:

now at least it compiles

Global:
Opcodes in original: 2939
Same lines in both files: 1497 50%
Same opcodes in files: 1800 61%

now this won't be easy :) the decompilation had constructs I've never seen in the 230 files I already processed
[Windows Mobile Development and Hacking General] smotrs:
So, after running the luadecguess on some given files and getting the semi-colon string. I ran the string against the file using luadec which generated a decompiled representation of the original but there are obviously still issues.

So how do you go about correcting the issues so that it correctly decompiles? What do you do next?
[Windows Mobile Development and Hacking General] sztupy:
I correct the file manually. I usually use compare to check for the differences, then correct the decompiled file manually using the output I get. There are a lot of constructs for which I now how to manually correct the file.

Usually the problem lies in missing locals, this is the problem in around 65-75% of the cases. If the first different opcode/line in the output of compare is a different GETGLOBAL statement, or a different global is loaded then in 95% of the cases this means that around that opcode one needs do declare a local. Although this is a usual error, it takes a lot of time to handle it correctly, and guessing where HTC had put these declarations is a tiresome job.

If 100% of the opcodes are the same then you can be 90% sure that there is a missing local, that doesn't do anything, and the decompiler created a more optimized program than HTC has, but for the 100% same output one has to correct this too.

I found some more algorithmized way to get a better guess, but I don't think it will ease the manual job any further (they might make luadecguess faster though, but it has already runned for me for all the scripts, so that's not a concern for me)

The second usual problem is misaligned conditional statements. If the first few lines of the comparison shows IF-s that JMP to different places then this ususally means two things:

1. missing locals (as usual :) )

2. there is a complex, multi-leveled if-then-elseif-end construct and the elseif/else/etc. part is not where it supposed to be

Correcting the latter means usually a lot of $#%$# word leaving my mind :)

Until now I never found any other problem with the output. Of course the hardest scripts are ahead of me, and they might give me some more head-scratches, but looking at the disassembly output and the output of the compare script is usually enough to know what to change. Sometimes I also run luadec with the "-a" parameter or with "-l ;1,1,1,1,1,1,1,1,1" or something similar. This way every register will be declared local and so there are no decompiler errors, but cleaning the mess of the output is a very tiresome job. For this part I might create a cleanup script, that would help me a lot...

So to answer the question: after the first 150 scripts, that were decompiled without problems I had to resort to manually changing the scripts. The first few were easy, but I'm going from the scripts with only minor errors to the scripts that have a lot of errors, and they get harder and harder to solve (but fortunately I get to know the disassembly output better and better too :) )
[Windows Mobile Development and Hacking General] smotrs:
Sounds pretty good. So when you use the Compare program, are you comparing the original compiled file against the decompiled then recompiled file or comparing somethign else?
[Windows Mobile Development and Hacking General] smotrs:
Edit, Double Post.
[Windows Mobile Development and Hacking General] sztupy:
Yes, compare compares the original to the compiled version of the decompiled file. If it says "same" for all functions then the file is ready and I get onto the next one :) If not, then I check the error list and correct the file according the output.
[Windows Mobile Development and Hacking General] sztupy:
231 scripts INCLUDING 2a3d01cc_manila.luac.lua (the base lua file) Decompiling the last one took me 4 hours, but it was worth it :) It's the one that has the screenHeight and screenWidth information so tabs are now shown on portrait mode under VGA too.

If you use and modify these scripts then please do me a favour and post the modified scripts too. Thanks!
[Windows Mobile Development and Hacking General] NisseDILLIGAF:
Thanx!

Again, Great work sztupy!
[Windows Mobile Development and Hacking General] bedoig:
You rock! Can't wait to get it running on my Pro.

Just dropped you a little motivational donation :) Thanks for all your hard work!
[Windows Mobile Development and Hacking General] smotrs:
Excellent work sztupy, I keep checking to see if you have gotten to the 27a13690 as that's the one I need. Still working on it on my own but if you got it first, that would help greatly. :)
[Windows Mobile Development and Hacking General] sztupy:
as I see that's a hard one too :)
[Windows Mobile Development and Hacking General] sztupy:
thanks man, will buy some coffeine ;)
[Windows Mobile Development and Hacking General] sztupy:
two hundred thirty six
[Windows Mobile Development and Hacking General] smotrs:
Ok, so what have you done when you can't even get it to compile? When I attempt to compile the lua file, I get a "function argument expect near blah blah" but when I look, it's no where near where a function is. There's some variables in that area, but nothing that looks like a function.

You've been doing this allot longer so I'm guessing you've come across a similar situation.
[Windows Mobile Development and Hacking General] sztupy:
I fix the code so it compiles. If there is an error output somewhere then that doesn't mean the error is there, it may be all around the code :) You can decompile per function (-f 1, etc.) to get the most of the stuff out
[Windows Mobile Development and Hacking General] 12aon:
For luadeguess you need a regular (non-converted) manila file right. This luac already right or am I lost? 12
[Windows Mobile Development and Hacking General] sztupy:
all of my tools work with ASCII lua files. So first convert them to ascii, then run my tools, decompile, compile, etc. After done convert back to unicode.
[Windows Mobile Development and Hacking General] smotrs:
Ok, and when you decompile an individual function, you still use the -l string against it, correct? I'm guessing yes.
[Windows Mobile Development and Hacking General] sztupy:
yes, the same l string.
[Windows Mobile Development and Hacking General] sztupy:
I started working on larger scripts because they are more "fun" and they make me want to watch HTC developers burn in fire :D

But really. Look at this: completely waste of space and ultimately undecompilable:

local res = -1
if SoundPageGetNewRingTones then
if (a >= 0 and a <= 3 and b >= 0 and b <= 3) or
(a >= 4 and a <= 4 and b >= 4 and b <= 4) or
(a >= 5 and a <= 8 and b >= 5 and b <= 8) or
(a >= 9 and b >= 9)
then
res = 0
end
else
if (a >= 0 and a <= 3 and b >= 0 and b <= 3) or
(a >= 4 and a <= 4 and b >= 4 and b <= 4) or
(a >= 5 and a <= 7 and b >= 5 and b <= 7) or
(a >= 8 and b >= 8)
then
res = 0
end
end
return res

This one even resisted my

-l ;;0,7;0,33;0,4,5;;;;;;0,6,12,16;;0,4,54,82;0,0,10,16,20,34;0,8,12;0,0,8,12;0,1;0,0,1;;0,0,7,16,20;0,8,12,16,20,24,77;3;3;3;3;3;3;3;;;0,0,0,4,5;;;0,4,9,13,17,21,25;0,4,9,13,17,21,25;0,0,0,0,0,0,0,0,4,8,12,16,20,24,28;0,0,4,8,12,16,20,24,28,32,36,40,44,133;;0,0,1;;;;;

LDS string :)

244 scripts including:

Audiomanager (was embedded in music.mode9)

CalendarMonthView

Transitions

PeopleFBLoginPage

Stock_detail

PeopleAllScript

PeopleMessage

SoundSettingsScript

Usual disclaimer: If you use and modify this scripts in your project then be so kind and share their source code too! Thanks. (if you don't I will decompile it, print it out 4 times. Then I'll find you and make you eat all of them!!!)
[Windows Mobile Development and Hacking General] D-MAN666:
Yeah, i mentioned before, that TouchFlo3D (not manila platform, surprisingly) was coded by three drunk/LSD'd monkeys. ;)
[Windows Mobile Development and Hacking General] sztupy:
yeah... thought about correcting all the bugs I've found during decomp'ing :)
[Windows Mobile Development and Hacking General] 12aon:
ok I'm having a problem with brute forcing the 09a70371_manila, I converted it to ascii with m9editor and executed this cmd: luadecguess -d -t 1 09a70371_manila and I get this error: unable to open input file "09a70371_manila" what am I doing wrong?
[Windows Mobile Development and Hacking General] sztupy:
strange. Could you send me the whole error output?
[Windows Mobile Development and Hacking General] 12aon:
That's it! That's the only error I get. Here's the file:confused:
[Windows Mobile Development and Hacking General] sztupy:
:D:D:D:D

I just found out that I'm working on 09a70371_manila.luac at the moment too :)

-l ;;;;;2,4;0,11;;0,0,13;0,9,77,80;;;;;;;;;;;1;;0,0,0,4,15;0,6;;;;;;;0,0,16,20;;0,0,9,20;0,3,13;;;;;;0,0,0,4;0,9;;;;;0,0,0,4;0,9;;;;24,41;;;;;;;;;;;;;;30;;

but it might crash older luadec (the latest one I didn't upload yet)

btw If that's the only error you get then there might be some path errors...
[Windows Mobile Development and Hacking General] sztupy:
decomp'd and go
[Windows Mobile Development and Hacking General] 12aon:
Thanks hombre, I'm helping xboxmod a bit with resizing the TP2 manila, but that guy is a machine he had already resized the weather tab when I last talked to him (I needed it decompiled for that :)). But you are really pioneering all this man. We are going to love you for phone generations to come, 12
[Windows Mobile Development and Hacking General] smotrs:
Would one of you with the TP2 files post the 27a13690_manila file for me? or PM me where the ROM is and I can extract it. I've been trying to find where the ROM is and haven't had any luck finding it.
[Windows Mobile Development and Hacking General] 12aon:
Sure hombre, why do you need it?
[Windows Mobile Development and Hacking General] sztupy:
LuaDec 0.6

Hi!

Don't worry about me being slower, I am going from the hardest scripts to the easier ones now. 251 done. New additions:

Weather

CalendarPicker

stock_quote

WorldClock/ClockView

People/peopleDetail

Messaging

Internetportal

Also there is LuaDec 0.6

Less crashing when encountering booleans

New luadecguess with "fast guess" mode

More happy faces :)

The new "fast guess" mode usually works very fine with _large_ scripts (more than 10k). For smaller ones the original mode usually gets better results, but smaller scripts have already been decompiled :)

Usage:

luadecguess -fg 1 filename

the last line it outputs will be the LDS string. Sometimes (well around 50% of the cases) this LDS string will make luadec crash, which means the fast guessed LDS wasn't fine.

To solve this issue one have to run luadec with the -d option set (and with the LDS), and check on where it crashed (which function, which opcode). Then you have to manually modify the LDS string (usually putting a smaller number in the appropriate place should do the job) To get the appropriate "smaller number", luadecguess with fg mode on will list out useful informations about where locals can be defined.
[Windows Mobile Development and Hacking General] smotrs:
12, thanks, I was hoping to see how close it was to the HD version compared to the regular TP version. It looks like it follows the regular TP version. When I insert it into the Weather Tab CAB, it doesn the same thing the standard TP version does.
[Windows Mobile Development and Hacking General] smotrs:
Wow, you are just awesome. I'm just trying to decomp one file and your pumping them out left and right. Gonna try some of your newly posted tips and see how much further I can get on the HD version of that file.

Keep up the good work. :D
[Windows Mobile Development and Hacking General] sztupy:
Got a rack of Cola for present ;)
[Windows Mobile Development and Hacking General] sztupy:
What do you mean by dependent? (btw. use 0 as the first number in your LDS)
[Windows Mobile Development and Hacking General] smotrs:
Great information, I put everything into a debug file so I can look at the relevant information and see what's there. What I don't see though is where the crash occurred.

It spewed out a whole bunch of lines and then finished with the following on the screen

----------------------------------------------
5 LOADK 0 3

next bool: 1
locals(1): 0{l_11_0}
vpend(0):
tpend(1): 0{l_11_0}
()
-- DECOMPILER ERROR: Overwrote pending register. Missing locals? Creating them

local l_11_0 = ""

----------------------------------------------
6 GETGLOBAL 1 4

Exps(0): at 3 dest 6 neg 1 (cityListSize < 10) cpd -1

Stored at endif list: <6>

I think it's referring to function 5, but I'm not sure. Also, I got the same output with and without a 0 as the first LDS number.
[Windows Mobile Development and Hacking General] 12aon:
Could you explain a little more, about how to add th numbers in the locals (that's what LDS is right?). I don't understand yet. As for the script, when I change the red values in the script it changes landscape size as well as portrait size. In that way dependent, and now I'm wondering how to change the landscape independently, so I hoped any of the more experienced scripters would know what I'm doing wrong, 12
[Windows Mobile Development and Hacking General] sztupy:
No, unfortunately the debug output of luadec doesn't write out the function number. only the opcode number (should fix that). The opcode number it crashed was 6 (it's the number before GETGLOBAL). For the function number, you have to turn back before the 1st opcode, where you find something like this: "121 CLOSURE", which means this function was defined at the 121th opcode in the main body. Now look ad the luadisasm'd output, where you find at the 121th opcode which function this was (0 based, so the 1st function will be Function #0... luadec is 1st based, so the first function will be #1 just to confuse everyone :) )

After that you'll want to only decompile this particular function. For example if this was the 5th function, then write for example

luadec -f 5 -l ;;;;;0,0,5 lua.luac

(as you see I've put 5 semicolons before the first number). You always have to put as many 0's as parameters the function have, then a number for each opcode where a local is defined as the appropriate register.
[Windows Mobile Development and Hacking General] sztupy:
That code looks like:

SetSomeValues
if Portrait then
SetSomeValuesForPortrait
else if Landscape
SetSomeValuesForLandscape
end

what you want to change is in the "SetSomeValues" section. You have to put in both of the "SetSomeValuesForPortrait" and "SetSomeValuesForLandscape" and than change them there:

Album_ScreenRotation.OnScreenRotation = function(l_2_0)
if _application.Orientation == ScreenOrientation_Portrait then
trace("Album_ScreenRotation_Portrait")
Camera2DBegin.Viewport.value = RectF(0, 0, 640, 480 - 2 * 50)
Camera2DBegin.ViewLeft.value = 0
Camera2DBegin.ViewRight.value = 640
Camera2DBegin.ViewTop.value = 0
Camera2DBegin.ViewButtom.value = -(480 - 2 * 50)
Listview3DCamera.Viewport.value = RectF(0, 0, 480, 640 - 2 * 50)
Listview3DCamera.ViewLeft.value = 0
Listview3DCamera.ViewRight.value = 480
Listview3DCamera.ViewTop.value = 0
Listview3DCamera.ViewButtom.value = 640 - 2 * 50
Listview3DCamera.CameraPosition.value = Vector3(0, 50, 415)
ControlPanel2D.Position.x = 0
ControlPanel2D.Position.y = 0
ArrowGroups.Position.y = -322
KeyUpSprit.Position.y = 60
KeyUpSprit.Size.height = 130
InitPortraitConstant()
elseif _application.Orientation == ScreenOrientation_Landscape then
trace("Album_ScreenRotation_Landscape")
Camera2DBegin.Viewport.value = RectF(0, 0, 640, 480 - 2 * 50)
Camera2DBegin.ViewLeft.value = 0
Camera2DBegin.ViewRight.value = 640
Camera2DBegin.ViewTop.value = 0
Camera2DBegin.ViewButtom.value = -(480 - 2 * 50)
Listview3DCamera.Viewport.value = RectF(0, 0, 480, 640 - 2 * 50)
Listview3DCamera.ViewLeft.value = 0
Listview3DCamera.ViewRight.value = 480
Listview3DCamera.ViewTop.value = 0
Listview3DCamera.ViewButtom.value = 640 - 2 * 50
Listview3DCamera.CameraPosition.value = Vector3(0, 50, 224)
ControlPanel2D.Position.x = 307
ControlPanel2D.Position.y = SystemTitlebarHeight
ArrowGroups.Position.y = -272
KeyUpSprit.Position.y = 10
KeyUpSprit.Size.height = 80
RightBound = 539
PanoramaWidth = 344
PanoramaHeight = 120
PanoramaVWidth = 108
PanoramaVHeight = 176
PortraitWidth = 132
PortraitHeight = 176
LandscapeWidth = 200
LandscapeHeight = 150
WideLandscapeWidth = 250
WideLandscapeHeight = 150
ParaOff = 0
LOff = -5
WLOff = 0
POff = -7
VParaOff = -7
PhotoHitTarget.Position.x = 212
PhotoHitTarget.Position.y = -36
PhotoHitTarget.Size.width = 360
PhotoHitTarget.Size.height = 300
end
end
[Windows Mobile Development and Hacking General] 12aon:
In my case I should change the l_0_0 and l_1_0 etc right? You added an entire landscape function set that the original didn't have, that's because it's an example or is this the actual code I should use?

trace("Album Landscape")
require("Common\\LayoutInfo")
_LayoutInfo = LayoutInfo()
Album_ScreenRotation = class(RotationTemplate)
local l_0_0 = Album_ScreenRotation
l_0_0.__init = function(l_1_0, l_1_1)
l_1_0._ResetLayoutCallback = l_1_1
trace("Album_ScreenRotation:__init later")
RotationTemplate.__init(l_1_0)
end

l_0_0 = Album_ScreenRotation
l_0_0.OnScreenRotation = function(l_2_0)
Camera2DBegin.Viewport.value = RectF(0, 0, screenWidth, screenHeight - 2 * SystemTitlebarHeight)
Camera2DBegin.ViewLeft.value = 0
Camera2DBegin.ViewRight.value = screenWidth
Camera2DBegin.ViewTop.value = 0
Camera2DBegin.ViewButtom.value = -(screenHeight - 2 * SystemTitlebarHeight)

Xboxmod found a way to edit landscape by editing landscape by editing the red line in the script, so I might fool around with that a bit too. Thanks for the info. Are getting the decompile sickness yet :), 12

if _application.Orientation == ScreenOrientation_Landscape then
trace("Album_ScreenRotation_Landscape")
[COLOR="Red"]Listview3DCamera.CameraPosition.value = Vector3(0, 50, 224)[/COLOR]
ControlPanel2D.Position.x = 307
ControlPanel2D.Position.y = SystemTitlebarHeight
ArrowGroups.Position.y = -272
KeyUpSprit.Position.y = 10
KeyUpSprit.Size.height = 80
RightBound = 674
[Windows Mobile Development and Hacking General] smotrs:
So when I look for the line similar to the "121 closure" is this in the output of the luadec or luadecguess? I couldn't find anything like that at the begining of the luadec output, but found this at the begining of the luadecguess output,

Main Block
Parameters: 0
Last relevant lines:
379 [-]: CLOSURE R0 49 ; R0 := closure(Function #49)
380 [-]: SETGLOBAL R0 K171 ; OnMenuExit := R0
Last register: 0
Register assignment dump:
R0: 0,1,4,7,10,13,15,18,22,24,26,28,30,32,34,36,38,40,42,44,46,48,51,53,55,57,59,61,63,65,67,69,71,75,80,84,87,89,91,94,97,100,102,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,172,182,192,195,198,201,203,205,207,209,212,214,216,219,223,226,231,233,240,242,245,247,249,255,258,262,265,268,271,273,275,277,279,281,283,285,287,289,292,294,300,304,308,310,316,320,323,327,329,333,335,339
R1: 0,2,5,8,11,85,92,95,98,103,196,199,215,224,227,234,237,266,269,305,321,324,330,336
R2: 0,20,77,82,174
R3: 0,21,175,178
R4: 0,179,189,230,298,314
R5: 0,177,187
[Windows Mobile Development and Hacking General] sztupy:
you have to disassemble it using luadisasm :)
[Windows Mobile Development and Hacking General] sztupy:
Here are the additions for today:

1 embedded script from home.mode9

1 embedded script from settings.mode9

1 embedded script from musicsonglist.mode9

stock_sublayer

people/peoplecallhistoryglobal

people/peopleupdatepage

people/peopleupdateviewpage

enjoy.
[General Topics] siemi1:
I have such a prolem:

I have instaled opera mobile and mini. I have set that Opera is defaoult browser wvery where i could using registry Advanced Cofiguration Tool, I set that nay kind of html or similar files should be opend by Opera but whenever i want to open lin which is in @ PIE open instead of Opera.

is there any solution to foce gmail java aplet to run opera instead of PIE?
[Windows Mobile Development and Hacking General] lpaso:
Hi,

After many searches, the only WMP today plugin I found that was working on my phone (Touch HD) was the i-mate WMP Today Plugin (see the attachments below).

The problem is that the icons are really tiny, and it's almost useable with fingers. So, I tried to update the DLL with ResHack to have bigger icons, but when I do so, it disappears from the today plugins page. I think it might be a problem with a signature or somewhat else, but I can't change the pics.

Could a dev master here update the dll with higher-res pics to use this great plugin with fingers ?

Thank you very much.
[G1 Android Development] Brutal-Force:
I am old school DOS user, so I don't know linux commands very well.

It is my understanding that the command line is similar in function but with different commands i.e. C\: copy file blah.exe to C:\here\.

Can the Recovery command line be used as such to move around on the sdcard in recovery mode using the same method, and if so, is there a list of linux commands I can familiarize myself with?
[G1 Android Development] Brutal-Force:
I would like to add this to all current/future G1 Hackers.

I learned a valuable mistake today. After doing lots of reading to correct it (thanx to the help of people who know what they are doing). I would like to make this one suggestion:

Get a cheap USB Card reader. Essentially you can do everything you need in windows w/o using a command line.

http://cgi.ebay.com/Cheap-MicroSD-Micro-SD-USB-2.0-Card-Reader---SHIP-$2.50_W0QQitemZ380101445086QQcmdZViewItem

It is a life saver if you makea mistake.
[G1 Android Development] LucidREM:
yes it can .. however .. the way android is setup i found everything has to be mounted from scratch .. so you wouldn't have /sdcard .. it would be blank until the mmcblk0p1 was mounted .. likewise /system would be blank etc until the mtdblock3 was mounted