вторник, 3 июня 2025 г.

Xiaomi Yi action cam custom scripts.

Welcome to my action camera discission forum >> GoPrawn.com

Hi there! I decided to put here all the info I got about hacking Xiaomi Yi cam using autoexec.ash script, telnet-access, customizing firmware and etc. Check my other posts concerning Xiaomi Yi RAW file processing and other nutty stuff.

So now let's talk about autoexec.ash script, I will call this script ASH for short hereinafter.

Xiaomi Yi ASH scripts divide into three groups:
  1. Autorun scripts. They aimed to run once or repeatedly in loop mode. Usage examples: HDR capture, 100% quality JPEG capture, RAW timelapse.
  2. Tuning scripts. Those modify some settings overriding cam defaults allowing it operate in normal modes with improved functionality. Usage examples: Super-HD video, Change video bitrate, Fixed ISO, EV correction, RAW+JPEG still capture, Exposure lock.
  3. System scripts. Linux and RTOS tweaks and undocumented features.
Scripts in general can't damage/brick your device until they don't run any file-system commands. Such commands normally are not needed but I will highlight them in script description if any occurs.

Autorun scripts:

HDR-EXPO-3 - HDR exposure bracketing script (0/-3/+3 EV). Captures 3 JPEG images with 0EV, -3EV and +3EV exposure, Noise Reduction is off, ISO fixed to 100, WB is off before shooting, some  corrections to add details. Beep when ready and before cam off.

HDR6 - HDR script v 2. Captures 6 JPEG images with various shutters, ISO fixed to 100, some Shadows/Highlights clipping correction, Gamma correction. Cricket beep before cam off.

HDR6N - HDR script NIGHT v 3. Captures 6 100% quality JPEG images in LOW_ISO mode with various long shutters, ISO fixed to 400, some Shadows/Highlights clipping correction, Gamma correction. Long beep before cam off. This script deletes all junk .bin .BIN .RAW .TXT .UV .Y files from your 100MEDIA folder. Those file are normally produced by the script and can be deleted.

AUTOREC - AUTO REC. Starts video recording after camera boot. Good for dashcam (Car DVR) use. If this script doesn't run in your cam try this one with boot delay increased to 10 sec.

RAWLAPSE - RAW LAPSE v 2. Timelapse loop capture RAW+JPEG images with 7.9 s exposure and  8 s interval ISO fixed to 100. Will capture until memory is full or battery is empty. To stop capture please turn off the camera. This script deletes all junk .bin .BIN .TXT .UV .Y files from your 100MEDIA folder. Those file are normally produced by the script and can be deleted.

Tuning scripts:

YIMAX-PRO - YiMAX-PRO for Z26 Yi cam with 1.5.6 firmware. This script removes 'watercolor' look and provides the real 'flat' picture for post-production. It sets 1296p30 mode with 40 Mbps ABR (+-25%) bitrate. 1080p60 version. You can find 1.5.6 FW updates for all hardware versions here.

YIMAX-PRO - YiMAX-PRO for Z22 Yi cam with 1.5.6 firmware. This script removes 'watercolor' look and provides the real 'flat' picture for post-production. It sets 1296p30 mode with 40 Mbps ABR (+-25%) bitrate. 1080p60 version. You can find 1.5.6 FW updates for all hardware versions here.

YIMAX-PRO - YiMAX-PRO for 1.2.13 firmware. This script removes 'watercolor' look and provides the real 'flat' picture for post-production. It sets 1296p30 mode with 40 Mbps ABR (+-25%) bitrate. Thanx HiddenPilot for his help. 1080p60 version.

YIMAX-MOVIE - YiMAX-movie for 1.2.0/1.2.6 firmware. Script for video recording mode (raw+jpeg capture supported in photo mode). Sets SuperHD (1296p30@30Mbps) mode. Loads config file to set up sharpness, noise reduction and other filters. Provides "flat" picture with more details in shadows and highlights, reduces "watercolor" effect. Disables aggressive sharpening. Here is 1080p30@30Mbps version of the script. 1080p60@35Mbps modification.


