Need help disabling AVB and installing LineageOS on UMIDIGI A7 Pro (Android 10)

Search This thread

segfaultcoder

Member
Jul 29, 2020
18
0
Murcia
Hello. For the past week, I've been trying to install LineageOS to my UMIDIGI A7 Pro, but every time I modify a partition, either with SPFT or with fastboot flash, I get this error when booting, repeating in an infinite loop:


Red State

Your device has failed verification and may not
work properly.
Please download boot image with correct signature
or disable verified boot.
Your device will reboot in 5 seconds.


Could someone tell me how to disable verified boot(AVB) and to install LineageOS 17.1 on the super partition? Also, it would help a lot if someone also knows how to install TWRP. Thanks.
 

segfaultcoder

Member
Jul 29, 2020
18
0
Murcia
Well, something really weird happened:

Some time ago, I found on https://source.android.com/setup/build/gsi a way to disable AVB:
Code:
fastboot --disable-verification flash vbmeta vbmeta.img
The problem is that when I downloaded the official ROM images from UMIDIGI site and unzipped the zip file, I didn't have enough space in my SSD so it didn't extract completely and the vbmeta.img file was missing. As I didn't found that file, I simply ignored the guide.

Now I emptied the recycle bin(wow, 28 GB) and tried to unzip it again and now I have that file, and I succefully disabled AVB.

But I still need help with LineageOS, as it's supposed to be installed on the system partition but I only have a super partition.

Thanks anyway for answering :).
 

Seppppx

Senior Member
Jul 27, 2019
278
43
Well, something really weird happened:

Some time ago, I found on https://source.android.com/setup/build/gsi a way to disable AVB:

The problem is that when I downloaded the official ROM images from UMIDIGI site and unzipped the zip file, I didn't have enough space in my SSD so it didn't extract completely and the vbmeta.img file was missing. As I didn't found that file, I simply ignored the guide.

Now I emptied the recycle bin(wow, 28 GB) and tried to unzip it again and now I have that file, and I succefully disabled AVB.

But I still need help with LineageOS, as it's supposed to be installed on the system partition but I only have a super partition.

Thanks anyway for answering :).
I guess you can try this. https://forum.xda-developers.com/nu.../swapper-generate-flashable-zips-img-t4133591
This is supposed to generate flasable zips to get GSIs to work on super partition phones.

I suggest you make a backup.
 

segfaultcoder

Member
Jul 29, 2020
18
0
Murcia
I guess you can try this. https://forum.xda-developers.com/nu.../swapper-generate-flashable-zips-img-t4133591
This is supposed to generate flasable zips to get GSIs to work on super partition phones.

I suggest you make a backup.

I managed to get a .zip file by manually running the commands in linux using a LineageOS 17.1 GSI, but how do I flash it to the phone? I don't have any custom recovery as I couldn't find TWRP or any other recovery for the A7 Pro and recoveries for other phones with the same CPU don't seem to work.
 

Seppppx

Senior Member
Jul 27, 2019
278
43
I managed to get a .zip file by manually running the commands in linux using a LineageOS 17.1 GSI, but how do I flash it to the phone? I don't have any custom recovery as I couldn't find TWRP or any other recovery for the A7 Pro and recoveries for other phones with the same CPU don't seem to work.
I can help you make TWRP if you want
 

Seppppx

Senior Member
Jul 27, 2019
278
43
Last edited:

segfaultcoder

Member
Jul 29, 2020
18
0
Murcia
OK I'm making a TWRP device tree for your phone. You will need to compile it. https://github.com/Seplx/android_device_oukitel_wp1
Thanks for making the device tree, but how do I compile it? (the commands at the build instructions need a build folder and more files, where do I get them from?)

Can you also please give me your stock recovery.img?
The recovery.img file: https://www.mediafire.com/file/nfcyp4gklkgwe3x/recovery.img/file
 

Seppppx

Senior Member
Jul 27, 2019
278
43
Thanks for making the device tree, but how do I compile it? (the commands at the build instructions need a build folder and more files, where do I get them from?)


