Android file system structure. Internal device of Android systems

OS Android file system

also in this article, as you could already guess the headings, the language is about the main structure file system android. Description of the main directories, formatting methods, backup copy and so on .. the article is mainly focused on beginners. I spodіvayus and others will read cіkavo.
linux filesystem structure



in android there are no sizable rich disks - such as for example. The root of the file system is: "". all other directories are attached to the root directory. Let's take a look at some of them:

system- after the name, you can already guess what system files are being sorted out here (what we can do for a moment in microsoft OS c: windows). De ci files for locking are immutable. Appointed stench for the functioning of the operating system. So it’s just here that the budding of supplements, the budding of the OS. If we take root rights, then we can make our own changes in this directory. However, robiti tse varto neatly bo deleted files and folders are not updated by themselves. For such a vipadka, we can do more with a flashing or a backup. Descho - what can be known in papacy system media. In the archives bootanimation.zip lay pictures of warehouse animation when the device is turned on. Also in the root of the system folder you can find the file build.prop which can be done in your own bagatuvan, in order to describe the device to the screen width (to configure which config you need third-party addenda).screen


Data- Changed files are saved here for the view of the systems. In sub category app apk of the programs installed by us are saved. screen

If we need an apk file, if there is any addendum, then we can easily know it there. And in data data installed programs.
Mnt- in this section it is recognized for the coristuvacha memory (for example, insert a flash card). In this way, we put our txt file in the root of the flash card, then the next path will look like this mntsdcard file.txt". Syudi is mounting a disk in smartphones without supporting memory cards. screen


Yak robiti wipe (skidannya nalashtuvan) on android


іsnuє kіlka ways of formatting. More about them below
1. reset through settings. Go to settings >> updates and discounts >> resets. Skip all settings and delete installations by. Before this, you can make a backup copy of the current ones by ticking off the last item. After the re-advancement of the device, it will ask for new data.
screen


2. reset via recovery. Korisny in this situation, if the device is not turned on. It will be necessary to root access and restore recovery. Fallen from the installed recovery, the roztashuvannya points can be repaired. I have an advanced wipe item. Revenge in yourself:
dalvik cache- formatting the dalvik virtual machine cache.
System- formatting the system partition.
Data- I’ll add all the third-party additions in memory, and just for the coristuvach, I’ll build it.
cache - cache view
format sd card- formatting memory cards. Seeing everything on the memory card.
format sd-ext- Formatting EXT was distributed on the memory card (as such creations were distributed. For example, for mounting the script, addendums are required when installing on the card).
3. formatting for additional service code. Please dial *2767*3855#. right after the set, it gets worse. Be respectful.
So, for example, vidallennya instead of folders data We have seen the settings and data of add-ons, but not the add-ons themselves. It is so very possible to rob and install the programs “view data”. When the folder is deleted, the date will be deleted added addenda.
Help, corrections, additions to the stats, please leave them in the comments, or before me in a personal. the article will be supplemented. To the readers, good luck.
-----------------
You can leave comments in the section Catalog of articles intermedia ball software, To lie on a set of libraries (Libraries), appointments for the development of typical tasks, which will ensure high efficiency. Tobto, the very task is responsible for the implementation of algorithms for the greater layer, the improvement of file formats, the development of coding and decoding of information (multimedia codecs can be used as an example), graphics rendering and a lot of other things. Libraries implemented in C / C ++ and compiled more specifically hardware security I’ll build it, at once with a stink of a stench, and be delivered by a forager in front of a look.

