Ok, I've seen numerous questions about the app called HTC Performance & have disassembled the executable. While my knowledge of these thing is by no means great, I have found some very interesting functions.
Maybe someone with more reverse engineering & code experience can take a look, but with IDA Pro there are some very interesting functions & strings.
Some of the calls & code are deprecated & no longer used in WM6 + but some of them are.
It is possible, especially for evB equiped roms, that this prgram acts like a server of sorts for some programs & processes. But being as it is initiated with Smartphone only functions I doubt it.
some of the more interesting functions in the HTC Performance app are:
SHInitExtraControls Which appears to be for Smartphone only
GetSystemMetrics WM6 Pro valid - Gets System Width & Heigth in pixels. Posible uses include program optimization based on the appropriate pixel returns
CreateMutexW - coredll - used to connect to core via net cf for obtaining device info- Usually eVB related apps use to call coredll info
memmove = takes more memory than memcpy but may be used to ensure unicode strings not used on odd memory addresses, this could increase speed on apps that incorrectly do this.
InterlockedCompareExchange, InterlockedDecrement, InterlockedExchange, InterlockedExchangeAdd, and InterlockedIncrement = functions provide a simple mechanism for synchronizing access to a variable that is shared by multiple threads. The threads of different processes can use this mechanism if the variable is in shared memory.
InterlockedCompareExchange = function performs an atomic comparison of the Destination value with the Comperand value. If the Destination value is equal to the Comperand value, the Exchange value is stored in the address specified by Destination. Otherwise, no operation is performed
YAXPAX = can speed up access of written C++ Code
ReleaseMutex = Mutex functions are used to release shared functions
EnumWindows = (..) to execute a task. EnumWindows (..) enumerates through all existing windows (visible or not) and provides a handle to all of the currently open top-level windows. Each time a window is located, the function calls the delegate (named IECallBack) which in turn calls the EnumWindowCallBack (..) function and passes the window handle to it. Not sure howthis is used though.
LoadAcceleratorsW = ??? Appears to be old CE function. Deprecated???
realloc = String Optimization
malloc = RAM Allocation
GetDeviceCaps = gets dev info, can be used to the optimize redraw based on device constraints already known
LocalReAlloc = This function changes the size or the attributes of a specified local memory object. The size can increase or decrease.
EnterCriticalSection = The threads of a single process can use a critical section object for mutual-exclusion synchronization. The process is responsible for allocating the memory used by a critical section object, which it can do by declaring a variable of type CRITICAL_SECTION. can grant exclusive access to memory
ReleaseDC = This function releases a device context (DC), freeing it for use by other applications. The effect of ReleaseDC depends on the type of device context.
Again, I am not a programmer, I know a few things, & am pretty competent with the lower operations of firmware, but the rest of the CE code is not my cup of tea. There are many more functions in HTC Performance. These are only a few functions found after a brief 20 minute peak.
But maybe, maybe, some of the function calls can help us to understand if this app can be moddified to properly function on the Kaiser.
It is possible that on some evB enabled apps, that maybe some of the HTC Performance app are retained & possibly function, that is pure speculation though, & again I doubt it.
Any CE code experts out there wanna take a look? I have, & based on what I've seen, I'll have to say FICTION!
Info
Hi,
Since I haven't really had time to see whats new and all I haven't the foggiest idea what HTC Performance is/what it is supposed to do.
But I can tell you that the functions you listed are not special in any way. Most of them would appear in every application that displays anything on the screen. For instance getting system metrics is required for any application displaying scroll bars, etc. All the interlocked and critical section stuff is just thread synchronization.
But that's OK, the use of windows APIs really doesn't mean much, other than the application runs on Windows...its the non-API stuff that defines an application. If the application you're looking at writes changes to registry keys, etc. you may want to look into that as those would be the lasting changes to the device.
Cheers,
Why is there concurrency related stuff in there? Surely that should all be handled by the operating system, rather than a running application? (That said, most of my concurrency knowledge is either theoretical or based at a high level, so I could be wrong here).
High Performance Cab
You can also check this thread...
http://forum.xda-developers.com/showthread.php?t=366792
Quentin- said:
Hi,
Since I haven't really had time to see whats new and all I haven't the foggiest idea what HTC Performance is/what it is supposed to do.
But I can tell you that the functions you listed are not special in any way. Most of them would appear in every application that displays anything on the screen. For instance getting system metrics is required for any application displaying scroll bars, etc. All the interlocked and critical section stuff is just thread synchronization.
But that's OK, the use of windows APIs really doesn't mean much, other than the application runs on Windows...its the non-API stuff that defines an application. If the application you're looking at writes changes to registry keys, etc. you may want to look into that as those would be the lasting changes to the device.
Cheers,
Click to expand...
Click to collapse
No, registry would not necesarily be the place to look. For this application the registry will only report whether or not the App is running or not. It is supposed to be a speed optimization application. My thought were that it could possibly be acting as a server of sorts, handling some thread optimization & resource allocation. Correct though, most of those API's are importing device info, beyond that, I am lost as to how it handles it, if it does at all. That said, there are many things that don't show up in the registry & many things can't be altered via the registry b'c they are set or handled before initialization or loading of the registry, possibly thru the OAL. Even tougher to say in a two chip device with as little known info as the msm7xxx processors. If anyone with real coding knowledge could take a look at the executable & see just what it's doing with the info, that would be great.
dperren said:
Why is there concurrency related stuff in there? Surely that should all be handled by the operating system, rather than a running application? (That said, most of my concurrency knowledge is either theoretical or based at a high level, so I could be wrong here).
Click to expand...
Click to collapse
That is indeed the center of my question & also what leads me to question how the app functions. Is it playing a role in thread priority optimization, & possibly redraw based on the polls, or is it just a partially gutted application miising a ton of registry data that never worked?
Hi I really respect the opinions of the people I have found on this forum and as I am getting to grips with visual studio for the first time I often have some questions. I know this isnt a programming forum so I was wondering if anyone knew a good place where I can ask my questions.
(if someone does want to help with my current problem how can I set the full screen resolution to 480x800 for my app, When I use the form property size to do this it works but when I run the app on my device it is zoomed into the origional small resolution area 200x300 or what ever it is)
smart device development msdn forum
Tried setting the anchor to left/right/top/bottom or dock to fill?
Interesting one this, can't say I've really got to the bottom of it yet either. The client area on an application run on an 480 by 800 device is reported as 240x348 in portrait or 400x188 landscape. These values are those returned by C++ in GetWindowRect(), (don't forget to get the size of the Menu/Control Bar at the bottom and subtract it from the above given rectangle), or use the C# form properties this.ClientRectangle.Size.Height and this.ClientRectangle.Size.Width
It appears it is being set by Windows CE/Mobile before the application even gets a look in. This the results from the 6.1.4 emulator image. If I find out any more I'll post it back here.
Hi,
I'm a developper/system debugging on Android Gingerbread for new smartphones with Intel processors. I am currently integrating new components and middleware for Intel adaptation, especially in sound/audio domain. I am quite newbie on Android.
In the Android system, there are asset files to provide applications or service the method to get their ressources files like audio notification sound files.
My problem is that for a particular service, these asset files are not found and it takes some time to check and return that these files are not found. As a result, a latency of 10 s is observed, when asking for system volume levels.
This happens to the Mediaplayer (Mediaplayer.java) in the setDataSource method. The method openAssetFileDescriptor tries to open an uri which is "content://settings/system/ringtone". Does it mean that it looks for some package Id ringtone ? It is also the same for notification_sound and alarm_alert. And of course, these ids are not present under my platform, so a File Not Found exception is raised..
If you may have just a small clue about this, it might help.
Thanks
Vinio
So do I have to admit that no one know about asset files in the Android world except people from Google ?
Really this should be on the developers forum, but I cannot post there.
New 7" Chinese satnav, WINCE6.0.
cdFFM-0.3.5 put on TF card and run.
Errors in lines 2251, 2277, 2264, 2270, 2258 for info seem to be links, probably already there - pointing elsewhere.
After reboot many menu items don't work, run MortScript.exe (in root directory of ceFFM), this will allow the scripts to work thereafter, and the menu items work (note some are dummies - useful for modding).
It doesn't boot unless you do the simple kludge below.
To boot into ceFFM use "Navi Path" button to point Navigation to CEMenu.exe (in root directory of ceFFM), then check button takes you to cdFFM, then you can use "Navi Path" button to "Auto run GPS when startup" and you are straight into ceFFM.
[My path was SDMMC\cdFFM-0.3.5\CEMenu.exe, for example].
You then need to edit the navigator link in the programs directory.
In my case it was iGO8 so I edited SDMMC\cdFFM-0.3.5\PROGRAMS\iGO8.lnk to point to my navigator program like this:
23#"\SDMMC\iGO8\iGO8.exe"
The 23# is the number of characters in "\SDMMC\iGO8\iGO8.exe" (+1 for some reason)
Please note that quite a lot of the menu items in ceFFM are capable of brikking your device.
Now a question
OK, I know its poor form to reply to your own post but...
Two things still not sorted for this satnav:
1) A 480x800 version of NaviPlayer. I don't know how to set the skins to work.
2) The satnav will not load .CAB files. Even if I put wceload.exe and run it pointing to the required file, it just claims the .CAB file is not valid. I've tried quite a few, and I think they are. I presume its a means to prevent people modifying the device. Stand alone .exe's work just fine. Anyone got a fix for this, its really irritating!
If wceload.exe fails, and then probably only signed .CAB-files are accepted. Workaround: Allow installing unsigned .CAB-files. You do this by editing device's registry as
following:
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"00001001"=dword:00000001
"00001005"=dword:000000DE
"00001006"=dword:00000001
"00001017"=dword:00000010
"0000101a"=dword:00000001
"0000101b"=dword:00000001
HTH
jwoegerbauer said:
If wceload.exe fails, and then probably only signed .CAB-files are accepted. Workaround: Allow installing unsigned .CAB-files. You do this by editing device's registry as
following:
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"00001001"=dword:00000001
"00001005"=dword:000000DE
"00001006"=dword:00000001
"00001017"=dword:00000010
"0000101a"=dword:00000001
"0000101b"=dword:00000001
HTH
Click to expand...
Click to collapse
That's neat...
OK, not that unexpectedly I find no entry \security\policies\polices .
"security" is found:
use\comm\security
machine\comm\security providers
machine\comm\security
machine\software\microsoft\Rpc\securityService
value: machine\software\Rpc ="DCOM Security"
machine\software\internet explorer\security
value: machine\software\internet explorer\security\basic = "security name"
machine\software\internet explorer\security\NTLM = "security name"
"policies" doesn't appear at all.
I found a reference to "username = guest", but neither appeared anywhere else.
I did spot in machine\OEM that value "app" is a path that points to the OEM menu system (main.exe).
May be possible to intercept here (if you wanted).
root\.cab is set to name "@"=64 value "cabfile"
hmmm... nothing that leaps out at you ...
bother!
farmeroz said:
That's neat...
OK, not that unexpectedly I find no entry \security\policies\polices .
Click to expand...
Click to collapse
Create it!
OK I did that, rebooted.
A bit scary as I haven't added such things before...
Still doesn't work.
Attempting to 'run' nitro.cab (nitrogen renamed) fails
However the OS claims that there is no application associated with 'nitro'.
However .CAB is a cabfile under \root\
and a cabfile default icon is \SDMMC\ceFFM-0.3.5\system\wceload.exe,-101
shell\open\command is \SDMMC\ceFFM-0.3.5\system\wceload.exe\"%1\"
So (whilst I haven't a clue) I would expect .cab files to be spotted.
farmeroz said:
OK I did that, rebooted.
A bit scary as I haven't added such things before...
Still doesn't work.
Attempting to 'run' nitro.cab (nitrogen renamed) fails
However the OS claims that there is no application associated with 'nitro'.
However .CAB is a cabfile under \root\
and a cabfile default icon is \SDMMC\ceFFM-0.3.5\system\wceload.exe,-101
shell\open\command is \SDMMC\ceFFM-0.3.5\system\wceload.exe\"%1\"
So (whilst I haven't a clue) I would expect .cab files to be spotted.
Click to expand...
Click to collapse
Use Win32 "MSCEInf" utility (it's freeware, google for it) to extract any .CAB file, if "wceload" doesn't work for you. After having extracted the .CAB, you are able to copy the application/data to any location of your choice at mobile device.
Oooh... That looks like a solution....
Didn't work. Can't see why though.
Hmmm. That editor shows (XML)
[Version]
Signature = "$Chicago$"
CESignature = "$Windows CE$"
Provider = "BenThon"
surely chicago is a win9x version?
I thought I had, but reading the long Nitrogen thread I don't think I did.
There doesn't seem to be a version for wince5/6, that's downloadable from anywhere, even though it exists somewhere because people have run on wince5 systems. Microfi is overworked...
I was somewhat under the impression that mobile was +- same as CE, but clearly not.
Signature="$Chicago$"
simply tells you the machine's OS the cab was built on[
I guessed that, sadly after I had posted.
Basically for my satnav I need a music player to play in the background, easily reachable from iGo8 (using megaduck99 skin, I have now got just how I want it!) nav screen and back. Really all I ever want to do is skip to the next track, as with 1000+ MP3's, sometimes you just aren't in the mood for some of them. Naviplayer (if it had an 800x480 skin) is finger usable for this whilst driving. Then (with bluetooth) I can just plug the satnav into my car radio (FM is rather poor quality) and utter perfection .... (who needs CD's these days?).
I'll have to have another stab at working out how to run the skins on naviplayer.
Your front end, particularly with the wealth of apps, is excellent. I have now put it on a no-name 7" netbook I use to backpack with, and now realise how slow it is compared to the more modern ones. Good enough for emails etc though.
NB I have been starting (manually) by running CEMenu.exe rather than ceFFM, is that what you intended?
To reskin NaviPlayer it merely suffices to have a folder named "mpskin" containing the files for the required skin copied from the examples given.
Its not immediately obvious because there is no default skin file provided (eg the small gold one it defaults to).
The fonts aren't quite right, either size or location
I have come across a bug in some of the apps. If I open notepad and the file-open, the entry box is not within the screen just far enough off that you can't grab it to pull it down. This is also the case in word. Doubtless somewhere there is a file that sets the position, any ideas? Annoying because I can't edit the mpskn.skn file....
Modified MP3P.SKN inside NAVIPLAYER\MPSKIN
This should work for all the 'Simple 3.1" skins.
If you want a button to appear when minimised you will have to adjust the button size/position/etc .
This is done in/with [MAIN_MIN_WINPOS]
If you have a larger button (as I do) then you will need to make a button of the appropriate size to replace the one in
BACK_MIN.BMP
I haven't done one yet, for iGO8 it will need to be under the bluetooth one, and similar size.
Hope this is useful.
NB I have no loader files for NaviPlayer (last good mod), I got it included in ceFFM.
;====Modified MP3P.SKN
[MP3 INFO]
MP3_Ver=1.0
[MAIN_WINPOS]
Width=800
Height=480
[MAIN_MIN_WINPOS]
Left=66
Top=0
Width=60
Height=24
WidthOne=1
[TRACK_POS]
Left=572
Top=129
Width=60
Height=14
SubValue=17
[TIME_POS]
Left=188
Top=129
Width=90
Height=14
SubValue=17
[SEEK_POS]
Left=212
Top=152
Width=373
Height=9
[INFO_POS]
Left=280
Top=189
Width=150
Height=9
;SubValue=0
[STATUS_POS]
Left=387
Top=375
Width=64
Height=38
[TITLE_POS]
Left=218
Top=65
Width=366
Height=20
[VOLBAR_POS]
Left=466
Top=272
Width=162
Height=6
[PEEK_POS]
Left=173
Top=250
Width=250
Height=28
SubValue=7
[VOLSLIDER_POS]
Left=466
Top=271
Width=162
Height=10
SubValue=3
;[TIMESLIDER_POS]
;Left=216
;Top=179
;Width=369
;Height=10
[PLAYOPT_POS]
Left=561
Top=184
Width=147
Height=12
SubValue=30
;====================
;Button Position
;====================
[BT_PLAY_POS]
Left=331
Top=330
Width=140
Height=150
[BT_STOP_POS]
Left=474
Top=285
Width=178
Height=49
[BT_PREV_POS]
Left=147
Top=396
Width=180
Height=84
[BT_NEXT_POS]
Left=474
Top=396
Width=178
Height=84
[BT_OPEN_POS]
Left=0
Top=102
Width=140
Height=73
[BT_MODE_POS]
Left=661
Top=342
Width=139
Height=138
[BT_ALBUM_POS]
Left=0
Top=182
Width=140
Height=73
[BT_EFFECT_POS]
Left=660
Top=485
Width=130
Height=70
[BT_EQ_POS]
Left=661
Top=182
Width=139
Height=73
[BT_PRESET_POS]
Left=661
Top=261
Width=139
Height=73
[BT_MULTI_POS]
Left=0
Top=23
Width=140
Height=73
[BT_VOLDN_POS]
Left=147
Top=342
Width=180
Height=50
[BT_VOLUP_POS]
Left=474
Top=342
Width=178
Height=50
[BT_MUTE_POS]
Left=0
Top=261
Width=140
Height=73
[BT_EXIT_POS]
Left=661
Top=23
Width=139
Height=73
[BT_MINIMIZE_POS]
Left=661
Top=102
Width=130
Height=73
[BT_SHUF_POS]
Left=0
Top=342
Width=140
Height=138
[BT_MIN_NORMAL_POS]
Left=0
Top=0
Width=60
Height=24
[BT_MIN_NEXT_POS]
Left=62
Top=0
Width=4
Height=24
[BT_MIN_MUTE_POS]
Left=68
Top=0
Width=4
Height=24
;==============================
; IMAGE LIST
;==============================
[IML_NUMBER]
Width=16
Height=12
[IML_STATUS]
Width=32
Height=38
[IML_PLAYOPT]
Width=49
Height=12
;==============================
; COLOR Type : BGR (0xffffff)
;==============================
[COLOR]
Info=0xffffff
Title=0xffffff
Seek=0xffffff
PeekLeft=0xffffff
PeekRight=0xffffff
VolumeBar=0xd14a00
;==============================
farmeroz said:
Please note that quite a lot of the menu items in ceFFM are capable of brikking your device.
Click to expand...
Click to collapse
You really experienced it? If so then you should specify them here to clarify things.
ceFFM's Original Thread
jwoegerbauer said:
You really experienced it? If so then you should specify them here to clarify things.
ceFFM's Original Thread
Click to expand...
Click to collapse
Sorry for the delay, HDD MBR problems....
No, I didn't brick my machine, I am very cautious. However being able to play with the registry, hexeditors etc, is potentially hazardous.
Hmm, on reflection its a combination of not knowing what they all do, and not knowing my way round winCE. Ie ignorance.
String not closed
China gps KENMOO 7', wince 6. Hello, excuse my English. Trying to install ceFFM, the installation begins, but then the message: String not closed (mising quote)
Line 3631 (\ SDMMC \ ceFFM.mscr)
If (key EQ "Startup), and it's over. I can modify anything? Installing on SDcard. Thank you.
I've an apk to be tested using Robotium. In the application I'm going to test, there is a custom view(Window) on which there are some text and numeric parameters drawn using ownerDrawn and Paint. The custom view is a child of the relative layout. Since I'm not able to get the resource id of the parameters drawn on the custom view,I'm finding it hard to test the existance of parameters and read the value of the parameter on that view. Please help me out with a solution on how would I do that.
The Custom View is similar to the one attached here.
Please suggest me if there is any other way to achieve this.
Thanks