In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you how to deeply analyze the Android code structure, the content is very detailed, interested friends can refer to, hope to be helpful to you.
When we program the Android operating system, we will produce a well-structured Android code structure, so you can analyze this structure in detail from this article and take it as a reference to deepen your understanding of this operating system and facilitate your future development.
When the Android compilation is complete, an out folder is generated in the root directory, where all the generated Android code structure contents are placed. The out folder is as follows:
Out/-CaseCheck.txt-casecheck.txt-host-common-linux-x86-target-common-product
The two main directories are host, which represents the tools generated on the host (x86), and target, which represents what the target machine (default is ARMv5) is running.
The structure of the host directory is as follows:
Out/host/-common-obj (JAVA library)-linux-x86-bin (binary program)-framework (JAVA library, * .jar file)-lib (shared library * .so)-obj (object file generated in the middle)
The host directory is some of the tools used on the host, some are binary programs, and some are JAVA programs.
The Android code structure of the target directory is as follows:
Out/target/-common-R (resource file)-docs-obj (object file)-product-generic
The common directory represents general content, while product is for product content.
In the obj of the common directory, there are two main directories:
APPS contains the targets generated by the JAVA user program, and each user program corresponds to one of the subdirectories, and the APK package of the Android user program will be generated in combination with the original file of each user program.
JAVA_LIBRARIES contains libraries for JAVA, each of which corresponds to a subdirectory.
By default, Android compilation generates generic directories, and other directories can be generated if the selected product is selected. Generic contains the following:
Out/target/product/generic/-android-info.txt-clean_steps.mk-data--obj-ramdisk.img-root-symbols-system-system.img-userdata-qemu.img-userdata.img
Various JAVA uses are included in the generic/obj/APPS directory, corresponding to common/APPS, but have been packaged into APK packages.
Overview of Android terminology list
Introduction to the correct method of reading and writing files in Android
Introduction to the correct method of realizing full screen with Android
On the concept of Android floating-point Foundation
Advantages and disadvantages of Android performance in practical Development
The system directory is the main file system, and the data directory is the file system where the data is stored.
All dynamic libraries are stored in obj/SHARED_LIBRARIES.
All static libraries are stored in obj/STATIC_LIBRARIES.
Multiple files ending with img are multiple target image files, where ramdisk is the root file system image of the memory disk, system.img is the image of the primary file system, which is a larger file, and data.img is the data content image. These multiple image files are the files that are really needed when the simulator runs.
On how to in-depth analysis of the Android code structure to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.