Pererakhuemo deyakі z izkorivnevih librіbrіkov:

  1. Surface Manager - in Android OS vikoristovuetsya compositing manager Vikon, for example Compiz (Linux), but more primitive. Instead, in order to move the painting graphics directly into the display buffer, the system sends painting commands to the off-screen buffer, and the stench accumulates at once with others, adding up to the composition, and then displaying them on the screen. This allows the system to create seamless effects, to realize the transparency of windows and smooth transitions.
  2. Media Framework - libraries implemented on the basis of PacketVideo OpenCORE. With these additional systems, you can record and reproduce audio and video data, as well as images of static images. A wide variety of popular formats are supported, including MPEG4, H.264, MP3, AAC, AMR, JPG and PNG. In the future, OpenCORE will be replaced by a more simple Stagefright framework.
  3. SQLite is a lightweight and productive relational DBMS, like it is in Android as the main engine for working with databases.
  4. 3D libraries - are used for highly optimized rendering of 3D-graphics, if the hardware can be accelerated. Their implementations will be based on the OpenGL ES 1.0 API.
  5. FreeType is a library for working with bitmaps, as well as for rasterizing fonts and performing operations on them. This is a high-quality engine for fonts and text rendering.
  6. LibWebCore - libraries of the WebKit browser engine, which also works in desktop Google browsers Chrome and Apple Safari.
  7. SGL (Skia Graphics Engine) is a 2D graphics robot engine. The graphic library is a product of Google and is often featured in other programs.
  8. SSL - libraries for supporting a one-name cryptographic protocol based on OpenSSL.
  9. libc - library of standard C movie clicks, analogue of glibc (GNU libc from Linux) for small devices. Bear the name Bionic.


Mal. 1.5.

On the other hand, Android Runtime is the core of the development of application programs. Key її warehouses є set of standard libraries and virtual machine Dalvik. The Android skin program runs on the Dalvik virtual machine. In this order, all those who practice the process of isolation from the operating system and one from one. The architecture of the Android Runtime is such that the programs run strictly within the framework of a virtual machine. Zavdyaki zdіysnyuєtsya zahist kernel opektіynoї sistemy vіd mozhlivoї shkodi from the side of іnshih її warehouses. Therefore, the code with pardons or shkіdlі programs cannot download Android OS and attachments on a її base. Such a functional function, in the order of programming code, is one of the key ones for Android Runtime.

Equally higher, the Application Framework is being developed, and different titles are equal to the framework of addenda. Itself through the frameworks of additives, retailers will gain access to the API, given by the components of the system, which lie lower. In addition, the architects of the framework architecture, whether there is any add-on, hope to implement the possibility of other add-ons, to which access is allowed. The basic set of services and systems that underlie the skin program and parts of the framework include:

  1. Rich and expanding set of views (Views), which can be used to create visual components, add-ons, for example, lists, text fields, tables, buttons, or navigate in a new web browser.
  2. Content providers (Content Providers), keruyuchі dannym, like one addendum for others, so that you could win for their work.
  3. Resource Manager, which ensures access to resources, which does not carry code, for example, to string data, graphics, files and others.
  4. Manager notification (Notification Manager), zavdyaky all the addendums can show the power of notification for the koristuvach in a row.
  5. Activity Manager, which manages the life cycles of supplements, collects data about the history of work with activities, and also provides a navigation system for them.
  6. Location Manager, which allows addenda to periodically receive updated data about the current geographic location of the annex.

At the top of the Android software stack lie a bunch of add-ons (Applications). So just like typing basic supplements, which is installed on Android OS. For example, in a new browser enter, mail client, Program for editing SMS, maps, calendar, contact manager and many others. The list of integration programs can be changed depending on the type of model android versions. The second base set up to the level of add-ons can be addressed by application programs on the Android platform, including those installed by the core.

As a rule, Android programs are written in the Java language, but it is possible to develop programs in C / C ++ (with the help of the Native Development Kit). Exotics can be called Basic (for the help of Simple) and other languages. So you can create master programs for the help of constructors, such as App Inventor.

1.6. core features

The core, which is the most important part of the Linux OS, and for other parts, has been transferred to the Android OS, more recently. Prote, in the process of porting, about 250 patches were applied to the core.

In the core of the Android OS, it was developed to create a single mechanism, the Binder names, between the processes of interaction between the OS Linux and instead of them. Binder allows methods to be called from one process to another process, passing them arguments and accepting the result, just as methods are called in the middle of one process. Binder to do this job with the minimum of memory.

For the security of taxation on small outbuildings in the core of the donations of visnovok taxation information in last port and the logcat command subtrim has been implemented.

