Skip to content

Releases: GXBF/NanoTurtle-ToolBox

0.1.0 Release

Choose a tag to compare

@GXBF GXBF released this 28 May 11:20

见下

-2024-5-28: 0.1.0发布;增加了三个有用的Activity,本来是27号发布的0.0.6,但是因为Git的原因导致代码一朝回到解放前😭。

原理见下

buttonllq.setOnClickListener{ // Shell命令来启动Activity,但通常不会工作,因为需要root权限 val command = "am start -n com.xtc.setting/com.xtc.setting.module.secretcode.view.activity.WebBrowserActivity" try { val process = Runtime.getRuntime().exec("su -c $command") // 'su' 通常用于root权限 val inputStream = process.inputStream val reader = BufferedReader(InputStreamReader(inputStream)) var line: String? //while ((line = reader.readLine()) != null) { // 输出命令执行的结果,通常用于调试 //Log.d("ShellCommand", line) //} reader.close() } catch (e: IOException) { // 处理IO异常 e.printStackTrace() Toast.makeText(requireContext(), "执行Shell命令出错", Toast.LENGTH_SHORT).show() } }

0.0.5 Release

Choose a tag to compare

@GXBF GXBF released this 26 May 12:18

换了个新库

版本亮点

2024-5-26:0.0.5发布;改用shell命令打开不是公开的Activity