15

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

hippietrail
  • 15,848
  • 18
  • 99
  • 158
Vishak Kavalur
  • 449
  • 1
  • 5
  • 12

3 Answers3

6

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.

  • In that Android ARM inline assembly, their syntax looks more complicated than pure inline assembler is. Can I suggest using the netbeans assembler (V6.0 at time of posting) which gives you the assembler via the C++ enviroment. With register watch etc. – Bob Oct 25 '16 at 12:31
5

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

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

Giumo
  • 359
  • 1
  • 5
  • 11
3

I never heard or view android developing with assembly language (If you are talking about C,C++ then its possible)..

But, If you want to write your android application in some C, C++ language then you can use Android NDK for that. But in that case also you have to make a UI interface with Android java side for your application.

Also If you are good in Objective C then you can also use a QT and then integrate it with android but its in some initial supported phase..

UPDATE: Also you have any Assembly language file then you can integrate it with native Android.mk (Java Native Interface) file and use it in your android application. But this not include any UI part.

user370305
  • 108,599
  • 23
  • 164
  • 151
  • It was always possible to write UI stuff in c/c++.. OpenGL is an excellent api to get it done.. You can also write directly to the screen.. though I don't know how, I assume if you're writing in assembly most road blocks are something you can get around. – baash05 Jul 08 '16 at 06:41