Droidscript ! not working

I bought the Vim2 to enable me to run Droidscript for Android but when trying to open the APP all I get is a quick burst of activity then nothing, the program refuses to run – any ides on why this would/could happen.

Hello, I am running a ROM from @superceleron(SCV3 Beta) on my VIM2. I do not use the app Droidscript.

I downloaded the app from Google Play Store, it installed without issue, though it has a lot of permissions.
The app opened without incident. I was able to download the demo Smart Dice. It ask me to shake my device, but of course VIM2 has no onboard sensors to detect shaking.:slightly_smiling_face:

From the page where Hello World is shown, Smart Dice also shows. I was able to long press Smart Dice and open the editor, view and modify the script.

I have not tried the latest official Khadas Android, nor have I tried the latest @superceleron ROM.

In any case, I think you have reason to be optimistic that the VIM2 can run Droidscript.

What Firmware/ROM is your VIM2 running?


Thank you so much for your help. Downloaded Vim 2 SCV3 - Beta but how do I install it ??

Currently running 7.1.2

Hello, superceleron’s ROM will require two steps. Please read superceleron’s post before flashing, this will give important details about his ROM. SCV3 is provided as an OTA update file(zip), as a result SCV1 must be installed first. SCV1 is an image, it uses the USB Burning Tool to flash the ROM to the VIM2.
CAUTION: Flashing the VIM2 will erase all app data and user files like pictures and documents, back up before flashing if those files are important to you.
1.) Download SCV1 image from here.
Install to VIM2 using the USB Burning Tool, a Windows PC and the supplied USB-C to-male USB cable. Directions for this here.
Once SCV1 is installed to VIM2 go to step 2.

2.) Download SCV3 from here.
This will be a zip file, do not unzip. Place file on an SD card, USB flash drive, or in home directory on VIM2.
On the VIM2, got to Settings/More Settings/About device/System updates. From the Update screen, under the UpdateLocale section, click Select. The Update app will show you what files are available, something like, “OTA-Khadas.Vim2-SCV3-Beta.zip”. Click the update file, the update app will return to it’s home page, from the UpdateLocale section, click Update. Note: Do not select the options Wipe Data or Wipe Media…to be clear, do not use those options. After you click Update, the VIM2 will reboot and install the OTA update.
Again, please read superceleron’s post on SCV3 so you avoid any issues and you know what to expect.
Good luck. :slight_smile:


After flashing the latest Khadas VIM2 Nougat firmware(VIM2_Nougat_V171028), I was unable to get Droidscript to open. It would try to open, seem to struggle with display orientation and crashed.

I downloaded a screen rotation app, from the app, I selected landscape, after that, Droidscript is working well.

Removing the app breaks Droidscript again, so Droidscript has some problem with the firmware or Nougat. The rotation app above is a suitable workaround in the meantime.

Hi Guys, thanks for investigating these DroidScript issues, it’s been helpful. I saw you struggling and decided to sort DroidScript out and get it working on VIM since it’s such an awesome piece of kit. So VIM/VIM2 will be officially supported by DS from now on :slight_smile:

The VIM devices are a major find for me and I can’t believe I didn’t know they existed till about a week ago! I was trying to build my own Android alternative to the Raspberry Pi out of cheap S905 based TV boxes and laser cut acrylic when I stumbled upon the khadas web site… OMG this is exactly what I’ve been looking for :rofl:

I’ve got myself a VIM pro and I’ll be ordering a VIM2 soon but I expect the latest alpha version will work on the VIM2 as well (let me know).

The latest alpha release of DroidScript which provides support for VIM can be found here:- http://androidscript.org/alpha/DroidScript_159a2

(Tested on Vim_Nougat_Root_170421)

Note1: You need to uninstall any older copies of DS (DroidScript) before you install the alpha or your will get locked out by a password dialog)

Note2: The DroidScript IDE can be used remotely over Wifi, just type IP address of your VIM into a browser and add port 8088 to the url (eg. You can also use a config file to make DS auto-start so that you can run headless (check the DS forum for more info)


Here’s an example of flipping the GPIOH5 pin from a native Android toggle button:-

//Called when application is started.
function OnStart()
	//Create a layout with objects vertically centered.
	lay = app.CreateLayout( "linear", "VCenter,FillXY" );	

	//Create a toggle button.
    tgl = app.CreateToggle( "Toggle Button", 0.4 );
    tgl.SetMargins( 0, 0.02, 0, 0 );
    tgl.SetOnTouch( tgl_OnTouch );
    lay.AddChild( tgl );
	//Add layout to app.	
	app.AddLayout( lay );
	//Setup the GPIO pin.
	sys = app.CreateSysProc("su");
   	sys.Out( "echo " + 176 + " > /sys/class/gpio/export\n" );
    	sys.Out( "echo out > /sys/class/gpio/gpio" + 176 + "/direction\n" );

//Called when user touches our toggle button.
function tgl_OnTouch( isChecked )  
	if( isChecked )
		sys.Out( "echo 1 > /sys/class/gpio/gpio" + 176 + "/value\n" );
		sys.Out( "echo 0 > /sys/class/gpio/gpio" + 176 + "/value\n" );

Hello DaveSmart, Welcome aboard.

I am not a coder, but Droidscript still looks fun to tinker with, and maybe I will learn something while I’m at it. :slight_smile: Now that you have incorporated the GPIO, maybe I will learn more about it as well.

I assume you have already been to docs.khadas.com, if not have a look. May also want to look into the work of forum members @balbes150 and @superceleron. I assume you are familiar with Freaktab, if not, you may want to look around there too. :slight_smile:

Thanks for the info,

You’ll soon will be a coder once you start playing with DroidScript, it’s designed to accessible for non-coders and teaches coding by example using JavaScript, which is probably the worlds most popular, useful and easy programming language. :slight_smile:

Although DroidScript is designed for beginners, it’s powerful enough to be used by professionals and is used in a number of industrial applications and university research departments.

Here’s a few ideas for what you could make with DroidScript and a VIM box:-

Home automation controller,
Custom game console,
Robot controller,
Local Web server,
Remote music player,
Security camera,
Security monitor,
Information kiosk,
Digital display/sign,
Active photo frame,
Data gatherer,
Machine controller,
IOT hub.

I’m personally working on an educational robot right now and plan to use the Vim as the main brain of my robot. It’s going to have computer vision, voice synthesis, remote control, face recognition and (hopefully) a bit of personality too :slight_smile: