3
iArrow
2y

Can I build apps in Android devices using only C/C++ ? I mean is possible? I heard it is, but how that can be achieved? Can someone explain!

Comments
  • 3
    Is it possible: yes
    Is it wise: dafuq you using a phone to do builds for?

    Because I can't be bothered explaining how to do this, because o don't recommend it unless you have a physical keyboard...

    See: https://gist.github.com/VirajKanse/...
  • 3
    @C0D4
    OMG
    sorry man I meant for Android devices not in Android devices
    Sorry for the mistake, English is not my first language 😅
    I hope you understood what I meant
  • 3
    You use the NDK: https://developer.android.com/ndk to cross-compile C/C++ stuff for Android. The main point of that is building libraries that need maximum performance.
  • 1
    @Fast-Nop
    Interesting.. 🤔
    So is it possible to use it to build malware or rootkits? Or it's just limited? Also if you have good resources could recommend me some if that's possible? Thanks
  • 4
    @iArrow In theory, you can build anything with that. For a rootkit, you'd have to use some exploit to get root rights in the first place.

    The NDK programming model is just like any other Linux. You know, with pthreads and stuff if using C, or the STL provided equivalents if using C++.

    However, the store does not allow apps that start arbitrary executables - only those that are provided in the app's APK itself. That's not a limitation of Android, but of Google's store conditions.

    You'd read up in the NDK's documentation itself to figure out how to use it, depending also on what your intended build chain is. But it's based on Clang, so not difficult.
  • 2
    @Fast-Nop

    Thank you, I just started a new position in Mobile Security and I'm little bin worried because I don't have the experience in reversing or building apps (only in Flutter which is not that helpful), I will read more about the NDK, thanks a lot 🙏🏻
  • 1
    You should try kotlin, I am a junior kotlin developer if you need assistance
  • 1
    @Ohiorenua
    Thanks that sweet of you, mainly I will focus of JS based framework (JS) since I might test these apps for security issues & they told me that I need to have JS experience, but I really needs to try it, I mean why not!
  • 2
    Yes, it's possible. But since Android UI APIs (widgets) are developed at a higher level, when creating a C or C++ application on Android, you will design it as if it were a game.

    Take a look at https://marmaladegamestudio.com//, they have a UI Builder https://github.com/marmalade/...
  • 2
    Doesn't Qt have Android builds?
  • 1
    @codingfreedom
    Thanks I will look into it 👍🏻
  • 0
    @lorentz tbh I didn't know
    Thanks
Add Comment