PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2011, 08:05 PM
AmeiseMike's Avatar
Lurker
Offline
Pocket PC: Touch Pro 2
Carrier: Sprint PCS
 
Join Date: May 2009
Posts: 22
Reputation: 5
AmeiseMike is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Alternatives to current development

Since it appears that the delays in having a fully functional Android build is that the drivers do not exist for the Linux kernel, and therefore equivalent drivers must be implemented, why not bypass this requirement altogether?

One could theoretically implement a POSIX wrapping layer on top of the CE Kernel, with a wrapper for Linux commands as well. The vast majority are either implemented mostly (WinSock vs POSIX Sockets, for instance), or would be trivial (pthreads versus Windows threads). If one can make the CE Kernel respond to POSIX and Linux API calls in a proper manner, one could theoretically run Android on top of the Windows CE Kernel. This would let you use the drivers are are extant for the system already. All that would then need to be implemented are the intermediate JNI layers within Android. You would also need to implement a means by which to execute ELF binaries.

This would be a large task, certainly, but if it is done, it means that practically any Windows CE device could have a full Android build ported.

You would lose ext2/4 support, though.

Just my 2 cents. You could always do the reverse and write a driver abstraction layer to handle CE drivers within Linux, but that may actually be more difficult.

Edit: This appears to have posted itself in the wrong forum - can someone please move it to the Android subforum of TP2?

Last edited by AmeiseMike; 05-04-2011 at 08:23 PM. Reason: Wrong Forum
Reply With Quote
  #2 (permalink)  
Old 05-05-2011, 12:53 AM
gTen's Avatar
"The Fuzzy One"
Offline
Pocket PC: PPC6800 & Touch Pro 2 & Epic 4G
Carrier: Sprint
Location: Internet
 
Join Date: Feb 2008
Posts: 7,855
Reputation: 9080
gTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the communitygTen is a trusted member of the community
Mentioned: 106 Post(s)
Tagged: 1 Thread(s)
Re: Alternatives to current development

Moved
__________________
Earn some spare cash and get cash back at stores like NewEgg and more:

http://quickrewards.net/?r=!F94VXV35D5MV2

(My shameless referral link)
Reply With Quote
  #3 (permalink)  
Old 05-05-2011, 01:19 AM
arrrghhh's Avatar
Testing Extraordinaire
Offline
Pocket PC: HTC Touch Pro 2 (RHOD400)
Carrier: Sprint
 
Join Date: Mar 2007
Posts: 3,604
Reputation: 7360
arrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the community
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
Re: Alternatives to current development

Running Android on a CE kernel... Just seems wrong.

What is really left that would benefit throwing away everything that's been done thus far and basically starting over on a complete rewrite that sounds bad even on paper... who knows how it would actually work, if at all.
Reply With Quote
  #4 (permalink)  
Old 05-05-2011, 01:25 AM
highlandsun's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC G1, TP2
Carrier: T-Mobile
 
Join Date: Jan 2011
Posts: 86
Reputation: 240
highlandsun is keeping up the good workhighlandsun is keeping up the good workhighlandsun is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
The idea is totally ludicrous. Android doesn't run on a generic POSIX layer, it has a number of custom kernel drivers. Figuring out how to shoehorn them into CE would be a bear, even if you had CE kernel source.

