2017-08-03 148 views
1

我想編輯/ system/etc/hosts int我的小米5(rooted)。我第一次拉/syste/etc/hosts並做了一些修改,我想push它,然後我遇到了這個問題Android:編輯/系統/ etc/host文件

adb push hosts /system/etc/hosts 
failed to copy 'hosts' to '/system/etc/hosts': couldn't create file: 
Read-only file system 

我檢查this,但是這並沒有爲我工作了。

adb root 
adbd is already running as root 

adb remount 
remount of /system failed: Read-only file system 
remount failed 

我試過this,也沒有工作。

它表明:

gemini:/ # mount -o rw,remount /system 
'/dev/block/dm-0' is read-only 
gemini:/ # mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system 
mount: '/system' not in /proc/mounts 

誰能告訴我一條生路,任何建議表示讚賞。

回答

1

好的,我終於在MIUI論壇上找到了答案。

What I found,如果你能讀懂中文,直接打開它;如果你不能,我會解釋原因。

我無法編輯hosts文件,因爲我沒有解鎖system。 MIUI有一些保護機制可以防止用戶在root後刪除重要文件。

因此,請下載this,確保您的手機處於Fastboot模式。將它連接到您的PC,然後打開一個終端,您可以將您剛剛下載的adb文件。

adb root 

adb disable-verity 

這就行了!