oneplus6-编译-LineageOS-19.1-android12

embedded/2024/11/17 0:40:11/

lineage-19.1/oneplus6-build.md

修复内核崩溃

经过此两修改后, 编译出的OTA包 刷入手机,

手机重启正常越过logo 进入android, 但卡在LineageOS-19的弧形进度界面,

没有此两修改时, 根本进不到android, 只到开机logo就黑屏 亮呼吸灯 , 串口处于900E(高通ramdump模式),

因此此两修改有用,但问题还没完毕

1. 根据lineageOS-19.1官方OTA包和我ota包的vendor内容对比,补充缺少的文件

修改记录:TheMuppets-v/proprietary_vendor_oneplus.git/718403

参考 ota-compare-my-to-official/file_ls_not_in_my_otaZip.txt

对 TheMuppets/proprietary_vendor_oneplus.git : vendor/oneplus/sdm845-common/sdm845-common-vendor.mk 的 PRODUCT_COPY_FILES 新增以下行:

PRODUCT_COPY_FILES += \
#...
#新增以下行:vendor/oneplus/sdm845-common//proprietary/product/priv-app/HotwordEnrollmentOKGoogleWCD9340_SDM845/HotwordEnrollmentOKGoogleWCD9340_SDM845.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/product/priv-app/HotwordEnrollmentOKGoogleWCD9340_SDM845/HotwordEnrollmentOKGoogleWCD9340_SDM845.apk \vendor/oneplus/sdm845-common//proprietary/product/priv-app/HotwordEnrollmentXGoogleWCD9340_SDM845/HotwordEnrollmentXGoogleWCD9340_SDM845.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/product/priv-app/HotwordEnrollmentXGoogleWCD9340_SDM845/HotwordEnrollmentXGoogleWCD9340_SDM845.apk \vendor/oneplus/sdm845-common//proprietary/system/frameworkc/qcnvitems.jar:$(TARGET_COPY_OUT_VENDOR)/proprietary/system/frameworkc/qcnvitems.jar \vendor/oneplus/sdm845-common//proprietary/system/framework/tcmclient.jar:$(TARGET_COPY_OUT_VENDOR)/proprietary/system/framework/tcmclient.jar \vendor/oneplus/sdm845-common//proprietary/system/framework/WfdCommon.jar:$(TARGET_COPY_OUT_VENDOR)/proprietary/system/framework/WfdCommon.jar \vendor/oneplus/sdm845-common//proprietary/system_ext/app/NxpNfcNci/NxpNfcNci.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/app/NxpNfcNci/NxpNfcNci.apk \vendor/oneplus/sdm845-common//proprietary/system_ext/app/QtiTelephonyService/QtiTelephonyService.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/app/QtiTelephonyService/QtiTelephonyService.apk \vendor/oneplus/sdm845-common//proprietary/system_ext/app/SoterService/SoterService.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/app/SoterService/SoterService.apk \vendor/oneplus/sdm845-common//proprietary/system_ext/framework/com.android.hotwordenrollment.common.util.jar:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/framework/com.android.hotwordenrollment.common.util.jar \vendor/oneplus/sdm845-common//proprietary/system_ext/framework/com.nxp.nfc.jar:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/framework/com.nxp.nfc.jar \vendor/oneplus/sdm845-common//proprietary/system_ext/framework/com.qti.dpmframework.jar:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/framework/com.qti.dpmframework.jar \vendor/oneplus/sdm845-common//proprietary/system_ext/framework/dpmapi.jar:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/framework/dpmapi.jar \vendor/oneplus/sdm845-common//proprietary/system_ext/framework/qcrilhook.jar:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/framework/qcrilhook.jar \vendor/oneplus/sdm845-common//proprietary/system_ext/framework/vendor.qti.hardware.alarm-V1.0-java.jar:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/framework/vendor.qti.hardware.alarm-V1.0-java.jar \vendor/oneplus/sdm845-common//proprietary/system_ext/priv-app/IFAAService/IFAAService.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/priv-app/IFAAService/IFAAService.apk \vendor/oneplus/sdm845-common//proprietary/system_ext/priv-app/ims/ims.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/priv-app/ims/ims.apk \vendor/oneplus/sdm845-common//proprietary/system_ext/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk \vendor/oneplus/sdm845-common//proprietary/system_ext/priv-app/WfdService/WfdService.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/system_ext/priv-app/WfdService/WfdService.apk \vendor/oneplus/sdm845-common//proprietary/vendor/app/CneApp/CneApp.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/app/CneApp/CneApp.apk \vendor/oneplus/sdm845-common//proprietary/vendor/app/IWlanService/IWlanService.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/app/IWlanService/IWlanService.apk \vendor/oneplus/sdm845-common//proprietary/vendor/app/TimeService/TimeService.apk:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/app/TimeService/TimeService.apk \vendor/oneplus/sdm845-common//proprietary/vendor/etc/vintf/manifest/android.hardware.gnss@2.1-service-qti.xml:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/etc/vintf/manifest/android.hardware.gnss@2.1-service-qti.xml \vendor/oneplus/sdm845-common//proprietary/vendor/etc/vintf/manifest/android.hardware.neuralnetworks@1.3-service-qti.xml:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/etc/vintf/manifest/android.hardware.neuralnetworks@1.3-service-qti.xml \vendor/oneplus/sdm845-common//proprietary/vendor/etc/vintf/manifest/manifest_android.hardware.drm@1.3-service.widevine.xml:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/etc/vintf/manifest/manifest_android.hardware.drm@1.3-service.widevine.xml \vendor/oneplus/sdm845-common//proprietary/vendor/etc/vintf/manifest/vendor.qti.gnss@4.0-service.xml:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/etc/vintf/manifest/vendor.qti.gnss@4.0-service.xml \vendor/oneplus/sdm845-common//proprietary/vendor/lib/libfastcvopt.so:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/lib/libfastcvopt.so \vendor/oneplus/sdm845-common//proprietary/vendor/lib/libthermalclient.so:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/lib/libthermalclient.so \vendor/oneplus/sdm845-common//proprietary/vendor/lib64/libfastcvopt.so:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/lib64/libfastcvopt.so \vendor/oneplus/sdm845-common//proprietary/vendor/lib64/libthermalclient.so:$(TARGET_COPY_OUT_VENDOR)/proprietary/vendor/lib64/libthermalclient.so
2. 解决编译错误Prebuilt apk found in PRODUCT_COPY_FILES BUILD_PREBUILT instead

