Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[DFT] z..::H.O.W...T.O...N.A.T.I.V.E::..z [PREVIEW]

OP Cotulla

9th September 2011, 10:41 PM   |  #1  
Cotulla's Avatar
OP Senior Recognized Developer
Thanks Meter: 5,453
 
881 posts
Join Date:Joined: Sep 2007
More
..::H.O.W...T.O...N.A.T.I.V.E::..

Hello,
today I had decided to start this thread about native development for WP7.



At the current moment I don't upload/attach any working stuffs to this message. It will happen a bit later, after new DFT ROMs release. This is because it's very difficult to run them for now.


Let's start from current achieved results:

1) It's possible to run any EXE files (after "FullUnlock")
2) Those EXE files can do any operations in the system (after "FullUnlock")
3) It's possible to show some GUI from this applications. But GUI has legacy Windows CE style, it's impossible to create Metro-style applications for now.


How can it be used by community?

We can develop a lot of homebrew applications: like porting emulators, old native applications, video players and etc.
It can be possible to port famous TCPMP player for example and get ultimate playback on Windows Phone 7!


Is it possible to run old Windows Mobile 6.5 applications without modifications?

No, it's not possible. A lot of different APIs are missing for those applications.


Is it hard to modify old Windows Mobile 6.5 applications?

Well, it's almost same like porting to pure Windows CE, but a lot of Windows CE stuffs are "damaged" inside Windows Phone. They just doesn't work right, because nobody never used/tested them before :P


Photos of sample "WP7 Native test"

Information for developers you can find in the next messages.



So I will release demo WP7 native application, when we fix issues with FullUnlock.

Demo will be as binary EXE file. And as VS2008 project, which can be good start point for other developers.

Now this thread dedicated for discussion, share ideas and thoughts.



DFT, Cotulla
Attached Thumbnails
Click image for larger version

Name:	IMAG0258.jpg
Views:	3751
Size:	95.5 KB
ID:	714929   Click image for larger version

Name:	IMAG0267.jpg
Views:	2553
Size:	94.7 KB
ID:	714930   Click image for larger version

Name:	IMAG0270.jpg
Views:	1778
Size:	93.6 KB
ID:	714931   Click image for larger version

Name:	IMAG0275.jpg
Views:	1491
Size:	96.6 KB
ID:	714932  
Last edited by Cotulla; 9th September 2011 at 10:47 PM.
The Following 56 Users Say Thank You to Cotulla For This Useful Post: [ View ]
9th September 2011, 10:41 PM   |  #2  
Cotulla's Avatar
OP Senior Recognized Developer
Thanks Meter: 5,453
 
881 posts
Join Date:Joined: Sep 2007
More
Information about "FullUnlock"
Information about "FullUnlock"



DevUnlock actually allows only to deploy XAP files from external sources.
It doesn't give more privileges.

So we (DFT) developed "FullUnlock". FullUnlock is implemented as replacing some system files by wrappers, which allows any kind of access (disable access checking at all)

We replace LVMOD.DLL which used to check files and data (checksums, certificates and etc) and POLICYENGINE.DLL which implements internal objects access checking.

All written before means that FullUnlock at the current moment only possible by flashing custom ROM to device. In future maybe we can find good ways to do it without flashing, but for now I don't see any ideas how to do it without flashing.

Maybe we can replace DLLs inside \Windows\ directory (put a shadow copy), but I am not sure if it will work really. It's stuffs for future experiments.

It can be possible to do something near by editing policy values, but it need big research to find right way. As it still won't disable file checking, maybe we can add own certificate to right store and then sign files with them.

The last DFT 7720 MANGO ROMs contains FullUnlock, but it doesn't work as expected there few issues. as well some users got issues with debugging on those ROMs and etc. We will continue work under it


So I will release demo WP7 native application, when we fix issues with FullUnlock.

Demo will be as binary EXE file. And as VS2008 project, which can be good start point for other developers.

Now this thread dedicated for discussion, share ideas and thoughts.

The Following 26 Users Say Thank You to Cotulla For This Useful Post: [ View ]
9th September 2011, 10:42 PM   |  #3  
Cotulla's Avatar
OP Senior Recognized Developer
Thanks Meter: 5,453
 
881 posts
Join Date:Joined: Sep 2007
More
For developers
For developers
(users do not read! danger for brain!)



First of all I want to talk about abilities of native code.

