GithubHelp home page GithubHelp logo

sealdice / sealdice-android Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 3.0 1.69 MB

海豹核心的安卓端实现

License: MIT License

Kotlin 76.02% Java 18.26% Makefile 0.10% C 5.62%
android sealdice trpg-tool

sealdice-android's Introduction

SealDice

简介

海豹骰工程代码合并仓库,用于实现全平台自动出包。

使用 git submodule 机制整合以下四个仓库的代码

克隆该项目时需要使用 git clone --recursive 命令以将子模块代码一并拉取。

细节

自动构建

工作流为 auto-build.yml,相关 jobs 功能:

  • commit-num-check:用于检查 24 小时内是否有新 commit,没有则每天自动触发的构建不打包;
  • resources-download:下载资源文件,牌堆、helpdoc、gocghttp 等;
  • gocqhttp-build,gocqhttp-android-build:自动编译所需平台的 gocqhttp,android 端需要使用 NDK;
  • ui-build:ui自动构建;
  • core-build,core-darwin-build,core-android-build:core 的自动构建,分别为 windows&linux macos 和 android;
  • pc-pack:windows & linux & macos 三端的打包,会组装 helpdoc、gocqhttp 等资源文件;
  • android-build:android apk 的打包,目前只打包 debug 版本,也会组装资源文件;
  • clear-temp-artifact:清理产物,保证 artifacts 整洁。

关于 issue 和 pull request

你可以通过 fork 本项目并提交 pull request 的形式贡献代码

sealdice-android's People

Contributors

96368a avatar dependabot[bot] avatar paiennate avatar szzrain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sealdice-android's Issues

使用 Foreground Service 处理锁屏存活(在状态栏卡一个条),点开见细节

以下内容是chatgpt给的,仅供参考:

在 Android 中,可以通过使用 Service 来实现在后台运行应用程序的功能。Service 是一个没有用户界面的组件,可以在后台执行长时间运行的操作。

为了在锁屏时仍然可以保持网络连接,可以使用 Foreground Service。Foreground Service 是一种特殊类型的 Service,它会在状态栏中显示一个持续运行的通知,以提示用户该应用程序正在运行。使用 Foreground Service 可以让应用程序在后台运行,即使用户锁定了屏幕。

以下是实现 Foreground Service 的一些基本步骤:

创建一个 Service 类,继承自 Service 类。在这个类中实现应用程序需要在后台运行的功能。

Copy code
public class MyService extends Service {
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        // 在这里实现应用程序需要在后台运行的功能
        return START_STICKY;
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
}

在 onStartCommand 方法中启动一个 Notification,用于将 Service 设置为 Foreground Service。

public class MyService extends Service {
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        // 在这里实现应用程序需要在后台运行的功能

        // 创建一个 Notification
        Notification notification = new Notification.Builder(this)
            .setContentTitle("My App is running")
            .setSmallIcon(R.drawable.icon)
            .build();

        // 将 Service 设置为 Foreground Service,并显示 Notification
        startForeground(1, notification);

        return START_STICKY;
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }
}

在 AndroidManifest.xml 文件中声明 Service。

<service android:name=".MyService" />

通过这些步骤,可以创建一个 Foreground Service,并在后台运行应用程序,即使用户锁定了屏幕。注意,使用 Foreground Service 会使你的应用程序在状态栏中显示一个持续运行的通知,这可能会对用户造成一定的干扰,因此需要谨慎使用。

[Bug]:手机骰 $tHour 显示现时间错误

在提问之前...

  • 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决
  • 我填写了简短且清晰明确的标题,以便开发者在翻阅 issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
  • 我已查看master branch或最新测试版的更新内容,并未提及该 bug 已被修复的情况
  • 已有issue中并没有看见其他人与我反馈相同的问题

问题描述

手机骰 $tHour 显示现时间显示到其他时区了,咨询群友后得知pc骰无误,但是手机骰显示时间比现时间晚8小时。

如何复现

.text {%$tHour%}
(测试时间:15:00,UTC+8:00)

你期望发生的

15

实际上发生的

7

日志文件

0C430F3FC8C0F9231CE02E73B2E74B40

截图

No response

App版本

v0.4.9-rc

海豹核心版本

1.2.6 v20230410

设备信息

华为nova 7 5G

帐号类型

QQ

使用协议

No response

附加内容

No response

【bug反馈】可能是pcdel指令执行逻辑导致的

绑定角色卡时,pc del留空默认用玩家名检索角色,如果成功检索到未绑定的角色卡,会:
◆删除对应角色
◆清除群内空白卡
◆解除当前群绑定状态,启用群内空白卡
◇原先绑定角色会变为★(绑定信息有当前群,但当前群却不是绑定状态)
——————————————
出现◇的情况后,如果再去绑定另外一张角色卡。
会出现[错误★显示的角色卡]无法用pc untagall解绑,同时也无法用pc del删除的情况。
——————————————
【复现步骤】
1.准备三张未绑定的角色卡
2.pc tag绑定第一张
3.nn 更名为第二张
4.发送[pc del]
5.pc tag绑定第三张

此时第一张会变成[错误显示★的角色卡],无法用pc untagall解绑,也无法用pc del删除

[Bug]: MIUI系统下,杀死后台后再次进入后台的行为异常

