TWRP on Khadas VIM?


#21

Maybe , it depend of the image you have in the Vim.
Because in diferents uboot bottons works in diferent ways…

I look for a wile to test it


#22

I’ve built uboot from source on Khadas repository. Will take a look at code, maybe will find some hints there.


#23

I hav tested again, the image in my Vim is “SCV1A-ATV”.
Pendrive in FAT32, with the file renamed to: recovery.img
press and hold power key about ten seconds.
It works.
TWRP menu shows.


#24

Thanks, but still no luck…

As I’ve built Android Nougat from source, maybe @terry or @Gouwa could give some hints whether this file enables me to boot recovery.img from USB flash storage?


#25

This is what I retrieved from USB to serial log:

Full log here.

Anyway TWRP still doesn’t load :frowning:

Interestingly, with stock Android 6 ROM that comes preinstalled with Khadas VIM Pro, TWRP does load - holding POWER and pressing RESET and releasing it, still holding POWER until USB key starts being read.

@Gouwa, @terry, maybe uboot differs between what’s on GitHub and what’s where you build stock ROM from? Can you please check it?


#26

Anyone with uboot building experience to comment? :slight_smile:


#27

Just to be little hint, this version of kvim.h is included in manifest when Android Nougat is being built while following version is on Nougat branch as latest version. There are quite a number of differences between them. However, I am yet unable to spot how to make sure recovery.img is read from USB stick or SD card :roll_eyes:


#28

Looks like it attempts to read recovery.img but for some reason fails…


#29

Hi, Gytis:
DIdi you put the file ‘dtb.img’ and ‘aml_autoscript’ into your SD Card?
What’s the version of your board?


#30

Where should I find those files?

I do have two units, both are Vim v1.2. One with Nougat I’ve built myself, another with Marshmallow that came initially with device. Interestingly, for Marshmallow it is enough to place recovery.img to USB stick and TWRP loads. While Nougat build gives those notices I’ve pasted and doesn’t load TWRP.


#31

You need to copy two files into your SD Card

  • Copy TWRP recovery image to SD and rename as recovery.img
  • Copy kvim.dtb to SD and rename as dtb.img.

After doing that, you need to following below steps to boot into TWRP recovery.

  • Insert your SD Card
  • Power on Vim.
  • Long press Power key without release
  • Short press Reset key and release

Notice: Don’t connect VIM Type-C port with your PC. It need to connect VIM Type-C port with DC adapter


#32

Looks like it’s still missing aml_autoscript - where do I get it from?


#33

You don’t need to put the file aml_autoscript into your SD Card.
Have a try.
Thanks.


#34

In that case something is missing still, because having recovery.img and dtb.img on SD card still doesn’t help to load TWRP.

While on stock Marshmallow (that comes preinstalled on device) all you need is to place recovery.img and it loads as expected.

I have a feeling that something is different between uboot versions…


#35

I tested it with our recovery.img and kvim.dtb. It booted into the recovey on SD Card.
Can you provide the TWRP recovery image for me? The below link is invalid.


#36

You can download TWRP which I am using from here - it is exactly the same Probox2 image from the broken link.


#37

My ROM is Vim_Marshmallow_Root_170603
I can booted into TWRP recovery mode. Maybe you need the kvim.dtb


#38

Thing is that on stock Android ROM I can also boot TWRP and I don’t even need kvim.dtb. But on built Android I cannot achieve the same even if I place kvim.dtb - that is the problem…

Anyway, I will try with your provided kvim.dtb too.

That’s why I suspect uboot that is on GitHub might be differently configured than the one used in your ROMs…


#39

No, still no luck even when putting this kvim.dtb and recovery.img when using built Android Nougat :frowning: Must be something with uboot…


#40

Can you try with Nougat, e.g. Vim_Nougat_Root_170612.7z?

I am trying with built Nougat and also tried explicitly flashing this uboot: Vim_Uboot_Nougat_170512.7z - still TWRP doesn’t load… :frowning: