yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] copex:
What is the Android NDK?

The Android NDK is a toolset that lets you embed components that make use of native code in your Android applications.

Android applications run in the Dalvik virtual machine. The NDK allows you to implement parts of your applications using native-code languages such as C and C++. This can provide benefits to certain classes of applications, in the form of reuse of existing code and in some cases increased speed.

The NDK provides:

* A set of tools and build files used to generate native code libraries from C and C++ sources

* A way to embed the corresponding native libraries into an application package file (.apk) that can be deployed on Android devices

* A set of native system headers and libraries that will be supported in all future versions of the Android platform, starting from Android 1.5

* Documentation, samples, and tutorials

The latest release of the NDK supports these ARM instruction sets:

* ARMv5TE (including Thumb-1 instructions)

* ARMv7-A (including Thumb-2 and VFPv3-D16 instructions, with optional support for NEON/VFPv3-D32 instructions)

Future releases of the NDK will also support:

* x86 instructions (see CPU-ARCH-ABIS.TXT for more information)

ARMv5TE machine code will run on all ARM-based Android devices. ARMv7-A will run only on devices such as the Verizon Droid or Google Nexus One that have a compatible CPU. The main difference between the two instruction sets is that ARMv7-A supports hardware FPU, Thumb-2, and NEON instructions. You can target either or both of the instruction sets — ARMv5TE is the default, but switching to ARMv7-A is as easy as adding a single line to the application's Application.mk file, without needing to change anything else in the file. You can also build for both architectures at the same time and have everything stored in the final .apk. For complete information is provided in the CPU-ARCH-ABIS.TXT in the NDK package.

The NDK provides stable headers for libc (the C library), libm (the Math library), OpenGL ES (3D graphics library), the JNI interface, and other libraries, as listed in the section below.

The NDK will not benefit most applications. As a developer, you will need to balance its benefits against its drawbacks; notably, using native code does not result in an automatic performance increase, but does always increase application complexity. Typical good candidates for the NDK are self-contained, CPU-intensive operations that don't allocate much memory, such as signal processing, physics simulation, and so on. Simply re-coding a method to run in C usually does not result in a large performance increase. The NDK can, however, can be an effective way to reuse a large corpus of existing C/C++ code.

Please note that the NDK does not enable you to develop native-only applications. Android's primary runtime remains the Dalvik virtual machine.
[Android Q&A, Help & Troubleshooting] jug6ernaut:
The ndk allows u to use c++ c/c++ code in Android. That code must be called from java tho.

Sent from my Nexus One
[Android Q&A, Help & Troubleshooting] abrigham:
I don't think you guys are understanding his question... He's not looking to write apps for Android... he's writing stuff in C++ (presumably for desktop or maybe other embedded applications, I dunno) and just wants to be able to compile that code on his Android device...

Now as far as an answer to that question, they did kinda cover it... Since pretty much everything in Android runs in Java, I believe it would be pretty difficult to write a C++ compiler that could run on Android.
[Android Q&A, Help & Troubleshooting] ernestus:
To install an compiler in your Android device, google around for how to install Debian in it. Don't be afraid, you install it in parallel of Android, you will need a command or terminal window as well (available in the marketplace).

Debian comes with everything you need to compile in your device.

I hope I was useful.

Cheers
[Android Q&A, Help & Troubleshooting] JDV28:
Thank you abrigham for clearing that up for me. You are exactly correct.

Ernestus, that seems like it would cause more problems then it would be worth
[Android Q&A, Help & Troubleshooting] O Sophos:
hmm.. i was googling for this as well.. thought it'll be useful to have this around.
[Android Q&A, Help & Troubleshooting] JimmyChingala:
Next best option then is to cross-compile to Android/ARM from another platform. The arm-eabi toolchain provided by Google's NDK is one option as others have already mentioned.

Codesourcery ARM toolchain is another, for Linux i686 theres link to the downloadable archive see this post (search for 'wget THISLINK' text on that page).

- jc
[Android Q&A, Help & Troubleshooting] shawnbuck:
If your looking to corss compile for android, check this link out.

http://teslacoilsw.com/dropbear
[Android Q&A, Help & Troubleshooting] sharing:
Installing debian isn't too bad, and would give you the most flexibility for compiling on the phone.

