the key to hacking the KIN - KIN Two Software Development

the key to hacking this phone, as ive noticed, isnt getting a new os. ive paid attention and i think i know what to do. we need a new internet browser. if you think about it, the browser is the problem because of its zero functionality. what we need to do is make an html parser in java that is invoked in javascript (dezgrz thx for finding out about the javascript apps). i think we should focus on getting this done.

Its a good idea but we have no way of uploading a new browser to the device.

X-15D9W8491 said:
the key to hacking this phone, as ive noticed, isnt getting a new os. ive paid attention and i think i know what to do. we need a new internet browser. if you think about it, the browser is the problem because of its zero functionality. what we need to do is make an html parser in java that is invoked in javascript (dezgrz thx for finding out about the javascript apps). i think we should focus on getting this done.
Click to expand...
Click to collapse
Your post makes no sense.
First because that's not the key for hacking
Second cause java applications can't be invoked from javascript.

it does make sense @johnkussack
is does make sense. you can invoke a java app through js. quit criticizing me just because you dont know what youre talking about. and besides, what i meant to say (if this makes it easier to understand) is that we code a java app onto the phone that automatically connects to the browser and a download is set off in javascript that bypasses anything written into the browser by editing the permissions, etc by editing the browser and just making a new one and not being lazy. you of all people should know this makes sense because you programmed and app onto the kin! besides, the whole thing about hacking is to be optimistic or you never get it done and youre impeding development with stupid posts like your last. get a grip and post something important instead of that trash next time!

thats the point
WEM97 said:
Its a good idea but we have no way of uploading a new browser to the device.
Click to expand...
Click to collapse
exactly my point. we could just create a new app like john did only we make it work like john obviously failed to do.

X-15D9W8491 said:
exactly my point. we could just create a new app like john did only we make it work like john obviously failed to do.
Click to expand...
Click to collapse
~~~~~~~~~~~~~~Forgotten~~~~~~~~~~~~

X-15D9W8491 said:
nonsense stuff
Click to expand...
Click to collapse
First of all, you'r messing it all
Second, to run a java application you would need to have a java virtual machine (which kin has not), or interpretation for java applets (which kin has not).
Third, i do know what i talk about, cause i code in Java & Javascript.
X-15D9W8491 said:
is that we code a java app onto the phone that automatically connects to the browser and a download is set off in javascript that bypasses anything written into the browser by editing the permissions, etc by editing the browser and just making a new one and not being lazy.
Click to expand...
Click to collapse
Here one could stop reading. Also you can call Kitt to try to hack it, but it may not answer.
So, do your work before saying that other have failed where you have no success either.
And if we could do that magic stuff, last thing we should do is care about a new browser, when you could just install opera for win ce. So all the topic is going nowhere.

johnkussack said:
First of all, you'r messing it all
Second, to run a java application you would need to have a java virtual machine (which kin has not), or interpretation for java applets (which kin has not).
Third, i do know what i talk about, cause i code in Java & Javascript.
Here one could stop reading. Also you can call Kitt to try to hack it, but it may not answer.
So, do your work before saying that other have failed where you have no success either.
And if we could do that magic stuff, last thing we should do is care about a new browser, when you could just install opera for win ce. So all the topic is going nowhere.
Click to expand...
Click to collapse
first, i havent had any success yet because those were plans. i havent tried this yet.
second, if putting on opera could help, why didnt you do it, "genius"?
if this thread is going nowhere then do me a favor and stop posting on it!

piss off
soninja8 said:
You sound like a smart-ass. You think its so simple that you decide to make fun of John. Without John we wouldnt have done anything by now so you should just shut it.
Click to expand...
Click to collapse
that post was an a and b conversation between me and john so c your way out, dumbass. and you should shut it because you havent really helped at all, john has gotten me nowhere because i started from the beginning before i was part of this, and i need absolutely no input from you.

X-15D9W8491 said:
second, if putting on opera could help, why didnt you do it, "genius"?
Click to expand...
Click to collapse
because we don't know how to do that yet.

I don't own this device, but a friend does. What happens if you download an exe or cab from the browser?

xboxfanj said:
I don't own this device, but a friend does. What happens if you download an exe or cab from the browser?
Click to expand...
Click to collapse
It tells you the file type is not supported. Basically, you can't download something to the Kin that it isn't designed to handle.

X-15D9W8491 said:
that post was an a and b conversation between me and john so c your way out, dumbass. and you should shut it because you havent really helped at all, john has gotten me nowhere because i started from the beginning before i was part of this, and i need absolutely no input from you.
Click to expand...
Click to collapse
~~~~~Forgotten~~~~~

I am not taking sides here but you guys both have points. X has a really good idea though so at least try. show proof it dosent work then i will agree with you. Its a good idea but we dont have the means of getting into the KIN.

