minimal-manifest-twrp / platform_manifest_twrp_aosp

Minimal manifest for building TWRP for devices shipped with Android 10+
295 stars 267 forks source link

RECOVERY_VARIANT := twrp results in errors in build, builds standard recovery just fine without this set #9

Closed ghost closed 2 years ago

ghost commented 2 years ago

Google Pixel 5, 12.1 minimal branch, I get all kinds of errors when BoardConfig.mk contains "RECOVERY_VARIANT := twrp"

error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //external/bsdiff:libbspatch which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //external/brotli:libbrotli which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //external/bzip2:libbz which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //external/zlib:libz_stable which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //bootable/recovery-twrp/recovery_utils:librecovery_utils which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility 11:42:38 soong bootstrap failed with: exit status 1

Can someone please advise on what I can do here to get this to build??? If I remove "RECOVERY_VARIANT := twrp" from BoardConfig.mk, all builds just fine with no errors but it just builds the standard recovery and not twrp. I can't build twrp with this minimal 12.1 branch.

Please advise.

ghost commented 2 years ago

Okay, so I have made it past most of these by adding:

TARGET_RECOVERY_TWRP_LIB := \ librecovery_twrp_redbull \ libnos_citadel_for_recovery \ libnos_for_recovery \ liblog \ libbootloader_message \ libfstab \ libext4_utils \ libz \ minadbd

but I'm still suck here:

error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //packages/modules/adb/crypto:libadb_crypto which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //packages/modules/adb:libadb_sysdeps which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //packages/modules/adb/tls:libadb_tls_connection which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //packages/modules/adb:libadbd which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //packages/modules/adb:libadbd_core which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //external/brotli:libbrotli which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //external/zstd:libzstd which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //packages/modules/adb/proto:libadb_protos which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //packages/modules/adb/proto:libapp_processes_protos_lite which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/minadbd/Android.bp:87:1: module "minadbd" variant "android_recovery_arm64_armv8-a": depends on //bootable/recovery-twrp/recovery_utils:librecovery_utils which is not visible to this module You may need to add "//bootable/recovery-twrp/minadbd" to its visibility error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //external/bsdiff:libbspatch which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //external/brotli:libbrotli which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //external/bzip2:libbz which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //external/zlib:libz_stable which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility error: bootable/recovery-twrp/tests/Android.bp:124:1: module "recovery_unit_test" variant "android_arm_armv8-a": depends on //bootable/recovery-twrp/recovery_utils:librecovery_utils which is not visible to this module You may need to add "//bootable/recovery-twrp/tests" to its visibility error: bootable/recovery-twrp/applypatch/Android.bp:149:1: module "libimgdiff" variant "android_arm_armv8-a_static": depends on //external/zlib:libz_stable which is not visible to this module You may need to add "//bootable/recovery-twrp/applypatch" to its visibility 00:56:48 soong bootstrap failed with: exit status 1

ghost commented 2 years ago

This REPO IS BROKEN.

It will not build TWRP no matter what is put in a configuration.

Please advise, or offer some fixes. Someone should check this

ghost commented 2 years ago

From all that I have gathered /bootable/recovery-twrp/Android.bp is completely inaccurate as to what libraries each static library and executable requires for proper compilation of said modules and the recovery as a whole.

CaptainThrowback commented 2 years ago

RECOVERY_VARIANT := twrp isn't used in AOSP. That's a LineageOS flag. So that has nothing to do with this manifest.

ghost commented 2 years ago

well, you're wrong here. I synced this repo and no, it will not build twrp unless RECOVERY_VARIANT := twrp is set in a BoardConfig.mk file. Otherwise, if it not set it builds the standard recovery. I've done this 6 times now and no it does not even try to build twrp without that flag.

CaptainThrowback commented 2 years ago

well, you're wrong here. I synced this repo and no, it will not build twrp unless RECOVERY_VARIANT := twrp is set in a BoardConfig.mk file. Otherwise, if it not set it builds the standard recovery. I've done this 6 times now and no it does not even try to build twrp without that flag.

I'm not wrong. This manifest is set up to build ONLY TWRP. If you're syncing the TeamWin bootable_recovery repo to bootable/recovery-twrp, then you're not using this manifest as-is, and as such, nothing you're reporting is valid. Unless you use this repo as directed in the README, then you shouldn't expect it to work.

ghost commented 2 years ago

I've synced it as is and it does not work, my errors are valid. I have not changed anything, it does not attempt to compile twrp without that flag set. six boot images i have created prove this so something is wrong in the build setup of the repo somewhere.

ghost commented 2 years ago

I'll resync tomorrow evening and close if it works as-is, and close if so.

CaptainThrowback commented 2 years ago

I'll resync tomorrow evening and close if it works as-is, and close if so.

Decryption in the 12.1 recovery branch is still a WIP, so you will need to pick this patch from Gerrit for recovery to build successfully: https://gerrit.twrp.me/c/android_bootable_recovery/+/5405

Other than that, it should work fine. I will add this note to the README until the completed patch is merged.

ghost commented 2 years ago

Thanks again. I have encountered some other issues but I think this is good now.