1.user版本使用adb

打开文件

build/make/core/main.mk

展讯-系统定制修改_解决方案

ifeq ($(user_variant),user)
    ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=0
  endif
  • 1.
  • 2.
  • 3.

1.这个ro.adb.secure=0(0为不显示信任此电脑,1为显示信任此电脑)

展讯-系统定制修改_安卓_02

ifeq (true,$(strip $(enable_target_debugging)))
  # Target is more debuggable and adbd is on by default
  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1
  # Enable Dalvik lock contention logging.
  ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.lockprof.threshold=500
else # !enable_target_debugging
  # Target is less debuggable and adbd is off by default
  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0
endif # !enable_target_debugging
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
2.adb文件传输

获取root权限

adb root
adb disable-verity
adb reboot
adb root
adb remount
adb shell
mount -o rw,remount /system
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.

如果权限不对,可能会上传失败

展讯-系统定制修改_解决方案_03

上传文件:adb push 123.txt /system

展讯-系统定制修改_bash_04

下载文件:adb pull /system/123.txt ./

展讯-系统定制修改_安卓_05

3.No module named Crypto.Signature

编译源码报错

File "/root/SPRD/H6B-1/SC200K_Android10.0_R01_W21.21.1/vendor/sprd/proprietories-source/packimage_scripts/signimage/dynamicTA/signta.py", line 31, in main
    from Crypto.Signature import PKCS1_v1_5
ImportError: No module named Crypto.Signature
12:26:45 ninja failed with: exit status 1

#### failed to build some targets (08:00:14 (hh:mm:ss)) ####
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.

需要安装

sudo apt-get install python-pip

sudo pip2 install pycrypto

4.插USB会自动开机

路径:bsp\bootloader\u-boot15\common\cmd_cboot.c

更换如下内容

展讯-系统定制修改_打开文件_06

5.设备树增加按键节点,没有中断事件返回

修改

bsp/bootloader/u-boot15/board/spreadtrum/uis8581e5h10/pinmap-sp9863a.c

展讯-系统定制修改_解决方案_07

bsp/kernel/kernel4.14/arch/arm64/boot/dts/sprd/uis8581e5h10.dts

展讯-系统定制修改_打开文件_08

6.rocess will be UID/EUID=0 in the global user namespace, and will have user root-level access to files

报错内容为

ninja: build stopped: subcommand failed.
FAILED: [W][2021-11-17T11:51:20+0000][3768128] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files
[W][2021-11-17T11:51:20+0000][3768128] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user namespace, and will have group root-level access to files
12:31:04 ninja failed with: exit stat
us 1
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.

关键点不在报错上,往上查/bin/bash

[ 99% 1227/1228] finishing build rules ...
*** we will build IDH while u make sprdidh ***
/bin/bash: repo: command not found
/bin/bash: repo: command not found
Generating ko list for odmko ...
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.

解决方案

echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc  
export PATH=$PATH:$HOME/bin
  • 1.
  • 2.