there comes a time
Code:
the key to hacking this phone,[COLOR="Silver"][SIZE="1"] as ive noticed,[/SIZE][/COLOR] isnt getting a new os.
This is a solid point. We should not examine the possibilities of a new operating system until we are able to work with the current one.
Code:
[COLOR="Silver"][SIZE="1"] ive paid attention and i think i know what to do.[/SIZE][/COLOR] we need a new internet [B]browser.[/B] if you think about it, the browser is the problem because of its zero functionality.
Maybe so. Though the current OS has many shortcommings of, you could definitely argue that none are as confining as the browser
Code:
what we need to do is make an html parser in java
I am not sure what you mean by this. My initial impression is that coding an HTML parser from the ground up in Java is far out of the scope of this project. Perhaps you will explain it's purpose in a later part of your post.
Code:
that is invoked in javascript (dezgrz thx for finding out about the javascript apps).
I guess what you mean by this is to use the current browser's javascript interpreter to invoke the HTML parser. There are a few severe hurdles you'd have to overcome to do this.
First of all and from what I understand, the Kin's built-in browser is IE 6 for Mobile. Web developers and users alike agree that IE6, regrardless of it's environment is a very broken web browser. Despite this, it is still a full-featured web browser, at least by Microsoft's standards. So for the purpose of security, Microsoft has probably constructed the browser in such a way that code run in it will be heavily isolated from the rest of the OS. I know that exploits for IE6 are a dime a dozen but even most of those require more access to the device than we have. Our situation is compounded by the fact that, even as far as other mobile versions of IE6 go, the Kin's browser is badly crippled.
Second of all, assuming you could somehow invoke the Java code through JS, the Java code would still have to be interpreted and run using a Java interpreter which the phone lacks. Java is an interpreted language. What that means is that in the most basic sense, a Java application is comprised of a bunch of text files containing programmer code. When you 'run' a java application, what you are really doing is running a special program (called a Java INTERPRETER, what we've been talking about) that takes that programmer code and turns it into computer code that is capable of being executed. The interpreter is the part that the Kin lacks. Without it, the text files of programmer code that are the java application just look like ordinary text files to the Kin.
Code:
[COLOR="Silver"][SIZE="1"]i think we should focus on getting this done.[/SIZE][/COLOR]
...and unfortunately we've come to the end of the post. I have only talked about some of the preliminary issues with your project roadmap but IMHO they'd be pretty fatal to it's success.
Let me know if you'd like me to explain anything else to you. In the meanwhile, let's wait and see what more directed people like JK come up with.

Oh thank goodness, another post. Perhaps this one will explain some of the discontinuities that arose in the first post.
Code:
[COLOR="Silver"][SIZE="1"]is does make sense.[/SIZE][/COLOR] you can invoke a java app through js.
I am not aware of any way to do so, especially on as crippled a browser as the kin one. I've already kind of addressed this in the previous post albeit indirectly.
Code:
[COLOR="Silver"][SIZE="1"]quit criticizing me just because you dont know what youre talking about. and besides, what i meant to say (if this makes it easier to understand) is that[/SIZE][/COLOR]
I've decided to minify all the psychosocial turmoil content in his posts in order to make what I am referring to more clear.
Code:
we code a java app onto the phone that automatically connects to the browser
This portion confused me for a bit as in the first post you talked about a Java HTML parser howerver now it seems to have changed to something that simply interfaces the current browser. Maybe this would be more within the scope of the project but you'd still have to get through all the aforementioned hurdles. Even so I'm not really sure what purpose it would serve.
Code:
and a download is set off in javascript that
Oh ok, here you are explaining how the Java code gets to the browser. You use javascript injection to make the browser download the Java application.
Code:
bypasses anything written into the browser
Now, this would be a real trick. Accomplishing this would be equivalent to acquiring a U-Boat by fishing in the toilet.
Code:
by editing the permissions, etc by editing the browser
Another primary problem about your train of thought is that you seemingly assume that javascript is capable of doing debug-level computing tasks such as significantly modifying a compiled binary and perform priveleged filesystem operations. Stuff like this would be a pain in the neck to do even on a desktop computer with suited programming languages.
Code:
and just making a new one [COLOR="Silver"][SIZE="1"]and not being lazy. [/SIZE][/COLOR]
Javascript is a language designed for the web, not general purpose and certainly not for creating another web browser from scratch. JS, like Java is an interpreted language except the interpreter is included in the web browser. I am not sure coding a web browser within a web browser would produce very desireable results, esp. with such limited processing power as is available on Kin hardware.
Code:
[COLOR="Silver"][SIZE="1"]you of all people should know this makes sense because [/SIZE][/COLOR]you programmed and app onto the kin![COLOR="Silver"][SIZE="1"] besides, the whole thing about hacking is to be optimistic or you never get it done and youre impeding development with stupid posts like your last. get a grip and post something important instead of that trash next time![/SIZE][/COLOR]
hm. hm.
In conclusion, have a nice day.

In fact,iirc the Kin doesnt even have Javascript but JScript. Microsoft implementation, compatible with javascript itself.
http://en.wikipedia.org/wiki/JScript
The funny commands which could expose part of the system doesnt work, of course.

That's just weird
johnkussack said:
In fact,iirc the Kin doesnt even have Javascript but JScript. Microsoft implementation, compatible with javascript itself.
http://en.wikipedia.org/wiki/JScript
The funny commands which could expose part of the system doesnt work, of course.
Click to expand...
Click to collapse
ok. first, let's forget our arguments and move on, those have nothing to do with what we are trying to accomplish. Second, how related is jscript to javascript because microsoft always has to make weird implementations of porgramming languages. This could possibly be a minor setback. Third, i'll admit that some things I posted didn't make sense, so i'll make them more understandable in the future.

Related

[Q] Will WP7 Support Skyfire

Before you start bashing me for starting this thread. Note Ive Search And Haven't Seen This Come Up Yet.
Now As Much As I love Skyfire, Im not seeing a whole lot of support for it from WP7. Someone Please bring me up to par with whats going on?
Heres the Only Info Ive found on this and its not much http ://support.skyfire.com/forums/index.php?showtopic=5513
Skyfire could actually function reasonbly well on WP7 (due to the rendering being done by Skyfire's servers) and would be allowed by Microsoft. It's just up to Skyfire on whether they want to make it or not.
Ok thanks. I guess ill have to wait and see.
I read something awhile ago where SkyFire said they couldn't make a SkyFire version for WP7 due to lack of Native Code. I'm sure they could write their own code instead of just borrowing Microsofts, but that is where they stand now.
TriAxisFL said:
I read something awhile ago where SkyFire said they couldn't make a SkyFire version for WP7 due to lack of Native Code. I'm sure they could write their own code instead of just borrowing Microsofts, but that is where they stand now.
Click to expand...
Click to collapse
I know Opera said that but I hadn't seen Skyfire.
I don't really see why they couldn't. They don't do any rendering on the device. They have servers that pull the web page on your behalf and transcode it into a format that's pre-rendered and easier on the device. I would think this would be pretty easy in XNA or maybe even silverlight. Now a browser that actually decodes and renders the page all on it's own, yea that will be much slower without native code. It's a good thing the built in browser doesn't suck.
They could probably get a working version of skyfire on a device but it wouldn't have multitasking ability like IE does so why would anyone want to use it? I think they will eventually have multiple browsers but I think it'll be after multitasking is fully unleashed.
RustyGrom said:
I know Opera said that but I hadn't seen Skyfire.
I don't really see why they couldn't. They don't do any rendering on the device. They have servers that pull the web page on your behalf and transcode it into a format that's pre-rendered and easier on the device. I would think this would be pretty easy in XNA or maybe even silverlight. Now a browser that actually decodes and renders the page all on it's own, yea that will be much slower without native code. It's a good thing the built in browser doesn't suck.
Click to expand...
Click to collapse
Lol haven't seen it.
Are you sure?
Lack of Opera Mini is another let down.
Do you know the source?
doministry said:
Lol haven't seen it.
Are you sure?
Lack of Opera Mini is another let down.
Do you know the source?
Click to expand...
Click to collapse
Sure of what?
Source of what? I didn't say anything that requires attribution...
i thought they were allowing for any third party browsers on wp7
deadwrong03 said:
i thought they were allowing for any third party browsers on wp7
Click to expand...
Click to collapse
Yes, they are. However, third parties are limited to using managed code (Silverlight and XNA) which would make writing a browser implausible if not impossible. However, with browsers that perform the actual page rendering on a remote server and basically send a capture of the page back to the phone to display, they should be able to make one just fine. Creating an HTML and JavaScript engine in C#, particularly with the limitations that WP7 has on top of that, would be out of the question.
RustyGrom said:
Sure of what?
Source of what? I didn't say anything that requires attribution...
Click to expand...
Click to collapse
Oh man, I was asking for the source of the Opera saying thy won't be able to make OperaMini for WP7!!

[Q] REAL hacking.

Hello there to all the souls of the xda forums.
im new to wp7. never used one before like 3 days ago. i like it, great device my surround is. but im not here to tell you about how good it is. we all know its good.
im here to ask if theres any real hacking going on with this thing yet. im looking for at least some kind of command line.
from there i could use tools such as aircrack, nmap, metasploit, SET, etc.
ive had an iphone for about 3 years, booting iOS and Android. i am used to hacking from that, but at the same time i know there a bigger user base for those devices, so theres more devs for it. i just wanted to know if anyone has already started on such a project before i dedicate alot of my time to developing this for you all.
BTW i am not interested in pirating apps, cracking apps
With enough effort, command-line interface *might* be possible - the OS technically supports such things - but the underlying core is Windows CE. Even less so than NT, CE really isn't meant for a CLI; apps are written with the intent of being run on a graphical interface. Also, having no POSIX compatibility and only partial Win32 compatibility, a lot of apps that you're used to from the desktop (or from POSIX-based phone OSs like iOS and Android) aren't going to be available.
That said, if you want to get started in the WP7 hacking space, there's certainly plenty to do. One project that I have on the back burner until I get some more urgent stuff out of the way is a SSH client. There are a number of things that are required here. First of all, we have homebrew Socket support, but the official SDK lacks it so you'd need to use a native Homebrew DLL. Second, there's no official command line interface, so you'd need to write one. The second point is all sorts of fun, since what you're really writing is a terminal emulator.
Other interesting projects include getting a unified cross-platform approach to writing to the filesystem, or even reading from all of it (instead of the relatively small portions currently accessible) or figuring out how to make third-party apps run in the background.
thanks man. I think I'll work on getting a full file browser for the phone. That should happen , i think, before anything else. As far as a terminal emu, it sounds like its going to be more of a chalange for me. Again, I'm used to more Linux and UNIX systems than I am windows. I had to reinstall windows 7 onto a partition just so I could sync the phone with the Zune software Microsoft insisted I use.
So is anyone currently working on the file browser? Has there been any progress with it? If so, who should I contact so I can help?
sea_bass said:
thanks man. I think I'll work on getting a full file browser for the phone. That should happen , i think, before anything else. As far as a terminal emu, it sounds like its going to be more of a chalange for me. Again, I'm used to more Linux and UNIX systems than I am windows. I had to reinstall windows 7 onto a partition just so I could sync the phone with the Zune software Microsoft insisted I use.
So is anyone currently working on the file browser? Has there been any progress with it? If so, who should I contact so I can help?
Click to expand...
Click to collapse
TouchXplorer. Do a bit of searching. A lot of homebrew has already been in the works.
thesecondsfade said:
TouchXplorer. Do a bit of searching. A lot of homebrew has already been in the works.
Click to expand...
Click to collapse
Thanks. Just found that page

my ideas

well here are some of my ideas on how we could possibly hack this phone:
1.Dig in-
we try to get into the phone's files as deeply as possible and see what we find. if it's something worth investigating, we change this around and see what happens.
2.Silverlight-
We somehow code a javascript app that is actually a microsoft silverlight plugin for the browser. then, i can finish the gui i was making in silverlight and test it on the phone, since the original gui was also made in silverlight.
3.file system explorer
i might be able to use the ftp client to download a file system explorer, or, by some miracle, we code a working file system explorer in javascript.
4. java vm-
once i do some super heavy research on the java vm, its requirements, its functions, and how they are programmed into mobile devices, we could figure out a way to get one on the kin and just make java apps for it.
5. Flash
i, for one, may be able to deal with just having flash, but due to the downloading problems of the phone, this one seems headed downhill.
if anybody else has any theories or ideas for hacking this phone, just post it and ill test it out and tweak it for hopefully good results.
P.S.- i typed this all on the kin. i don't recommend lengthy messages like this with the kin because it makes your fingers sore.
Do it.
Good Idea!
DO IT!
This forum is saturated with off-the-brian ideas. We need someone to figure something else out. We have hit a wall pretty much since the release of KINO. The only advancement we have made on this phone is that I can now backup and restore contacts.
When I say "We" I mean JohnKussack all respect to the man ofcourse.
think positive
well john's not the only one who can do things. if everyone thought like that post then we wouldn,t even be able to do that. the more people that try to do what john does, the more things will get done and the more out-of-the-box ideas will appear.

[Q] WP7 and native for beginner

Hello everybody,
I got a WP7 Samsung Focus and I want to port my old application to this device and join native forces for WP7
My plan is simple: I'll convert my app into a dll, rewrite new gui in C# (or whatever the way to do it on WP7). I saw multiple posts about calling native code (original from Cris Walsh: http://goo.gl/2Tjks). Then I saw a few posts mentioning that it's impossible etc etc.
So, a few questions:
0) can I do it for my app (I don't need marketplace exams etc, I don't care for that)? I know that some WinAPI could be unavailable/broken, all I ask at this point if it's possible to load and run native dll without changing or re-flashing ROM.
1) ms wants 100$ out of my pocket to be able to deploy to my own device (WTF?!). What can I do to deploy to my phone without paying the crooks? (VS2010 tell me to register there and registration askes for 100$).
2) Is there a sample project I could D/L and run, I have zero experience in C# and I have no idea how to load and call native DLL from managed code in WP7? All these half broken samples are totally useless to me, I simply wanted to working HelloWorld app that loads and runs simple dll.
thanks
0) Yes, what you describe is possible. There are lots of limits, though - WP7 applications have very low permissions, and calling native code doesn't fix that. Unless you need to edit something outside the app's own iolated storage, though, you're probably OK.
1) Aside from the official marketplace account ($100), there are a few options:
a) if you've got an LG phone, they come with a built-in registry editor that can be used to dev-unlock your phone. I forget the exact key you need, though.
b) if you've got a student email address (ends in .edu) you can try registering through DreamSpark. This is free.
c) if you don't mind rolling back to pre-NoDo (7004 or 7008) you can use ChevronWP7 Unlock (instructions available on this forum). If you don't have a restore point that far back you can flash an official ROM for that version.
d) if you don't mind waiting, ChevronWP7 Labs will be available at some point (no ETA that I've seen, but it's been talked about for months) and will provide dev-unlock (but not marketplace account) for a nominal fee.
2) There are lots of apps distributed with source, and most of them will use some native code. You could do a search on this forum for subject lines including the tag "[SOURCE]" and find several (I release source for all my apps). However, I suspect what you'd find most useful is Heathcliff74's guide to WP7 apps that use native code, which is on this forum at http://forum.xda-developers.com/showthread.php?t=1299134. It includes step-by-step instructions.
Hope that helps! I look forward to seeing your app. Also, don't hesitate to ask for help with the actual development; I suck at GUIs and Silverlight but am fairly proficient at C# if you need somebody who knows that language, for example.
There is an ETA for the new ChevronWP7 unlocker:only a few weeks away from launch!
Hi GoodDayToDie
GoodDayToDie said:
0) Yes, what you describe is possible. There are lots of limits, though - WP7 applications have very low permissions, and calling native code doesn't fix that. Unless you need to edit something outside the app's own iolated storage, though, you're probably OK.
Click to expand...
Click to collapse
At this point I want to make a DLL from my simple app and call a few functions that interact with filesystem and network. FS is needed only for simple stuff (loading config file etc) from installation folder and creating some temporary files for local storage. Network is tcp/udp, I guess network should be available.
GoodDayToDie said:
1) Aside from the official marketplace account ($100), there are a few options:
...
Click to expand...
Click to collapse
I did some search, it seem that I've done that part. Chevron dev unlock was pulled out from their site, but the old version remains scattered all over the board. There is a good thread a good thread on how to do it. It happens that my phone is 7004. Where can I get old ROM in case if something goes bad and I need to re-flash? Is it easy, am I risking to brick and loose my phone?
I just tried to run sample phone app and it runs on the phone. Initially it said that it was revoked by MS, I run dev-unlock one more time and now it works.
GoodDayToDie said:
2) There are lots of apps distributed with source, and most of them will use some native code. You could do a search on this forum for subject lines including the tag "[SOURCE]" and find several (I release source for all my apps). However, I suspect what you'd find most useful is Heathcliff74's guide to WP7 apps that use native code, which is on this forum at http://forum.xda-developers.com/showthread.php?t=1299134. It includes step-by-step instructions.
Click to expand...
Click to collapse
I'll try to search, hope I'll be up and running soon. Too bad WP7 is DOA. They always had much better tools than all these ghetto Symbian/Android/Xcode crapware tools... WTF is wrong with these guys, at the point when they were surpassed at speed of light by newbies iPhone and Android they made some backward steps to cut off most of the devs (but they added all these 500K Silverlight newbie devs...). I'm so disappointed with Android, seems like they hired all these retards who were fired at symbian: same **** tools
I downloaded a few samples and it seems that all of them contain prebuild dll's and all of them are COM dlls or something like that.
What I'd like to find is simple sample that contains src code to native WinMo dll and C# project that it uses.
As far as I know native dll cannot be build with latest tools (am I right?), but I can use cegcc or VS2008 to build native DLL's.
stuff like:
Code:
if (ComBridge.RegisterComDll("ComFileRw.dll", new Guid("EEA7F43B-A32D-4767-9AE7-9E53DA197455")) != 0)
is totally unknown to me. I would really like to avoid to even elarning anything about COM related stuff. I prefer not to mess up with code that isn't portable.
HI mtlgui,
unless Heathcliff finishes his WP7 Root Tools SDK, you don't have any other way to access native c++ code besides using COM. DFT (The DarkForcesTeam) released a firmware loader, that allows you to flash customized unsigned firmware. They were also able to do some native c++ coding with the WM API. However the used firmware for that is not public and it is limited to HTC devices.
Did you already consider to write your application in c#? Mango has now TCP/UDP socket support for outgoing connections. Incoming connections or services running on the phone aren't possible without using native code, at least for the moment.
Hi rudelm,
if the only way to use native is to build COM dll, then I'm OK with that. My app code is old and I'd rather throw my WP7 device to trash can than trying to rewrite my app in C#.
Eventually, down the road while hacking maybe I'll learn c# well enough to do anything with it other than GUI and calling native/COM dlls.
So, just to confirm my understanding. I need to write COM dlls that access native API (socket, filesystem, wavein/waveout etc) and then load these COM dlls and call their functions from C# (or whatever is the closest lang to c/c++ in the WP7 world).
@mtlgui:
You've pretty much got it. A few thoughts, though:
There is a webserver project available on this site. It includes source for its C++ native component (the library is called NativeIO; I can probably send you the source if you can't find it). It exposes registry, filesystem, and TCP server and client sockets to COM. Note that because this library was built for pre-Mango phones, just compiling it and shipping it may not work on Mango phones as many deprecated libraries were removed in Mango and if the DLL contains any references to them, it won't load.
Generally speaking, what you're asking for with TCP/UDP is possible, though you may have to code against the winsock API directly. It sounds like you're doing as little as possible with C#, so even if the Socket API that is available with Mango were sufficient for your app's needs, you wouldn't be using it.
Filesystem access... even if you have read access to your app's install folder (I haven't checked, though you should), you almost certainly won't have write access. Each app does have a writable "isolated storage" though, under \Applications\Data\{GUID}\Data\IsolatedStore\. I've only ever tried writing to it using C# though, so I don't know for sure if it's writable using the native APIs directly (should be, though).
It's probably perfectly OK to write your app as one big native DLL (hell, it *might* work to just change the build type from Application to Library, then rename main() or something like that). You will need to expose the library to COM, but that's easy. You can then write a very simple C#/Silverlight app (see Heathcliff's instructions, or just post the COM interface and soembody could write it for you). All the C# app needs to do is use ComBridge to access the native DLL, and call a "run()" function or something similarly simple.
For what it's worth, C# is very close to a superset of C++, at least on the desktop. The phone version is crippled a little by not allowing the use of pointers - everything has to be done with strongly-typed references instead, which can make network code a little annoying but is otherwise rarely a problem - but with a little experimentation you may find your disdain for C# to be misguided. It's a useful language to know it today's job market, if nothing else.
Why is your phone still on 7004? That's the launch retail build, something like eight months out of date. On the plus side, this means that things like ChevronWP7 Unlocker still work for you, as you found. On the minu side, it means you're putting up with bugs and missing features that you needn't be. Have you tried updating at all? If/when you do update, make sure to back up the restore points that the Zune software generates (they got in %localappdata%\Microsoft\Windows Phone Update\). That way, if you ever need to roll back to 7004, you can do it. Normally, only the most recent restore point is kept.
Flashing ROMs is safe so long as you don't try something like flashing the wrong one for your device. Unless your bootloader is unlocked (only possible on HTC), you can only flash official ROMs anyhow, which saves you from most of the risks. On the other hand, you're already on as old a ROM as you will find, and so long as you keep your restore points, you can return to it any time you want to, easily.
I'm googling now the board to find NativeIO and that webserver app. So far only references to it, but no src code.
I'm ok with isolated read/write access. All I care is persistent fs storage.
My phone is still 7004 because I just bought it so I can do some WP7 development. I don't want to mess up with updates at the moment.
As I understand from another post ComBridge is C#->COM->native c++ dll or any other dll that can be used, right? I'm just learning some COM to learn enough to start actually programming for the phone. I see that I can pass whatever data I want, but I don't seem to be able to see a way to register callbacks so that native/COM could call back to C#
mtlgui said:
I'm googling now the board to find NativeIO and that webserver app. So far only references to it, but no src code.
I'm ok with isolated read/write access. All I care is persistent fs storage.
My phone is still 7004 because I just bought it so I can do some WP7 development. I don't want to mess up with updates at the moment.
As I understand from another post ComBridge is C#->COM->native c++ dll or any other dll that can be used, right? I'm just learning some COM to learn enough to start actually programming for the phone. I see that I can pass whatever data I want, but I don't seem to be able to see a way to register callbacks so that native/COM could call back to C#
Click to expand...
Click to collapse
Basic introduction to native code and COM, including references to more background info: http://forum.xda-developers.com/showthread.php?t=1299134.
Callback from C++ -> COM -> C# can be done. Decompile the WP7 Acrobat Reader app. You'll see how it works.
Ciao,
Heathcliff74