You could also ssh into another computer using connectbot or some other terminal and code/compile remotely.

Another way to do remote compiles is continuous integration. Edit/upload the file to your repository, and using a server such as Jenkins, run the compile and view the results through the browser or an app such as Hudson2Go. Jenkins will also auto-compile on edits and can send you a text if the build fails. Jenkins is very easy to setup.
[Android Q&A, Help & Troubleshooting] dragos2ro:
Try finding an online c++ compiler or you could connect to a windows or linux machine/server to upload andcompile your c++ files.
[Android Q&A, Help & Troubleshooting] acsakvith:
Use "c4droid" this is a paid app.. anywy if you like search on the market.
[Android Q&A, Help & Troubleshooting] lintz:
Another alternitiv is out there now. Not sure how good it works.

C / C++ Compiler
[Android Q&A, Help & Troubleshooting] nedosas:
im looking for compiler too i found i market a4droid compiler but it costs... and i couldnt find enywhere free apk
[Android Q&A, Help & Troubleshooting] Michael Spencer:
Easiest thing to do would be a chroot Linux environment from an existing distribution, like Ubuntu. Then compilers for nearly any language you can think of are an "apt-get install" away.

If you're running CyanogenMod 7, you have a large SD card, and you don't mind repartitioning the SD card and shaving off 2 GB or 4 GB for Linux, then I'll be posting a howto in the next day or two. I have Ubuntu 11.10 Oneiric Ocelot running out of /sd-ext cleanly, using only files from official sources (<32 MB file from cdimage.ubuntu.com and everything else via apt/dpkg with signature verification) rather than from rapidshare-like sites.

Or about a year ago there were instructions posted for unzipping a ~2 GB image containing an older version of Ubuntu downloaded from a filesharing site. You could do that if you have an immediate need.
[Android Q&A, Help & Troubleshooting] dateno1:
you can download from my blog

http://dateno1.egloos.com/855501

it from https://market.android.com/details?id=com.n0n3m4.gcc4droid&feature=more_from_developer

it has some library problem but work well (i already compile few binary for my phone :D)
[Android Q&A, Help & Troubleshooting] J_Caselles:
I think c4droid maches perfectly what you were looking for. I'm using it to work on my projects "on the road" and so far it works pretty well.

A little tricky to set up, since you need "gcc plugin for c4droid" but to choose g++ compiler, and builds are saved at "data/data/com.n0n2m3.c4droid/files/temp" or something like that...

There's another option, but you still have to pay: DroidEdit Pro. Perhaps better editor (didn't test it though) but without it's own compiler, you have to set up an external compiler from sftp server.
[Android Q&A, Help & Troubleshooting] LordChen:
I've also been looking for a c++ compiler and was hoping i'd find an app here.

I didn't find anything new

On the other hand I've found a few on the market while none were perfect.

C4droid. Couldn't install the gcc extension.

C/c++ compiler. Doesn't have c++

Source lair. Good app but no synthax highlight.

Idedroid. Synthax highlight and runs code but on my galaxy s uses 80% cpu and is unuseable
[Android Q&A, Help & Troubleshooting] mstfkaratas:
i am using ssh to connect my linux machine on my university and i can compile C codes from my phone using ssh, you can try to connect your linux machine using ssh and compile codes from terminal
[Android Q&A, Help & Troubleshooting] arun356y:
Buddy use AndDOS box or any other DOS emulator and download turbo c++ extract it to the root of your sd card. Thats the way I use c++ on my Android...
[Android Q&A, Help & Troubleshooting] fezzik77:
Forgive my ignorance but why?

If Android runs a Java virtual machine on top of a Linux environment why couldn't a gcc compiler be ported to the Linux part. I am pre-entry to porting and platform development but it seems to be that Linux being Linux you should be able to pretty much build around the Kernel.

For me I am getting interested in this since I am getting an ODROID and I plan on replacing the default Android with Ubuntu so that I can replace my PIII box as my personal server. Knowing my personal server never uses very many system requirements I would love to be able to run Android as the UI. Since Android is a Delvik machine it seems to me that it should be possible to take a working Android installation and flesh it out. The key would be a gcc. I would love to have Android with my web, mail, dns, dhcp ftp server running in the background with the ease of apt or even dpkg.

