<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=ROM_Android%3A_Fondasi_Bangun_Android</id>
	<title>ROM Android: Fondasi Bangun Android - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=ROM_Android%3A_Fondasi_Bangun_Android"/>
	<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=ROM_Android:_Fondasi_Bangun_Android&amp;action=history"/>
	<updated>2026-04-22T06:25:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=ROM_Android:_Fondasi_Bangun_Android&amp;diff=41801&amp;oldid=prev</id>
		<title>Onnowpurbo: New page: == Basic language info ==  Android is written in a combination of C, C++, and Java.  Here&#039;s a bit of a breakdown:  *  the very low-level stuff like the kernel, libc (or bionic as it&#039;s know...</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=ROM_Android:_Fondasi_Bangun_Android&amp;diff=41801&amp;oldid=prev"/>
		<updated>2015-01-02T14:23:51Z</updated>

		<summary type="html">&lt;p&gt;New page: == Basic language info ==  Android is written in a combination of C, C++, and Java.  Here&amp;#039;s a bit of a breakdown:  *  the very low-level stuff like the kernel, libc (or bionic as it&amp;#039;s know...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Basic language info ==&lt;br /&gt;
&lt;br /&gt;
Android is written in a combination of C, C++, and Java.  Here&amp;#039;s a bit of a breakdown:&lt;br /&gt;
&lt;br /&gt;
*  the very low-level stuff like the kernel, libc (or bionic as it&amp;#039;s known in the android world), and many Linux-ish parts of Android are written in C.&lt;br /&gt;
&lt;br /&gt;
*  Slightly &amp;quot;higher&amp;quot;-up stuff, as well as external, 3rd-party open-source programs incorporated into Android may be written in C or C++.  This includes everything from the Dalvik virtual machine (which runs end-user programs), networking tools, sound processors, shell tools, graphics drivers, and that sort of thing.&lt;br /&gt;
&lt;br /&gt;
*  The Android &amp;quot;framework&amp;quot; stuff such as the UI elements, as well as the apps themselves, are written in Java.  This is the stuff that most people think of when they think of Android, because it deals with much of what they see and interact with.&lt;br /&gt;
&lt;br /&gt;
You can learn more about any of these languages from the external [[Doc:_Development_Resources|online resources]].&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;.mk&amp;lt;/code&amp;gt; files, &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt;s, and the &amp;lt;code&amp;gt;/build&amp;lt;/code&amp;gt; directory ==&lt;br /&gt;
&lt;br /&gt;
There is a whole build system which is used to create a flashable &amp;lt;code&amp;gt;.zip&amp;lt;/code&amp;gt; file from source.  The various &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; scripts used to control this process are primarily located in the &amp;lt;code&amp;gt;/build&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
It may be useful to know the basics of how it works-- essentially, the various components/programs which together make up Android are each built independently through Android-specific &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt;s called &amp;lt;code&amp;gt;Android.mk&amp;lt;/code&amp;gt;.  The &amp;lt;code&amp;gt;Android.mk&amp;lt;/code&amp;gt; generally exists for each sub-project (or &amp;quot;module&amp;quot;) in its source-code directory.  This file directs the build system on exactly how to build that module, and where to put it in Android&amp;#039;s directory structure.&lt;br /&gt;
&lt;br /&gt;
The files, once built, end up in the &amp;lt;code&amp;gt;/out/target/project/CODENAME&amp;lt;/code&amp;gt; directory (replace CODENAME with the code name of the device).  From there, they are zipped up and the final flashable (by recovery) &amp;lt;code&amp;gt;.zip&amp;lt;/code&amp;gt; and flashable (by fastboot) &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; files are produced.&lt;br /&gt;
&lt;br /&gt;
You can actually get a peek at what&amp;#039;s been built there in &amp;lt;code&amp;gt;/out&amp;lt;/code&amp;gt;, as the directories that are turned into the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.zip&amp;lt;/code&amp;gt; files are still around.&lt;br /&gt;
&lt;br /&gt;
== The various source code directories ==&lt;br /&gt;
&lt;br /&gt;
In addition to the &amp;lt;code&amp;gt;/build&amp;lt;/code&amp;gt; directory, the Android source code is organized into a hierarchy of folders.  [[Doc:_the_cm_source|Take a look here]] at a brief description of what&amp;#039;s where in the source code.&lt;br /&gt;
&lt;br /&gt;
== The &amp;lt;code&amp;gt;$OUT&amp;lt;/code&amp;gt; directory ==&lt;br /&gt;
&lt;br /&gt;
{{tip|tip=After you build, you can type &amp;lt;code&amp;gt;cd $OUT&amp;lt;/code&amp;gt; to automatically go to the &amp;lt;code&amp;gt;/out/target/project/CODENAME&amp;lt;/code&amp;gt; directory.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;kernel&amp;lt;/code&amp;gt;  This is the kernel, obviously.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/system&amp;lt;/code&amp;gt; -- this contains all the stuff that will become the &amp;lt;code&amp;gt;/system&amp;lt;/code&amp;gt; folder on Android.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/root&amp;lt;/code&amp;gt; -- these files contain the files that are turned into the ram disk loaded and run by the kernel.  The first program to be run by the kernel is called &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt;, and it uses the &amp;lt;code&amp;gt;init.rc&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;init.CODENAME.rc&amp;lt;/code&amp;gt; files to determine what happens next.  See an discussion of that [http://www.androidenea.com/2009/08/init-process-and-initrc.html here].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/recovery/root&amp;lt;/code&amp;gt; The ramdisk that contains the recovery mode is here.&lt;br /&gt;
&lt;br /&gt;
== Shortcut commands every CM dev should know ==&lt;br /&gt;
&lt;br /&gt;
These commands are really useful for developing w/CM.  All these commands are meant to be typed from your computer, not the shell on your device (except where indicated).&lt;br /&gt;
&lt;br /&gt;
=== Commands ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;$ . build/envsetup.sh&amp;lt;/code&amp;gt; -- Note the &amp;quot;&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt; at the beginning.  This will load the environment variables to your shell as well as aliases needed for the rest of these shortcuts. &lt;br /&gt;
{{tip|tip=If you want to know more about what &amp;quot;&amp;lt;code&amp;gt;$ . build/envsetup.sh&amp;lt;/code&amp;gt;&amp;quot; does or simply want to know more about the &amp;lt;code&amp;gt;breakfast&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;brunch&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;lunch&amp;lt;/code&amp;gt; commands, you can head over to the [[Envsetup_help]] page}}&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;croot&amp;lt;/code&amp;gt; -- this command will take you to the root of the source code.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;mm&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mm -B&amp;lt;/code&amp;gt; -- this is the &amp;quot;make module&amp;quot; command and it is very useful if you are working on a particular module (that is, a section of the code to be built) and don&amp;#039;t want to have to rebuild everything just to test it.    To use it, &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; into the directory that you want to test, then just type &amp;lt;code&amp;gt;mm&amp;lt;/code&amp;gt; to build just the module in the working directory.  If you want to start the build from scratch, add the &amp;lt;code&amp;gt;-B&amp;lt;/code&amp;gt;.  This is a good companion with &amp;lt;code&amp;gt;adb sync system&amp;lt;/code&amp;gt; below, which you can use to push the newly built files directly to your device for testing without having to reflash everything.&lt;br /&gt;
&lt;br /&gt;
=== Make ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;make modules&amp;lt;/code&amp;gt; -- this command will show all available targets. You can build a single one by &amp;lt;code&amp;gt;make my_target&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;make showcommands&amp;lt;/code&amp;gt; -- this command will enable the verbose build mode.&lt;br /&gt;
&lt;br /&gt;
=== ADB ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;adb shell&amp;lt;/code&amp;gt; -- assuming you have [[adb]] installed, this will give you a command line shell inside your device.  See [[adb help]] for more.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;adb reboot&amp;lt;/code&amp;gt; -- If you&amp;#039;ve got [[adb]] installed, this will quickly make your device reboot.  Or try &amp;lt;code&amp;gt;adb reboot recovery&amp;lt;/code&amp;gt; to reboot directly into recovery.  &amp;lt;code&amp;gt;adb reboot bootloader&amp;lt;/code&amp;gt; similarly does just what you&amp;#039;d expect.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;adb remount&amp;lt;/code&amp;gt; -- If you&amp;#039;ve gotten errors trying to push files to &amp;lt;code&amp;gt;/system&amp;lt;/code&amp;gt; due to it being in read-only mode, &amp;lt;code&amp;gt;adb remount&amp;lt;/code&amp;gt; will remount &amp;lt;code&amp;gt;/system&amp;lt;/code&amp;gt; into read-write mode--- provided that the shell has the correct root permissions to do so.  This replaces having to type a longer command by hand such as &amp;lt;code&amp;gt;mount -o rw,remount /system&amp;lt;/code&amp;gt; (as root) or something.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;adb sync system&amp;lt;/code&amp;gt; -- assuming you have [[adb]] installed, this little-known, but powerful command will sync the contents of &amp;lt;code&amp;gt;$OUT/system&amp;lt;/code&amp;gt; with the &amp;lt;code&amp;gt;/system&amp;lt;/code&amp;gt; directory on your device.  It does require that you have write access to &amp;lt;code&amp;gt;/system&amp;lt;/code&amp;gt;.  This command is very useful for making and testing quick changes to your device.  Note though that &amp;lt;code&amp;gt;adb sync system&amp;lt;/code&amp;gt; sometimes has problems with permissions and symlinks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* http://wiki.cyanogenmod.org/w/Doc:_Building_Basics&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>