Porting application to work with windows mobile - Windows Mobile Software Development

I really want to port a small tool to be able to run my magic jack on my HD2. There is a really small and simple tool called MJMD5 that allows you to use your magicjack with any SIP client.
I have the source code for linux, possibly it can be compiled using cygwin for the HD2?
ftp://ftp.bauer-power.net/misc/magicjack/mjproxy.c.tgz
Also, there is a tool that works with windows, but there is a incompatibility with the GUI that isnt allowing it to run on my HD2, a small tweak should fix it.
ftp://ftp.bauer-power.net/misc/magicjack/MJMD5.zip
I am completely new to mobile software development so I hope someone could help me get this working!
Thanks

Is nobody willing to even put me in the right direction?

The source code is for a linux console app; you can't port that easily to WM GUI. You'd need the source code of the Windows exe. To my knowledge, there is no Cygwin version for WinCE yet, or were you referring to cegcc?! It could probably be ported as a console app anyway, but I assume that you want the GUI.
And using a console on the HD2 is somewhat problematic, as the OS has console debug output. I would not recommend that for user programs.

Yeah, I am referring to cegcc. I am not too concerned about the GUI, I just need the functionality, and this program doesnt really need a console, but just needs to be run with certain parameters which is possible with WinCE. So, does anyone know how to compile it for windows mobile?
I appreciate any help.

kkroo said:
Yeah, I am referring to cegcc..
Click to expand...
Click to collapse
OK; I'm reasonably sure that it can be ported with either cegcc or celib. I'd probably do it with celib. I have adapted celib to work with PocketConsole. I just tested my port of perl 5.8.8 on the HD2, and socket/internet functionality seems OK.
kkroo said:
I am not too concerned about the GUI, I just need the functionality, and this program doesnt really need a console, but just needs to be run with certain parameters which is possible with WinCE. So, does anyone know how to compile it for windows mobile?.
Click to expand...
Click to collapse
About the Windows exe, it appears to be a .NET assembly. But it may not run on Windows Mobile because it is for the desktop Framework, and not the Compact Framework. .NET assemblies can be decompiled, however. Maybe that can help you too.

I don't have this MagicJack, but from what I read about it on the internet, I doubt that it can be used with Windows CE at all if you want to plug it into the HD2 directly, and the USB connector may be different as well. I don't know if that's what you want. Depending on how it communicates with its host, you may even need a driver for it. I think that the HD2 has USB OTG, but it may still not work without a driver. I would find that out first.

In terms of recompiling it, I am pretty sure it will work. Sorry but I am a bit of a novice at this, but how would I do either compiling option?
Thanks

I would use Dis# for decompiling; I just tried to decompile the exe, and that seemed to succeed. No guarantees though; not at all tested. You can have Dis# put the source files and project files in a subdirectory. Then I'd use VS2008 for compiling.
A quick test showed that the IniFile class of this program imports unmanaged functions from kernel32, which is not present on WM. The functions are GetPrivateProfileString and WritePrivateProfileString. I don't think that coredll has them, so porting would probably not be easy. This is a known porting issue; not very severe, but it's only the start. I think that ini files are regarded as legacy by Microsoft. The registry is used for settings.
The most logical thing would seem to me to contact the developer to write a CE version if the device works with generic CE USB drivers. And then you'd still have the connector problem, and possibly even an incompatible interface; I don't know how HTC implemented the USB port. This is assuming that you want to plug it into the HD2 directly. You are not clear about that, so I can't be more specific either.
http://netdecompiler.com/download.html

Related

Linux on Pocket PC