The great serpents stumbled across the memory of the robots. The traditional Linux collective memory shmem has been replaced with ashmem. Also, the task, but on the level of physical memory, lies behind the help of the pmem driver. A special out-of-memory book of Viking Killer names has been added, in the simplest way, you just drive in the process, but you can also set more folding rules.

AT mesh stack add new security settings, file system support for flash drives in YAFFS2 is included in the kernel.

1.7. Dalvik Java Machine

Dalvik Virtual Machine is part of the Android mobile platform. tse virtual machine, The author is Den Bronstein. Vaughn is expanding like free software security under BSD - Apache 2.0 license sum. Rich in why this very fact played its role in Google solutions licensed under JME (Java Micro Edition), it would be necessary to remove the license from Sun. That is why the corporation, by the method of creating an open operating system, has robbed its own virtual machine.

On top of most virtual machines (such as Java Virtual Machine), it is stack-oriented, Dalvik is registered-oriented, which cannot be called standard solutions. On the other hand, it is more suitable for work on RISC-architecture processors, to which ARM processors can be seen, it is also widely used in mobile outbuildings Oh.

Dalvik was designed specifically for the Android platform. The fact that the platform will be all processes as insulated will be protected by the skin in its address space. virtual machine optimized for low memory usage and working on mobile hardware security. Starting with Android 2.2., Dalvik has released a JIT (Just-in-Time) compilation. As a result of these peculiarities, the swedish came out and is productive virtual machine, You can't help but be appointed to the robotic supplements in general.

Dalvik's master bytecode. When developing Android programs, they are translated by the compiler into a special machine-independent low code. When viewed on the Dalvik platform itself, it interprets and visualizes such a program.

In addition, Dalvik is capable of translating Java bytecode into native coding format and also converting them to its virtual environment. The program code is written in mobile Java, and after compilation everything. class files are converted to .dex format (additional for interpretation in Dalvik) with the help of a special dx utility that comes with the Android SDK stock.

1.8. Bionic

Bionic is a library of standard C movie wikis, licensed under the BSD (Berkeley Software Distribution?) BSD license. software at the exit codes, created for the exchange of dosvidom mizh initial mortgages) I is broken up by Google for Android. Bionic daytime deaks do not match Android POSIX functions that are available in the newer implementation of glibc.

Main bionic features:

  1. BSD licenses: An Android based Linux kernel that is under the GNU General Public License (GPL), but Google is encouraged to isolate Android add-ons under the legacy GPL. GNU libc, which is related to the Linux kernel, is licensed under the GNU LGPL, as an alternative to uClibc.
  2. smaller size: the bionic object code is smaller (approximately 2 times), lower glibc and smaller, lower uclibc.
  3. bionic is recognized for processors with remarkably low clock speeds.
  4. truncated, but efficient implementation of POSIX threads.

1.9. An overview of the Java interfaces of an application programmer

For the Android application programmer - typing interfaces in Java. Let's take a look, like wine organizations. The set is based on packages that are included in the Java mov standard, such as java.util, java.lang, java.io. The stench is on any platform, where a java add-on can be launched, and non-specific for Android. Before them, extensions are added, as they are not included in the standard, but de facto for a long time they have been standard - packages javax.net, javax.xml.

Also, Android includes a smaller extension Java extension- package org.apache.http, the most solid implementation of the HTTP protocol. The org.json package is passed for serialization JavaScript objects and support of AJAX technology. The org.w3c.dom package provides the Document Object Model

  • Translation

In this article, we can look at the architecture of Android add-ons.

Seemingly, I respect the official Google on this topic no more than a brown one. In detail, looking at the food “yak”, they don’t explain “what” and “why”. Otzhe, the axis is my version, and, I am convinced, you will bring clarity to the deak. So, before the speech, I will again praise the reading of Google articles, the stink shards of revenge Corresponding information, I can't repeat myself.

Architecture of Android OS - Trochs of History

As often used in IT, a lot of speeches cannot be explained in the context of the history of specific software. Axis of what we are guilty of turning to the revolution of the Android OS.

