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 指令,因此以前很多需要真机测试的情况,现在只需要模拟器就可以进行操作了。

由于众所周知的原因,我们是没办法正常下载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.编译

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

运行镜像

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

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

参考链接


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内置序列号

ubuntu 18.04完整安装配置WordPress 5.5.3并调优

WordPress配置文件

启用Apache2cache,expire,gzip模块,加强服务器性能

PHP-FPM进程数的设定,提高响应速度,解决页面加载时候缓慢的问题(如果感觉打开页面缓慢,建议调整下面的配置,这种情况尤其在访问量不大的时候会出现短暂的耗时增大,原因就是php进程被临时创建导致延迟增大

启用PHP7的opcache配置

重启服务

参考链接


HttpClient利用MultipartEntityBuilder取代MultipartEntity上传图片文件到服务器

注意:在HttpClient4.3之后,原来的上传文件方法MultipartEntity已经不建议使用,现替换成新的httpmime下面的MultipartEntityBuilder。

需要添加httpclient-4.5.jar、httpmime-4.5.jar两个包

maven添加:


下面我们对比一下MultipartEntity和MultipartEntityBuilder的使用区别:

MultipartEntityBuilder:

MultipartEntity:

直接上替换后的测试代码:


继续阅读HttpClient利用MultipartEntityBuilder取代MultipartEntity上传图片文件到服务器