Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

针对使用 Island、Shelter 等应用创建的“多用户”如何安装模块的一些说明 #20

Closed
wuhgit opened this issue Feb 23, 2023 · 0 comments

Comments

@wuhgit
Copy link
Owner

wuhgit commented Feb 23, 2023

有别于 Android 系统自带的“多用户”功能 ,如果你是通过 IslandShelter 等应用创建的多用户,在安装和卸载模块时会出现问题,这里需要做一些手动操作。

首先通过 adb 连接手机并进入 adb shell

查看手机中存在的用户 ID:

pm list users

主用户的 ID 为 0,而子用户的 ID 视具体情况不一,这里假设得到的子用户 ID 为 10

获取 root 权限:

su

接着为模块创建用户标识,下面的命令视你的需求而定

  • 针对 Gboard

    mkdir -p /data/adb/wuhgit/CustomPinyinDictionary/gboard/
    touch /data/adb/wuhgit/CustomPinyinDictionary/gboard/10
    
  • 针对 Fcitx

    mkdir -p /data/adb/wuhgit/CustomPinyinDictionary/fcitx/
    touch /data/adb/wuhgit/CustomPinyinDictionary/fcitx/10
    

随后执行模块中的安装。

如果子用户不想再使用模块数据,删除刚刚创建的空白文件,执行模块中的卸载即可。

请注意,由于无法正确识别这类多用户,在模块卸载子用户数据时也会同时卸载主用户的相关数据,如果这不是你的预期,请在卸载后重新对主用户进行安装。

@wuhgit wuhgit pinned this issue Feb 23, 2023
@wuhgit wuhgit closed this as completed Feb 23, 2023
Repository owner locked as resolved and limited conversation to collaborators Feb 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant