A brief analysis of System app and common app

Source: Internet
Author: User


In the Android system, there are two types of apps exist, one is a system-level app, such as phone calls, text messages, photos and so on, the most obvious feature of these apps is that the normal method can not be uninstalled. The other is a common app that allows users to download actively installed apps from the app market, so apps can be uninstalled.

There are many other important differences between the system app and the regular app, mainly in a few ways

    1. Installation location

      System APP is installed by default in the system root directory/system/app/directory
      The normal App is installed by default in the memory directory/data/data/app/directory
    2. Broadcast Accept Permission
      What is broadcast accept permission? In short, after Android 3.0, Google to take some security measures, the user is not actively open the APP is silent, receiving the system sent broadcast information (various broadcast information, boot, lock screen, network changes, etc.). This prevents some virus classes of the APP to automatically open and run after the active download. There is no such measure in Android 2.3 as well as previous versions.
      BTW, this limit is for the general app, for the system app, even if not been opened by the user, you can still receive a variety of broadcast information.
    3. Whether it can be uninstalled
      In the absence of root privileges, the system App is not uninstalled by default. The normal APP user has full operation privileges. Have used some unscrupulous manufacturers of custom mobile phone know, there is always some boring what mobile mall, Wo Mall and other things, can not be deleted, these are manufacturers customized preinstalled system App, no root privileges, cannot uninstall.
    4. Tag Value for installation location
      Android SDK has an open interface to get app installation location, System app and normal app return value is different, so as to determine whether the app is a system app or a normal app.

How to get the installation location


/** * * To determine if 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 Maker

It says there are so many benefits of system apps, how can we make our app into a system app? Here are two methods

1. Making ROM

This is more troublesome, the workload is relatively large, the advantage is that after the completion of the production will not need to change. Now to introduce an opportunistic approach, on the Huawei u8950d with the official ROM test is also possible.

A. Download the ROM card for your phone

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

C. Drag our own apk directly in, this is to see our own APP in the System/app directory. If you have an APP you don't like, you can just drag it out.

Such a way to modify ROM compressed files, ROM signature information is not modified, or can be brushed to the phone, normal use.

For in-depth custom modifications are phones and systems that are not tested, such as Xiaomi, Meizu, etc. Passed the u8950d test in Huawei.

2. Move the APK file location

By default, the normal APP is installed in the memory Data/data/app directory or under the SD card. The APk location can be moved through third-party software, so our app also has the properties and functions of the system app.

Pre-conditions

A. Install the APP you want to move

B. The phone has root privileges

C. Install a third-party file browser, recommended 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, usually under root/data/data/app, click to select Long Press, select Cut-and-switch to System/app directory, check paste
    2. Restart your phone and you can.

Usage Scenario Description:

Ordinary users or the general APP, there is no such demand. Under what circumstances will we use the mobile location where we install the APP?

Requirements Description: In the third party to brush the channel, to promote their own App, to go to the statistics of this channel how many promotion users, these users accumulated on the mobile phone stay time.

Demand analysis: Statistical promotion of the number of users, need to be in the user after the ROM, the first boot to the server to send the arrival statistics, identify the user is already a promotional user. When the first boot, our app does not start, if not the system app, is not receiving the system's various broadcast events.

For this requirement test, if the first method is used, the amount of work and time will be very long, and if the second method is used, it will increase efficiency and reduce the workload.

Introduction to the System app and general app that's all, what's the problem? Welcome to Exchange









A brief analysis of System app and common app

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.