adb: get adb working and cleanup pixelflinger

- update recovery init.rc
- add libdl bootstrap
- cleanup libpixelflinger import
- logd and adbd permissive for now
This commit is contained in:
bigbiff
2021-01-03 17:36:52 -05:00
parent 673c7ae01e
commit 91bd7a7ff1
9 changed files with 232 additions and 200 deletions
+11
View File
@@ -85,6 +85,17 @@ cc_library_shared {
"libhidl-gen-utils",
"librecovery_utils",
"libc++fs"
],
required: [
"init_recovery.rc",
"libdl_android.bootstrap",
]
}
prebuilt_etc {
name: "init_recovery.rc",
filename: "init.rc",
src: "etc/init.rc",
sub_dir: "init/hw",
recovery: true,
}
+5 -4
View File
@@ -109,7 +109,6 @@ LOCAL_C_INCLUDES += \
system/core/adb \
system/core/libsparse \
external/zlib \
system/core/libpixelflinger/include \
system/core/libziparchive/include \
external/freetype/include \
external/boringssl/include \
@@ -121,12 +120,13 @@ LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/fuse_sideload/include \
$(LOCAL_PATH)/install/include \
$(LOCAL_PATH)/twrpinstall/include \
$(LOCAL_PATH)/recovery_utils/include
$(LOCAL_PATH)/recovery_utils/include \
$(LOCAL_PATH)/libpixelflinger/include
LOCAL_STATIC_LIBRARIES += libguitwrp
LOCAL_SHARED_LIBRARIES += libz libc libcutils libstdc++ libtar libblkid libminuitwrp libmtdutils libtwadbbu
LOCAL_SHARED_LIBRARIES += libbootloader_message libcrecovery libtwrpdigest libc++ libaosprecovery libcrypto libbase
LOCAL_SHARED_LIBRARIES += libziparchive libselinux
LOCAL_SHARED_LIBRARIES += libziparchive libselinux libdl_android.bootstrap
ifneq ($(wildcard system/core/libsparse/Android.mk),)
LOCAL_SHARED_LIBRARIES += libsparse
@@ -402,7 +402,8 @@ TWRP_REQUIRED_MODULES += \
plat_hwservice_contexts \
vendor_hwservice_contexts \
minadbd \
twrpbu
twrpbu \
adbd_system_api_recovery
ifneq ($(TW_INCLUDE_CRYPTO),)
TWRP_REQUIRED_MODULES += \
+6 -3
View File
@@ -19,6 +19,8 @@ on early-init
start ueventd
setprop sys.usb.configfs 0
on init
export PATH /sbin:/system/bin
export LD_LIBRARY_PATH /system/lib64
@@ -73,9 +75,6 @@ on late-init
trigger early-boot
trigger boot
on property:sys.powerctl=*
powerctl ${sys.powerctl}
service ueventd /system/bin/ueventd
critical
seclabel u:r:ueventd:s0
@@ -91,6 +90,10 @@ on property:ro.debuggable=1
#start adbd
setprop service.adb.root 1
# Always start adbd on userdebug and eng builds
on fs && property:ro.debuggable=1
setprop sys.usb.config adb
service fastbootd /system/bin/fastbootd
disabled
group system
+1 -1
View File
@@ -1,4 +1,4 @@
on late-init
on init
start logd
service logd /system/bin/logd
-3
View File
@@ -4,6 +4,3 @@ on boot
service recovery /system/bin/recovery
socket recovery stream 422 system system
seclabel u:r:recovery:s0
on early-init
write /sys/fs/selinux/enforce 0
+82 -82
View File
@@ -1,83 +1,83 @@
bootstrap_go_package {
name: "soong-libguitwrp_defaults",
pkgPath: "bootable/recovery/gui",
deps: [
"soong",
"soong-android",
"soong-cc"
],
srcs: [
"libguitwrp_defaults.go"
],
pluginFor: ["soong_build"]
}
libguitwrp_defaults {
name: "libguitwrp_defaults"
}
cc_library_static {
name: "libguitwrp",
defaults: ["libguitwrp_defaults"],
cflags: [
"-fno-strict-aliasing",
"-Wno-implicit-fallthrough",
"-D_USE_SYSTEM_ZIPARCHIVE"
],
include_dirs: [
"bootable/recovery/crypto/scrypt/lib/util",
"bootable/recovery/otautil/include",
"bootable/recovery/install/include",
"system/core/libziparchive/include",
"bootable/recovery/recovery_ui/include",
"bootable/recovery/fuse_sideload/include",
"bootable/recovery/twrpinstall",
"bootable/recovery/twrpinstall/include",
"bionic",
"system/core/base/include",
"system/core/include",
"system/core/libpixelflinger/include",
"external/freetype/include"
],
srcs: [
"gui.cpp",
"resources.cpp",
"pages.cpp",
"text.cpp",
"image.cpp",
"action.cpp",
"console.cpp",
"fill.cpp",
"button.cpp",
"checkbox.cpp",
"fileselector.cpp",
"progressbar.cpp",
"animation.cpp",
"object.cpp",
"slider.cpp",
"slidervalue.cpp",
"listbox.cpp",
"keyboard.cpp",
"input.cpp",
"blanktimer.cpp",
"partitionlist.cpp",
"mousecursor.cpp",
"scrolllist.cpp",
"patternpassword.cpp",
"textbox.cpp",
"terminal.cpp",
"twmsg.cpp"
],
shared_libs: [
"libminuitwrp",
"libc",
"libstdc++",
"libaosprecovery",
"libselinux",
"libziparchive"
],
static_libs: [
"libotautil"
]
bootstrap_go_package {
name: "soong-libguitwrp_defaults",
pkgPath: "bootable/recovery/gui",
deps: [
"soong",
"soong-android",
"soong-cc"
],
srcs: [
"libguitwrp_defaults.go"
],
pluginFor: ["soong_build"]
}
libguitwrp_defaults {
name: "libguitwrp_defaults"
}
cc_library_static {
name: "libguitwrp",
defaults: ["libguitwrp_defaults"],
cflags: [
"-fno-strict-aliasing",
"-Wno-implicit-fallthrough",
"-D_USE_SYSTEM_ZIPARCHIVE"
],
include_dirs: [
"bootable/recovery/crypto/scrypt/lib/util",
"bootable/recovery/otautil/include",
"bootable/recovery/install/include",
"system/core/libziparchive/include",
"bootable/recovery/recovery_ui/include",
"bootable/recovery/fuse_sideload/include",
"bootable/recovery/twrpinstall",
"bootable/recovery/twrpinstall/include",
"bootable/recovery/libpixelflinger/include",
"bionic",
"system/core/base/include",
"system/core/include",
"external/freetype/include"
],
srcs: [
"gui.cpp",
"resources.cpp",
"pages.cpp",
"text.cpp",
"image.cpp",
"action.cpp",
"console.cpp",
"fill.cpp",
"button.cpp",
"checkbox.cpp",
"fileselector.cpp",
"progressbar.cpp",
"animation.cpp",
"object.cpp",
"slider.cpp",
"slidervalue.cpp",
"listbox.cpp",
"keyboard.cpp",
"input.cpp",
"blanktimer.cpp",
"partitionlist.cpp",
"mousecursor.cpp",
"scrolllist.cpp",
"patternpassword.cpp",
"textbox.cpp",
"terminal.cpp",
"twmsg.cpp"
],
shared_libs: [
"libminuitwrp",
"libc",
"libstdc++",
"libaosprecovery",
"libselinux",
"libziparchive"
],
static_libs: [
"libotautil"
]
}
+124 -105
View File
@@ -1,105 +1,124 @@
//bootstrap_go_package {
// name: "soong-libpixelflingertwrp_defaults",
// pkgPath: "bootable/recovery/libpixelflinger",
// deps: [
// "soong",
// "soong-android",
// "soong-cc"
// ],
// srcs: [
// "libpixelflingertwrp_defaults.go"
// ],
// pluginFor: ["soong_build"]
//}
//libpixelflingertwrp_defaults {
// name: "libpixelflingertwrp_defaults"
//}
cc_defaults {
name: "libpixelflingertwrp_defaults",
cflags: [
"-fstrict-aliasing",
"-fomit-frame-pointer",
"-Wall",
"-Werror",
"-Wno-unused-function",
],
export_include_dirs: ["include"],
header_libs: ["libbase_headers"],
shared_libs: [
"libcutils",
"liblog",
"libutils",
],
arch: {
arm: {
neon: {
cflags: ["-D__ARM_HAVE_NEON"],
},
},
},
}
cc_library_static {
name: "libpixelflinger_twrp",
defaults: ["libpixelflingertwrp_defaults"],
srcs: [
"codeflinger/ARMAssemblerInterface.cpp",
"codeflinger/ARMAssemblerProxy.cpp",
"codeflinger/CodeCache.cpp",
"codeflinger/GGLAssembler.cpp",
"codeflinger/load_store.cpp",
"codeflinger/blending.cpp",
"codeflinger/texturing.cpp",
"format.cpp",
"clear.cpp",
"raster.cpp",
"buffer.cpp",
],
whole_static_libs: ["libpixelflinger-arm"],
arch: {
arm: {
srcs: [
"codeflinger/ARMAssembler.cpp",
"codeflinger/disassem.c",
"col32cb16blend.S",
"t32cb16blend.S",
],
neon: {
srcs: ["col32cb16blend_neon.S"],
},
},
arm64: {
srcs: [
"codeflinger/Arm64Assembler.cpp",
"codeflinger/Arm64Disassembler.cpp",
"arch-arm64/col32cb16blend.S",
"arch-arm64/t32cb16blend.S",
],
},
mips: {
mips32r6: {
srcs: [
"codeflinger/MIPSAssembler.cpp",
"codeflinger/mips_disassem.c",
"arch-mips/t32cb16blend.S",
],
},
},
mips64: {
srcs: [
"codeflinger/MIPSAssembler.cpp",
"codeflinger/MIPS64Assembler.cpp",
"codeflinger/mips64_disassem.c",
"arch-mips64/col32cb16blend.S",
"arch-mips64/t32cb16blend.S",
],
},
},
}
//bootstrap_go_package {
// name: "soong-libpixelflingertwrp_defaults",
// pkgPath: "bootable/recovery/libpixelflinger",
// deps: [
// "soong",
// "soong-android",
// "soong-cc"
// ],
// srcs: [
// "libpixelflingertwrp_defaults.go"
// ],
// pluginFor: ["soong_build"]
//}
//libpixelflingertwrp_defaults {
// name: "libpixelflingertwrp_defaults"
//}
cc_defaults {
name: "libpixelflingertwrp_defaults",
cflags: [
"-fstrict-aliasing",
"-fomit-frame-pointer",
"-Wall",
"-Werror",
"-Wno-unused-function",
],
export_include_dirs: ["include"],
header_libs: ["libbase_headers"],
shared_libs: [
"libcutils",
"liblog",
"libutils",
],
arch: {
arm: {
neon: {
cflags: ["-D__ARM_HAVE_NEON"],
},
},
},
}
cc_library_static {
name: "libpixelflingertwrp-arm",
defaults: ["libpixelflingertwrp_defaults"],
srcs: [
"fixed.cpp",
"picker.cpp",
"pixelflinger.cpp",
"trap.cpp",
"scanline.cpp",
],
arch: {
arm: {
instruction_set: "arm",
},
},
}
cc_library_static {
name: "libpixelflinger_twrp",
defaults: ["libpixelflingertwrp_defaults"],
srcs: [
"codeflinger/ARMAssemblerInterface.cpp",
"codeflinger/ARMAssemblerProxy.cpp",
"codeflinger/CodeCache.cpp",
"codeflinger/GGLAssembler.cpp",
"codeflinger/load_store.cpp",
"codeflinger/blending.cpp",
"codeflinger/texturing.cpp",
"format.cpp",
"clear.cpp",
"raster.cpp",
"buffer.cpp",
],
whole_static_libs: ["libpixelflingertwrp-arm"],
arch: {
arm: {
srcs: [
"codeflinger/ARMAssembler.cpp",
"codeflinger/disassem.c",
"col32cb16blend.S",
"t32cb16blend.S",
],
neon: {
srcs: ["col32cb16blend_neon.S"],
},
},
arm64: {
srcs: [
"codeflinger/Arm64Assembler.cpp",
"codeflinger/Arm64Disassembler.cpp",
"arch-arm64/col32cb16blend.S",
"arch-arm64/t32cb16blend.S",
],
},
mips: {
mips32r6: {
srcs: [
"codeflinger/MIPSAssembler.cpp",
"codeflinger/mips_disassem.c",
"arch-mips/t32cb16blend.S",
],
},
},
mips64: {
srcs: [
"codeflinger/MIPSAssembler.cpp",
"codeflinger/MIPS64Assembler.cpp",
"codeflinger/mips64_disassem.c",
"arch-mips64/col32cb16blend.S",
"arch-mips64/t32cb16blend.S",
],
},
},
}
+1 -2
View File
@@ -36,7 +36,6 @@ ifneq ($(wildcard external/one-true-awk/Android.bp),)
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/awk
endif
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/adbd
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/fastbootd
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsdroid
@@ -69,7 +68,7 @@ RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libasy
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libbinderthreadstate.so
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libmdnssd.so
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libinit.so
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl_android.so
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/bootstrap/libdl_android.so
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libprotobuf-cpp-lite.so
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbinder.so
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libchrome.so
+2
View File
@@ -1,4 +1,6 @@
recovery_only(`
permissive recovery;
permissive init;
permissive logd;
permissive adbd;
')