黑苹果安装过程

记录一下安装黑苹果的全过程。

准备

硬件配置

Lenovo Xiaoxin Air 13 Pro, 对应的硬件配置如下:

CPU 内存 显卡 声卡
Intel Core i7 6500U @ 2.50GHz 8G Intel HD Graphics 520 Intel Corporation Sunrise Point-LP HD Audio

操作系统版本

操作系统版本:macOS-Catalina-10.15.4-19E266

镜像制作

下载etcher,打开镜像,选择U盘,点击Flash即可。

微PE工具箱

http://www.wepe.com.cn/download.html中下载对应的PE版本并刻录到U盘,用于备份EFI或者进入不了系统时的急救。

安装

安装过程比较简单,详见黑果小兵macOS-Catalina-10.15.4-19E266安装过程中的步骤。

驱动安装

安装完成后,用Clover Configurator加载EFI分区,然后复制EIF->CLOVER下的config_5700.plist为config.plist,将对应的驱动补丁下载, 并将kext目录下的几个文件放到EFI的CLOVER/kexts/other目录下。

声卡对应的inject id为3。

打开hidpi:

参考:

https://www.sqlsec.com/2018/09/hidpi.html

https://github.com/xzhih/one-key-hidpi

打开终端执行以下命令,按照文档中的说明一步步操作即可:

1
sh -c "$(curl -fsSL https://raw.githubusercontent.com/xzhih/one-key-hidpi/master/hidpi-zh.sh)"

亮度调节:

参考:https://www.bilibili.com/video/av54305176/

首先删除以前用过的亮度驱动,如ACPIBacklightInjector,删除ACPI/patched下的SSDT-PNLF.aml,然后打开clover configurator ,ACPI部分与视频一样勾上AddPNLF,然后Device部分勾选SetIntelBacklight和SetIntelMaxBacklight,然后你需要在你的kexts/other中放入较新版本的WhateverGreen.kext,重启生效。

Dell 9020显示驱动

参考https://imac.hk/heipingguo-hd4400-hd4600-kext.html

Dell 9020的驱动比较简单,不用上面这么麻烦,用Clover Configurator挂载EFI目录,再打开config.plist进行编辑:

1
2
3
4
5
6
7
8
9
10
#Graphics:
ig-platform-id ---> 0x0D220003
或者从右边的下拉中选择0x0a260006
#Devices:
IntelGFX ---> 0x04128086
Audio inject ---> 3
#SMBIOS:
Product Model ---> iMac15,1
#Boot:
如果默认只启动MacOS,设置Default Boot Volume为对应的操作系统的Label

台式机打开hidpi时注意选择:

1
2
3
1:开启hidpi
2:iMac
3:手动选择:1920x1080 1680x944 1440x810

显示器不能使用VGA,否则不能显示。

Dell 9020对应的EFI下载

打印机

1
2
3
4
5
#https://warwick.ac.uk/fac/soc/wbs/central/issu/help/kb/hardware/printers/kyoceramac-win/
wget https://warwick.ac.uk/fac/soc/wbs/central/issu/help/kb/hardware/printers/kyoceramac-win/macphase4.0_2018.01.19-eu.zip
#install Kyocera OS X 10.8+ Web build 2018.01.05.dmg
#参考上面的网址配置即可。如果是windows smb的话,地址为:smb://192.168.100.105/Kyocera02
#驱动选择Kyocera FS-6525MFP

其他

vscode可以在命令行直接输入code打开:

1
2
#for mac
sudo ln -s '/Applications//Visual Studio Code.app/Contents/Resources/app/bin/code' /usr/bin/code

加载硬盘为自定义的目录:

1
2
3
4
5
6
7
8
#https://blog.csdn.net/wangrui1573/article/details/82562253
#先打开UUID
diskutil info /dev/disk1s1
#sudo diskutil umount /Volumes/Developer
#sudo vifs (sudo vim /etc/fstab)
#/dev/disk0s4 /data hfs rw,auto
UUID=0C54584B-F516-42F8-88A4-4165E9D1E702 /Developer/ apfs rw 1 2
#disk Utility会自动mount对应的point为/Develper

环境变量:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
alias ll='ls -l'
alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code"
export LANG=zh_CN.UTF-8

function proxy_off(){
unset http_proxy
unset https_proxy
echo -e "The proxy has been closed!"
}
function proxy_on() {
export no_proxy="127.0.0.1,localhost,10.0.0.0/8,172.0.0.0/8,192.168.0.0/16,*.zerofinance.net"
export http_proxy="http://127.0.0.1:1082"
export https_proxy=$http_proxy
echo -e "The proxy has been opened!"
}

export ANDROID_HOME=/Developer/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/emulator

export JAVA_HOME=$(/usr/libexec/java_home)
export M2_HOME=/Developer/apache-maven-3.3.9
export GRADLE_USER_HOME=/Developer/.gradle
export PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH

下载m3u8:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash

#declare var
#Allow how many threads to download.
download_max_connection=10
#The aria2c's max connection
aria2c_max_connection=16
rootUrl='http://hong.tianzhen-zuida.com/20200102/17650_845edc1f/1000k/hls/'
m3u8File=$1
outputFile=output.mp4
filelistFile=filelist.txt
tempFolder=downTemp
header="--header='Referer: https://cdnx.stream/player/o2AWUrtSqQuo1Ma/'"
userAgent="Mozilla/5.0 (Macintosh\; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36"
aria2cCmd="aria2c -x $aria2c_max_connection -U '$userAgent'"
if [ ! -d "$tempFolder" ]; then
mkdir -p "$tempFolder"
fi

cd $tempFolder

#checkout either the finally file existed
if [ -f "$outputFile" ]; then
echo "$outputFile already existed!"
exit -1
fi

# echo -n "" > $filelistFile
if [ -f "$filelistFile" ]; then
rm -fr $filelistFile
fi

index=0
playlist=()
while read line
do
if [[ ${line:0:1} == "#" ]]; then
continue
fi
if [[ ${line} != https://* ]]; then
line="${rootUrl}${line}"
fi
playlist[$index]=$line
index=$((index+1))
done < $m3u8File
index=0
fileindex=0
playlistlength=${#playlist[@]}
echo "playlistlength--->$playlistlength"
while(( index <= playlistlength ))
do
templength=$download_max_connection
newplaylist=(${playlist[@]:$index:$templength})
for url in ${newplaylist[@]}
do
[[ $url == "" ]] && continue
# echo "url--->$url"
fileName="${fileindex}.mp4"
if [[ ! -f "$fileName" || -f "${fileName}.aria2" ]]; then
echo "${url}" | sed "s;^;$aria2cCmd -o \"${fileName}\" \";g" \
| sed "s;$;\";g" | sh +x &
if [[ $? == 0 ]]; then
echo "file '${fileName}'" >> $filelistFile
fi
else
echo "$fileName already existed!"
if [[ $? == 0 ]]; then
echo "file '${fileName}'" >> $filelistFile
fi
fi
fileindex=$((fileindex+1))
done
wait
index=$((index+$templength))
done

if [ -f "$filelistFile" ]; then
ffmpeg -f concat -i $filelistFile -c copy $outputFile
fi
cd -

使用annie下载视频:

请参考:https://github.com/iawia002/annie

下载优酷vip视频:

先安装chrome插件: cookies.txt,然后使用以下命令下载:

1
2
3
4
5
6

#查看格式:
#如果不是vip视频不用加-c参数:
annie -i -c youku.txt "url"
#下载指定格式视频:
annie -f 格式类型 -c youku.txt "url"

参考