Home  /  Tools Apps  / Event based script runner on Windows Pc

Event based script runner on Windows Pc

Developed By: Hzj_jie

License: Free

Rating: 2,6/5 - 9 votes

Last Updated: December 25, 2023

Download on Windows PC

Compatible with Windows 10/11 PC & Laptop

App Details

Version 1.0
Size 22.2 KB
Release Date April 04, 21
Category Tools Apps

App Permissions:
Allows applications to access information about networks. [see more (9)]

What's New:
[master 9762a0f] TsvReader should not trim the leading tab[master 1eb83a9] trigger receiver manually in exec service [see more]

Description from Developer:
If you do not know what is an sh script, expect there is a step by step instruction to help you setup some simple tasks, feel this application won't open or crash, or think 12K... [read more]

App preview ([see all 4 screenshots])

App preview

About this app

On this page you can download Event based script runner and install on Windows PC. Event based script runner is free Tools app, developed by Hzj_jie. Latest version of Event based script runner is 1.0, was released on 2021-04-04 (updated on 2023-12-25). Estimated number of the downloads is more than 1,000. Overall rating of Event based script runner is 2,6. Generally most of the top apps on Android Store have rating of 4+. This app had been rated by 9 users, 5 users had rated it 5*, 3 users had rated it 1*.

How to install Event based script runner on Windows?

Instruction on how to install Event based script runner on Windows 10 Windows 11 PC & Laptop

In this post, I am going to show you how to install Event based script runner on Windows PC by using Android App Player such as BlueStacks, LDPlayer, Nox, KOPlayer, ...

Before you start, you will need to download the APK/XAPK installer file, you can find download button on top of this page. Save it to easy-to-find location.

[Note] You can also download older versions of this app on bottom of this page.

Below you will find a detailed step-by-step guide, but I want to give you a fast overview of how it works. All you need is an emulator that will emulate an Android device on your Windows PC and then you can install applications and use it - you see you're playing it on Android, but this runs not on a smartphone or tablet, it runs on a PC.

If this doesn't work on your PC, or you cannot install, comment here and we will help you!

Step By Step Guide To Install Event based script runner using BlueStacks

  1. Download and Install BlueStacks at: https://www.bluestacks.com. The installation procedure is quite simple. After successful installation, open the Bluestacks emulator. It may take some time to load the Bluestacks app initially. Once it is opened, you should be able to see the Home screen of Bluestacks.
  2. Open the APK/XAPK file: Double-click the APK/XAPK file to launch BlueStacks and install the application. If your APK/XAPK file doesn't automatically open BlueStacks, right-click on it and select Open with... Browse to the BlueStacks. You can also drag-and-drop the APK/XAPK file onto the BlueStacks home screen
  3. Once installed, click "Event based script runner" icon on the home screen to start using, it'll work like a charm :D

[Note 1] For better performance and compatibility, choose BlueStacks 5 Nougat 64-bit read more

[Note 2] about Bluetooth: At the moment, support for Bluetooth is not available on BlueStacks. Hence, apps that require control of Bluetooth may not work on BlueStacks.

How to install Event based script runner on Windows PC using NoxPlayer

  1. Download & Install NoxPlayer at: https://www.bignox.com. The installation is easy to carry out.
  2. Drag the APK/XAPK file to the NoxPlayer interface and drop it to install
  3. The installation process will take place quickly. After successful installation, you can find "Event based script runner" on the home screen of NoxPlayer, just click to open it.

Discussion

(*) is required

If you do not know what is an sh script, expect there is a step by step instruction to help you setup some simple tasks, feel this application won't open or crash, or think 12K application won't be able to do much, you definitely do not understand the meaning of this application. I suggest you stop here and won't waste time anymore.
I cannot quite understand the reviews or mails from some guys, I developed this free tool without benefit, just for people to resolve their issues. I do not have responsibilities to explain some very basic linux or android commands.

This is a very small tool to execute one of following sh scripts after a certain event.
Device boot -> init.sh
Screen on -> screen-on.sh
Screen off -> screen-off.sh
User present -> screen-unlock.sh
Wifi on -> wifi-on.sh
Wifi off -> wifi-off.sh
Wifi connected -> wifi-connected.sh
Wifi disconnected -> wifi-disconnected.sh
And a user action One Short -> one-shot.sh

It searches following folders for scripts. -- Real locations may be various according to manufacturers or ROM builders.
/storage/emulated/0/init/ -- init/ in internal storage
/storage/sdcard1/init/ -- init/ in external storage
/storage/emulated/0/Android/data/org.gemini.init/files/ -- in app internal storage files
/storage/sdcard1/Android/data/org.gemini.init/files/ -- in app external storage files

It could be a very powerful tool if you would like to solve following troubles,
1. Apps on SD card cannot be auto started.
2. Would like to regular move files from one folder to another.
3. Executes some actions when screen on / off.
There is a sample @ https://github.com/Hzj-jie/android-init/tree/master/sample

This app has a very small footprint, only several hundreds kilo bytes of storage and several mega bytes memory usage, and no extra permissions required.

code is @ https://github.com/hzj-jie/android-init

Note:
1. Make sure this app itself is able to auto start when booting, some ROMs have such controls.
2. Make sure this app is protected, the script will stop if this app stopped.
3. You need to start the app once before it can receive boot complete signal. (Click on 'Activate Init' icon.)
4. Usually nohup cannot work, the script will stop after the service of this app stopped.
5. You can still use & to concurrently execute several scripts.
6. The app service will stop after executing script, and publish a notification. If your script needs a long run, sleep forever.
7. App will output the output of sh command into /storage/sdcard1/Android/data/org.gemini.init/files/output.log or /storage/emulated/0/Android/data/org.gemini.init/files/output.log.

FAQ:
1. How does it work?
The app starts a service, and looks for scripts in certain folders, executes the all scripts it found with 'sh {full path of init.sh}', redirects output and error streams to log files.
2. Why no icon?
I do not mean to cheat, but it help to save memory. And you do not need to click on the app icon. The whole package is only 12 kilo bytes, I do not want an icon to enlarge it.
3. How to start an activity?
am --user 0.
4. Screenshots?
Yes, all screenshots are coming from my phone, if you have copyright to any of them, feel free to let me know, I will remove it.
5. Why I need to click on 'Activate Init' first?
Start from Android 3.1, BOOT_COMPLETED signal will only be received by apps which have actively been started by users.
http://commonsware.com/blog/2011/07/05/boot-completed-regression.html
6. If I was using output redirection, where is the output file?
Same as output.log, i.e. app data folder in external or internal storage, (such as /storage/emulated/0/Android/data/org.gemini.ini/files/). Technically said, the start directory is same as where output.log is placed.
7. How to write an sh script?
Google "how to write sh script". But note, supported commands may be various according to your ROM
8. Root commands?
If your device is rooted.
9. output.log is not realtime?
Yes, log writer has a buffer, tasks may also be delayed by OS.
[master 9762a0f] TsvReader should not trim the leading tab
[master 1eb83a9] trigger receiver manually in exec service
Allows applications to access information about networks.
Allows applications to access information about Wi-Fi networks.
Allows an application to retrieve state dump information from system services.
Allows an application to read from external storage.
Allows read only access to phone state, including the phone number of the device, current cellular network information, the status of any ongoing calls, and a list of any PhoneAccounts registered on the device.
Allows modification of the telephony state - power on, mmi, etc.
Allows an application to receive the ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting.
Allows an application to write to external storage.
Allows applications to open network sockets.