Advice on a new hobbyist phone? - General Questions and Answers

Hello XDA-dev community
For the past couple of months i've been thinking about getting a Pocket PC for a new phone instead of a Symbian Nokia [ah my old 6630, may she rest in pieces...]. Anywho, I think i've decided on the HTC Touch Pro / Raphael. At ~AU$600 it's the highest I was trying not to pay (i'm not rich), however it seems to be a pretty powerful and full featured device.
I do have a few questions I hope some of the kind experts/veterans here might be able to answer for me though
1) I written a few things in Java and PHP and other even-more-basic languages, but am interested in learning a new language with hopes to create software for both Windows PC and Windows Mobile. What choices do we as end-users have here? .NET is an obvious one [I own a copy of Visual Studio 2008 Pro], but are there any other languages of note?
2) From the Raphael specs on the Wiki here, it lists it as an ARMv6 architecture-based processor. This comes from the ARM11 family, which is the successor (I think) to the XScale family (ARMv5TE). Are these ARMv6 processors backwards compatible with 'XScale accelerated' binary builds of software? I.E., a PPC application has two versions for download/purchase - a 'Generic ARM Release' and an 'XScale optimized release' - would the Raphael ARMv6-based device be compatible with these XScale-optimized binaries? Or do ARM do things differently and ARMv6 is not backwards compatible?
3) Has anybody ever heard any rumors or made any talks about porting Android to the Raphael? Just curious. I'd prefer a Windows Mobile device (not a Linux user) but I can see all this OpenSource stuff does have a future... EDIT: Nevermind, I found the page at http://wiki.xda-developers.com/index.php?pagename=RaphaelLinux
4) How does the device perform with 3D-heavy applications? Does it make use of any sort of acceleration (I assume no, not like the iPhone for example).
OK thats all... thanks a lot for your replies, if there's anything else you think is worth mentioning to a soon-to-be-first-time owner of a Windows Mobile device, please do say so Cheers.

In reply to 2) VS 2005 Pro onwards targets code at ARMv4I, basically generic ARM processors also capable of running the Thumb (16 bit) instruction set. Thumb represents a limited set of ARM 32 bit instructions coded as 16 bit instructions. It allows much smaller code sections, but with megabytes of memory available these days who cares? If you code in .NET none of this matters anyway, as the code is created as IL byte code, the .NET runtime sorts it out.
If you code in Embedded Visual C++ 3 or 4 the target chipset is ARMv4. When you use the IDE to create the code on a WinMo 5/6 machine it complains that the target machine cannot run the code. It's lying, what it really means is it does not recognize the processor class. As it is ARM 32bit code only it will work.
It is not worth targetting the code for a specific, (read non generic), ARM chipset. You are just making a rod for your own back when it won't work on something else.

Thanks for the reply stephj. There will indeed be a bit of research for me to do as to which language and/or IDE I decide to choose to train myself in then it seems. Specifically though...
stephj said:
It is not worth targetting the code for a specific, (read non generic), ARM chipset. You are just making a rod for your own back when it won't work on something else.
Click to expand...
Click to collapse
...what I was referring to is - I've seen some freeware PPC software, mainly emulators, that have two versions - a 'generic ARM' one and an 'XScale Compatible' alternative version. On the ARMv6 based phones, assuming the software was released back when XScale was the newest ARM family, would both work on the Raphael? If so, which would be faster?
Obviously though, for a developer, creating the most compatible/generic code to work on the widest range of devices is the main focus - later possibly implementing optimiziations or hacks that are specific to a certain platform - but I'm just wondering if these already built, older 'specifically optimized' builds are compatible with the succeeded chipsets.
P.S. Do you know where I could find some resources on choosing between Visual C++ or .NET? I.e. pros and cons of each?
Thanks a lot!

jonusc said:
Hello XDA-dev community
...
1) I written a few things in Java and PHP and other even-more-basic languages, but am interested in learning a new language with hopes to create software for both Windows PC and Windows Mobile. What choices do we as end-users have here? .NET is an obvious one [I own a copy of Visual Studio 2008 Pro], but are there any other languages of note?
...
Click to expand...
Click to collapse
Since you have VS2008Pro, C++/win32 if you want fast and lightweight applications