Hi all,
I ask this question cuz I counldn't find enough information about How to install Linux on my PPC.
My ppc is: I-teq X-bond like as Gigabyte gsmart i. with 64MB ROM.
Is there any linux ROM distribution for my ppc? or general linux ROM distribution for PPCs?
Thanks in advance.
Pedram
The reason you could not find information is because there isn't much of it to be found.
Unfortunately, Linux for PPC is in its infancy. The main problem is the drivers - they all need to be reverse engineered and there is no help from the OEMs as they designed this things to only work with MS crap and seem to have no interest in releasing drivers or specifications.
Official reason: Because you can not mess with the OS the device is more stable and secure.
Real reason: If you need to by new phone to get new OS we make more $$$ and so does MS.
As far as I heard there is a half decent version for some iPaq model, and there is version for some HTC devices (check WiKi) but all it does is boot up: no drivers even for touch screen, no graphical interface, no apps.
Thnx levelnum.
I think if linux developers I mean open source world focus on handheld devices they can publish good distribution as desktop or laptop PCs. Today they are very powerful in reverse engineering, .NET Framework in Linux named MONO is one of these reverse engineering issues.
I believe that Linux is much more customizable that WM, especially for XDA-developers that make interesting works on WM. And also it doesn't have copyright restriction as WM has. So may be it makes many progress in world of handheld devices.
Oddly enough I was looking for Linux on Smartphone info yesterday as I've got an Alpine I'd like to be able to do something interesting with.
Demand for something like this is going to be a bit odd - by definition anyone who finds this site, let alone opens an account and posts, is going to be interested in pushing the boundaries of their device but the vast majority of WM device users are going to be in the "don't care how it works as long as it does" group.
Also, I reckon a lot of Linux dev types aren't even going to look at the device, it will never occur to them to buy one because it's sold as a Windows Mobile device, and hence isn't going to be near their installation of the hacker mentality. Without a critical mass of people who can develop in/with Linux it's always going to be a struggle.
problem is the program base
all current wm programs unless they are .net
would not run under linux on our pda's
new ones would be required to be written
or ported or....
The Nokia Internet Tablet runs on a version of Linux with a pretty robust set of applications, and this device uses an ARM processor which should be pretty friendly with regard to 'porting'.
But you'd still be stuck without a telephone application.
You can find some information here:
http://handhelds.org/moin/moin.cgi/HaRET
http://www.handhelds.org/
Oddly enough I was looking for Linux on Smartphone info yesterday as I've got an Alpine I'd like to be able to do something interesting with.
Demand for something like this is going to be a bit odd - by definition anyone who finds this site, let alone opens an account and posts, is going to be interested in pushing the boundaries of their device but the vast majority of WM device users are going to be in the "don't care how it works as long as it does" group.
Also, I reckon a lot of Linux dev types aren't even going to look at the device, it will never occur to them to buy one because it's sold as a Windows Mobile device, and hence isn't going to be near their installation of the hacker mentality. Without a critical mass of people who can develop in/with Linux it's always going to be a struggle.
Click to expand...
Click to collapse
May be! as you said it is Windows mobile device and linux lovers aren't going around of it. but I think they are so curious than it.
problem is the program base
all current wm programs unless they are .net
would not run under linux on our pda's
new ones would be required to be written
or ported or....
Click to expand...
Click to collapse
I do think so. since I in previous post I mentioned that .NET framework available in linux. so many of windows program can run on it.
You can find some information here:
http://handhelds.org/moin/moin.cgi/HaRET
http://www.handhelds.org/
Click to expand...
Click to collapse
Hart (Reverse engineering tool for wm hardware) was interesting tool.
yeah but due to limitations and slowness only the minority of applications on windows mobile are made in .net :S
i want this one
http://www.openmoko.com/press/index.html
Regards,
Jason
Rudegar said:
problem is the program base
all current wm programs unless they are .net
would not run under linux on our pda's
new ones would be required to be written
or ported or....
Click to expand...
Click to collapse
This is not a real problem. If you want to use a particular program from WM that is a problem but why you would do that? There is very large program base for desktop Linux (many of them also exist for desktop Windows) which could be very easily ported to a handheld platform with ARM processor. If you ever looked up how many qualitative programs do exist for Japanese Linux handhelds...
Wexx said:
This is not a real problem. If you want to use a particular program from WM that is a problem but why you would do that? There is very large program base for desktop Linux (many of them also exist for desktop Windows) which could be very easily ported to a handheld platform with ARM processor. If you ever looked up how many qualitative programs do exist for Japanese Linux handhelds...
Click to expand...
Click to collapse
Thats one of the things that is grate about open source software - you don't even have to depend on the original developer to find the time / will to port it. Anyone with the programing knowledge can.

VMWare For WM6?