The Android OS was launched in 2003 by a young company called Android Inc. In 2005, the company was bought by Google. I respect that the main features of the Android architecture were determined by themselves in this period. Tse merit is not only Android Inc; Architectural concepts and financial resources of Google have made a huge impact on Android architecture. Next, I will give a sprat of applications.

As you remember, 2003-2005 was marked by a promotion of respect to AJAX additions. I think it was mainly due to the impact on the Android architecture: in some aspects it is closer to the architecture of a typical AJAX add-on, lower to the desktop GUI add-on written in Java, C #, C ++, VB and etc.

I don't know why it happened. My guess is that I invented something from Google in that period, if more Internet add-ons (Rich Internet Applications, RIA) in the soul of Google Docs or Gmail were considered solutions to all problems. In my opinion, this idea cannot be called either bad or good. Just keep in mind that Android add-ons are more likely to break down than desktop ones.

Infusing the architectural philosophy of Eclipse is noteworthy in choosing the GUI implementation principle, which is more similar to SWT, lower to Swing.

The standards for the design of the Android code have a "Ugric notation", popularized within the walls of MS. You can admit that the one who wrote these standards, earlier engaged in the development of Windows.

Architecture Rivn Android
The Android operating system can be three different and strongly water-reinforced one type of the same equal:
  1. It is based on a modified and revised version of Linux, as I guessed in one of my previous articles.
  2. Above the Linux layer there is a layer of add-on infrastructure that can avenge the Dalvik virtual machine, a web browser, a SQLite database, infrastructure "militia" and Java API.
  3. І, nareshti, riven written in Google Android add-ons. Vzagali seeming, stench є expansion equal to the infrastructure, oskolki retailer can vikoristovuvat tsі dodatki or їх parts like budіvelnі blocks for vlasnih rozrobok.
Let's look at the balls one by one and more report.

rіven Linux

State yourself that you are an architect in a young company. You are responsible for expanding the OS for a new type of outbuildings. What will you work?

Roughly seeming, you have two paths: to implement your own ideas, starting from scratch, or to develop the current operating system and adapt it to your own outbuildings.

Implementation from scratch will always sound cheesy for programmers. In our moments, we all seem to be in those that this time we all work more quickly, less shy away, and more quickly, we ourselves worked earlier.

Tim is not mensch, don't be practical. For example, the variation of the Linux kernel has significantly changed the variability of the distribution (maybe it's too big already). Wait a minute, I'll try to figure out what the Linux kernel will guess in today's state, which will need a million dollar bill.

If you use Android Inc, then you can't have a penny for your money. If you know Google, then you have such pennies, but you, better for everything, think about it, girls, first spend it on the creation of the Vlasnoy OS. So you yourself will spend a few years, first you will reach the current state of Linux; a spate of rocky zatrimki can become too great a delay when entering the market.

In a similar situation, Apple failed to encourage Mac OS based on FreeBSD. Android Inc has adopted a solution to tweak Linux as the basis for Android. Existing texts, like FreeBSD, and Linux, are freely available and provide a basis for any kind of development, be it Apple or Google.

But at that time it was impossible to run standard Linux on a mobile device (the infection is no longer the case). They built too little operational and independent memory. The processors were significantly better in parity with the processors of computers, de sounding victorious Linux. As a result, the Android retailers found themselves minimizing systemic help linux.