"P.S. Do you know where I could find some resources on choosing between Visual C++ or .NET? I.e. pros and cons of each?"
.net pros
easy to get something running fast even if one is a n00b
got a lot of components meaning less time to develop
can be programmed with c# and c++ and even eeeeewww basic
.net con
slow as in sloooooowww
require one to install the framework if the app
require a newer version then what ones phone came with and the framework is pretty big
and people don't seem to have success with installing it on sd cards
compact framework is also limited in features vs. .net on pc so apps don't just port always
limited in features unless one do unmanaged code
c++ pro
fast
require no extre stuff
small in size and again fast
have access to every feature in the phone
c++ con
one have to do everything and that mean msg loop
and a lot of leg work just to get a dialog with a button
steaper learning curve
more risks of mem leaking
harder to debug as stacktrace is not just there
like on .net

Very nice, thanks for the replies guys
So from what I can gather, a basic .NET application would be ideal for RAD (quick and dirty), particularly GUI-centric applications, but tend to be bulky; whereas C(++) is a more native / low-level language and is thus faster, but very hardcore as most functions need to be done from scratch.
I should have assumed it's pretty much the same as a Windows PC
What about C++ versus C#? And does VS2008 have a decent API/IDE set for mobile development i.e. does it have many libraries for C(++/#) already included or are more easily available?
Thanks again for the answers guys... it's obvious i'm keen to learn about it, but i'm a little worried that someone like me going from stuff like PHP and VB to C might be biting off more than I could chew....? Ah well if .NET is gonna cause problems down the line, then I guess I have no choice

Don't bother with the C++ version of .NET, the casts that you have to make, to get it to work makes the code very hard to read, and besides it only compiles to the IL level anyway, it's just not worth the effort.
So, under .NET use C#, or VB if you prefer, there is not much difference between them, but in my opinion, C# is a bit more elegant.
Under C++ you have the choices of WIN32, ATL (Active Template Library), or MFC (Microsoft Foundation Classes), programming models.
WIN32 is the simplist but the hardest to code, the other two add progressively more objects to make things easier, but you need to distribute the run time libraries with them. A simple WIN32 app can be distributed as a single .EXE if the DLLs it already uses are part of the CE/PPC operating system.
PS When it comes to running code compiled for a specific ARM class on your device, just give it a go. If the CPU hits an instruction it can't run, it will throw an exception and stop anyway.

stephj said:
Don't bother with the C++ version of .NET, the casts that you have to make, to get it to work makes the code very hard to read, and besides it only compiles to the IL level anyway, it's just not worth the effort.
Click to expand...
Click to collapse
Fair enough. So C++ in VS2008 is a bad idea
stephj said:
So, under .NET use C#, or VB if you prefer, there is not much difference between them, but in my opinion, C# is a bit more elegant.
Click to expand...
Click to collapse
I thought VB was dead? Wasn't VB6 the last one they made? Or is VB just what they call generic/common .NET Framework apps? Anyway, yeah i've read good things about C#, especially compared to .NET in general. EDIT: Oh, .NET is not the program language but VB is *facepalm* I get it, nevermind
stephj said:
Under C++ you have the choices of WIN32, ATL (Active Template Library), or MFC (Microsoft Foundation Classes), programming models.
WIN32 is the simplist but the hardest to code, the other two add progressively more objects to make things easier, but you need to distribute the run time libraries with them. A simple WIN32 app can be distributed as a single .EXE if the DLLs it already uses are part of the CE/PPC operating system.
Click to expand...
Click to collapse
Ah, same as a Windows PC. That makes sense.
Thanks for the answers I think I might take a look at C sharp.

C++ in VS2008 is fine, use the smart device WIN32 ,ATL, or MFC models take your pick.
Sorry my mistake, the C++ .NET version is not available for smart devices. Its the three models above only.

After additional research, I don't really want to be tied down with the proprietary C# system. So is VS2008 a decent IDE for WIN32 C++ development on Windows Mobile? Or are there better alternatives?