I work in software packaging... and I use VMWare a lot for different builds etc.
I was wondering if there was such an application for mobile phones. like VMWARE that I could test ROMs on etc. before putting onto my phone?
Apologies if posted in the wrong spot etc.
Regards.
That WOULD be a useful tool, such as an emulator??
Dont the windows mobile 6 sdk tools come with this sort of thing ? But I dont know if u can load a rom from here into it. But I know it comes with a base rom to use for testing, if your developing with Visual Studio or something.
twist said:
Dont the windows mobile 6 sdk tools come with this sort of thing ? But I dont know if u can load a rom from here into it. But I know it comes with a base rom to use for testing, if your developing with Visual Studio or something.
Click to expand...
Click to collapse
Correct, the emulator bundled with the SDK is only for testing programs which will run on it.
What we want is a virtual device which will act just like the hermes hardware, that way we can test unbricking techiques etc...
Something like this would indeed be a huge step for developers and cooks.
VM for WM
All you need are the environmental configuration details, ie the parameters that for the sys config and build out the vmx file.
There's no way you'd get assistance from VMware on this, ut if you think about it there are what ... 12 pre-set environments in VM-WK6?
I reckon if you debug one of these, hack away at the profile, RAM, cpu requirements (cycles, Hz, etc, etc) then you are most of the way there.
There is only a finite amount of environmental configurations, it's about controlling those.
Have a look at the VMware site, go to virtual appliances, and see how people have built the base out on some of the simpler appliances
http://mobiledevdesign.com/software_design/open-kernel-labs-okl4-software-0521/
garyjmobey said:
http://mobiledevdesign.com/software_design/open-kernel-labs-okl4-software-0521/
Click to expand...
Click to collapse
That's not quite with the topic here. From what I got out of that is they are working on running 2 operating systems on 1 phone. Not something like a hermes emulator.

Run exe in WM

