System APP and common APP analysis, systemapp Analysis

Source: Internet
Author: User

System APP and common APP analysis, systemapp Analysis


In the Android system, there are two types of apps. One is system-level apps, such as making phone calls, sending text messages, taking photos, etc. The most obvious characteristic of these apps is that normal methods cannot be uninstalled. The other is a common App. Users can download apps that are manually installed from the App market. Such apps can be uninstalled.

There are many other important differences between system apps and common apps, mainly reflected in the following aspects:

  1. Installation location

    The system App is installed in the system root directory/system/app/directory by default.
    Normal apps are installed in the memory directory/data/App/directory by default.
  2. Broadcast acceptance permission
    What is broadcast acceptance permission? To put it simply, Google took some security measures after Android 3.0. apps that are not opened by users are in silent State and cannot receive broadcast information (various broadcast information, boot, screen lock, network changes, etc ). This prevents virus apps from automatically starting to run after being downloaded. This measure is not available in Android 2.3 and earlier versions.
    BTW: This restriction applies to common apps. For system apps, you can still receive various broadcast messages even if they have not been opened by users.
  3. Detachable or not
    When no root permission is available, the system App cannot be detached by default. Normal App users have full operation permissions. All those who have used custom mobile phones from unscrupulous manufacturers know that there are always boring mobile malls, wowmall and other things that cannot be deleted. These are pre-installed system apps customized by manufacturers, unable to uninstall because you do not have the root permission.
  4. Tag value of the installation location
    The Android SDK has an open interface to obtain the APP installation location. The system APP and the common APP return different values, so that you can determine whether the APP is a system APP or a common APP.

How to obtain the installation location


/***** Determine whether the current App is a system APP **/public static boolean isSystemApp (Context context) {boolean isSystem = false; if (context! = Null) {String packageName = context. getPackageName (); try {PackageInfo packageInfo = context. getPackageManager (). getPackageInfo (packageName, 0); if (packageInfo. applicationInfo. flags & ApplicationInfo. FLAG_SYST )! = 0) {isSystem = false;} else {isSystem = true;} catch (NameNotFoundException e) {isSystem = false;} return isSystem ;}}


System App Creation

How can we turn our APP into a system APP because of the many benefits of the system APP? The following two methods are described:

1. Create a ROM

This is troublesome, and the workload is relatively large. The advantage is that after the production is completed, there is no need to change it. Now we will introduce you to an opportunistic method. It is also possible to use the official ROM test on Huawei u8950D.

A. Download the ROM card pack suitable for mobile phones

B. Open the ROM file in the form of a compressed package, open the/system/app directory in sequence, and then you will see many system apk files.

C. Drag our own apk directly. This shows that our APP is under the system/app directory. If there are apps you don't like, drag them out.

In this way, the Rom compression file is modified. The ROM signature information is not modified, and can still be flushed to the mobile phone for normal use.

For in-depth custom modifications, mobile phones and systems are not tested, such as Xiaomi and meizu. Passed the test at Huawei u8950D.

2. Move the apk File Location

By default, common apps are installed in the data/APP directory or SD card of the memory. You can use third-party software to move the APk location. In this way, our APP also has the attributes and functions of the system APP.

Prerequisites

A. Install the APP to be moved

B. the mobile phone has the root permission.

C. Install a third-party file browser. We recommend that you use the ES file browser.

To meet these conditions, the specific operation is very simple.

  1. Use the ES file browser to find the installation location of our APP. Generally, under the root directory/data/app, click the selected long press, select cut --> switch to the system/app directory, select and paste
  2. Restart your phone.

Use Cases:

Ordinary users or general apps do not have such requirements. Under what circumstances will we use the mobile APP installation location?

Requirement Description: to promote your own apps through third-party flash channels, we need to count the number of promotion users in this channel, and the total time these users stay on their mobile phones.

Requirement Analysis: calculates the number of users for promotion. After a user refreshes the ROM, the user sends the arrival statistics to the server at the first startup to identify the user as a promotion user. During the first boot, our APP was not started. If it was not a system APP, it would not receive broadcast events from the system.

If the first method is used for testing this requirement, the workload and time will be long. If the second method is used, the efficiency will be improved and a lot of work will be reduced.

This is the introduction of system apps and common apps. If you have any questions, please contact us.










[Q] What is the difference between dada/app and system/app ???

Data/app: The Program system/app installed in the mobile phone: The program data/app that comes with the mobile phone refers to the software installed in the memory of the mobile phone. You can use the conventional uninstall method. System/app is a built-in program. to delete a program, you must use the toolbox to delete only the program. This means to delete only the APK file in system/app, the complete uninstallation is to delete all data related to the program.

How does Android put the program into SYSTEM/APP?

Hello!

Open RE manager, copy and paste the apk file to the/system directory, and change the permission so that it has the same permissions as the apk file in the system/app folder, and then move it to the pp folder, restart your phone.

I hope my answer will be useful to you and I hope it will be a satisfactory answer.
(* ^__ ^ *)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.