Android 11 无法remount问题

article/2025/9/25 12:31:32

问题描述: 在Android 11开发的时候,想快速调试把单独编译好的模块push 到 /system 目录下,结果发现remount failed

C:>adb root
restarting adbd as rootC:>adb remount
Skipping /system for remount
Skipping /vendor for remount
Skipping /product for remount
No partitions to remount
remount failed

强行push 也是显示错误

 Z:framework> adb push .\framework.jar /system/
adb: error: failed to copy '.\framework.jar' to '/system/framework.jar': 
remote couldn't create file: Read-only file system
.\framework.jar: 1 file pushed, 0 skipped. 43.0 MB/s (29967488 bytes in 0.665s)

remote couldn't create file: Read-only file system


MTK解释: 原因是android P版本后google启用avb(Android Verified Boot)2.0,verified boot and DM-verity默认启用策略发生了变化。
DM-Verity behavior changes from vboot1.0 to avb2.0.
On vboot1.0, dm-verity is turned off on eng build and is enabled on userdebug/user build.
DM-verity could be disabled with adb (not fastboot) on userdebug build without unlocking device first.
DM-Verity could not be disabled on user build.
On avb2.0, dm-verity behavior are the same on all build variants.
It’s turned on by default and could only be disabled after device is unlocked.
dm-verity disable flag is moved from system image dm-verity metadata(vboot1.0) to vbmeta image(avb2.0), and you have two ways to disable it: adb and fastboot.

解决办法:

  • Android P + kernel-4.4 or kernel-3.18
download preloader with verified boot disabled which location is the same as scatter file //preloader_<PROJECT>_SBOOT_DIS.bin
adb root
adb disable-verity
adb reboot
adb root
adb remount
  • Android P + kernel-4.9 or after
1. download preloader with verified boot disabled which location is the same as scatter file. //preloader_<PROJECT>_SBOOT_DIS.bin
2.boot to Home Screen
3.go to setting -> system -> Developer options -> OEM unlocking
4.adb reboot bootloader
5.fastboot flashing unlock
6.press volume up key
7.fastboot reboot
8.adb root
9.adb disable-verity
10.adb reboot
11.adb root
12.adb remount

注意事项:

  1. 第一步需要先确认out目录有没有编译出preloader_<PROJECT>_SBOOT_DIS.bin 这个文件,是和下载时选择的Android_scatter.txt同级目录
    如果没有这个文件,那么需要先在系统里找到对应BoardConfig.mk

    	ifneq ($(wildcard vendor/mediatek/internal/sboot_disable),)BOARD_BUILD_SBOOT_DIS:=yeselseBOARD_BUILD_SBOOT_DIS:=no  // 把这个no 改为yesendif
    

    把这个no 改为yes, 然后重编烧录开机,之后再进行后面的步骤。

  2. 第三步是要在开发者模式里找到OEM unlocking 并打开
    在这里插入图片描述

  3. 成功之后remount 是这样

    	Z:> adb remountUsing overlayfs for /systemUsing overlayfs for /vendorUsing overlayfs for /productNow reboot your device for settings to take effectremount succeeded
    

总结: android 真的好难呀!


http://chatgpt.dhexx.cn/article/qHOUfOHL.shtml

相关文章

Android P(9.0) userdebug 版本执行adb remount失败

当你执行 adb remount 时会发现提示 remount of the / superblock failed: Permission denied remount failed 原因是android P 版本后 google 启用 avb(Android Verified Boot)2.0&#xff0c;verified boot and DM-verity默认启用策略发生了变化。详情如下&#xff1a; DM-V…

remount

1. 需要获取手机的root权限&#xff0c;方法很多了&#xff0c;我用的是360一键Root&#xff0c;有时也用百度一键Root 2. 从其他手机拷贝sqlite3文件到PC&#xff0c;我是从模拟器copy出来的&#xff0c;为方便大家&#xff0c;附件就有&#xff0c;可以直接下载哈 3. 进入手机…

Typescript之接口(Interface)