Hi!
is it somehow possible to run exe file, that is for desktop windows, on WM6.1?
I was installing some software, and was unable to run keygen, until I reached my PC.
I'm using WM 6.1 on HTC HD.
Thanks
Perhaps you should describe what is keygen?
Keygen is some small executable file, that usually display graphical form and generates some numeric (or another) data on the output.
philous said:
is it somehow possible to run exe file, that is for desktop windows, on WM6.1? Thanks
Click to expand...
Click to collapse
Long story short: no. You can't just drop an application compiled for Win32 to WinMo and launch it. Even for .NET-stuff the loader-stub-thingamagic (can you tell I've got near to zero .NET-programming experience :-?) that passes the code to the runtime is for a different processor architechture. (and AFAIK XScale/ARM and x86 don't really match)
I guess it could be done with some really weird conditional PE-header wizardy (winmo uses the same kind of portable executable as win32, right?).
But more to the point, I thought discussing warez-related stuff on these boards wasn't ok
I'm sure someone with far more experience in WinMo-development will come along and correct me any minute
shisux said:
Long story short: no. You can't just drop an application compiled for Win32 to WinMo and launch it. Even for .NET-stuff the loader-stub-thingamagic (can you tell I've got near to zero .NET-programming experience :-?) that passes the code to the runtime is for a different processor architechture. (and AFAIK XScale/ARM and x86 don't really match)
I guess it could be done with some really weird conditional PE-header wizardy (winmo uses the same kind of portable executable as win32, right?).
But more to the point, I thought discussing warez-related stuff on these boards wasn't ok
I'm sure someone with far more experience in WinMo-development will come along and correct me any minute
Click to expand...
Click to collapse
well, yeah, I also didn't think that it's possible because of different processor architectures, but maybe somebody heard something about that..
Miracles happens
We are not discussing warez stuff, the question thesis is different.

SharpDevelop: a VERY simple question from a beginner

Hi everyone.
I'm a beginner in Pocket PC / Smartphone development, though i have some (amateur) experience in creating PC apps (Delphi, C++)
So i just need a "kick start" to begin working on PPC apps. Like, a code to make an app that draws a window with "Hello world" and an OK button in it, you know
I've downloaded the SharpDevelop environment, because it looked like the best freeware alternative to Visual Studio. However, i have to admit i've downloaded the 1.x version, as i have a very old computer. But if it's critical, i can try and install 2.x or 3.x.
Anyway, the question is: how do i create a project for Pocket PC / Smartphone? All i see are options to create PC projects... But i saw SharpDevelop in the D&H wiki, so there must be a way to use it for it, right?
Big thanks in advance for answering my very silly question
upd: also, do i need any special device emulators to run the project, or... w/e
kiruch said:
Hi everyone.
I'm a beginner in Pocket PC / Smartphone development, though i have some (amateur) experience in creating PC apps (Delphi, C++)
So i just need a "kick start" to begin working on PPC apps. Like, a code to make an app that draws a window with "Hello world" and an OK button in it, you know
I've downloaded the SharpDevelop environment, because it looked like the best freeware alternative to Visual Studio. However, i have to admit i've downloaded the 1.x version, as i have a very old computer. But if it's critical, i can try and install 2.x or 3.x.
Anyway, the question is: how do i create a project for Pocket PC / Smartphone? All i see are options to create PC projects... But i saw SharpDevelop in the D&H wiki, so there must be a way to use it for it, right?
Big thanks in advance for answering my very silly question
upd: also, do i need any special device emulators to run the project, or... w/e
Click to expand...
Click to collapse
It's not a silly question mate - it's a perfectly good one. Unfortunately, I don't think that you can use SharpDevelop to create .Net CF applications easily. The Windows Mobile SDKs come with plenty emulators (to answer your latter question), but they're Microsoft, and therefore they're for Visual Studio. It's really easy with Visual Studio - you just install the SDK and select a smart device as your target when you create a new project. It just works.
http://www.microsoft.com/downloads/details.aspx?FamilyID=20686a1d-97a8-4f80-bc6a-ae010e085a6e
However, as far as I'm aware, you can't use VS Express (the free version), as the SDKs only work with full versions of VS. If you can get hold of that, I'd recommend it.
I do remember seeing a website talking about using SharpDevelop with the .Net CF, but it was sketchy and didn't promise it would work. Maybe google a little more to make sure about that, but I'd strongly recommend a copy of VS Professional, if that's an option.
If you are a student, you can get VS2008 for free (www.dreamspark.com)
If you are not a student, you can get VS2010 RC for free (works for another 100 days from today).
I use Sharp Develop to program in C# for my phone, and it works fine.
However, it's possible that smartphones are only supported in version 2 and 3 (I never tried version 1).
In the newer versions, when you start a new solution, there will be an option to start a Compact Framework Project.
Some code that is automatically added when adding controls to your form, will throw errors and will have to be deleted. There is more information on that in the forums at Sharpdevelop.
Good luck!
It depends on what u want to program in. .net c# c++ ect. Tho if i were u i would try and get VS. If your going to do c++ i can provide some examples, but not for anything else xD. GL.

[Q] Develop Apps for Windows Mobile

I want to develop simple apps for Windows Mobile. I read that I can use:
---Compact Framemork. (I downloaded Sharp Develop, it is free. It also exist a program from Resco that speedup the development with C.F.)
--- C or C++ or C# (I don't know if WinMo understand these...)
---Visual Basic (is difficult and Visual Studio isn't free, but I found another program that allows to develop more simple)
---Mortscript (I think is the most simple)
---Which is the best and the most simple language?
---Where can I read or download tutorials?
---I can not develop simple apps with images and sounds yet.
Please Help!
I want to develop
-a lock screen
-an app that turn on and turn off the leds of my device
-an app that change registry values (without softreset the device)
-an app that can copy, cut and delete files
-a Soft Imput Panel (a virtual keyboard)
I haven't done windows mobile development in quite some time, so things may have changed a bit. But to help you out better, it would be good to know what version of windows you intend to develop for (I assume Windows Phone 7?) as well as any specific devices you may want to concentrate on, and what experience you already have with coding.
MortScript is probably a good starting point, though if you want to get some real functionality going, you should look at C#.net CF. Take a look at this MSDN resource: LINK. It should be good for getting started.
I think that for modifying the registry, working with LEDs, and for the software keyboard you may need to use C++ ... though I can be mistaken. I'm not sure how Microsoft has worked out libraries and privileges in WP7.
Cyclonezephyrxz7 said:
I haven't done windows mobile development in quite some time, so things may have changed a bit. But to help you out better, it would be good to know what version of windows you intend to develop for (I assume Windows Phone 7?) as well as any specific devices you may want to concentrate on, and what experience you already have with coding.
MortScript is probably a good starting point, though if you want to get some real functionality going, you should look at C#.net CF. Take a look at this MSDN resource: LINK. It should be good for getting started.
I think that for modifying the registry, working with LEDs, and for the software keyboard you may need to use C++ ... though I can be mistaken. I'm not sure how Microsoft has worked out libraries and privileges in WP7.
Click to expand...
Click to collapse
Thanks CycloneZephyrxz7.
I want to develop for Windows Mobile 6.X for devices with WVGA resolution.
But with Mortscript I can do less things? Because I can only write scripts.
Do you know how is written a simple app like "ClearTemp"?
I wait other replies from Devolpers and people that used these languages...

Categories

Resources