V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
chouxw112233
V2EX  ›  Android

如何确定自己的安卓机有没有 root?

  •  
  •   chouxw112233 · 14 天前 · 1530 次点击

    已经解了 bl 锁。 我刷了 magisk ,也 fastboot boot magisk_boot.img 重刷了 boot.img ,能够在 magisk 上管理 root 权限

    >adb shell
    wayne:/ $ id
    uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid),3012(readtracefs) context=u:r:shell:s0
    wayne:/ $ su   # 这一步会在手机上提示是否允许 root
    wayne:/ # id    # 如果我的理解没问题,我可以切换到 root 用户,说明我应该有 root 权限
    uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0
    

    但是我始终无法把根目录挂载成 rw

    wayne:/ # mount | grep "/ "
    /dev/block/dm-0 on / type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)
    wayne:/ #
    wayne:/ # mount -o rw,remount,rw /
    wayne:/ # mount | grep "/ "
    /dev/block/dm-0 on / type erofs (ro,seclabel,relatime,user_xattr,acl,cache_strategy=readaround)
    wayne:/ #
    

    用 MT 文件管理器(打开时会提示 root ),在根目录上创建一个文件夹,也提示挂载读写失败 似乎我的 root 是个假 root

    6 条回复    2024-05-23 22:13:15 +08:00
    ysc3839
        1
    ysc3839  
       14 天前   ❤️ 2
    root 仅代表能得到 UID=0 的权限,不代表分区可写。EROFS 更是不支持写入,要修改只能重新生成镜像整个替换。
    sir283
        2
    sir283  
       14 天前
    出厂安卓 10 以上,分区全部都是 read-only 了,要读写,只能刷 overlay 模块或者重新打包为 ext2/4 分区格式,并增加 rw 权限刷入。
    saucer
        3
    saucer  
       13 天前
    tmpfs 挂载
    12101111
        4
    12101111  
       12 天前
    erofs 本身就是只读 fs ,不可能挂载成读写的。
    magisk 模块就是用来改 rootfs 的,原理是 overlayfs 。
    rev1si0n
        5
    rev1si0n  
       10 天前   ❤️ 1
    正常安卓设备的根系统目录是无法设置读写的,你只能改写下面的 vendor etc system 目录,我不知道你想干啥,一般做这个都是装证书,如果你只是想装证书,不妨看看 https://github.com/rev1si0n/lamda
    chouxw112233
        6
    chouxw112233  
    OP
       9 天前
    @rev1si0n 就是想装证书😞
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2487 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 08:15 · PVG 16:15 · LAX 01:15 · JFK 04:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.