add-update.sh
1.4 KB
用于 Windows 的 LineageOS 更新包推送脚本
即 https://github.com/LineageOS/android_packages_apps_Updater/blob/lineage-23.0/push-update.sh 的 Windows 版
其他系统的话大概改改 shell 脚本里的 updates_dir 也能用
这种方式推送的更新包必须是能通过 Recovery 签名校验的,如果没有第三方 Recovery 或未设置忽略签名校验则只能安装未更改的系统包
即 https://github.com/LineageOS/android_packages_apps_Updater/blob/lineage-23.0/push-update.sh 的 Windows 版
其他系统的话大概改改 shell 脚本里的 updates_dir 也能用
这种方式推送的更新包必须是能通过 Recovery 签名校验的,如果没有第三方 Recovery 或未设置忽略签名校验则只能安装未更改的系统包
👍1
https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost-the-api-war/
在翻 Windows Shim Database 时看到的一篇文章
商业软件靠兼容性赢得市场
Windows 升级一直要保持向后兼容导致 API 不能变
在翻 Windows Shim Database 时看到的一篇文章
商业软件靠兼容性赢得市场
Windows 升级一直要保持向后兼容导致 API 不能变
Joel on Software
How Microsoft Lost the API War
Here’s a theory you hear a lot these days: “Microsoft is finished. As soon as Linux makes some inroads on the desktop and web applications replace desktop applications, the mighty empir…
❤1
微软的本地化指南
https://learn.microsoft.com/en-us/globalization/reference/microsoft-style-guides
以及术语表
https://msit.powerbi.com/view?r=eyJrIjoiODJmYjU4Y2YtM2M0ZC00YzYxLWE1YTktNzFjYmYxNTAxNjQ0IiwidCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0NyIsImMiOjV9
Android 翻译查询
https://translations.zhanghai.me/
做本地化的可以参考
https://learn.microsoft.com/en-us/globalization/reference/microsoft-style-guides
以及术语表
https://msit.powerbi.com/view?r=eyJrIjoiODJmYjU4Y2YtM2M0ZC00YzYxLWE1YTktNzFjYmYxNTAxNjQ0IiwidCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0NyIsImMiOjV9
Android 翻译查询
https://translations.zhanghai.me/
做本地化的可以参考
Docs
Microsoft Localization Style Guides - Globalization
Download Microsoft Style Guides for guidance on Microsoft's language and style conventions.
Copy-ACL.ps1
1.7 KB
https://devblogs.microsoft.com/powershell/copy-acl/
将其他盘的
将其他盘的
Program Files 文件夹权限设置到和 C 盘上的一致.\Copy-ACL.ps1 -FromPath "C:\Program Files" -Destination "D:\Program Files" -Passthru
❤3
与 Windows Update 斗智斗勇一天,更新到87%后回滚,发现
然后一看里面是 Microsoft XPS Document Writer v4
这明明是微软自己的组件,你怎么自己卡了?
推荐按照这个文档排查更新失败的问题
https://learn.microsoft.com/zh-cn/windows/deployment/upgrade/setupdiag
<DriverPackage Inf="oem279.inf" BlockMigration="True" HasSignedBinaries="False"/>
然后一看里面是 Microsoft XPS Document Writer v4
这明明是微软自己的组件,你怎么自己卡了?
推荐按照这个文档排查更新失败的问题
https://learn.microsoft.com/zh-cn/windows/deployment/upgrade/setupdiag
Docs
SetupDiag
SetupDiag 的工作原理是检查 Windows 安装程序日志文件。 本文介绍如何使用 SetupDiag 工具诊断 Windows 安装程序错误。
Howard's 碎碎念
与 Windows Update 斗智斗勇一天,更新到87%后回滚,发现 <DriverPackage Inf="oem279.inf" BlockMigration="True" HasSignedBinaries="False"/> 然后一看里面是 Microsoft XPS Document Writer v4 这明明是微软自己的组件,你怎么自己卡了? 推荐按照这个文档排查更新失败的问题 https://learn.microsoft.com/zh-cn/windows/deployment/upgrade/setupdiag
强制移除一个驱动
devcon 可以用这个工具下载
https://github.com/Drawbackz/DevCon-Installer
用旧版本工具也没问题
比如 Windows 11 25H2 用 Windows 10 1703 的 devcon 都没问题
devcon -f dp_delete oem279.inf
devcon 可以用这个工具下载
https://github.com/Drawbackz/DevCon-Installer
用旧版本工具也没问题
比如 Windows 11 25H2 用 Windows 10 1703 的 devcon 都没问题
GitHub
GitHub - Drawbackz/DevCon-Installer: Quickly download and install DevCon without downloading the entire Windows Driver Kit
Quickly download and install DevCon without downloading the entire Windows Driver Kit - Drawbackz/DevCon-Installer
Howard's 碎碎念
与 Windows Update 斗智斗勇一天,更新到87%后回滚,发现 <DriverPackage Inf="oem279.inf" BlockMigration="True" HasSignedBinaries="False"/> 然后一看里面是 Microsoft XPS Document Writer v4 这明明是微软自己的组件,你怎么自己卡了? 推荐按照这个文档排查更新失败的问题 https://learn.microsoft.com/zh-cn/windows/deployment/upgrade/setupdiag
然而这并不是更新失败的根本原因,reddit 上有人抱怨了 https://www.reddit.com/r/windowsinsiders/comments/1p3ztaz/release_preview_installation_error_0x8007042b
触发这种一直更新失败一直推送更新的操作是:在系统在 Release Preview 通道时,选择下一版本退出预览体验计划
Windows Update 会在 Windows 11 25H2 一直推送同版本的 25H2 然后更新失败
触发这种一直更新失败一直推送更新的操作是:在系统在 Release Preview 通道时,选择下一版本退出预览体验计划
Windows Update 会在 Windows 11 25H2 一直推送同版本的 25H2 然后更新失败
Reddit
From the windowsinsiders community on Reddit
Explore this post and more from the windowsinsiders community
Android 隐藏 API 的调用的一个方法是自己写一遍 stub,通常我们方法实现中会写
而公开 API 在 android.jar 中会写
这个是怎么来的呢?
翻阅了源码发现是这里来的
https://cs.android.com/android/platform/superproject/+/android-latest-release:tools/metalava/metalava/src/main/java/com/android/tools/metalava/stub/JavaStubWriter.kt
相关工具的说明:https://cs.android.com/android/_/android/platform/tools/metalava/+/main:README.md
throw new UnsupportedOperationException("STUB");而公开 API 在 android.jar 中会写
throw new RuntimeException("Stub!");这个是怎么来的呢?
翻阅了源码发现是这里来的
https://cs.android.com/android/platform/superproject/+/android-latest-release:tools/metalava/metalava/src/main/java/com/android/tools/metalava/stub/JavaStubWriter.kt
private fun writeThrowStub() {
writer.write("throw new RuntimeException(\"Stub!\");")
}相关工具的说明:https://cs.android.com/android/_/android/platform/tools/metalava/+/main:README.md
# Metalava
Metalava is a metadata generator intended for JVM type projects. The main
users of this tool are Android Platform and AndroidX libraries, however this
tool also works on non-Android libraries.
Metalava has many features related to API management. Some examples of the most
commonly used ones are:
* Allows extracting the API (into signature text files, into stub API files
which in turn get compiled into android.jar, the Android SDK library) and
more importantly to hide code intended to be implementation only, driven by
javadoc comments like @hide, @doconly, @removed, etc, as well as various
annotations.
* Extracting source level annotations into external annotations file (such as
the typedef annotations, which cannot be stored in the SDK as .class level
annotations) to ship alongside the Android SDK and used by Android Lint.
Howard's 碎碎念
遇到了必须使用通行密钥才能登录的情况(是 Google 账户高级保护计划) 然而 HyperOS 中跨设备认证有点问题 发现可以这样解决: 先到自动填充服务界面,这时候是没有其他服务可以选的。 进入首选服务选择小米密码管理器,首选服务不能选谷歌。 这时候返回之后界面就会多出来其他服务,启用谷歌 这时候就可以尝试使用谷歌的通行密钥了 即使这个时候再重新进入自动填充界面其他服务也不显示了也没问题,还有重新选首选服务为小米要返回把其他服务的谷歌启用。
还有一个问题
HyperOS 中跨设备通行密钥认证时如果用小米自带的二维码扫描器只会唤起小米的,它不支持跨设备认证
要用谷歌智能镜头扫描才能唤起谷歌的
HyperOS 中跨设备通行密钥认证时如果用小米自带的二维码扫描器只会唤起小米的,它不支持跨设备认证
要用谷歌智能镜头扫描才能唤起谷歌的
recover_notepad_data.ps1
16.3 KB
AI 写的
从 Windows 新版记事本的暂存区恢复数据
系统不知道为什么商店应用大部分打不开了,恢复无望,可能要重装系统了
然而记事本暂存区有大量笔记,因为它支持关闭前不保存保留就把它当作便签了
于是写了这个脚本
后来发现已经有人写过了,就根据文章优化一点点 https://forum.butian.net/share/2947
从 Windows 新版记事本的暂存区恢复数据
系统不知道为什么商店应用大部分打不开了,恢复无望,可能要重装系统了
然而记事本暂存区有大量笔记,因为它支持关闭前不保存保留就把它当作便签了
于是写了这个脚本
后来发现已经有人写过了,就根据文章优化一点点 https://forum.butian.net/share/2947