How to Use edge TWRP on Edge-V

https://docs.khadas.com/edge/InstructionsforEdgeSinglePackBurningTool.html

recovery_edge_TWRP

--- a/Android.mk
+++ b/Android.mk
@@ -20,7 +20,7 @@ RECOVERY_SDCARD_ON_DATA := true
 TW_THEME := landscape_hdpi
 TW_USE_TOOLBOX := true
 TW_EXTRA_LANGUAGES := true
-TW_DEFAULT_LANGUAGE := zh_CN
+TW_DEFAULT_LANGUAGE := en
2 Likes

Excellent, now TWRP is built with English menu :+1:

Just one problem - when I reboot Edge-V it always boots to TWRP and from it’s menu when I choose Reboot > System or Reboot > Bootloader it says “No OS installed”. Is it so that TWRP does not recognize Android Pie?

There are two possibilities:

  1. Your system is broken
  2. You failed to install the system

So you have to think about what happened to it before

It seems that TWRP source might lack some files - I have initiated Android build having TWRP source as bootable/recovery and it gave me this:

make: Leaving directory '/home/gytis/khadas/edgev/external/rk_tee_user'
[ 11% 11742/100718] //external/one-true-awk:awk yacc awkgram.y
external/one-true-awk/awkgram.y: conflicts: 43 shift/reduce, 85 reduce/reduce
[ 11% 11752/100718] //external/one-true-awk:awk_vendor yacc awkgram.y
external/one-true-awk/awkgram.y: conflicts: 43 shift/reduce, 85 reduce/reduce
[ 13% 13324/100718] //bootable/recovery/applypatch:libapplypatch clang++ applypatch.cpp
FAILED: out/soong/.intermediates/bootable/recovery/applypatch/libapplypatch/android_arm64_armv8-a_cortex-a53_core_static/obj/bootable/recovery/applypatch/applypatch.o 
PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++ -c -Ibootable/recovery/applypatch/include -Ibootable/recovery/applypatch/include -Ibootable/recovery/applypatch  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -march=armv8-a -mcpu=cortex-a53 -Isystem/core/base/include -Iexternal/bsdiff/include -Iexternal/bzip2 -Iexternal/boringssl/src/include -Ibootable/recovery/edify/include -Ibootable/recovery/otafault/include -Ibootable/recovery/otautil/include -Iexternal/zlib -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Isystem/core/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Ilibnativehelper/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_jni -D_FILE_OFFSET_BITS=64 -DZLIB_CONST -Wall -Werror -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -DANDROID_STRICT -fPIC -D_USING_LIBCXX -std=gnu++14 -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -Wno-gnu-include-next -fvisibility-inlines-hidden -fno-rtti  -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch -MD -MF out/soong/.intermediates/bootable/recovery/applypatch/libapplypatch/android_arm64_armv8-a_cortex-a53_core_static/obj/bootable/recovery/applypatch/applypatch.o.d -o out/soong/.intermediates/bootable/recovery/applypatch/libapplypatch/android_arm64_armv8-a_cortex-a53_core_static/obj/bootable/recovery/applypatch/applypatch.o bootable/recovery/applypatch/applypatch.cpp
bootable/recovery/applypatch/applypatch.cpp:41:10: fatal error: 'bmlutils/bmlutils.h' file not found
#include "bmlutils/bmlutils.h"
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
[ 13% 13327/100718] //system/core/libappfuse:libappfuse clang++ FuseBridgeLoop.cc [arm]
ninja: build stopped: subcommand failed.
14:41:09 ninja failed with: exit status 1

#### failed to build some targets (20:35 (mm:ss)) ####

I checked the uploaded code again, there is no problem.

Code is fine, TWRP builds and works on Edge V :+1:

Hi @goenjoy

Can you update TWRP Recovery to v3.3.1, it is currently 3.2.3?
Here is new source code v3.3.1, not sure if extra changes are needed for Khadas Edge-V.

1 Like

OK…I will update it on Android 10…

1 Like

Thanks

You are already experimenting with Android 10, RK released SDK to Khadas to test or you mean in future when Android 10 is available, several weeks or months from now?
:slight_smile:

1 Like

Yes, I’m porting Android 10 today. If it goes well, the first version is expected to be released by next Saturday.

3 Likes

Thanks, looking forward to it.
I hope it will have interesting new features and bug-fixes RK did.