修改记录:LineageOS-v/android_build.git/83a47c

mka showcommands bacon 时报错 Prebuilt apk found in PRODUCT_COPY_FILES BUILD_PREBUILT instead 解决

LineageOS/android_build.git : build/make/core/Makefile
函数check-product-copy-files 中 : $(error 改为 $(waring

define check-product-copy-files
$(if $(filter-out $(TARGET_COPY_OUT_SYSTEM_OTHER)/%,$(2)), \
-  $(if $(filter %.apk, $(2)),$(error \
+  $(if $(filter %.apk, $(2)),$(waring \Prebuilt apk found in PRODUCT_COPY_FILES: $(1), use BUILD_PREBUILT instead!))) \

参考1: https://blog.csdn.net/qq_44844314/article/details/130132581

参考2: https://blog.csdn.net/kc58236582/article/details/53364239

(不奏效,待排查)记录android崩溃日志,增加logcat命令脚本作为服务

修改点
  • LineageOS/android_system_core.git : /app4/lineage19_oneplus6/system/core
/app4/lineage19_oneplus6/system/core/libcutils/fs_config.cpp
/app4/lineage19_oneplus6/system/core/rootdir/init.rc
  • TheMuppets/proprietary_vendor_oneplus.git /sdm845-common: /app4/lineage19_oneplus6/vendor/oneplus/sdm845-common
/app4/lineage19_oneplus6/vendor/oneplus/sdm845-common/sdm845-common-vendor.mk
/app4/lineage19_oneplus6/vendor/oneplus/sdm845-common/myLogScript.sh

参考1: 新增android日志服务: https://blog.csdn.net/xuanyulevel6/article/details/140018074

android12启动卡死在android门口(Lineage弧形图标) 修改x.cr排查死在哪

现状: oneplus6手机刷入我编译的LineageOS19.1(android12) ,内核正常启动, 卡死在android门口(Lineage弧形图标)

排查方案: 修改x.rc排查死在哪

步骤1.利用twrp的adb shell修改x.rc

grep yyy /system_root/system/etc/init/hw/init.rc

    write /system/yyy02-on-init 1write /system/yyy04-on-early-fs 1write /mnt/user/0/yyy03-on-post-fs 1write /system/yyy05-on-post-fs 1write /system/bin/yyy06-on-late-fs 1write /system/bin/yyy07-on-post-fs-data 1write /data/yyy08-on-post-fs-data 1write /data/system/yyy09-on-post-fs-data 1write /data/yyy10-on-post-fs-data 1mkdir /data/apex/yyy11-mkdir-on-post-fs-datamkdir /data/yyy12-mkdir-on-post-fs-datamkdir /data/yyy13-on-post-fs-datawrite /data/yyy16-on-boot 1write /system/yyy17-on-boot 1write /system/yyy15-on-charger 1
步骤2. 正常启动手机 引发LineageOS19.1卡死在弧形图标
步骤3. 进twrp观看x.rc修改点执行效果

fastboot boot twrp-3.7.0_11-0-enchilada.img | twrp-3.5.2_9-0-enchilada.img

(twrp启动后可能要等一会儿才能连的上adb shell)

twrp界面操作: Mount --> data 、 system

adb shell :

mount | grep system

/dev/block/sda13 on /system_root type ext4 (ro,seclabel,relatime)
/dev/block/sda13 on /system type ext4 (ro,seclabel,relatime)

(被执行到的修改点)find / -name yyy* 2>/dev/null

/data/yyy13-on-post-fs-data
/data/yyy16-on-boot
/data/yyy12-mkdir-on-post-fs-data
/data/yyy10-on-post-fs-data
/data/apex/yyy11-mkdir-on-post-fs-data
/data/yyy08-on-post-fs-data

对比 x.rc ,发现有不少修改点没有被执行到

oneplus6-build

#解决 repo sync 时 可能的报错
sudo apt install -y git-lfs
#git-lfs filter-process --skip: 1: git-lfs: not found
#fatal: 远端意外挂断了
#error.GitError: Cannot checkout LineageOS/android_external_chromium-webview_prebuilt_arm: Cannot initialize work tree for LineageOS/android_external_chromium-webview_prebuilt_arm
#error: Cannot checkout LineageOS/android_external_chromium-webview_prebuilt_armcurl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o /app/bin/repo
chmod a+x /app/bin/repoexport PATH_BASE=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/app/bin/
export PATH=$PATH_BASED=/app4/lineage19_oneplus6
mkdir -p $D && cd $DGitBranch=lineage-19.1
DevName=enchilada #oneplus6==enchilada
Github=githubfast#oneplus6 第三方厂商驱动(vendor) 、 linux4.9内核
#https://github.com/TheMuppets/proprietary_vendor_oneplus.git /enchilada     : vendor/oneplus/enchilada
#https://github.com/LineageOS/android_device_oneplus_enchilada.git           : device/oneplus/enchilada
#https://github.com/LineageOS/android_device_oneplus_sdm845-common.git       : device/oneplus/sdm845-common
#https://github.com/LineageOS/android_kernel_oneplus_sdm845.git              : kernel/oneplus/sdm845
#https://github.com/LineageOS/android_hardware_oneplus.git                   : hardware/oneplus
#命名样式? github.com/LineageOS/android_x_y_z.git                             : x/y/z
grep devicesettings android/snippets/lineage.xml  # snippets/lineage.xml 中 已经定义  android_packages_resources_devicesettings ,不再需要 单独clone
#  <project path="packages/resources/devicesettings" name="LineageOS/android_packages_resources_devicesettings" />proprietary_vendor_oneplus=$D/TheMuppets----proprietary_vendor_oneplus
git clone --depth=30 https://$Github.com/TheMuppets/proprietary_vendor_oneplus.git --branch $GitBranch $proprietary_vendor_oneplus
#大仓库,只克隆 该分支lineage-19.1 为起点的 1个提交
mkdir -p $D/vendor/oneplus
ln -s $proprietary_vendor_oneplus/$DevName  $D/vendor/oneplus/$DevName
ln -s $proprietary_vendor_oneplus/sdm845-common $D/vendor/oneplus/sdm845-commongit clone --branch $GitBranch  https://$Github.com/LineageOS/android_device_oneplus_enchilada.git  $D/device/oneplus/$DevName
git clone --branch $GitBranch  https://$Github.com/LineageOS/android_device_oneplus_sdm845-common.git       $D/device/oneplus/sdm845-common
#$D/device/oneplus/?sdm845-common?common?
git clone --branch $GitBranch  https://$Github.com/LineageOS/android_kernel_oneplus_sdm845.git   $D/kernel/oneplus/sdm845#https://github.com/LineageOS/android_hardware_oneplus.git  最低版本为 lineage-18.1
git clone --branch $GitBranch  https://github.com/LineageOS/android_hardware_oneplus.git  $D/hardware/oneplus#手工将以上5个仓库 x/.git/config 中 '[remote "origin"]'/url 中的 githubfast 改回 github#参照 "报错解决记录/0.找不到`webview.apk`" 解决该报错#初始化仓库群. 
REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo' repo init   --manifest-url https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git --manifest-branch $GitBranch
grep tsing  $D/.repo/repo/.git/config  #REPO_URL变量只对repo命令起作用
#	url = https://mirrors.tuna.tsinghua.edu.cn/git/git-repo#$D/repo/manifests/default.xml
#<remote  name="aosp" fetch="https://android.googlesource.com"  fetch替换为 "https://mirrors.tuna.tsinghua.edu.cn/git/AOSP"
_xmlP="$D/.repo/manifests/default.xml"
_xmlS1='fetch="https://android.googlesource.com"'
_xmlS2='fetch="https://mirrors.tuna.tsinghua.edu.cn/git/AOSP"'
grep -Hn "$_xmlS1" $_xmlP
( p="$_xmlP"  \
s1="$_xmlS1"   \
s2="$_xmlS2" \
python3 -c 'import os,pathlib; d=os.environ; p=d["p"]; s1=d["s1"]; s2=d["s2"];  f=pathlib.Path(p); f.write_text(f.read_text().replace(s1,s2))' ;)
grep -Hn "$_xmlS2" $_xmlP
#/app4/lineage19_oneplus6/.repo/manifests/default.xml:12:           fetch="https://mirrors.tuna.tsinghua.edu.cn/git/AOSP"repo sync --current-branch --no-tags --prune#编译步骤正文开始
source build/envsetup.sh#export V=1
export LC_ALL=C
export ALLOW_MISSING_DEPENDENCIES=true
lunch lineage_$DevName-userdebug && mka showcommands bacon  # lineage_enchilada-userdebug | lineage_enchilada-eng
#编译步骤正文结束

备注1 : mka bacon 的排错形式是 m V=1 -j 1 bacon

oneplus6-OTA-flash

oneplus6-OTA线刷包 刷机

ls -lh $D/out/target/product/enchilada/lineage-19.1-20241105-UNOFFICIAL-enchilada.zip
#-rwxrwxrwx   767M   /app4/lineage19_oneplus6/out/target/product/enchilada/lineage-19.1-20241105-UNOFFICIAL-enchilada.zipadb reboot bootloader
fastboot boot twrp-3.5.2_9-0-enchilada.img
adb sideload /app4/lineage19_oneplus6/out/target/product/enchilada/lineage-19.1-20241105-UNOFFICIAL-enchilada.zip

重启, 走过logo、没进android、呼吸灯常亮并崩溃

且 强制关机再开机 并进按音量加(音量减?) 进入fastboot 执行 fastboot boot twrp-3.5.2_9-0-enchilada.img 也一样 走过logo、没进android、呼吸灯常亮并崩溃

报错解决记录

0.找不到webview.apk
报错
m V=1 -j 1 bacon
#报错如下: 
#... cp external/chromium-webview/prebuilt/arm64/webview.apk out/target/product/enchilada/obj/APPS/webview_intermediates/package.apk  ...
# FAILED: out/target/product/enchilada/obj/APPS/webview_intermediates/package.apk
# zip2zip.go:82: zip: not a valid zip file
解决
#理论上应该 git clone --branch android12L  https://android.googlesource.com/platform/external/chromium-webview  , 但是由于该仓库巨大34GB且科学上网太慢, 所以只clone以下小仓库 且 不管分支
git clone https://github.com/LineageOS/android_external_chromium-webview.git  /tmp/
# https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android_external_chromium-webview
#/tmp/android_external_chromium-webview/.git/config
webview_arm64_F=/tmp/android_external_chromium-webview/prebuilt/arm64/webview.apk  # ls -lh  $webview_arm64_F #91MB
md5sum $webview_arm64_F
# 717afb18c5a27c4d610f3edfb767689f  prebuilt/arm64/webview.apk
cp $webview_arm64_F  $D/external/chromium-webview/prebuilt/arm64/webview.apk
1. LineageOS-19.1(android12)中 不要手工cloneandroid_packages_resources_devicesettings.git, 否则导致报错 ‘git: unsupported checkout state’

LineageOS-19.1(android12)中 估计已经在 manifest.xml(即android/default.xml) 中描述了 android_packages_resources_devicesettings.git, 因此 若手工clone该仓库,反而会报错

报错
git clone --branch $GitBranch  https://$Github.com/LineageOS/android_packages_resources_devicesettings.git   $D/packages/resources/devicesettingsrepo sync --current-branch --no-tags --prune
#error.GitError: Cannot checkout LineageOS/android_packages_resources_devicesettings: /app4/lineage19_oneplus6/packages/resources/devicesettings/.#git: unsupported checkout state
#error: Cannot checkout LineageOS/android_packages_resources_devicesettings
解决
rm -fr $D/packages/resources/devicesettings cd $D
repo sync LineageOS/android_packages_resources_devicesettings   --force-sync
2. android_device_oneplus_enchilada : device/oneplus/enchilada/.git: unsupported checkout state
报错
lunch lineage_$DevName-userdebug
# error.GitError: Cannot checkout LineageOS/android_device_oneplus_enchilada: /app4/lineage19_oneplus6/device/oneplus/enchilada/.git: unsupported checkout state
# error: Cannot checkout LineageOS/android_device_oneplus_enchilada
# error: Unable to fully sync the tree
# error: Checking out local projects failed.
# Failing repos:
# device/oneplus/enchilada
解决
repo sync --current-branch  LineageOS/android_device_oneplus_enchilada   --force-sync
3. ‘repo init --depth=x’ 导致 ‘mka bacon’ 报错’android_common does not provide a dex boot jar’
报错
repo init --depth=x # '--depth=x'  会导致 'mka bacon' 报错如下
# error: frameworks/base/boot/Android.bp:44:1: module "platform-bootclasspath" variant "android_common" does not provide a dex boot jar
解决

去掉repo init --depth=x 中的--depth=x

4. ‘mka bacon’ 报错 ‘namespace hardware/oneplus does not exist’
报错
m V=1  -j 1  bacon
# error: device/oneplus/sdm845-common/Android.bp:1:1: module "soong_namespace": namespace hardware/oneplus does not exist
解决

猜测 hardware/oneplus 应该是 对应 组织github.com/LineageOS下仓库形如*hardware_oneplus*,

搜索github.com/LineageOS/hardware_oneplus 得到 LineageOS/android_hardware_oneplus.git

从而解决办法为

git clone --branch lineage-19.1  https://github.com/LineageOS/android_hardware_oneplus.git  $D/hardware/oneplus
5. module “platform-bootclasspath” variant “android_common”: module WfdCommon does not provide a dex boot jar

WfdCommon==Wi-Fi Display Common

报错
m -j 1 bacon #报错
#module "platform-bootclasspath" variant "android_common": module WfdCommon does not provide a dex boot jar
排查过程
find $D -type f -size -1024k -not  -path  "*/.repo/*"    | xargs -I@ bash -c " grep -Hn 'does not provide a dex boot jar' '@'  && echo '@' "
#/app4/lineage19_oneplus6/build/soong/java/dexpreopt_bootjars.go:492:			ctx.ModuleErrorf("module %s does not provide a dex boot jar", name)

google搜索WfdCommon 得到 4、出现错误:"internal error: failed to find dex jar path for module "WfdCommon" 仿照其修改如下


grep -Hn -A 1 -B 1 WfdCommon $D/device/oneplus/sdm845-common/*.mk
#/app4/lineage19_oneplus6/device/oneplus/sdm845-common/common.mk:463:  PRODUCT_BOOT_JARS += \
#                                                               :464:      WfdCommon
解决

删除 /app4/lineage19_oneplus6/device/oneplus/sdm845-common/common.mk 中的 PRODUCT_BOOT_JARS += WfdCommon

6. multiple definition of `yylloc’
报错
m V=1 -j 1 bacon #'mka bacon' 的排错形式
# /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
解决
echo 'HOSTCFLAGS += -fcommon' >> $D/kernel/oneplus/sdm845/Makefile

http://www.ppmy.cn/embedded/138133.html

相关文章

CSS Module:告别类名冲突,拥抱模块化样式(5)

CSS Module 是一种解决 CSS 类名冲突的全新思路。它通过构建工具&#xff08;如 webpack&#xff09;将 CSS 样式切分为更加精细的模块&#xff0c;并在编译时将类名转换为唯一的标识符&#xff0c;从而避免类名冲突。本文将详细介绍 CSS Module 的实现原理和使用方法。 1. 思…

第三次作业

1.在/home中创建一个名为 file1.txt 的文件&#xff0c;并设置权限为&#xff1a;所有者和组成员可以读写&#xff0c;但其他人只能读。 [rootlocalhost home]# touch file1.txt [rootlocalhost home]# ll -rw-r--r--. 1 root root 0 11月 11 23:06 file1.txt [rootlo…

深入探索Waymo自动驾驶技术发展:从DARPA挑战赛到第五代系统的突破

引言 自动驾驶技术正引领着未来出行方式的革命&#xff0c;而Waymo作为全球自动驾驶领域的先锋&#xff0c;始终走在技术发展的最前沿。本文基于Waymo联席CEO德米特里多尔戈夫&#xff08;Dmitri Dolgov&#xff09;在No Priors节目中的访谈&#xff0c;全面介绍Waymo的技术发展…

【EasyExcel等比例缩小导出图片】

EasyExcel等比例缩小导出图片 一、背景二、思路三、代码 一、背景 使用EasyExcel导出excel文件&#xff0c;但是需要同时导出图片信息&#xff0c;且图片信息不能影响行高和单元格宽度&#xff0c;图片本身被导出时&#xff0c;不能因为压缩导致图片变形 二、思路 使用EasyE…

Tomcat 8.5 源码导读

Tomcat 是一个流行的开源 Java Servlet 容器&#xff0c;负责执行 Java Servlets 和呈现 Web 应用程序。Tomcat 8.5 是一个常用版本&#xff0c;理解其核心代码对于开发和运维人员来说非常重要。下面是对 Tomcat 8.5 核心代码的一些关键部分的导读&#xff1a; 1. 启动过程 B…

gitlab容器的迁移(部署)并配置自动备份

gitlab容器的迁移&#xff08;部署&#xff09;并配置自动备份 本文背景为从Ubuntu服务器上迁移gitlab容器到windows并备份&#xff0c;若要直接拉取镜直接安装配置可直接从第二小标题参考 1、原Ubuntu的gitlab容器制作为镜像 2.1 将运行的容器制为镜像 #镜像&#xff1a;i…

Flink_DataStreamAPI_源算子Source

Flink_DataStreamAPI_源算子Source 1从集合中读取数据2从文件读取数据3从Socket读取数据4从Kafka读取数据5从数据生成器读取数据Flink支持的数据类型1&#xff09;Flink的类型系统2&#xff09;Flink支持的数据类型3&#xff09;类型提示&#xff08;Type Hints&#xff09; 1从…

C++单例模式实现

单例模式&#xff08;Singleton Pattern&#xff09;是软件设计模式中的一种&#xff0c;用于确保一个类只有一个实例&#xff0c;并提供一个全局访问点来获取这个实例。 一、初始版本&#xff08;手动创建释放&#xff09; 一个类只有一个实例的实现方法&#xff1a; 隐藏构…