How to look at Linux on high equal, That is the combination of the core (you can't do without it) and the impersonal other, neobov'yazykovyh parts. You can start running one core, without which it would not be possible. So, Google is tempted to somehow win over the Linux kernel as part of the Android OS. In addition, neobov'yazkovy parts were examined, and the most appropriate was chosen from them. For example, I added the IPTables firewall and the Ash shell. Nope, that Ash herself was added, and not Bash, do not marvel at those who remain an order of magnitude worse; Obviously, the decision was based on the fact that Ash is less powerful to resources.

Android retailers modified the Linux kernel, adding a touch of light that was found in mobile devices and, most of all, not available on computers.

Choose Linux as the basis for building a great impact on all aspects of the Android OS. Picking Android is essentially a variation of the Linux folding process. android code be familiar with git management (a tool for dismantling Linux code). And so far.

Let it be all and cicavo, ale vie, better for everything, never touch all of these specific moments until now, until your meta just expands Android add-ons. You can fold the blame by looking around the file system for additional ash commands. Golovne, scho you are guilty of the nobility, rozroblyayuchi programs for Android - the tse rіven іnfrastruktury dodatki.

Can you ask for, just as well, as it is necessary to develop a native add-on for Android? Google strongly discourages anyone from working. Technically, savvy, smartly, but in the future you won’t be able to widen your appendages in the normal way. So think, girls, first start native development for Android, it’s amazing, you don’t work on Android open source Project (AOSP) for Android OS.

Riven infrastructure addenda

Irrespective of deaku similarity Apple iOS and Android OS, highlighting the importance of differences between architectural solutions on the infrastructure level of both OS.

Apple Wrote Objective-C as a Language Programming and Medium iOS add-ons. Objective-C seems to be a more or less natural choice for an OS based on FreeBSD. You can think of Objective-C as a classic C++ with a custom preprocessor that adds some specific linguistic constructs. Why can't you beat the standard C ++, which Free BSD is written in? I guess the reason is that Apple is doing everything in its own, "Apple" style.

The main idea is that iOS add-ons are written more or less in the same language as the OS behind them.

Android add-ons are strongly influenced by this sense. The stench is written in Java, but requires a different technology, not C ++ (I want the syntax and declensions of C ++).

I think the main reason lies in the need for one and the same supplement to work on different hardware security. This problem may be less for the Android OS; the guys at Apple have no such problems. iOS works only on the basis of the power of the computer, and Apple is in control of the entire process. For Android, it's all the same: Google does not control the selection of hardware features. For example, Android OS works on processors with x86 architecture, ARM and Atom (in the comments it is suggested that x86 includes Atom, and Android works on x86, ARM, PPC and MIPS - acceptance translation). On a binary level, architecture is insane.

Yakby architects of the Android OS chose the same path as the architects of Apple, the retailers of add-ons for Android would be crazy to expand the version of one and the same add-on at once. This would be a serious problem that could lead to the collapse of the entire Android project.

In order for the same add-on to be applied to different hardware security, Google has chosen a container-based architecture. In such an architecture, the dual code is coded by the software container and is isolated from the details of a specific hardware security. Apply to everyone you know - Java and C #. In both languages, the two-code code cannot be found due to the specifics of hardware security and is vio- lated by a virtual machine.

Obviously, the second way to reach the independence of the hardware security on a par with a double code. As one of the options, you can use a hardware security emulator, just like QEMU. Vin allows you to emulate, for example, attachments with an ARM processor on the x86 platform and so on. Google could have hacked C++ like a mov for building add-ons in the middle of emulators. Actually, Google has found such a clue in their Android emulators, as if based on QEMU.

It’s better that the stench didn’t go down such a path, if only someone had a chance to run the OS on an emulator, which would take a lot more resources, and, like a bag, the speed of the robot would decrease. For reach the best swedcode The emulation was omitted only there, where it could not be lost, in our opinion - in Android add-ons.

No matter how it was, Google came to the decision to win Java as the main language development of addenda and the middle of it.

I think it was a critically important architecture decision that put Android on the sidelines of other Linux-based mobile operating systems that are being introduced these days. Some of them are less visible, but in one of them there is no summation of the double code on equal supplements. Take MeeGo for the butt. Won victorious C ++ and Qt framework; don't be surprised by those that Qt has a rich platform, the need to work with different fees for different platforms is not known.

Selecting Java, it is necessary to virishity, like a virtual machine (JVM) to victorious. Due to the exchange of resources using the standard JVM, it was difficult. The only possible choice is the Java ME JVM, which has been disassembled for mobile applications. However, fortunately Google would be incomprehensible without the development of a free virtual machine, and the Dalvik VM appeared.

Dalvik VM looks like other JVMs coming:

  • There is a special DEX format for saving binary codes, as opposed to JAR and Pack200 formats, which are the standard for other Java virtual machines. Google has stated that DEX binaries are smaller than JAR. I think, with the same success, the stench could beat the Pack200, but the stench won the drink with their way.
  • Dalvik VM is optimized for running decal processes overnight.
  • Dalvik VM vicorist architecture, based on anti-stack architecture registers in other JVMs, to improve the speed and change of binaries.
  • There is a victorious instruction set (not the standard JVM bytecode)
  • Possibility to launch (yes, it is necessary) a number of independent Android add-ons in one process
  • The latter program can kill a few Dalvik VM processes by "natural order" (we can discuss what it means). For pіdtremy tsgogo added:
    • Special mechanism for serialization of objects, bases on Parcel and Parcelable classes. Functionally, those values ​​are rechecked that are Java Serializable, but as a result, the data may be less obligatory and potentially more tolerant of class changes.
    • A special way to create calls between processes (inter process calls, IPC), based on the Android Interface Definition Language (AIDL).
  • Prior to Android 2.2, Dalvik VM did not support JIT compilation, which was a serious blow to productivity. Starting from version 2.2, swedishness is often improved

    Some models of tablets based on the Android platform may have only one or more active components from the above list.

    All Android tablets are controlled by the same version of the mobile operating system from Google. In this case, the larger older versions may not support the latest additions.

    All versions of the most popular mobile operating system may be subject to major implication. We can reveal our own Android operating system in the form of a spherical structure. Computer engineers call it a software stack. The elements at the top of the stack are those that need to be in the process of interacting with the operating system. On the “dens” of the stack there are those parts of the operating system, which interact without intermediary with the hardware security of the add-on.

    Also, on the lowest level, there are the hardware components themselves: processors, sensors, conductive boards. With the coming ball є the core of the operating system. The kernel is sometimes referred to as a (or branded) software security. Larger English definition of "firmware". Tse software security zdіysnyuє control over the hardware resources I will add, manage them and їх rozpodіl.

    Tsya part of the operating system "translate" to the language of the hardware components in those commands, as if you were using a manual graphical interface. The core for Android has become operating system with Linux 2.6 code.

    Above the core of the operating system, the Android libraries are installed. The stench is a set of instructions, a kind of attachment following in the processing process different types danich. An example can serve as a library of orientation in a trivial space. Won revenge all the instructions, which are necessary for the Android device in order to recognize changes in its position in space and respond to them.

    On the same level of the software stack, root libraries are being developed, which are necessary for supporting add-ons written in Java language. Java is my programming from Sun Microsystems. More recently, telephones with support for Java-additions have become even wider. In this hour of stink, everything in the big world is seen with smartphones.

    The Android virtual machine is built on the same level of the software stack of the operating system. This software element is involved in the creation of a virtual operating environment, which is also called a virtual operating environment. A virtual machine imitates a physical attachment with a perfect operating system. Google designed this thread in such a way that the skin add-on, running in the Android operating system, functioned as a shell process. In such a rank, it will be possible to defeat one of the working processes, otherwise it will become indestructible. The virtual machine also plays the role of a memory manager.

    On the offensive level, the infrastructure of addenda (application framework) is being developed. Vaughn is the basis for all the add-ons of the "android" device. The infrastructure of add-ons is with a good balance between add-ons and other parts of the operating system.

    Google recommends retailers to create such add-ons that interact with this ball within the framework of the application programming interface () of the operating system split by the shock giant. Retailers only need to learn about the rules that APIs use. We don't need to worry about technical characteristics skin "android" tablet.

    The very top level of the software stack is to cover the interface of the coristuvach and all the add-ons of the "android" tablet. The very part of the operating system should constantly roll in front of you. Ale for cym we add and with a barvist ball hovaetsya the mass of the tedious, and clique only fahivtsy code.

    Like and be-like another operating system, and other hardware resources of the tablet.

    Behind computer.howstuffworks.com

# Facts | Yak vlashtovaniya android? Oleg Dovbnya