【问题标题】:adb remount fails - mount: 'system' not in /proc/mountsadb remount 失败 - mount: 'system' 不在 /proc/mounts
【发布时间】:2019-07-28 13:43:47
【问题描述】:

我尝试了 stackoverflow 和在线提供的所有命令和建议,但没有奏效

还有很多,但对我没有用

我遇到以下错误 - 以下命令均无效。

$adb root
$adb disable-verity

对于

$adb remount
remount of / failed: Permission denied
remount failed

然后我尝试了不同的命令,例如

$ adb shell mount -o rw,remount /system
mount: '/system' not in /proc/mounts

$ adb shell mount -o rw,remount /
'/dev/root' is read-only


$ adb shell  mount -o rw,remount -t /dev/block/stl12 system
mount: 'system' not in /proc/mounts

$ adb shell "su 0 mount -o rw,remount /system"
mount: '/system' not in /proc/mounts

$ adb shell
$ su
# mount -o rw,remount /system

 mount: '/system' not in /proc/mounts

【问题讨论】:

  • 这可能对你有帮助,因为我为同样的问题工作https://github.com/d4rken/sdmaid-public/issues/2110#issuecomment-440325101

标签: android adb mount


【解决方案1】:

我遇到了同样的问题。解决方案是挂载根目录 (/)。之后,您可以写入 /system。

mount -o rw,remount /

不要忘记将状态重置为“ro”。

mount -o ro,remount /

【讨论】:

  • 可悲的是,当我运行此命令时,我收到了 '/dev/block/dm-4' is read-only
  • 它不适用于以只读方式安装/system 的新三星 T870 型号。
  • 眼泪。 mount: '/dev/block/dm-0' not user mountable in fstab
  • 没有结果
  • 为我工作:)
【解决方案2】:
> adb root
> adb shell avbctl disable-verification
Successfully disabled verification. Reboot the device for changes to take effect.
> adb disable-verity
using overlayfs
Successfully disabled verity
Now reboot your device for settings to take effect
> adb reboot
> adb root && adb remount
remount succeeded
> adb push ScreenCap.apk /system/app/
ScreenCap.apk: 1 file pushed. 33.1 MB/s (1640812 bytes in 0.047s)
> adb reboot

【讨论】:

  • 在第二个命令中,我得到“/system/bin/sh: avbctl: not found”
  • /system/bin/sh: avbctl: inaccessible or not found
  • 命令 adb shell avbctl disable-verification 在 2020 年为我工作,但现在我得到与上面相同的错误:“/system/bin/sh: avbctl: inaccessible or not found”。我不知道为什么。
  • 可能的解决方案是选择一个不属于 Play 商店的模拟器图像(在 Android Studio 中没有 AVD 管理器上的那个图标)。并带有“Q”安卓版本。在这里查看:stackoverflow.com/a/45668555/7191548
  • 最后我找到了这个有效的答案。非常感谢!
【解决方案3】:

(Android Q 模拟器solution)

> emulator -avd Pixel_3a_XL_API_30 -writable-system
> adb shell avbctl disable-verification
> adb disable-verity
> adb root
> adb remount
> adb shell "su 0 mount -o rw,remount /system"

【讨论】:

  • 这行得通,谢谢!用 android 10 模拟器测试
  • verity cannot be disabled/enabled - USER build。有什么想法吗?
  • @Egret,你在什么类型的设备上试用它? (adb disable-verity 问题对吗?尝试跳过它可能会起作用)
【解决方案4】:

如果您收到 /system not in /proc/mounts 错误,则您的设备系统分区未安装任何目录。写入系统分区受到限制。

如果您使用的是模拟器,请下载之前版本的系统镜像。

目前,Android Q 不支持写入系统分区,因此请改用 android pie。

【讨论】:

  • 这个答案基本上重复了第一个。两者的主要问题是降低 API 级别不是面向未来的解决方案。此外,请提供一些说明 Android Q“不支持”这样做的来源。
  • @Magudesh,哪里说过 Android Q 不支持写入 root 设备上的系统分区?
  • @avelyne 在设备中支持 android Q,但在模拟器中不支持。如果 Android R 发布,将启用 android Q 的 root。
【解决方案5】:

我在使用运行 Android OS 8.1 的瑞芯微平板设备时遇到了这个问题。我找到了一种将 /system 重新挂载到 rw 的方法,步骤如下:

  1. adb 外壳
  2. 安装 | grep 系统
  3. 在第 3 步之后,您将看到 cmd 打印出以下内容:

    /dev/block/mmcblk1p11 on /system type ext4 (ro,dirsync,seclabel,relatime,data=ordered,inod e_readahead_blks=8)

    (类型和路径可能因您的设备而异)

  4. 现在使用命令:

    busybox mount -o remount,rw -t /system

在我的例子中,ext4/dev/block/mmcblk1p11

希望这可以帮助别人!

【讨论】:

    【解决方案6】:

    我在使用 Android API 28 时遇到了这个问题。

    解决方法是使用较低版本的 Android API 级别 24。之后一切正常。

    $ adb shell
    generic_x86:/ # mount -o rw,remount /system
    generic_x86:/ # exit
    [~]
    $ adb push /etc/hosts /system/etc/hosts
    /etc/hosts: 1 file pushed. 2.2 MB/s (7458 bytes in 0.003s)
    

    【讨论】:

      猜你喜欢
      • 2021-04-14
      • 2020-02-06
      • 2021-04-04
      • 1970-01-01
      • 2013-08-09
      • 1970-01-01
      • 2011-07-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多