AutoJs6 Documentation
repository·master·Indexed 27 days ago
https://github.com/supermonster003/autojs6An open-source JavaScript-based automation tool for Android (API level 24+) that leverages Accessibility Services, Root, and Shizuku for UI interactions, image recognition, and system-level tasks. Features include a JavaScript IDE, Selector API, layout analysis, and an upgraded Rhino engine (v2.0.0-SNAPSHOT) supporting modern JS features like BigInt and Template Literals. Includes specialized modules for HTTP requests, image processing, and integration with libraries like Day.js and jieba-analysis.
What's inside AutoJs6
- AutoJs6 is a JavaScript automation tool for the Android platform that leverages Accessibility Services to perform automated operations. It is a community-driven successor to the original Auto.js project, maintaining an open-source and free model.
New features in v6.6.3
masterThe v6.6.3 release introduced several new capabilities:
- Script Management:
timers.keepAlive()(globally available) to keep scripts active;engines.on('start/stop/error', callback)for global engine event listening; and a new release history feature. - Image Processing:
images.detectMultiColorsfor multi-point color validation;images.matchFeatures/detectAndComputeFeaturesfor full-resolution image matching;images.compressToBytesfor image compression to byte arrays; andimages.downsamplefor pixel downsampling. - UI & Webview:
ui.keepScreenOnto keep the screen awake when the UI has focus;ui.root(getter) to access the UI layout root container; and support for JsBridge-based Web page layouts inwebviewelements. - Layout Analysis: Support for detecting hidden controls.
- Script Management:
New features in v6.0.3
masterVersion v6.0.3 introduced:
recordermodule: For recording tasks.- Automated Accessibility Service activation: Option to automatically enable Accessibility Services and Automation Settings upon startup or restart.
- 64-bit system support: Improved compatibility for 64-bit software systems.
Core Features of AutoJs6
masterAutoJs6 provides a comprehensive suite of tools for Android automation:
- JavaScript IDE: Includes code completion, variable renaming, and code formatting.
- Automation: Supports operations based on Android Accessibility Services.
- Floating Window Tools: Quick access to script recording/playback, package name/activity inspection, and layout analysis.
- Selector API: Provides control traversal, information retrieval, and control manipulation (similar to UiAutomator).
- Layout Analysis: Visual inspection of UI layouts (similar to Android Studio's LayoutInspector).
- Recording: Supports recording user actions and replaying them.
- Image Processing: Supports screenshots, saving screenshots, color finding, and image matching.
- UI Development: Supports writing interfaces using E4X (ECMAScript for XML).
- Packaging: Ability to package script files or projects into APK files.
- Root Privileges: Extends functionality (clicks, swipes, recording, Shell) when Root access is available.
- Integrations: Works as a Tasker plugin and supports desktop development via VSCode using the
AutoJs6-VSCode-Extension.
New features in v6.1.1
masterVersion v6.1.1 added:
- Update checking: Check for/download updates (Note: currently not supported on Android 7.x).
- External memory fix: Resolved issues reading/writing to external storage on Android 10.
Key features of jieba-analysis
masterThe
jieba-analysislibrary (Java version) includes the following features:- Multiple Segmentation Modes: Supports
SearchandIndexmodes. - Text Normalization: Automatically converts full-width characters to half-width.
- User Dictionary: Supports custom user dictionaries.
- TF-IDF Keyword Extraction: New feature to extract keywords from text.
- Performance Note: The latest snapshot versions have removed part-of-speech (POS) tagging to improve performance.
- Multiple Segmentation Modes: Supports
Rotate signing keys with apksigner rotate
masterUse theapksigner rotatecommand to create aSigningCertificateLineageentry. This links an old signing certificate to a new one, enabling key rotation using the APK Signature Scheme v3. To perform a rotation, you must specify two signers: an--old-signerand a--new-signer.Search for colors by name
masterYou can search for colors using their names in two ways. All name-based searches are case-insensitive and ignore non-alphanumeric characters (like spaces, parentheses, or hyphens) during the matching process.
- Current Language: Simply type the color name in the interface's current language (e.g.,
rojomatchesRojo,Rojo oscuro, etc.). - English Name: Prefix your query with
$to search using English color names, regardless of the current interface language (e.g.,$redmatchesRojo).
rojo $red $blue50- Current Language: Simply type the color name in the interface's current language (e.g.,
Search for colors by English name using '$'
masterEnable English color name search mode by prefixing your query with
$. This allows you to search for colors using English keywords even if the display language is not English.Examples:
$redmatches all colors containing "red" in their English name (e.g., "レッド", "オレンジレッド").$blue50matches colors like "ブルー (50)", "ブルー (500)", or "水色 (50)".
$redConnect to VSCode via LAN or ADB
masterVersion v6.0.1 added support for connecting to the VSCode plugin using two methods:
- Client mode: Via LAN.
- Server mode: Via LAN or ADB.
Search by color name (current language)
masterSearch using the color name in the current interface language. Non-alphabetic and non-numeric characters (spaces, parentheses, slashes, hyphens, etc.) are ignored during matching.
Examples:
красныйmatches "Красный", "Кирпичный красный", "Оранжево-красный".синий50matches "Синий (50)" or "Синий (500)" because symbols are ignored, but it will not match "Синий серый (50)" because "серый" is a non-ignorable character.
Use Shizuku for Script Execution in v6.7.0
masterVersion 6.7.0 introduces support for using the Shizuku permission to record and play back scripts. Note that playback smoothness may be partially reduced when using this method.