I just hope Google didn’t make Android 10 more strict with security etc, they always want to lock down things more so users can’t root or use Magisk or have nice features anymore. I read Google wants to use Key Attestation then apps like Magisk won’t be able to pass Safetynet anymore in future and with users that use their developer accounts they make it impossible to install any apps from USB, download now and you can only use the Google Play Store for apps, I hope this doesn’t happen in Android 11/12 for normal users. But if things change for the worse, I think lots of users will move over to Linux like KDE BigScreen OS that now also have a tv optimised OS where users have no restrictions, it will be interesting to see what happens in future.

BTW, for the latest Magisk Manager on Android 9, you also need to enable the checkbox in Magisk Manager’s Settings for ‘Magisk Hide’ to hide the app from Safetynet otherwise the ‘Basic Integrity’ test will fail.

1 Like

to the TWRP stock firmware ?! interesting approach, i like it!:+1:

For Firmware with TWRP Recovery,
we must also find a way to use it with micro-sd cards to update firmware on emmc eg. with SDDiskTool.
Currently SDDiskTool only supports upgrading firmware on emmc with stock recovery from a micro-sd card.

1 Like

Is it 64bit version ?

Yes, Rockchip RK3399 & RK3328 are always 64-bit, not like S922x, S905x that are only 32-bit.

2 Likes

there is an exception🙂

You are right there but it’s a custom LineageOS they adapted, not official firmware from Amlogic. It’s also a lot more difficult to maintain and keep updated since hundreds of patches and changes have to be ported every time to make it work.

Yes, this is a different story.
But Superceleron has already confirmed Android 10 / 64bit from Amlogic,but it keeps a secret :slight_smile:

Hello! Please help me compile TWRP:
OS - Linux Mint 18.3
Android SDK - downloaded
ROM - compiles, no problems.
GAPPS added.