The recovery.img file: https://www.mediafire.com/file/nfcyp4gklkgwe3x/recovery.img/file
You can see how to compile TWRP here https://forum.xda-developers.com/showthread.php?t=1943625

You have to have Linux or some kind if Linux bash. (Like WSL 2 on latest Windows)

You should have at least 4 gigs of ram if you are on Linux (maybe 3 is enough idk). On WSL you need more.
 

segfaultcoder

Member
Jul 29, 2020
18
0
Murcia

When I run "mka recoveryimage", ninja gives me this error:

(...)
No private recovery resources for TARGET_DEVICE A7_Pro
build/core/tasks/kernel.mk:109: ***************************************************************
build/core/tasks/kernel.mk:110: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:111: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:112: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:113: * source repository to kernel/umidigi/A7_Pro
build/core/tasks/kernel.mk:114: * See http://forum.xda-developers.com/wiki/ROM/Integrated_Kernel_Build
build/core/tasks/kernel.mk:115: * for more information *
build/core/tasks/kernel.mk:116: ***************************************************************
build/core/base_rules.mk:407: warning: overriding commands for target `/recovery_unit_test'
build/core/base_rules.mk:407: warning: ignoring old commands for target `/recovery_unit_test'
build/core/base_rules.mk:407: warning: overriding commands for target `/recovery_component_test'
build/core/base_rules.mk:407: warning: ignoring old commands for target `/recovery_component_test'
build/core/base_rules.mk:407: warning: overriding commands for target `/minadbd_test'
build/core/base_rules.mk:407: warning: ignoring old commands for target `/minadbd_test'
bootable/recovery/toolbox/Android.mk:302: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/start'
bootable/recovery/toolbox/Android.mk:302: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/start'
bootable/recovery/toolbox/Android.mk:302: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/stop'
bootable/recovery/toolbox/Android.mk:302: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/stop'
build/core/base_rules.mk:319: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/system/xbin/unzip'
./external/busybox/Android.mk:172: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/system/xbin/unzip'
build/core/base_rules.mk:319: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:319: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_scale.png'
build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_scale.png'
build/core/Makefile:1112: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.cpio'
build/core/Makefile:1068: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.cpio'
build/core/Makefile:1118: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.img'
build/core/Makefile:1074: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.img'
build/core/Makefile:1124: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery.img'
build/core/Makefile:1079: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery.img'
Starting build with ninja
ninja: Entering directory `.'
ninja: warning: phony target '-*-' names itself as an input; ignoring [-w phonycycle=warn]
ninja: error: '/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/system/xbin/zip', needed by '/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/obj_arm/SHARED_LIBRARIES/libbmlutils_intermediates/teamwin', missing and no known rule to make it
make: *** [build/core/ninja.mk:158: ninja_wrapper] Error 1

You have to have Linux or some kind if Linux bash. (Like WSL 2 on latest Windows)

You should have at least 4 gigs of ram if you are on Linux (maybe 3 is enough idk). On WSL you need more.

That's not a problem, I have a PC with 16 GB of RAM running Ubuntu 20.04 :)
 

Seppppx

Senior Member
Jul 27, 2019
278
43
When I run "mka recoveryimage", ninja gives me this error:

(...)
No private recovery resources for TARGET_DEVICE A7_Pro
build/core/tasks/kernel.mk:109: ***************************************************************
build/core/tasks/kernel.mk:110: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:111: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:112: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:113: * source repository to kernel/umidigi/A7_Pro
build/core/tasks/kernel.mk:114: * See http://forum.xda-developers.com/wiki/ROM/Integrated_Kernel_Build
build/core/tasks/kernel.mk:115: * for more information *
build/core/tasks/kernel.mk:116: ***************************************************************
build/core/base_rules.mk:407: warning: overriding commands for target `/recovery_unit_test'
build/core/base_rules.mk:407: warning: ignoring old commands for target `/recovery_unit_test'
build/core/base_rules.mk:407: warning: overriding commands for target `/recovery_component_test'
build/core/base_rules.mk:407: warning: ignoring old commands for target `/recovery_component_test'
build/core/base_rules.mk:407: warning: overriding commands for target `/minadbd_test'
build/core/base_rules.mk:407: warning: ignoring old commands for target `/minadbd_test'
bootable/recovery/toolbox/Android.mk:302: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/start'
bootable/recovery/toolbox/Android.mk:302: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/start'
bootable/recovery/toolbox/Android.mk:302: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/stop'
bootable/recovery/toolbox/Android.mk:302: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/stop'
build/core/base_rules.mk:319: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/system/xbin/unzip'
./external/busybox/Android.mk:172: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/system/xbin/unzip'
build/core/base_rules.mk:319: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:319: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_scale.png'
build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_scale.png'
build/core/Makefile:1112: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.cpio'
build/core/Makefile:1068: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.cpio'
build/core/Makefile:1118: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.img'
build/core/Makefile:1074: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.img'
build/core/Makefile:1124: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery.img'
build/core/Makefile:1079: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery.img'
Starting build with ninja
ninja: Entering directory `.'
ninja: warning: phony target '-*-' names itself as an input; ignoring [-w phonycycle=warn]
ninja: error: '/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/system/xbin/zip', needed by '/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/obj_arm/SHARED_LIBRARIES/libbmlutils_intermediates/teamwin', missing and no known rule to make it
make: *** [build/core/ninja.mk:158: ninja_wrapper] Error 1



