sealdice / sealdice-android Goto Github PK
View Code? Open in Web Editor NEW海豹核心的安卓端实现
License: MIT License
海豹核心的安卓端实现
License: MIT License
以下内容是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 会使你的应用程序在状态栏中显示一个持续运行的通知,这可能会对用户造成一定的干扰,因此需要谨慎使用。
绑定角色卡时,pc del留空默认用玩家名检索角色,如果成功检索到未绑定的角色卡,会:
◆删除对应角色
◆清除群内空白卡
◆解除当前群绑定状态,启用群内空白卡
◇原先绑定角色会变为★(绑定信息有当前群,但当前群却不是绑定状态)
——————————————
出现◇的情况后,如果再去绑定另外一张角色卡。
会出现[错误★显示的角色卡]无法用pc untagall解绑,同时也无法用pc del删除的情况。
——————————————
【复现步骤】
1.准备三张未绑定的角色卡
2.pc tag绑定第一张
3.nn 更名为第二张
4.发送[pc del]
5.pc tag绑定第三张
此时第一张会变成[错误显示★的角色卡],无法用pc untagall解绑,也无法用pc del删除
前置:耗电设置为无限制,自启动打开,启动策略:唤醒锁和悬浮窗,后台加锁。
使用手机:小米11Ultra,MIUI14
在不小心后台划掉对应卡片时,海豹核心会掉后台,且无法在应用内重新启动之。
不使用安卓系统管理的前提下,无法在核心出现问题时,重启核心。
Unfortunately 这种情况下点击日志是空的,里面什么都没有。
No response
v0.5.7-rc
1.2.7-dev v20230822
小米11Ultra:
是否ROOT:是
海豹链接方式:分离链接CQHTTP,其中CQHTTP来源为使用CHROOT容器启动在手机上的go-cqhttp。
系统版本:安卓13,MIUI14,开发版
CPU架构:ARM64
(火龙888真烫手)
ANDROID_PAD
感觉说完了(悲
No response
No response
No response
新版本检测:
https://get.sealdice.com/seal/version/android
客户端下载:
https://d.catlevel.com/seal/android/latest
因为之前域名被反诈的原因,换了域名并屏蔽了所有dice字样,看看会不会好些
报错:
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
0.6.0
1.4.5
红米12t hyperOS
No response
No response
手机骰 $tHour 显示现时间显示到其他时区了,咨询群友后得知pc骰无误,但是手机骰显示时间比现时间晚8小时。
.text {%$tHour%}
(测试时间:15:00,UTC+8:00)
15
7
No response
v0.4.9-rc
1.2.6 v20230410
华为nova 7 5G
No response
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.