Home

AADIP_Chapter 6 - Intel® Developer Zone

image

Contents

1. Android installation also involves recovery and wiping Recovery is a mode of the mobile device Through recovery users can install the sy stem thatis reflash ROM empty various data from the phone partition a memory card backup and restore data and so on Recovery is similar to the Ghost one key recovery function ona com puter Wipe meansto erase andremove Wiping is an option in recovery mode it removes various data from the phone sim ilar to restoring factory defaults Wipe is most commonly used before the reflash Users may see the Wipe prompt which suggests the need to clear data before the reflash As mentioned Android installation is essentially an issue of deploy ment in the process of software cross development but generally you adopt offline program ming instead of online programming In the installation process the media you use are SD cards and other portable external storage devices This process is shown in Figure 6 7 The installation is divided into two steps first place the image from the host on the portable SD card external storage device second start the machine from the portable external storage device and install Android on the target machine 11 CHAPTER 6 lt N f Se ecis gt Android C lt _ Image _ z N z Target Machine Host Figure 6 7 Android image installation Bears Formatted French France Formatted French France Image Install
2. CHAPTER 6 Customization and Installation of Android Due to the characteristics of any embedded sy stems such as resource constraints tailoring and customization are important features for an embedded OS and Android is no exception This chapter provides a general discussion of custom ization in an embedded OS and then explains the custom ization of Android specifically Tailoring and Customization of an Embedded OS Not all functions and services provided by the embedded OS are included in a special em bedded application for two reasons First the em bedded system is always resource constrained especially with regard to storage space thus it is im possible to include all redundant functions in the sy stem at release Second m any commercial embedded OSs collecta licensing fee based on the com ponents chosen by the user So users should tailor the em bedded OS according to their individual needs The principle of OS custom ization is shown in Figure 6 1 CHAPTER 6 Application development ZN ar j All functions i provided by Part of functions Functions developed the OS actually required independently Figure 6 1 Principle of OS customization For example Windows XP Embedded OS offers tens of thousands of components more than the functions of desktop Windows XP But for a subway baffle gate system based on Windows XP Embedded for example components such as Windows Media Player the Internet
3. Explorer browser the DirectX settings panel and Explorer taskm anager are not required Elim inating such com ponents reduces the hardware resources required by the sy stem thus reducing the cost and this makes the sy stem operate faster thereby improving efficiency A majority of embedded OSs provide means for custom ization and tailoring However there are many different tailoring m odes some start with com piling source code which requires the user to configure the option of conditional compilation some start by linking the target files linking to different library files according to the user s configuration and the remaining modes extract precompiled files from the existing binary file library according to the user s choice Table 6 1 lists the custom ization modes provided by frequently used embedded OSs Table 6 1 Customization Modes of Different Embedded Operating Systems Embedded OS Customization Modes Provide Platform Builder IDE and graphical component options Link different Windows CE library files according to the selected components For the kernel generate config files via make config before then compile Em bedded 7 di hi fiouration files Linux according to the configuration files Provide Target Designer IDE and graphical component options Extract required Windows XP k E j PRVN binary filesaccording to the selected components no compilation is necessary for Embedded is 5 the linking process C O
4. supported device e Ability to verify configuration readiness e Troubleshooting and calibration Firmware Module Device Image Systems Definition Customization Image Module Module Module Diagnostics Module Troubleshoot Essential System Functionality Module Figure 6 8 Intel Build Tools Suite Summary This chapter completed the discussion of sy stem level topics for Android Starting in the next chapter you begin to learn application development for Android on x86 and you see how to develop user interfaces suitable for the UX and interaction characteristics of mobile devices on Android You startby learning about Android graphic user interface GUI design because it s an indispensable part of human computer interaction HCI Because resources are limited for a mobile phone or tablet GUI design of Android sy stems is more challenging than for desktops In addition users have more rigorous demands and expectations for a user friendly experience Interface design has become one of the im portant factors determ ining the success of applications for Android on the market 14
5. the audio directory are some audio files that are used as ringtones and for notifications Overview of Android Image Customization Android image customization commonly known as creating Android ROM creating ROM for short is an academic term The Android core OS layer has multiple components and the applications vary in different systems image customization decides which components and applications are written into the image file of the target sy stem The process makes a personal customized sy stem file into a flashable ROM image This is also known as a system firmware update The ready made Android image can be installed onto an Intel Atom processor based sy stem that is a mobile phone tablet or the like via USB flash and SD card Then the system with the Android im age will have the capability to enter the Android operating environment at self start The MicroSD card originally called the TransFlash Card was launched by SanDisk It is 15 x 11 x 1 mm about the size of a fingernail It can be used in an SD card slot via an SD adapter card and is widely used in mobile phones You can create Android ROM in the following way s e Compile the Android source code which is a little com plex e Create or customize your own ROM based on the existing ROM The process of Android image customization is shown in Figure 6 5 CHAPTER 6 repo software library Software package repo software library Software package Inte
6. 2013 8 CHAPTER 6 IK900_source Official update 4 4 IMay 23 2014 2s Com press all the ROM files into one folder named NewsSROM in this example Delete and add files in the ROM folder NewsROM in this example to tailor and custom ize Android Some custom ization examples are as follows Go to the data app directory to check whether the preinstalled applications are what y ou need Atthis point y ou can remove unnecessary apps You can also add the default installed applications y ou need Go to the system app directory and customize the sy stem applications for y our device You can delete unwanted sy stem applications or add y our special builtor custom ized applications as customized apk files Be careful some system applications are dependent on others so best practice is to test before the customization to fix dependencies and other issues prior to im plementing the changes to the Android sy stem image Go to the system media directory to make modifications such as changing the boot image or adding a custom ized ringtone Go to the system bin directory toadd com mands and so forth If y ou re worried about deleting some files accidently and thus causing failure at startup y ou should adopt a conservative approach execute delete or add operations only for files in the data app and system app folders ss Com press the modified ROM folder as a zipfile Ensure that the contents i
7. S II Selectively and conditionally compile some partof the code according to the value B 7 defined by the C language macro in the header file VxWorks Select which modules are necessary in the Tornado IDE CHAPTER 6 After system customization y ou get an em bedded OS that runs on the target hardware device and has been optimized for the special application field Overview of Android Customization Theoretically Android custom ization falls into two levels custom ization of the Linux kernel and custom ization of the entire image Customization of the Linux kernel is similar to custom ization of em bedded Linux both involve the same methods and steps Android customization mainly focuses on image custom ization Let s see why ROM Package Image The Android image is commonly known as a read only memory ROM package which is the sy stem package of an Android phone The reason for this nam ing convention is that mobile phones prior to Android phones including smartphones such as Nokia and WM and non smart phones such as Sony Ericsson Moto P2K platform and MTK all have a separate ROM chip storage sy stem file So the sy stem file is referred to as ROM package or ROM image The image is a cross compiled binary Linux file that can be installed and run on some em bedded device becoming the OS of the device To better understand this concept let s review the ty pical development process shown in Figure 6 2 CHAPTER 6 Sta
8. ation Example Following is an exam ple of image installation The path directory may be different from different OEMs or from different Android versions this example is based on a Lenovo phone 1 Empty the phone s SD card This step is optional and can be done either on the host or on the phone Itis very simple to com plete the step on the host unplug the SD card from the phone insertit in the SD card reader of the host and delete all files from the removable disk at the host for example in Windows Empty the SD card on the phone by following these steps a Connect the phone to the host b Execute the following commands successively in the command line window at the host adb devices adb remount adb shell Bu Formatted German Germany rm r system sd Note sdcard is usually mounted under storag e sdcard0 or sdcard However the location may be different if y ou reusing a device from a different OEM or on another Android version 2 Copy the customized ROM file update_signed zip in the example to the SD card andrename it update zip 12 CHAPTER 6 3 Make sure the SD card has been inserted in the phone Restart the phone and enter Recovery mode Follow these steps a Shut down the phone normally b Press the power button and the lt volume gt button of the device at the same time the phone starts while vibrating and enters BKB Provisioning OS mode Double click the lt vol
9. e unavailable in some images Directory system File boot img The function and structure of the files and folders are as follows boot img file The sy stem im age including the Linux kernel bootloader and ramdisklaunched by the system A ramdiskis a small file sy stem that holds the core files needed to initialize the sy stem The boot img file is created using an open source tool called m kbootim g META INF directory The sy stem update script with the path META INF com g oog le andr oid updater script system app directory Allsy stem provided applications such as calendar contacts Gmail and soon You can put y our application s apk file in this directory so itcan be directly installed when the ROM is reflashed system bin directory Sy stem commands suchas top which can be executed after logging in through the adb shell system etc directory Configuration files system font directory Allkinds of fonts system framework directory Java core files suchas jar files Under the Dalvik virtual machine DVM it supports the framework developed by the user via Java system lib directory Android local shared libraries that consist of So files which are shared objects in the form of ELF binaries compiled by assembler C or C CHAPTER 6 system media directory Media files such as bootanimation zip which consists of png pictures used for boot anim ation and for changing the boot image Under
10. em in the embedded sy stem consists of the bootloader OS kernel kernel for short file sy stem and user applications The actual image file usually adopts a partition also known as independent lay er structure to store all parts that are located in different areas modules of the image and all parts are loaded into the sy stem from the bottom layer An example of a typical embedded sy stem image is shown in Figure 6 4 User application File system Linux kernel Bootloader Figure 6 4 Example ofan embedded system image The Android im age includes a bootloader the core OS a hardware adaptation module a file sy stem the user experience and applications The core OS lay er of Android includes the Linux kernel and various middleware m odules Below the core OS lay er is the hardware adaptation layer Toadaptto different hardware diversified drivers need to be installed for the OS Without these drivers the OS cannotuse the hardware to operate as usual Therefore the image consists of the drivers and any applications developed by the user The Android image usually exists in the form of a compressed file zip tar gz or a similar file format which usually contains the file and folders shown in Table 6 2 The file structure can be seen after the compressed file is decom pressed Table 6 2 File Structure of an Android Image File CHAPTER 6 Name Propertyr Remarks META IN Directory Optional may b
11. ncluding META INF system boot img and data optional are displayed when y ou double clickthe com pressed file Install and configure the Java environment The Javaenvironmentis required in the following steps to support the operation of the auto sign tool so y ou need to install and set up Java operation Download the latest JDK jdk1 7 0 in this exam ple and install it then follow these steps a Set the Java environment variable as follows right click My Computer and select Properties 7 Advanced 7 Environment Variables 7 Sy stem Variables 7 New in the pop up shortcut menu CHAPTER 6 b Inthe dialog box set Variable Name to JAVA_HOME variable value JAVA installation directory Find path in the same place double click it and add CNJDK1 7 0 C JDK1 7 0 bin after the variable value c Reboot the sy stem d Test Enter Java commands in the command line window The configuration is successful if no error message appears 6 Use the signtool to sign the zip packages The steps areas follows a Download the auto sign tool and unpack it under a directory myautosign in this example The tool can be downloaded at __http androidforums com developer 101 8665 how sig ning roms html b Rename the zip file package to update zip and copy it to the directory where you unpacked auto sign the myautosign directory c Run the sign bat file under the directory where you u
12. npacked auto sign d After the customization build the directory contains an update_signed zip file which is the signed ROM package and the customized ROM package y ou need Installation Reflash of the Android Image Image installation is required to use the custom ized im age on the target machine In other words the process of image customization and use must go through two stages image generation production and image installation as shown in Figure 6 6 MIC host CA Sey Oh ar ale Installation gt Android imade wa Target Machine VZN 7 Figure 6 6 Image generation and installation 10 CHAPTER 6 Image installation means installing the Android image on the target device or emulator This process is commonly known as reflashing Reflashing an Android phone is equivalent to reinstalling the sy stem for the phone which is sim ilar to com puter system reinstallation Generally speaking when a computer needs sy stem reinstallation y ou use a sy stem disk or an image file When an Android phone needs to be reflashed you burn an official or third party ROM image file into the ROM via a tool and install a new sy stem for the phone The official Android website often releases the latest Android im age sy stems for users so y ou can download image files directly to skip im age generation stage For users the custom ization and installation process can be very simple download the image and reflash
13. rnet gt or local Cache Figure 6 5 Process of Android image customization Android Image Creator Configuration file Example of Android Image Customization Android image The following exam ple illustrates the second way to customize Android by creating ROM using the cloned ROM image released by device manufacturer for targeted hardware In this way the Android custom ization includes structure parsing for Android system folder application software updates and the custom ization of the ROM signature package The steps are as follows 1 Download the com piled ROM package from Android s official website y our mobile phone m anufacturer s official website for exam ple the website for the Lenovo K900 m obile phone or websites providing an Android image For example the ROM provided by the Lenovo K900 mobile phone s website www lenovocare com cn ProductDetail aspx id 719 is shown in Table 6 3 Be noted that since the Lenovo K800 and K900 phones are sold in China market the software dates are only provided by Lenovo s official site in Chinese langage Table 6 3 Information in the ROM Package on the Lenovo K900 Website IROM Name Description Android Ver siol n Date of Official update 0 IK900_1_S_2_162_0074 Aug 8 2012 Relea se IK900_1_S_2_162_0086 Official update 4 0 4 Aug 15 2012 IK900_1_S_2_019_0113_130903 Official update 2 0 Sep 3
14. rt Write code X Cross compiling linking Packaging Deployment Debugging amp optimization End Figure 6 2 Development process for Android software For em bedded software generally speaking developing Android software requires the same steps as general purpose software designing encoding compiling linking packaging deploy ing debugging and optimizing For some Android sy stems testing and verification steps are also required The OS deployed on the embedded logic device also goes through such phases For exam ple fora Linux system you getits kernel source code cross compile and generate code that can be executed on the em bedded target machine then y ou compress and package this code to form the image file see Figure 6 3 The last step is deployment Unlike the deployment of an application file the deployment of an OS image file is referred to as installation due to the particularity of its operation Write source code Use specialized compilers and linkers to generate target code Compress target code and affiliated files into file packages Install target files from host machine to target device Execute and check the results of code Debug programs and optimize performance CHAPTER 6 J Linux source code Coss compiling Uini N Installation Linux OS Per Ke nage S Embedded devices Figure 6 3 Image use process The image file package of a complete executable software syst
15. ume gt button quickly to make the sy stem enter Test mode c Press lt volume gt and lt volume gt to move to the sixth option SD Update and click Enter in the lower left corner Automatic reflash begins 4 Reboot The entire reflash process takes a few minutes The phone restarts automatically after vibrating twice the first reboot takes longer and then the familiar four leaf clover interface appears After reboot choose Settings 7 Sy stem Information to checkthe phone network battery and version information IMEI code and internal version num ber to confirm whether the upgrade has been successful Automating the Procedure with flash_device sh There is a scriptthat will perform all the previously described procedures for y ou This script is located here lt Path to your project gt vendor intel s upport flash_device sh You can add this scriptto y our bin folder and run it from a terminal window You should be able to find the section on this topic in the user manual from the OEM Intel Build Tools Suite Intel has developed an Android Build Tools Suite see Figure 6 8 to help developers easily and quickly do the Android sy stem build and custom ization The suite provides the following features e Device customization e Ability to generate a customized firmware module and Android OS image e Final customization and localization 13 CHAPTER 6 e Ability to compile a single image and load the image into a

Download Pdf Manuals

image

Related Search

Related Contents

PTC-200CP  Manual    Zoroufy 23072 Installation Guide  Trane Vertical Stack Fan Coil Catalogue  Wireless Audio with Dock  Samsung Galaxy Tab 3 Lite (3G) manual do usuário(OPEN)  Indesit BIAA 12 SI fridge-freezer  2013-14 User Manual  Devis mécanique - Construction BRALTECK Inc  

Copyright © All rights reserved.
Failed to retrieve file