Add the framework layer jar package to Android learning for system applications

Source: Internet
Author: User

Why do apps in the framework need to be compiled into the source code when compiling:

Because of the lack of necessary packages (source code)----at the time of connection is a class file to connect the compiled

Take Systemeui as an example:

Missing this package

Look for the Android source code when you can find this package:


Know that the framework will be compiled with its own Java source files, so in the packaged out file looking for packaged this: in fact, can be found:


There are many permission denied (of course, this is the search under the authority of others ...). )

Of course I found it eventually.


Inside the jar package:


Open the jar package with the classes Dex file:


but Dex The file does not know how to open it temporarily, so the search ends here. But the general understanding is:

in the Framework There are some source packages that do not need to be called as external interfaces, Dex this is directly Android the file format running on the system has been compiled, so the Eclipse The necessary packages are missing from the direct compilation of these packages, which are packaged into a more thorough package because they do not need to be opened to the outside. Dex files that are just guaranteed to run without opening  

/****************************/

Refute the above view


It has been proven that it is not compiled into what is called a more thorough Dex file, but rather is labeled @hide in the SDK so that it has the API in source compilation and not in the SDK. You can therefore achieve the effect by replacing the API in the SDK.

Look at photos!

The same is in the search for this class. Of course this completed project is:

Why is this happening?

The program can certainly run and run without problems.

Specific steps: (Replace the Android.jar package in the SDK)

compiled in the source code Framework layer of Jar Package Files

The Android file in Android.jar in the SDK (which should also basically be the framework layer's jar package)

The Android folder in the source code in two files is much larger than the one in the SDK. This should be a lot of source code in the class file, and some jar package is blocked or hide off. Tagged with hide. This should basically be able to develop lancher or setting or something like that.

Add the framework layer jar package to Android learning for system applications

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.