It would be an utter waste of time. Look at how well Cygwin emulates POSIX on desktop windows (it's a dog). CE is even more lobotomized. Ridiculous.

Sent from my TP2 using Tapatalk
Reply With Quote
  #5 (permalink)  
Old 05-05-2011, 01:56 AM
AmeiseMike's Avatar
Lurker
Offline
Pocket PC: Touch Pro 2
Carrier: Sprint PCS
Threadstarter
 
Join Date: May 2009
Posts: 22
Reputation: 5
AmeiseMike is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Alternatives to current development

Quote:
Originally Posted by highlandsun View Post
The idea is totally ludicrous. Android doesn't run on a generic POSIX layer, it has a number of custom kernel drivers. Figuring out how to shoehorn them into CE would be a bear, even if you had CE kernel source.

It would be an utter waste of time. Look at how well Cygwin emulates POSIX on desktop windows (it's a dog). CE is even more lobotomized. Ridiculous.

Sent from my TP2 using Tapatalk
There are not -that- many custom drivers, and most of them, their Android-specific behavior would just need to be re-implemented - this does not -need- to be done at the kernel-level, especially if you are developing an interface between CE and Android. You would certainly need to rework the JNI level interfaces, though.

I see your point about Cygwin DLL performance - however, many of the POSIX commands that would be required would almost be basic wrappers... the majority of the thread commands have near-direct analogs with the Windows API, for instance.
Reply With Quote
  #6 (permalink)  
Old 05-05-2011, 02:03 AM
vinceweis's Avatar
Lurker
Offline
Pocket PC: AT&T Tilt
Carrier: AT&T
Location: Arizona
 
Join Date: Feb 2010
Posts: 6
Reputation: 35
vinceweis is just getting started
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Alternatives to current development

Quote:
Originally Posted by AmeiseMike View Post
There are not -that- many custom drivers, and most of them, their Android-specific behavior would just need to be re-implemented - this does not -need- to be done at the kernel-level, especially if you are developing an interface between CE and Android. You would certainly need to rework the JNI level interfaces, though.

I see your point about Cygwin DLL performance - however, many of the POSIX commands that would be required would almost be basic wrappers... the majority of the thread commands have near-direct analogs with the Windows API, for instance.
When you have a version that loads on my Tilt2, I will give it a try. In the mean time, asking others to execute your ideas won't make it happen. Give us a plausable example.

Last edited by vinceweis; 05-05-2011 at 02:06 AM.
Reply With Quote
  #7 (permalink)  
Old 05-05-2011, 02:11 PM
AmeiseMike's Avatar
Lurker
Offline
Pocket PC: Touch Pro 2
Carrier: Sprint PCS
Threadstarter
 
Join Date: May 2009
Posts: 22
Reputation: 5
AmeiseMike is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Alternatives to current development

Quote:
Originally Posted by vinceweis View Post
When you have a version that loads on my Tilt2, I will give it a try. In the mean time, asking others to execute your ideas won't make it happen. Give us a plausable example.
Well, something I just wrote up. Doesn't handle attributes, but this is something such as pthread_create (don't mind syntax errors, I didn't try to compile it or check it, just wrote it quickly):

Code:
typedef struct pthread
{
	HANDLE mThreadHandle;
} pthread_t;

int pthread_create(
	pthread_t * restrict thread,
	const pthread_attr_t * restrict attr,
	void * (*start_routine)(void *),
	void * restrict arg
)
{
	//ignore attr for now
	thread = malloc(sizeof(pthread_t));
	thread->mThreadHandle = CreateThread(
		NULL,	//security descriptor LPSECURITY_ATTRIBUTES
		0,	//stack size. 0 is default
		/*
		** the below is kinda wonky, and won't work on x64 systems.
		** All current ARM processors are 32-bit.
		** The size of a DWORD (as Win32/64 defines as the return type)
		** is the same as the size of a pointer (as POSIX
		** has as the return type) on 32-bit architectures.
		*/
		(LPTHREAD_START_ROUTINE)start_routine,
		arg,
		0,	//start immediately
		NULL	//ptr to thread ID
	);

	if (thread->mThreadHandle == NULL)
	{
		//process from GetLastError. Don't feel like doing right now.
		return EINVAL;
	}
	return 0;
}
Reply With Quote
  #8 (permalink)  
Old 05-05-2011, 03:05 PM
highlandsun's Avatar
PPCGeeks Regular
Offline
Pocket PC: HTC G1, TP2
Carrier: T-Mobile
 
Join Date: Jan 2011
Posts: 86
Reputation: 240
highlandsun is keeping up the good workhighlandsun is keeping up the good workhighlandsun is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Congratulations, you've duplicated one API, only a couple thousand more to go. If you implement one/day successfully, you might be done in 3-5 years. Hint: you won't average one/day.

Sent from my TP2 using Tapatalk
Reply With Quote
  #9 (permalink)  
Old 05-05-2011, 03:09 PM
arrrghhh's Avatar
Testing Extraordinaire
Offline
Pocket PC: HTC Touch Pro 2 (RHOD400)
Carrier: Sprint
 
Join Date: Mar 2007
Posts: 3,604
Reputation: 7360
arrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the communityarrrghhh is a trusted member of the community
Mentioned: 7 Post(s)
Tagged: 0 Thread(s)
Re: Alternatives to current development

lol, I was just going to ask does BT work? GPS? Prox sensor? Ambient light sensor? How about stylus detection?

AmeiseMike, you seem like a sharp guy... Why not help out with the community development? The devs have made great progress, and help is always appreciated. The more people writing code, in theory the more code that makes it into the kernel .
Reply With Quote
  #10 (permalink)  
Old 05-05-2011, 03:32 PM
AmeiseMike's Avatar
Lurker
Offline
Pocket PC: Touch Pro 2
Carrier: Sprint PCS
Threadstarter
 
Join Date: May 2009
Posts: 22
Reputation: 5
AmeiseMike is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Alternatives to current development

If you cannot duplicate a single basic interface per day, then you aren't very good at what you do. pthreads itself has already been ported to the Windows API in the past, as have several other APIs. To be fair, however, that is not an API, it is a single API procedure, though the other pthread functions would be trivial to implement as well.

As per the 3-year concept... how long have you been trying to port Android onto the TP2, so far? A successful wrapping of the Android system around CE would allow any WinCE device to have 'droid, not just TP2.

arrrghhh - they don't need more programmers, they need people who can reverse engineer things. As per BT, GPS, Proximity, Ambient, etc, that would have been handled by the CE drivers. You'd need to implement the JNI wrappers in Android for them, though.
Reply With Quote
Reply

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 10:23 PM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com