VS 2005/2008 Pro takes some beating. After you have installed about 3 CD's worth of MSDN libraries all the help is on tap. The IDE also looks at MSDN online if you have an internet connection to see if there are any forums on the same topic you are inquiring about.
The code is generated as ARMv4I and can be tested/debugged on the images provided by the WinMo 5 or 6 SDK. The emulators are that good you only put it on your phone when you have tested it to death on the emulator.
EVC 3 and 4 use a previous method where the emulators run a x86 version of the code. I still use EVC 4 for code that has to run on anything, Windows Mobile 2003 for example.
It's all pretty proprietory, when it comes down to it, but I guess we're stuck with it.

Related

Windows CE

Hi all, hope u had a nice week-end
I have resuscitated an old HP Jornada, and I was wondering if one can still find softwares for windows CE. Especially games, even basic ones since it is intended for use by my kids.
Thank you and take care
i believe that games for the cpu will work
as in if it have an arm cpu arm based games will work
and if it's mips mips games will work
games are typicaly written in asm directly for the cpu and the os dont mean that much
Redugar - I don't mean to be rude but are you leaving in the 80s?
No one has bee writing games or anything other than drivers and other OS / basic components using assembler in over a decade and a half!
It's way way too much work and not at all necessary.
But you are right about one thing - I've seen on some freeware sites like www.pocketpcfreeware.com apps that were compiled for CE2.11 so yes I do believe there is a good chance to find a few games.
Thanks folks for your replies.
I've tried very "basic" games like ICBM, but they won't run.
Visual basic stuff works provided one downloads the appropriate dll.
Will keep searching.
Take care,
well i may still look like this
http://thor.mirtna.org/features/titular_movie_themes_limahl.jpg
but my dukenukeem3d and warcraft2 are just in dirs on my sd card and they run under wm2002 to wm2005 3.5AKU without even a reinstall
so they are not really taking advantage of any newer features of the os
same with this doomCE port
http://www.revolution.cx/DoomCE.htm
levenum said:
Redugar - I don't mean to be rude but are you leaving in the 80s?
No one has bee writing games or anything other than drivers and other OS / basic components using assembler in over a decade and a half!
It's way way too much work and not at all necessary.
Click to expand...
Click to collapse
Check out SmartGear (see my emulation-related articles) and the new Pocket QuickView ( http://www.modaco.com/Pocket-QuickView-40-looking-for-ideas-t255364.html )
The mission-critical sections were all written in assembly. This is why it's WAY faster than any other, C-based emulators / image viewers.
maybe using gcc for arm to some some nativ arm code would also have less overhead then win32 stk
though not sure how many libs would be required to be linked to so could end up a drag
Ok, I know when I am bitten but I am just no willing to quit!
(Just to reiterate - to 80's remark was meant in good fun and not intended as an insult, plus this was written late at night after a long work day)
Any way it does make sense that for high speed some graphics rendering routines will be written in assembler (note that unfortunately eVC tools do not include inline assembler so modules have to be compiled separately and then linked)
I do remember taking a peak at the DOOM port and it is mostly C. (Though I am sure it has assembler sections).
What I was trying to say is this:
a) You can't write a whole game like DOOM in assembler only in reasonable time.
b) Even assembler modules need to be eventually linked in to an executable so the OS (what ever it is) can load them - and here is the problem. Every exe has a header that states what processor and what OS it is designed for. Even if your app does not use new OS features, but is linked using a higher OS SDK settings the exe header will contain a version number unknown to the OS and it will refuse to load stating that it is "illegal file".
A less prehistoric example would be files compiled with WM 6 SDK refusing to run on WM 5 despite the fact that there is almost no difference in the OS.
"(Just to reiterate - to 80's remark was meant in good fun and not intended as an insult, plus this was written late at night after a long work day)"
dont think anybody took it any other way at least i did
what i should had said maybe rather then that they were in pure asm
then maybe that they were not that depending on the os and version of the os itselfs
and maybe of those fps like doom and nuke3d and such
are ports of old dos games where that was more the custom then later on when windows gaming took off

