tiann / leoric Goto Github PK
View Code? Open in Web Editor NEWPoC of fighting against force-stop kill process on Android
PoC of fighting against force-stop kill process on Android
兼容nokia了吗
经验证,dubug包几乎都被杀死,release包的情况下无一幸免,博主有办法??
...
import me.weishu.reflection.Reflection;
public class Leoric {
...
想编译一下,结果找不到这个类文件。库里和app里都找不到,也没有看到有第三方库有这个类。
机型: OPPO、RealMe
Android版本: 11
TargetSdkVersion:30
在监听到进程死亡后
public void onDaemonDead() { Log.e("log",""+Process.myPid()); // ILeoricProcess.Fetcher.fetchStrategy().onDaemonDead(); }
调用Process.myPid()直接崩溃...
020-01-16 17:35:23.421 4085-4337/? W/JavaExceptionHandler: Too noisy! skip duplicate java exception report:me.weishu.leoric:resident now=1579167323421 mLastReportTime=1579167300444 interval=60000
2020-01-16 17:35:23.425 1208-5579/? I/ActivityManager: Process me.weishu.leoric:resident (pid 11304) has died: fore SVC
2020-01-16 17:35:23.426 1208-5579/? I/AutoStartManagerService: MIUILOG- Reject RestartService packageName :me.weishu.leoric uid : 10588
2020-01-16 17:35:23.808 1208-2150/? D/MiuiGesture: add Window{a8e0470 u0 me.weishu.leoric/me.weishu.leoric.demo.MainActivity}, type=1
2020-01-16 17:35:23.815 1208-2150/? D/MiuiGesture: try to get iconInfo of me.weishu.leoric/.demo.MainActivity
2020-01-16 17:35:23.977 2186-2186/? D/RecentsImpl: startRecentsActivity runningTask: ComponentInfo{me.weishu.leoric/me.weishu.leoric.demo.MainActivity}
2020-01-16 17:35:24.025 1208-2150/? D/MiuiGesture: set AppWindowToken{b3f84c2 token=Token{7971d0d ActivityRecord{967eb36 u0 me.weishu.leoric/.demo.MainActivity t37639}}}, ignoreInput = true
2020-01-16 17:35:24.074 779-779/? I/GameEngine: last packageName: me.weishu.leoric
2020-01-16 17:35:24.635 1208-2150/? D/MiuiGesture: set AppWindowToken{b3f84c2 token=Token{7971d0d ActivityRecord{967eb36 u0 me.weishu.leoric/.demo.MainActivity t37639}}}, ignoreInput = false
2020-01-16 17:35:25.376 2772-2993/? D/Launcher: getLastLaunchApp, pkg=me.weishu.leoric
2020-01-16 17:35:31.059 11263-11297/me.weishu.leoric I/e.weishu.leori: ProcessProfilingInfo new_methods=24 is saved saved_to_disk=1 resolve_classes_delay=8000
2020-01-16 17:35:39.091 2186-2186/? D/RecentsActivity: removeTask: [id=37639 stackId=247 windowingMode=1 user=0 lastActiveTime=65188609] Leoric
2020-01-16 17:35:39.095 1208-10379/? D/WindowProcessUtils: remove task: TaskRecord{f513937 #37639 A=me.weishu.leoric U=0 StackId=247 sz=1}
2020-01-16 17:35:39.096 1208-10379/? I/ProcessManager: SwipeUpClean: force-stop me.weishu.leoric Adj=900 State=17
2020-01-16 17:35:39.133 1208-10379/? I/ActivityManager: Force stopping me.weishu.leoric appid=10588 user=0: SwipeUpClean
2020-01-16 17:35:39.134 1208-10379/? I/ActivityManager: Killing 11263:me.weishu.leoric/u0a588 (adj 905): stop me.weishu.leoric: SwipeUpClean
2020-04-27 05:06:29.079 5265-5265/me.weishu.leoric E/AndroidRuntime: FATAL EXCEPTION: main Process: me.weishu.leoric, PID: 5265 android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{ccd4247 u0 me.weishu.leoric/.demo.Service1} at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2068) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:237) at android.app.ActivityThread.main(ActivityThread.java:7811) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
目前最大得问题不是杀后台,而是程序到后台内部线程被冻结
成功过几次, 后面一键清理都杀掉了, 不知道是不是手机产生了抗体 ,望大神解决
我希望业务是在主进程完成的,如何保活主进程。
目前我的做法是在application的oncreate内直接启动主进程的服务。这样force-stop后子进程启动时,同时也会把主进程拉起来。但是我单独kill主进程,就会有问题!
您好,我在测试该项目时发现在vivo android10手机上 forcestop杀进程时 孤儿进程可以检测到进程被杀死 且与binder完成通信,但程序未成功保活 vivo手机保活不成功了吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.