AI 148105: Assigning to Ryan for Dr No Approval.
  These are new content files for the partner development kit that will be hosted off of source.android.com externally.

Automated import of CL 148105
diff --git a/pdk/docs/guide/audio.jd b/pdk/docs/guide/audio.jd
new file mode 100755
index 0000000..fddb293
--- /dev/null
+++ b/pdk/docs/guide/audio.jd
@@ -0,0 +1,56 @@
+page.title=Audio
+pdk.version=1.0
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidAudioSubSystemIntroduction">Introduction</a><br/>
+<a href="#androidAudioBuildingDriver">Building an Audio Library</a><br/>
+<a href="#androidAudioInterface">Interface</a><br/></div></font>
+
+<a name="androidAudioSubSystemIntroduction"></a><h2>Introduction</h2>
+
+<p>AudioHardwareInterface serves as the glue between proprietary audio drivers and the Android AudioFlinger service, the core audio service that handles all audio-related requests from applications.</p>
+<p><img src="images/android_audio_architecture.gif"></p>
+
+Solid elements represent Android blocks and dashed elements represent partner-specific blocks.
+
+
+
+<a name="androidAudioBuildingDriver"></a><h2>Building an Audio Library</h2>
+
+<p>To implement an audio driver, create a shared library that implements the interface defined in <code>AudioHardwareInterface.h</code>. You must name your shared library <code>libaudio.so</code> so that it will get loaded from <code>/system/lib</code> at runtime.  Place libaudio sources and <code>Android.mk</code> in <code>partner/acme/chipset_or_board/libaudio/</code>.</p>
+<p>The following stub <code>Android.mk</code> file ensures that <code>libaudio</code> compiles and links to the appropriate libraries:</p>
+
+<pre class="prettify">
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libaudio
+
+LOCAL_SHARED_LIBRARIES := \
+    libcutils \
+    libutils \
+    libmedia \
+    libhardware
+
+LOCAL_SRC_FILES += MyAudioHardware.cpp
+
+LOCAL_CFLAGS +=
+
+LOCAL_C_INCLUDES +=
+
+LOCAL_STATIC_LIBRARIES += libaudiointerface
+
+include $(BUILD_SHARED_LIBRARY)
+</pre>
+
+
+<a name="androidAudioInterface"></a><h2>Interface</h2>
+
+
+
+<p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="audio_sub_system.html">click here</a>.</p>
+
+
+<iframe onLoad="resizeDoxFrameHeight();" src="AudioHardwareInterface_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
diff --git a/pdk/docs/guide/bluetooth.jd b/pdk/docs/guide/bluetooth.jd
new file mode 100755
index 0000000..f9594d0
--- /dev/null
+++ b/pdk/docs/guide/bluetooth.jd
@@ -0,0 +1,69 @@
+page.title=Bluetooth
+pdk.version=1.0
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidBluetoothIntro">Introduction</a><br/>
+<a href="#androidBluetoothPorting">Porting</a><br/><div style="padding-left:40px">
+
+<a href="#androidBluetoothPortingDriver">UART Driver</a><br/>
+<a href="#androidBluetoothPortingPowerOnOff">Bluetooth Power On / Off</a><br/></div>
+<a href="#androidBluetoothTools">Tools</a><br/></div></font></div>
+
+<a name="androidBluetoothIntro"></a><h2>Introduction</h2>
+
+<p>Android's Bluetooth stack uses BlueZ version 3.36 for GAP, SDP, and RFCOMM profiles, and is a SIG-qualified Bluetooth 2.0 host stack.</p>
+
+<p>Bluez is GPL licensed, so the Android framework interacts with userspace bluez code through D-BUS IPC to avoid proprietary code.</p>
+
+<p>Headset and Handsfree (v1.5) profiles are implemented in the Android framework and are both tightly coupled with the Phone App. These profiles are also SIG qualified.</p>
+
+<p>The diagram below offers a library-oriented view of the Bluetooth stack. Click <a href="bluetooth/bluetooth_process.html">Bluetooth Process Diagram</a> for a process-oriented view.</p>
+
+<p><img src="images/androidBluetooth.gif"></p>
+
+Solid elements represent Android blocks and dashed elements represent partner-specific blocks.
+
+
+
+<a name="androidBluetoothPorting"></a><h2>Porting</h2>
+
+<p>BlueZ is Bluetooth 2.0 compatible and should work with any 2.0 chipset. There are two integration points:</p>
+<p><ul>
+<li>UART driver</li>
+<li>Bluetooth Power On / Off</li>
+</ul>
+</p>
+
+
+<a name="androidBluetoothPortingDriver"></a><h3>UART Driver</h3>
+
+<p>The BlueZ kernel sub-system attaches to your hardware-specific UART driver using the <code>hciattach</code> daemon.</p>
+<p>For example, for MSM7201A, this is <code>drivers/serial/msm_serial.c</code>. You may also need to edit command line options to <code>hciattach</code> via <code>init.rc</code>.</p>
+
+
+<a name="androidBluetoothPortingPowerOnOff"></a><h3>Bluetooth Power On / Off</h3>
+
+<p>The method for powering on and off your bluetooth chip varies from Android V 1.0 to post 1.0.</p>
+
+<p><ul>
+<li><b>1.0</b>: Android framework writes a 0 or 1 to <code>/sys/modules/board_[PLATFORM]/parameters/bluetooth_power_on</code>.</li>
+
+<li><b>Post 1.0</b>: Android framework uses the linux <code>rfkill</code> API. See <code>arch/arm/mach-msm/board-trout-rfkill.c</code> for an example.</li>
+</ul>
+</p>
+
+
+<a name="androidBluetoothTools"></a><h2>Tools</h2>
+
+<p>BlueZ provides a rich set of command line tools for debugging and interacting with the Bluetooth sub-system, including:</p>
+<p><ul>
+<li><code>hciconfig</code></li>
+<li><code>hcitool</code></li>
+<li><code>hcidump</code></li>
+<li><code>sdptool</code></li>
+<li><code>dbus-send</code></li>
+<li><code>dbus-monitor</code></li>
+</ul>
+</p>
diff --git a/pdk/docs/guide/bluetooth/bluetooth_process.jd b/pdk/docs/guide/bluetooth/bluetooth_process.jd
new file mode 100755
index 0000000..86e9c93
--- /dev/null
+++ b/pdk/docs/guide/bluetooth/bluetooth_process.jd
@@ -0,0 +1,6 @@
+page.title=Bluetooth Process Diagram
+pdk.version=1.0
+@jd:body
+
+<p>The diagram below offers a process-oriented architectural overview of Android's Bluetooth stack. Click <a href="../bluetooth.html">Bluetooth</a> to return to the Bluetooth overview page.</p>
+<img src="images/androidBluetoothProcessDiagram.jpg">
\ No newline at end of file
diff --git a/pdk/docs/guide/bluetooth/images/androidBluetoothProcessDiagram.jpg b/pdk/docs/guide/bluetooth/images/androidBluetoothProcessDiagram.jpg
new file mode 100755
index 0000000..6872180
--- /dev/null
+++ b/pdk/docs/guide/bluetooth/images/androidBluetoothProcessDiagram.jpg
Binary files differ
diff --git a/pdk/docs/guide/bring_up.jd b/pdk/docs/guide/bring_up.jd
new file mode 100755
index 0000000..85d7b26
--- /dev/null
+++ b/pdk/docs/guide/bring_up.jd
@@ -0,0 +1,358 @@
+page.title=Bring Up
+pdk.version=1.0
+@jd:body
+
+<p>Once your code is built and you have verified that all necessary directories exist, power on and test your device with basic bring up, as described below. Bring up tests are typically designed to stress certain aspects of your system and allow you to characterize the device's behavior. </p>
+<p>&nbsp;</p>
+<h3>1. Confirm a Clean Installation of a Basic Linux Kernel </h3>
+<p>Before considering Android-specific modifications to the Linux kernel, verify that you can build, deploy, and boot a core Linux kernel on your target hardware. </p>
+<p>&nbsp;</p>
+<h3>2. Modify Your Kernel Configuration to Accommodate Android Drivers</h3>
+<p>Your kernel configuration file should include the following:</p>
+<pre class="prettyprint">
+#
+# Android
+#
+# CONFIG_ANDROID_GADGET is not set
+# CONFIG_ANDROID_RAM_CONSOLE is not set
+CONFIG_ANDROID_POWER=y
+CONFIG_ANDROID_POWER_STAT=y
+CONFIG_ANDROID_LOGGER=y
+# CONFIG_ANDROID_TIMED_GPIO is not set
+CONFIG_ANDROID_BINDER_IPC=y
+</pre>
+<h3>3. Write Drivers</h3>
+<p>Android ships with default drivers for all basic functionality but you'll likely want to write your own drivers (or at least customize the default drivers) for your own device depending on your hardware configuration. See the following topics for examples of how to write your own drivers. </p>
+<ul>
+  <li><a href="audio_subsystem.html">Audio</a></li>
+  <li><a href="keymaps_keyboard_input.html">Keymaps and Keyboard</a></li>
+  <li><a href="display_drivers.html">Display</a></li>
+</ul>
+<p>&nbsp;</p>
+<h3>4. Burn Images to Flash</h3>
+<p>An image represents the state of a system or part of a system  stored in non-volatile memory. The build process should produce the following system images:</p>
+<ul>
+  <li><strong>bootloader</strong>: The bootloader is a small program responsible for initiating loading of the operating system. </li>
+  <li><strong>boot</strong>: </li>
+  <li><strong>recovery</strong>: </li>
+  <li><strong>system</strong>: The system image stores a snapshot of the Android operating system.</li>
+  <li><strong>data</strong>: The data image stores user data. Anything not saved to the <code>device/data</code> directory will be lost on reboot.</li>
+</ul>
+<ul>
+  <li><strong>kernel</strong>: The kernel represents the most basic element of an operating system. Android's Linux kernel is responsible for managing the system's resources and acts as an abstraction layer between hardware and a system's applications. </li>
+  <li><strong>ramdisk</strong>: RAMdisk defines a portion of Random Access Memory (RAM) that gets used as if it were a hard drive. </li>
+</ul>
+<p>&nbsp;</p>
+<p>Configure the bootloader to load the kernel 	and RAMdisk into RAM and pass the RAMdisk address to the kernel on 	startup. </p>
+<p>&nbsp;</p>
+<h3>5. Boot the kernel and mount the RAMdisk.</h3>
+<p>&nbsp;</p>
+<h3>6. Debug Android-specific init programs on RAMdisk</h3>
+<p>Android-specific init programs are found in <code>device/system/init</code>. Add LOG messages to help you debug potential problems with the LOG macro defined in <code>device/system/init/init.c</code>.</p>
+<p> The init program directly mounts all filesystems and devices using either hard-coded file names or device names generated by probing the sysfs filesystem (thereby eliminating the need for a <code>/etc/fstab</code> file in Android).  After <code>device/system</code> files are mounted, init  reads <code>/etc/init.rc</code> and invokes the programs listed there (one of the first of which is the 	console shell).</p>
+<p>&nbsp;</p>
+<h3>7. Verify that applications have started </h3>
+<p>Once the shell becomes available, execute <code>% ps</code> to confirm that the following applications are running:</p>
+<ul>
+    <li><code>/system/bin/logd</code></li>
+    <li><code>/sbin/adbd</code></li>
+    <li><code>/system/bin/usbd</code></li>
+    <li><code>/system/bin/debuggerd</code></li>
+    <li><code>/system/bin/rild</code></li>
+    <li><code>/system/bin/app_process</code></li>
+    <li><code>/system/bin/runtime</code></li>
+    <li><code>/system/bin/dbus-daemon</code></li>
+    <li><code>system_server</code></li>
+</ul>
+<p>Each of these applications is embedded Linux C/C++ and you can use any standard Linux debugging tool to troubleshoot applications that aren't running. Execute <code>% make showcommands</code> to determine precise build commands. <code>gdbserver</code> (the GNU debugger) is available in the <code>bin</code> directory of the system partition (please see <a href="http://sourceware.org/gdb/">http://sourceware.org/gdb/</a> for more information).  </p>
+<p>&nbsp;</p>
+<h3>8. Pulling it all together </h3>
+<p>If bring up was successful, you should see the following Java applications (with icons) visible on the LCD panel:</p>
+<ul>
+    <li>com.google.android.phone: The Android contact application. </li>
+    <li>com.google.android.home</li>
+    <li>android.process.google.content</li>
+</ul>
+<p>If they are not visible or unresponsive to keypad control, run the <code>framebuffer/keypad</code> tests.</p>
+
+
+<a name="androidInitLanguage"></a><h1>Android Init Language</h1>
+
+
+<p>The Android Init Language consists of four broad classes of statements:</p>
+<ul>
+  <li>Actionn</li>
+  <li>Commands</li>
+  <li>Services</li>
+  <li>Options</li>
+</ul>
+<p>The language syntax includes the following conventions: </p>
+<ul>
+  <li>All classes are line-oriented and consist of tokens separated by whitespace. c-style backslash escapes may be used to insert whitespace into a token. &nbsp;Double quotes may also be used to prevent whitespace from breaking text into multiple tokens. A backslash <br />
+  appearing as the last character on a line is used for line-folding.</li>
+  <li> Lines that start with a # (leading whitespace allowed) are comments.</li>
+  <li>Actions and Services implicitly declare new sections. All commands
+    or options belong to the section most recently declared. &nbsp;Commands
+    or options before the first section are ignored.  </li>
+  <li>Actions and Services have unique names. &nbsp;If a second Action or Service is declared with the same name as an existing one, it is ignored as an error.</li>
+</ul>
+<p>  Actions</p>
+<p> Actions are named sequences of commands. Actions have a trigger used to determine when the action should occur. When an event
+  occurs which matches an action's trigger, that action is added to
+  the tail of a to-be-executed queue (unless it is already on the
+  queue).<br />
+  <br />
+  Each action in the queue is dequeued in sequence. Each command in
+  an action is executed in sequence.&nbsp;Init handles other activities
+  (such as, device creation/destruction, property setting, process restarting) &quot;between&quot; the execution of the commands in activities.
+<p>Actions take the form of:</p>
+<pre class="prettify">
+on &lt;trigger&gt;
+&nbsp; &lt;command&gt;
+&nbsp; &lt;command&gt;
+&nbsp; &lt;command&gt;
+</pre>
+<p>Services</p>
+<p>Services are programs that init launches and (optionally) restarts
+when they exit. </p>
+<p>Services take the form of:</p>
+<pre class="prettify">
+  service &lt;name&gt; &lt;pathname&gt; [ &lt;argument&gt; ]*
+&nbsp; &lt;option&gt;
+&nbsp; &lt;option&gt;
+&nbsp; ...
+</pre>
+<p>Options</p>
+  <p> Options are modifiers to services that affect how and when init
+runs a service. Options are described in the table below:</p>
+<table>
+  <tr>
+    <th scope="col">Option</th><th scope="col">Description</th></tr>
+  <tr>
+    <td><code>disabled</code></td>
+    <td>This service will not automatically start with its class. It must be explicitly started by name.</td>
+  </tr>
+  <tr>
+    <td><code>socket &lt;type&gt; &lt;name&gt; &lt;perm&gt; [ &lt;user&gt; [ &lt;group&gt; ] ]</code></td>
+    <td> Create a unix domain socket named <code>/dev/socket/&lt;name&gt;</code> and pass its fd to the launched process. Valid <code>&lt;type&gt;</code> values include <code>dgram</code> and <code>stream</code>. <code>user</code> and <code>group</code> default to 0.</td>
+  </tr>
+  <tr>
+    <td><code>user &lt;username&gt;</code></td>
+    <td>Change to username before exec'ing this service. Currently defaults to root.</td>
+  </tr>
+  <tr>
+    <td><code>group &lt;groupname&gt; [ &lt;groupname&gt; ]*</code></td>
+    <td> Change to groupname before exec'ing this service. &nbsp;Additional&nbsp; groupnames beyond the first, which is required, are used to set additional groups of the process (with <code>setgroups()</code>). Currently defaults to root.</td>
+  </tr>
+  <tr>
+    <td><code>capability [ &lt;capability&gt; ]+</code></td>
+    <td>Set linux capability before exec'ing this service</td>
+  </tr>
+  <tr>
+    <td><code>oneshot</code></td>
+    <td>Do not restart the service when it exits.</td>
+  </tr>
+  <tr>
+    <td><code>class &lt;name&gt;</code></td>
+    <td>Specify a class name for the service. &nbsp;All services in a named class must start and stop together. A service is considered of class &quot;default&quot; if one is not specified via the class option.</td>
+  </tr>
+</table>
+  <p>  Triggers</p>
+  <p>Triggers are strings used to match certain kinds of events that cause an action to occur.  </p>
+  <table>
+    <tr>
+      <th scope="col">Trigger</th>
+      <th scope="col">Description</th>
+    </tr>
+    <tr>
+      <td><code>boot</code></td>
+      <td>This is the first trigger that occurs when init starts (after <code>/init.conf</code> is loaded).</td>
+    </tr>
+    <tr>
+      <td><code>&lt;name&gt;=&lt;value&gt;</code></td>
+      <td>Triggers of this form occur when the property <code>&lt;name&gt;</code> is set to the specific value <code>&lt;value&gt;</code>.</td>
+    </tr>
+    <tr>
+      <td><code>device-added-&lt;path&gt;<br />
+  device-removed-&lt;path&gt;</code></td>
+      <td>Triggers of these forms occur when a device node is added or removed.</td>
+    </tr>
+    <tr>
+      <td><code> service-exited-&lt;name&gt;</code></td>
+      <td>Triggers of this form occur when the specified service exits.</td>
+    </tr>
+  </table>
+  <p><br />
+  Commands</p>
+  <table>
+    <tr>
+      <th scope="col">Command</th>
+      <th scope="col">Description</th>
+    </tr>
+    <tr>
+      <td><code>exec &lt;path&gt; [ &lt;argument&gt; ]*</code></td>
+      <td>Fork and execute a program (<code>&lt;path&gt;</code>). This will block until the program completes execution. Try to avoid exec. Unlike the <code>builtin</code> commands, it runs the risk of getting init &quot;stuck&quot;.</td>
+    </tr>
+    <tr>
+      <td><code>export &lt;name&gt; &lt;value&gt;</code></td>
+      <td>Set the environment variable <code>&lt;name&gt;</code> equal to <code>&lt;value&gt;</code> in the global environment (which will be inherited by all processes started after this command is executed).</td>
+    </tr>
+    <tr>
+      <td><code>ifup &lt;interface&gt;</code></td>
+      <td>Bring the network interface <code>&lt;interface&gt;</code> online.</td>
+    </tr>
+    <tr>
+      <td><code>import &lt;filename&gt;</code></td>
+      <td> Parse an init config file, extending the current configuration.</td>
+    </tr>
+    <tr>
+      <td><code>hostname &lt;name&gt;</code></td>
+      <td>Set the host name.</td>
+    </tr>
+    <tr>
+      <td><code>class_start &lt;serviceclass&gt;</code></td>
+      <td>Start all services of the specified class if they are not already running.</td>
+    </tr>
+    <tr>
+      <td><code>class_stop &lt;serviceclass&gt;</code></td>
+      <td>Stop all services of the specified class if they are currently running.</td>
+    </tr>
+    <tr>
+      <td><code>domainname &lt;name&gt;</code></td>
+      <td>Set the domain name.</td>
+    </tr>
+    <tr>
+      <td><code>insmod &lt;path&gt;</code></td>
+      <td>Install the module at <code>&lt;path&gt;</code>.</td>
+    </tr>
+    <tr>
+      <td><code>mkdir &lt;path&gt;</code></td>
+      <td>Make a directory at <code>&lt;path&gt;</code>.</td>
+    </tr>
+    <tr>
+      <td><code>mount &lt;type&gt; &lt;device&gt; &lt;dir&gt; [ &lt;mountoption&gt; ]*</code></td>
+      <td>Attempt to mount the named device at the directory <code>&lt;dir&gt;</code>         <code>&lt;device&gt;</code>. This may be of the form mtd@name to specify a mtd block device by name.</td>
+    </tr>
+    <tr>
+      <td><code>setkey</code></td>
+      <td>- currenlty undefined - </td>
+    </tr>
+    <tr>
+      <td><code>setprop &lt;name&gt; &lt;value&gt;</code></td>
+      <td>Set system property <code>&lt;name&gt;</code> to <code>&lt;value&gt;</code>.</td>
+    </tr>
+    <tr>
+      <td><code> setrlimit &lt;resource&gt; &lt;cur&gt; &lt;max&gt;</code></td>
+      <td>Set the rlimit for a resource.</td>
+    </tr>
+    <tr>
+      <td><code>start &lt;service&gt;</code></td>
+      <td>Start a service running if it is not already running.</td>
+    </tr>
+    <tr>
+      <td><code> stop &lt;service&gt;</code></td>
+      <td>Stop a service from running if it is currently running.</td>
+    </tr>
+    <tr>
+      <td><code>symlink &lt;target&gt; &lt;path&gt;</code></td>
+      <td>Create a symbolic link at <code>&lt;path&gt;</code> with the value <code>&lt;target&gt;</code>.</td>
+    </tr>
+    <tr>
+      <td><code>write &lt;path&gt; &lt;string&gt; [ &lt;string&gt; ]*</code></td>
+      <td>Open the file at <code>&lt;path&gt;</code> and write one or more strings to it with write(2).</td>
+    </tr>
+  </table>
+  <p>    Properties</p>
+    Init updates some system properties to provide some insight into<br />
+    what it's doing:</p>
+  <table>
+    <tr>
+      <th scope="col">Property</th>
+      <th scope="col">Description</th>
+    </tr>
+    <tr>
+      <td><code>init.action</code></td>
+      <td>Equal to the name of the action currently being executed or &quot;&quot; if none.</td>
+    </tr>
+    <tr>
+      <td><code>init.command</code></td>
+      <td>Equal to the command being executed or &quot;&quot; if none.</td>
+    </tr>
+    <tr>
+      <td><code>init.svc.&lt;name&gt;</code></td>
+      <td>State of a named service (&quot;stopped&quot;, &quot;running&quot;, or &quot;restarting&quot;).</td>
+    </tr>
+  </table>
+  <p>Example init.conf</p>
+  <p>The following snippet is an incomplete example of the <code>init.conf</code> file, simply meant to give you an idea of what a proper configuration resembles.</p>
+  <pre class="prettify">
+on boot
+  export PATH /sbin:/system/sbin:/system/bin
+  export LD_LIBRARY_PATH /system/lib
+
+  mkdir /dev
+  mkdir /proc
+  mkdir /sys
+
+
+  mount tmpfs tmpfs /dev
+  mkdir /dev/pts
+  mkdir /dev/socket
+  mount devpts devpts /dev/pts
+  mount proc proc /proc
+  mount sysfs sysfs /sys
+
+
+  write /proc/cpu/alignment 4
+
+
+  ifup lo
+
+
+  hostname localhost
+  domainname localhost
+
+
+  mount yaffs2 mtd@system /system
+  mount yaffs2 mtd@userdata /data
+
+
+  import /system/etc/init.conf
+
+
+  class_start default
+
+
+service adbd /sbin/adbd
+  user adb
+  group adb
+
+
+service usbd /system/bin/usbd -r
+  user usbd
+  group usbd
+  socket usbd 666
+
+
+service zygote /system/bin/app_process -Xzygote /system/bin --zygote
+  socket zygote 666
+
+
+service runtime /system/bin/runtime
+  user system
+  group system
+
+
+on device-added-/dev/compass
+  start akmd
+
+
+on device-removed-/dev/compass
+  stop akmd
+
+
+service akmd /sbin/akmd
+  disabled
+  user akmd
+  group akmd
+</pre>
\ No newline at end of file
diff --git a/pdk/docs/guide/build_new_device.jd b/pdk/docs/guide/build_new_device.jd
new file mode 100755
index 0000000..21105d9
--- /dev/null
+++ b/pdk/docs/guide/build_new_device.jd
@@ -0,0 +1,130 @@
+page.title=Building Android for a new Mobile Device
+pdk.version=1.0
+@jd:body
+
+
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidOHDPortingDeviceBuildingProcess">Detailed Instructions</a><br/>
+<a href="#androidBuildNewFileTree">New Product File Tree</a><br/></div></font></div>
+
+<a name="androidOHDPortingDeviceBuildingProcess"></a><h2>Detailed Instructions</h2>
+
+<p>The directions below describe how to configure make files for new mobile devices and products.</p>
+<ol>
+  <li>Create a company directory in <code>//device/partner</code>.<br/>
+  <pre class="prettyprint">
+  mkdir device/partner/&lt;company_name&gt;</pre></li>
+  <li>Create a <code>products</code> directory beneath the company directory you created in step 1.<BR>
+  <pre class="prettyprint">
+  mkdir device/partner/&lt;company_name&gt;/products/</pre></li>
+  <li>Create a product-specific make file, called <code>device/partner/&lt;company_name&gt;/products/&lt;first_product_name&gt;.mk</code>, that includes the following code:<BR>
+    <pre class="prettyprint">
+  $(call inherit-product, target/product/generic.mk)
+  #
+  # Overrides
+  PRODUCT_NAME := &lt;first_product_name&gt;
+  PRODUCT_DEVICE := &lt;board_name&gt;</pre></li>  
+  <li>In the <code>products</code> directory, create an <code>AndroidProducts.mk</code> file that point to (and is responsible for finding) the individual product make files.<BR>
+  <pre class="prettypring">
+  #
+  # This file should set PRODUCT_MAKEFILES to a list of product makefiles
+  # to expose to the build system.  LOCAL_DIR will already be set to
+  # the directory containing this file. 
+  #
+  # This file may not rely on the value of any variable other than
+  # LOCAL_DIR; do not use any conditionals, and do not look up the
+  # value of any variable that isn't set in this file or in a file that
+  # it includes.
+  #
+  
+  PRODUCT_MAKEFILES := \
+    $(LOCAL_DIR)/first_product_name.mk \</pre></li>
+  <li>Create a board-specific directory beneath your company directory that matches the <code>PRODUCT_DEVICE</code> variable <code>&lt;board_name&gt;</code> referenced in the product-specific make file above. This will include a make file that gets accessed by any product using this board.<BR>
+  <pre class="prettyprint">
+  mkdir device/partner/&lt;company_name&gt;/&lt;board_name&gt;</pre></li>
+    <li>Create a <code>product_config.mk</code> file in the directory created in the previous step (<code>device/partner/&lt;company_name&gt;/&lt;board_name&gt;</code>). If this directory does not include a <code>product_config.mk</code> file, the build will fail.<BR>
+  <pre class="prettyprint">
+  # These definitions override the defaults in config/config.make for &lt;board_name&gt;
+  #
+  # TARGET_NO_BOOTLOADER := false
+  # TARGET_HARDWARE_3D := false 
+  #
+  TARGET_USE_GENERIC_AUDIO := true</pre></li>  
+  <li>If you wish to modify system properties, create a <code>system.prop</code> file in your <code>&lt;board_name&gt;</code> directory(<code>device/partner/&lt;company_name&gt;/&lt;board_name&gt;</code>).<BR>
+  <pre class="prettyprint">
+  # system.prop for <board_name>
+  # This overrides settings in the products/generic/system.prop file
+  #
+  # rild.libpath=/system/lib/libreference-ril.so
+  # rild.libargs=-d /dev/ttyS0</pre></li>   
+  <li>Add a pointer to <code>&lt;second_product_name&gt;.mk</code> within <code>products/AndroidProducts.mk</code>.<BR>
+  <pre class="prettypring">
+  PRODUCT_MAKEFILES := \
+    $(LOCAL_DIR)/first_product_name.mk \
+    $(LOCAL_DIR)/second_product_name.mk</pre></li>
+  <li><code>device/partner/&lt;company_name&gt;/&lt;board_name&gt;</code> must include an <code>Android.mk</code> file with at least the following code:<BR><BR>
+  <pre class="prettyprint">
+  # make file for new hardware <board_name> from <company_name>
+  #
+  LOCAL_PATH := $(call my-dir)
+  #
+  # this is here to use the pre-built kernel
+  ifeq ($(TARGET_PREBUILT_KERNEL),)
+  TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel
+  endif
+  #
+  file := $(INSTALLED_KERNEL_TARGET)
+  ALL_PREBUILT += $(file)
+  $(file): $(TARGET_PREBUILT_KERNEL) | $(ACP)
+		$(transform-prebuilt-to-target)
+  #
+  # no boot loader, so we don't need any of that stuff..  
+  #
+  LOCAL_PATH := partner/&lt;company_name&gt;/&lt;board_name&gt;
+  #
+  include $(CLEAR_VARS)
+  #
+  # include more board specific stuff here? Such as Audio parameters.      
+  #</pre></li>
+<li>To create a second product for the same board, create a second product-specific make file called <code>device/partner/company_name/products/&lt;second_product_name&gt;.mk</code> that includes:<BR>
+<pre class="prettyprint">
+  $(call inherit-product, partner/google/products/generic.mk)
+  #
+  # Overrides
+  PRODUCT_NAME := &lt;second_product_name&gt;
+  PRODUCT_DEVICE := &lt;board_name&gt;</pre></li>   	
+</ol>
+<p>By now, you should have two new products, called <code>&lt;first_product_name&gt;</code> and <code>&lt;second_product_name&gt;</code> associated with <code>&lt;company_name&gt;</code>. To verify that a product is properly configured (<code>&lt;first_product_name&gt;</code>, for example), execute the following:<BR>
+<pre class="prettyprint">
+  cd device
+  . ./envsetup.sh
+  partner_setup &lt;first_product_name&gt;
+  make PRODUCT-&lt;first_product_name&gt;-user
+</pre>
+<p>You should find new build binaries located in <code>device/out/target/product/&lt;board_name&gt;</code>.
+
+
+<a name="androidBuildNewFileTree"></a><h2>New Product File Tree</h2>
+
+<p>The file tree below illustrates what your own system should look like after completing the steps above.</p>
+<p>
+<ul>
+  <li><code>&lt;company_name&gt;</code></li>
+  <ul>
+    <li><code>&lt;board_name&gt;</code></li>
+    <ul>
+      <li><code>Android.mk</code></li>
+      <li><code>product_config.mk</code></li>
+      <li><code>system.prop</code></li>
+    </ul>
+    <li><code>products</code></li>
+    <ul>
+      <li><code>AndroidProducts.mk</code></li>
+      <li><code>&lt;first_product_name&gt;.mk</code></li>
+      <li><code>&lt;second_product_name&gt;.mk</code></li>
+    </ul>
+  </ul>
+</ul>
+</p>
\ No newline at end of file
diff --git a/pdk/docs/guide/build_system.jd b/pdk/docs/guide/build_system.jd
new file mode 100755
index 0000000..b63248b
--- /dev/null
+++ b/pdk/docs/guide/build_system.jd
@@ -0,0 +1,254 @@
+page.title=Android Build System
+pdk.version=1.0
+@jd:body
+
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidBuildSystemIntroduction">Introduction</a><br/>
+<a href="#androidBuildSystemUnderstanding">Understanding Android's Build System</a><br/><div style="padding-left:40px">
+
+<a href="#androidBuildSystemOverview">Understanding the makefile</a><br/>
+<a href="#androidBuildSystemLayers">Layers</a><br/>
+<a href="#androidBuildSystemProductDefFiles">Product Definition Files</a><br/></div>
+<a href="#androidSourceSetupBuildingCodeBase">Building the Android Platform</a><br/><div style="padding-left:40px">
+
+<a href="#androidSourceSetupBuildingDeviceCodeBase">Device Code</a><br/>
+<a href="#androidBuildingCleaning">Cleaning Up</a><br/>
+<a href="#androidBuildingSpeeding">Speeding Up Rebuilds</a><br/>
+<a href="#androidBuildingTroubleshooting">Troubleshooting</a><br/></div>
+<a href="#androidSourceSetupBuildingKernel">Building the Android Kernel</a><br/><div style="padding-left:40px">
+
+<a href="#androidSourceSetupBuildingKernelCheckingBranch">Checking Out a Branch</a><br/>
+<a href="#androidSourceSetupBuildingKernelBranchLocation">Verifying Location</a><br/>
+<a href="#androidSourceSetupBuildingKernelBuild">Building the Kernel</a><br/></div></div></font>
+
+<a name="androidBuildSystemIntroduction"></a><h2>Introduction</h2>
+
+<p>Android uses a custom build system to generate tools, binaries, and documentation. This document provides an overview of Android's build system and instructions for doing a simple build. </p>
+<p>Android's build system is make based and requires a recent version of GNU Make (note that Android uses advanced features of GNU Make that may not yet appear on the GNU Make web site). Before continuing, check your version of make by running <code>% make -v</code>. If you don't have version 3.80 or greater, you need to <a href="http://www.gnu.org/software/make/">upgrade your version of make</a>. </p>
+
+
+<a name="androidBuildSystemUnderstanding"></a><h2>Understanding Android's Build System</h2>
+
+
+
+<a name="androidBuildSystemOverview"></a><h3>Understanding the makefile</h3>
+
+<p>A makefile defines how to build a particular application. Makefiles typically include all of the following elements:</p>
+<ol>
+  <li>Name: Give your build a name (<code>LOCAL_MODULE := &lt;build_name&gt;</code>).</li>
+  <li>Local Variables: Clear local variables with CLEAR_VARS  (<code>include $(CLEAR_VARS)</code>).</li>
+  <li>Files: Determine which files your application depends upon (<code>LOCAL_SRC_FILES := main.c</code>).</li>
+  <li>Tags: Define tags, as necessary (<code>LOCAL_MODULE_TAGS := eng development</code>).</li>
+  <li>Libraries: Define whether your application links with other libraries (<code>LOCAL_SHARED_LIBRARIES := cutils</code>).</li>
+  <li>Template file: Include a template file to define underlining make tools for a particular target (<code>include $(BUILD_EXECUTABLE)</code>).</li>
+</ol>
+
+<p>The following snippet illustrates a typical makefile.</p>
+<pre class="prettyprint">
+LOCAL_PATH := $(my-dir)
+include $(CLEAR_VARS)
+LOCAL_MODULE := &lt;buil_name&gt;
+LOCAL_SRC_FILES := main.c
+LOCAL_MODULE_TAGS := eng development
+LOCAL_SHARED_LIBRARIES := cutils
+include $(BUILD_EXECUTABLE)
+(HOST_)EXECUTABLE, (HOST_)JAVA_LIBRARY, (HOST_)PREBUILT, (HOST_)SHARED_LIBRARY,
+  (HOST_)STATIC_LIBRARY, PACKAGE, JAVADOC, RAW_EXECUTABLE, RAW_STATIC_LIBRARY,
+  COPY_HEADERS, KEY_CHAR_MAP
+</pre>
+<p>The snippet above includes artificial line breaks to maintain a print-friendly document.</p>
+
+
+<a name="androidBuildSystemLayers"></a><h3>Layers</h3>
+
+<p>The build hierarchy includes the abstraction layers described in the table below.</p>
+
+<p>Each layer relates to the one above it in a one-to-many relationship. For example, an arch can have more than one board and each board can have more than one device. You may define an element in a given layer as a specialization of an element in the same layer, thus eliminating copying and simplifying maintenance.</p>
+ 
+<table border=1 cellpadding=2 cellspacing=0>
+ <tbody><tr>
+  <th scope="col">Layer</th>
+  <th  scope="col">Example</th>
+  <th  scope="col">Description</th>
+ </tr>
+  <tr>
+    <td valign="top">Product</td>
+    <td valign="top">myProduct, myProduct_eu, myProduct_eu_fr, j2, sdk</td>
+    <td valign="top">The product layer defines a complete specification of a shipping product, defining which modules to build and how to configure them. You might offer a device in several different versions based on locale, for example, or on features such as a camera. </td>
+  </tr>
+  <tr>
+    <td valign="top">Device</td>
+    <td valign="top">myDevice, myDevice_eu, myDevice_eu_lite</td>
+    <td valign="top">The device layer represents the physical layer of plastic on the device. For example, North American devices probably include QWERTY keyboards whereas devices sold in France probably include AZERTY keyboards. Peripherals typically connect to the device layer. </td>
+  </tr>
+  <tr>
+    <td valign="top">Board</td>
+    <td valign="top">sardine, trout, goldfish </td>
+    <td valign="top">The board layer represents the bare schematics of a product. You may still connect peripherals to the board layer. </td>
+  </tr>
+  <tr>
+    <td valign="top">Arch</td>
+    <td valign="top">arm (arm5te) (arm6), x86, 68k </td>
+    <td valign="top">The arch layer describes the processor running on your board. </td>
+  </tr>
+</table>
+
+
+<a name="androidBuildSystemProductDefFiles"></a><h3>Product Definition Files</h3>
+
+<p>Product-specific variables are defined in product definition files. A product definition file can inherit from other product definition files, thus reducing the need to copy and simplifying maintenance.</p>
+<p>Variables maintained in a product definition files include:</p>
+<p><ul>
+<li><code>PRODUCT_DEVICE</code></LI>
+<LI><code>LOCALES</code></LI>
+<LI><code>BRANDING_PARTNER</code></LI>
+<LI><code>PROPERTY_OVERRIDES</code></LI>
+</UL>
+</P>
+<p>The snippet below illustrates a typical product definition file.</p>
+<PRE class="prettyprint">
+//device/target/product/core.mk
+PRODUCT_PACKAGES := Home SettingsProvider ...
+//device/target/product/generic.mk
+PRODUCT_PACKAGES := Calendar Camera SyncProvider ...
+$(call inherit-product, target/product/core.mk)
+PRODUCT_NAME := generic
+//device/partner/google/products/core.mk
+PRODUCT_PACKAGES := Maps GoogleAppsProvider ...
+$(call inherit-product, target/product/core.mk)
+//device/partner/google/products/generic.mk
+PRODUCT_PACKAGES := Gmail GmailProvider ...
+$(call inherit-product, partner/google/products/core.mk)
+$(call inherit-product, target/product/generic.mk)
+PRODUCT_NAME := google_generic
+
+</pre>
+
+
+<a name="androidSourceSetupBuildingCodeBase"></a><h2>Building the Android Platform</h2>
+
+<p>This section describes how to build the default version of Android. Once you are comfortable with a generic build, then you can begin to modify Android for your own target device.</p>
+
+
+<a name="androidSourceSetupBuildingDeviceCodeBase"></a><h3>Device Code</h3>
+
+<p>Of the two options below, the first tends to yield more consistent results.</p>
+
+
+<a name="androidSourceSetupBuildingDeviceCodeBaseOption2"></a><h4>Option 1</h4>
+
+<p>Create a local version of buildspec.mk. The easiest way to do so is to change to your device directory and execute the following:</p>
+<pre class="prettyprint">% cp buildspec.mk.default buildspec.mk ; chmod u=rw buildspec.mk</pre>
+<p>The default <code>buildspec.mk</code>. file is written so that all options appear commented. In order to establish a personal configuration environment, edit <code>buildspec.mk</code> as desired.</p>
+<p>Once you have established your configuration environment, you can build the device code base by executing make in order to build the Android binaries. This may take a long time the first time you issue this command. On a dual-core machine, consider using '-j2' (or even '-j4') to speed up the build.</p>
+<pre class="prettyprint">% make -j2</pre>
+
+
+<a name="androidSourceSetupBuildingDeviceCodeBaseOption1"></a><h4>Option 2</h4>
+
+<p>To do a generic build of android, source <code>//device/envsetup.sh</code>, which contains necessary variable and function definitions, as described below.</p>
+<pre class="prettyprint">
+% cd $TOP
+
+% . envsetup.sh
+
+% partner_setup generic
+   //select generic as the product
+
+% make -j4 PRODUCT-generic-user
+</pre>
+<p>You can also replace user with eng for a debug engineering build:</p>
+
+<pre class="prettyprint">
+% make -j4 PRODUCT-generic-eng
+</pre>
+
+
+<a name="androidBuildingCleaning"></a><h3>Cleaning Up</h3>
+
+<p>Execute <code>% m clean</code> to clean up the binaries you just created. You can also execute <code>% m clobber</code> to get rid of the binaries of all combos. <code>% m clobber</code> is equivalent to removing the <code>//device/out/</code> directory where all generated files are stored.</p>
+
+
+<a name="androidBuildingSpeeding"></a><h3>Speeding Up Rebuilds</h3>
+
+<p> The binaries of each combo are stored as distinct sub-directories of <code>//device/out/</code>, making it possible to quickly switch between combos without having to recompile all sources each time. </p>
+<p> However, performing a clean rebuild is necessary if the build system doesn't catch changes to environment variables or makefiles. If this happens often, you should define the <code>USE_CCACHE</code> environment variable as shown below: </p>
+<pre class="prettyprint">
+% export USE_CCACHE=1
+</pre>
+<p>Doing so will force the build system to use the ccache compiler cache tool, which reduces recompiling all sources.</p>
+
+<p><code>ccache</code> binaries are provided in <code>//device/prebuilt/...</code> and don't need to get installed on your system.</p>
+
+
+<a name="androidBuildingTroubleshooting"></a><h3>Troubleshooting</h3>
+
+<p>The following error is likely caused by running an outdated version of Java.</p>
+<pre class="prettyprint">
+device Dex: core  UNEXPECTED TOP-LEVEL ERROR:
+java.lang.NoSuchMethodError: method java.util.Arrays.hashCode with
+signature ([Ljava.lang.Object;)I was not found.
+  at com.google.util.FixedSizeList.hashCode(FixedSizeList.java:66)
+  at com.google.rop.code.Rop.hashCode(Rop.java:245)
+  at java.util.HashMap.hash(libgcj.so.7)
+[...]
+</pre>
+<p><code>dx</code> is a Java program that uses facilities first made available in Java version 1.5. Check your version of Java by executing <code>% java -version</code> in the shell you use to build. You should see something like:</p>
+<pre class="prettyprint">
+java version "1.5.0_07"
+Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
+Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
+</pre>
+<p>If you do have Java 1.5 or later and your receive this error, verify that you have properly updated your <code>PATH</code> variable.</p>
+
+
+<a name="androidSourceSetupBuildingKernel"></a><h2>Building the Android Kernel</h2>
+
+<p>This section describes how to build Android's default kernel. Once you are comfortable with a generic build, then you can begin to modify Android drivers for your own target device.</p>
+
+
+<p>To build the kernel base, switch to the device directory (<code>/home/joe/android/device</code>) in order to establish variables and run:
+<pre class="prettyprint">
+% . envsetup.sh
+% partner_setup generic
+</pre>
+<p>Then switch to the kernel directory <code>/home/joe/android/kernel</code>.
+
+
+<a name="androidSourceSetupBuildingKernelCheckingBranch"></a><h3>Checking Out a Branch</h3>
+
+<p>The default branch is always <code>android</code>. To check out a different branch, execute the following:</p>
+
+<pre class="prettyprint">
+% git checkout --track -b android-mydevice origin/android-mydevice
+  //Branch android-mydevice set up to track remote branch
+% refs/remotes/origin/android-mydevice.
+  //Switched to a new branch "android-mydevice"
+</pre>
+
+<p>To simplify code management, give your local branch the same name as the remote branch it is tracking (as illustrated in the snippet above). Switch between branches by executing <code>% git checkout &lt;branchname&gt;</code>.</p>
+
+
+<a name="androidSourceSetupBuildingKernelBranchLocation"></a><h3>Verifying Location</h3>
+
+<p>Find out which branches exist (both locally and remotely) and which one is active (marked with an asterisk) by executing the following:</p>
+<pre class="prettyprint">
+% git branch -a
+  android
+* android-mydevice
+  origin/HEAD
+  origin/android
+  origin/android-mydevice
+  origin/android-mychipset
+</pre>
+<p>To only see local branches, omit the <code>-a</code> flag.</p> 
+
+
+<a name="androidSourceSetupBuildingKernelBuild"></a><h3>Building the Kernel</h3>
+
+<p>To build the kernel, execute:</p>
+<pre class="prettyprint">
+% make -j4
+</pre>
\ No newline at end of file
diff --git a/pdk/docs/guide/camera.jd b/pdk/docs/guide/camera.jd
new file mode 100755
index 0000000..204c070
--- /dev/null
+++ b/pdk/docs/guide/camera.jd
@@ -0,0 +1,75 @@
+page.title=Camera
+pdk.version=1.0
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidCameraIntroduction">Introduction</a><br/>
+<a href="#androidCameraBuildingDriver">Building a Camera Library</a><br/>
+<a href="#androidCameraSequenceDiagrams">Sequence Diagrams</a><br/><div style="padding-left:40px">
+
+<a href="#androidCameraSequenceDiagramsPreview">Preview</a><br/>
+<a href="#androidCameraSequenceDiagramsTakePic">Taking a Picture</a><br/></div>
+<a href="#androidCameraInterfaceIntro">Interface</a><br/></div></font></div>
+
+<a name="androidCameraIntroduction"></a><h2>Introduction</h2>
+
+<p>Android's camera subsystem connects the camera application to the application framework and user space libraries, which in turn communicate with the camera hardware layer that operates the physical camera.</p>
+<p>The diagram below illustrates the structure of the camera subsystem.</p>
+<p><img src="images/androidCameraArchitecture.gif"></p>
+
+
+<a name="androidCameraBuildingDriver"></a><h2>Building a Camera Library</h2>
+
+<p>To implement a camera driver, create a shared library that implements the interface defined in <code>CameraHardwareInterface.h</code>. You must name your shared library <code>libcamera.so</code> so that it will get loaded from <code>/system/lib</code> at runtime.  Place libcamera sources and <code>Android.mk</code> in <code>partner/acme/chipset_or_board/libcamera/</code>.</p>
+<p>The following stub <code>Android.mk</code> file ensures that <code>libcamera</code> compiles and links to the appropriate libraries:</p>
+<pre class="prettify">
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libcamera
+
+LOCAL_SHARED_LIBRARIES := \
+    libutils \
+    librpc \
+    liblog
+
+LOCAL_SRC_FILES += MyCameraHardware.cpp
+
+LOCAL_CFLAGS +=
+
+LOCAL_C_INCLUDES +=
+
+LOCAL_STATIC_LIBRARIES += \
+    libcamera-common \
+    libclock-rpc \
+    libcommondefs-rpc
+
+include $(BUILD_SHARED_LIBRARY)
+</pre>
+
+
+<a name="androidCameraSequenceDiagrams"></a><h2>Sequence Diagrams</h2>
+
+
+
+<a name="androidCameraSequenceDiagramsPreview"></a><h3>Preview</h3>
+
+<p>The following diagram illustrates the sequence of function calls and actions necessary for your camera to preview.</p>
+<img src="images/cameraPreview.jpg">
+
+
+<a name="androidCameraSequenceDiagramsTakePic"></a><h3>Taking a Picture</h3>
+
+<p>The following diagram illustrates the sequence of function calls and actions necessary for your camera to take a picture.</p>
+<img src="images/cameraTakePicture.jpg">
+
+
+<a name="androidCameraInterfaceIntro"></a><h2>Interface</h2>
+
+
+
+<p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="camera.html">click here</a>.</p>
+
+
+<iframe onLoad="resizeDoxFrameHeight();" src="CameraHardwareInterface_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
diff --git a/pdk/docs/guide/display_drivers.jd b/pdk/docs/guide/display_drivers.jd
new file mode 100755
index 0000000..0f0bba5
--- /dev/null
+++ b/pdk/docs/guide/display_drivers.jd
@@ -0,0 +1,341 @@
+page.title=Display Drivers
+pdk.version=1.0
+@jd:body
+
+
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidDisplayDriverIntroduction">Introduction</a><br/>
+<a href="#androidDisplayDriverFunctionality">Functionality</a><br/>
+<a href="#androidDisplayDriversSourceTemplate">Implementing Your Own Driver (Driver Template)</a><br/>
+<a href="#androidDisplayDriversTroubleshooting">Troubleshooting</a><br/></div></font></div>
+
+<a name="androidDisplayDriverIntroduction"></a><h2>Introduction</h2>
+
+<p>This section describes how the display driver functions and offers a functional template designed to help you build your own device-specific driver.</p>
+<p>Android relies on the standard frame buffer device (<code>/dev/fb0</code> or <code>/dev/graphics/fb0</code>) and driver as described in the <code>linux/fb.h</code> kernel header file. For more information regarding the standard Linux frame buffer, please see <a href="http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.24.y.git;a=blob;f=Documentation/fb/framebuffer.txt">The Frame Buffer Device</a> at <a href="http://kernel.org">http://kernel.org</a>.
+
+
+<a name="androidDisplayDriverFunctionality"></a><h2>Functionality</h2>
+
+<p>In Android, every window gets implemented with an underlying Surface object, an object that gets placed on the framebuffer by SurfaceFlinger, the system-wide screen composer. Each Surface is double-buffered. The back buffer is where drawing takes place and the front buffer is used for composition. </p>
+<p> When <code>unlockCanvas()</code> is called, the back buffer is posted, which 
+  means that it gets displayed and &nbsp;becomes available again. Android flips the front and back buffers, ensuring a minimal amount of buffer copying and that there is always a buffer for SurfaceFlinger to use for composition (which ensures that the screen never flickers or shows artifacts).</p>
+<p>Android makes two requirements of the driver: a linear address space of mappable memory that it can write to directly and support for the rgb_565 pixel format. A typical frame display includes:</p>
+<ul>
+  <li>accessing the driver by calling open on <code>/dev/fb0</code></li>
+  <li>using the <code>FBIOGET_FSCREENINFO</code> and <code>FBIOGET_VSCREENINFO</code> Input / Output Control (ioctl) calls to retrieve information about the screen</li>
+  <li>using <code>FBIOPUT_VSCREENINFO</code> ioctl to attempt to create a virtual display twice the size of the physical screen and to set the pixel format to rgb_565. If this succeeds, double buffering is accomplished with video memory. </li>
+</ul>
+<p>When a page flip is required, Android makes another <code>FBIOPUT_VSCREENINFO</code> ioctl call with a new y-offset pointing to the other buffer in video memory.  This ioctl, in turn, invokes the driver's <code>.fb_pan_display</code> function in order to do the actual flip. If there isn't sufficient video memory, regular memory is used and is just copied into the video memory when it is time do the flip. After allocating the video memory and setting the pixel format, Android  uses <code>mmap()</code> to map the memory into the process's address space.  All writes to the frame buffer are done through this mmaped memory.</p>
+<p>To maintain adequate performance, framebuffer memory should be cacheable. If you use write-back, flush the cache before the frame buffer is written from DMA to the LCD. If that isn't possible, you may use write-through. As a last resort, you can also use uncached memory with the write-bugger enabled, but performance will suffer.</p>
+
+
+<a name="androidDisplayDriversSourceTemplate"></a><h2>Implementing Your Own Driver (Driver Template)</h2>
+
+<p>The following sample driver offers a functional example to help you build your own display driver. Modify <code>PGUIDE_FB...</code> macros as desired to match the requirements of your own device hardware.</p>
+<pre class="prettyprint">
+/*
+ *  pguidefb.c
+ * 
+ *  Copyright 2007, Google Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+
+/*
+ * ANDROID PORTING GUIDE: FRAME BUFFER DRIVER TEMPLATE
+ *
+ * This template is designed to provide the minimum frame buffer
+ * functionality necessary for Android to display properly on a new
+ * device.  The PGUIDE_FB macros are meant as pointers indicating
+ * where to implement the hardware specific code necessary for the new
+ * device.  The existence of the macros is not meant to trivialize the
+ * work required, just as an indication of where the work needs to be
+ * done.
+ */
+
+#include &lt;linux/module.h&gt;
+#include &lt;linux/kernel.h&gt;
+#include &lt;linux/errno.h&gt;
+#include &lt;linux/string.h&gt;
+#include &lt;linux/slab.h&gt;
+#include &lt;linux/delay.h&gt;
+#include &lt;linux/mm.h&gt;
+#include &lt;linux/fb.h&gt;
+#include &lt;linux/init.h&gt;
+#include &lt;linux/platform_device.h&gt;
+
+
+/* Android currently only uses rgb565 in the hardware framebuffer */
+#define ANDROID_BYTES_PER_PIXEL 2
+
+/* Android will use double buffer in video if there is enough */
+#define ANDROID_NUMBER_OF_BUFFERS 2
+
+/* Modify these macros to suit the hardware */
+
+#define PGUIDE_FB_ROTATE 
+	/* Do what is necessary to cause the rotation */
+
+#define PGUIDE_FB_PAN 
+	/* Do what is necessary to cause the panning */
+
+#define PGUIDE_FB_PROBE_FIRST 
+	/* Do any early hardware initialization */
+
+#define PGUIDE_FB_PROBE_SECOND
+	/* Do any later hardware initialization */
+
+#define PGUIDE_FB_WIDTH 320
+	/* Return the width of the screen */
+
+#define PGUIDE_FB_HEIGHT 240
+	/* Return the heighth of the screen */
+
+#define PGUIDE_FB_SCREEN_BASE 0
+	/* Return the virtual address of the start of fb memory */
+
+#define PGUIDE_FB_SMEM_START PGUIDE_FB_SCREEN_BASE
+	/* Return the physical address of the start of fb memory */
+
+#define PGUIDE_FB_REMOVE 
+	/* Do any hardware shutdown */
+
+
+
+
+
+struct pguide_fb {
+	int rotation;
+	struct fb_info fb;
+	u32			cmap[16];
+};
+
+static inline u32 convert_bitfield(int val, struct fb_bitfield *bf)
+{
+	unsigned int mask = (1 << bf->length) - 1;
+
+	return (val >> (16 - bf->length) & mask) << bf->offset;
+}
+
+
+/* set the software color map.  Probably doesn't need modifying. */
+static int
+pguide_fb_setcolreg(unsigned int regno, unsigned int red, unsigned int green,
+		 unsigned int blue, unsigned int transp, struct fb_info *info)
+{
+        struct pguide_fb  *fb = container_of(info, struct pguide_fb, fb);
+
+	if (regno < 16) {
+		fb->cmap[regno] = convert_bitfield(transp, &fb->fb.var.transp) |
+				  convert_bitfield(blue, &fb->fb.var.blue) |
+				  convert_bitfield(green, &fb->fb.var.green) |
+				  convert_bitfield(red, &fb->fb.var.red);
+		return 0;
+	}
+	else {
+		return 1;
+	}
+}
+
+/* check var to see if supported by this device.  Probably doesn't
+ * need modifying.
+ */
+static int pguide_fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+{
+	if((var->rotate & 1) != (info->var.rotate & 1)) {
+		if((var->xres != info->var.yres) ||
+		   (var->yres != info->var.xres) ||
+		   (var->xres_virtual != info->var.yres) ||
+		   (var->yres_virtual > 
+		    info->var.xres * ANDROID_NUMBER_OF_BUFFERS) ||
+		   (var->yres_virtual < info->var.xres )) {
+			return -EINVAL;
+		}
+	}
+	else {
+		if((var->xres != info->var.xres) ||
+		   (var->yres != info->var.yres) ||
+		   (var->xres_virtual != info->var.xres) ||
+		   (var->yres_virtual > 
+		    info->var.yres * ANDROID_NUMBER_OF_BUFFERS) ||
+		   (var->yres_virtual < info->var.yres )) {
+			return -EINVAL;
+		}
+	}
+	if((var->xoffset != info->var.xoffset) ||
+	   (var->bits_per_pixel != info->var.bits_per_pixel) ||
+	   (var->grayscale != info->var.grayscale)) {
+		return -EINVAL;
+	}
+	return 0;
+}
+
+
+/* Handles screen rotation if device supports it. */
+static int pguide_fb_set_par(struct fb_info *info)
+{
+	struct pguide_fb *fb = container_of(info, struct pguide_fb, fb);
+	if(fb->rotation != fb->fb.var.rotate) {
+		info->fix.line_length = 
+		  info->var.xres * ANDROID_BYTES_PER_PIXEL;
+		fb->rotation = fb->fb.var.rotate;
+		PGUIDE_FB_ROTATE;
+	}
+	return 0;
+}
+
+
+/* Pan the display if device supports it. */
+static int pguide_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
+{
+	struct pguide_fb *fb    __attribute__ ((unused)) 
+	    = container_of(info, struct pguide_fb, fb);
+
+	/* Set the frame buffer base to something like:
+	   fb->fb.fix.smem_start + fb->fb.var.xres * 
+	   ANDROID_BYTES_PER_PIXEL * var->yoffset
+	*/
+	PGUIDE_FB_PAN;
+
+	return 0;
+}
+
+
+static struct fb_ops pguide_fb_ops = {
+	.owner          = THIS_MODULE,
+	.fb_check_var   = pguide_fb_check_var,
+	.fb_set_par     = pguide_fb_set_par,
+	.fb_setcolreg   = pguide_fb_setcolreg,
+	.fb_pan_display = pguide_fb_pan_display,
+
+	/* These are generic software based fb functions */
+	.fb_fillrect    = cfb_fillrect,
+	.fb_copyarea    = cfb_copyarea,
+	.fb_imageblit   = cfb_imageblit,
+};
+
+
+static int pguide_fb_probe(struct platform_device *pdev)
+{
+	int ret;
+	struct pguide_fb *fb;
+	size_t framesize;
+	uint32_t width, height;
+
+	fb = kzalloc(sizeof(*fb), GFP_KERNEL);
+	if(fb == NULL) {
+		ret = -ENOMEM;
+		goto err_fb_alloc_failed;
+	}
+	platform_set_drvdata(pdev, fb);
+
+	PGUIDE_FB_PROBE_FIRST;
+	width = PGUIDE_FB_WIDTH;
+	height = PGUIDE_FB_HEIGHT;
+
+
+	fb->fb.fbops		= &pguide_fb_ops;
+
+	/* These modes are the ones currently required by Android */
+
+	fb->fb.flags		= FBINFO_FLAG_DEFAULT;
+	fb->fb.pseudo_palette	= fb->cmap;
+	fb->fb.fix.type		= FB_TYPE_PACKED_PIXELS;
+	fb->fb.fix.visual = FB_VISUAL_TRUECOLOR;
+	fb->fb.fix.line_length = width * ANDROID_BYTES_PER_PIXEL;
+	fb->fb.fix.accel	= FB_ACCEL_NONE;
+	fb->fb.fix.ypanstep = 1;
+
+	fb->fb.var.xres		= width;
+	fb->fb.var.yres		= height;
+	fb->fb.var.xres_virtual	= width;
+	fb->fb.var.yres_virtual	= height * ANDROID_NUMBER_OF_BUFFERS;
+	fb->fb.var.bits_per_pixel = 16;
+	fb->fb.var.activate	= FB_ACTIVATE_NOW;
+	fb->fb.var.height	= height;
+	fb->fb.var.width	= width;
+
+	fb->fb.var.red.offset = 11;
+	fb->fb.var.red.length = 5;
+	fb->fb.var.green.offset = 5;
+	fb->fb.var.green.length = 6;
+	fb->fb.var.blue.offset = 0;
+	fb->fb.var.blue.length = 5;
+
+	framesize = width * height * 
+	  ANDROID_BYTES_PER_PIXEL * ANDROID_NUMBER_OF_BUFFERS;
+	fb->fb.screen_base = PGUIDE_FB_SCREEN_BASE;
+	fb->fb.fix.smem_start = PGUIDE_FB_SMEM_START;
+	fb->fb.fix.smem_len = framesize;
+
+	ret = fb_set_var(&fb->fb, &fb->fb.var);
+	if(ret)
+		goto err_fb_set_var_failed;
+
+	PGUIDE_FB_PROBE_SECOND;
+
+	ret = register_framebuffer(&fb->fb);
+	if(ret)
+		goto err_register_framebuffer_failed;
+
+	return 0;
+
+
+err_register_framebuffer_failed:
+err_fb_set_var_failed:
+	kfree(fb);
+err_fb_alloc_failed:
+	return ret;
+}
+
+static int pguide_fb_remove(struct platform_device *pdev)
+{
+	struct pguide_fb *fb = platform_get_drvdata(pdev);
+
+	PGUIDE_FB_REMOVE;
+
+	kfree(fb);
+	return 0;
+}
+
+
+static struct platform_driver pguide_fb_driver = {
+	.probe		= pguide_fb_probe,
+	.remove		= pguide_fb_remove,
+	.driver = {
+		.name = "pguide_fb"
+	}
+};
+
+static int __init pguide_fb_init(void)
+{
+	return platform_driver_register(&pguide_fb_driver);
+}
+
+static void __exit pguide_fb_exit(void)
+{
+	platform_driver_unregister(&pguide_fb_driver);
+}
+
+module_init(pguide_fb_init);
+module_exit(pguide_fb_exit);
+
+MODULE_LICENSE("GPL");
+</pre>
+
+
+<a name="androidDisplayDriversTroubleshooting"></a><h2>Troubleshooting</h2>
+
+<p>Both of the following problems have a similar cause:</p>
+<ul>
+  <li><strong>Number keys</strong>: In the dialer application, when a number key is pressed to dial a phone number, the number doesn't display on the screen until after the next number has been pressed. </li>
+  <li><strong>Arrow keys</strong>: When an arrow key is pressed, the desired icon doesn't get highlighted. For example, if you browse through icons in the Applications menu, you might notice that icons aren't highlighted as expected when you use the arrow key to navigate between options.</li>
+</ul>
+<p>Both problems are caused by an incorrect implementation of the frame buffer's page flipping. Key events are captured, but the graphical interface appears to drop every other frame. </p>
+<p>Android relies on a double buffer to smoothly render page flips (please see <a href="androidDisplayDriverFunctionality">Functionality</a> for details).</p>
diff --git a/pdk/docs/guide/getting_source_code.jd b/pdk/docs/guide/getting_source_code.jd
new file mode 100755
index 0000000..19a7069
--- /dev/null
+++ b/pdk/docs/guide/getting_source_code.jd
@@ -0,0 +1,126 @@
+page.title=Getting Source Code
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidSourceSetupBuildGitSetup">Introduction</a><br/>
+<a href="#androidSourceSetupBuildGitSetupInstall">Installing and Configuring Git</a><br/>
+<a href="#androidSourceSetupBuildGitSetupServer">Establishing Server Access</a><br/><div style="padding-left:40px">
+
+<a href="#androidSourceSetupBuildGitSetupServerRSAKeys">Generating RSA Keys</a><br/>
+<a href="#androidSourceSetupBuildGitSetupServerVerifyConnection">Verifying a Connection to the Git Server</a><br/></div>
+<a href="#androidSourceSetupGetCode">Downloading Code</a><br/>
+<a href="#androidSourceSetupExtractingPatch">Extracting an Android Patch</a><br/></div>
+
+<a name="androidSourceSetupBuildGitSetup"></a><h2>Introduction</h2>
+
+<p>Android relies on Git, a version control system, to install the Android platform. You will need to install Git 1.5.2 or greater in order to access the source tree. Please visit <a href="http://git.or.cz/">http://git.or.cz/</a> for more information regarding Git.</p>
+<p>Git permits you to control access to working directories, and we recommend that you use it to limit Android repository access to only a few people within your organization (please refer to your Google NDA for potential contractual restraints on sharing Android source access). </p>
+<p>You may clone Google's repository to a local copy for sharing internally (see Git documentation for details).</p>
+
+
+<a name="androidSourceSetupBuildGitSetupInstall"></a><h2>Installing and Configuring Git</h2>
+
+<p>To install the Git package, execute:</p>
+<pre class="prettyprint">
+% sudo apt-get install git-core
+</pre>
+
+
+<a name="androidSourceSetupBuildGitSetupServer"></a><h2>Establishing Server Access</h2>
+
+<p>Once Git is cleanly installed, you need to establish a connection with Google's Git server, a connection that requires an RSA key in order to authenticate requests.</p>
+
+
+<a name="androidSourceSetupBuildGitSetupServerRSAKeys"></a><h3>Generating RSA Keys</h3>
+
+<p>Each developer must have a unique RSA key in order to access Android source code. To generate an RSA key: </p>
+<p>
+<ol>
+<li>Type:<br/>
+<pre class="prettyprint">% ssh-keygen -t rsa -C  email@domain.com</pre><br/>
+You must use a valid email address to create your key.</li>
+<li>When prompted, indicate the file to which you wish to write your key (<code>id_rsa</code> in this example).</li>
+<li>When prompted, associate a passphrase with your key.</li>
+<li>Upon success, you should have two files saved to the designated directory:  </li>
+<ul>
+  <li><code>id_rsa</code>: This file contains the private half of your RSA key. You shouldn't share this file with anyone. </li>
+  <li><code>id_rsa.pub</code>: This is the public half or your RSA key and you should send it to your Google technical account manager.</li>
+  </ul>
+</ol>
+</p>
+<p>Send your Google Account Manager your public key file in order to establish Git server access. </p>
+
+
+<a name="androidSourceSetupBuildGitSetupServerVerifyConnection"></a><h3>Verifying a Connection to the Git Server</h3>
+
+<p>Once you have generated an RSA key and shared the public file with Google, you can test your connection with the Git server with the following command:</p>
+<pre class="prettyprint">
+% ssh  android-git.ext.google.com
+</pre>
+
+<p>You should receive one of the following results:</p>
+
+<table border=1 cellpadding=2 cellspacing=0>
+ <tbody><tr>
+  <th scope="col">Result</th>
+  <th scope="col">Cause</th>
+  <th  scope="col">Action</th>
+ </tr>
+  <tr>
+    <td>
+<code>fatal: What do you think I am? A shell?<BR>
+Connection to android-git closed.</code>
+</pre>	</td>
+    <td>Success</td>
+    <td>None. You successfully connected to the Git server. (You should not have shell access and it's expected to receive this error.)</td>
+  </tr>
+  <tr>
+    <td>ssh hangs and eventually times out. </td>
+    <td>Your setup is failing to locate and establish a basic connection. </td>
+    <td>Google needs to debug network settings. </td>
+  </tr>
+  <tr>
+    <td>Error: Permission denied &lt;public key&gt; </td>
+    <td>Either you are not using the matching username or the RSA private key does not match the public key. </td>
+    <td>Try executing:<BR> 
+	<code>
+% ssh $USER@android-
+  git.ext.google.com
+</code></td>
+  </tr>
+</table>
+
+
+<a name="androidSourceSetupGetCode"></a><h2>Downloading Code</h2>
+
+<p>Android source code is maintained in two repositories: <code>device</code> and <code>kernel</code>. The <code>device</code> repository includes the Android framework (things like the Activity Manager, Window Manager, Telephony Manager, View System, etc.). The <code>kernel</code> repository includes the core code necessary to run the operating system (things like the Display Driver, Camera Driver, Keypad Driver, Power Management, etc.). (Please see <a href="http://code.google.com/android/what-is-android.html">What is Android?</a> for details.)</p>
+
+<p>Save device and kernel code at the same directory level, for example:</p>
+<p>
+<ul><li><code>/home/joe/android/device</code></li>
+<li><code>/home/joe/android/kernel</code></li>
+</ul></p>
+<p><b>Device Code</b></p>
+<p>To download device code, you need your username and a unique <code>&lt;path&gt;</code> string supplied by Google to execute the following:</p>
+<pre class="prettyprint">
+% git-clone $USER@android-git.ext.google.com:&lt;path&gt;/device.git
+</pre>
+
+<p><b>Kernel Code</b></p>
+<p>To download kernel code, you need your username and a unique <code>&lt;path&gt;</code> string supplied by Google to execute the following:</p>
+<pre class="prettyprint">
+% git-clone $USER@android-git.ext.google.com:&lt;path&gt;/kernel.git
+</pre>
+ 
+
+
+<a name="androidSourceSetupExtractingPatch"></a><h2>Extracting an Android Patch</h2>
+
+<p>You likely already have Linux running on your platform and only need to integrate Android-specific changes. The following directions describe how to extract an Android patch.</p>
+<ol>
+  <li>Download a generic version  of the Linux kernel that matches the Linux version downloaded with the Android Kernel code.</li>
+  <li>Run <code>diff</code> on the two kernel packages to get Android-specific changes.</li>
+  <li>Apply the patch to your target kernel and build.</li>
+</ol>
+
diff --git a/pdk/docs/guide/gps.jd b/pdk/docs/guide/gps.jd
new file mode 100755
index 0000000..da57bef
--- /dev/null
+++ b/pdk/docs/guide/gps.jd
@@ -0,0 +1,56 @@
+page.title=GPS
+pdk.version=1.0
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidGpsIntroduction">Introduction</a><br/>
+<a href="#androidGPSBuildingDriver">Building a GPS Library</a><br/>
+<a href="#androidGPSInterface">Interface</a><br/></div></font></div>
+
+<a name="androidGpsIntroduction"></a><h2>Introduction</h2>
+
+<p>Android defines a user space C abstraction interface for GPS hardware. The interface header is defined in <code>include/hardware/gps.h</code>. In order to integate GPS with Android, you need to build a shared library that implements this interface. </p>
+
+
+<a name="androidGPSBuildingDriver"></a><h2>Building a GPS Library</h2>
+
+<p>To implement a GPS driver, create a shared library that implements the interface defined in <code>gps.h</code>. You must name your shared library <code>libgps.so</code> so that it will get loaded from <code>/system/lib</code> at runtime. Place GPS sources and Android.mk in <code>partner/acme/chipset_or_board/gps/</code> (where "acme" is your product name and "chipset_or_board" is your hardware target).</p>
+
+<p>The following stub <code>Android.mk</code> file ensures that <code>libgps</code> compiles and links to the appropriate libraries:</p>
+
+<pre class="prettify">
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libgps
+
+LOCAL_STATIC_LIBRARIES:= \
+# include any static library dependencies
+
+LOCAL_SHARED_LIBRARIES := \
+# include any shared library dependencies
+
+LOCAL_SRC_FILES += \
+# include your source files.  eg. MyGpsLibrary.cpp
+
+LOCAL_CFLAGS += \
+# include any needed compile flags
+
+LOCAL_C_INCLUDES:= \
+# include any needed local header files
+
+include $(BUILD_SHARED_LIBRARY)
+</pre>
+
+
+<a name="androidGPSInterface"></a><h2>Interface</h2>
+
+
+
+<p><span class="lh2"><a name="androidDoxygenNote"></a></span>
+
+<p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="gps.html">click here</a>.</p>
+
+
+<iframe onLoad="resizeDoxFrameHeight();" src="gps_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
diff --git a/pdk/docs/guide/group__memory.jd b/pdk/docs/guide/group__memory.jd
new file mode 100755
index 0000000..87f19d5
--- /dev/null
+++ b/pdk/docs/guide/group__memory.jd
@@ -0,0 +1,22 @@
+page.title=Providing Heap Memory
+@jd:body
+
+<div class="navigation" id="top">
+  <div class="tabs">
+    <ul>
+      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+      <li><a href="modules.html"><span>Modules</span></a></li>
+      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
+      <li><a href="files.html"><span>Files</span></a></li>
+    </ul>
+  </div>
+</div>
+
+<small>
+[<a class="el" href="group__networking.html">Neworking Support</a>]</small>
+</h1><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+</table>
+This is the text in the "Providing Heap Memory" subgroup </div>
+
diff --git a/pdk/docs/guide/group__networking.jd b/pdk/docs/guide/group__networking.jd
new file mode 100755
index 0000000..c5a94fc
--- /dev/null
+++ b/pdk/docs/guide/group__networking.jd
@@ -0,0 +1,24 @@
+page.title=Networking Support
+@jd:body
+
+<div class="navigation" id="top">
+  <div class="tabs">
+    <ul>
+      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+      <li><a href="modules.html"><span>Modules</span></a></li>
+      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
+      <li><a href="files.html"><span>Files</span></a></li>
+    </ul>
+  </div>
+</div>
+
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Modules</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html">Porividng Heap Memory</a></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+This is a text for the Networking Support Group </div>
+
diff --git a/pdk/docs/guide/images/androidBluetooth.gif b/pdk/docs/guide/images/androidBluetooth.gif
new file mode 100755
index 0000000..e62f5a8
--- /dev/null
+++ b/pdk/docs/guide/images/androidBluetooth.gif
Binary files differ
diff --git a/pdk/docs/guide/images/androidCameraArchitecture.gif b/pdk/docs/guide/images/androidCameraArchitecture.gif
new file mode 100755
index 0000000..2679b43
--- /dev/null
+++ b/pdk/docs/guide/images/androidCameraArchitecture.gif
Binary files differ
diff --git a/pdk/docs/guide/images/androidPMArchitecture.gif b/pdk/docs/guide/images/androidPMArchitecture.gif
new file mode 100755
index 0000000..1aa48db
--- /dev/null
+++ b/pdk/docs/guide/images/androidPMArchitecture.gif
Binary files differ
diff --git a/pdk/docs/guide/images/android_audio_architecture.gif b/pdk/docs/guide/images/android_audio_architecture.gif
new file mode 100755
index 0000000..79854a3
--- /dev/null
+++ b/pdk/docs/guide/images/android_audio_architecture.gif
Binary files differ
diff --git a/pdk/docs/guide/images/cameraPreview.jpg b/pdk/docs/guide/images/cameraPreview.jpg
new file mode 100755
index 0000000..3dea011
--- /dev/null
+++ b/pdk/docs/guide/images/cameraPreview.jpg
Binary files differ
diff --git a/pdk/docs/guide/images/cameraTakePicture.jpg b/pdk/docs/guide/images/cameraTakePicture.jpg
new file mode 100755
index 0000000..4ac6d95
--- /dev/null
+++ b/pdk/docs/guide/images/cameraTakePicture.jpg
Binary files differ
diff --git a/pdk/docs/guide/images/customLogo.gif.png b/pdk/docs/guide/images/customLogo.gif.png
new file mode 100755
index 0000000..3322fed
--- /dev/null
+++ b/pdk/docs/guide/images/customLogo.gif.png
Binary files differ
diff --git a/pdk/docs/guide/images/telephony.gif b/pdk/docs/guide/images/telephony.gif
new file mode 100755
index 0000000..8515730
--- /dev/null
+++ b/pdk/docs/guide/images/telephony.gif
Binary files differ
diff --git a/pdk/docs/guide/images/telephony_solicted_example.gif b/pdk/docs/guide/images/telephony_solicted_example.gif
new file mode 100755
index 0000000..352ca98
--- /dev/null
+++ b/pdk/docs/guide/images/telephony_solicted_example.gif
Binary files differ
diff --git a/pdk/docs/guide/images/telephony_unsolicted_example.gif b/pdk/docs/guide/images/telephony_unsolicted_example.gif
new file mode 100755
index 0000000..e51c4d6
--- /dev/null
+++ b/pdk/docs/guide/images/telephony_unsolicted_example.gif
Binary files differ
diff --git a/pdk/docs/guide/index.jd b/pdk/docs/guide/index.jd
new file mode 100644
index 0000000..b59615f
--- /dev/null
+++ b/pdk/docs/guide/index.jd
@@ -0,0 +1,38 @@
+page.title=Welcome to the Android Porting Guide
+pdk.version=1.0
+@jd:body
+
+
+<p>The Open Handset Distribution (OHD) is a isoftware distribution  for mobile devices, often referred to as Android, developed by members of the <a href="http://www.openhandsetalliance.com">Open Handset Alliance</a>. &nbsp;Android includes an operating system, middleware, and key applications typically required for mobile devices.</p>
+  
+<p>This porting guide describes the steps necessary to port Android to a new mobile device. &nbsp;Android is designed as a highly-portable, hardware-independent platform based on Linux, and porting the platform to new devices requires little more than porting the Linux kernel and developing the Linux drivers necessary for your device.</p>
+  
+<p>The current version of this guide describes bringing Android up to "PDA-level" functionality; functionality sufficient to support non-multimedia apps that run on unconnected mobile devices through the standard user interface devices such as keypad and display. &nbsp;Future versions of this guide will cover complete telephony, multi-media and peripheral integration to create a complete mobile device.</p>
+
+
+<a name="androidWelcomeIntendedAudience"></a><h2>Intended Audience</h2>
+
+<p>This porting guide is intended for engineers proficient with running (and writing drivers for) Linux on embedded devices. 
+<p>The guide also assumes you have a target hardware that matches <a href="system_requirements.html">Device Requirements</a> and that you 
+can boot and run a recent (2.6.x) version of the Linux kernel
+with at least keypad and display drivers properly installed.</p>
+
+
+<a name="androidWelcomeGettingStarted"></a><h2>Getting Started with Android</h2>
+
+<p>To get started with Android, start with the publicly-available documentation at <a href="http://code.google.com/android/documentation.html">http://code.google.com/android/documentation.html</a>, paying particular attention to <a href="http://code.google.com/android/what-is-android.html">What is Android?</a> and <a href="http://code.google.com/android/intro/index.html">Getting Started with Android</a>.</p>
+
+
+<a name="androidWelcomePorting"></a><h2>Porting Android to Your Device</h2>
+
+<p>Start with the following sections in order to port Android to your target hardware.</p>
+<dl>
+    <dt><a href="system_requirements.html">Device Requirements</a></dt>
+    <dd>What must your device support in order to successfully port Android to it?  </dd>
+    <dt><a href="source_setup_guide.html">Setting up a Development Environment </a></dt>
+
+    <dd>Install necessary packages and retrieve source code through a Git server. <a href="build_system.html">Build System</a> offers a conceptual overview of Android's build system and instructions to affect a simple build.</dd>
+    <dt><a href="bring_up.html">Basic Bring up </a></dt>
+    <dd>Establish core components necessary to your device, such as keymaps / keyboard input and display drivers. </dd>
+    <dt>&nbsp;</dt>
+</dl>
diff --git a/pdk/docs/guide/instrumentation_framework.jd b/pdk/docs/guide/instrumentation_framework.jd
new file mode 100755
index 0000000..a8eab2e
--- /dev/null
+++ b/pdk/docs/guide/instrumentation_framework.jd
@@ -0,0 +1,141 @@
+page.title=Instrumentation Framework
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidInstrumentationFrameworkIntro">Introduction</a><br/>
+<a href="#androidInstrumentationFrameworkamCommand">Understanding the am Command</a><br/>
+<a href="#androidInstrumentationFrameworkWritingRunning">Writing and Running Test Cases</a><br/>
+<a href="#androidInstrumentationFrameworkTestCase">Exploring a Test Case</a><br/>
+<a href="#androidInstrumentationFrameworkTroubleshooting">Troubleshooting</a><br/></div>
+
+<a name="androidInstrumentationFrameworkIntro"></a><h2>Introduction</h2>
+
+<p>This document describes how to use the Instrumentation Framework to write test cases. You should have a working knowledge of the following:</p>
+<ul>
+  <li> Android Application Framework </li>
+  <li> Using <code>adb</code>, <code>am</code> and various logging functionality </li>
+  <li> A brief understanding of the application of interest, that is, he names of the classes which handle the intents etc. </li>
+  <li> Junit testing. </li>
+</ul>
+<p> Each Android application runs in its own process. Instrumentation kills the application process and  restarts the process with Instrumentation. Instrumentation gives a handle to the application context used to poke around the application to validate test assertions, allowing you to write test cases to test applications at a much lower level than UI screen shot tests. Note that Instrumentation cannot catch UI bugs. </p>
+
+
+<a name="androidInstrumentationFrameworkamCommand"></a><h2>Understanding the am Command</h2>
+
+<p><code>am</code> is used to start and instrument activities using the adb shell command, as shown in the snippet below:</p>
+<pre class="prettify">
+&gt; adb shell am
+usage: am [start|instrument]
+       am start [-a &lt;ACTION&gt;] [-d &lt;DATA_URI&gt;] [-t &lt;MIME_TYPE&gt;]
+                [-c &lt;CATEGORY&gt; [-c &lt;CATEGORY&gt;] ...]
+                [-e &lt;EXTRA_KEY&gt; &lt;EXTRA_VALUE&gt; [-e &lt;EXTRA_KEY&gt; &lt;EXTRA_VALUE&gt; ...]
+                [-n &lt;COMPONENT&gt;] [-D] [&lt;URI&gt;]
+       am instrument [-e &lt;ARG_NAME&gt; &lt;ARG_VALUE&gt;] [-p &lt;PROF_FILE&gt;]
+                [-w] &lt;COMPONENT&gt;
+For example, to start the Contacts application you can use
+&gt; adb shell am start -n com.google.android.contacts/.ContactsActivity
+</pre>
+
+
+<a name="androidInstrumentationFrameworkWritingRunning"></a><h2>Writing and Running Test Cases</h2>
+
+<p>Each instrumentation test case is similar to an Android application with the distinction that it starts another application. For example, have a look in the <code>tests/Contacts</code> directory. </p>
+<ul>
+  <li> There should be a Makefile and an Android Manifest file. </li>
+  <li> Tests are located in <code>tests/Contacts/src/com/google/android/contactstests</code>. </li>
+  <li> The Instrumentation Test Runner is located at <code>tests/Contacts/src/com/google/android/contactstests/functional/ContactsInstrumentationTestRunner.java</code>.</li>
+</ul>
+<p>Suppose you have a makefile with <code>Contactstests</code> as the target. </p>
+<ul>
+  <li> <code>make Contactstests</code>: Compiles the test cases. </li>
+  <li> <code>adb install Contactstests.apk</code>: Installs the apk on the device. </li>
+  <li> Use the adb shell <code>am</code> command to run them. </li>
+</ul>
+<p> For options and other details, please see <a href="instrumentation_testing.html" target="_top">Instrumentation Testing</a>.</p>
+
+
+<a name="androidInstrumentationFrameworkTestCase"></a><h2>Exploring a Test Case</h2>
+
+<p> The test case described in this section adds and tests a new Contact. Note that you can send intents, register intent receivers, etc. </p>
+<p><code>Instrumentation.java</code> has helper functions that send key events and string, for example: </p>
+<ul>
+  <li><code>getInstrumentation()</code>: Returns the handle to the instrumentation </li>
+  <li><code>sendCharacterSync</code>: Sends a character. </li>
+  <li><code>sendStringSync</code>: Sends a string to an input box. </li>
+  <li><code>sendKeyDownUpSync</code>: Sends a specific keyevent. </li>
+  <li><code>sendTrackballEventSync</code>: Send a trackball event.</li>
+</ul>
+<p> You can find the test case below at <code>device/tests/Contacts.</code></p>
+<pre class="prettify">
+private void addNewContact(String name, int star, int phoneType, String number, String label,
+		String email, int emailType){
+	ContentValues values = new ContentValues();
+	Uri phoneUri = null;
+	Uri emailUri = null;
+
+	values.put(Contacts.People.NAME, name);
+	values.put(Contacts.People.STARRED, star);
+
+	//Add Phone Numbers
+	Uri uri = mActivity.getContentResolver().insert(Contacts.People.CONTENT_URI, values);
+	phoneUri = Uri.withAppendedPath(uri, Contacts.People.Phones.CONTENT_DIRECTORY);
+
+	values.clear();
+	values.put(Contacts.Phones.TYPE, phoneType);
+	values.put(Contacts.Phones.NUMBER, number);
+	values.put(Contacts.Phones.LABEL, label);
+	mActivity.getContentResolver().insert(phoneUri, values);
+
+	//Add Email
+	emailUri = Uri.withAppendedPath(uri, ContactMethods.CONTENT_DIRECTORY);
+
+	values.clear();
+	values.put(ContactMethods.KIND, Contacts.KIND_EMAIL);
+	values.put(ContactMethods.DATA, email);
+	values.put(ContactMethods.LABEL, "");
+	values.put(ContactMethods.TYPE, emailType);
+	mActivity.getContentResolver().insert(emailUri, values);
+}
+
+
+ public void testAddSaveSingleContact(){
+	int previousCount = mActivity.getListView().getCount();
+	String message;
+
+	addNewContact(INPUT_NAME_1 + "1", "5435754532", "1" + INPUT_EMAIL_1, CONFIRM_OPTION);
+
+	message = "Added 1 to initial length=" + previousCount + ", but resulted with a count=" +
+		mActivity.getListView().getCount();
+	assertEquals(message, ++previousCount, mActivity.getListView().getCount());
+
+	// Check Content; Name; Num; Starred
+	assertEquals(INPUT_NAME_1 + "1", getTextFromView(0, android.R.id.text1));
+	assertEquals("5435754532", getTextFromView(0, android.R.id.text2));
+
+	//Check email is saved
+	//cursor = returnEmailCursorAtId("1");
+	Uri uri = Uri.parse("content://contacts/people/1");
+	uri = Uri.withAppendedPath(uri, ContactMethods.CONTENT_DIRECTORY);
+	Cursor cursor = mActivity.getContentResolver().query(uri, CONTACTS_COLUMNS, null, null, null);
+	assertTrue("returnEmailCursorAtId: Moving cursor to first row has failed", cursor.first());
+
+	int dataIndex = cursor.getColumnIndexOrThrow("data");
+	assertEquals("1" + INPUT_EMAIL_1, cursor.getString(dataIndex));
+	cursor.deactivate();
+}
+	</pre>
+
+
+<a name="androidInstrumentationFrameworkTroubleshooting"></a><h2>Troubleshooting</h2>
+
+<p>If you run your test cases and nothing appears to happen, have a look at <code>adb logcat</code>. The following is a common problem:</p>
+<pre class="prettify">
+I/dalvikvm(  688): threadid=11: attached from native, name=Binder Thread #1
+I/dalvikvm(  688): threadid=13: attached from native, name=Binder Thread #2
+W/ActivityManager(  469): Unable to find instrumentation info for: ComponentInfo{com.google.android.browser_instrumentation/com.google.android.browser_instrumentation.BrowserWebkitLayoutInstrumentation}
+D/AndroidRuntime(  688): Shutting down VM
+E/AndroidRuntime(  688): ERROR: thread attach failed
+</pre>		
+<p>It's possible that the instrumentation apk isn't installed on your device or that the package name is incorrect in the Manifest file. </p>
+
diff --git a/pdk/docs/guide/instrumentation_testing.jd b/pdk/docs/guide/instrumentation_testing.jd
new file mode 100755
index 0000000..1302217
--- /dev/null
+++ b/pdk/docs/guide/instrumentation_testing.jd
@@ -0,0 +1,511 @@
+page.title=Instrumentation Testing
+pdk.version=1.0
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidInstrumentationFrameworkIntro">Introduction</a><br/>
+<a href="#androidInstrumentationTestingFramework">Instrumentation Framework</a><br/><div style="padding-left:40px">
+
+<a href="#androidInstrumentationTestingClasses">Classes</a><br/>
+<a href="#androidInstrumentationFrameworkamCommand">Understanding the am Command</a><br/></div>
+<a href="#androidInstrumentationFrameworkPlatform">Platform Test Suites</a><br/><div style="padding-left:40px">
+
+<a href="#androidTestingPlatformFramework">Framework Tests</a><br/>
+<a href="#androidTestingPlatformCoreLibrary">Core Library</a><br/></div>
+<a href="#androidInstrumentationFrameworkWritingRunning">Running Tests</a><br/><div style="padding-left:40px">
+
+<a href="#androidInstrumentationTestingRunningAll">All Tests with Default TestRunner behavior</a><br/>
+<a href="#androidTestingTestSinglePakcage">Running all Tests Under Single Package</a><br/>
+<a href="#androidTestingSingleTestSuite">Running a Single Test Suite</a><br/>
+<a href="#androidInstrumentationTestingRunningSingleTestCase">A Single Test Case</a><br/>
+<a href="#androidInstrumentationTestingRunningSingleTest">A Single Test</a><br/>
+<a href="#androidTestingDebugging">Attaching a debugger to your test</a><br/></div>
+<a href="#androidInstrumentationTestingCreating">Writing Tests</a><br/><div style="padding-left:40px">
+
+<a href="#androidTestingLocationFiles">Location of Files</a><br/>
+<a href="#androidTestingContentMakefile">Contents of makefile</a><br/>
+<a href="#androidTestingContentManifest">Content of Manifest</a><br/>
+<a href="#androidInstrumentationTestingCreatingTestRunner">New Instrumentation TestRunner</a><br/>
+<a href="#androidInstrumentationTestingCreatingTestCase">New InstrumentationTestCase</a><br/>
+<a href="#androidInstrumentationFrameworkTestCase">Exploring a Test Case</a><br/>
+<a href="#androidTestingKindsofTests">Deciding Kinds of Tests to Write</a><br/></div>
+<a href="#androidInstrumentationFrameworkTroubleshooting">Troubleshooting</a><br/></div>
+
+<a name="androidInstrumentationFrameworkIntro"></a><h2>Introduction</h2>
+
+<p>This document describes how to use the Instrumentation Framework to write test cases. Instrumentation testing allows you to verify a particular feature or behavior with an automated JUnit TestCase. You can launch activities and providers within an application, send key events, and make assertions about various UI elements. </p>
+<p>You should have a working knowledge of the following:</p>
+<ul>
+  <li> Android Application Framework</li>
+  <li> Using <code>adb</code>, <code>am</code> and various logging functionality </li>
+  <li> A brief understanding of the application of interest, that is, the names of the classes which handle the intents etc. </li>
+  <li> JUnit testing.</li>
+</ul>
+<p> Each Android application runs in its own process. Instrumentation kills the application process and  restarts the process with Instrumentation. Instrumentation gives a handle to the application context used to poke around the application to validate test assertions, allowing you to write test cases to test applications at a much lower level than UI screen shot tests. Note that Instrumentation cannot catch UI bugs. </p>
+
+
+<a name="androidInstrumentationTestingFramework"></a><h2>Instrumentation Framework</h2>
+
+
+
+<a name="androidInstrumentationTestingClasses"></a><h3>Classes</h3>
+
+<p> The following classes help glue together <code>Instrumentation</code> with JUnit testing. </p>
+<table>
+  <tr>
+    <th scope="col">Class</th>
+    <th scope="col">Description</th></tr>
+  <tr>
+    <td valign="top"><code>InstrumentationTestCase</code></td>
+    <td valign="top">
+	<p>This extends the standard JUnit <code>TestCase</code> and offers access to an <code>Instrumentation</code> class. Write tests inside your instrumentation class any way you see fit. For example, your test might launch activities and send key events. For this to work properly, the instrumentation needs to be injected into the test case.</p>	</td>
+  </tr>
+  <tr>
+    <td valign="top"><code>InstrumentationTestRunner</code></td>
+    <td valign="top">The instrumentation test runner is an instrumentation that runs instrumentation test cases and injects itself into each test case. Instrumentation test cases need to be grouped together with an instrumentation test runner with the appropriate target package.</td>
+  </tr>
+  <tr>
+    <td valign="top"><code>InstrumentationTestSuite</code></td>
+    <td valign="top">The instrumentation test suite is a simple extension of the standard JUnit <code>TestSuite</code> that keeps a member <code>Instrumentation</code> variable on hand to inject into each <code>TestCase</code> before running them.  It is used by <code>InstrumentationTestRunner</code>.</td>
+  </tr>
+</table>
+<p> Three additional base classes extend <code>InstrumentationTestCase</code> to allow you to test <code>Activity</code> and <code>Provider</code> classes:</p>
+<table>
+  <tr>
+    <th scope="col">Class</th>
+    <th scope="col">Description</th>
+  </tr>
+  <tr>
+    <td valign="top"><code>ActivityTestCase</code></td>
+    <td valign="top"><p>This class can be used to write tests for a specific activity.  An activity is launched in its <code>setUp()</code> method and finished with <code>tearDown</code>.  If you write a test case that extends <code>ActivityTestCase</code>, you can write tests that access the activity using <code>getActivity()</code> and assume it has been set up properly.</p></td>
+  </tr>
+  <tr>
+    <td valign="top"><code>ServiceTestCase</code></td>
+    <td valign="top">This test case provides a framework in which you can test Service classes in a controlled environment.  It provides basic support for the lifecycle of a Service, and hooks by which you can inject various dependencies and control the environment in which your Service is tested.</td>
+  </tr>
+  <tr>
+    <td valign="top"><code>SingleLaunchActivityTestCase</code></td>
+    <td valign="top">This class is similar to <code>ActivityTestCase</code> except that the activity is launched once per class instead of every time the test case calls setup. </td>
+  </tr>
+  <tr>
+    <td valign="top"><code>ProviderTestCase</code></td>
+    <td valign="top">This class is similar to <code>ActivityTestCase</code> except that it will setup, tear down, and provide access to the <code>Provider</code> of your choice.</td>
+  </tr>
+</table>
+
+
+<a name="androidInstrumentationFrameworkamCommand"></a><h3>Understanding the am Command</h3>
+
+<p>The am command is a command-line interface to the ActivityManager (see <a href="http://code.google.com/android/reference/android/app/ActivityManager.html">http://code.google.com/android/reference/android/app/ActivityManager.html</a> for details). <code>am</code> is used to start and instrument activities using the adb shell command, as shown in the snippet below:</p>
+<pre class="prettify">
+&gt; adb shell am
+usage: am [start|instrument]
+       am start [-a &lt;ACTION&gt;] [-d &lt;DATA_URI&gt;] [-t &lt;MIME_TYPE&gt;]
+                [-c &lt;CATEGORY&gt; [-c &lt;CATEGORY&gt;] ...]
+                [-e &lt;EXTRA_KEY&gt; &lt;EXTRA_VALUE&gt; [-e &lt;EXTRA_KEY&gt; &lt;EXTRA_VALUE&gt; ...]
+                [-n &lt;COMPONENT&gt;] [-D] [&lt;URI&gt;]
+       am instrument [-e &lt;ARG_NAME&gt; &lt;ARG_VALUE&gt;] [-p &lt;PROF_FILE&gt;]
+                [-w] &lt;COMPONENT&gt;
+For example, to start the Contacts application you can use
+&gt; adb shell am start -n com.google.android.contacts/.ContactsActivity
+</pre>
+
+
+<a name="androidInstrumentationFrameworkPlatform"></a><h2>Platform Test Suites</h2>
+
+<p>This section provides an overview for various unit and functional test cases that can be executed through the instrumentation framework.</p>
+
+
+<a name="androidTestingPlatformFramework"></a><h3>Framework Tests</h3>
+
+<p>Framework test cases test the Android application framework or specific Android application functionality that requires an Android runtime context.  These tests can be found in <code>//device/tests</code> and <code>//device/apps/AndroidTests</code>.</p>
+
+
+<a name="androidTestingPlatformCoreLibrary"></a><h3>Core Library</h3>
+
+<p>Core library test cases test the Android library functionality that does not require an Android runtime context.  These tests are split into Android library (android.* package space) tests at <code>//device/java/tests</code> and Java library (java.*, javax.*, etc. packages) tests at <code>//device/dalvik/libcore/.../tests</code>.</p>
+
+
+<a name="androidInstrumentationFrameworkWritingRunning"></a><h2>Running Tests</h2>
+
+<p>Each instrumentation test case is similar to an Android application with the distinction that it starts another application. For example, have a look in the <code>tests/Contacts</code> directory. </p>
+<ul>
+  <li> There should be a Makefile and an Android Manifest file. </li>
+  <li> Tests are located in <code>tests/Contacts/src/com/google/android/contactstests</code>. </li>
+  <li> The Instrumentation Test Runner is located at <code>tests/Contacts/src/com/google/android/contactstests/functional/ContactsInstrumentationTestRunner.java</code>.</li>
+</ul>
+<p>Suppose you have a makefile with <code>Contactstests</code> as the target. </p>
+<ul>
+  <li> <code>make Contactstests</code>: Compiles the test cases. </li>
+  <li> <code>adb install Contactstests.apk</code>: Installs the apk on the device. </li>
+  <li> Use the adb shell <code>am</code> command to run them. </li>
+</ul>
+<p> To run your tests, use the <code>am instrument</code> command with your <code>InstrumentationTestRunner</code> as its argument. Results are printed as a result of the instrumentation. For example, the following snippet displays the output after running the framework tests with one test failing (note the unusual syntax caused by how instrumentations are run via <code>am</code>):</p>
+<pre class="prettify">
+$ adb shell am instrument -w com.google.android.frameworktest/.tests.FrameworkInstrumentationTestRunner
+INSTRUMENTATION_RESULT: test results:=.......F.......
+Time: 6.837
+There was 1 failure:
+1) testSetUpConditions(com.google.android.frameworktest.tests.focus.RequestFocusTest)junit.framework.AssertionFailedError: requestFocus() should work from onCreate.
+        at com.google.android.frameworktest.tests.focus.RequestFocusTest.testSetUpConditions(RequestFocusTest.java:66)
+        at java.lang.reflect.Method.invokeNative(Native Method)
+        at android.test.InstrumentationTestSuite.runTest(InstrumentationTestSuite.java:73)
+        at android.test.InstrumentationTestSuite.runTest(InstrumentationTestSuite.java:73)
+        at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:151)
+        at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1088)
+
+FAILURES!!!
+Tests run: 14,  Failures: 1,  Errors: 0
+
+&lt;RETURN&gt; to continue
+
+INSTRUMENTATION_CODE: -1
+$ 
+</pre>
+
+
+<a name="androidInstrumentationTestingRunningAll"></a><h3>All Tests with Default TestRunner behavior</h3>
+
+<p>If no class or package is passed in to run, InstrumentationTestRunner will automatically find and run all tests under the package of the test application (as defined by the <code>android:targetPackage</code> attribute of the instrumentation defined in its manifest file).
+</p> 
+<pre> 
+$ adb shell am instrument -w \
+  com.android.samples.tests/android.test.InstrumentationTestRunner
+ 
+INSTRUMENTATION_RESULT: Test results for InstrumentationTestRunner=..........
+Time: 2.317
+ 
+OK (10 tests)
+ 
+ 
+INSTRUMENTATION_CODE: -1
+</pre>
+
+
+<a name="androidTestingTestSinglePakcage"></a><h3>Running all Tests Under Single Package</h3>
+
+<p>If you have many tests under one package, use the <code>-e package &lt;packagename&gt;</code> option to run all tests under that package without having to manually create a test suite.</p> 
+<pre> 
+$ adb shell am instrument -w \
+  -e package com.android.samples.view \
+  com.android.samples.tests/android.test.InstrumentationTestRunner
+INSTRUMENTATION_RESULT: Test results for InstrumentationTestRunner=........
+Time: 1.587
+ 
+OK (8 tests)
+</pre>  
+
+
+<a name="androidTestingSingleTestSuite"></a><h3>Running a Single Test Suite</h3>
+
+<p>If you prefer to explicitly state which tests comprise all of your tests, you can define a test suite and run that directly. By convention, all test packages in your system should have at least one suite called <code>AllTests</code> (see <code>AllTests.java</code>).  To run all of the tests using the <code>AllTests</code> suite for the api demos test app:</p>
+
+<pre> 
+$ adb shell am instrument -w \
+  -e class com.android.samples.AllTests \
+  com.android.samples.tests/android.test.InstrumentationTestRunner
+ 
+INSTRUMENTATION_RESULT: Test results for AllTests=..........
+Time: 2.286
+ 
+OK (10 tests)
+ 
+ 
+INSTRUMENTATION_CODE: -1
+</pre> 
+
+
+<a name="androidInstrumentationTestingRunningSingleTestCase"></a><h3>A Single Test Case</h3>
+
+<pre> 
+$ adb shell am instrument -w \
+  -e class com.android.samples.view.Focus2ActivityTest \
+  com.android.samples.tests/android.test.InstrumentationTestRunner
+ 
+INSTRUMENTATION_RESULT: Test results for Focus2ActivityTest=....
+Time: 1.359
+ 
+OK (4 tests)
+ 
+ 
+INSTRUMENTATION_CODE: -1
+</pre> 
+
+
+<a name="androidInstrumentationTestingRunningSingleTest"></a><h3>A Single Test</h3>
+
+<pre> 
+$ adb shell am instrument -w \
+  -e class com.android.samples.view.Focus2ActivityTest#testGoingLeftFromRightButtonGoesToCenter \
+  com.android.samples.tests/android.test.InstrumentationTestRunner
+ 
+INSTRUMENTATION_RESULT: Test results for Focus2ActivityTest=.
+Time: 0.51
+ 
+OK (1 test)
+ 
+ 
+INSTRUMENTATION_CODE: -1
+</pre> 
+
+
+<a name="androidTestingDebugging"></a><h3>Attaching a debugger to your test</h3>
+
+<p>In order to debug your test code, instruct the controller to stop and wait for the debugger by adding <code>-e debug true</code> to your
+command line.  This causes the test runner to stop and wait for the debugger just before calling your <code>setUp()</code> method.  For example,</p> 
+
+<pre> 
+$ adb shell am instrument -w \
+  -e debug true \
+  com.android.samples.tests/android.test.InstrumentationTestRunner
+</pre> 
+
+
+<a name="androidInstrumentationTestingCreating"></a><h2>Writing Tests</h2>
+
+<p>When writing tests, refer to the ApiDemos tests as models (located at <code>//device/samples/ApiDemos</code>). This section provides an overview of the test structure with ApiDemos.</p>
+
+
+<a name="androidTestingLocationFiles"></a><h3>Location of Files</h3>
+
+<p>Test packages should use the following structure and include <code>Android.mk</code>, <code>AndroidManifest.xml</code>, <code>AllTests.java</code>, and a src directory that mirrors the src directory of the tested application.</p> 
+<p>Files are located within a <code>tests</code> directory found in the root directory:</p> 
+<pre> 
+$ find samples/ApiDemos/tests
+samples/ApiDemos/tests
+samples/ApiDemos/tests/Android.mk
+samples/ApiDemos/tests/AndroidManifest.xml
+samples/ApiDemos/tests/src
+samples/ApiDemos/tests/src/com
+samples/ApiDemos/tests/src/com/google
+samples/ApiDemos/tests/src/com/google/android
+samples/ApiDemos/tests/src/com/google/android/samples
+samples/ApiDemos/tests/src/com/google/android/samples/AllTests.java
+samples/ApiDemos/tests/src/com/google/android/samples/ApiDemosTest.java
+samples/ApiDemos/tests/src/com/google/android/samples/os
+samples/ApiDemos/tests/src/com/google/android/samples/os/MorseCodeConverterTest.java
+samples/ApiDemos/tests/src/com/google/android/samples/view
+samples/ApiDemos/tests/src/com/google/android/samples/view/Focus2ActivityTest.java
+samples/ApiDemos/tests/src/com/google/android/samples/view/Focus2AndroidTest.java
+</pre>
+
+
+<a name="androidTestingContentMakefile"></a><h3>Contents of makefile</h3>
+
+<p>The contents of the makefile are similar to a normal application with the addition of a <code>LOCAL_INSTRUMENTATION_FOR</code> declaration.<p /> 
+<pre> 
+# Add appropriate copyright banner here
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+ 
+# We only want this apk build for tests.
+LOCAL_MODULE_TAGS := tests
+ 
+# Include all test java files.
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+ 
+# Notice that we don't have to include the src files of ApiDemos because, by
+# running the tests using an instrumentation targeting ApiDemos, we
+# automatically get all of its classes loaded into our environment.
+ 
+LOCAL_PACKAGE_NAME := ApiDemosTests
+ 
+LOCAL_INSTRUMENTATION_FOR := ApiDemos
+ 
+include $(BUILD_PACKAGE)
+</pre>
+
+
+<a name="androidTestingContentManifest"></a><h3>Content of Manifest</h3>
+
+<p>Use the following example to create an <code>AndroidManifest.xml</code> file that declares the instrumentation. Specify that the framework supplied Instrumentation TestRunner targest the package of your application, allowing the tests that are run with the instrumentation to get access to all of the classes of your application without having to build the source into the test app. The name of the test application is typically the same as your target application with <code>.tests</code> appended. </p>
+<pre> 
+# Add appropriate copyright banner here
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.samples.tests"&gt;
+ 
+    &lt;uses-permission android:name="android.permission.RUN_INSTRUMENTATION" /&gt;
+ 
+    &lt;!--
+    This declares that this app uses the instrumentation test runner targeting
+    the package of com.android.samples.  To run the tests use the command:
+    "adb shell am instrument -w com.android.samples.tests/android.test.InstrumentationTestRunner"
+    --&gt;
+    &lt;instrumentation android:name="android.test.InstrumentationTestRunner"
+                     android:targetPackage="com.android.samples"
+                     android:label="Tests for Api Demos."/&gt;
+ 
+&lt;/manifest&gt;
+</pre> 
+<p>&nbsp;</p> 
+<p>The following snippet will prefix the <code>/android.test.InstrumentationTestRunner</code> when running tests from the command line:</p>
+<pre> 
+$ adb shell am instrument -w \
+  com.android.samples.tests/android.test.InstrumentationTestRunner
+</pre> 
+
+
+<a name="androidInstrumentationTestingCreatingTestRunner"></a><h3>New Instrumentation TestRunner</h3>
+
+<p>Create a class that derives from this class. You must override two abstract methods; one that returns the class loader of the target package, and another that defines all of the tests within the package. For example, the snippet below displays the test runner for the framework tests.</p>
+<pre class="prettify">
+public class FrameworkInstrumentationTestRunner extends InstrumentationTestRunner {
+
+    @Override
+    public TestSuite getAllTests() {
+        InstrumentationTestSuite suite = new InstrumentationTestSuite(this);
+
+        suite.addTestSuite(FocusAfterRemovalTest.class);
+        suite.addTestSuite(RequestFocusTest.class);
+        suite.addTestSuite(RequestRectangleVisibleTest.class);
+        return suite;
+    }
+
+    @Override
+    public ClassLoader getLoader() {
+        return FrameworkInstrumentationTestRunner.class.getClassLoader();
+    }
+}
+</pre>
+<p> Next, in an appropriate <code>AndroidManifest.xml</code>, define the instrumentation for the derived class with the appropriate <code>android:targetPackage</code> set.  For example, the snippet below defines the instrumentation runner for the framework tests.</p>
+<pre class="prettify">
+&lt;uses-permission android:name="android.permission.RUN_INSTRUMENTATION" /&gt;
+
+&lt;instrumentation android:name="android.tests.FrameworkInstrumentationTestRunner"
+                 android:targetPackage="com.google.android.frameworktest"
+                 android:label="framework instrumentation test runner" /&gt;
+</pre>		
+
+
+<a name="androidInstrumentationTestingCreatingTestCase"></a><h3>New InstrumentationTestCase</h3>
+
+<p> To create a new test case, write a class that extends <code>InstrumentationTestCase</code> in the same application as your test runner.  The following snippet illustrates an example <code>ActivityTestCase</code> that tests an activity named <code>MyActivity</code>.</p>
+<pre class="prettify">
+public class ButtonPressTest extends ActivityTestCase&lt;MyActivity&gt; {
+
+    Button mLeftButton;
+
+    public ButtonPressTest() {
+        super("com.example", MyActivity.class);
+    }
+
+    @Override
+    public void setUp() throws Exception {
+      super.setUp();
+      mLeftButton = (Button) getActivity().findViewById(R.id.leftButton);
+    }
+
+    public void testFocusMovesToRight() throws Exception {
+        assertTrue(mLeftButton.hasFocus());
+        getInstrumentation().sendCharacterSync(KeyEvent.KEYCODE_DPAD_RIGHT);
+
+        Button rightButton = (Button) getActivity().findViewById(R.id.rightButton);
+        assertTrue(rightButton.hasFocus());
+    }
+
+    // could have several more tests...
+}
+</pre>
+
+
+<a name="androidInstrumentationFrameworkTestCase"></a><h3>Exploring a Test Case</h3>
+
+<p> The test case described in this section adds and tests a new Contact. Note that you can send intents, register intent receivers, etc. </p>
+<p><code>Instrumentation.java</code> has helper functions that send key events and strings, for example: </p>
+<ul>
+  <li><code>getInstrumentation()</code>: Returns the handle to the instrumentation </li>
+  <li><code>sendCharacterSync</code>: Sends a character. </li>
+  <li><code>sendStringSync</code>: Sends a string to an input box. </li>
+  <li><code>sendKeyDownUpSync</code>: Sends a specific keyevent. </li>
+  <li><code>sendTrackballEventSync</code>: Sends a trackball event.</li>
+</ul>
+<p> You can find the test case below at <code>device/tests/Contacts.</code></p>
+<pre class="prettify">
+private void addNewContact(String name, int star, int phoneType, String number, String label,
+		String email, int emailType){
+	ContentValues values = new ContentValues();
+	Uri phoneUri = null;
+	Uri emailUri = null;
+
+	values.put(Contacts.People.NAME, name);
+	values.put(Contacts.People.STARRED, star);
+
+	//Add Phone Numbers
+	Uri uri = mActivity.getContentResolver().insert(Contacts.People.CONTENT_URI, values);
+	phoneUri = Uri.withAppendedPath(uri, Contacts.People.Phones.CONTENT_DIRECTORY);
+
+	values.clear();
+	values.put(Contacts.Phones.TYPE, phoneType);
+	values.put(Contacts.Phones.NUMBER, number);
+	values.put(Contacts.Phones.LABEL, label);
+	mActivity.getContentResolver().insert(phoneUri, values);
+
+	//Add Email
+	emailUri = Uri.withAppendedPath(uri, ContactMethods.CONTENT_DIRECTORY);
+
+	values.clear();
+	values.put(ContactMethods.KIND, Contacts.KIND_EMAIL);
+	values.put(ContactMethods.DATA, email);
+	values.put(ContactMethods.LABEL, "");
+	values.put(ContactMethods.TYPE, emailType);
+	mActivity.getContentResolver().insert(emailUri, values);
+}
+
+
+ public void testAddSaveSingleContact(){
+	int previousCount = mActivity.getListView().getCount();
+	String message;
+
+	addNewContact(INPUT_NAME_1 + "1", "5435754532", "1" + INPUT_EMAIL_1, CONFIRM_OPTION);
+
+	message = "Added 1 to initial length=" + previousCount + ", but resulted with a count=" +
+		mActivity.getListView().getCount();
+	assertEquals(message, ++previousCount, mActivity.getListView().getCount());
+
+	// Check Content; Name; Num; Starred
+	assertEquals(INPUT_NAME_1 + "1", getTextFromView(0, android.R.id.text1));
+	assertEquals("5435754532", getTextFromView(0, android.R.id.text2));
+
+	//Check email is saved
+	//cursor = returnEmailCursorAtId("1");
+	Uri uri = Uri.parse("content://contacts/people/1");
+	uri = Uri.withAppendedPath(uri, ContactMethods.CONTENT_DIRECTORY);
+	Cursor cursor = mActivity.getContentResolver().query(uri, CONTACTS_COLUMNS, null, null, null);
+	assertTrue("returnEmailCursorAtId: Moving cursor to first row has failed", cursor.first());
+
+	int dataIndex = cursor.getColumnIndexOrThrow("data");
+	assertEquals("1" + INPUT_EMAIL_1, cursor.getString(dataIndex));
+	cursor.deactivate();
+}
+	</pre>
+
+
+<a name="androidTestingKindsofTests"></a><h3>Deciding Kinds of Tests to Write</h3>
+
+<p>Once you are bootstrapped with your test application, you can start writing tests.  There are three of types of tests you may wish to write:</p> 
+<p><ul> 
+<li> <strong>TestCase</strong>: The standard junit test case.
+</li> 
+<li> <strong>AndroidTestCase</strong>: A test case with access to a Context object that is injected for you by the instrumentation test runner.
+</li> 
+<li> <strong>InstrumentationTestCase</strong>: A test case with access to an Instrumentation, which can be used to launch activities, content providers, send key events, etc.
+</li> 
+</ul> 
+</p> 
+<p>The API Demos test suite includes examples of all three styles and can be used as a guideline for writing each type of test.</p>
+<p>There are two utility classes available for the most common uses of InstrumentationTestCase: ActivityTestCase and ProviderTestCase.  See their javadoc for more information.
+</p>
+
+
+<a name="androidInstrumentationFrameworkTroubleshooting"></a><h2>Troubleshooting</h2>
+
+<p>If you run your test cases and nothing appears to happen, have a look at <code>adb logcat</code>. The following is a common problem:</p>
+<pre class="prettify">
+I/dalvikvm(  688): threadid=11: attached from native, name=Binder Thread #1
+I/dalvikvm(  688): threadid=13: attached from native, name=Binder Thread #2
+W/ActivityManager(  469): Unable to find instrumentation info for: ComponentInfo{com.google.android.browser_instrumentation/com.google.android.browser_instrumentation.BrowserWebkitLayoutInstrumentation}
+D/AndroidRuntime(  688): Shutting down VM
+E/AndroidRuntime(  688): ERROR: thread attach failed
+</pre>		
+<p>It's possible that the instrumentation apk isn't installed on your device or that the package name is incorrect in the Manifest file. </p>
diff --git a/pdk/docs/guide/intro_source_code.jd b/pdk/docs/guide/intro_source_code.jd
new file mode 100755
index 0000000..100f3ee
--- /dev/null
+++ b/pdk/docs/guide/intro_source_code.jd
@@ -0,0 +1,169 @@
+page.title=Source Code Overview
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidSourceCodeDirectories">Introduction</a><br/>
+<a href="#Android_Source">Android Source</a><br/><div style="padding-left:40px">
+
+<a href="#androidSourceCodeDirectoriesKernel">Linux Kernel</a><br/>
+<a href="#androidSourceCodeDirectoriesDevice">Android Platform and Applications</a><br/></div>
+<a href="#androidSourceGuidelines">Adding Source Code</a><br/></div>
+
+<a name="androidSourceCodeDirectories"></a><h2>Introduction</h2>
+
+<p>Android source code is maintained in two code bases: the Android Linux kernel (<code>kernel</code> directory) and Android platform and applications (<code>device</code> directory). This document provides a high-level introduction to the source code organization and an overview of the major components of each primary directory.</p>
+
+<a name="Android_Source"></a><h2>Android Source</h2>
+
+
+<a name="androidSourceCodeDirectoriesKernel"></a><h3>Linux Kernel</h3>
+
+<p>The Android Linux kernel includes enhancements to the Linux 2.6 kernel that provide additional drivers to support the Android platform, including:</p>
+<ul>
+  <li>Binder: an OpenBinder-based driver to facilitate inter-process communication (IPC) in the Android platform.</li>
+  <li>Android Power Management: a light weight power management driver built on top of standard Linux power management but optimized for embedded systems.</li>
+  <li>Low Memory Killer: Based on hints from the userspace, the low memory killer can kill off processes to free up memory as necessary. It is designed to provide more flexibility than the Out Of Memory (OOM) killer in the standard kernel.</li>
+  <li>Logger: A light weight logging device used to capture system, radio, logdata, etc.</li>
+  <li>USB Gadget: Uses the USB function framework.</li>
+  <li>Android/PMEM: The PMEM (physical memory) driver is used to provide contiguous physical memory regions to userspace libraries that interact with the digital signal processor (DSP) and other hardware that cannot cope with scatter-gather.</li>
+  <li>Android Alarm: A driver which provides timers that can wake the device up from sleep and a monotonic timebase that runs while the device is asleep.</li>
+</ul>
+<p>Look for Android-specific enhancements in the following directories:</p>
+<p><ul>
+<li><code>/drivers/android</code></li>
+<li><code>/drivers/misc</code></li>
+<li><code>/include/linux</code></li>
+</ul>
+</p>
+
+
+<a name="androidSourceCodeDirectoriesDevice"></a><h3>Android Platform and Applications</h3>
+
+<p>The following list outlines the directory structure found within the <code>device</code> branch of Android source code:</p>
+
+
+<p><span class="lh2"><a name="gmapiMobileTagsListStart"></a></span>
+
+<ul>
+
+
+<li>apps
+Core Android applications such as Phone, Camera, and Calendar.
+</li>
+
+
+<li>boot
+Reference Android bootloader and other boot-related source code.
+</li>
+
+
+<li>commands
+Common Android commands, the most important of which is the runtime command, which does much of the initialization of the system.
+</li>
+
+
+<li>config
+System-wide makefiles and linker scripts.
+</li>
+
+
+<li>content
+Standard Android ContentProvider modules.
+</li>
+
+
+<li>dalvik
+Android runtime Virtual Machine (VM).
+</li>
+
+
+<li>data
+Fonts, keymaps, sounds, timezone information, etc.
+</li>
+
+
+<li>docs
+Full set of Android documentation.
+</li>
+
+
+<li>extlibs
+Non-Android libraries. This directory is intended to host unmodified external code. None of the libraries included within this directory rely on Android headers or libraries.
+</li>
+
+
+<li>ide
+Tools for support of the IDE's used to write Android applications.
+</li>
+
+
+<li>include
+Android system headers for inclusion.
+</li>
+
+
+<li>java
+Android core APIs, as well as some external libraries.
+</li>
+
+
+<li>libs
+Android-specific C++ based libraries.
+</li>
+
+
+<li>partner
+Project-specific source code for various proprietary components.
+</li>
+
+
+<li>prebuilt
+Prebuilt tools, like the toolchains and emulator binary.
+</li>
+
+
+<li>product
+Device-specific configuration files. This directory will include a subdirectory for each new device.
+</li>
+
+
+<li>samples
+Sample applications.
+</li>
+
+
+<li>servers
+C++ based system servers.
+</li>
+
+
+<li>system
+Core of the embedded Linux platform at the heart of Android. These essential bits are required for basic booting, operation, and debugging.
+</li>
+
+
+<li>tests
+Platform and application test cases.
+</li>
+
+
+<li>tools
+Tools for building and debugging Android (of particular interest for porting are "adb" and "emulator").
+</li>
+
+
+
+<p><span class="lh2"><a name="gmapiMobileTagsListEnd"></a></span>
+
+</ul>
+
+
+<a name="androidSourceGuidelines"></a><h2>Adding Source Code</h2>
+
+<p>You can develop Android applications with the same standard tools you use to develop any Java application. The Android core libraries provide the functionality needed to build rich mobile applications and the Android development tools are designed to simplify running, debugging, and testing your applications.</p>
+
+<p>Add project-specific source code to the Android source tree under the <code>partner</code> directory in a directory specific to the application or service you are building. For example, all Google-specific applications would be placed under <code>device/partner/google/</code>.  A Google search application would be placed under <code>device/partner/google/apps/Search</code>.
+<p>See <a href="build_new_device.html">Building Android for a new Mobile Device</a> for detailed instructions.</p>
+
+
diff --git a/pdk/docs/guide/keymaps_keyboard_input.jd b/pdk/docs/guide/keymaps_keyboard_input.jd
new file mode 100755
index 0000000..a71b5e9
--- /dev/null
+++ b/pdk/docs/guide/keymaps_keyboard_input.jd
@@ -0,0 +1,509 @@
+page.title=Keymaps and Keyboard Input
+pdk.version=1.0
+@jd:body
+
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidKeymapIntro">Introduction</a><br/>
+<a href="#androidKeymapFunctionality">Functionality</a><br/>
+<a href="#androidKeymapKeyLayoutMapTitle">Key Layout Map</a><br/><div style="padding-left:40px">
+
+<a href="#androidKeymapKeyLayoutMapSelection">Selection of a Key Layout Map</a><br/>
+<a href="#androidKeymapKeyLayoutMapFileFormat">File Format</a><br/>
+<a href="#androidKeymapKeyLayoutMapExample">Example of a Key Layout Map File</a><br/></div>
+<a href="#androidKeymapKeyCharMap">Key Character Map</a><br/><div style="padding-left:40px">
+
+<a href="#androidKeymapKeyCharMapSelection">Selection of a Key Character Map</a><br/>
+<a href="#androidKeymapKeyCharMapFileFormat">File Format</a><br/>
+<a href="#androidKeymapKeyCharMapExample">Example of a Key Character Map File</a><br/>
+<a href="#androidKeymapKeyCharMapResourceBinaryFileFormat">Resource Binary File Format</a><br/></div>
+<a href="#androidKeymapDriverTemplate">Implementing Your Own Driver (Driver Template)</a><br/>
+<a href="#androidKeymapKeyCharMapSampleImplementation">Sample Implementation</a><br/></div></font></div>
+
+<a name="androidKeymapIntro"></a><h2>Introduction</h2>
+
+<p>This document describes how keyboard input gets translated into Android actions and how you can customize key layout and key character maps to match the needs of your own device. </p>
+<p>Android uses the standard Linux input event device (<code>/dev/event0</code>) and driver as described in the <code>linux/input.h</code> kernel header file. For more information regarding standard Linux input drivers, please see <a href="http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.24.y.git;a=blob;f=Documentation/input/input.txt">Linux Input drivers</a> at <a href="http://kernel.org">http://kernel.org</a>.</p>
+
+
+
+
+<a name="androidKeymapFunctionality"></a><h2>Functionality</h2>
+
+<p>Android's input event device is structured around an interrupt or polling routine that captures the device-specific scancode and converts it to a standard form acceptable to Linux (as defined in <code>input.h</code>) before passing it to the kernel with <code>input_event()</code>.</p>
+<p>The keymap driver's other primary function is to establish a probe function that sets up the interrupt or polling function, handles hardware initialization, and attaches the driver to the input subsystem with <code>input_register_device()</code>.</p>
+<p>The table below describes the steps required to translate from keyboard input to application action: </p>
+<table border=1>
+    <tbody><tr>
+      <th scope="col">Step</th>
+        <th scope="col">Action</th>
+        <th scope="col">Explanation</th>
+    </tr>
+	<tr>
+	  <td>1.</td>
+	  <td>Window manager reads key event from Linux keyboard driver. </td>
+	  <td>Events are typically positional. For example, the top-left position on a keypad returns 16 regardless of whether that key is printed with a Q (as on a QWERTY keypad) or an A (as on an AZERTY keypads). This first conversion by the Linux Keyboard Driver yields a scancode (for example, 16).</td>
+	</tr>
+	<tr>
+	  <td>2. </td>
+	  <td>Window manager maps scancode to keycode.</td>
+	  <td>When the window manager reads a key event out of the driver, it maps the scancode to a keycode using a key layout map file. Typically, the keycode is the primary symbol screen-printed on a key. For example, <code>KEYCODE_DPAD_CENTER</code> is the center button on the five-way navigation control. Even though ALT + G generates a &quot;?&quot; character, <code>KEYCODE_G</code> is the keycode.</td>
+	  </tr>
+	<tr>
+	  <td>3. </td>
+	  <td>Window manager  sends both the scancode and the keycode to the application.</td>
+	  <td>Both the scancode and keycode are handled by the view with focus. 
+  How the application interprets both depend on the application.</td>
+	  </tr>
+</tbody>
+</table>
+
+
+<a name="androidKeymapKeyLayoutMapTitle"></a><h2>Key Layout Map</h2>
+
+
+
+<a name="androidKeymapKeyLayoutMapSelection"></a><h3>Selection of a Key Layout Map</h3>
+
+<p>Key layout maps are installed in <code>/system/usr/keylayout</code> and <code>/data/usr/keylayout</code>.</p>
+<p>For each keyboard device xxx, set the <code>android.keylayout.xxx</code> system property (see <a href="build_new_device.html">Building New Device</a> for help setting system properties). If you don't specify a keylayout file, Android will default to <code>/system/usr/keylayout/qwerty.kl</code>.</p>
+
+
+<a name="androidKeymapKeyLayoutMapFileFormat"></a><h3>File Format</h3>
+
+<p>Key layout maps are stored on the device as UTF-8 text files and have the following characteristics:</p>
+<p><ul>
+<li>Comments: The pound symbol (#) denotes a comment and everything after the pound symbol on a line is ignored.</li>
+<li>Whitespace: All empty lines are ignored.</li>
+<li>Key definitions: Key definitions follow the syntax <code>key SCANCODE KEYCODE [FLAGS...]</code>, where <code>SCANCODE</code> is a number, <code>KEYCODE</code> is defined in your specific keylayout file (<code>android.keylayout.xxx</code>), and potential <code>FLAGS</code> are defined as follows:
+<ul><li>SHIFT: While pressed, the shift key modifier is set</li>
+<li>ALT: While pressed, the alt key modifier is set</li>
+<li>CAPS: While pressed, the caps lock key modifier is set</li>
+<li>WAKE: When this key is pressed while the device is asleep, the device will wake up and the key event gets sent to the app.</li>
+<li>WAKE_DROPPED: When this key is pressed while the device is asleep, the device will wake up and the key event does not get sent to the app.</li>
+</ul>
+</li>
+</ul>
+</p>
+
+
+<a name="androidKeymapKeyLayoutMapExample"></a><h3>Example of a Key Layout Map File</h3>
+
+<p>The following code comes from  <code>android/src/device/product/generic/tuttle2.kl</code> and is an example of a complete key layout file:</p>
+<pre class="prettify">
+# Copyright 2007 Google Inc.
+
+key 2     1
+key 3     2
+key 4     3
+key 5     4
+key 6     5
+key 7     6
+key 8     7
+key 9     8
+key 10    9
+key 11    0
+key 158   BACK              WAKE_DROPPED
+key 230   SOFT_RIGHT        WAKE
+key 60    SOFT_RIGHT        WAKE
+key 107   ENDCALL           WAKE_DROPPED
+key 62    ENDCALL           WAKE_DROPPED
+key 229   MENU         WAKE_DROPPED
+key 59    MENU         WAKE_DROPPED
+key 228   POUND
+key 227   STAR
+key 231   CALL              WAKE_DROPPED
+key 61    CALL              WAKE_DROPPED
+key 232   DPAD_CENTER       WAKE_DROPPED
+key 108   DPAD_DOWN         WAKE_DROPPED
+key 103   DPAD_UP           WAKE_DROPPED
+key 102   HOME              WAKE
+key 105   DPAD_LEFT         WAKE_DROPPED
+key 106   DPAD_RIGHT        WAKE_DROPPED
+key 115   VOLUME_UP
+key 114   VOLUME_DOWN
+key 116   POWER             WAKE
+key 212   SLASH
+
+key 16    Q
+key 17    W
+key 18    E
+key 19    R
+key 20    T
+key 21    Y
+key 22    U
+key 23    I
+key 24    O
+key 25    P
+
+key 30    A
+key 31    S
+key 32    D
+key 33    F
+key 34    G
+key 35    H
+key 36    J
+key 37    K
+key 38    L
+key 14    DEL
+        
+key 44    Z
+key 45    X
+key 46    C
+key 47    V
+key 48    B
+key 49    N
+key 50    M
+key 51    COMMA
+key 52    PERIOD
+key 28    NEWLINE
+        
+key 56    ALT_LEFT
+key 42    SHIFT_LEFT
+key 215   AT
+key 57    SPACE
+key 53    SLASH
+key 127   SYM
+key 100   ALT_LEFT
+
+key 399   GRAVE
+</pre>
+
+
+<a name="androidKeymapKeyCharMap"></a><h2>Key Character Map</h2>
+
+
+
+<a name="androidKeymapKeyCharMapSelection"></a><h3>Selection of a Key Character Map</h3>
+
+<p>Key character maps are installed in <code>/system/usr/keychars</code> and <code>/data/usr/keychars</code>.</p>
+<p>For each keyboard device xxx, set the <code>android.keychar.xxx</code> system property to the full path of the desired keychar file. If you don't specify a keychar file, Android will default to <code>/system/usr/keychar/qwerty.kl</code>.
+
+
+<a name="androidKeymapKeyCharMapFileFormat"></a><h3>File Format</h3>
+
+<p>Key character maps are stored on the device as binary resources in order to reduce loading time. Key character maps have the following characteristics:</p>
+<p><ul>
+
+<li>Comments: The pound symbol (#) denotes a comment and everything after the pound symbol on a line is ignored.</li>
+<li>Whitespace: All empty lines are ignored.</li>
+<li>Column definitions: Column definitions follow the syntax <code>columns MODIFIERS [...]</code>, where <code>MODIFIERS</code> are defined as follows:
+<table border=1 cellpadding=2 cellspacing=0>
+    <tbody><tr>
+        <th scope="col">Character in MODIFIERS</th>
+        <th scope="col">Corresponding bit in the modifiers</th>
+    </tr>
+    <tr>
+        <td>O</td>
+        <td>no modifiers</td>
+    </tr>
+    <tr>
+        <td>S</td>
+        <td>MODIFIER_SHIFT</td>
+    </tr>
+    <tr>
+        <td>C</td>
+        <td>MODIFIER_CONTROL</td>
+    </tr>
+    <tr>
+        <td>L</td>
+        <td>MODIFIER_CAPS_LOCK</td>
+    </tr>
+    <tr>
+        <td>A</td>
+        <td>MODIFIER_ALT</td>
+    </tr>
+</table>
+</li>
+<li>Key definitions: Key definitions have the syntax <code>key SCANCODE CHARACTER [...]</code> where <code>SCANCODE</code> is a number and <code>CHARACTER</code> values are either UTF-8 characters in quotation marks (for example, "a") or a numeric value that <code>strtol</code> can parse.</li>
+</ul></p>
+
+
+<a name="androidKeymapKeyCharMapExample"></a><h3>Example of a Key Character Map File</h3>
+
+<p>The following code comes from <code>android/src/device/product/generic/tuttle2.kcm</code> and represents a complete key character file:</p>
+<p>The type line indicates what kind of keyboard your device implements. Possible types include:</p>
+<p><ul>
+<li><b>NUMERIC</b>: A numeric (12-key) keyboard.</li>
+<li><b>Q14</b>: A keyboard that includes all letters but multiple letters per key.</li>
+<li><b>QWERTY</b>: A keyboard with all letters and possibly numbers. This option applies to all full keyboard configurations, such as AZERTY.</li>
+</ul>
+</p>
+<pre class="prettify">
+# Copyright 2007 Google Inc.
+
+[type=QWERTY]
+
+# keycode   base    caps    fn      caps_fn number  display_label
+
+A           'a'     'A'     '%'     0x00    '%'     'A'
+B           'b'     'B'     '='     0x00    '='     'B'
+C           'c'     'C'     '8'     0x00E7  '8'     'C'
+D           'd'     'D'     '5'     0x00    '5'     'D'
+E           'e'     'E'     '2'     0x0301  '2'     'E'
+F           'f'     'F'     '6'     0x00A5  '6'     'F'
+G           'g'     'G'     '-'     '_'     '-'     'G'
+H           'h'     'H'     '['     '{'     '['     'H'
+I           'i'     'I'     '$'     0x0302  '$'     'I'
+J           'j'     'J'     ']'     '}'     ']'     'J'
+K           'k'     'K'     '"'     '~'     '"'     'K'
+L           'l'     'L'     '''     '`'     '''     'L'
+M           'm'     'M'     '>'     0x00    '>'     'M'
+N           'n'     'N'     '<'     0x0303  '<'     'N'
+O           'o'     'O'     '('     0x00    '('     'O'
+P           'p'     'P'     ')'     0x00    ')'     'P'
+Q           'q'     'Q'     '*'     0x0300  '*'     'Q'
+R           'r'     'R'     '3'     0x20AC  '3'     'R'
+S           's'     'S'     '4'     0x00DF  '4'     'S'
+T           't'     'T'     '+'     0x00A3  '+'     'T'
+U           'u'     'U'     '&'     0x0308  '&'     'U'
+V           'v'     'V'     '9'     '^'     '9'     'V'
+W           'w'     'W'     '1'     0x00    '1'     'W'
+X           'x'     'X'     '7'     0xEF00  '7'     'X'
+Y           'y'     'Y'     '!'     0x00A1  '!'     'Y'
+Z           'z'     'Z'     '#'     0x00    '#'     'Z'
+
+COMMA       ','     ';'     ';'     '|'     ','     ','
+PERIOD      '.'     ':'     ':'     0x2026  '.'     '.'
+AT          '@'     '0'     '0'     0x2022  '0'     '@'
+SLASH       '/'     '?'     '?'     '\'     '/'     '/'
+
+SPACE       0x20    0x20    0x9     0x9     0x20    0x20
+NEWLINE     0xa     0xa     0xa     0xa     0xa     0xa
+
+# on pc keyboards
+TAB         0x9     0x9     0x9     0x9     0x9     0x9
+0           '0'     ')'     ')'     ')'     '0'     '0'
+1           '1'     '!'     '!'     '!'     '1'     '1'
+2           '2'     '@'     '@'     '@'     '2'     '2'
+3           '3'     '#'     '#'     '#'     '3'     '3'
+4           '4'     '$'     '$'     '$'     '4'     '4'
+5           '5'     '%'     '%'     '%'     '5'     '5'
+6           '6'     '^'     '^'     '^'     '6'     '6'
+7           '7'     '&'     '&'     '&'     '7'     '7'
+8           '8'     '*'     '*'     '*'     '8'     '8'
+9           '9'     '('     '('     '('     '9'     '9'
+
+GRAVE         '`'     '~'     '`'     '~'     '`'     '`'
+MINUS         '-'     '_'     '-'     '_'     '-'     '-'
+EQUALS        '='     '+'     '='     '+'     '='     '='
+LEFT_BRACKET  '['     '{'     '['     '{'     '['     '['
+RIGHT_BRACKET ']'     '}'     ']'     '}'     ']'     ']'
+BACKSLASH     '\'     '|'     '\'     '|'     '\'     '\'
+SEMICOLON     ';'     ':'     ';'     ':'     ';'     ';'
+APOSTROPHE    '''     '"'     '''     '"'     '''     '''
+STAR          '*'     '*'     '*'     '*'     '*'     '*'
+POUND         '#'     '#'     '#'     '#'     '#'     '#'
+PLUS          '+'     '+'     '+'     '+'     '+'     '+'
+</pre>
+
+
+<a name="androidKeymapKeyCharMapResourceBinaryFileFormat"></a><h3>Resource Binary File Format</h3>
+
+<p>The file snippet above gets converted to the following by the <code>makekcharmap</code> tool as part of the build process. You can <code>mmap</code> this file in and share the approximately 4k of memory that it uses between processes to minimize load time.</p>
+<table>
+    <tbody><tr>
+        <th scope="col">Offset</th>
+
+        <th scope="col">Size (bytes)</th>
+        <th scope="col">Description</th>
+    </tr>
+    <tr>
+        <td>0x00-0x0b</td>
+        <td></td>
+        <td>The ascii value "keycharmap1" including the null character</td>
+
+    </tr>
+    <tr>
+        <td>0x0c-0x0f</td>
+        <td></td>
+        <td>padding</td>
+    </tr>
+    <tr>
+        <td>0x10-0x13</td>
+
+        <td></td>
+        <td>The number of entries in the modifiers table (COLS)</td>
+    </tr>
+    <tr>
+        <td>0x14-0x17</td>
+        <td></td>
+        <td>The number of entries in the characters table (ROWS)</td>
+
+    </tr>
+    <tr>
+        <td>0x18-0x1f</td>
+        <td></td>
+        <td>padding</td>
+    </tr>
+    <tr>
+        <td></td>
+
+        <td>4*COLS</td>
+        <td>Modifiers table.  The modifier mask values that each of the 
+            columns in the characters table correspond to.</td>
+    </tr>
+    <tr>
+        <td></td>
+        <td></td>
+        <td>padding to the next 16 byte boundary</td>
+
+    </tr>
+    <tr>
+        <td></td>
+        <td>4*COLS*ROWS</td>
+        <td>Characters table.  The modifier mask values that each of the
+            columns correspond to.</td>
+    </tr>
+</tbody></table>
+
+
+<a name="androidKeymapDriverTemplate"></a><h2>Implementing Your Own Driver (Driver Template)</h2>
+
+<p>The following file, <code>pguide_events.c</code>, illustrates how to implement an Android keymap driver.</p>
+<pre class="prettyprint">
+/*
+ * pguide_events.c
+ *
+ * ANDROID PORTING GUIDE: INPUT EVENTS DRIVER TEMPLATE
+ *
+ * This template is designed to an example of the functionality
+ * necessary for Android to recieve input events.  The PGUIDE_EVENT
+ * macros are meant as pointers indicating where to implement the
+ * hardware specific code necessary for the new device.  The existence
+ * of the macros is not meant to trivialize the work required, just as
+ * an indication of where the work needs to be done.
+ * 
+ * Copyright 2007, Google Inc.
+ * Based on goldfish-events.c
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/types.h>
+#include <linux/input.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+
+
+#include <asm/irq.h>
+#include <asm/io.h>
+
+
+
+#define PGUIDE_EVENTS_INTERRUPT do{} while(0)
+#define PGUIDE_EVENTS_PROBE do{} while(0)
+
+struct event_dev {
+    struct input_dev *input;
+    int irq;
+};
+
+static irqreturn_t pguide_events_interrupt(int irq, void *dev_id)
+{
+    struct event_dev *edev = dev_id;
+    unsigned type=0, code=0, value=0;
+
+    /* Set up type, code, and value per input.h
+     */
+    PGUIDE_EVENTS_INTERRUPT;
+
+    input_event(edev->input, type, code, value);
+    return IRQ_HANDLED;
+}
+
+static int pguide_events_probe(struct platform_device *pdev)
+{
+    struct input_dev *input_dev;
+    struct event_dev *edev;
+    
+    printk("*** pguide events probe ***\n");
+
+    edev = kzalloc(sizeof(struct event_dev), GFP_KERNEL);
+    input_dev = input_allocate_device();
+
+    /* Setup edev->irq and do any hardware init */
+    PGUIDE_EVENTS_PROBE;
+
+    if(request_irq(edev->irq, pguide_events_interrupt, 0,
+                   "pguide_events", edev) < 0) {
+        goto fail;
+    }
+    
+        /* indicate that we generate key events */
+    set_bit(EV_KEY, input_dev->evbit);
+    set_bit(EV_REL, input_dev->evbit);
+    set_bit(EV_ABS, input_dev->evbit);
+
+    /* indicate that we generate *any* key event */
+
+    bitmap_fill(input_dev->keybit, KEY_MAX);
+    bitmap_fill(input_dev->relbit, REL_MAX);
+    bitmap_fill(input_dev->absbit, ABS_MAX);
+    
+    platform_set_drvdata(pdev, edev);
+
+    input_dev->name = "pguide_events";
+    input_dev->private = edev;
+    input_dev->cdev.dev = &pdev->dev;
+    
+    input_register_device(input_dev);
+    return 0;
+
+fail:
+    kfree(edev);
+    input_free_device(input_dev);
+    
+    return -EINVAL;
+}
+
+static struct platform_driver pguide_events_driver = {
+    .probe = pguide_events_probe,
+    .driver = {
+        .name = "pguide_events",
+    },
+};
+
+static int __devinit pguide_events_init(void)
+{
+    return platform_driver_register(&pguide_events_driver);
+}
+
+
+static void __exit pguide_events_exit(void)
+{
+}
+
+module_init(pguide_events_init);
+module_exit(pguide_events_exit);
+
+MODULE_DESCRIPTION("Pguide Event Device");
+MODULE_LICENSE("GPL");
+</pre>
+
+
+<a name="androidKeymapKeyCharMapSampleImplementation"></a><h2>Sample Implementation</h2>
+
+<p>Assume the following for the setup of a new keypad device:</p>
+<pre class="prettify">
+android.keylayout.partnerxx_keypad = /system/usr/keylayout/partnerxx_keypad.kl
+android.keychar.partnerxx_keypad = /system/usr/keychars/partnerxx.kcm
+</pre>
+<p>The following example log file indicates that you have correctly registered the new keypad:</p>
+<pre class="prettify">
+I/EventHub( 1548): New device: path=/dev/input/event0 name=partnerxx_keypad id=0x10000 (of 0x1) index=1 fd=30
+I/EventHub( 1548): new keyboard input device added, name = partnerxx_keypad
+D/WindowManager( 1548): Starting input thread.
+D/WindowManager( 1548): Startup complete!
+I/EventHub( 1548): New keyboard: name=partnerxx_keypad 
+  keymap=partnerxx_keypad.kl 
+  keymapPath=/system/usr/keychars/partnerxx_keypad.kcm.bin
+I/ServiceManager( 1535): ServiceManager: addService(window, 0x13610)
+I/EventHub( 1548): Reporting device opened: id=0x10000, name=/dev/input/event0
+I/KeyInputQueue( 1548): Device added: id=0x10000, name=partnerxx_keypad, classes=1
+I/KeyInputQueue( 1548):   Keymap: partnerxx_keypad.kl
+</pre>
+<p>The snippet above contains artificial line breaks to maintain a print-friendly document.</p>
\ No newline at end of file
diff --git a/pdk/docs/guide/modules.html b/pdk/docs/guide/modules.html
new file mode 100755
index 0000000..ea2a07a
--- /dev/null
+++ b/pdk/docs/guide/modules.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Doxygen-Generated Content</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<style type="text/css">
+<!--
+.navigation {
+	display: none;
+}
+-->
+</style>
+</head>
+<body>
+<!-- Generated by Doxygen 1.5.6 -->
+<div class="navigation" id="top">
+  <div class="tabs">
+    <ul>
+      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
+      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
+      <li><a href="files.html"><span>Files</span></a></li>
+    </ul>
+  </div>
+</div>
+<div class="contents">
+<h1>Modules</h1>Here is a list of all modules:<ul>
+<li><a class="el" href="group__networking.html">Neworking Support</a>
+<ul>
+<li><a class="el" href="group__memory.html">Porividng Heap Memory</a>
+</ul>
+</ul>
+</div>
+</body>
+</html>
diff --git a/pdk/docs/guide/pdk_toc.cs b/pdk/docs/guide/pdk_toc.cs
new file mode 100644
index 0000000..025cf65
--- /dev/null
+++ b/pdk/docs/guide/pdk_toc.cs
@@ -0,0 +1,72 @@
+<ul> 
+
+<li> <h2>Introduction</h2> 
+  <ul> 
+     <li><a href="<?cs var:toroot ?>guide/system_requirements.html">Device Requirements</a></li>            
+  </ul> 
+</li> 
+
+
+<li> <h2>Dev Environment Setup</h2> 
+  <ul> 
+	<li><a href="<?cs var:toroot ?>guide/build_system.html">Build System</a></li> 
+  </ul> 
+</li> 
+
+
+<li><h2>Basic Bring up</h2> 
+  <ul> 
+	<li><a href="<?cs var:toroot ?>guide/build_new_device.html">Building New Device</a></li> 
+	<li><a href="<?cs var:toroot ?>guide/bring_up.html">Bring up</a></li> 
+	<li><a href="<?cs var:toroot ?>guide/keymaps_keyboard_input.html">Keymaps and Keyboard</a></li> 
+	<li><a href="<?cs var:toroot ?>guide/display_drivers.html">Display Drivers</a></li> 
+  </ul> 
+</li> 
+
+
+<li> <h2>Multimedia</h2> 
+  <ul> 
+	<li><a href="<?cs var:toroot ?>guide/audio.html">Audio</a></li> 
+	<li><a href="<?cs var:toroot ?>guide/camera.html">Camera</a></li>			
+  </ul> 
+</li> 
+
+<li> <h2>Power Management</h2> 
+  <ul> 
+	<li><a href="<?cs var:toroot ?>guide/power_management.html">Power Management</a></li> 
+  </ul> 
+</li> 
+
+<li> <h2>Networking</h2> 
+  <ul> 
+	<li><a href="<?cs var:toroot ?>guide/wifi.html">Wi-Fi</a></li> 
+	<li><a href="<?cs var:toroot ?>guide/gps.html">GPS</a></li> 
+	<li><a href="<?cs var:toroot ?>guide/bluetooth.html">Bluetooth</a></li> 
+  </ul> 
+</li> 
+
+<li> <h2>Telephony</h2> 
+  <ul> 
+	<li><a href="<?cs var:toroot ?>guide/telephony.html">Radio Interface Layer</a></li> 
+  </ul> 
+</li> 
+
+<li> <h2>Testing</h2> 
+  <ul> 
+	<li><a href="<?cs var:toroot ?>guide/instrumentation_testing.html">Instrumentation Testing</a></li> 
+  </ul> 
+</li> 
+
+<li> <h2>Debugging</h2>
+  <ul>
+    <li><a href="<?cs var:toroot ?>guide/debugging_gdb.html">Debugging with GDB</a></li>
+    <li><a href="<?cs var:toroot ?>guide/debugging_native.html">Debugging Native Code</a></li>
+  </ul>
+</li>
+</ul>
+
+<script type="text/javascript">
+<!--
+    buildToggleLists();
+//-->
+</script>
diff --git a/pdk/docs/guide/power_management.jd b/pdk/docs/guide/power_management.jd
new file mode 100755
index 0000000..6a1dbc3
--- /dev/null
+++ b/pdk/docs/guide/power_management.jd
@@ -0,0 +1,109 @@
+page.title=Power Management
+pdk.version=1.0
+@jd:body
+
+
+
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidPowerIntro">Introduction</a><br/>
+<a href="#androidPowerWakeLocks">Wake Locks</a><br/><div style="padding-left:40px">
+
+<a href="#androidPowerWakeLocksDefinitions">Types of Wake Locks</a><br/>
+<a href="#androidPowerWakeLockExample">Exploring a Wake Lock Example</a><br/></div>
+<a href="#androidPowerPowerManagerClass">PowerManager class</a><br/>
+<a href="#androidPowerKernelRegistration">Registering Drivers with the PM Driver</a><br/></div></font></div>
+
+<a name="androidPowerIntro"></a><h2>Introduction</h2>
+
+<p>Android supports its own Power Management (on top of the standard Linux Power Management) designed with the premise that the CPU shouldn't consume power if no applications or services require power. For more information regarding standard Linux power management, please see <a href="http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.24.y.git;a=blob;f=Documentation/pm.txt">Linux Power Management Support</a> at <a href="http://kernel.org">http://kernel.org</a>.</p>
+<p>Android requires that applications and services request CPU resources with &quot;wake locks&quot; through the Android application framework and native Linux libraries. If there are no active wake locks, Android will shut down the CPU. </p>
+<p>The image below illustrates the Android power management architecture. </p>
+<p><img src='images/androidPMArchitecture.gif'></p>
+
+Solid elements represent Android blocks and dashed elements represent partner-specific blocks.
+
+
+
+<a name="androidPowerWakeLocks"></a><h2>Wake Locks</h2>
+
+<p>Wake locks are used by applications and services to request CPU resources.</p>
+
+
+<a name="androidPowerWakeLocksDefinitions"></a><h3>Types of Wake Locks</h3>
+
+<table border=1 cellpadding=2 cellspacing=0>
+    <tbody><tr>
+        <th scope="col">Wake Lock </th>
+        <th scope="col">Description</th>
+    </tr>
+    <tr>
+      <td>ACQUIRE_CAUSES_WAKEUP<br/></td>
+        <td>Normally wake locks don't actually wake the device, they just cause it to remain on once it's already on. Think of the video player app as the normal behavior. Notifications that pop up and want the device to be on are the exception; use this flag to be like them.</td>
+    </tr>
+    <tr>
+      <td>FULL_WAKE_LOCK</td>
+      <td>Wake lock that ensures that the screen and keyboard are on at full brightness. </td>
+    </tr>
+    <tr>
+      <td>ON_AFTER_RELEASE</td>
+      <td>When this wake lock is released, poke the user activity timer so the screen stays on for a little longer.</td>
+    </tr>
+    <tr>
+      <td>PARTIAL_WAKE_LOCK</td>
+      <td>Wake lock that ensures that the CPU is running. The screen might not be on.</td>
+    </tr>
+    <tr>
+      <td>SCREEN_BRIGHT_WAKE_LOCK</td>
+      <td>Wake lock that ensures that the screen is on at full brightness; the keyboard backlight will be allowed to go off.</td>
+    </tr>
+    <tr>
+      <td>SCREEN_DIM_WAKE_LOCK</td>
+      <td>Wake lock that ensures that the screen is on, but the keyboard backlight will be allowed to go off, and the screen backlight will be allowed to go dim.</td>
+    </tr>
+</table>
+
+
+<a name="androidPowerWakeLockExample"></a><h3>Exploring a Wake Lock Example</h3>
+
+<p>All power management calls follow the same basic format:</p>
+<p><ol><li>Acquire handle to the <code>PowerManager</code> service.</li>
+<li>Create a wake lock and specify the power management flags for screen, timeout, etc.</li>
+<li>Acquire wake lock.</li>
+<li>Perform operation (play MP3, open HTML page, etc.).</li>
+<li>Release wake lock.</li>
+</ol>
+</p>
+<p>The snippet below illustrates this process.</p>
+<pre class="prettify">
+PowerManager pm = (PowerManager)mContext.getSystemService(
+                                          Context.POWER_SERVICE);
+PowerManager.WakeLock wl = pm.newWakeLock(
+                                      PowerManager.SCREEN_DIM_WAKE_LOCK
+                                      | PowerManager.ON_AFTER_RELEASE,
+                                      TAG);
+wl.acquire();
+ // ...
+wl.release();
+</pre>
+
+
+<a name="androidPowerPowerManagerClass"></a><h2>PowerManager class</h2>
+
+<p>The Android Framework exposes power management to services and applications through the <code>PowerManager</code> class.</p>
+<p>User space native libraries (any hardware function in <code>//device/lib/hardware/</code> meant to serve as supporting libraries for Android runtime) should never call into Android Power Management directly (see the image above). Bypassing the power management policy in the Android runtime will destabilize the system.</p>
+<p>All calls into Power Management should go through the Android runtime PowerManager APIs.</p>
+<p> Please visit 
+<a href="http://code.google.com/android/reference/android/os/PowerManager.html">http://code.google.com/android/reference/android/os/PowerManager.html</a> for a description of the API and examples.</p>
+
+
+<a name="androidPowerKernelRegistration"></a><h2>Registering Drivers with the PM Driver</h2>
+
+<p>You can register Kernel-level drivers with the Android Power Manager driver so that they're notified immediately before power down or after power up. For example, you might set a display driver to completely power down when a request comes in to power down from the user space (see the Android MSM MDDI display driver for a sample implementation).</p>
+<p>To register drivers with the Android PM driver, implement call-back handlers and register them with the Android PM, as illustrated in the snippet below:</p>
+<pre class="prettify">
+android_register_early_suspend(android_early_suspend_t *handler)
+android_register_early_resume(android_early_resume_t *handler)
+</pre>
+<p>It is critical in a drive to return immediately and not wait for anything to happen in the call back.</p>
diff --git a/pdk/docs/guide/source_setup_guide.jd b/pdk/docs/guide/source_setup_guide.jd
new file mode 100755
index 0000000..5c0bed5
--- /dev/null
+++ b/pdk/docs/guide/source_setup_guide.jd
@@ -0,0 +1,116 @@
+page.title=Host System Setup
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidSourceSetupIntro">Introduction</a><br/>
+<a href="#androidSourceSetupBuildSystemSetupPackages">Installing Packages</a><br/><div style="padding-left:40px">
+
+<a href="#androidSourceSetupBuildSystemSetupRequiredPackages">Required Packages</a><br/>
+<a href="#androidSourceSetupUbuntu606Intro">Ubuntu 6.06 (Dapper)</a><br/>
+<a href="#androidSourceSetupUbuntu710Intro">Ubuntu 7.10</a><br/>
+<a href="#androidSourceSetupUbuntu804Intro">Ubuntu 8.04</a><br/></div>
+<a href="#androidSourceSetupBuildSystemSetupJavaIntro">Installing Java</a><br/></div>
+
+<a name="androidSourceSetupIntro"></a><h2>Introduction</h2>
+
+<p>This section provides instructions on how to configure your host system to build Android for mobile devices. While Android is designed as host-environment agnostic, it has been tested and is known to work on the following Linux operating system; Ubuntu 6.06 (Dapper), 7.10 (Gutsy), and 8.04. Cygwin is not recommended. </p>
+
+
+<a name="androidSourceSetupBuildSystemSetupPackages"></a><h2>Installing Packages</h2>
+
+
+
+<a name="androidSourceSetupBuildSystemSetupRequiredPackages"></a><h3>Required Packages</h3>
+
+<p>Android requires the following system packages:</p>
+<p><ul>
+<li>flex: This lexical analyzer generator is used to read a given input file for a description of a scanner to generate.</li>
+<li>bison: This is a general-purpose parser generator.</li>
+<li>gperf: This is a perfect hash function generator.</li>
+<li>libesd0-dev: This enlightened sound daemon (dev files) is used to mix digitized audio streams for playback by a single device.</li>
+<li>libwxgtk2.6-dev: This package provides GUI components and other facilities for many different platforms.</li>
+<li>build-essential: This package contains a list of packages considered fundamental to building Debian packages.</li>
+</ul></p>
+
+
+<a name="androidSourceSetupUbuntu606Intro"></a><h3>Ubuntu 6.06 (Dapper)</h3>
+
+<p>On a clean Dapper system, type the following:</p>
+<pre class="prettyprint">
+% sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev 
+   build-essential
+</pre>
+<p>This snippet includes an artificial line break to maintain a print-friendly document.</p>
+
+
+<a name="androidSourceSetupUbuntu710Intro"></a><h3>Ubuntu 7.10</h3>
+
+<ol><li>The libwxgtk2.6-dev package will only work if the following code is included in your  /etc/apt/source file.
+<p><pre class="prettyprint">
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team, and may not be under a free license. Please satisfy yourself as to
+## your rights to use the software. Also, please note that software in
+## universe WILL NOT receive any review or updates from the Ubuntu security
+## team.
+# Line commented out by installer because it failed to verify:
+deb http://us.archive.ubuntu.com/ubuntu/ gutsy universe
+# Line commented out by installer because it failed to verify:
+deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy universe
+# Line commented out by installer because it failed to verify:
+deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe
+# Line commented out by installer because it failed to verify:
+deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe
+</pre></p></li>
+<li>Install required packages with the following command:
+<p><pre class="prettyprint">
+% sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev
+   build-essential
+</pre></p>
+This snippet includes an artificial line break to maintain a print-friendly document.
+</li>
+<li>
+<p>Install the X11 development environment with the following commands:</p>
+<p><pre class="prettyprint">
+% sudo apt-get install x-dev
+% sudo apt-get install libx11-dev
+% sudo apt-get install libncurses5-dev
+</pre></p>
+</li>
+</ol>
+
+
+<a name="androidSourceSetupUbuntu804Intro"></a><h3>Ubuntu 8.04</h3>
+
+<p>On a clean system, type the following:</p>
+<pre class="prettify">
+% sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev
+zlib1g-dev build-essential
+% sudo apt-get install x-dev
+% sudo apt-get install libx11-dev
+% sudo apt-get install libncurses5-dev
+% sudo apt-get install sun-java5-jdk
+</pre>
+
+
+<a name="androidSourceSetupBuildSystemSetupJavaIntro"></a><h2>Installing Java</h2>
+
+<p>Android source code includes a hard dependency on the Java Developer Kit (JDK) 5.0 Update 12 or greater. The specific file name of the Update 12 package is <code>jdk-1_5_0_12-linux-i586.bin</code>. To download this version of the Java JDK:</p>
+<p><ol>
+<li>Navigate to: <a href="http://java.sun.com/products/archive/">http://java.sun.com/products/archive/</a>.</li>
+<li>Select '5.0 Update 12' from the 'Java 2 Platform Standard Edition (J2SE)' -> 'JDK/JRE - 5.0' field and click 'Go.'</li>
+<li>Click 'Download JDK.'</li>
+<li>In the 'Linux Platform' section, click 'Linux self-extracting file' associated with the jdk-1_5_0_12-linux-i586.bin package.</li>
+<li>Follow the installation instructions.</li>
+</ol>
+</p>
+
+<p>Once you have cleanly installed the JDK, modify your PATH environment variable to include <code>&lt;jdk-install-dir&gt;/jdk1.5.0_12/bin</code> at its beginning so that Dapper will use the correct installation. </p>
+<p><b>Ubuntu 7.10</b></p>
+<p>An alternative method to quickly install Java is to enable multiverse repo in <code>/etc/apt/sources.list</code> and then execute:</p>
+<pre class="prettyprint">
+% sudo apt-get install sun-java5-jdk
+</pre>
+
+
+
diff --git a/pdk/docs/guide/system_requirements.jd b/pdk/docs/guide/system_requirements.jd
new file mode 100755
index 0000000..2d3fcd6
--- /dev/null
+++ b/pdk/docs/guide/system_requirements.jd
@@ -0,0 +1,59 @@
+page.title=Device Requirements
+pdk.version=1.0
+@jd:body
+
+<p>While Android is designed to support a wide variety of hardware platforms and configurations, this section provides recommended minimum device requirements.</p>
+<table border=1 cellpadding=2 cellspacing=0>
+    <tbody><tr>
+      <th scope="col">Feature</th>
+        <th scope="col">Minimum Requirement</th>
+        <th scope="col">Notes</th>
+    </tr>
+	<tr>
+	  <td>Chipset</td>
+	  <td>ARM-based</td>
+	  <td>For the first release, Android is primarily targeted towards mobile handsets and portions of the platform, such as Dalvik VM graphics processing, currently assume an ARM architecture.</td>
+	</tr>
+	<tr>
+	  <td>Memory</td>
+	  <td>128 MB RAM; 256 MB Flash External</td>
+	  <td>Android can boot and run in configurations with less memory, but it isn't recommended.</td>
+	  </tr>
+	<tr>
+	  <td>Storage</td>
+	  <td>Mini or Micro SD </td>
+	  <td>Not necessary for basic bring up, but recommended.</td>
+	  </tr>
+	<tr>
+	  <td>Primary Display </td>
+	  <td>HVGA required</td>
+	  <td>The current Android interface targets a touch-based HVGA resolution display with a touch-interface no smaller than 2.8 inches in size. However, smaller displays will suffice for initial porting.</td>
+	  </tr>
+	<tr>
+	  <td>Navigation Keys </td>
+	  <td>5-way navigation with 5 application keys, power, camera and volume controls</td>
+	  <td>&nbsp;</td>
+	  </tr>
+	<tr>
+	  <td>Camera</td>
+	  <td>2MP CMOS</td>
+	  <td>Not required for basic bring up. </td>
+	  </tr>
+	<tr>
+	  <td>USB</td>
+	  <td>Standard mini-B USB interface</td>
+	  <td>Android uses the USB interface for flashing the device system images and debugging a running device.</td>
+	  </tr>
+	<tr>
+	  <td>Bluetooth</td>
+	  <td>1.2 or 2.0 </td>
+	  <td>Not required for initial bring up.</td>
+	  </tr>
+</tbody>
+</table>
+<p>If available, your Android device can also benefit from the following optional device characteristics:</p>
+<ul>
+  <li>QWERTY keyboard</li>
+  <li>WiFi</li>
+  <li>GPS</li>
+</ul>
\ No newline at end of file
diff --git a/pdk/docs/guide/telephony.jd b/pdk/docs/guide/telephony.jd
new file mode 100755
index 0000000..38b8c3b
--- /dev/null
+++ b/pdk/docs/guide/telephony.jd
@@ -0,0 +1,224 @@
+page.title=Radio Layer Interface
+pdk.version=1.0
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidTelephonyIntro">Introduction</a><br/>
+<a href="#androidTelephonyRILInitialization">RIL Initialization</a><br/>
+<a href="#androidTelephonyRILIntro">RIL Interaction</a><br/><div style="padding-left:40px">
+
+<a href="#androidTelephonyRILSolicited">Solicited</a><br/>
+<a href="#androidTelephonyRILUnsolicited">Unsolicited</a><br/></div>
+<a href="#androidTelephonyRILImplementing">Implementing the RIL</a><br/><div style="padding-left:40px">
+
+<a href="#androidTelephonyRILInit">RIL_Init</a><br/></div>
+<a href="#androidTelephonyRILFunctions">RIL Functions</a><br/><div style="padding-left:40px">
+
+<a href="#androidRilFunctionsSolicited">RIL Solicited Command Requests</a><br/>
+<a href="#androidRilFunctionsUnsolicited">RIL Unsolicited Commands</a><br/></div></div></font></div>
+
+<a name="androidTelephonyIntro"></a><h2>Introduction</h2>
+
+<p>Android's Radio Interface Layer (RIL) provides an abstraction layer between Android telephony services (<a href="http://code.google.com/android/reference/android/telephony/package-descr.html">android.telephony</a>) and radio hardware. The RIL is radio agnostic, and includes support for Global System for Mobile communication (GSM)-based radios.&nbsp;</P>
+
+
+<p>The diagram below illustrates the RIL in the context of Android's Telephony system architecture.</p>
+<p><img src="images/telephony.gif"></p>
+
+Solid elements represent Android blocks and dashed elements represent partner-specific blocks.
+
+<p>The RIL consists of two primary components:</p>
+<p><ul>
+<li><b>RIL Daemon</b>: The RIL daemon initializes the Vendor RIL, processes all communication from Android telephony services, and dispatches calls to the Vendor RIL as solicited commands.</li>
+<li><b>Vendor RIL</b>: The radio-specific Vendor RIL of <code>ril.h</code> that processes all communication with radio hardware and dispatches calls to the RIL Daemon (<code>rild</code>) through unsolicited commands.</li>
+</ul>
+</p>
+
+
+<a name="androidTelephonyRILInitialization"></a><h2>RIL Initialization</h2>
+
+<p>Android initializes the telephony stack and the Vendor RIL at startup as described in the sequence below:</p>
+<p><ol>
+<li>RIL daemon reads <code>rild.lib</code> path and <code>rild.libargs</code> system properties to determine the Vendor RIL library to use and any initialization arguments to provide to the Vendor RIL</li>
+<li>RIL daemon loads the Vendor RIL library and calls <code>RIL_Init</code> to initialize the RIL and obtain a reference to RIL functions</li>
+<li>RIL daemon calls <code>RIL_register</code> on the Android telephony stack, providing a reference to the Vendor RIL functions</li></ol>
+</p>
+<p>See the RIL Daemon source code at <code>//device/commands/rild/rild.c</code> for details.</p>
+
+
+<a name="androidTelephonyRILIntro"></a><h2>RIL Interaction</h2>
+
+<p>There are two forms of communication that the RIL handles:</p>
+<ul>
+  <li>Solicited commands: Solicited commands originated by RIL lib, such as <code>DIAL</code> and <code>HANGUP</code>.</li>
+  <li>Unsolicited responses: Unsolicited responses that originate from the baseband, such as <code>CALL_STATE_CHANGED</code> and <code>NEW_SMS</code>.</li>
+</ul>
+
+
+<a name="androidTelephonyRILSolicited"></a><h3>Solicited</h3>
+
+<p>The following snippet illustrates the interface for solicited commands:</p>
+<pre class="prettify">
+void OnRequest (int request_id, void *data, size_t datalen, RIL_Token t);&#13;
+void OnRequestComplete (RIL_Token t, RIL_Error e, void *response, size_t responselen);&#13;
+</pre>
+<p>There are over sixty solicited commands grouped by the following families:</p>
+<p>
+<ul>
+  <li>SIM PIN, IO, and IMSI/IMEI (11)</li>
+  <li>Call status and handling (dial, answer, mute&hellip;) (16)</li>
+  <li>Network status query (4)</li>
+  <li>Network setting (barring, forwarding, selection&hellip;) (12)</li>
+  <li>SMS (3)</li>
+  <li>PDP connection (4)</li>
+  <li>Power and reset (2)</li>
+  <li>Supplementary Services (5)</li>
+  <li>Vendor defined and support (4)<br/>
+                    </li>
+</ul>
+</p>
+<p>The following diagram illustrates a solicited call in Android.</p>
+<p><img src="images/telephony_solicted_example.gif"></p>
+
+
+<a name="androidTelephonyRILUnsolicited"></a><h3>Unsolicited</h3>
+
+<p>The following snippet illustrates the interface for unsolicited commands:</p>
+<pre class="prettify">
+void OnUnsolicitedResponse (int unsolResponse, void *data, size_t datalen);
+</pre>
+<p>There are over ten unsolicited commands grouped by the following families:</p>
+<p>
+<ul>
+<li>Network status changed (4)</li>
+<li>New SMS notify (3)</li>
+<li>New USSD notify (2)</li>
+<li>Signal strength or time changed (2)</li>
+</ul>
+</p>
+<p>The following diagram illustrates an unsolicited call in Android.</p>
+<p><img src="images/telephony_unsolicted_example.gif"></p>
+
+
+<a name="androidTelephonyRILImplementing"></a><h2>Implementing the RIL</h2>
+
+<p>To implement a radio-specific RIL, create a shared library that implements a set of functions required by Android to process radio requests. The required functions are defined in the RIL header (<code>/include/telephony/ril.h</code>).</p>
+<p>The Android radio interface is radio-agnostic and the Vendor RIL can use any protocol to communicate with the radio.&nbsp;Android provides a reference Vendor RIL, using the Hayes AT command set, that you can use as a quick start for telephony testing and a guide for commercial vendor RILs. The source code for the reference RIL is found at <code>/commands/reference-ril/</code>.</p>
+<p>Compile your Vendor RIL as a shared library using the convention <code>libril-&lt;companyname&gt;-&lt;RIL version&gt;.so</code>, for example, libril-acme-124.so, where:</p>
+<p><ul>
+<li><b>libril</b>: all vendor RIL implementations start with 'libril'</li>
+<li><b>&lt;companyname&gt;</b>: a company-specific abbreviation</li>
+<li><b>&lt;RIL version&gt;</b>: RIL version number</li>
+<li><b>so</b>: file extension</li>
+</ul>
+</p>
+
+
+<a name="androidTelephonyRILInit"></a><h3>RIL_Init</h3>
+
+<p>Your Vendor RIL must define a RIL_Init function that provides a handle to the functions which will process all radio requests.  RIL_Init will be called by the Android RIL Daemon at boot time to initialize the RIL.</p>
+
+<pre class="prettify">
+RIL_RadioFunctions *RIL_Init (RIL_Env* env, int argc, char **argv);
+</pre>
+
+<p>RIL_Init should return a RIL_RadioFunctions structure containing the handles to the radio functions:</p>
+<pre class="prettify">
+type structure {
+	int RIL_version;
+	RIL_RequestFunc onRequest;
+	RIL_RadioStateRequest onStateRequest;      
+	RIL_Supports supports;
+	RIL_Cancel onCancel;
+	RIL_GetVersion getVersion;
+} 
+RIL_RadioFunctions;
+</pre>
+
+
+<a name="androidTelephonyRILFunctions"></a><h2>RIL Functions</h2>
+
+<p><code>ril.h</code> defines RIL states and variables, such as <code>RIL_UNSOL_STK_CALL_SETUP</code>, <code>RIL_SIM_READY</code>, <code>RIL_SIM_NOT_READY</code>, as well as the functions described in the tables below. Skim the header file (<code>/device/include/telephony/ril.h</code>) for details.</p>
+
+
+<a name="androidRilFunctionsSolicited"></a><h3>RIL Solicited Command Requests</h3>
+
+<p>The vendor RIL must provide the functions described in the table below to handle solicited commands. The RIL solicited command request types are defined in <code>ril.h</code> with the <code>RIL_REQUEST_</code> prefix. Check the header file for details.</p>
+<p><table>
+  <tr><th scope="col">Name</th><th scope="col">Description</th></tr>
+  <tr>
+    <td valign="top"><code> void (*RIL_RequestFunc) (int request, void *data, size_t datalen, RIL_Token t);</code></td>
+    <td valign="top">
+	<p>This is the RIL entry point for solicited commands and must be able to handle the various RIL solicited request types defined in <code>ril.h</code> with the <code>RIL_REQUEST_</code> prefix.</p>
+	<ul>
+        <li><code>request</code> is one of <code>RIL_REQUEST_*</code></li>
+        <li><code>data</code> is pointer to data defined for that <code>RIL_REQUEST_*</code></l>
+        <li><code>t</code> should be used in subsequent call to <code>RIL_onResponse</code></li>
+        <li><code>datalen</code> is owned by caller, and should not be modified or freed by callee</li>
+      </ul>
+	<p>Must be completed with a call to <code>RIL_onRequestComplete()</code>. &nbsp;<code>RIL_onRequestComplete()</code> may be called from any thread before or after this function returns. This will &nbsp;always be called from the same thread, so returning here implies that the radio is ready to process another command (whether or not the previous command has completed).</p></td>
+  </tr>
+  <tr>
+    <td valign="top"><code> RIL_RadioState (*RIL_RadioStateRequest)();</code></td>
+    <td valign="top">This function should return the current radio state synchronously.</td>
+  </tr>
+  <tr>
+    <td valign="top"><code> int (*RIL_Supports)(int requestCode);</code></td>
+    <td valign="top">This function returns "1" if the specified <code>RIL_REQUEST</code> code is supported and 0 if it is not.</td>
+  </tr>
+  <tr>
+    <td valign="top"><code> void (*RIL_Cancel)(RIL_Token t);</code></td>
+    <td valign="top"><p>This function is used to indicate that a pending request should be canceled. This function is called from a separate thread--not the thread that calls <code>RIL_RequestFunc</code>.</p>
+      <p>On cancel, the callee should do its best to abandon the request and call <code>RIL_onRequestComplete</code> with <code>RIL_Errno CANCELLED</code> at some later point.</p>
+      <p>Subsequent calls to <code>RIL_onRequestComplete</code> for this request with other results will be tolerated but ignored (that is, it is valid to ignore the cancellation request).</p>
+    <p><code>RIL_Cancel</code> calls should return immediately and not wait for cancellation.</p></td>
+  </tr>
+  <tr>
+    <td valign="top"><code> const char * (*RIL_GetVersion) (void);</code></td>
+    <td valign="top">Return a version string for your Vendor RIL</td>
+  </tr>
+</table>
+
+
+<p>The vendor RIL uses the following callback methods to communicate back to the Android RIL daemon.</p>
+<p>
+<table>
+  <tr>
+    <th scope="col">Name</th>
+    <th scope="col">Description</th>
+  </tr>
+  <tr>
+    <td><code>void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responselen);</code></td>
+    <td><ul>
+      <li><code>t</code> is parameter passed in on previous call to <code>RIL_Notification</code> routine.</li>
+      <li>If <code>e</code> != SUCCESS, then response can be null and is ignored</li>
+      <li><code>response</code> is owned by caller, and should not be modified or freed by callee</li>
+      <li><code>RIL_onRequestComplete</code> will return as soon as possible</li>
+    </ul></td>
+  </tr>
+  <tr>
+    <td><code>void RIL_requestTimedCallback (RIL_TimedCallback callback, void *param, const struct timeval *relativeTime);</code></td>
+    <td>Call user-specified callback function on the same thread that <code>RIL_RequestFunc</code> is called. If <code>relativeTime</code> is specified, then it specifies a relative time value at which the callback is invoked. If <code>relativeTime</code> is NULL or points to a 0-filled structure, the callback will be invoked as soon as possible.</td>
+  </tr>
+</table></p>
+
+
+<a name="androidRilFunctionsUnsolicited"></a><h3>RIL Unsolicited Commands</h3>
+
+<p>The functions listed in the table below are call-back functions used by the Vendor RIL to invoke unsolicited commands on the Android platform. See <code>ril.h</code> for details. </p>
+<p>
+<table>
+  <tr>
+    <th scope="col">Name</th>
+    <th scope="col">Description</th>
+  </tr>
+  <tr>
+    <td><code>void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, size_t datalen);</code></td>
+    <td><ul>
+      <li><code>unsolResponse</code> is one of <code>RIL_UNSOL_RESPONSE_*</code></li>
+      <li><code>data</code> is pointer to data defined for that <code>RIL_UNSOL_RESPONSE_*</code></li>
+      <li><code>data</code> is owned by caller, and should not be modified or freed by callee</li>
+    </ul></td>
+  </tr>
+</table></p>
diff --git a/pdk/docs/guide/wifi.jd b/pdk/docs/guide/wifi.jd
new file mode 100755
index 0000000..aaf0ace
--- /dev/null
+++ b/pdk/docs/guide/wifi.jd
@@ -0,0 +1,47 @@
+page.title=Wi-Fi
+pdk.version=1.0
+@jd:body
+
+<a name="toc"/>
+<div style="padding:10px">
+<a href="#androidWifiIntroduction">Introduction</a><br/>
+<a href="#androidWifiBuildingDriver">Building a Wi-Fi Library</a><br/>
+<a href="#androidWifiInterface">Interface</a><br/></div>
+
+<a name="androidWifiIntroduction"></a><h2>Introduction</h2>
+
+<p>Android uses wpa_supplicant as the platform interface to the Wi-Fi device. Your Wi-Fi driver must be compatible with the standard wpa_supplicant in addition to extensions added to the supplicant (specifically, the "DRIVER" commands described in <code>wifi.h/wifi_command()</code>).</p>
+
+
+<a name="androidWifiBuildingDriver"></a><h2>Building a Wi-Fi Library</h2>
+
+<p>To create a Wi-Fi driver for Android:</p>
+<p><ul>
+<li>create a shared library that implements the interface defined in <code>include/hardware/wifi.h</code>, which also defines the Wi-Fi supplicant.</li>
+<li>Follow the instructions posted at <a href="http://hostap.epitest.fi/wpa_supplicant/">http://hostap.epitest.fi/wpa_supplicant/</a>.</li>
+<li>Place your driver in <code>libs/hardware/wifi/</code></li>
+<li>Test your driver using the command line <code>wpa_cli</code> utilities.</li>
+</ul>
+
+<p>You can find the default implementation in <code>libs/hardware/wifi/wifi.c</code>. If you need to make changes, create a new source file similar to <code>wifi.c</code>, for example, <code>wifi_mywifi.c</code>. </p>
+
+<p>Update the default <code>Android.mk</code> file (<code>libs/hardware/wifi/Android.mk</code>) as shown below.</p>
+<pre class="prettify">
+LOCAL_SHARED_LIBRARIES += libnetutils
+
+ifeq ($(TARGET_PRODUCT),acme)
+LOCAL_SRC_FILES += wifi/wifi_mywifi.c
+else
+LOCAL_SRC_FILES += wifi/wifi.c
+endif
+</pre>
+
+
+<a name="androidWifiInterface"></a><h2>Interface</h2>
+
+
+
+<p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="wifi.html">click here</a>.</p>
+
+
+<iframe onLoad="resizeDoxFrameHeight();" src="wifi_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>