Getting Installation aborted (Status 7) ApplyParsePerms: lsetfilecon of /syst...【转】

OTA升级失败:原文http://en.miui.com/thread-112197-1-1.html

Do you get this "Status 7" error in Recovery Mode? If so, that means that the ROM you are trying to flash, i.e. "install" on your device doesn't belong to your device. It's a failsafe built into CWM, TWRP etc. to prevent installation of wrong ROMS into the wrong devices. 

Status 7 error is caused while the ROM’s updater script file checks to see if the phone model of your phone is compatible with the ROM you are installing, called “asserts”. 

This is mainly caused due to an error by the developer of the ROM in the updater script. You can fix the issue by installing TWRP recovery but if you need to restore your CWM backups later down the line, you will have to re-install CWM recovery, causing a big hassle.

If you simply don’t want to change your recovery or you still get Status 7 error after changing recovery, you can simply edit the updater script by yourself to get rid of the asserts.

Here are the following steps:
1. Copy the ROM zip file to your computer and extract it using 7zip, WinRAR or any other unzipping software.

2. Once unzipped, browse to the META-INF/com/google/android directory. You will find two files called “update-binary” and “updater-script”.

3. Rename “updater-script” to “updater-script.txt” and open with either Notepad or Notepad++. (I found that using Notepad++ is much easier to edit the file).

4. Get rid of the line starting with “assert” to next semi-colon. Usually this is the first line or one of the first lines at the top of the text file. Just delete them.

5. Save the file.

6. Rename “updater-script.txt” back to “updater-script” and rezip all the files that you unzipped earlier.

7. Copy the edited ROM zip file to your phone and flash. Hopefully, the problem should be solved now.

AN IMPORTANT POINT TO NOTE - While this process has worked countless times for me, a few times I came close to bricking my phone. So unless you really have no choice, don't install the conflicting ROM, and instead download a stable ROM and install that instead.

(I found this solution a few years back while trying to modify MIUI for my Note 2. I ended up with a STATUS 7 error and this solved the issue. The next time I tried again, my Note 2 got almost broke. Thus, in my case it was a 50% - 50% chance, so its up to you what you want to do).

Hope I helped :)
原文地址:https://www.cnblogs.com/zzb-Dream-90Time/p/7308074.html