Page 1 of 2

NDK?

Posted: Fri Oct 28, 2011 10:41 am
by xsirxx
Forgive me if this has been asked before but with the release of the official honeycomb update I wanted to know what languages are supported on the revue. I was wondering if the NDK was supported on the revue? Or any C language for that matter. I have been working with a program under MonoDroid that I have not tested on the revue but do to its costs I figured I would look into porting over to the NDK and C++...

--X

Re: NDK?

Posted: Tue Nov 01, 2011 5:16 pm
by hharte
The NDK is not supported on Google TV 2.0. If an app uses the NDK, it will be filtered out in Android Market on Google TV devices. That said, it is possible to compile native code for Google TV; however, shared libraries including libc.so are not available on the device, so you have to statically link. To make things worse, the ABI reported by the device is "none" while it should be something more reasonable like x86.

-Howard

Re: NDK?

Posted: Wed Nov 02, 2011 4:55 am
by xsirxx
So what does that means exactly? Is there a chance you could get it to show up in market or does the program have to be sideloaded? Also is there a way to program with the sdk in. C++ or C#? Does monodroid translate to ndk or sdk?

Thanks a ton for helping me out with this!

--X

Re: NDK?

Posted: Wed Nov 02, 2011 11:02 pm
by hharte
If you use the NDK, your app can be made to work if you statically link your shared library with libc and any other libraries you need. The ABI is "none" so you have to put your shared library in libs/none in your Android project.

You can then side-load the app. But, it will not show up in Market.

I don't know anything about monodroid, sorry.

Re: NDK?

Posted: Thu Nov 03, 2011 5:12 pm
by hharte
Slight update, my Sony box updated to Google TV 2.0 this morning, and I was able to verify that my app Better Terminal Emulator Pro does appear in Market even though it uses native code. I didn't think that would be the case.

Re: NDK?

Posted: Fri Nov 04, 2011 9:48 am
by xsirxx
you serious? So what all did you have to do? What language did you use, C or C++? And does it run? Because thats phenominal news..

Brad

Re: NDK?

Posted: Sat Nov 05, 2011 8:32 am
by mcd2000
hharte wrote:Slight update, my Sony box updated to Google TV 2.0 this morning, and I was able to verify that my app Better Terminal Emulator Pro does appear in Market even though it uses native code. I didn't think that would be the case.
Could you, please, provide a sample script for building a "helloworld" library? I've noticed that not all required .a libs are avaliable in the NDK to build a static library. Thanks.
Did you use ndk-build to do this?

Re: NDK?

Posted: Mon Nov 07, 2011 8:15 pm
by hharte
I used the NDK described here:
http://gtvhacker.com/index.php/Logitech_Revue_Technical

I didn't have any luck with the official NDKr6.x86 (couldnt get it to statically link.). But I did not try with r6b yet.

And of course it works, that is how Better Terminal Emulator Pro is working on Google TV.

Re: NDK?

Posted: Tue Nov 08, 2011 1:20 pm
by mcd2000
hharte wrote:I used the NDK described here:
http://gtvhacker.com/index.php/Logitech_Revue_Technical
Wow! It works! Some kind of... I actually could not deal with all the makefiles and just fixed the last linker command (changed all .so references to .a). Don't think this is the right way. Anyways, It works. Thanks very much.

Re: NDK?

Posted: Mon Nov 21, 2011 8:58 am
by M1cha
I cannot install the NDK. I get the following error:
Step 2: Extract the SDK

bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: Inappropriate ioctl for device
Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child returned status 2
tar: Error is not recoverable: exiting now
Does anyone have a solution to this?
I already re-executed the script (and the download) but it doesn't helps :(