That's not a problem, I have a PC with 16 GB of RAM running Ubuntu 20.04 :)
I will fix it later. Maybe tomorrow.
 

Seppppx

Senior Member
Jul 27, 2019
278
43
When I run "mka recoveryimage", ninja gives me this error:

(...)
No private recovery resources for TARGET_DEVICE A7_Pro
build/core/tasks/kernel.mk:109: ***************************************************************
build/core/tasks/kernel.mk:110: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:111: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:112: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:113: * source repository to kernel/umidigi/A7_Pro
build/core/tasks/kernel.mk:114: * See http://forum.xda-developers.com/wiki/ROM/Integrated_Kernel_Build
build/core/tasks/kernel.mk:115: * for more information *
build/core/tasks/kernel.mk:116: ***************************************************************
build/core/base_rules.mk:407: warning: overriding commands for target `/recovery_unit_test'
build/core/base_rules.mk:407: warning: ignoring old commands for target `/recovery_unit_test'
build/core/base_rules.mk:407: warning: overriding commands for target `/recovery_component_test'
build/core/base_rules.mk:407: warning: ignoring old commands for target `/recovery_component_test'
build/core/base_rules.mk:407: warning: overriding commands for target `/minadbd_test'
build/core/base_rules.mk:407: warning: ignoring old commands for target `/minadbd_test'
bootable/recovery/toolbox/Android.mk:302: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/start'
bootable/recovery/toolbox/Android.mk:302: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/start'
bootable/recovery/toolbox/Android.mk:302: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/stop'
bootable/recovery/toolbox/Android.mk:302: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery/root/sbin/stop'
build/core/base_rules.mk:319: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/system/xbin/unzip'
./external/busybox/Android.mk:172: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/system/xbin/unzip'
build/core/base_rules.mk:319: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_fail.png'
build/core/base_rules.mk:319: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_scale.png'
build/core/base_rules.mk:319: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/root/res/images/charger/battery_scale.png'
build/core/Makefile:1112: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.cpio'
build/core/Makefile:1068: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.cpio'
build/core/Makefile:1118: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.img'
build/core/Makefile:1074: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/ramdisk-recovery.img'
build/core/Makefile:1124: warning: overriding commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery.img'
build/core/Makefile:1079: warning: ignoring old commands for target `/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/recovery.img'
Starting build with ninja
ninja: Entering directory `.'
ninja: warning: phony target '-*-' names itself as an input; ignoring [-w phonycycle=warn]
ninja: error: '/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/system/xbin/zip', needed by '/home/segfaultcoder/Downloads/twrp/out/target/product/A7_Pro/obj_arm/SHARED_LIBRARIES/libbmlutils_intermediates/teamwin', missing and no known rule to make it
make: *** [build/core/ninja.mk:158: ninja_wrapper] Error 1



