diff --git a/pdk/Pdk.mk b/pdk/Pdk.mk
index abe9491d2..fbe8b5c90 100644
--- a/pdk/Pdk.mk
+++ b/pdk/Pdk.mk
@@ -16,7 +16,7 @@
# Assemble the Platform Development Kit (PDK)
# (TODO) Figure out why $(ACP) builds with target ndk but not pdk_docs
-# (TODO) Build doxygen (depend on latest version)
+# (TODO) Build doxygen (depend on latest version) -> line 25 error
pdk:
@echo "Package: $@ has targets ndk, pdk_docs and pdk_all"
@@ -38,6 +38,8 @@ include $(LOCAL_PATH)/ndk/Ndk.mk
# Doxygenize the header files to create html docs in the generatedDocs dir.
# Copy the appengine files, the template files and the generated html
# to the docs dir and zip everything up to the distribution directory.
+# Run javadocs/droiddocs/clearsilver on the generatedDocs dir to get the right
+# styles added to the html.
# Workspace directory
@@ -149,13 +151,27 @@ $(pdk_docs_intermediates)/pdk.py: $(pdk_hosting_dir)/pdk.py
@echo "PDK: $@"
$(copy-file-to-target-with-cp)
+# Copy appengine server files for new system
+$(OUT_DOCS)/app.yaml: $(pdk_hosting_dir)/app.yaml
+ @echo "PDK: $@"
+ $(copy-file-to-target-with-cp)
+
+$(OUT_DOCS)/pdk.py: $(pdk_hosting_dir)/pdk.py
+ @echo "PDK: $@"
+ $(copy-file-to-target-with-cp)
+
+# All the files that we depend upon
+all_pdk_docs_files := $(pdk_doxygen_config_override_file) \
+ $(pdk_doxygen_config_file) $(pdk_docs_intermediates)/header.html \
+ $(pdk_docs_intermediates)/footer.html $(pdk_doxy_docsfiles_dir)/groups.dox \
+ $(pdk_doxy_docsfiles_dir)/main.dox all_copied_pdk_templates
# Run doxygen and copy all output and templates to the final destination
# We replace index.html with a template file so don't use the generated one
pdk_doxygen: all_copied_pdk_headers $(pdk_doxygen_config_override_file) \
$(pdk_doxygen_config_file) $(pdk_docs_intermediates)/header.html \
$(pdk_docs_intermediates)/footer.html $(pdk_doxy_docsfiles_dir)/groups.dox \
- $(pdk_doxy_docsfiles_dir)/main.dox
+ $(pdk_doxy_docsfiles_dir)/main.dox
@echo "Files for Doxygination: $^"
@mkdir -p $(pdk_generated_source_dir)
@rm -f $(pdk_generated_source_dir)/*
@@ -164,7 +180,40 @@ pdk_doxygen: all_copied_pdk_headers $(pdk_doxygen_config_override_file) \
@cd $(pdk_generated_source_dir) && chmod ug+rx *
@rm -f $(pdk_generated_source_dir)/index.html
@cp -fp $(pdk_generated_source_dir)/* $(pdk_docs_dest_dir)
-
+
+
+# ==== docs for the web (on the google app engine server) =======================
+# Run javadoc/droiddoc/clearsilver to get the formatting right
+
+# make droiddocs run after we make our doxygen docs
+$(pdk_docs_intermediates)/pdk-timestamp: pdk_doxygen
+ @touch $(pdk_docs_intermediates)/pdk-timestamp
+
+$(LOCAL_PATH)/pdk-timestamp: $(pdk_docs_intermediates)/pdk-timestamp
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := pdk-timestamp samples/samplejni/src/com/example/jniexample/JNIExample.java
+LOCAL_MODULE_CLASS := development/pdk/ndk/samples/samplejni/src/com/example/jniexample
+LOCAL_DROIDDOC_SOURCE_PATH := $(framework_docs_LOCAL_DROIDDOC_SOURCE_PATH)
+LOCAL_DROIDDOC_HTML_DIR := ../../../$(pdk_docs_dest_dir)
+
+LOCAL_MODULE := online-pdk
+
+LOCAL_DROIDDOC_OPTIONS := \
+ $(framework_docs_LOCAL_DROIDDOC_OPTIONS) \
+ $(web_docs_sample_code_flags) \
+ -toroot /online-pdk/ \
+ -hdf android.whichdoc online-pdk
+
+LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := build/tools/droiddoc/templates-pdk
+LOCAL_DROIDDOC_CUSTOM_ASSET_DIR := assets-pdk
+
+include $(BUILD_DROIDDOC)
+
+# The docs output dir is: out/target/common/docs/online-pdk
+DOCS_OUT_DIR := $(OUT_DOCS)/$(LOCAL_MODULE)
+
# Name the tar files
name := android_pdk_docs-$(REQUESTED_PRODUCT)
ifeq ($(TARGET_BUILD_TYPE),debug)
@@ -173,21 +222,25 @@ endif
name := $(name)-$(BUILD_NUMBER)
pdk_docs_tarfile := $(pdk_docs_intermediates)/$(name).tar
pdk_docs_tarfile_zipped := $(pdk_docs_tarfile).gz
+new_pdk_docs_tarfile := $(pdk_docs_intermediates)/new-$(name).tar
+new_pdk_docs_tarfile_zipped := $(new_pdk_docs_tarfile).gz
-.PHONY: pdk pdk_docs pdk_doxygen all_copied_pdk_headers all_copied_pdk_templates
+.PHONY: pdk pdk_docs pdk_doxygen all_copied_pdk_headers all_copied_pdk_templates pdk-timestamp
-pdk_docs: $(pdk_docs_tarfile_zipped)
+pdk_docs: $(pdk_docs_tarfile_zipped) $(new_pdk_docs_tarfile)
@echo "PDK: Docs tarred and zipped"
# Put the pdk_docs zip files in the distribution directory
$(call dist-for-goals,pdk_docs,$(pdk_docs_tarfile_zipped))
+$(call dist-for-goals,pdk_docs,$(new_pdk_docs_tarfile_zipped))
# zip up tar files
%.tar.gz: %.tar
- @echo "PDK: zipped $<"
+ @echo "PDK docs: zipped $<"
$(hide) gzip -cf $< > $@
# tar up all the files to make the pdk docs.
+# old version
$(pdk_docs_tarfile): pdk_doxygen all_copied_pdk_templates \
$(pdk_docs_intermediates)/pdk.py $(pdk_docs_intermediates)/app.yaml
@echo "PDK: $@"
@@ -195,6 +248,13 @@ $(pdk_docs_tarfile): pdk_doxygen all_copied_pdk_templates \
@rm -f $@
$(hide) tar rf $@ -C $(pdk_docs_intermediates) docs pdk.py app.yaml
+# new version
+$(new_pdk_docs_tarfile): $(DOCS_OUT_DIR)-timestamp
+ @echo "PDK docs: $@"
+ @mkdir -p $(dir $@)
+ @rm -f $@
+ $(hide) tar rf $@ -C $(OUT_DOCS) $(LOCAL_MODULE)
+
# Debugging reporting can go here, add it as a target to get output.
pdk_debug:
@echo "You are here: $@"
diff --git a/pdk/README b/pdk/README
index 86621552e..18ff5d120 100644
--- a/pdk/README
+++ b/pdk/README
@@ -4,78 +4,72 @@ Building the pdk (platform development kit)
(We currently support version 1.4.6)
sudo apt-get install doxygen
+
+Make sure that you are using the right version of java
+
+ sudo update-java-alternatives -s java-1.5.0-sun
+
+If that doesn't work, go through the instructions on
+
+ http://source.android.com/download again.
+
2) from the root
. build/envsetup.sh
-3) run choosecombo
- Build for the simulator or the device?
- 1. Device
- 2. Simulator
-
- Which would you like? [1] 1
-
-
- Build type choices are:
- 1. release
- 2. debug
-
- Which would you like? [1] 1
-
-
- Product choices are:
- 0. emulator
- 1. generic
- 2. sim
- 3. surf
- You can also type the name of a product if you know it.
- Which would you like? [generic] 1
-
-
- Variant choices are:
- 1. user
- 2. userdebug
- 3. eng
- Which would you like? [eng] 3
-
- ============================================
- TARGET_PRODUCT=generic
- TARGET_BUILD_VARIANT=eng
- TARGET_SIMULATOR=false
- TARGET_BUILD_TYPE=release
- TARGET_ARCH=arm
- HOST_ARCH=x86
- HOST_OS=linux
- HOST_BUILD_TYPE=release
- BUILD_ID=
- ============================================
4) mkdir dist
mkdir logs
- mkpdkcupcake.sh
+
+then build everything:
-(which contains:
+ time make -j4 pdk pdk_all dist DIST_DIR=dist 2>&1 | tee logs/`date +%y%m%d-%H%M%S`
-DT=`date +%y%m%d-%H%M%S`
-time make -j4 pdk pdk_all dist DIST_DIR=dist 2>&1 | tee logs/$DT
+so you can have a record of the build commands in the logs directory.
-so you can see the results of the build in the logs directory.)
5) the pdk tar file is put in the dist directory.
+6) the pdk-docs are in
+
+ out/target
+
The build target 'pdk' brings in the pdk/ndk make files into the build system.
- Then there are three targets:
- pdk_docs - which builds the pdk documentation
- ndk - which builds the native development kit (native compiler, linker, etc.)
- pdk_all - which builds the above two targets
+ Then there are three targets:
+ pdk_docs - which builds just the pdk documentation
+ ndk - which builds the native development kit (native compiler, linker, etc.)
+ pdk_all - which builds the above two targets
-for doxygen version changing you can pass in the variable:
-doxygen_version=' 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. To implement an audio driver, create a shared library that implements the interface defined in The following stub Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here. 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. To implement an audio driver, create a shared library that implements the interface defined in The following stub Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here. 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. Bluez is GPL licensed, so the Android framework interacts with userspace bluez code through D-BUS IPC to avoid proprietary code. 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. The diagram below offers a library-oriented view of the Bluetooth stack. Click Bluetooth Process Diagram for a process-oriented view. BlueZ is Bluetooth 2.0 compatible and should work with any 2.0 chipset. There are two integration points: The BlueZ kernel sub-system attaches to your hardware-specific UART driver using the For example, for MSM7201A, this is The method for powering on and off your bluetooth chip varies from Android V 1.0 to post 1.0. BlueZ provides a rich set of command line tools for debugging and interacting with the Bluetooth sub-system, including: 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. Bluez is GPL licensed, so the Android framework interacts with userspace bluez code through D-BUS IPC to avoid proprietary code. 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. The diagram below offers a library-oriented view of the Bluetooth stack. Click Bluetooth Process Diagram for a process-oriented view. BlueZ is Bluetooth 2.0 compatible and should work with any 2.0 chipset. There are two integration points:
-
-Documentation
-
-
-
-
-
-
-
-
- Introduction
-
-
Building an Audio Library
-
-AudioHardwareInterface.h. You must name your shared library libaudio.so so that it will get loaded from /system/lib at runtime. Place libaudio sources and Android.mk in partner/acme/chipset_or_board/libaudio/.Android.mk file ensures that libaudio compiles and links to the appropriate libraries:
-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)
-
-
-
-Interface
-
-
-
-Introduction
+
+
Building an Audio Library
+
+AudioHardwareInterface.h. You must name your shared library libaudio.so so that it will get loaded from /system/lib at runtime. Place libaudio sources and Android.mk in partner/acme/chipset_or_board/libaudio/.Android.mk file ensures that libaudio compiles and links to the appropriate libraries:
+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)
+
+
+
+Interface
+
+
+
+
-
-Documentation
-
-
-
-
-
-
-
-
- Introduction
-
-
Porting
-
-
-
-
-
-
-UART Driver
-
-hciattach daemon.drivers/serial/msm_serial.c. You may also need to edit command line options to hciattach via init.rc.Bluetooth Power On / Off
-
-
-
-
-
-
-/sys/modules/board_[PLATFORM]/parameters/bluetooth_power_on.rfkill API. See arch/arm/mach-msm/board-trout-rfkill.c for an example.Tools
-
-
-
-
-
-
-hciconfighcitoolhcidumpsdptooldbus-senddbus-monitorIntroduction
+
+
Porting
+
+
+
+
The BlueZ kernel sub-system attaches to your hardware-specific UART driver using the hciattach daemon.
For example, for MSM7201A, this is drivers/serial/msm_serial.c. You may also need to edit command line options to hciattach via init.rc.
The method for powering on and off your bluetooth chip varies from Android V 1.0 to post 1.0.
+ +/sys/modules/board_[PLATFORM]/parameters/bluetooth_power_on.rfkill API. See arch/arm/mach-msm/board-trout-rfkill.c for an example.BlueZ provides a rich set of command line tools for debugging and interacting with the Bluetooth sub-system, including:
+hciconfighcitoolhcidumpsdptooldbus-senddbus-monitorOnce 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.
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.
+
Your kernel configuration file should include the following:
@@ -530,32 +358,3 @@ service akmd /sbin/akmd-
The directions below describe how to configure make files for new mobile devices and products.
-//device/partner.- mkdir device/partner/<company_name>
products directory beneath the company directory you created in step 1.- mkdir device/partner/<company_name>/products/
device/partner/<company_name>/products/<first_product_name>.mk, that includes the following code:- $(call inherit-product, target/product/generic.mk) - # - # Overrides - PRODUCT_NAME := <first_product_name> - PRODUCT_DEVICE := <board_name>
products directory, create an AndroidProducts.mk file that point to (and is responsible for finding) the individual product make files.- # - # 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 \
PRODUCT_DEVICE variable <board_name> referenced in the product-specific make file above. This will include a make file that gets accessed by any product using this board.- mkdir device/partner/<company_name>/<board_name>
product_config.mk file in the directory created in the previous step (device/partner/<company_name>/<board_name>). If this directory does not include a product_config.mk file, the build will fail.- # These definitions override the defaults in config/config.make for <board_name> - # - # TARGET_NO_BOOTLOADER := false - # TARGET_HARDWARE_3D := false - # - TARGET_USE_GENERIC_AUDIO := true
system.prop file in your <board_name> directory(device/partner/<company_name>/<board_name>).- # system.prop for- # This overrides settings in the products/generic/system.prop file - # - # rild.libpath=/system/lib/libreference-ril.so - # rild.libargs=-d /dev/ttyS0
<second_product_name>.mk within products/AndroidProducts.mk.- PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/first_product_name.mk \ - $(LOCAL_DIR)/second_product_name.mk
device/partner/<company_name>/<board_name> must include an Android.mk file with at least the following code:- # make file for new hardwarefrom - # - 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/<company_name>/<board_name> - # - include $(CLEAR_VARS) - # - # include more board specific stuff here? Such as Audio parameters. - #
device/partner/company_name/products/<second_product_name>.mk that includes:- $(call inherit-product, partner/google/products/generic.mk) - # - # Overrides - PRODUCT_NAME := <second_product_name> - PRODUCT_DEVICE := <board_name>
By now, you should have two new products, called <first_product_name> and <second_product_name> associated with <company_name>. To verify that a product is properly configured (<first_product_name>, for example), execute the following:
-
- cd device - . ./envsetup.sh - partner_setup <first_product_name> - make PRODUCT-<first_product_name>-user --
You should find new build binaries located in device/out/target/product/<board_name>.
-
-
-
The file tree below illustrates what your own system should look like after completing the steps above.
--
<company_name><board_name>Android.mkproduct_config.mksystem.propproductsAndroidProducts.mk<first_product_name>.mk<second_product_name>.mkThe directions below describe how to configure make files for new mobile devices and products.
+//device/partner.+ mkdir device/partner/<company_name>
products directory beneath the company directory you created in step 1.+ mkdir device/partner/<company_name>/products/
device/partner/<company_name>/products/<first_product_name>.mk, that includes the following code:+ $(call inherit-product, target/product/generic.mk) + # + # Overrides + PRODUCT_NAME := <first_product_name> + PRODUCT_DEVICE := <board_name>
products directory, create an AndroidProducts.mk file that point to (and is responsible for finding) the individual product make files.+ # + # 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 \
PRODUCT_DEVICE variable <board_name> referenced in the product-specific make file above. This will include a make file that gets accessed by any product using this board.+ mkdir device/partner/<company_name>/<board_name>
product_config.mk file in the directory created in the previous step (device/partner/<company_name>/<board_name>). If this directory does not include a product_config.mk file, the build will fail.+ # These definitions override the defaults in config/config.make for <board_name> + # + # TARGET_NO_BOOTLOADER := false + # TARGET_HARDWARE_3D := false + # + TARGET_USE_GENERIC_AUDIO := true
system.prop file in your <board_name> directory(device/partner/<company_name>/<board_name>).+ # system.prop for+ # This overrides settings in the products/generic/system.prop file + # + # rild.libpath=/system/lib/libreference-ril.so + # rild.libargs=-d /dev/ttyS0
<second_product_name>.mk within products/AndroidProducts.mk.+ PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/first_product_name.mk \ + $(LOCAL_DIR)/second_product_name.mk
device/partner/<company_name>/<board_name> must include an Android.mk file with at least the following code:+ # make file for new hardwarefrom + # + 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/<company_name>/<board_name> + # + include $(CLEAR_VARS) + # + # include more board specific stuff here? Such as Audio parameters. + #
device/partner/company_name/products/<second_product_name>.mk that includes:+ $(call inherit-product, partner/google/products/generic.mk) + # + # Overrides + PRODUCT_NAME := <second_product_name> + PRODUCT_DEVICE := <board_name>
By now, you should have two new products, called <first_product_name> and <second_product_name> associated with <company_name>. To verify that a product is properly configured (<first_product_name>, for example), execute the following:
+
+ cd device + . ./envsetup.sh + partner_setup <first_product_name> + make PRODUCT-<first_product_name>-user ++
You should find new build binaries located in device/out/target/product/<board_name>.
+
+
+
The file tree below illustrates what your own system should look like after completing the steps above.
++
<company_name><board_name>Android.mkproduct_config.mksystem.propproductsAndroidProducts.mk<first_product_name>.mk<second_product_name>.mkAndroid'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.
-The diagram below illustrates the structure of the camera subsystem.
-
To implement a camera driver, create a shared library that implements the interface defined in CameraHardwareInterface.h. You must name your shared library libcamera.so so that it will get loaded from /system/lib at runtime. Place libcamera sources and Android.mk in partner/acme/chipset_or_board/libcamera/.
The following stub Android.mk file ensures that libcamera compiles and links to the appropriate libraries:
-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) -- - -
The following diagram illustrates the sequence of function calls and actions necessary for your camera to preview.
-
-
-
-The following diagram illustrates the sequence of function calls and actions necessary for your camera to take a picture.
-
-
-
-Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.
- - - - - -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.
+The diagram below illustrates the structure of the camera subsystem.
+
To implement a camera driver, create a shared library that implements the interface defined in CameraHardwareInterface.h. You must name your shared library libcamera.so so that it will get loaded from /system/lib at runtime. Place libcamera sources and Android.mk in partner/acme/chipset_or_board/libcamera/.
The following stub Android.mk file ensures that libcamera compiles and links to the appropriate libraries:
+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) ++ + +
The following diagram illustrates the sequence of function calls and actions necessary for your camera to preview.
+
+
+
+The following diagram illustrates the sequence of function calls and actions necessary for your camera to take a picture.
+
+
+
+Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.
+ + + + + diff --git a/pdk/docs/display_drivers.html b/pdk/docs/display_drivers.jd similarity index 61% rename from pdk/docs/display_drivers.html rename to pdk/docs/display_drivers.jd index c20afe547..d1272079e 100755 --- a/pdk/docs/display_drivers.html +++ b/pdk/docs/display_drivers.jd @@ -1,187 +1,12 @@ - - - - -Android relies on a double buffer to smoothly render page flips (please see Functionality for details). -
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 http://git.or.cz/ for more information regarding Git.
-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).
-You may clone Google's repository to a local copy for sharing internally (see Git documentation for details).
- - -To install the Git package, execute:
--% sudo apt-get install git-core -- - -
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.
- - -Each developer must have a unique RSA key in order to access Android source code. To generate an RSA key:
--
% ssh-keygen -t rsa -C email@domain.com
id_rsa in this example).id_rsa: This file contains the private half of your RSA key. You shouldn't share this file with anyone. id_rsa.pub: This is the public half or your RSA key and you should send it to your Google technical account manager.Send your Google Account Manager your public key file in order to establish Git server access.
- - -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:
--% ssh android-git.ext.google.com -- -
You should receive one of the following results:
- -| Result | -Cause | -Action | -
|---|---|---|
-fatal: What do you think I am? A shell?
- |
- Success | -None. You successfully connected to the Git server. (You should not have shell access and it's expected to receive this error.) | -
| ssh hangs and eventually times out. | -Your setup is failing to locate and establish a basic connection. | -Google needs to debug network settings. | -
| Error: Permission denied <public key> | -Either you are not using the matching username or the RSA private key does not match the public key. | -Try executing: -
-% ssh $USER@android-
- git.ext.google.com
- |
-
Android source code is maintained in two repositories: device and kernel. The device repository includes the Android framework (things like the Activity Manager, Window Manager, Telephony Manager, View System, etc.). The kernel 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 What is Android? for details.)
Save device and kernel code at the same directory level, for example:
--
/home/joe/android/device/home/joe/android/kernelDevice Code
-To download device code, you need your username and a unique <path> string supplied by Google to execute the following:
-% git-clone $USER@android-git.ext.google.com:<path>/device.git -- -
Kernel Code
-To download kernel code, you need your username and a unique <path> string supplied by Google to execute the following:
-% git-clone $USER@android-git.ext.google.com:<path>/kernel.git -- - - -
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.
-diff on the two kernel packages to get Android-specific changes.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 http://git.or.cz/ for more information regarding Git.
+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).
+You may clone Google's repository to a local copy for sharing internally (see Git documentation for details).
+ + +To install the Git package, execute:
++% sudo apt-get install git-core ++ + +
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.
+ + +Each developer must have a unique RSA key in order to access Android source code. To generate an RSA key:
++
% ssh-keygen -t rsa -C email@domain.com
id_rsa in this example).id_rsa: This file contains the private half of your RSA key. You shouldn't share this file with anyone. id_rsa.pub: This is the public half or your RSA key and you should send it to your Google technical account manager.Send your Google Account Manager your public key file in order to establish Git server access.
+ + +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:
++% ssh android-git.ext.google.com ++ +
You should receive one of the following results:
+ +| Result | +Cause | +Action | +
|---|---|---|
+fatal: What do you think I am? A shell?
+ |
+ Success | +None. You successfully connected to the Git server. (You should not have shell access and it's expected to receive this error.) | +
| ssh hangs and eventually times out. | +Your setup is failing to locate and establish a basic connection. | +Google needs to debug network settings. | +
| Error: Permission denied <public key> | +Either you are not using the matching username or the RSA private key does not match the public key. | +Try executing: +
+% ssh $USER@android-
+ git.ext.google.com
+ |
+
Android source code is maintained in two repositories: device and kernel. The device repository includes the Android framework (things like the Activity Manager, Window Manager, Telephony Manager, View System, etc.). The kernel 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 What is Android? for details.)
Save device and kernel code at the same directory level, for example:
++
/home/joe/android/device/home/joe/android/kernelDevice Code
+To download device code, you need your username and a unique <path> string supplied by Google to execute the following:
+% git-clone $USER@android-git.ext.google.com:<path>/device.git ++ +
Kernel Code
+To download kernel code, you need your username and a unique <path> string supplied by Google to execute the following:
+% git-clone $USER@android-git.ext.google.com:<path>/kernel.git ++ + + +
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.
+diff on the two kernel packages to get Android-specific changes.Android defines a user space C abstraction interface for GPS hardware. The interface header is defined in include/hardware/gps.h. In order to integate GPS with Android, you need to build a shared library that implements this interface.
To implement a GPS driver, create a shared library that implements the interface defined in gps.h. You must name your shared library libgps.so so that it will get loaded from /system/lib at runtime. Place GPS sources and Android.mk in partner/acme/chipset_or_board/gps/ (where "acme" is your product name and "chipset_or_board" is your hardware target).
The following stub Android.mk file ensures that libgps compiles and links to the appropriate libraries:
-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) -- - -
Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.
- - - - - -Android defines a user space C abstraction interface for GPS hardware. The interface header is defined in include/hardware/gps.h. In order to integate GPS with Android, you need to build a shared library that implements this interface.
To implement a GPS driver, create a shared library that implements the interface defined in gps.h. You must name your shared library libgps.so so that it will get loaded from /system/lib at runtime. Place GPS sources and Android.mk in partner/acme/chipset_or_board/gps/ (where "acme" is your product name and "chipset_or_board" is your hardware target).
The following stub Android.mk file ensures that libgps compiles and links to the appropriate libraries:
+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) ++ + +
Modules | |
| Porividng Heap Memory | |
The Open Handset Distribution (OHD) is a software distribution for mobile devices, often referred to as Android, developed by members of the Open Handset Alliance. Android includes an operating system, middleware, and key applications typically required for a mobile device.
- -This porting guide describes the steps necessary to port Android to a new mobile device. 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.
- -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. Future versions of this guide will cover complete telephony, multi-media and peripheral integration to create a complete mobile device.
- - -This porting guide is intended for engineers proficient with running (and writing drivers for) Linux on embedded devices. -
The guide also assumes you have a target hardware that matches Device Requirements 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.
- - -To get started with Android, start with the publicly-available documentation at http://code.google.com/android/documentation.html, paying particular attention to What is Android? and Getting Started with Android.
- - -Start with the following sections in order to port Android to your target hardware.
-The Open Handset Distribution (OHD) is a software distribution for mobile devices, often referred to as Android, developed by members of the Open Handset Alliance. Android includes an operating system, middleware, and key applications typically required for a mobile device.
+ +This porting guide describes the steps necessary to port Android to a new mobile device. 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.
+ +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. Future versions of this guide will cover complete telephony, multi-media and peripheral integration to create a complete mobile device.
+ + +This porting guide is intended for engineers proficient with running (and writing drivers for) Linux on embedded devices. +
The guide also assumes you have a target hardware that matches Device Requirements 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.
+ + +To get started with Android, start with the publicly-available documentation at http://code.google.com/android/documentation.html, paying particular attention to What is Android? and Getting Started with Android.
+ + +Start with the following sections in order to port Android to your target hardware.
+It's possible that the instrumentation apk isn't installed on your device or that the package name is incorrect in the Manifest file.
- -It's possible that the instrumentation apk isn't installed on your device or that the package name is incorrect in the Manifest file.
- -Android source code is maintained in two code bases: the Android Linux kernel (kernel directory) and Android platform and applications (device directory). This document provides a high-level introduction to the source code organization and an overview of the major components of each primary directory.
The Android Linux kernel includes enhancements to the Linux 2.6 kernel that provide additional drivers to support the Android platform, including:
-Look for Android-specific enhancements in the following directories:
-/drivers/android/drivers/misc/include/linuxThe following list outlines the directory structure found within the device branch of Android source code:
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.
- -Add project-specific source code to the Android source tree under the partner directory in a directory specific to the application or service you are building. For example, all Google-specific applications would be placed under device/partner/google/. A Google search application would be placed under device/partner/google/apps/Search.
-
See Building Android for a new Mobile Device for detailed instructions.
- - - -Android source code is maintained in two code bases: the Android Linux kernel (kernel directory) and Android platform and applications (device directory). This document provides a high-level introduction to the source code organization and an overview of the major components of each primary directory.
The Android Linux kernel includes enhancements to the Linux 2.6 kernel that provide additional drivers to support the Android platform, including:
+Look for Android-specific enhancements in the following directories:
+/drivers/android/drivers/misc/include/linuxThe following list outlines the directory structure found within the device branch of Android source code:
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.
+ +Add project-specific source code to the Android source tree under the partner directory in a directory specific to the application or service you are building. For example, all Google-specific applications would be placed under device/partner/google/. A Google search application would be placed under device/partner/google/apps/Search.
+
See Building Android for a new Mobile Device for detailed instructions.
+ + diff --git a/pdk/docs/keymaps_keyboard_input.html b/pdk/docs/keymaps_keyboard_input.jd similarity index 71% rename from pdk/docs/keymaps_keyboard_input.html rename to pdk/docs/keymaps_keyboard_input.jd index 9a1a66a42..d52a73fe3 100755 --- a/pdk/docs/keymaps_keyboard_input.html +++ b/pdk/docs/keymaps_keyboard_input.jd @@ -1,180 +1,5 @@ - - - - -The snippet above contains artificial line breaks to maintain a print-friendly document.
-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 Linux Power Management Support at http://kernel.org.
-Android requires that applications and services request CPU resources with "wake locks" through the Android application framework and native Linux libraries. If there are no active wake locks, Android will shut down the CPU.
-The image below illustrates the Android power management architecture.
-
Wake locks are used by applications and services to request CPU resources.
- - -| Wake Lock | -Description | -
|---|---|
| ACQUIRE_CAUSES_WAKEUP |
- 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. | -
| FULL_WAKE_LOCK | -Wake lock that ensures that the screen and keyboard are on at full brightness. | -
| ON_AFTER_RELEASE | -When this wake lock is released, poke the user activity timer so the screen stays on for a little longer. | -
| PARTIAL_WAKE_LOCK | -Wake lock that ensures that the CPU is running. The screen might not be on. | -
| SCREEN_BRIGHT_WAKE_LOCK | -Wake lock that ensures that the screen is on at full brightness; the keyboard backlight will be allowed to go off. | -
| SCREEN_DIM_WAKE_LOCK | -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. | -
All power management calls follow the same basic format:
-PowerManager service.The snippet below illustrates this process.
--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(); -- - -
The Android Framework exposes power management to services and applications through the PowerManager class.
User space native libraries (any hardware function in //device/lib/hardware/ 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.
All calls into Power Management should go through the Android runtime PowerManager APIs.
-Please visit -http://code.google.com/android/reference/android/os/PowerManager.html for a description of the API and examples.
- - -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).
-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:
--android_register_early_suspend(android_early_suspend_t *handler) -android_register_early_resume(android_early_resume_t *handler) --
It is critical in a drive to return immediately and not wait for anything to happen in the call back.
- - -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 Linux Power Management Support at http://kernel.org.
+Android requires that applications and services request CPU resources with "wake locks" through the Android application framework and native Linux libraries. If there are no active wake locks, Android will shut down the CPU.
+The image below illustrates the Android power management architecture.
+
Solid elements represent Android blocks and dashed elements represent partner-specific blocks.
+ + + +Wake locks are used by applications and services to request CPU resources.
+ + +| Wake Lock | +Description | +
|---|---|
| ACQUIRE_CAUSES_WAKEUP |
+ 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. | +
| FULL_WAKE_LOCK | +Wake lock that ensures that the screen and keyboard are on at full brightness. | +
| ON_AFTER_RELEASE | +When this wake lock is released, poke the user activity timer so the screen stays on for a little longer. | +
| PARTIAL_WAKE_LOCK | +Wake lock that ensures that the CPU is running. The screen might not be on. | +
| SCREEN_BRIGHT_WAKE_LOCK | +Wake lock that ensures that the screen is on at full brightness; the keyboard backlight will be allowed to go off. | +
| SCREEN_DIM_WAKE_LOCK | +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. | +
All power management calls follow the same basic format:
+PowerManager service.The snippet below illustrates this process.
++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(); ++ + +
The Android Framework exposes power management to services and applications through the PowerManager class.
User space native libraries (any hardware function in //device/lib/hardware/ 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.
All calls into Power Management should go through the Android runtime PowerManager APIs.
+Please visit +http://code.google.com/android/reference/android/os/PowerManager.html for a description of the API and examples.
+ + +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).
+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:
++android_register_early_suspend(android_early_suspend_t *handler) +android_register_early_resume(android_early_resume_t *handler) ++
It is critical in a drive to return immediately and not wait for anything to happen in the call back.
+ + + diff --git a/pdk/docs/source_setup_guide.html b/pdk/docs/source_setup_guide.html deleted file mode 100755 index 1588b2946..000000000 --- a/pdk/docs/source_setup_guide.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - -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.
- - -Android requires the following system packages:
-On a clean Dapper system, type the following:
--% sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev - build-essential --
This snippet includes an artificial line break to maintain a print-friendly document.
- - --## 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 -
-% sudo apt-get install flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev - build-essential --This snippet includes an artificial line break to maintain a print-friendly document. -
Install the X11 development environment with the following commands:
--% sudo apt-get install x-dev -% sudo apt-get install libx11-dev -% sudo apt-get install libncurses5-dev --
On a clean system, type the following:
--% 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 -- - -
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 jdk-1_5_0_12-linux-i586.bin. To download this version of the Java JDK:
Once you have cleanly installed the JDK, modify your PATH environment variable to include <jdk-install-dir>/jdk1.5.0_12/bin at its beginning so that Dapper will use the correct installation.
Ubuntu 7.10
-An alternative method to quickly install Java is to enable multiverse repo in /etc/apt/sources.list and then execute:
-% sudo apt-get install sun-java5-jdk -- - -
While Android is designed to support a wide variety of hardware platforms and configurations, this section provides recommended minimum device requirements.
-| Feature | -Minimum Requirement | -Notes | -
|---|---|---|
| Chipset | -ARM-based | -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. | -
| Memory | -128 MB RAM; 256 MB Flash External | -Android can boot and run in configurations with less memory, but it isn't recommended. | -
| Storage | -Mini or Micro SD | -Not necessary for basic bring up, but recommended. | -
| Primary Display | -HVGA required | -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. | -
| Navigation Keys | -5-way navigation with 5 application keys, power, camera and volume controls | -- |
| Camera | -2MP CMOS | -Not required for basic bring up. | -
| USB | -Standard mini-B USB interface | -Android uses the USB interface for flashing the device system images and debugging a running device. | -
| Bluetooth | -1.2 or 2.0 | -Not required for initial bring up. | -
If available, your Android device can also benefit from the following optional device characteristics:
-While Android is designed to support a wide variety of hardware platforms and configurations, this section provides recommended minimum device requirements.
+ +| Feature | +Minimum Requirement | +Notes | +
|---|---|---|
| Chipset | +ARM-based | +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. | +
| Memory | +128 MB RAM; 256 MB Flash External | +Android can boot and run in configurations with less memory, but it isn't recommended. | +
| Storage | +Mini or Micro SD | +Not necessary for basic bring up, but recommended. | +
| Primary Display | +HVGA required | +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. | +
| Navigation Keys | +5-way navigation with 5 application keys, power, camera and volume controls | ++ |
| Camera | +2MP CMOS | +Not required for basic bring up. | +
| USB | +Standard mini-B USB interface | +Android uses the USB interface for flashing the device system images and debugging a running device. | +
| Bluetooth | +1.2 or 2.0 | +Not required for initial bring up. | +
If available, your Android device can also benefit from the following optional device characteristics:
+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 wifi.h/wifi_command()).
To create a Wi-Fi driver for Android:
-include/hardware/wifi.h, which also defines the Wi-Fi supplicant.libs/hardware/wifi/wpa_cli utilities.You can find the default implementation in libs/hardware/wifi/wifi.c. If you need to make changes, create a new source file similar to wifi.c, for example, wifi_mywifi.c.
Update the default Android.mk file (libs/hardware/wifi/Android.mk) as shown below.
-LOCAL_SHARED_LIBRARIES += libnetutils - -ifeq ($(TARGET_DEVICE),acme) -LOCAL_SRC_FILES += wifi/wifi_mywifi.c -else -LOCAL_SRC_FILES += wifi/wifi.c -endif -- - -
Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.
- - - - - -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 wifi.h/wifi_command()).
To create a Wi-Fi driver for Android:
+include/hardware/wifi.h, which also defines the Wi-Fi supplicant.libs/hardware/wifi/wpa_cli utilities.You can find the default implementation in libs/hardware/wifi/wifi.c. If you need to make changes, create a new source file similar to wifi.c, for example, wifi_mywifi.c.
Update the default Android.mk file (libs/hardware/wifi/Android.mk) as shown below.
+LOCAL_SHARED_LIBRARIES += libnetutils + +ifeq ($(TARGET_DEVICE),acme) +LOCAL_SRC_FILES += wifi/wifi_mywifi.c +else +LOCAL_SRC_FILES += wifi/wifi.c +endif ++ + +
Note: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, click here.
+ + + + + + diff --git a/pdk/hosting/app.yaml b/pdk/hosting/app.yaml index 407cbb08b..6e08141bc 100644 --- a/pdk/hosting/app.yaml +++ b/pdk/hosting/app.yaml @@ -4,8 +4,8 @@ runtime: python api_version: 1 handlers: -- url: /docs - static_dir: docs +- url: /online-pdk + static_dir: online-pdk - url: / script: pdk.py diff --git a/pdk/hosting/pdk.py b/pdk/hosting/pdk.py index e88f826f8..421f19550 100644 --- a/pdk/hosting/pdk.py +++ b/pdk/hosting/pdk.py @@ -26,11 +26,9 @@ from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): - self.redirect('docs/index.html') + self.redirect('online-pdk/index.html') -application = webapp.WSGIApplication( - [('/', MainPage)], - debug=True) +application = webapp.WSGIApplication([('/', MainPage)], debug=True) def main(): run_wsgi_app(application) @@ -38,6 +36,18 @@ def main(): if __name__ == "__main__": main() +# Testing +# You must install google appengine. See: http://code.google.com/appengine/downloads.html +# +# Here's the command to run the pdk-docs server locally: +# python