Of course as I say I am not a programmer or a Computer scientist I am in Networking. I am basing my assumptions on years of using Linux and a rudimentary understanding of kernels.
[Android Q&A, Help & Troubleshooting] MonaLisaOverdrive:
This thread is a little old, but if you're still looking for a C/C++ on device compiler I'm currently hacking around with the NDK with the goal of cross-compiling one for Android. If there's still interest send me a PM...if I get enough I'll post my results if and when I get them.

NOTE: I'm basically doing this out of boredom so it may be a while before I get anything remotely usable.
[Android Q&A, Help & Troubleshooting] S0AndS0:
I still check in on it from time to time... sounds good and like something that should be done.

Found a person over here : http://blog.anantshri.info/category/android-2/

which may aid in the porting but more to the point has examples of stand alone python and perl on that page so they'll likely be good examples of how to get it done for other languages. If you've got a way to share code publicly I might jump aboard to help; if I can that is.

Sent from either my SPH-D700 or myTouch3Gs

Debian Kit/QEMU Linux Install guide for all android devices that I'm writing:

http://xdaforums.com/showthread.php?t=2240397

Now have working Installers for ARM Java 7 JDK + Maptools + jMonkey
[Android Q&A, Help & Troubleshooting] MonaLisaOverdrive:
Finished porting 4.7 to Android a couple of weeks ago and finished 4.8 today. Only minimal testing done...basically single file .c source...but everything is working so far.

To be more specific:

I've cross-compiled native GCC 4.7 and 4.8 toolchains to Android. Both are using cross-built native versions of binutils 2.23. I'm using both with the KBOX environment built by Kevin Boone.
[Android Q&A, Help & Troubleshooting] Surge1223:
Idk if you are still around or not, but I just finished doing this for 4.9, I read your posts on stackoverflow.com and they were helpful, thanks. If you don't mind me asking how did you modify gcc source to use android CRT files and not ask for crt1.o, crtn.o, and crti.o? I successfully got it to use the Android ones as well but it also asked for the others, which I solved by creating symlinks to android's equivalents.

I tested 4.9 gcc and it works, so I'm okay regardless but I was just curious.

If you can reply or email me and we can figure out more, I'd be interested to see your configure options, I had to use a lot of testing until I found the right configuration.

Anyway, thanks for the help and now that ive compiled a make binary using androids dynamic linker, /system/bin/linker, I'm able to compile a quite a lot.
[Android Q&A, Help & Troubleshooting] MonaLisaOverdrive:
In addition to using the NDK cross-compiler to build the GCC sources, GCC 4.8 introduced the -mandroid and -mbionic flags which, I believe, select the appropriate C runtime files. Additionally I was building 4.8 (I think) and 4.9 on device, which may have had something to do with locating the correct CRT files.

When building, which GCC did you use?
[Android Q&A, Help & Troubleshooting] Surge1223:
Ah I see. I used the toolchain that the make-standalone-toolchain.sh script generates and used the gcc 4.9 source that that download-sources script in the ndk uses to get the sources, so Googles toolchain git. I did make quite a few edits in gcc to make everything happy though, along with binutils and etc. I'll probably put it on git soon.
[Android Q&A, Help & Troubleshooting] MonaLisaOverdrive:
FYI, make sure you specify the API level when you put it on git. Lollipop only supports PIE executables; if you compiled without the -fPIE -PIE and -fPIC flags it won't work on that platform. Huge PITA.
[Android Q&A, Help & Troubleshooting] Surge1223:
Good call, I forgot to do this. I modified my linker binary in source so I could bypass the pie restrictions but I suppose I should compile with the -fPIC and -fPIE flags. I'm guessing I'll have to mod a bit more than just including those flags though, the gcc/config/arm/linux-* arm related headers will prob have to be edited as well no?

