DeviceConfig xml 文件架构定义
https://cs.android.com/android/platform/superproject/+/main:frameworks/base/core/xsd/permission.xsd
看来有人偷懒了,缺失 component-override 等 tag
https://cs.android.com/android/platform/superproject/+/main:frameworks/base/services/core/java/com/android/server/SystemConfig.java
奇怪的小知识:
IP地址 1.0.0.1 在浏览器HSTS预加载列表中,但1.1.1.1因它是IP地址而被移出了预加载列表。
https://hstspreload.org/?domain=1.1.1.1
https://community.cloudflare.com/t/early-hints-and-encrypted-client-hello-ech-are-currently-disabled-globally/567730
官方停用公告已发,预计年底重新启用ECH
cloudflare 已经关闭 ECH,仅 https://crypto.cloudflare.com/cdn-cgi/trace 可用。
由于HTTPS记录依然包含 alpn,H3直连继续有效。
https://source.android.com/docs/setup/about/android-14-release
Читать полностью…测试网站
仅DNS污染 https://bangumi.moe/cdn-cgi/trace
通过SNI检测的TCP重置 https://exhentai.org/cdn-cgi/trace
QUIC的特色是可以快速发展,因此它完全在用户空间实现(只需要服务端软件和客户端软件支持即可工作),并且尽可能加密数据以拒绝中间设备干预(中间设备会丢弃无法识别的数据,导致协议陷入兼容性问题而僵化)。它基于UDP,脱离TCP自行实现状态管理,这可以避免无加密的TCP连接被中间设备修改或重置。Chromium更是拒绝使用用户证书的QUIC连接(尽管它非常接近客户端,也属于中间设备,引入第三方软件操控数据)。
但出于审计的实际需求,推荐做法是完全阻止QUIC流量,因此基于QUIC的HTTP/3没有设计为完全取代HTTP/2,它将长期与H2并行。
基于以上现状,Chromium没有选择并发连接H2和H3,而是检测H2连接的响应头存在H3升级指示后再尝试H3连接,并且会快速失败。
所以,即使H3在技术上绕过了目前的阻断方法,使用H3的网站还是无法直连。
https://cangsdarm.github.io/illustrate/quic
图解 QUIC 连接
对每一个字节的解释和再现
这就是 Google 当年强推的 databinding 的下场,现在强推目标转向了 compose,它又能撑几年呢?
Читать полностью…https://aka.ms/customprimarypassword
使用自定义主密码保持已保存密码的私密性
edge的这个功能才是真的实用,在本地存储加密后的密码,避免被其它软件直接读取,例如 https://www.nirsoft.net/utils/web_browser_password.html
一直苦于mount(2)没有xxxxat系列让它能通过fd操作,必须使用当前挂载命名空间内的路径实在是非常不便。结果,只是手册补丁还没合并。syscall早有了:
https://people.kernel.org/brauner/mounting-into-mount-namespaces
世界瞬间美好起来,只需5.2以上版本即可使用
反面教材 https://github.com/GrapheneOS/platform_bionic/commit/d60f2060975f16a3ecd785a2af1b30151e847459
Android T的GKI已经支持GRND_INSECURE,应该使用它来避免init被阻塞而永远无法完成初始化。
https://r8.googlesource.com/r8/+/refs/heads/main/src/main/java/com/android/tools/r8/shaking/ProguardConfigurationParser.java
-keep 指定要保留的类和类成员
-keepclassmembers 指定要保留的类成员,前提是如果它们的类也被保留
-keepclasseswithmembers 指定要保留的类和类成员,前提是所述类成员全部存在
修饰符
allowshrinking 允许删除
allowoptimization 允许优化
allowobfuscation 允许重命名
allowaccessmodification 允许访问控制改为public
allowrepackage 允许移动包,allowsObfuscation会连带设置此项(旧版R8不支持)
allowannotationremoval 允许删除注解 (需要 com.android.tools.r8.allowTestProguardOptions=true)
includedescriptorclasses 也包括类型描述中的类
includecode 忽略
实现DocumentsProvider#isChildDocument(String, String)是支持Intent#ACTION_OPEN_DOCUMENT_TREE的必要条件,DocumentsContract.Root#FLAG_SUPPORTS_IS_CHILD 用于声明该方法是否实现。可惜这个flag只有少数DocumentsProvider拥有,Google自家的云端硬盘也没有。
https://developer.android.com/guide/topics/providers/create-document-provider
这个flag不普及的原因可能因为示例代码没有它,示例只包括如何支持 ACTION_OPEN_DOCUMENT,虽然只需要再多一个方法。
SEAndroid中的多级安全
https://cs.android.com/android/platform/superproject/+/master:external/selinux/libselinux/src/android/android_seapp.c;l=674;drc=48c968d18487b72ba8bfc14c43b796516e92145b
https://cs.android.com/android/platform/superproject/+/master:system/sepolicy/private/seapp_contexts
https://selinuxproject.org/page/NB_MLS
Android14半修复了此问题
限制现已经移入ExternalStorageProvider后端,与平台版本绑定,但其正则表达式"(?i)^/storage/[^/]+/(?:[0-9]+/)?Android/(?:data|obb|sandbox)$"
没有匹配子文件夹情况,因此可以继续用Android13的方法绕过。
相关提交 https://android.googlesource.com/platform/frameworks/base/+/8b55dd05ce694a97123fafa3f01c4f4dfe4854d9
但DocumentsUI前端已经彻底修复,其正则表达式"^/Android/(?:data|obb|sandbox).*"
匹配了子目录情况。已经被推送apex更新的设备可以尝试卸载更新,该前端修复对全部Android11+设备有效。
相关提交 https://android.googlesource.com/platform/packages/apps/DocumentsUI/+/070e14547db2e03590e295ac25b76cfb9f45fc78 注意阅读代码里面的注释
这个问题将于Android15彻底完成修复,不可绕过。
https://dumps.tadiphone.dev/dumps/xiaomi/shennong/-/blob/missi_phone_cn_only64-user-14-UKQ1.230804.001-V816.0.9.0.UNBCNXM-release-keys/system_ext/etc/init/mi-32bit-trans.rc
小米14在纯64位CPU上对32位程序使用了转译。Tango is a binary translation system for GNU/Linux and Android which allows unmodified 32-bit ARM programs to run on 64-bit only ARM processors.
https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
https://www.amanieusystems.com/technology
远程密钥认证初看只是密钥认证的证书链多了几级,直到看见文档……
入门介绍 https://cs.android.com/android/platform/superproject/+/main:hardware/interfaces/security/rkp/README.md
细节介绍 https://cs.android.com/android/platform/superproject/+/main:hardware/interfaces/security/rkp/aidl/android/hardware/security/keymint/IRemotelyProvisionedComponent.aidl
数据格式介绍 https://pigweed.googlesource.com/open-dice/+/HEAD/docs/android.md
目前处于第一阶段,Degenerate DICE,简单来说即传统模型。从数据格式要求来看,出厂Android14的设备将处于第二阶段,预计 Pixel 8 已经开始使用。
Freeze package cgroup before killing
Apps are able to prevent their death by forking multiple processes under different services and monitoring for the death of any of these. When a child death is detected, the remaining process restarts the terminating/terminated service before it's able to be killed itself. This is now prevented by freezing the entire cgroup of the package to be killed before killing the individual processes. After the kills are completed synchronously, the cgroup can be unfrozen to allow for restarts. Before freezing the cgroup, the binder interfaces of the processes about to be frozen are also frozen to prevent indefinite blocking by synchronous Binder callers.
https://github.com/aosp-mirror/platform_frameworks_base/commit/79825c6f2f8b46808e4b431fe52b3be78f1e8ac8
ECH使用的密钥存储在DNS的HTTPS记录(65)中,该记录用于存储一切与HTTPS连接相关的数据,除ECH密钥外还包括应该连接的IP,端口和支持的HTTP版本。
浏览器如果成功获取到HTTPS记录,可以直接发起H3连接,跳过从H2升级的步骤。当然,如果H3连接失败,会快速回退。
Chromium浏览器开启要求:
1. 在浏览器设置中配置DoH,需要足够快速的服务器否则可能会回退到无HTTPS记录
2. 开启测试标志 about://flags/#use-dns-https-svcb-alpn
因为ECH,cloudflare帮忙填写了HTTPS记录,现在即使未开启ECH的浏览器(edge)应该也能直连访问被TCP重置的网站。
cloudflare开始公测ECH
https://blog.cloudflare.com/announcing-encrypted-client-hello
Chromium浏览器开启要求:
1. 在浏览器设置中配置DoH,需要足够快速的服务器否则可能会回退到无ECH
2. 开启测试标志 about://flags/#encrypted-client-hello
现在应该能直连访问被SNI检测屏蔽的网站
https://android-review.googlesource.com/c/platform/ndk/+/2657070
可以正常使用
https://developer.android.com/build/migrate-to-ksp
Note: While not a traditionally-included library dependency, Data Binding also uses an annotation processor to provide its functionality, and KSP support for Data Binding is not planned. You can mitigate the impact of kapt on your build by isolating the usages of Data Binding to separate modules.
隔离UI和数据层到其它模块?Google你是否清醒
https://github.com/GrapheneOS/platform_frameworks_base/commit/a200e9b53f239a89368366b131acdd9dfee9d8c8
什么Windows试用版
https://gist.github.com/vvb2060/7375953b16fd41abdcf2a76363dfaaf4
最近 Maven Central 的网页经常出问题,整理了它的API,直接curl调用算了……
支持保存符号链接的存档格式有tar、wim和rar,7z和zip不支持。另外7z软件把选项藏得很深,与WinRAR不支持则禁用选项不同,它隐藏选项……坑人
Читать полностью…Because ADB 31.0.2 disables mDNS discovery, you must enable mDNS discovery and then restart the ADB server.
export ADB_MDNS_OPENSCREEN=1
adb kill-server
adb start-server
adb mdns services
adb connect driver_vm._adb._tcp
iPhone+Apple https://www.wsj.com/articles/apple-iphone-security-theft-passcode-data-privacya-basic-iphone-feature-helps-criminals-steal-your-digital-life-cbf14b1a
Android+Google https://twitter.com/MishaalRahman/status/1629315374679306240
移动设备的锁屏是数字资产的最后一道安全防线
锁屏被偷瞄不在任何安全模型的考虑范畴内,一旦泄露即可修改密码并且阻止失主的全部找回尝试。
修复被阻塞的随机
https://lwn.net/Articles/800509/
https://lwn.net/Articles/884875/
https://github.com/torvalds/linux/commit/50ee7529ec4500c88f8664560770a7a1b65db72b
https://github.com/torvalds/linux/commit/6f98a4bfee72c22f50aedb39fb761567969865fe
https://github.com/torvalds/linux/commit/48bff1053c172e6c7f340e506027d118147c8b7f
在初始化后,/dev/random和/dev/urandom完全相同,永远不会阻塞或耗尽,99%的程序不应该区分两者。唯一的例外是init,此时可能尚未初始化。
getrandom(0)会阻塞直到初始化完毕,等于/dev/random,GRND_RANDOM已经失去意义。
getrandom(GRND_INSECURE)会在初始化完成前返回尽力而为的随机内容,等于/dev/urandom,不可与GRND_RANDOM同时使用,永远不会阻塞,忽略GRND_NONBLOCK。
x86平台,会在阻塞1秒后初始化完毕,因此/dev/urandom始终与/dev/random相同。