Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get android's native methods source code

Is it possible to get and watch at Android's program component's native methods code. If anyone knows how to, please let me know.

like image 622
teoREtik Avatar asked Apr 27 '11 13:04

teoREtik


People also ask

Where is Android App source code?

In Android studio 2.3, Build -> Analyze APK -> Select the apk that you want to decompile . You will see it's source code.

What is native code for Android devices?

The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android, and provides platform libraries you can use to manage native activities and access physical device components, such as sensors and touch input.

What is native method in Android?

Introduction. The Native Function API for Android provides three calls that allow you to access any native iOS API from your JavaScript code. java. import allows you to import any Android native class into JavaScript.

What is source code in Android Studio?

Your source code download is a reflection of your app at the time of your last build inside Dropsource, made available for a one-way transfer to the IDE. However, if you plan to release multiple versions of your app you can do so from your source code – for each new version: Make your changes in the editor.


2 Answers

You can find source code for Android native methods using Google Code Search one of the following services:

  • AndroidXRef
  • GitHub (using repo:android/* search term)

The search for "SystemClock || android*SystemClock" in AndroidXref will point you to the android_os_SystemClock.cpp file which in turn forwards many of its methods to SystemClock.cpp

Other Android .cpp or .h files with native methods implementations could be found in a similar way.

like image 72
Idolon Avatar answered Sep 30 '22 06:09

Idolon


If you are looking for android SDK code then you can find it here:
https://android.googlesource.com

like image 26
mudit Avatar answered Sep 30 '22 07:09

mudit