TWRP on Khadas VIM?

Dear Gouwa, I got my VIM Pro with “Vim_Marshmallow_20170303” which is not to be listed on http://docs.khadas.com/basics/FirmwareResources/.
So I want to create a full backup including my aps, settings etc before I flash other roms. I’d like to do that with TWRP, since I found on http://freaktab.com/forum/tv-player-support/amlogic-based-tv-players/s905x/610101-khadas-vim-tv-box-amlogic-s905x-quad-core-one-for-the-geeks/page8 this:
“TWRP 3.0.2 for the Probox2 Air running nice on the Vim. Props to Abdul Pt for that.
And it works: backed up and restored system, data and boot in about 3 minutes in each direction.”
(Same here at Backup / Restore

So I tried the official TWRP app to flash this recovery. But later my VIM did stuck during boot into recovery, just displaying the letters “VIM”. After I booted nomally without issues, I used the TWRP app again to re-flash the backupped original recovery, which did work. The device now works normally again.

I guess I could use your the USB burning tool to flash TWRP via PC, (http://docs.khadas.com/bootcamp/UpgradeViaUSBCable/), but I read also about booting from a SD card with an .img-file there. I think this would not change my current system before I can back it up totally. But I can’t find any (detailed) infos how create such a card for Android. Any help with TWRP on Android 6 would be highly appreciated.

Sorry for bothering you personally, but I have no clue where to post this here best. Please move my question to a suitable post if there is one.

Thanks in advance and also for this nice little great computer!

Cheers, Stefan

1 Like

You want to run twrp on the sdcard ?
Usually amlogic devices just put the recovery.img file on the sdcard and hold reset button + insert power is automatically boot recovery twrp .
( Rename “TWRP 3.0.2 for the Probox2 Air” to recovery.img" )

3 Likes

Hi Hungphutho,thx for your help, but didn’t work for me.

I put the renamend recovery.img on my sd card, but holding the reset button and powering the VIM on, just let it boot normally into Android.
I can only boot into the upgrade mode

(from here: Burning Tool no Device

5) press and hold power button (far right button,when having VIM in front of you and HDMI output is on left side), you should see on TV/Monitor reboot/power off menu pop up.
6) press reboot button (the one on far left) and release after 1 sec.
7) wait until you see VIM written on your TV/Monitor and count to 5 and release power button")

The upgrade mode is entered perfectly, but I cannot access or use the new (TWRP) recovery.img from my SD card.
How can I boot from SD and use the recovery.img from there? Must it be somehow prepared?

Cheers, Stefan

Sorry @steff_1964 . The method that I mentioned only works on amlogic s8xx .
I am still waiting for Khadas VIM to home .

If you want to backup eMMC storage, you can use Linux distro, built by @balbes150.

  • Download linux distro with GUI: Oops, Captcha!
  • Write to [.img] file sdcard/usb using Win32DiskImager: Download Win32DiskImager-0.9.5-binary.zip (Win32 Disk Imager)
  • Activate boot from sdcard/usb: Boot into Android, plug-in sdcard/usb, enter Settings → System → About → Update → Select file aml_update.zip in sdcard/usb → Update.
  • Nom, VIM is booting into linux, login using user:root, pass:1234 → change new password, create new user → system auto reboot to GUI. After that, you can open terminal, type in:

    ddbr
    https://yadi.sk/i/lz9rOFHv3J3kGB

Keep your usb safe or you can copy folder /ddbr in your usb ext4 partition to another place to restore system later. All thank to @balbes150.

2 Likes

Thanks for the info. Does updating aml_update.zip from the SD card in Android not change already my current system?
I’d still like to know how to boot into the TWRP system with an recovery.img file on a sd card - this seems to be a very easy and “less invasive” solution.

aml_update.zip modifies uboot to make your VIM multibootable which means VIM will automatically boot from a bootable sdcard/usb if present, if not it will boot to Android normally, no harm done to the Android. It is like configuring a BIOS of PC to boot usb first. I think it is very efficient.

2 Likes

I’ll try that tonight. Thanks for the info. This would be a nice workaround…
But I think since somebody else got TWRP booted from SD card, I still would like to know how this was done.

You absolutely correctly understood my concept multiboot. Activation multi-boot is the most secure solution to run all applications with external media without the risk of destroying the regular firmware (eMMC). Pay attention to activate the multi-boot does not change code u-boot (this is important), so there’s no risk to brick. By the way, it allows to preserve the possibility of regular firmware updates via OTA on the TV box. Another useful infa. All images Armbian contain built-in u-boot. This means that if you write the image to the SD card, create a backup of the eMMC, you can then safely erase the entire internal memory or only the bootloader and be free to experiment with different systems. After experimenting enough again to start the system from the SD card (it has u-boot) and restore. Then you get the system in the form as made a copy. Literally not long ago, I checked these options. Have created a backup. Erased the internal memory of the console UART with the command “store init 3” , have tested different variants of u-boot. Regained its working (configured) the system back to exactly as it was before the experiments. By the way, you can have multiple copies of different systems from the internal memory, for example, before checking a card strategy version of the firmware or big updates or change settings.

1 Like

That sounds really good. I’ll give it a try.
(If I would boot from a SD card with a TWRP recovery, and back up the complete internal eMMC to an external media, I should in principle achieve the same result, right? Though I still don’t know how to do that.)
Cheers and thanks, Stefan

@stef_1964: I did reply to your Freaktab request for help with this: essentially, just use Rashr to flash the TWRP .img file while running Vim Marshmallow. It will replace the stock recovery. You can put the .img on an sd card or USB drive - anywhere that Rashr can browse to it. After flashing, reboot to recovery and you should have TWRP.

https://play.google.com/store/apps/details?id=de.mkrtchyan.recoverytools&hl=en

Hi Aschot, that sounds also promising (though the main idea was not to change anything, but to use the TWRP img-file from the SD card).
I tried already the official TWRP app (https://play.google.com/store/apps/details?id=me.twrp.twrpapp&hl=en) and could flash the twrp.ing-recovery. Then I used quick boot (http://www.siriusapplications.com/quickboot/) to boot into recovery, but my VIM stuck after displaying the letters “VIM”.
But I used the official TWRP app to backup the original recovery before I flashed the TWRP recovery. So after rebooting my VIM (normally without issues), I re-flashed the original recovery,a dn all was like before.

So I think Rashr - Flash Tool does more or less the same?

Strange, that according to other posts TWRP can be used directly from the SD card, but so far nobody seems exactly to know how :wink:

Cheers, Stefan

It seems that the distribution without GUI(aka, the server build edition) has the console on Debug UART, so if someone is familiar with command line, the server edition with little size (about 200MB, the GUI edition is about 600MB) is enough to do the backup ?

  1. All the images on the 3.14 kernel support for USB and video output. Therefore, to create a copy you can restore in normal mode without UART (with keyboard and monitor / TV).
  2. All images (desktop and server) Armbian have a backup script and restore “ddbr”. Therefore, you can use any option. It is important that an external drive had free space to write copy.
  3. You can login by SSH to server and run script from console, it works regardless of whether or not the GUI shell.

It’s possible that TWRP Manager may have messed up your recovery partition: I used Rashr to flash TWRP to a clean installation of MM and it just works.

Hi Zahir, I did only try the official TWRP tool to flash the new TWRP recovery under Android, and then I could not boot into recovery. I did not try to flash via Flash tool so far.
The idea was to boot into the TWRP recovery on my SD card, so no change of the existing system is required :slight_smile:
Greetz, Stefan

I test “TWRP 3.0.2 for the Probox2” with pendrive, rename to: recovery.img and it works. SD as well.

But you must press and hold power key and conect the power cable. (not reset key)

You can use it to backup.

2 Likes

That finally worked, thx a lot! I had before (just by chance) only SD cards and USB sticks tested, which all were formatted in NTFS. But FAT32 is required (eventually exFAT as well). Since my VIM supports NTFS drives under Android, I did not care about it before.
My current try used the same TWRP recovery file (renamed to recovery.img) on both, a SD card (exFAT, 128GB) and an USB stick (FAT32, 32GB), plugged in at the same time. Both showed up as potential backup locations in TWRP, but I still have to check which recovery.img was used to boot the device…
First backup just completed.
I also just checked: The recovery.img must be on a FAT32 device! The exFAT drive shows later up as potential backup location, but cannot be used to boot from.
Cheers, Stefan

1 Like

How did you manage to boot into TWRP?

I copied Probox2 Air image to USB (tried with SD card too) which was formatted to fat32, renamed to recovery.img, pressed and held POWER button, plugged in power but nothing happens - I am stuck on VIM logo… From USB drive I can see it tried to read as it’s LED flashed, but nothing happened :worried: