Tag Archives: Android

Android artifact xposed framework user guide

1 Introduction

Xposed is known as the most powerful artifact on Android. If you don’t know what xposed is, then you are really out. This blog will let bloggers take you to understand xposed.

(1) What is xposed?
Xposed is a framework. There are many modules on it. These modules all depend on xposed. The reason why xposed is the first artifact is that these modules can complete many incredible functions, such as modifying the wechat interface, automatically grabbing red packets module, self defining the text of the program, preventing wechat messages from withdrawing, and preventing the three hooligans of bat from calling each other Wake up, chain start, lock the screen automatically after the app to prevent background operation power consumption, there are many modification app or mobile data installed B module and so on.

(2) How does xposed work?
xposed The principle is to modify the key files of the system, and then when the app calls the system API, it first goes through xposed, and these xposed based modules can selectively do some “bad” things when the app calls these APIs, or modify the returned results, so that the effect of the app will change when it runs, but the app itself is not damaged, just when it calls the system API Wait, the performance of Android system has changed. This is hook, the technical term hook. So, to put it bluntly, xposed is a powerful hook framework.

Let’s have a professional explanation

By replacing / system / bin / APP_ The precess program controls the zygote process so that it loads a jar file of the xposed framework during the system startup XposedBridge.jar So as to complete the hijacking of zygote process and its Dalvik virtual machine, and allow the development

Android:Field can be converted to a local varible.


It’s been a while since Android studio was used to develop Android. Occasionally, as has a yellow highlight on some private variables field can be converted to a local variable . I still don’t want to see this yellow highlight for some obsessive-compulsive disorder. Baidu did not find any useful information, or Google search to find some answers.


The complete description of field can be converted to a local variable is (hand play only): field can be converted to a local variable :

This inspection searches for redundant class fields that can be replaced with local variables,if all local usages of a field are preceded by assignments to that field,the field can be removed and its usages replaced with local variables.

This means that it is detected that this variable can be replaced by a local variable. It is recommended to delete it and write it as a local variable.


Delete the sentence private XXX; and declare and instantiate it directly where it is used.
In Android studio for Mac , you can use the shortcut key Alt + enter to quickly convert local variables.

PS: you still need better English. In fact, you can understand it by reading the instructions. You don’t need to search in this way.

Failed to mount / cache (no such device)

After fastboot swiped the ROM of CM13, ADB sideload was used to swiped the ROM, but every time there was an error on the phone

E: failed to mount /cache (No such device)

The fastboot-w command can not be used to retrieve the cache from the cache. It can not be used to retrieve the cache from the cache. The fastboot-w command can not be used to retrieve the cache.

-w erase userdata and cache (and format if supported by partition type)

Double-clear operations will also be done, and partitions will be rebuilt

wiping userdata...
Creating filesystem with parameter
    Size: 13610496000
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8160
    Inode size: 256
    Journal blocks: 32768
    Blocks: 3322875
    Block groups: 102
    Reserved block group size: 815

Failed to mount /cache error will not be reported again after the adb sideload is executed.
E:Can’t mount /cache/recovery/log

Default interface methods are only supported starting with Android N (–min-api 24): com.XXXX

Recently, AndroidStudio has encountered this problem for the first time running a project. I don’t know the specific reason, but the solution is as follows.
Add the following to your app’s build.gradle file under the Android TAB.

compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8

Error record: this.requestWindowFeature ( Window.FEATURE_ NO_ Title) error or no effect

The requestWindowFeature method must be placed before the content view is initialized. I checked that this is the first one, but later I found that I changed the class inheritance. Before I inherited the Activity, I changed the class inheritance to AppCompatActivity.
At first I wondered if it was possible that AppCompatActivity had done something in its own super.onCreate. So the


On the


Finally, in the manifests file, we add an attribute to the Activity:


solves the problem.

The title bar is not an ordinary title bar. It is called ActionBar. Another solution is to call it after setContentView


solves the problem.

Request window feature for Android Development( Window.FEATURE_ NO_ Title) does not take effect

What if you want to hide the ActionBar but the requestWindowFeature(window.feature_no_title) doesn’t work?
Reason: because they define the Activity of inherited android. Support. V7. App. AppCompatActivity, AppCompatActivity itself does not support requestWindowFeature (Window. FEATURE_NO_TITLE) cause, can change to inherit the Activity.

Android set request window feature( Window.FEATURE_ NO_ Title) invalid solution

Reprint please indicate the source: http://blog.csdn.net/java201159416/article/details/51940074

general app has a demand to hide the Android default Title bar, is usually used before setConvertView call requestWindowFeature (Window. FEATURE_NO_TITLE), after can sometimes find call this line of code has no effect, Very depressed.
through observation, before the Activity is to inherit the Activity, so is valid, and I am AppCompatActivity inherited, so can’t hide.
1. Let xxxActivity inherit the Activity
2. Inherit AppCompatActivity and call it in the onCreate method

if (getSupportActionBar() != null){

And then we’re done.

[Android] using request window feature( Window.FEATURE_ NO_ Title) method to remove the title invalid solution

I used to use Eclipse to write APP, but today I try to use Android Sutido to write APP. I need to hide the title bar in the APP and use a custom title bar. It turns out that using requestWindowFeature(window.feature_no_title) method has no effect, and the title is not hidden

public class TitlebarActivity extends AppCompatActivity

In Android Studio, activities inherit from AppCompatActivity by default, so the requestWindowFeature(window.feature_no_title) method fails.

There are two solutions

    > change AppCompatActivity to Activity, then requestWindowFeature(window.feature_no_title); Add the following code to the onCreate() method:
if (getSupportActionBar() != null){

Now you can hide the title bar.

Android android.intent.category Purpose and use of. Launcher

The Android Android. Intent. The category. The purpose and use of the LAUNCHER
Sometimes we just create a new Android project in Eclipse, run it, and then we have an APK on the phone with the logo; We seldom consider no icon apk, however, this is to say the android. Intent. The category. The LAUNCHER.
1: we see first with android. The intent. The category. The effect of the project after the operation the LAUNCHER
1.1: project name as

1.2: the manifest. XML is as follows: (note contains android. The intent. The category. The LAUNCHER)

1.3: After running the effect, you can see the screen shot of the phone (you can see there is a launcher (CP3))

2: we can’t see with android. Intent. The category. The effect of the project after the operation the LAUNCHER
2.1: project name as

2.2: the manifest. XML is as follows: (note that there is no android. The intent. The category. The LAUNCHER)

2.3: after the operation, you can see on the screen without any effect
2.4 console display as follows:

indeed installed.
2.5: this time we enter the verify directory:

You can see that it contains com.tcl.cp3-2.apk.
1 and 2 contrast can be found in the android. Intent. The category. The role of the LAUNCHER.