在提问之前...

  • 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决
  • 我填写了简短且清晰明确的标题,以便开发者在翻阅 issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
  • 我已查看master branch或最新测试版的更新内容,并未提及该 bug 已被修复的情况
  • 已有issue中并没有看见其他人与我反馈相同的问题

问题描述

前置:耗电设置为无限制,自启动打开,启动策略:唤醒锁和悬浮窗,后台加锁。
使用手机:小米11Ultra,MIUI14
在不小心后台划掉对应卡片时,海豹核心会掉后台,且无法在应用内重新启动之。

如何复现

  1. 正常启动软件
  2. 进入后台并划掉软件
  3. 再次进入,软件提示“链接后台成功”,实际并没有成功(使用Scene查看进程,没有sealdice-core进程)(此时海豹理所当然的不会蛄蛹)
  4. 尝试点击“停止核心",转圈数秒后软件关闭,再次进入会重新提示”链接后台成功,同样的,没有sealdice-core进程。(此时海豹理所当然的还是不会蛄蛹)
  5. 当且仅当进入应用管理-强制终止应用-重新打开后,行为逻辑恢复正常。

你期望发生的

  1. 错误杀后台不可避免,但应当提供应用内重启核心的方式,即停止核心后,再次启动应能重新启动核心。或提供强制重启核心的机制。
  2. 正确检查后台核心是否存活。

实际上发生的

不使用安卓系统管理的前提下,无法在核心出现问题时,重启核心。

日志文件

Unfortunately 这种情况下点击日志是空的,里面什么都没有。

截图

No response

App版本

v0.5.7-rc

海豹核心版本

1.2.7-dev v20230822

设备信息

小米11Ultra:
是否ROOT:是
海豹链接方式:分离链接CQHTTP,其中CQHTTP来源为使用CHROOT容器启动在手机上的go-cqhttp。
系统版本:安卓13,MIUI14,开发版
CPU架构:ARM64
(火龙888真烫手)

帐号类型

QQ

使用协议

ANDROID_PAD

附加内容

感觉说完了(悲

同步内外数据文件夹

在提问之前...

  • 我填写了简短且清晰明确的标题,以便开发者在翻阅 issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
  • 我基本确定这是一个新功能/建议,而不是遇到了 bug(不确定的话请附上日志)

说说你遇到的问题?

No response

有什么好的想法?

No response

其他内容

No response

UI界面无法上传.deck牌堆/上传没反应

有群友表示.deck牌堆上传后没有反应,日志也无报错内容。后自己用手机海豹进行尝试,发现在自己手机上干脆无法选择.deck牌堆。
Screenshot_20230407_145332_Files
如图,显示为灰色不可选中状态。其他.json文件正常。

[Bug]: 一种部分手机上的内置客户端 sched_setaffinity 权限问题,以及一种可能的方案

在提问之前...

  • 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决
  • 我填写了简短且清晰明确的标题,以便开发者在翻阅 issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
  • 我已查看master branch或最新测试版的更新内容,并未提及该 bug 已被修复的情况
  • 已有issue中并没有看见其他人与我反馈相同的问题

问题描述

报错:

7972  <... rt_sigprocmask resumed>NULL, 8) = 0
7974  <... sched_getaffinity resumed>[0 1 2 3 4 5 6 7]) = 8
7972  futex(0x7fe95c02d4, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
7974  sched_setaffinity(0, 128, [0 1 2 3 4 5 6 7]) = -1 EPERM (Operation not permitted)
7974  futex(0x7fe95c02d4, FUTEX_WAKE_PRIVATE, 1) = 1
7972  <... futex resumed>)              = 0
7974  rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2],  <unfinished ...>
7972  rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2],  <unfinished ...>
7974  <... rt_sigprocmask resumed>[RTMIN], 8) = 0
7972  <... rt_sigprocmask resumed>[RTMIN], 8) = 0
7974  rt_sigprocmask(SIG_BLOCK, ~[],  <unfinished ...>
7972  futex(0x3f000c2e58, FUTEX_WAIT, 7974, NULL <unfinished ...>
7974  <... rt_sigprocmask resumed>~[KILL STOP RT_1 RT_2], 8) = 0
7974  munmap(0x7054a88000, 1585152)     = 0
7974  exit(0)                           = ?
7974  +++ exited with 0 +++
7972  <... futex resumed>)              = 0
7972  rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
7972  writev(2, [{iov_base="", iov_len=0}, {iov_base="Failed to create CoreCLR, HRESULT: 0x8007054F", iov_len=45}], 2) = 45
7972  writev(2, [{iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 2) = 1

sched_setaffinity 函数用于设置程序使用的cpu核心,但是只有在root下可用。
但是容器的root权限关闭了之后,仍然出这个问题。

一种方案:
使用 LD_PRELOAD 功能,重写 sched_setaffinity 为空函数

参考:
https://github.com/termux/termux-exec

如何复现

添加内置客户端即可复现

你期望发生的

正常运行

实际上发生的

Failed to create CoreCLR, HRESULT: 0x8007054F

日志文件

截图

No response

App版本

0.6.0

海豹核心版本

1.4.5

设备信息

红米12t hyperOS

帐号类型

QQ

使用协议

No response

附加内容

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.