Creating a WM Application - Where to start ?

I hope this is the right place to put this, if not, mods, feel free to remove and/or delete it. I've dabbled a bit with C before, but that's about the extent of my programming experience. I'd like to create a program that will parse the information from a website and display it... I don't imagine something like that would be hard to do, but I have no idea what tools I would even need to start writing a PPC application.
Kitco (a website that gives live quotes of precious metals) recently came out with an application for the iphone that neatly formats all this information:
http://www.kitco.com/images/banners/KitcoiPhone/iphone.html
I'd like to basically create a PPC version of this application.
Is this something that an individual with next to no experience could hope to achieve ? I'd have to create a GUI, initialize the internet, connect and retrieve a webpage and remove the relevent information before displaying it.
Any help would be greatly appreciated. I've always wanted to become more familiar with these sorts of things and figured this project would be a great way of learning it.
Thanks!
ThreadMoved
Next to no experience? I dont think so. You have to have a little under your belt first and the only way to achieve that is to start readin right here!
I'm also interested in the expert answers to this question.
My very non-expert understanding is as follows:
VS 2005 (microsoft visual studio) can create executables for WM devices using a SDK (low level) or .Net CF (medium level) interface. You want to use .Net CF (compact framework) because it is supposed to make things easier. I think you have to use C++ to use the SDK but you can use C++, C#, or Visual Basic and write to .NET CF.
VS 2005 is an IDE (integrated development environment). It contains features to edit, compile, and even test your program using simulator/debugger. I think there are some non-microsoft IDE's that can also generate Windows Mobile code -- there is a market for cross-platform environments (e.g. programmers write code using a special library instead of the windows SDK or .NET function and the same source code can be compiled to run on Blackberry, iPhone, S60, Windows Mobile, etc...)
Instead of writing to the phone hardware (or .NET abstraction) directly, you can write your application using Java. You would use some Java compatible IDE (like Eclipse, Jbuilder, or NetBeans) to create Java applets that you download to your phone. You'd have to install a Java VM (virtual machine) on your phone to run these applets. I think the downloadable games for phones are Java applets.
Disclaimer: I haven't worn my "programming cap" since 2001 and hopefully things have gotten simpler. In my previous life I designed operating systems for mainframe computers.

Mono for Android