YIMAX-MOVIE - YiMAX-movie for 1.2.10 firmware. Script for video recording mode (raw+jpeg capture supported in photo mode). Sets SuperHD (1296p30@30Mbps) mode. Loads config file to set up sharpness, noise reduction and other filters. Provides "flat" picture with more details in shadows and highlights, reduces "watercolor" effect. Disables aggressive sharpening. Here is 1080p30@30Mbps version of the script. 1080p60@35Mbps modification.

YIMAX-MOVIE - YiMAX-movie for 1.2.13 firmware. Script for video recording mode (raw+jpeg capture supported in photo mode). Sets SuperHD (1296p30@30Mbps) mode. Provides "flat" picture with more details in shadows and highlights, noise reduction is off. 1080p60@35Mbps version1080p30@30Mbps version.

YIMAX - YiMAX. Adds colors and details in shadows and highlights. Reduces noise filter. Enables RAW+JPEG capture for stills and SuperHD (1296p30@30Mbps) mode for videos.

RAWWB - RAW WB. Disables AWB and improves details in highlights. Useful for videos. Use still RAW capture feature from YiMAX script to get unprocessed images. White Balance is set and locked each time you turn the camera on, so if you want to reset it for the new scene just reboot the camera.

WARP-ON - Warp-on script. Activates lens rectification (fisheye correction) function. Useful in cases when you want to enable this feature, but can't connect to your Yi using WiFi.

System scripts:

WIFI-STA - Wireless adapter (station) mode. Made by Andy_S. Connects to existing wifi network. Edit "wpa_supplicant.conf" file in "wifi" folder: change "YourNetworkName" to you actual wifi network name (SSID) and change "YourSuperSecretNetworkPassword" to your network pasword. Please note this script is aimed to work with networks secured with WPA2-PSK. Put files (autoexec.ash and wifi folder with its contents) to the root of microsd card. Turn on the camera and turn on wifi if it's not enabled to autostart wifi. Wait for the beep.

SDTEST - SD card test. Gets info for MicroSD card installed into Yi camera. Check 'cardinfo.txt' file in the root of the card after running.

How to install scripts. Copy autoexec.ash file from the downloaded .zip into root of your MicroSD card. Turn Yi cam on. To uninstall script just remove/rename autoexec.ash file on MicroSD.

USE SCRIPTS AT YOUR OWN RISK! 
THE SCRIPTS ARE PROVIDED "AS IS". ANY MODIFICATIONS OF THESE SCRIPTS CAN RESULT IN DATA LOSS AND DAMAGE YOUR CAMERA!

This post will be always up to date according to any new ASH hacks discovered. Stay tuned!

UPD 150606: YIMAX script updated to work with 1.1.0 firmware.
UPD 150608: YIMAX script updated to v2: shadow/highlight detail fix.
UPD 150608: HDR6N autorun script added.
UPD 150611: RAWWB tuning script added.
UPD 150614: YIMAX script updated to v3: vibrance/saturation fix.
UPD 150614: AUTOREC autorun script added.
UPD 150616: RAWLAPSE autorun script added.
UPD 150617: RAWLAPSE  script replaced with RAWLAPSE V2.
UPD 150619: YIMAX script updated to work with 1.2.0 firmware. Noise filter adjusted.
UPD 150624: WIFI-STA by Andy_S tuning script added.
UPD 150805: YIMAX-MOVIE script added (for 1.2.0/1.2.6 FW). 
UPD 150805: System scripts added. SDTEST system script added.
UPD 150809: 1080p30@30Mbps version of YIMAX-MOVIE script added. 
UPD 150811: 1080p60@35Mbps version of YIMAX-MOVIE script added.
UPD 150812: YIMAX-MOVIE script for 1.2.10 firmware added.
UPD 160124: YIMAX-MOVIE script for 1.2.13 firmware added. Values corrected. NR off. Sharpening adjusted.
UPD 160510: 1080p30@30Mbps version of YIMAX-MOVIE script for 1.2.13 firmware added.
UPD 160707: YIMAX-PRO script for 1.2.13 firmware added.
UPD 160711: WARP-ON script added.
UPD 160722: HDR-EXPO-3 exposure bracketing script added.
UPD 160727: YIMAX-PRO 1080p60 version added.
UPD 170116: YIMAX-PRO script for Z22 and Z26 cams with 1.5.6 firmware added.