View Full Version : [Help needed]: cprog.exe and OS stripping
mirko
14th December 2003, 10:30 AM
Please help me out a little, I am rather new at XDA development.
I'm developing an embedded application for GPS/GSM vehicle tracking, so there is this app which autoanswers GSM data calls, and provides access for software on the operator pc, so it can read the vehicle's position when needed. I have a problem with cprog.exe and the OS in general - it's getting in the way. I need to do the following:
a) Put a logo in the bootloader, so when it boots it needs to show a picture and some text
b) Somehow disable cprog.exe gsm phone app, detach it from the green button etc... but I still need the GSM to be operative and come up (I disabled the pin on the sim card). I don't want any announcements of any kind, just that it register to network and can recieve data calls.
c) To remove the ugly start button and the upper status line, so that nothing else can be run besides my program. I have put the program in startup but am wondering is there a more suitable way to run it... I don't need the today screen or any other shit OS provides, just the GSM data functionality and the application running. How do I strip down the OS and loose all the unnecessary features?
Thanks for your kind help in advance,
Mirko
p.s. Oh yes, the device is a T-Mobile MDA ARM SA1110/206, PW10A2, ROM 3.16.48, Radio 3.19.00, Protocol ver 32S54
itsme
14th December 2003, 12:15 PM
a) see romtools (http://www.xs4all.nl/~itsme/projects/romtools.html) on how to do that.
b) if you call RegisterHotKey (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/cerefRegisterHotKey.asp) with key 0x73, right after killing cprog, cprog will stay dead.
c) call SHFullScreen (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guide_ppc/htm/aygshell_fsiq.asp) with HIDESTARTICON
mirko
15th December 2003, 02:28 PM
a) see romtools (http://www.xs4all.nl/~itsme/projects/romtools.html) on how to do that.
b) if you call RegisterHotKey (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/cerefRegisterHotKey.asp) with key 0x73, right after killing cprog, cprog will stay dead.
c) call SHFullScreen (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guide_ppc/htm/aygshell_fsiq.asp) with HIDESTARTICON
Thanks for great advices! Did you mean to register 0x72 (that should be the answer key) and then kill cprog? I've tried doing this but it returns 0xb7 as error (and the header file states "wrong flags" as the meaning of 0xb7). 0x73 is supposed to be the hangup button, should I register him right after killing cprog?
Few more questions, and thanks again for helping me.
a) how do I disable smsreciever.exe, SMSDaemon.exe and what do other exe processes do ? (Ussd.exe, aFlashMan.exe, cFlashMan.exe, etc..)
b) I would like exclusiveness for my app, on unix systems I would call it instead /bin/init right from the kernel and it would run alone on the system. Is it possible to do something like that here, that the kernel executes my program directly, and when program perhaps crashes, control isn't returned to the system but device needs to be rebooted. This application is the only thing that is allowed to be ran in XDA, any suggestions would be highly appreciated! Oh yes, how do I put it in rom? Simply with mkrom?
c) What is the best way to implement a copy protection on XDA in Your opinion? Is there perhaps source code of bootloader available? I know M$ recently published WinCE 3.0 source, but I assume XDA still hides it's secrets?
d) I've specified my hardware platform in previous post, is it's PDA rom part allowed to be upgraded with special edition 1.2 ROM ? Can I use ROMKitchen to cook my own ROM?
e) Is it possible for app to read/write device's own flash? To put information inside.
Sorry for going all the way to e) but I have nobody else to ask..
Thank you,
Mirko
icarusbop
14th April 2005, 11:32 AM
Please help - I am trying to kill cprog.exe, but cannot find the romtools page, it says the page cannot be found? Has it been moved/deleted??
Is there anywhere else I can get the necesary prog to kill of cprog.exe??
Thanks
LumpiStefan
14th April 2005, 11:53 AM
Please help - I am trying to kill cprog.exe, but cannot find the romtools page, it says the page cannot be found? Has it been moved/deleted??
Is there anywhere else I can get the necesary prog to kill of cprog.exe??
Thanks
Come on. How hard have you tried getting this file(s) Ißm sure you didn't do anything more than clicking on the link.....
But here comes the working link.....
http://www.xs4all.nl/~itsme/projects/xda/romtools.html
Stefan
icarusbop
14th April 2005, 02:28 PM
Ho hum: Actually i did a search as well and did end up at the page you sent me, but I was expecting a help file when I started searching; not a page of text, so I assumed it was the wrong page.
I now have the tools however, thanks for your help.
This is what I'm trying to do: I have been told if you kill cprog.exe the phone no longer works, and it does not load when you press the green button. I have tried this...
I killed cprog.exe with the rom tools, but pressing the green button still loads the phone. Is there something Else I need to do to stop this???
Thanks
HappyGoat
14th April 2005, 02:47 PM
b) if you call RegisterHotKey (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/cerefRegisterHotKey.asp) with key 0x73, right after killing cprog, cprog will stay dead.
Pushing the green button activates cprog.exe again, I think.
So call RegisterHotKey with key 0x73 to prevent that.
icarusbop
14th April 2005, 03:11 PM
Why do feel like I am being think here??? Sorry to mither but...
Am, I right in thinking the registerhotkey is a C function?? I cannot find it in the romtools list. So I assume I need C++ ( and some knowledge) to execute registerhotkey??
unapproachable2kx
14th April 2005, 11:20 PM
Could some good man make me a simple app that kills Cprog.exe? (I dont have the tools and pc to build it this time)
No need to call registerhotkey 0x73.
IIIu30uD
19th April 2005, 10:52 AM
/* Terminate cprog */
void kill_cprog()
{
HANDLE Proc, ProcTree;
PROCESSENTRY32 pe;
BOOL ret_val;
/* Get processes tree */
ProcTree = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
pe.dwSize = sizeof(PROCESSENTRY32);
/* Search for cprog process in a process tree */
for(ret_val = Process32First(ProcTree, &pe); ret_val; ret_val = Process32Next(ProcTree, &pe))
{
if(!wcsicmp(TEXT("cprog.exe"),pe.szExeFile))
{
/* Terminate cprog */
Proc = OpenProcess(0, 0, pe.th32ProcessID);
TerminateProcess(Proc, 0);
CloseHandle(Proc);
break;
}
}
CloseToolhelp32Snapshot(ProcTree);
}
IIIu30uD
19th April 2005, 10:55 AM
other way:
just copy something to \windows\cprog.exe and reset
Noodleman
22nd December 2005, 04:14 PM
other way:
just copy something to \windows\cprog.exe and reset
Does overwriting this file cause anything to stop working, other than the phone GUI?
hjgode
5th January 2006, 01:24 PM
a) how do I disable smsreciever.exe, SMSDaemon.exe and what do other exe processes do ? (Ussd.exe, aFlashMan.exe, cFlashMan.exe, etc..)
Unless you dont know, what all these apps do, I dont recommend to disable them. To disable them, replace the exe files with one of your choice. Maybe with just a dummy win32 app that does nothing.
b) I would like exclusiveness for my app, on unix systems I would call it instead /bin/init right from the kernel and it would run alone on the system. Is it possible to do something like that here, that the kernel executes my program directly, and when program perhaps crashes, control isn't returned to the system but device needs to be rebooted. This application is the only thing that is allowed to be ran in XDA, any suggestions would be highly appreciated! Oh yes, how do I put it in rom? Simply with mkrom?
Run your app after the initial shell. Take a look at the registry, there will be HKLM\init, which defines which apps/drivers have to load in which order. Search for shell.exe and shell32.exe. To launch your app before the shell, enter new keys for Launchxx and Dependxx, with xx before shell32.exe. Be aware, that some helper apps need to be started. To lock the device, your app should not call SignalStarted(). Further, some API functions are only available, if shell32 is started.
c) What is the best way to implement a copy protection on XDA in Your opinion? Is there perhaps source code of bootloader available? I know M$ recently published WinCE 3.0 source, but I assume XDA still hides it's secrets?
Although I am not a specialist for this, you normally need M$ Platform builder to create a ROM images for a device. AFAIK there is no way to have a boot loader of your own, you always have to build the whole rom image.
d) I've specified my hardware platform in previous post, is it's PDA rom part allowed to be upgraded with special edition 1.2 ROM ? Can I use ROMKitchen to cook my own ROM?
:?:
e) Is it possible for app to read/write device's own flash? To put information inside.
:?:
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.