-1

I was wondering where all the Android source codes are stored. Are they stored in RAM or Flash memory?

---------------edit

Thanks for the prompt replies. Now I got that the Android binary image is stored in RAM. What about Android application source codes (byte code)?

If I run an APK file then Android loads the application. Is the bytecode loaded onto RAM? or Flash?

Thanks in advance..

codereviewanskquestions
  • 13,460
  • 29
  • 98
  • 167
  • 2
    Source code refers to the code used to compile the image. The image is stored in flash on the device, but the source code is stored on their computers. – VoidStar Oct 07 '11 at 18:04
  • Source code is *not* bytecode. Source code is *compiled* into bytecode, but bytecode is not capable of being reverted back into the original source code. – Blender Oct 07 '11 at 18:47
  • @Blender, actually you can get back to something quite similar to the original sources from bytecode. You just need a bytecode decompiler: http://stackoverflow.com/questions/1249973/decompiling-dex-into-java-sourcecode – slayton Oct 07 '11 at 20:35
  • @slayton: I said "original" because decompiled bytecode usually doesn't include the original code structure and variable names. But yes, you can decompile it to some extent. – Blender Oct 08 '11 at 00:27

2 Answers2

2

Where is the Windows source code stored? Trick question: nowhere. Windows is compiled before you even get the disk and then all you do is install the compiled binaries.

Android is an operating system just like Windows and Mac (better yet, it is Linux), so to answer your question correctly, Android is stored in the Flash memory as the RAM is wiped every time you reboot the device.

Blender
  • 289,723
  • 53
  • 439
  • 496
1

The source code is not actually stored on the device. Instead the sources are compiled into what is commonly referred to as a ROM and then copied into the device's internal flash memory.

If you want the actual android sources you can get them from http://github.com/android

slayton
  • 20,123
  • 10
  • 60
  • 89