Most applications built in inside WP7 are native. But they don't use usual Dialog UI style, they are using some kind of Silvelight scripts. This kind of UI is called "UIX".
Main idea of UIX that DLL files have UIX resources inside which describe whole UI.
Something similar is used inside CE 7.0 Slivelight - there some xml compiler which make binary data and put them as resources inside DLL. I don't know how to decode this binary data.
Seems Zune desktop application also using this framework.

So UIX used some kind of scripts for UI part and callbacks for all actions.
If we decode this UIX format, we will able to change/modify UI as we want, like it was before with regular resources inside DLL. But UIX must be much more powerful.

We can't use UIX for native application because we don't know how to use it, how to make proper binary data and etc. It's hard to reverse.

But native application can have some GUI with Windows CE style (you can see examples on the photos above)


Another issue: If you call API function "CreateWindowW" you won't see anything on the screen. It seems because shell handle all output, so window doesn't visible.
After some searching I found inside some test ROM nice DLL called "WindowTreeUpdater.dll". After looking inside and decoding functions parameters, it's working!
Basic idea: you create window and call function from this DLL and Window appear on the screen. There seems some kind of proxy engine to output legacy windows on top of shell output.
Nice, it's working...

So we can use usual windows for UI inside native application.
There present standard controls, but they work rather laggy (hey, and looks too).
Basic controls like PushButton, Static, CheckBox, Radiobutton, Icon are working.
About extended controls: (Progress bar, list view, and etc)
they come from Commctrl.dll usually, it was present inside Initial/NODO releases, ut it was removed inside MANGO. I was able to run NODO Commctrl.dll under MANGO after some modifications. But all this controls are shown on screen, but they don't do anything on input. So you can see toolbar, but can't press any button.
CommDlg.dll is missing and never was inside WP7.

There present AYGSHELL.DLL, but most functions are broken. For example, I was not able to create menu bar.

So, a lot of functions are broken, like MessageBox not working.

But we still can create own custom controls and use them for developing.

For example porting TCPMP means that we will need reimplement UI fully - because toolbar doesn't work. slider also won't. Maybe get and reuse some source from ReactOS or NT40 CommCtrl
The Following 22 Users Say Thank You to Cotulla For This Useful Post: [ View ]
9th September 2011, 10:45 PM   |  #4  
Cotulla's Avatar
OP Senior Recognized Developer
Thanks Meter: 5,453
 
881 posts
Join Date:Joined: Sep 2007
More
reserved1reserved1
The Following 4 Users Say Thank You to Cotulla For This Useful Post: [ View ]
9th September 2011, 10:46 PM   |  #5  
Cotulla's Avatar
OP Senior Recognized Developer
Thanks Meter: 5,453
 
881 posts
Join Date:Joined: Sep 2007
More
reserved2reserved2
The Following 3 Users Say Thank You to Cotulla For This Useful Post: [ View ]
9th September 2011, 10:46 PM   |  #6  
Cotulla's Avatar
OP Senior Recognized Developer
Thanks Meter: 5,453
 
881 posts
Join Date:Joined: Sep 2007
More
reserved3reserved3
The Following 4 Users Say Thank You to Cotulla For This Useful Post: [ View ]
9th September 2011, 10:54 PM   |  #7  
Member
Thanks Meter: 60
 
90 posts
Join Date:Joined: Aug 2010
More
This is some crazy ****! I like it
The Following 2 Users Say Thank You to Dam4rusxp For This Useful Post: [ View ]
9th September 2011, 11:03 PM   |  #8  
Senior Member
Thanks Meter: 118
 
1,918 posts
Join Date:Joined: Jun 2007
for...all...devices!? If possible...damn
I just came...
Last edited by domineus; 9th September 2011 at 11:06 PM.
9th September 2011, 11:04 PM   |  #9  
colossus_r's Avatar
Senior Member
Thanks Meter: 367
 
2,014 posts
Join Date:Joined: Feb 2007
More
Holly smoke !!!!!!!!!!!!!!!

Way to go guys....BRAVO... This is a major breakthrough for wp7 dev

Once again well done DFTeam
9th September 2011, 11:07 PM   |  #10  
Member
Flag P'Vegas
Thanks Meter: 2
 
42 posts
Join Date:Joined: Jan 2010
More
You guys are beasts...please keep it up :)

Post Reply Subscribe to Thread

Tags
dft, native, wp7
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes