Android 将 build.prop 推送到 /system/build.prop

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24887073/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:53:52  来源:igfitidea点击:

Push build.prop to /system/build.prop

androidbuildadb

提问by Device

I have edited build.prop and now my phone cannot boot. I have pulled build.prop using adb and now I have the correct build.prop file

我已经编辑了 build.prop,现在我的手机无法启动。我已经使用 adb 拉了 build.prop,现在我有了正确的 build.prop 文件

What I need is to push build.prop using adb.

我需要的是使用 adb 推送 build.prop。

First try: Read-only file system

第一次尝试:只读文件系统

when I mount system:

当我挂载系统时:

Second try: Permision Denied

第二次尝试:权限被拒绝

enter image description here

在此处输入图片说明

what can I do?

我能做什么?

回答by Simo Kinnunen

Probably because adb pushuses the shelluser, which does not have write permissions to /system/build.prop. You can, however, push the file to a different location first (e.g. /data/local/tmp/) and then move the file to the right place with the root user (after mounting).

可能是因为adb push使用了shell没有写入权限的用户/system/build.prop。但是,您可以先将文件推送到不同的位置(例如/data/local/tmp/),然后使用 root 用户将文件移动到正确的位置(安装后)。

回答by Bijan

Here are the commands you need to use:

以下是您需要使用的命令:

adb push <Path to build.prop>/build.prop /data/local/tmp/
adb shell
su
mount -o rw,remount /system
adb push /data/local/tmp/build.prop /system/build.prop

回答by Device

I tried the following code... it works but i do not know if is the solution because my phone still cannot boot.

我尝试了以下代码...它有效,但我不知道是否是解决方案,因为我的手机仍然无法启动。

adb shell
su
mount -o remount,rw /dev/block/stl9 /system
chmod 777 /system
exit
exit

adb push build.prop /system

please let me know if the following code is correct or not...

请让我知道以下代码是否正确...

回答by Michael70

this works for me for Galaxy S6:

这对我适用于 Galaxy S6:

cd C:\Users[here the userprofilename]\AppData\Local\Android\sdk\platform-tools>

cd C:\Users[这里是用户配置文件名]\AppData\Local\Android\sdk\platform-tools>

1.) adb pull /system/build.prop

1.) adb pull /system/build.prop

- this download the file from the phone in the adb folder
- edit the file, then load up to the phone:

2.) adb root

2.) 亚行根

3.) adb root remount rw

3.) adb root 重新挂载 rw

4.) adb root chmod 664 /system/build.prop

4.) adb root chmod 664 /system/build.prop

5.) adb root push ./build.prop /system/build.prop

5.) adb root push ./build.prop /system/build.prop

回答by olealgo

adb remount
adb push build.prop /system/
adb shell chmod 644 /system/build.prop
adb reboot

回答by Salman Hasan

This is what worked for me:

这对我有用:

  1. adb push \build.prop /data/local/tmp/

  2. adb shell

  3. su

  4. rm /system/build.prop

  5. cp /data/local/tmp/build.prop /system

  6. exit

  7. exit

  8. adb reboot

  1. adb push \build.prop /data/local/tmp/

  2. 亚行外壳

  3. rm /system/build.prop

  4. cp /data/local/tmp/build.prop /system

  5. 出口

  6. 出口

  7. 亚行重启

Hope it helps.

希望能帮助到你。

回答by Banquito

adb shell
 su
 mount -o remount,rw /dev/block/st19 /system
 chmod 777 /system
 exit 
exit
push build.prop /system
adb shell
 su
 chmod 644 /system/build.prop
 exit
exit
reboot

that worked for me :)

这对我有用:)

回答by natana

Ok lets do it. i found a simple way to by pass root permissions.

好的,让我们一起做。我找到了一种绕过root权限的简单方法。

If u have a CWM recovery... enter on it and on "mounts and storage" enter and mounts /system/ them your pc will recognize it on adb push and send it to system. Use your command codes above you write them voilá... your tablet/phone will boot again. if you have a backup of original build.prop

如果你有一个 CWM 恢复......输入它并在“安装和存储”上输入并安装 /system/ 他们你的电脑将在 adb push 上识别它并将其发送到系统。使用上面的命令代码编写它们瞧...您的平板电脑/手机将再次启动。如果您有原始 build.prop 的备份