From eb98133b0f66cca46ea2b8f54479fb745ddc478a Mon Sep 17 00:00:00 2001
From: David Warren At startup, Android displays a splashscreen image while booting the device. Do the following if you wish to modify the default splash screen:
+ Android stores network configurations as a resource that gets compiled into binary at form at build time. The XML representation of this resource is located at Each network configuration is stored in an XML element following this syntax: To set the APN configuration for a particular product target, add an To configure APNs at the product level, add a line to the product configuration file like the example below ( At runtime, the Android reads APNs from the following file: Android supports the following run-time network configuration methods to choose the appropriate APN from the list of configured APNs: To customize the list of Android packages for a particular product (applications, input methods, providers, services, etc.), set Package names should correspond to the Note that the home screen is just an Android application that can be replaced entirely or customized by changing source code and application resources (Java source, layouts, etc.). Browser bookmarks are stored as string resources in the Browser application: Like and Android application resource, the platform will load alternate resources based on the platform configuration values. See Resources and Internationalization in the Android SDK for details. To configure bookmarks for a specific mobile network operator, place your customized bookmarks in a separate Android loads any configuration-specific resources as override values for the default values, so it is only necessary to include the bookmarks string-array values in this file. The default email provider settings are stored as string resources in the Email application ( <providers>
+Network Customization Platform
+Customizing pre-loaded applications
+Customizing browser bookmarks
+Email Provider Customization
+Platform ThemesBoot Screen Customization
+
+
+
+
+splashscreen.jpg in this example.
+convert screen.jpg screen.r
+
+
+rgb2565 < screen.rgb > screen.565
+
+
+fastboot flash splash1 screen.565
+
+Network Customization Platform
+
+
+
+Network Configuration
+
+//android/frameworks/base/core/res/res/xml/apns.xml. This file does not include any configured APNs. You should not modify this file, but instead configure APNs by product at build time (see Build-time APN Configuration below).
+<apn carrier="T-Mobile US"
+ mcc="310"
+ mnc="260"
+ apn=" wap.voicestream.com"
+ user="none"
+ server="*"
+ password="none"
+ proxy=" 216.155.165.50"
+ port="8080"
+ mmsc="http://216.155.174.84/servlets/mms"
+/>
+
+
+
+Build-time APN configuration
+
+apns-conf.xml file to the product configuration (do not modify the default platform APNs). This allows multiple products, all with different APNs, to be built off the same code base. vendor/<vendor_name>/products/myphone-us.mk):
+PRODUCT_COPY_FILES := vendor/acme/etc/apns-conf-us.xml:system/etc/apns-conf.xml
+
+
+
+
+APN configuration at run time
+
+
+system/etc/apns-conf.xml
+
+
+
+
+
+
+
+
+Customizing pre-loaded applications
+
+PRODUCT_PACKAGES property in the product configuration, as illustrated below:
+PRODUCT_PACKAGES := \
+ <company_name>Mail \
+ <company_name>IM \
+ <company_name>HomeScreen \
+ <company_name>Maps \
+ <company_name>SystemUpdater
+
+
+LOCAL_PACKAGE_NAME specified for each package's build target. For example, the Android.mk build target for <company_name>Mail, referenced above, could look like this:
+
+
+# Build the <company_name>Mail application
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := user development
+
+LOCAL_SRC_FILES := $(call all-java-files-under,src,tests)
+
+LOCAL_STATIC_JAVA_LIBRARIES := <company_name>login-client
+
+# Specify the package name
+LOCAL_PACKAGE_NAME := <company_name>Mail
+
+# Specify the certificate used to sign the application
+LOCAL_CERTIFICATE := vendor/<company_name>/certs/app
+
+include $(BUILD_PACKAGE)
+
+# Build the login client static library
+include $(LOCAL_PATH)/client/Android.mk
+
+
+Customizing browser bookmarks
+
+//android/packages/apps/Browser/res/values/strings.xml. Bookmarks are defined as simple value string arrays called "bookmarks". Each bookmark entry is stored as a pair of array values; the first represents the bookmark name and the second the bookmark URL. For example:
+<!-- Bookmarks -->
+<string-array name="bookmarks">
+ <item>Google</item>
+ <item>http://www.google.com/</item>
+ <item>Yahoo!</item>
+ <item>http://www.yahoo.com/</item>
+ <item>MSN</item>
+ <item>http://www.msn.com/</item>
+ <item>MySpace</item>
+ <item>http://www.myspace.com/</item>
+ <item>Facebook</item>
+ <item>http://www.facebook.com/</item>
+ <item>Wikipedia</item>
+ <item>http://www.wikipedia.org/</item>
+ <item>eBay</item>
+ <item>http://www.ebay.com/</item>
+ <item>CNN</item>
+ <item>http://www.cnn.com/</item>
+ <item>New York Times</item>
+ <item>http://www.nytimes.com/</item>
+ <item>ESPN</item>
+ <item>http://espn.go.com/</item>
+ <item>Amazon</item>
+ <item>http://www.amazon.com/</item>
+ <item>Weather Channel</item>
+ <item>http://www.weather.com/</item>
+ <item>BBC</item>
+ <item>http://www.bbc.co.uk/</item>
+</string-array>
+
+strings.xml file and place it under a Mobile Network Code (MNO) specific resource folder. For example, Browser/res/values-mccXXX-mncYYY/strings.xml where XXX and YYY represent the three-digit MCC and two to three digit MNC values.Email Provider Customization
+
+//android/packages/apps/Email/res/xml/providers.xml) as illustrated below.
+<!-- Gmail variants -->
+ <provider id="gmail" label="Gmail" domain="gmail.com">
+ <incoming uri="imap+ssl+://imap.gmail.com" username="$email"/>
+ <outgoing uri="smtp+ssl+://smtp.gmail.com" username="$email"/>
+ </provider>
+ <provider id="googlemail" label="Google Mail" domain="googlemail.com">
+ <incoming uri="imap+ssl+://imap.googlemail.com" username="$email"/>
+ <outgoing uri="smtp+ssl+://smtp.googlemail.com" username="$email"/>
+ </provider>
+ <provider id="google" label="Google" domain="google.com">
+ <incoming uri="imap+ssl+://imap.gmail.com" username="$email"/>
+ <outgoing uri="smtp+ssl+://smtp.gmail.com" username="$email"/>
+ </provider>
+ <provider id="android" label="Android" domain="android.com">
+ <incoming uri="imap+ssl+://imap.gmail.com" username="$email"/>
+ <outgoing uri="smtp+ssl+://smtp.gmail.com" username="$email"/>
+ </provider>
As with all Android application resources, the platform will load alternate resources based on the platform configuration values. See Resources and Internationalization in the Android SDK for details. To configure email providers for a specific mobile network operator, place the customized providers in a separate providers.xml file and place it under a Mobile Network Code (MNO) specific resource folder. For example, Email/res/xml-mccXXX-mncYYY/providers.xml where XXX and YYY represent the three-digit MCC and two to three digit MNC values.
System level styles are defined in //android/framework/base/core/res/res/values/styles.xml.
Android supports configurable animations for window and view transitions. System-level animations are defined in XML in global resource files located in //android/framework/base/core/res/res/anim/.
The early-suspend API allows drivers to get notified when user-space writes to /sys/power/request_state to indicate that the user visible sleep state should change. Suspend handlers are called in order of low to high (4 - 1 below) and resume handlers are called in order of high to low (1 - 4 below).
EARLY_SUSPEND_LEVEL_BLANK_SCREEN: EARLY_SUSPEND_LEVEL_STOP_DRAWING:
+ EARLY_SUSPEND_LEVEL_DISABLE_FB: Turn off the framebuffer
+ EARLY_SUSPEND_LEVEL_STOP_INPUT:
+ A locked wakelock, depending on its type, prevents the system from entering suspend or other low-power states. This document describes how to employ wakelocks.
+There are two settings for a wakelock:
+WAKE_LOCK_SUSPEND: prevents a full system suspend. WAKE_LOCK_IDLE: low-power states, which often cause large interrupt latencies or that disable a set of interrupts, will not be entered from idle until the wakelocks are released. Unless the type is specified, this document refers to wakelocks of type WAKE_LOCK_SUSPEND.
If the suspend operation has already started when locking a wakelock, the system will abort the suspend operation as long it has not already reached the suspend_late stage. This means that locking a wakelock from an interrupt handler or a freezeable thread always works, but if you lock a wakelock from a suspend_late handler, you must also return an error from that handler to abort suspend. You can use wakelocks to allow the user-space to decide which keys should wake the full system and turn on the screen. Use set_irq_wake or a platform-specific API to ensure that the keypad interrupt wakes up the CPU. Once the keypad driver has resumed, the sequence of events can look like this:
The simple sequence diagram below illustrates these steps:
++ Key pressed Key released + | | + keypad-scan ++++++++++++++++++++++ + input-event-queue +++ +++ + process-input-events +++ +++ ++ +
A driver can use the wakelock API by adding a wakelock variable to its state and calling wake_lock_init, as illustrated in the snippet below:
+ struct state {
+ struct wakelock wakelock;
+ }
+ init() {
+ wake_lock_init(&state->wakelock, WAKE_LOCK_SUSPEND, "wakelockname");
+ }
+ Before freeing the memory, wake_lock_destroy must be called:
+ uninit() {
+ wake_lock_destroy(&state->wakelock);
+ }
+
+ When the driver determines that it needs to run (usually in an interrupt handler), it calls wake_lock:
+ wake_lock(&state->wakelock); ++
When it no longer needs to run, it calls wake_unlock:
+ wake_unlock(&state->wakelock); ++
It can also call wake_lock_timeout to release the wakelock after a delay:
+ wake_lock_timeout(&state->wakelock, HZ); ++
This works whether or not the wakelock is already held. It is useful if the driver woke up other parts of the system that do not use wakelocks but still need to run. Avoid this when possible, since it will waste power if the timeout is long or may fail to finish needed work if the timeout is short.
+Write lockname or lockname timeout to /sys/power/wake_lock lock and, if needed, create a wakelock. The timeout here is specified in nanoseconds. Write lockname to /sys/power/wake_unlock to unlock a user wakelock.
Do not use randomly generated wakelock names as there is no API to free a user-space wakelock.
\ No newline at end of file