摘要: 函数原型 #include <search.h> int hcreate(size_t nel); ENTRY *hsearch(ENTRY item, ACTION action); void hdestroy(void); #define _GNU_SOURCE /* See feature_t 阅读全文
posted @ 2022-08-30 15:58 梦过无声 阅读(577) 评论(0) 推荐(0) 编辑
摘要: 函数原型 #include <string.h> char *strtok(char *str, const char *delim); char *strtok_r(char *str, const char *delim, char **saveptr); str: 要分割的字符 delim: 阅读全文
posted @ 2022-08-30 14:54 梦过无声 阅读(116) 评论(0) 推荐(0) 编辑
摘要: unkonw type namespace 从图可以看出是namespace不对.解决方法 将 c 文件改成 cpp can not link against 因为编译的模块的测试模块依赖的共享库是vendor的, 所以测试模块页必须是vendor的 在测试模块加上: LOCAL_VENDOR_MO 阅读全文
posted @ 2022-07-11 16:57 梦过无声 阅读(1494) 评论(0) 推荐(0) 编辑
摘要: 记录一次ANR死锁排查过程 首先从logcat看是watchdog发现死锁,kill掉了系统服务 于是我们通过/data/anr/下的trace文件查看 持有锁的在thread 23 发现thread 23 在等另外一把锁 0x0b72ea32, 这把锁的持有又在thread 155 到这里基本已经 阅读全文
posted @ 2022-07-01 15:24 梦过无声 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Set the NTP server of your android device adb shell settings put global ntp_server <new-ntp-server> aosp12源代码中 // frameworks/base/core/java/android/ut 阅读全文
posted @ 2022-06-20 20:35 梦过无声 阅读(541) 评论(0) 推荐(0) 编辑
摘要: 首先是init加载rc文件: /vendor/etc/init/hw/init.rockchip.rc 在其中引入import /vendor/etc/init/hw/init.mount_all.rc // cat /vendor/etc/init/hw/init.mount_all.rc # d 阅读全文
posted @ 2022-05-10 18:59 梦过无声 阅读(1265) 评论(0) 推荐(0) 编辑
摘要: 环境 AOSP 10 文件: PackageParser.java#parseBaseApkCommon private Package parseBaseApkCommon(Package pkg, Set<String> acceptedTags, Resources res, XmlResou 阅读全文
posted @ 2022-04-26 11:23 梦过无声 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 转载 https://juejin.cn/post/7003590026776969253#heading-4 Android 是如何完成apk的安装的?安装时它又做了哪些事情,保存了哪些信息?存储的这些信息又有什么作用? 这篇文章,让我们带着以上问题来一起探讨一下android系统的apk安装流程 阅读全文
posted @ 2022-04-21 16:03 梦过无声 阅读(1229) 评论(0) 推荐(0) 编辑
摘要: 本文基于AndroidQ | 属性 | 使用 | 默认 | | | | | | ro.lmk.use_minfree_levels | 使用可用内存和文件缓存阈值来做出进程终止决策 即与内核中的 LMK 驱动程序的功能一致 | false | | ro.lmk.kill_heaviest_task 阅读全文
posted @ 2022-01-04 11:54 梦过无声 阅读(836) 评论(0) 推荐(0) 编辑
摘要: 在每行的行首行尾插入指定字符 行首::%s/^/insert_word/g 行首2个替换: :$s/^../intsert_word/g 行尾::%s/$/insert_word/g 在某些行的行进行替换 在2~50行首添加//号注释::2,50 s/^/\/\//g 在2~50行首删除//号::2 阅读全文
posted @ 2021-12-10 09:20 梦过无声 阅读(34) 评论(0) 推荐(0) 编辑