Kunpeng Boostkit for ARM Native Compilation and Installation Guide (AVD) Contents
Total Page:16
File Type:pdf, Size:1020Kb
Kunpeng BoostKit for ARM Native Compilation and Installation Guide (AVD) Issue 16 Date 2021-08-17 HUAWEI TECHNOLOGIES CO., LTD. Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd. Trademarks and Permissions and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd. All other trademarks and trade names mentioned in this document are the property of their respective holders. Notice The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services and features described in this document may not be within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any kind, either express or implied. The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute a warranty of any kind, express or implied. Issue 16 (2021-08-17) Copyright © Huawei Technologies Co., Ltd. i Kunpeng BoostKit for ARM Native Compilation and Installation Guide (AVD) Contents Contents 1 AVD Security Description.......................................................................................................1 1.1 Overview.................................................................................................................................................................................... 1 1.2 Security Description................................................................................................................................................................ 1 1.2.1 OS Security Update............................................................................................................................................................. 1 1.2.2 QEMU Security Hardening................................................................................................................................................2 1.2.3 Android Security Update................................................................................................................................................... 2 1.2.4 Security Statement About the VNC and ADB............................................................................................................ 2 2 AVD Compilation Guide......................................................................................................... 3 2.1 Introduction............................................................................................................................................................................... 3 2.2 Usage Statement..................................................................................................................................................................... 4 2.3 Environment Requirements................................................................................................................................................. 4 2.4 Preparing the Kunpeng Compilation Environment and Building Components................................................. 5 2.4.1 Preparing the Compilation Environment..................................................................................................................... 6 2.4.2 Building Components in the android-sdk-linux/tools Directory.......................................................................... 6 2.4.3 Building Components in the android-sdk-linux/platform-tools Directory.....................................................11 2.5 Preparing the x86 Compilation Environment and Building Components......................................................... 11 2.5.1 Preparing the Compilation Environment...................................................................................................................11 2.5.2 Building Components in the android-sdk-linux/platforms Directory.............................................................. 12 2.5.3 Building Components in the android-sdk-linux/system-images Directory.................................................... 14 2.5.3.1 Building the system-images Directory of aosp-7.0.0_r35................................................................................ 14 2.5.3.2 Building the system-images Directory of aosp9.0.0_r10.................................................................................. 16 2.5.4 Building the strace Binary File...................................................................................................................................... 18 2.5.4.1 Obtaining the strace File............................................................................................................................................. 19 2.5.4.2 Replacing the strace File..............................................................................................................................................19 2.5.4.3 Verification....................................................................................................................................................................... 19 2.6 Preparing the Target Arm Running Environment...................................................................................................... 20 2.6.1 Building the AVD Environment on the Kunpeng Server...................................................................................... 20 3 AVD Installation Guide (Ubuntu 18.04).......................................................................... 21 3.1 Introduction............................................................................................................................................................................ 21 3.2 Usage Statement...................................................................................................................................................................21 3.3 Environment Requirements............................................................................................................................................... 22 3.4 Configuring the Installation Environment....................................................................................................................24 Issue 16 (2021-08-17) Copyright © Huawei Technologies Co., Ltd. ii Kunpeng BoostKit for ARM Native Compilation and Installation Guide (AVD) Contents 3.4.1 Modifying the Maximum Number of Files Accessed............................................................................................ 24 3.4.2 Configuring the SSH Service.......................................................................................................................................... 25 3.4.3 Updating the APT.............................................................................................................................................................. 25 3.5 Setting Up Android SDK..................................................................................................................................................... 26 3.6 Running and Verifying the AVD.......................................................................................................................................27 3.6.1 Before You Start (GPU)................................................................................................................................................... 27 3.6.2 Creating and Running AVD Using the CLI................................................................................................................ 27 3.6.2.1 Starting the Desktop Service......................................................................................................................................28 3.6.2.2 Creating an AVD.............................................................................................................................................................30 3.6.2.3 Starting an AVD..............................................................................................................................................................32 3.6.2.4 Improving AVD Performance..................................................................................................................................... 36 3.6.3 Creating and Running AVDs in Batches by Using a Script..................................................................................36 3.6.3.1 Batch Starting AVDs with the start_qemu.sh Script.......................................................................................... 36 3.6.3.2 Changing the AVD Resolution................................................................................................................................... 38 3.6.3.3 Deleting an AVD.............................................................................................................................................................38 4 AVD Installation Guide (CentOS 7.6)............................................................................... 40 4.1 Introduction...........................................................................................................................................................................