Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing Android apps using assembly language

How do I develop Android apps using assembly language, either in Windows or Linux?

like image 880
Vishak Kavalur Avatar asked Jan 21 '12 04:01

Vishak Kavalur


People also ask

What assembly language does Android use?

A slightly more human readable form of machine code is called assembly language and a program called an assembler is used to convert the assembly notations into machine code. Normally apps for Android are written in Java. The Java is compiled to Java byte-code which in turn is executed on the Java Virtual Machine.

Can Android run assembly?

In your android app you should be able to use the Java Native Interface/Android NDK to call native code that includes assembly instructions.

Which programming language is used for app making in Android Studio?

Develop Android apps with Kotlin Kotlin is a modern statically typed programming language used by over 60% of professional Android developers that helps boost productivity, developer satisfaction, and code safety.

Can we develop Android with C++?

You can add C and C++ code to your Android project by placing the code into a cpp directory in your project module. When you build your project, this code is compiled into a native library that Gradle can package with your app.


2 Answers

I don't personally know, but I found examples on the net (Android ARM inline assembly, Motivation for hand-optimized Assembly code), so I assume you can. Looking at it, it is clear they are coding in C or C++ using Android's NDK and inserting there the assembly code, so I can only suggest you should start looking there.

You can enormously increase efficiency by writing your code in assembly language, but you should try to find a middle point between efficiency and maintainability, that's the reason we have object oriented languages (such as Java). So, as a personal tip, I would use Java for everything except for a really specific task that needs maximum performance (like rendering video or images).

Note also some other problems of assembly like using specific methods that may not be present on all ARM processors.

like image 195
Sergio R. Lumley Avatar answered Oct 25 '22 14:10

Sergio R. Lumley


Try this: http://peterdn.com/post/e28098Hello-World!e28099-in-ARM-assembly.aspx

Generally, all you need is a cross compiler for android linux.

like image 29
Giumo Avatar answered Oct 25 '22 15:10

Giumo