Are there any developers using Mono for development? Looking for some feedback on it...
Galaxy Red - DJ05 - Voodoo5 using XDA app
Mono with JIT enabled won't work on the Fascinate (or any Galaxy S device) until 2.2 is rolled out. Of particular note, this causes many problems with games authored in Unity3D. Cite: h t t p :// forum.unity3d.com/threads/62410-Galuxy-S-support#post409742
If I was drinking something I would have spit it out when I read the title of this post.
Sent from my SCH-I500 using XDA App
I wonder if some of the new Kernels that are being created are having the same issue ... but Unity isn't using Mono from my quick skim of the site. And from my reading, mono has its own JIT runtime. It would be interesting to know if anyone has used it yet.
http://monodroid.net
Uhhh...no
Lol...the CORRECT answer is why the f*ck would you want to? C# is M$ lame attempt to make a proprietary language. Why did the world need C# when Java is a perfectly good language? It didn't. .Net is garbage unless you want to write windows software, but that's lame....just sayin .
jfelectron said:
.Net is garbage unless you want to write windows software
Click to expand...
Click to collapse
Wait, you mean it's only useful for the exact thing it's ****ing intended for? Shocking.
jfelectron said:
Lol...the CORRECT answer is why the f*ck would you want to? C# is M$ lame attempt to make a proprietary language. Why did the world need C# when Java is a perfectly good language? It didn't. .Net is garbage unless you want to write windows software, but that's lame....just sayin .
Click to expand...
Click to collapse
There is just so much that can be gleaned from this post...
1) Obviously you've never actually tried developing in C#, because it's a complete pleasure to work with. Once you've used Visual Studio, it literally pains you to use anything else, because no other IDE comes close. I've used them all.
2) The entire point of this post is that .NET is not useless; The specification for .NET is completely open. And .NET is apparently good enough that people devoted their free time to develop Mono, thus enabling .NET development for Linux platforms. There's also Silverlight and ASP.NET which enable development of Web applications.
3) M$? Seriously? I remember back when the internet was invented and people thought that was funny. Now it's just kind of ignorant.
4) Refusing to open yourself up to multiple development technologies is a great way to find yourself irrelevant in a short amount of time.
5) Obvious troll is obvious. Sorry for feeding him.
bmxdad said:
I wonder if some of the new Kernels that are being created are having the same issue ... but Unity isn't using Mono from my quick skim of the site. And from my reading, mono has its own JIT runtime. It would be interesting to know if anyone has used it yet.
Click to expand...
Click to collapse
As a Unity3D dev, I can assure you that Unity3D is indeed powered by Mono. (With all the C# code I write every day it better be! )
That said: the 2.1-based kernels that are rolling out for the Fascinate do indeed suffer from this effect. In fact, Kaoscinate is unable to use Android's built in JIT interpreter due to this very effect. I was trying briefly to help him trace down the problem, but didn't have enough time to contribute. Maybe after our next game ships.
konistehrad , thanks for the reply.
I'm one of those stupid C# / Asp.Net developers, so its nice to know I'm not alone.
To jfelectron ... I wonder what the new windows phone is using .. O yea ... .Net and C# .... Go figure ...
bmxdad said:
I wonder if some of the new Kernels that are being created are having the same issue ... but Unity isn't using Mono from my quick skim of the site. And from my reading, mono has its own JIT runtime. It would be interesting to know if anyone has used it yet.
http://monodroid.net
Click to expand...
Click to collapse
In addition to Monodroid(which will require you pay a fairly hefty license fee for an independent developer) there is also Koush working on his own free open source port. This can be found here: http://www.koushikdutta.com/search/label/Mono
I'm not sure what all works in either implementation but I don't think either of them is ready for prime time yet.
I'll be in heaven when it is as I currently develop in VB.Net and swapping to eclipse is a nightmare, not having the .net framework is horrible as well because now I have to reinvent the wheel for dozens of objects.
Haha, I see the C# harpies have descended to inform us how wonderful their language is. It's not a question of how nice it is or isn't to use, it's a question of why fragment the development landscape with ANOTHER systems programming language that is a pretty blatant copy of Java. I don't think C# is fundamentally better than Java, so it just fragments minds away from common development goals and creates two independent efforts. This hurts everyone. It's fine to take an existing Mono/C# codebase and want to run it on Android. I just don't see why you would want to use something like MonoDroid to develop from scratch. The best apps will ALWAYS use the native APIs, there is just no reasonable way a secondary set of APIs that wrap native APIs will provide the same experience. The Evernote people were just talking about this, they have development teams for each platform, they don't look for write once run everywhere solutions because at the end of the day these deliver subpar experiences. If you don't know Java and Android APIs then learn them. Same for iOS. I'd do the same for WP7...that is if I wanted to work for a I decide the UI for you overlord.
I'm pretty sure that everyone participating constructively in this thread has mentioned that they're currently a .NET developer who has code written in VB/C#. It surprises me how much flak this thread is attracting when we're discussing tools and libraries that allow us to effectively and comfortably develop more software for the Android platform.
I develop mostly in Java, but language wise C# is way better. Java 7 still isn't getting lambdas, an when it does it's going to be really kludgy. Java language development has kind of died. Scala is pretty cool though. And Visual Studio is significantly better than eclipse, although IDEA is quite good too. I do like eclipse but it's just not as nice to work with and slower.
Yes ... C# is a redo of Java, kinda, but they moved it beyond what the Java was ... ***** about about MS all you want, they do have some good stuff. As for the API's, they're doors for us to use ... it all gets crunched down to 1's and 0's, so who cares how it gets there. Simplistic I know, but I'm sure you get what I'm saying.
They're already porting .net to the iPhone, so I was just wondering if anyone was interested ... didn't know I would touch a few nerves
jfelectron said:
Haha, I see the C# harpies have descended to inform us how wonderful their language is. It's not a question of how nice it is or isn't to use, it's a question of why fragment the development landscape with ANOTHER systems programming language that is a pretty blatant copy of Java. I don't think C# is fundamentally better than Java, so it just fragments minds away from common development goals and creates two independent efforts. This hurts everyone. It's fine to take an existing Mono/C# codebase and want to run it on Android. I just don't see why you would want to use something like MonoDroid to develop from scratch. The best apps will ALWAYS use the native APIs, there is just no reasonable way a secondary set of APIs that wrap native APIs will provide the same experience. The Evernote people were just talking about this, they have development teams for each platform, they don't look for write once run everywhere solutions because at the end of the day these deliver subpar experiences. If you don't know Java and Android APIs then learn them. Same for iOS. I'd do the same for WP7...that is if I wanted to work for a I decide the UI for you overlord.
Click to expand...
Click to collapse
By your logic why did anyone ever move away from programming in machine code? It was the purest and fastest executing code ever!
jfelectron said:
Haha, I see the C# harpies have descended to inform us how wonderful their language is. It's not a question of how nice it is or isn't to use, it's a question of why fragment the development landscape with ANOTHER systems programming language that is a pretty blatant copy of Java. I don't think C# is fundamentally better than Java, so it just fragments minds
Click to expand...
Click to collapse
Well, I didn't like J++. I felt the same way about C# until I did a test project with SharpDevelop. It really is a pleasure to use, most especially when coming from Java. Both languages also read very similarly and are easy to bounce between. In terms of fragmentation, it tends to come with the territory and might as well be accepted.
Learning something new isn't necessarily evil.
MS does decent development tools. CLR is open and in many aspects better than JVM. C# as language progressing way faster than java and puts it to shame way to often.
Read here from Koush. I guess that name rings a bell?
So, why not? Competition is great!
Unity and Mono
As a long time .Net developer I was drawn to Unity with significant suspicion of the Mono framework, I had always assumed that mono was going to be a slower, poor cousin of the official framework, but for my needs it has proved problem free on a range of Android devices. I chose Unity and Mono as a framework for game dev on android because I had a significant amount of code in c# from Windows Mobile 6 dev back in the day, and Unity had the 3d rendering capabilities I needed.
I'm using Unity game engine that uses Mono. C# is a great language that addresses many shortcomings in C++ and Java. However it is not possible to do everything in the mono-runtime on Android. C# to Java bridge is pain in the ass to implement.
Lets be realistic...
First came C and then that evolved to C++. Today the vast majority of operating systems are written in either C or C++. I have NO idea what Object C is (iOS) but I am sure it is evolved from one of these as well.
Java was an attempt to produce a machine generic programming language where the code runs on any machine. This language was based on C (C++?) and as such is very similar to C(c++) in many areas. However to reach this generic level all compiled code is compiled to a machine independent code and run on an interpreter. This code then is slightly slower than if the same program was written in C or C++. But can be run on MANY machines without porting which is not the case with C or C++.
C# was intended to be an extension of C++. After MS's failed attempt at J they put their energy behind C#. C# has now become a very viable C++ replacement on MS machines to a point it doesn't make much sense to write in anything else unless you are writing system level code for which C++ or C makes sense. Somewhere along the failure with MS's attempt at a Java clone they decided to make .NET a "standard" library which allowed Mono to become reality. C# has evolved over time to incorporate many of the great ideas that Java has included but have come up with many new ideas of their own. Realistically it comes down to which do you feel more comfortable programming in. Java or C#. C# with it's .Net libraries can be much easier to write for than Java simply because of the Libraries available.
On another note, I saw a product recently that looks very promising. dot42 is a product that appears to be looking to make a compiled C# program for Android. This by passes the need for the code interpreter and could potentially be as fast as C++ or C code for running on Android.

Becoming a XDA Developer?

How can I become a XDA Developer? I'd love to become one, specifically programming for Android apps, ROMs, and stuff like that.
Can anyone give me an head start?
Specs:
MacBook Pro, Mid-2010
Processor: 2.4 Intel Core i5
Memory: 4GB 1067MHz DDR3
Graphics: nVIDIA GeForce GT 330M
OSX: Lion 10.7.2 (Build 11C74)
I can't seem to install Android Kitchen, and fink is too confusing for me.
I already have the AOSP source code for ICS.
Learn java for programming apps. C for developing kernels. Both are similar to an extent so it shouldn't be that hard. I am unfamiliar with the offerings of a OSX but if you can dual boot to windows or Linux, get eclipse (the more preferable one) or netbeans for java and if you're on windows, visual c++ 2008 or whatever (dev c++ is very loose with its strictness in syntax so avoid that).
Books... Well these books contain a lot, and I mean a lot of information. They will have a lot of jargon which you will probably be unfamiliar with, so learning from one might be really difficult. So I suggest say a dummies book or something concise and in layman terms at first, then after maybe head first into java, a reference c manual or c how to program for the nitty gritty stuff or when you're more experienced.
Don't worry, your computer is more than enough for your stage right now, it'll probably take you a year or so or more to actually get up to the "developer" (note not professional developer level, that you will need your 4 years. xD) (if you take this really seriously e.g. classes, practise, reading, etc).
I have Eclipse for OSX, and it has the Android plug-in and can write Java and C programs.
But what language do I use for ROMs?
it is written in both c and java. The java runs on top of the c. Most of what we use is in java, but the core (kernel (think drivers etc)) is in c.
If you are thinking of say a cyanogen mod level of modding (meaning changing the source code to improve android) then you will need a professional level of development skills, which will take a long time, unless you are some genius. But most chefs really only build a rom through using an existing rom, use a tool/ program to do say deodex or such, remove this app and that, put in this kernel, change this file to this file, and done, it's a custom rom. That requires no programming knowledge whatsoever.
You seem to know a lot. Could you be my mentor/tutor or something?
Oh no, i'm still in high school lawl. I've only done computer science for one year and a half right now and that's it. I know nothing of java and its syntax and really I only know an intermediate level of c. So yeah i can't really tutor or help you, sorry. xD We'll be on the same road my firend, although my dreams aren't stopping with android. (I'm aiming for you holograms and car AI systems, you best be ready.)
Anyways there's a forum on xda dedicated to helping people learn how to develop roms/android and possibly apps called chef central. Head over there for the big guys to help.

[Q] How to create homebrew app with native code which run in emulator.

Hi Guys,
I would like to create simple app with NATIVE code which run in emulator.
It is not possible to use solution in http://forum.xda-developers.com/showthread.php?t=1299134&highlight=developer+guide because it's use some ARM code.
Do you have any idea how make things work?
Thank you,
Ch.
You actually could (msotly) use that guide, but you would need to recompile the ARM portion for x86. My guess as to the best way to do this would be to use the "Platform Builder" for CE6 or CE7, instead of using the WinMo 6.5 platform as your target. WinMo only shipped on ARM devices, so far as I know, but the underlying OS, Windows CE, is very portable and the tools for it support building on a wide variety of architectures. WP7 is built on a version of CE somewhere between CE6 and CE7.
Otherwise, the stuff about using ATL, making a COM library, using ComBridge from the WP7 app, etc. all still applies.
That all said... why would you want to do this? Do you not have an actual phone to test on? Porting between ARM and x86 isn't *that* hard, but you shouldn't just assume that it'll work in all cases, so it makes a lot more sense, if you're building native code, to build and test for the same architecture you're planning to release on.
Additionally, the emulator may be missing some of the libraries that are present on the phone.
Thanks a lot. I will try it.
This is very beginning of my school project. I want only demonstrate that is possible to run some native code on WP7. Next phase of project will be on real device which I don't have right now..
Well, good luck, but I'd tend to say you're setting yourself up for a risk of failure. I don't know what it will take to use the CE Platform Builder for something like this; I have it installed but have never tried using it.
There may also be a way to compile for x86 using the WinMo build tools; I think some of the old "emulators" for WinMo were also x86 virtual machines (much like the WP7 emulator is). I never tried, though.
Risk of failure? I don't see how. The hardest part of this is finding a way to get his .exe on the emulator device and unlocking it. If he isn't using ARM ASM in his project, "porting" to x86 (or any other processor WinCE supports) should be trivial as long as a sufficiently complete SDK is available. The main issue with x86 on newer Pocket PC-like targets is that there are no Pocket PC SDKs targeting it newer than the Pocket PC 2003 one. If you want to use newer WM5 only features like GPSAPI, you'd probably need to use a CE 6.0 SDK instead.
If he doesn't want to do real time debugging, any of the Windows CE development tools or even 3rd party tools like Bloodshed DevC++, CE gcc/MinGW or FreePascal should all suffice. Windows CE is a very backward compatible OS so even an application targeting the CE 2.11 platform/SDK should still run on WP7 when you are careful to use supported APIs.
If you don't want to install Platform Builder and generate your own custom OS to base an SDK on, there are plenty of SDKs to choose from. Of course, some are worse than others. If you are using the CE 4.2 or 5.0 STANDARD_SDKs, you might become a bit frustrated when you realize they are missing many basic things like the Windows CE SIP APIs. (something that has been available for CE since 1.01 in 1997). But if you don't care about using the latest native CE kernel features and still want to use a newer IDE like VS2005/VS2008, the CE 5.0 STANDARD_SDK should be enough if you are careful. Though, I usually install things like eMbedded Visual C++ 3.0 and 4.0 along with all the Pocket PC and Handheld PC SDKs just in case I need a header or lib file that one or the other is missing.
The following MS SDKs can target x86:
-eVC3
Pocket PC 2002
Smartphone 2002
Handheld PC 2000
-eVC4
Pocket PC 2003
Smartphone 2003
STANDARDSDK_400
STANDARDSDK_401
STANDARDSDK_420
STANDARDSDK_500
-VS2005/2008
STANDARDSDK_500
Another useful x86 SDK I've found is the one for the Allegro CE/DOS Field PC:
http://www.junipersys.com/Juniper-Systems/support/Developers/Allegro-Field-PC/Allegro-CX
Here are some download links to many of the CE SDKs and compilers that were released over the years:
Here are some links to download some of the tools I've mentioned:
http://www.hpcfactor.com/developer/
http://www.microsoft.com/download/en/search.aspx?q=embedded visual tools
You will need SP4 for eMbedded Visual C++ 4.0 if you wish to use newer SDKs with it.
http://www.microsoft.com/download/en/search.aspx?q=pocket pc sdk
Ummm... maybe you missed the part where this is WP7 forum, and the OP is trying to run native code on the WP7 emulator... I can tell from your post that you're not terribly familiar with WP7 development, so here's a few salient points:
Compiling to a .exe is a waste of time. WP7 won't run foreign EXEs, at all, unless you make some pretty low-level changes that aren't possible on the emulator (see "full-unlock" custom ROMs). You have to write a managed app (which compiles to a DLL hosted inside a low-privilege EXE that's built into the system) and a COM library and use the InteropServices ComBridge API. So far we haven't even gotten P/Invoke to work.
WP7, especially Mango, uses a limited set of native APIs and the APIs have changed somewhat in the last decade or so. They aren't supposed to be available to third-party devs at all, so any backward compatibility is basically a convenient accident. Targeting Smartphone 2003 *might* work, but then, it might not. Even a number of WinMo 6.5 APIs aren't available or don't work.
Since it appears that the OP is just going for a demo project, he or she probably is a lot less interested in getting the most powerful APIs, and is probably hoping for something closer to invoking a MessageBox from native code.
All that said, however, it's true that there are WinCE SDKs which can build native x86 code. I'd tend to suggest using the CE6 or CE7 Platform Builders, since they're the most recent (WP7 is somewhere between the two), but there are other options. You probably want to follow the guide as much as possible, including things like using ATL, as it makes writing a COM library a lot easier and that's the best way we currently know for executing native code in WP7.

Categories

Resources