[Lib][Java/JAR] RegIOLib - Java/Registry In/Out Communications Lib

Hey there,
I thought it was time to release something new
A bit of background storyline:
My last projects were all VB/.Net programs, and they were somewhat great, sure. But I was missing the Linux portability and the programs aren't available on all Windows version - Which bugged me a lot. So I finally started coding in Java again! I'm also porting Universal Android Toolkit to Java, so I can easily create a Linux version of that as well.
(If you want to make that happen faster, please donate to me. I managed to fix my laptop, but I've only got a 60GB HDD and I need that much space alone for Windows and I have no income, I'm only 16 )
Anyways, now that you know where I'm coming from, as I'm porting Universal Android Toolkit to Java, I need access to the registry to save the application's settings and easily access them. But unlike .Net languages, Java doesn't have built-in support for this kind of operation, so I looked around and grabbed bits and pieces of code and stuck them together into a Java Class Library.
Thus, RegIOLib was born.
It's licensed under the GPL 3.0 (License info included in the source).
Downloads
Sourceforge
Source Code
http://github.com/Beatsleigher/RegIOLib
EDIT:
I forgot to mention the following: To get access to the Windows registry, the application needs to be started with administrative rights!
You can either achieve this by starting the app via a launcher (Which is what I tempt to do) or by right-clicking the file and allowing it to run as admin.
Beatsleigher said:
It's licensed under the GPL 3.0 (License info included in the source).
Click to expand...
Click to collapse
So closed source applications may not use it?
nikwen said:
So closed source applications may not use it?
Click to expand...
Click to collapse
Of course they can use it
Just add a link to this thread and my website, done.
But if you're coming from some major company or something, then I would like something more
Beatsleigher said:
Of course they can use it
Just add a link to this thread and my website, done.
But if you're coming from some major company or something, then I would like something more
Click to expand...
Click to collapse
According to the GPL they can't because it requires the source code of derivative work to be published. That's the "problem" with that license if you use it for libraries.
Due to that the LGPL exists.
http://www.tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)
Limited commercial use. Must include source code. So no, GPL libraries and closed source applications do not mix.
An inelegant solution (which is the one I have always used actually) is to save settings in a file in %APPDATA%, no admin rights are required to edit files in there, or roll your own registry library for the application. Or Beatsleigher could LGPL it, but its his project, his license, I think he has full right to stick it under GPL if he wants to.
Although I dont think saving into a registry key is really cross platform Neither is %APPDATA% but using the %APPDATA% method is simple file read/write so on a cross platform application you can simply change the filepath dependent on the current execution environment.
System.getenv("APPDATA") will return the filepath for the current users APPDATA folder on windows. System.getProperty("user.home") works on linux and I think OSX to get the home directory. I dont think user.home works properly on windows. But it should be easy to switch between the 2 methods, add on an extra bit for where your settings file is and detect which to use at runtime.
Disadvantage (and to some advantage, depends on what the application is doing and whether the author likes it or not) is that saving configuration files as actual files means the user can play around with them. APPDATA is by default a hidden folder. But chances are most users dont even know what the registry is so in a way your settings might be more secure left in there.
Even possible to have an application load settings from the registry on windows and files on everything else.
SixSixSevenSeven said:
Or Beatsleigher could LGPL it, but its his project, his license, I think he has full right to stick it under GPL if he wants to.
Click to expand...
Click to collapse
Of course, he has that right. It's his code. The GNU even collected some reasons for sticking with the GPL.
Just wanted to point out that the GPL says that all derivative work (which includes programs that use libraries licenced under the GPL) must be GPL'ed (and therefore open source'd), too.
SixSixSevenSeven said:
http://www.tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)
Limited commercial use. Must include source code. So no, GPL libraries and closed source applications do not mix.
An inelegant solution (which is the one I have always used actually) is to save settings in a file in %APPDATA%, no admin rights are required to edit files in there, or roll your own registry library for the application. Or Beatsleigher could LGPL it, but its his project, his license, I think he has full right to stick it under GPL if he wants to.
Although I dont think saving into a registry key is really cross platform Neither is %APPDATA% but using the %APPDATA% method is simple file read/write so on a cross platform application you can simply change the filepath dependent on the current execution environment.
System.getenv("APPDATA") will return the filepath for the current users APPDATA folder on windows. System.getProperty("user.home") works on linux and I think OSX to get the home directory. I dont think user.home works properly on windows. But it should be easy to switch between the 2 methods, add on an extra bit for where your settings file is and detect which to use at runtime.
Disadvantage (and to some advantage, depends on what the application is doing and whether the author likes it or not) is that saving configuration files as actual files means the user can play around with them. APPDATA is by default a hidden folder. But chances are most users dont even know what the registry is so in a way your settings might be more secure left in there.
Even possible to have an application load settings from the registry on windows and files on everything else.
Click to expand...
Click to collapse
No, as far as I'm aware, only Windows has a registry. I could be wrong though. In the past 5-6 years that I've been developing, I was only developing in VB.Net - A decision that I highly regret nowadays
But I'm so used to being able to save my settings in the registry where no 'normal' user can modify them and cause the program to misbehave, that I'd like my java programs to do so as well.
And seeming as Universal Android Toolkit is a big, big project (I've been developing it for over a year now and I'm constantly adding new features and now I'm porting it to Java making it really hard to release, but I'll get there eventually.
As soon as I've got the major stuff sorted out, I think I'm ready to release a Pre-Release candidate for testing and bug-fixing, but like I said, I'm still having some trouble and then I need to figure out a way to get those settings saved on Mac OS and Linux machines, for which I've already written some classes, but only to install ADB and stuff... And I'm getting side-tracked again, aren't I?
Anywhosers, I think I'm going to leave it under the GPL, even though you're right and that that means that closed-source programs can't use it, but I'll think of something. Even if it's a commercial license, say someone pays 2$ per program. I don't know.
But for the thing you said with %AppData%, what you can do on Linux machines, is (in Java)
Code:
private final String userProf = System.getenv("user.home");
final File tempDir = new File(userProf + "/Temp/(.)<Program>/temp.file");
private void setupTempDir() {
Path tmp = tempDir.getParentFile().getPath();
if (!tmp.exists()) {
tempDir.createNewFile();
}
}
That should solve that problem, then you COULD create some sort of settings file, but then it's just a pain to get and save the settings when you're using multiple GUIs, like me.
And then there's another way of doing that in Android apps, which I haven't figured out yet, mainly because I haven't even started with Android apps and I don't have the hard drive space to do so :/
Beatsleigher said:
Anywhosers, I think I'm going to leave it under the GPL, even though you're right and that that means that closed-source programs can't use it, but I'll think of something. Even if it's a commercial license, say someone pays 2$ per program. I don't know.
Click to expand...
Click to collapse
OK, no problem. The GPL, however, says that you may not relicense it. :/
(All of my comments I've posted yet sound as if the GPL is a bad license. To clarify that: I don't think so. I prefer it for applications, but use the LGPL or Apache v2 license for libraries.)
Beatsleigher said:
(If you want to make that happen faster, please donate to me. I managed to fix my laptop, but I've only got a 60GB HDD and I need that much space alone for Windows and I have no income, I'm only 16 )
Click to expand...
Click to collapse
I'm 17 and I have a 64GB SSD. C#, C++ works great.
Anyway 700 lines of license make no sense. The same about the portable registry library for linux. Could you tell the purpose of it?
Useless guy said:
I'm 17 and I have a 64GB SSD. C#, C++ works great.
Anyway 700 lines of license make no sense. The same about the portable registry library for linux. Could you tell the purpose of it?
Click to expand...
Click to collapse
GPL isn't 700 lines last time I checked, also I left a link to a simple description of it above (I do love tldrlegal).
There is no registry for linux, no one mentioned a portable registry for linux.
SixSixSevenSeven said:
GPL isn't 700 lines last time I checked, also I left a link to a simple description of it above (I do love tldrlegal).
There is no registry for linux, no one mentioned a portable registry for linux.
Click to expand...
Click to collapse
I did
Anyways, now that you know where I'm coming from, as I'm porting Universal Android Toolkit to Java, I need access to the registry to save the application's settings and easily access them.
Click to expand...
Click to collapse
nikwen said:
OK, no problem. The GPL, however, says that you may not relicense it. :/
(All of my comments I've posted yet sound as if the GPL is a bad license. To clarify that: I don't think so. I prefer it for applications, but use the LGPL or Apache v2 license for libraries.)
Click to expand...
Click to collapse
I'm working on a license for it and any other such things. So I'll release it again for commercial and closed-source programs when it's done.
And yes, it does sound like you think it's a bad license. But meh. Everyone has their own opinion, I guess.
Useless guy said:
I'm 17 and I have a 64GB SSD. C#, C++ works great.
Anyway 700 lines of license make no sense. The same about the portable registry library for linux. Could you tell the purpose of it?
Click to expand...
Click to collapse
GPL isn' 700 lines.
That's cool for you, that you've got that stuff. I don't. Anyways, I'm getting away from .Net languages, and C# is easy for anyone to learn. Especially if they're coming from VB, like me.
C++ isn#'t my kinda thing, as you can't natively create GUIs in it. You always need some kind of library for that sort of stuff.
And I didn't intend this for use with Linux. Everyone that has basic knowledge of these operating systems knows that Linux, BSD, Mac OS etc. don't have registries. And I never even noted that I'm attempting to use registry stuff in Linux. I said I'm porting Universal Android Toolkit to JAVA, and that I need access to the WINDOWS registry to save the application's settings in the reg, so that users can actively change the settings if the program starts misbehaving.
Useless guy said:
I did
Click to expand...
Click to collapse
I said JAVA, not Linux. What I probably did say, however, is that I'm porting my program to Java so that it can easily be ported to said OSs. But never that I'm attempting to save my settings in the registry in all OSs.
Beatsleigher said:
C++ isn#'t my kinda thing, as you can't natively create GUIs in it. You always need some kind of library for that sort of stuff.
Click to expand...
Click to collapse
Lolwhat?
Beatsleigher said:
C++ isn#'t my kinda thing, as you can't natively create GUIs in it. You always need some kind of library for that sort of stuff..
Click to expand...
Click to collapse
Errm, those libraries are written in C or C++... native code such as C and C++ are the only languages which can create GUI's. VB.net/C#/anything else .NET use libraries too which in the case of WinForms and WPF are just wrappers around win32 functionality implemented in C.
Beatsleigher said:
And yes, it does sound like you think it's a bad license. But meh. Everyone has their own opinion, I guess.
Click to expand...
Click to collapse
I love the GPL. I use it for everything (except libraries).
But I'll stop the off-topic now.

Categories

Resources