Mirai is a high-efficiency robot library that runs on all platforms and provides support for the QQ Android protocol.
Icons and images were drawn by artist DazeCake
MiraiAndroid is a QQ robot Android front-end program based on Mirai. It supports a variety of script interfaces and is lightweight, simple, easy to use, and efficient. It relies on mirai-console.
Compared with using Termux
or Linux Deploy
to deploy and run Mirai, MiraiAndroid provides better performance, less resource usage, and a more convenient operation interface.
You can find the latest build version in appcenter.
Copyright (C) 2019-2020 Mamoe Technologies and contributors.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
MiraiAndroid
is open source using the AGPLv3
protocol. For the healthy development of the entire community, we strongly recommend that you do the following:
httpapi
or cross-process technology) to mirai
's software is open source using AGPLv3
The script system is currently still under development. The lua or js script system of version 2.x is being migrated, please wait for subsequent updates.
For plug-ins in apk (Android software package) format, please install them directly into the system. For development instructions for such plug-ins, please see here
For plug-ins in jar format, you have two ways to install the plug-in:
This is the easiest way. Switch the app to plug-in management and click on the upper right corner to select it. You can also use the system file selector to directly open the jar file.
For plug-ins that have been converted by d8, please import them directly
If you cannot select a file , use a third-party file picker (e.g. Mix)
Please follow the steps below
d8
compiler The d8 tool has been included in the new version of Android sdk
, and it is in the folder of the corresponding version in build-tools
. On Windows platform it is a bat file
Open the terminal and compile using the following command
d8.bat --output 输出文件.jar 源文件
The output file extension must be jar or zip
Use compression software to open the source jar file, and copy plugin.yml
, META-INF
and other resource files (except for other files stored in the class folder) to the new jar file.
Copy the new jar file from the previous step to /sdcard/Android/data/io.github.mzdluo123.mirai.android/files/plugins/
on your phone
You can use the plug-in after restarting. Of course, some plug-ins may have compatibility issues.
Q: Background running is killed by the system
A: Please manually add the application to the system background whitelist
Q: The app crashes or reports an error in the background
A: If the background error is reported, it is usually a plug-in or mirai-core problem. If it is a mirai-core problem, please find the share log in the menu and go to the group or open issue feedback. If there is a plug-in problem, please contact the corresponding developer; if it is The application crashes, please restart and submit the log to us according to the above method
The following plug-ins were tested by group friends and no problems were found. You can download them in the group, or go to the plug-in center to manually download the jvm version and import it.
Please try other plug-ins yourself; in addition, if your plug-in uses some APIs that are not supported by Android (such as BufferedImage), then the functions using this API will definitely not work properly.
MiraiAndroid can only work on Android8.0 and above systems because the upstream MiaiCore uses a lot of Java8 features
Among the currently tested versions, Android10 has no problems, but Android8.1 cannot compile plug-ins on the mobile terminal.
You must use automatic login and turn it on in settings to use this feature
You can send broadcasts to quickly push information to specified groups or contacts. Here is the URI format of data.
ma://sendGroupMsg?msg=消息&id=群号
ma://sendFriendMsg?msg=消息&id=账号
ma://sendFriendMsg?msg=消息&id=账号&at=要at的人
sendBroadcast( Intent ( " io.github.mzdluo123.mirai.android.PushMsg " ). apply {
data = Uri .parse( " ma://sendGroupMsg?msg=HelloWorld&id=655057127 " )
})
Here is an example of auto.js
app . sendBroadcast ( {
action : "io.github.mzdluo123.mirai.android.PushMsg" ,
data : "ma://sendGroupMsg?msg=来自autojs的消息&id=655057127"
} )
The following is an example of tasker
ma (2)
A1 : 发送意图 [ 操作:io.github.mzdluo123.mirai.android.PushMsg 类别:None Mime类型: 数据:ma://sendGroupMsg?msg=来自tasker的消息&id=655057127 额外: 额外: 额外: 包: 类: 目标:Broadcast Receiver ]