43

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.

Volo
  • 28,673
  • 12
  • 97
  • 125
teoREtik
  • 7,886
  • 15
  • 46
  • 65

4 Answers4

41

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

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.

Fredrick Gauss
  • 5,126
  • 1
  • 28
  • 44
Volo
  • 28,673
  • 12
  • 97
  • 125
1

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

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
mudit
  • 25,306
  • 32
  • 90
  • 132
  • 2
    Actually I want to look at SystemClock.java and it's native method implementation, do you know in what folder can I find it? – teoREtik Apr 27 '11 at 13:25
0

https://android.googlesource.com

git clone https://android.googlesource.com/platform/frameworks/base

For Google application look at platform/packages/apps/[APP name]

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
luc.chante
  • 418
  • 7
  • 18
-1

Beside the Android Open Source Project you can find the code just by using google, e.g. search for:

android SystemClock source code

I got links to grepcode (SystemClock). I find it more compfortable to browse the code here (be careful which version of code you are browsing).

FrVaBe
  • 47,963
  • 16
  • 124
  • 157