frida timed out

从Android Q(10)开始,Google引入了一种新的机制,加快了app的启动时间

Android USAP 进程启动流程

bash 复制代码
adb shell
su
ps -A | grep usap

root          9917  1032 6577052  13676 __skb_wait_for_more_packets 0 S usap64
root          9928  1032 6577052  13676 __skb_wait_for_more_packets 0 S usap64
root          9939  1032 6577052  13676 __skb_wait_for_more_packets 0 S usap64
root          9950  1032 6577052  13676 __skb_wait_for_more_packets 0 S usap64
root          9961  1032 6577052  13676 __skb_wait_for_more_packets 0 S usap64
root          9972  1032 6577052  13676 __skb_wait_for_more_packets 0 S usap64
root          9983  1032 6577052  13676 __skb_wait_for_more_packets 0 S usap64

解决方法

bash 复制代码
adb shell
su
setprop persist.device_config.runtime_native.usap_pool_enabled false
setprop persist.sys.usap_pool_enabled false
reboot
bash 复制代码
getprop|grep usap

[persist.device_config.runtime_native.usap_pool_enabled]: [false]
[persist.sys.usap_pool_enabled]: [false]

This is what i do for samsung A50 and worked

bash 复制代码
adb shell
su
mount -o remount,rw '/'
chmod 777 /

adb shell "su -c setenforce 0"

setprop persist.device_config.runtime_native.usap_pool_enabled false
settings put system screen_off_timeout 100000000
exit
exit
bash 复制代码
adb查看enforce
adb shell 命令可以让你在连接到 Android 设备的情况下,通过 shell 访问设备的 Linux 环境。在这个环境中,你可以运行很多 Linux 命令,包括 getenforce。

getenforce 是一个用来查看 SELinux 状态的命令,SELinux 是一种安全子系统,它对应用程序的行为进行严格的限制。

要通过 adb 查看 SELinux 的状态,你可以在命令行中执行以下命令:

adb shell getenforce
这条命令会返回 SELinux 的状态,可能的返回值有:

Enforcing:SELinux 正在强制模式下运行,限制严格。

Permissive:SELinux 正在宽容模式下运行,违规记录下来但不强制执行。

Disabled:SELinux 被禁用。

如果你想要临时改变 SELinux 的状态,你可以使用 setenforce 命令:

adb shell setenforce 0  # 设置为 Permissive 模式
adb shell setenforce 1  # 设置为 Enforcing 模式
请注意,通常情况下你不应该临时更改 SELinux 的状态,这可能会导致安全风险。更改 SELinux 状态应该在完全理解后果的情况下进行,并且通常需要在设备的整个生命周期内保持一致性。

参考资料
Failed to spa
wn: unexpectedly timed out while waiting for app to launch

frida TimedOutErro

相关推荐
暗碳1 分钟前
安卓abx二进制xml文件转换普通xml文件
android·xml
4z3326 分钟前
Android15 Framework(3):系统服务进程 SystemServer 解析
android·源码阅读
没有了遇见1 小时前
Android 之Google Play bundletool 校验 AAB包
android·google
yuanhello1 小时前
【Android】Android的键值对存储方案对比
android·java·android studio
Ditglu.1 小时前
CentOS7 MySQL5.7 主从复制最终版搭建流程(避坑完整版)
android·adb
恋猫de小郭1 小时前
Android Studio Otter 2 Feature 发布,最值得更新的 Android Studio
android·前端·flutter
走在路上的菜鸟2 小时前
Android学Dart学习笔记第十二节 函数
android·笔记·学习·flutter
没有了遇见2 小时前
Android + Google Play:老项目适配实战指南
android·google
怀君2 小时前
Uniapp——开发Android插件教程
android·uni-app
Lei活在当下2 小时前
【Perfetto从入门到精通】1. 初识 Perfetto
android·性能优化·架构