diff --git a/.gitattributes b/.gitattributes index 0330f86..3d8bccd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,3 @@ -bouncycastle/* linguist-vendored -boot_signer/* linguist-vendored -mkbootfs/* linguist-vendored +aosp/* linguist-vendored +external/* linguist-vendored avb/* linguist-vendored diff --git a/build.gradle.kts b/build.gradle.kts index d452ec6..631ab1e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,6 +22,15 @@ buildscript { } tasks { + register("rr") { + this.group = GROUP_ANDROID + this.description = "reboot to recovery" + this.doLast { + logger.warn("Rebooting to recovery ...") + Runtime.getRuntime().exec("adb root") + Runtime.getRuntime().exec("adb reboot recovery") + } + } val unpackTask by register("unpack") { group = GROUP_ANDROID main = "cfig.packable.PackableLauncherKt" diff --git a/doc/recovery_adb.md b/doc/recovery_adb.md new file mode 100644 index 0000000..88b6d37 --- /dev/null +++ b/doc/recovery_adb.md @@ -0,0 +1,24 @@ +# 打开recovery模式下的adb + +###1. 解开vbmeta.img, 关闭AVB +修改 build/unzip_boot/vbmeta.img.avb.json, Line #19 +```diff +- "flags" : 0, +- "flags" : 2, +``` +重新打包,刷回去 + +###2. 先解开boot.img, 然后做修改如下 + +修改**prop.default**,打开debuggable +```diff +-ro.debuggable=0 ++ro.debuggable=1 +``` +关闭adb secure, 防止出现adb devices之后的unauthorized 状态 +```diff +-ro.adb.secure=1 ++ro.adb.secure=0 +``` + +重新打包,刷回去