Android Process Resident (5) Simple guardian and summary of----start-up broadcast

Source: Internet
Author: User
Tags root access

This is a lightweight library that configures several lines of code. will be able to implement the current Android on the permanent process, that is, the system is strong kill, as well as 360 get root authority. Clean Master cannot kill a process under root access

Support System 2.3 to 6.0

Support for most devices, including Samsung. Huawei. Oppo,nexus. Meizu, et cetera.

Simple to protect the boot broadcast


GitHub Address:

Https://github.com/Marswin/MarsDaemon

Principle Analysis:

Android Process Resident (0)----Marsdaemon instructions for use

Android Process Resident (1)----opening

Android Process resident (2)----count the keepalive means of using the Android system mechanism

Android Process resident (3)----Native KeepAlive 5.0 The following scenario deduction process and code details

Android Process Resident (4)----native 5.0 above program deduction process and code details

Android Process Resident (5) Simple guardian and summary of----start-up broadcast



Body:



The final breath was finished. This was the result of last year's one months. I have an account of myself.

In fact, KeepAlive is a two-point:

1, how to monitor the process of hanging off

2, how to pull the process up

The two points are solved, the problem is overcome.

Everyone read my previous articles. Will find that both points have a good variety of strategies, then on different phones. Different strategies for two points can be combined in many ways. It is also the main means for me to fit the mobile phone.

I had a test cell phone.




Also say, some phones will be in your system to set force close, the display has killed the process. But actually not really killed , for example Meizu.

able to shell in with command PS | grep Mars to see all the Marsdaemon processes

If you have root permissions, you can use the kill-9 command to kill the process, but the effect is not force close and 360\cm kill the good



Finally, I want to say something. The process resident is guaranteed not to die. But first we have to live once.
In other words a lot of people ask me if I want to start the boot time, how to start
The answer must be a boot broadcast.
But now there are third-party software to get root permission to be able to put our boot broadcast to the ban. Then there's no point in Marsdaemon's protective work.

So how did 360/cm disable our broadcast?

We stand in his perspective to think about this question:

1, he stopped the system to send a start-up broadcast, immediately after the boot Systemservice

2, the system issued a broadcast, he let us not receive

3. After we received the broadcast, he sent us away.

4, he failed to return us, but immediately killed us


Ok. The first one is too difficult, assuming he can do it, we have no root so no solution.

The fourth one is not a threat. Because Marsdaemon was meant to be used against the dead.

The third he's going to inject us, to be able to shell the defenses

So what did he do with the second one? System method:


Yes, he was able to set a component to enable or disable. Assuming that we set the boot broadcast to disable, it is no doubt useless.

But this is not what they can call, they need a system signature.

But they can achieve the same result with the PMS pm command in the Android Shell:



You can use this PM disable componentsname command only if you have root privileges.

Third-party security software, we have the default they have root access, then what should we do?


Marsdaemon has such a class in project
/marsdaemon/libmarsdaemon/src/main/java/com/marswin89/marsdaemon/packageutils


Yes, because it's our own component. So set him no matter what permissions, just need to reset the status of the boot broadcast at some point of time (for example, each time the process restarts, when the network changes, when the switch screen). The other is to register a shutdown broadcast, resetting the status of the boot broadcast each time it shuts down. So as to protect the role of the start-up broadcast.

In Cleanmaster, after giving root permission, disable the power on broadcast, and then restart the phone, the power-on broadcast failure, and then add my method, and then disable, boot broadcast OK.

Very easy one little tip


Android Process Resident (5) Simple guardian and summary of----start-up broadcast

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.