I’m trying to compile twrp:

  1. out folder moved
  2. bootable/recovery - moved
  3. downloaded recovery_edge_TWRP.zip from the link, unpacked it in bootable/recovery
    4.make clean
    5.sourcebuild/envsetup.sh
    6.lunch rk3399-userdebug
  4. make recoveryimage -j12
    When compiling it reaches 99%
    [ 96% 13089/13633] target Strip (mini debug info): charger (o…product/rk3399/obj/EXECUTABLES/charger_intermediates/charger)
    prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-nm: out/target/product/rk3399/symbols/sbin/charger: no symbols
    [ 99% 13563/13633] //system/libhwbinder:libhwbinder link libhwbinder.so
    Warning: request a ThreadPool with 1 threads, but LLVM_ENABLE_THREADS has been turned off
    [ 99% 13622/13633] build out/target/product/rk3399/obj_arm/SHARED_LIBRARIES/libbmlutils_intermediates/teamwin
    FAILED: out/target/product/rk3399/obj_arm/SHARED_LIBRARIES/libbmlutils_intermediates/teamwin
    /bin/bash -c “bootable/recovery/prebuilt/relink.sh out/target/product/rk3399/recovery/root/sbin out/target/product/rk3399/recovery/root/sbin/dump_image out/target/product/rk3399/recovery/root/sbin/flash_image out/target/product/rk3399/recovery/root/sbin/erase_image out/target/product/rk3399/recovery/root/sbin/bu out/target/product/rk3399/system/bin/sh out/target/product/rk3399/system/lib64/libcrypto.so out/target/product/rk3399/recovery/root/sbin/toybox out/target/product/rk3399/recovery/root/sbin/pigz out/target/product/rk3399/recovery/root/sbin/fsck.fat out/target/product/rk3399/recovery/root/sbin/fatlabel out/target/product/rk3399/recovery/root/sbin/mkfs.fat out/target/product/rk3399/system/bin/adbd out/target/product/rk3399/system/bin/e2fsck out/target/product/rk3399/system/bin/mke2fs out/target/product/rk3399/system/bin/tune2fs out/target/product/rk3399/system/bin/resize2fs out/target/product/rk3399/recovery/root/sbin/simg2img out/target/product/rk3399/system/bin/linker out/target/product/rk3399/system/bin/linker64 out/target/product/rk3399/system/lib64/libc.so out/target/product/rk3399/system/lib64/libcutils.so out/target/product/rk3399/system/lib64/libcrecovery.so out/target/product/rk3399/system/lib64/libusbhost.so out/target/product/rk3399/system/lib64/libutils.so out/target/product/rk3399/system/lib64/libdl.so out/target/product/rk3399/system/lib64/libext2_com_err.so out/target/product/rk3399/system/lib64/libext2_e2p.so out/target/product/rk3399/system/lib64/libext2fs.so out/target/product/rk3399/system/lib64/libext2_profile.so out/target/product/rk3399/system/lib64/libext2_uuid.so out/target/product/rk3399/system/lib64/libext2fs.so out/target/product/rk3399/system/lib64/libext2_blkid.so out/target/product/rk3399/system/lib64/libpng.so out/target/product/rk3399/system/lib64/liblog.so out/target/product/rk3399/system/lib64/libm.so out/target/product/rk3399/system/lib64/libstdc++.so out/target/product/rk3399/system/lib64/libz.so out/target/product/rk3399/system/lib64/libminuitwrp.so out/target/product/rk3399/system/lib64/libminadbd.so out/target/product/rk3399/system/lib64/libminzip.so out/target/product/rk3399/system/lib64/libmtdutils.so out/target/product/rk3399/system/lib64/libtar.so out/target/product/rk3399/system/lib64/libtwadbbu.so out/target/product/rk3399/system/lib64/libtwrpdigest.so out/target/product/rk3399/system/lib64/libutil-linux.so out/target/product/rk3399/system/lib64/libblkid.so out/target/product/rk3399/system/lib64/libmmcutils.so out/target/product/rk3399/system/lib64/libbmlutils.so out/target/product/rk3399/system/lib64/libflashutils.so out/target/product/rk3399/system/lib64/libfusesideload.so out/target/product/rk3399/system/lib64/libbootloader_message_twrp.so out/target/product/rk3399/system/lib64/libcrypto.so out/target/product/rk3399/system/lib64/libcrypto_utils.so out/target/product/rk3399/system/lib64/libpackagelistparser.so out/target/product/rk3399/system/lib64/liblzma.so out/target/product/rk3399/system/lib64/libbacktrace.so out/target/product/rk3399/system/lib64/libunwind.so out/target/product/rk3399/system/lib64/libbase.so out/target/product/rk3399/system/lib64/libc++.so out/target/product/rk3399/system/lib64/libnetd_client.so out/target/product/rk3399/recovery/root/sbin/toolbox out/target/product/rk3399/recovery/root/sbin/twrp out/target/product/rk3399/system/lib64/libtwrpmtp.so out/target/product/rk3399/system/lib64/libext4_utils.so out/target/product/rk3399/system/lib64/libaosprecovery.so out/target/product/rk3399/system/lib64/libselinux.so out/target/product/rk3399/recovery/root/sbin/mkexfatfs out/target/product/rk3399/recovery/root/sbin/fsck.exfat out/target/product/rk3399/system/lib64/libexfat_twrp.so out/target/product/rk3399/recovery/root/sbin/exfat-fuse out/target/product/rk3399/system/lib64/libsparse.so out/target/product/rk3399/recovery/root/sbin/openaes out/target/product/rk3399/system/lib64/libopenaes.so out/target/product/rk3399/recovery/root/sbin/mkfs.f2fs out/target/product/rk3399/system/bin/fsck.f2fs out/target/product/rk3399/system/bin/reboot out/target/product/rk3399/system/lib64/libft2.so out/target/product/rk3399/system/bin/sgdisk out/target/product/rk3399/system/lib64/libpcre2.so out/target/product/rk3399/system/lib64/libvndksupport.so out/target/product/rk3399/system/lib64/libhwbinder.so out/target/product/rk3399/system/lib64/libhidlbase.so out/target/product/rk3399/system/lib64/libhidltransport.so out/target/product/rk3399/system/lib64/android.hardware.keymaster@3.0.so out/target/product/rk3399/system/lib64/libziparchive.so out/target/product/rk3399/system/lib64/libext2_blkid.so out/target/product/rk3399/system/lib64/libext2_quota.so out/target/product/rk3399/system/lib64/libhidl-gen-utils.so out/target/product/rk3399/system/lib64/libvintf.so out/target/product/rk3399/system/lib64/libtinyxml2.so out/target/product/rk3399/system/lib64/android.hidl.token@1.0.so out/target/product/rk3399/system/lib64/libkeyutils.so out/target/product/rk3399/system/lib64/libclang_rt.ubsan_standalone-aarch64-android.so out/target/product/rk3399/system/lib64/liblogwrap.so”
    /bin/bash: bootable/recovery/prebuilt/relink.sh: Permission denied
    [ 99% 13624/13633] build out/target/product/rk3399/obj/SHARED_LIBRARIES/libminuitwrp_intermediates/libminuitwrp.so.toc
    ninja: build stopped: subcommand failed.
    17:29:39 ninja failed with: exit status 1

failed to build some targets (04:16 (mm:ss))

@Pavel There seems to be a problem here.