我们可以通过Interface关键字来定义限制数据的类型。 1.给对象定义类型 /*** 定义一种类型&#xff0c;名称叫做PersonInfo&#xff0c;里面有三个属性* name 人物的名字,类型为string* age 人物的年龄&#xff0c;类型为number* say 人物的方法&#xff0c;类型为函数类型&a…

astype

anp.array([1.1,1.2]) print(a数据类型&#xff1a;,a.dtype) print(astype修改数据类型&#xff1a;,a.astype(float).dtype) print(原数据类型未改变,a.dtype)#正确操作 aa.astype(float32) print(修改类型后再次操作&#xff0c;类型改变&#xff1a;,a.dtype) ba.astype(in…

TypeScript中的interface和type区别

&#x1f482; 个人网站: 【紫陌】【笔记分享网】 &#x1f485; 想寻找共同学习交流、共同成长的伙伴&#xff0c; 请点击【前端学习交流群】 在 TypeScript中&#xff0c;type 和 interface有些相似&#xff0c;都可以给类型命名并通过该名字来引用表示的类型。不过它们之间使…

TypeScript接口——interface

目录 一、接口概述&#xff1a; 二、接口类型介绍&#xff1a; 1、属性接口&#xff1a; 2、 函数接口&#xff1a; 3、可索引接口&#xff1a; &#xff08;1&#xff09;可索引接口约束数组示例&#xff1a; &#xff08;2&#xff09; 可索引接口约束对象示例&#xf…

【TypeScript】接口类型 Interfaces 的使用理解

导语&#xff1a; 什么是 类型接口&#xff1f; 在面向对象语言中&#xff0c;接口&#xff08;Interfaces&#xff09;是一个很重要的概念&#xff0c;它是对行为的抽象&#xff0c;而具体如何行动需要由类&#xff08;classes&#xff09;去实现&#xff08;implement&#x…

type 与 interface 的区别,你真的懂了吗?

大厂技术 高级前端 Node进阶 点击上方 程序员成长指北&#xff0c;关注公众号 回复1&#xff0c;加入高级Node交流群 在写 ts 相关代码的过程中&#xff0c;总能看到 interface 和 type 的身影。它们的作用好像都一样的&#xff0c;相同的功能用哪一个都可以实现&#xff0c;…

自定义字体 Typeface ttf

一、简介 有时候界面在设计app时会使用一些比较美观的字体&#xff0c;在安卓中使用起来也并不困难&#xff0c;随着安卓SDK的更新&#xff0c;它的实现方式也有所不同&#xff0c;该文章来看看怎么实现自定义字体。 二、普通方法 设置字体TextView.setTypeface(Typeface) pub…

TypeScript - Interfaces(接口)

目录 1、接口介绍 1.1 接口示例 2、可选属性 3、只读属性 4、额外的属性检查 5、函数类型 6、可索引的类型 &#xff17;、类类型 &#xff17;.1 类静态部分和实例部分 &#xff18;、继承接口 &#xff19;、混合类型 1&#xff10;、接口继承类 1、接口介绍 Ty…

type 与 interface

type 与 interface 官方文档是这么说的&#xff1a; For the most part, you can choose based on personal preference, and TypeScript will tell you if it needs something to be the other kind of declaration. If you would like a heuristic, use interface until you…

TypeScript中type和interface区别

typescript中interface介绍&#xff1a;TypeScript 中的接口 interface_疆~的博客-CSDN博客通常使用接口&#xff08;Interface&#xff09;来定义对象的类型。https://blog.csdn.net/qq_40323256/article/details/128478749 type type关键字是声明类型别名的关键字。用来给一…

TypeScript中interface 与 type的区别,你真的懂吗?

在写 ts 相关代码的过程中&#xff0c;总能看到 interface 和 type 的身影。它们的作用好像都一样的&#xff0c;相同的功能用哪一个都可以实现&#xff0c;也都很好用&#xff0c;所以也很少去真正的理解它们之间到底有啥区别&#xff0c; 分别在什么场景下使用&#xff0c;将…

Android 设置字体的三种方法(TypeFace)

http://blog.csdn.net/legend12300/article/details/69875816 Android系统默认字体支持四种字体&#xff0c;分别为&#xff1a; noraml &#xff08;普通字体,系统默认使用的字体&#xff09;sans&#xff08;非衬线字体&#xff09;serif &#xff08;衬线字体&#xff09;…

Android 之 Paint API —— Typeface (字型)

本节带来Paint API系列的最后一个API&#xff0c;Typeface(字型)&#xff0c;由字义&#xff0c;我们大概可以猜到&#xff0c;这个 API是用来设置字体以及字体风格的&#xff0c;使用起来也非常的简单&#xff01;下面我们来学习下Typeface的一些相关 的用法&#xff01; 官方…

Pycham_python 安装 gherkin

1.File>Settings>Plusings> 在MarketPlace标签下&#xff0c;搜索gherkin&#xff0c;选择如下图所示&#xff0c;点击Install&#xff0c;安装成功后重启pycharm即可 2&#xff0c;打开feature文件&#xff0c;就会有格式显示了 转载于:https://www.cnblogs.com/aide…

学Selenium自动化需要知道的之Python测试框架

根据StackoverFlow网站的开发者调查&#xff0c;Python是2019年增长最快的编程语言。在整体排名中&#xff0c;它甚至超越了Java&#xff0c;排在第二位&#xff0c;成为最受喜爱的编程语言之一。 Python流行的几个原因之一是对测试自动化框架的广泛支持。大多数流行的Python框…

机器学习框架Chainer学习

chainer优势——边定义边运行 当下已有的深度学习框架使用的是“定义后运行”机制。即意味着&#xff0c;首先定义并且固化一个网络&#xff0c;再周而复始地馈入小批量数据进行训练。由于网络是在任何前向、反向计算前静态定义的&#xff0c;所有的逻辑作为数据必须事先嵌入网…

Jenkins - Hello World

开始 Jenkins 的第一行代码 无论学哪种语言&#xff0c;都是从 hello world 开始&#xff0c;因为这个学会了&#xff0c;就说明你已经从入门到精通了。 让我们来看看 Jenkins 的 hello world 吧 0. 登录 Jenkins 1. 新建 item 2. 创建一个 Freestyle project 3. 增加执行命令…