Also let me know if you want me to dumpspecs or upload the toolchain (it's 75mb when tar.xz'd, but will prob be more like 35mb because I forgot to strip them)
[Android Q&A, Help & Troubleshooting] MonaLisaOverdrive:
S'okay...I've already got 4.9.2 on my device and have used it to build a bunch of stuff. Currently working on getting the bits to get a port of gdb to debug a python port.
[Android Q&A, Help & Troubleshooting] Surge1223:
Nice I just tried that recently too, was trying to natively get python 2.7.3 compiled, made it most of the way through but couldn't resolve some undefined references in some object files at the end. I mean it still compiled the python binary (first pass made hostgen, second made for arm) but it's limited. The python.h requires a lot of trial and error.
[Android Q&A, Help & Troubleshooting] MonaLisaOverdrive:
The python port I built runs without errors...it's the tests that are problematic. I ported the readline lib as well, so it has history and readline support.

I'm using the KBOX environment on my development device, so the port is based on a semi-standard linux filesystem, but the patched source may still be useful to you. It's at http://bit.ly/1DMiQBA (github).
[Android Q&A, Help & Troubleshooting] Surge1223:
Hey I could use some help with python if you want to chat on hangouts or something we can try to get a pretty decent full toolchain made. I just finally got gcc 4.9.3 and binutils 2.25 compiled and working natively on Android (that was a huge PITA)
[Android Q&A, Help & Troubleshooting] MonaLisaOverdrive:
[/COLOR]

Sure...when I've got a free cycle or two.

Right now I'm trying to fix the current Python build I'm working on; the tests won't run without throwing errors so I'm debugging using a gdb port. Long story short, between that and work I'm pretty swamped.
[Android Q&A, Help & Troubleshooting] Surge1223:
No worries, just send me message on hangouts whenever life gets easier.

I just figured that between you, me, and a few people on stackoverflow and GNU mailing lists (who by the way I feel sorry for, having to constantly deal with questions like "ld says crt1.o not found, how to fix?") are the only people who remotely work on this. Or discuss it anyways lol. But hey just respond here when you find free time. I'm sure we're the only two people who look at this thread anyways
[EVO 4G Q&A, Help & Troubleshooting] whoamanwtf:
I know there is a app that does this, the one I have found is 4 dollars here called Remote Wave. I was wondering more can it be built into a rom or into a upgrade like it should have been to begin with?
[EVO 4G Q&A, Help & Troubleshooting] t3project:
you mean play a .wav file? if so, your phone is perfectly capable with either the aosp or htc music player
[Nexus One Q&A, Help & Troubleshooting] Infected!:
Hello!!

I need to know if there is any way to put a password on the boot section or the section of recovery ..

I need to know this, because if my phone is stolen, anyone can wipe everything and install a new rom and so use the phone..

I have installed the WaveSecure but equally it does not guarantee me ..

Please I need to know this, couse' I live in a country where theft is common ..

Thanks!

PS: Sorry my bad english... Thanks Again~!!! :)
[Nexus One Q&A, Help & Troubleshooting] evilkorn:
Nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
[Nexus One Q&A, Help & Troubleshooting] qben88:
Lol

The message you have entered is too short. Please lengthen your message to at least 10 characters.
[Nexus One Q&A, Help & Troubleshooting] flybyme:
already been discussed....short answer.. no lol
[Nexus One Q&A, Help & Troubleshooting] Infected!:
Ok thanks...

Admin, Plz close this thread
[myTouch 3G Slide Android Development] beartard:
Oh crap. I got quoted. Good job, man!
[myTouch 3G Slide Android Development] imnotashinobi:
thanks! i didn't know how else to so eloquently explain adb, so i just quoted you. hopefully this will be of help to all three of those linux users out there on this forum!
[myTouch 3G Slide Android Development] slughappy1:
It's kind of funny, I came on here to write a thread like this one. I noticed that there wasn't a single thread that combined the new root method with flashing the ENG build into one. You saved me some time.

I noticed that you don't have the part about updating to the newest Radio after the ENG build. Do the newer ROMs come with a Radio update in them?
[myTouch 3G Slide Android Development] imnotashinobi:
@slughappy1: i reccomended updating to CR's OTA rom since going from stock to updated stock with root is the most logical step. therefore, a radio updatre is included.