That's not a problem, I have a PC with 16 GB of RAM running Ubuntu 20.04 :)
I have looked at the errors and they don't seem to be related to the device tree. I suppose you installed the full Twrp-10 sources. The 10 sources are still WIP. The device tree was made to work with twrp-8. I suggest you try the mini twrp-8.

https://github.com/minimal-manifest-twrp/READ_ME_FIRST

https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-8.1

Edit: when building any twrp use "export LC_ALL=C"
 
Last edited:

segfaultcoder

Member
Jul 29, 2020
18
0
Murcia
I have looked at the errors and they don't seem to be related to the device tree. I suppose you installed the full Twrp-10 sources. The 10 sources are still WIP. The device tree was made to work with twrp-8. I suggest you try the mini twrp-8.

https://github.com/minimal-manifest-twrp/READ_ME_FIRST

https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-8.1

Edit: when building any twrp use "export LC_ALL=C"

Thanks Seppppx for helping me, I managed to compile TWRP. Android 10 continues to boot as normal, but when I enter recovery either with adb or by pressing the VOLUME UP key while powering on, it gets stuck on the TWRP splash screen. Even after 20 minutes of waiting.
 

Seppppx

Senior Member
Jul 27, 2019
278
43
Thanks Seppppx for helping me, I managed to compile TWRP. Android 10 continues to boot as normal, but when I enter recovery either with adb or by pressing the VOLUME UP key while powering on, it gets stuck on the TWRP splash screen. Even after 20 minutes of waiting.
OK at least there is some progress. Can you pull logs so I can know what to fix?
 

Seppppx

Senior Member
Jul 27, 2019
278
43
I can't find any logs in the phone storage(not /cache/recovery, /tmp, /sdcard or /data/media/0, and I don't know where to look at more).
This is how you can take logs.

Use the commands below in recovery.
https://developer.android.com/studio/command-line/logcat "adb logcat"

https://elinux.org/Android_Logging_System "dmesg"
and also try "/proc/kmsg" idk if this is needed, but you might need to do "dev/kmsg".

Just a reminder before running dmesg and kmsg you have to do "adb shell".

You can with this video about troubleshooting with dmesg.
 

segfaultcoder

Member
Jul 29, 2020
18
0
Murcia
This is how you can take logs.

Use the commands below in recovery.
https://developer.android.com/studio/command-line/logcat "adb logcat"

https://elinux.org/Android_Logging_System "dmesg"
and also try "/proc/kmsg" idk if this is needed, but you might need to do "dev/kmsg".

Just a reminder before running dmesg and kmsg you have to do "adb shell".

You can with this video about troubleshooting with dmesg.

I can't use adb as the phone is not listed when I run "adb devices".

I managed to enter the TWRP menu by erasing both the userdata and the cache partition. The problem now is that TWRP looks for a /system partition and not for a /super partition so I can't install LineageOS 17.1.

Edit: It looks like TWRP only loads before the first boot into the stock ROM, after that it will be stuck at the splash screen.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    If anyone wants to test my twrp for the a7 pro please pm me. I don't want to publish it yet as it's not tested and might break stuff.
    1
    Edit : How do I know this? When you dd the super partition and extract it it is just a system partition.

    Can't say for sure. But maybe you cannot use dd to get it.

    Or the tester you had getting it not do it correctly.

    You did say you do not have the device, correct.
    That is why I assumed you had someone else use dd to get you the image.

    Anyway regardless. I just dumped to stock firmware downloaded from umidigi support group. And the super.img is a real super.img, it has three partitions it it. (System, vendor, product)

    Dump is on my github, dumped with firmware-extractor and dumpyara.sh script.

    One user testing my first build. Says that he can mount all of super sub-partotions,
    Only issue is I did leave /data off the fstab because encryption was not included.

    Because this thread was not a discussion TWRP for a7-pro I will start a new thread, and add a tag 'A7-PRO' so device can start getting development attention, hopefully


    Here is link
    https://forum.xda-developers.com/tags.php?tag=a7-pro
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone