AAPT: error: resource android:attr/fontVariationSettings not found

最近在编译Flutter项目的时候,报错如下:

解决方案:

try to change the compileSdkVersion above 27:

compileSdkVersion 28

参考链接


resource android:attr/fontVariationSettings not found

WOL网络唤醒在微星主板上开启(ubuntu 20.04/Windows 10双系统)

网络唤醒

微星H97I-AC的板子开启WOL网络唤醒

主板:微星 H97I-AC,集成 Realtek 千兆网卡,这个网卡自带网络唤醒功能,但是需要在操作系统中通过驱动开启这个功能,BIOS中无法直接开启。
操作系统:Windows 10/ubuntu 20.04双系统,双系统都需要进行配置,才能实现全部系统关机之后都能正常唤醒。

BIOS 设置

  1. 高级–整合周边设备–网卡ROM启动,设置为允许
  2. 高级–电源管理设置–Eup 2013,设置为禁止
  3. 高级–唤醒事件设置–PCIE设备唤醒,设置为允许

Windows 10 设置

  1. 控制面板–所有控制面板项–网络连接
  2. 在网卡适配器点击鼠标右键–属性,弹出的属性对话框中
  3. 选择网络选项卡–配置
  4. 选择高级选项卡,将关机 网络唤醒设置为开启,将魔术封包唤醒设置为开启
  5. 电源管理选项卡,勾选下面三个选项,允许此设备唤醒计算机。

ubuntu 20.04设置

里面的内容如下:

上述配置是向驱动发送控制命令,启用网络唤醒功能。

启用服务

远程唤醒

也可尝试 etherwake

参考链接


Error: Your CLT does not support macOS 11.0.

最近系统升级到macOS Big Sur(11.0.1)之后,系统报告如下错误:

解决方案如下:

参考链接


ubuntu 20.04将Python3交叉编译移植到Android平台

最近想在Android环境中集成Python3,参考了一下网上的实现,发现已经有项目实现这个功能的,具体的编译过程参考下面:

参考链接


AX88179 USB网卡无法在macOS Big Sur(11.0.1)系统上正常使用

Background
Last year, we wrote that older macOS drivers, known as System Extensions (KEXTs), would begin to be deprecated as of the macOS 10.15 Catalina release. This week, as macOS 11 Big Sur is released, KEXTs have officially been deprecated and are no longer functional.

Instead, Apple is now enforcing the requirement for devices that require third-party drivers to operate as DriverKit Extensions (DEXTs). This change affects many products across the consumer electronics industry, including Docking Stations, USB peripherals, Security/Anti-Virus software, and Networking adapters.

Luckily, most platform vendors and integrated circuit (IC) manufacturers have been prepared for this change and began working on their DEXT implementation after Apple released pertinent documentation at their WWDC (World Wide Developer Conference) in June 2019.

Unfortunately, some vendors could not begin their full transition from KEXT to DEXT until this year. Not all pertinent DriverKit documentation was released at the 2019 event as expected, but, instead, was released at WWDC 2020 in June. Specifically, for Plugable and many other brands, this applies to ASIX-based USB Ethernet Adapters like our USB3-E1000, USBC-E1000, USB2-E1000, and USB2-E100, which we wrote about here for the release of macOS 10.15 Catalina:
https://plugable.com/2019/10/04/usb-ethernet-adapter-not-working-after-macos-catalina-10-15-update-we-can-help/

Current Status for ASIX-based Ethernet Adapters [Novemeber 13, 2020]
We began removing macOS support from our most popular wired network adapters (USB3-E1000 and USBC-E1000) in October 2019. We saw the continued potential for a poor or broken user experience with ASIX-based adapters on macOS and could not in good conscience market the adapters as fully compatible in the long-term as long as ASIX was unwilling to commit to continued development and support of their ICs on macOS.

We have continued to push ASIX for a DEXT beta driver to validate and test internally in the past year. Unfortunately, ASIX has been unable to deliver this solution as requested in anticipation of this significant macOS milestone. We expect a Beta driver from ASIX by the end of November for AX88179 products like the USB3-E1000 and USBC-E1000. Once the driver is validated, we will update this blog post and product driver pages with links to download the driver.

If a wired Ethernet connection is critical to your workflow, Plugable recommends not updating to macOS 11 Big Sur from macOS 10.15 Catalina.

At this time, Plugable is unable to provide a DEXT driver for the following products:
USB3-E1000 IC: AX88179
USBC-E1000 IC: AX88179
USB2-E1000 IC: AX88178 (ASIX has discontinued the IC in this product, and they have not committed to a compatible driver for macOS 11 Big Sur)
The USB2-E100 IC: AX88772 ASIX-based product continues to function, utilizing the in-box drivers in macOS.

We understand this news can be frustrating for our customers and is a situation we have been working to avoid for over one year. We will update this blog post as new information is available to us.

While we cannot promise a functional DEXT driver at any point in the future, if you would like to be notified of that news should it occur, please sign-up on the form below, and we will email everyone as soon as it is available.