to my knowledge, the nicer devs include the newer radio, other wise they make a mention of updating it. anyways, i'll include it in my tutorial for completeness sake. now if only i could figure out how to take non-blurry distance pictures with my slide >_>. sadly, i'll probably sell this off for a g2 =\.
[myTouch 3G Slide Android Development] arifwn:
Why sudo? I don't think adb need super user permission. Is it needed because you put it in /usr/local?
[myTouch 3G Slide Android Development] nbetcher:
Some systems are setup incorrectly to handle giving users permission to write to the ADB device file when the phone is plugged in. The correct process is to fix the permissions on the dev file that udev creates. Here's a link to do that: http://xdaforums.com/showpost.php?p=5300224&postcount=6.

Please ALWAYS refrain from using 'sudo' or 'su' unless you're ABSOLUTELY sure that it needs root and there's no (more) proper way to do it.

(On a side note, I'm always available to answer any simple or complicated Linux questions anyone may have. You can PM me to get my attention or GTalk: nbetcher at gmail dot com.)
[myTouch 3G Slide Android Development] beartard:
Thanks for the post about not using sudo. It was a quick way to make sure users on various linux distros can get it to work without a whole bunch of rigmarole.

On another note about the udev rules mentioned, the "SYSFS{}" call is being deprecated and a revision will be needed soon.
[myTouch 3G Slide Android Development] vikramdhani:
So i tried to follow the intstruction but once i booted in recovery mode nothing happend :(

10. wait until the bar on the side of the screen loads.

if you don't see the bar wait about 4 minutes and something should happen.

this is the step where nothing i happening on my phone
[myTouch 3G Slide Android Development] vikramdhani:
huh!! no one cares to help me :(
[myTouch 3G Slide Android Development] beartard:
You didn't give much information to learn where the problem might be. If you didn't get the loading bar on the side of the screen, your recovery didn't see the ESPRIMG.zip file in the root directory of your sd card. Mount it on the computer and see if it's there.
[myTouch 3G Slide Android Development] vikramdhani:
Alright let me check if the sd card has ESPRIMG.zip. but i have a question no where in the instruction it says if i need to transfer the zip file to the sd card ?
[myTouch 3G Slide Android Development] beartard:
Step number seven is one of the most important ones. Check those commands you pasted. Most of them copy files to various places on your phone.
[General Topics] willyGoro:
hey guys im stuck on recovery mode and i wiped everything and my phone can't read my memory card does any one know how to fix this, I NEED HELP PLZ:( it gives me an error message, E:Can't mount /dev/block/mmcblc0 (or /dev/block/mmcblk0p1) (no suck file or directory) E:can't mount /sdcard.:confused:
[General Topics] kylecore:
same issue

i assume this problem relates to the SGS I9000M can we get this moved?
[General Topics] dbzfanatic:
Eject your sdcard while the phone is on, replace it, and try again. Worked for me when I got the error on my MT3GS.
[Android Software/Hacking General [Developers Only]] korkin25:
hi*&

Since today morning market on my desire doesn'y connect to....

"A server error has occurred. Retry, or cancel and reryrn to the previous screen"

What I tryed:

1. Connections via wifi and gprs/3g.

2. The same after full wipe...

3. Full wipe the tried anothe google account. it works!...

4. I have checked my card on the checkout.google.com. everything is well (I have replaced expired card to the new one)

I have red 3 hours threads in google support forums and see people didn't find solution.

Is probably someone here finded the solution?

thank you.
[Android Software/Hacking General [Developers Only]] androidcues:
ITs got nothing at all to do with checkout, google or your cards, its not related at all.

I dont know what your runnin, are you rooted? Are you on CM6? what rom are you running? Either reflash the gapps. I dont know why it works on one google acct but not another.

Are you able to access market at all with your regular acct? Where are you located? So many things i dont know that i need to know to help.

(I cant see your profile on the phone so apologies if its there but i cant see it. )

-------------------------------------

Sent from the predecessor to the G2, the one and only Dream
[JAMin, XDA Neo, S200 Software Upgrading] VahuDL:
Where can I get the CM Pin v1.3.1.0 cab? :confused:
[JAMin, XDA Neo, S200 Software Upgrading] VahuDL:
Or other version working on WM 6.1?
[G1 Q&A, Help & Troubleshooting] punshkin:
Hi

i wonder if there is a ROM for the G1 that is ported/based on the Sony Ericson Xperia X0 mini Pro?