继续阅读AX88179 USB网卡无法在macOS Big Sur(11.0.1)系统上正常使用

ubuntu 20.04编译Android 11源代码&模拟器

Android 11 系统映像可直接将 ARM 指令转换成 x86 指令,因此以前很多需要真机测试的情况,现在只需要模拟器就可以进行操作了。

不过,根据官方博客 Run ARM apps on the Android Emulator 尾部的一段注意事项:

Note that the ARM to x86 translation technology enables the execution of intellectual property owned by Arm Limited. It will only be available on Google APIs and Play Store system images, and can only be used for application development and debug purposes on x86 desktop, laptop, customer on-premises servers, and customer-procured cloud-based environments. The technology should not be used in the provision of commercial hosted services.

这段事项说明,自己编译的镜像是没办法用上这个功能的,必须是Google编译好的镜像。

由于众所周知的原因,我们是没办法正常下载Android的源代码的,因此只能使用国内的镜像来操作了。

1.安装repo工具以及依赖

2.在需要存储代码的地方创建文件夹

3.使用镜像下载Android源代码

清华大学的镜像

4.Android 模拟器编译(可选)

编译完成之后,产生的模拟器可执行文件及库文件都位于external/qemu/objs/android目录下:

后面就可以像执行 SDK 中的模拟器那样,执行我们编译的模拟器了:

5.列出android-11全部分支

6.编译Android 11系统镜像

7.引入编译环境变量

8.设置编译目标,此处我们指定编译x86_64下的完整调试版本

9.如果需要跟踪调试代码,建议编译为调试类型

10.编译

注意此处如果发生编译失败,原因基本上是编译顺序导致的引用出错,也就是某些模块还没有编译完成,其他模块已经开始尝试链接,导致依赖错误,此时只要把多线程并发编译修改成单线程编译即可,即直接执行

如果由于内存不足导致的编译失败,可以增加物理内存。但是如果内存无法增加的话,那么适当增加交换分区/交换文件的大小(建议配置16GB以上的交换分区)可以解决此问题,只是编译速度会下降。

运行镜像

选择system-qemu.img和vendor-qemu.img,这两个镜像是专门为qemu运行制作的,如果选择system.img 和vendor.img,则avd运行失败。

上面运行起来的镜像是从~/AndSrc/aosp/out/debug/target/product/generic/hardware-qemu.ini即可读取配置信息的,但是这个文件直接修改无效,我们如果需要修改参数,只能从启动参数中设置。
比如我们如果需要增大内存,开启GPU的支持,则执行如下命令:

编译支持ARM应用的镜像

尽管根据

Note that the ARM to x86 translation technology enables the execution of intellectual property owned by Arm Limited. It will only be available on Google APIs and Play Store system images, and can only be used for application development and debug purposes on x86 desktop, laptop, customer on-premises servers, and customer-procured cloud-based environments. The technology should not be used in the provision of commercial hosted services.

我们自己编译的镜像是没办法直接从源代码编译支持安装运行 ARM 应用的。

但是有两个变通方案:

  1. Google官方的 Android 11 镜像中提取需要的文件塞到我们自己编译的镜像里,参考方案: Adding ARM native bridge to the AOSP11 x86 emulatorandroid_vendor_google_emu-x86
  2. 使用 Intel Houdini 实现支持,参考方案:Include Intel Houdini in Android-x86

首先,我们尝试从Google官方的 Android 11 镜像中提取需要的文件,执行如下脚本:

执行编译:

参考链接


Android模拟器支持运行ARM应用,Android 11系统映像可直接将ARM指令转换成x86指令

随着 Android 11 开发者预览版的发布,我们同时也推出了 Android 11 系统映像。新的系统映像在执行 ARM 二进制文件方面取得了显著的性能提升。此前,依赖 ARM 库且无法构建 x86 版本应用的开发者只能使用完整的 ARM 模拟系统映像 (其速度远低于在 x86 设备上运行 x86 系统映像) 或者实体机。Android 11 系统映像能够在不影响整个系统的前提下,直接将 ARM 指令转换成 x86 指令。开发者无需搭建高负载的 ARM 环境即可执行 ARM 二进制文件并进行测试。

继续阅读Android模拟器支持运行ARM应用,Android 11系统映像可直接将ARM指令转换成x86指令

如何激活机器自带正版Windows10或Office/查询Windows内置序列号

不时看到新机友因为各种原因,无法正确激活机器自带的正版Windows10或Office,解决方法如下:
1、全新机器,第一次启动,连接上网。通常自动激活Windows10,Win10激活后,马上运行Office,据说因服务器原因很多机油无法立即激活,过一小会(几分钟)后就可以了。

2、 通用手工激活方法,正确输入正版软件的系列号。 该系列号位于机器Bios内,且不会因官方Bios升级取消。

不会查Bios的童鞋,请下载Produkey(绿色软件)自行查询(目前测试ThinkPad T440是可以的)

继续阅读如何激活机器自带正版Windows10或Office/查询Windows内置序列号