Cwm no file contexts what does it mean. "Installation aborted" error when flashing firmware: what to do, solutions and possible causes. Installation Aborted during firmware: what to do
Error 7 when flashing firmware via recovery (TWRP, CWM Recovery). Decided to install custom firmware on your Android smartphone or tablet, entered custom TWRP Recovery, but received error 7 during installation? Don't despair; fixing this problem is quite simple.
Many beginners may be discouraged by any steps in installing custom firmware, especially if this procedure is performed for the first time. One of the serious obstacles during firmware installation can be error 7 in TWRP Recovery. The seriousness of this error is that it does not allow you to install custom firmware on the device at all and all your preparation will go down the drain. But it turns out that this error 7 in recovery is quite easy to fix without resorting to lengthy actions! Today’s article is about how to get rid of this problem!
Where did error 7 come from?
This error can occur in two cases:
- If you try to install firmware from a device other than your own, this often occurs when under one name of smartphone or tablet there can be many models with slight differences for certain markets (for example, the LG G2 smartphone has models VS980, LS980, D800, D802, F320K). Make sure that the firmware is designed specifically for your device!
- The firmware installation script does not include the model name of your Android smartphone or tablet.
How to fix Error 7 when flashing firmware in Recovery?
Option 1 (action 1)
If you have already read how error 7 could occur, then your very first action will be to check that you have actually downloaded the firmware specifically for your smartphone or tablet model (check the name and version).
If you notice that you downloaded the wrong firmware, then download it for your device. Problem solved! If this is not the case and the firmware is correct, then proceed to the second step.
Option 2 (action 2)
1. Install Notepad++
2. Open the firmware and follow the pathMETA-INF\com\google\android\
3. Extract the file updater-script
4. At the beginning of the installation script, delete the lines starting withassert
If not all users of Android systems, then many of those who install custom (non-original) firmware know that the appearance of the Installation Aborted error during firmware is a fairly common phenomenon. And this is not at all connected with the data being installed, but with the version of the operating system itself. Most users start this process without thinking at all about the possible consequences. And they can be very sad (even if the firmware is not installed, the system may simply crash, and after that you will have to restore the factory settings with complete loss of user data and any other related information).
Installation Aborted error when flashing firmware: what is this in general understanding?
Let's start by clarifying the term itself. What it means when a mobile device writes Installation Aborted when flashing firmware through recovery is, in general, not difficult to understand.
It is enough to simply translate a message from English into Russian. Receive a notification that the installation has been interrupted. But why does such a failure occur? You can read about this and much more in the material presented below. In addition, the usual cancellation of the installation is the worst thing that can be achieved when carrying out such actions. The fact is that Android systems react quite sensitively to any changes, and can only work with selected devices, for which only a certain version of the operating system can be used. Relatively outdated OSes and devices have practically no support in terms of updating the operating system. Updates affect only built-in services and custom applications, but nothing more. You can only update your operating system to a certain supported level.
Installation Aborted during firmware: what to do?
It is clear that when installing official updates supported by Android operating systems, failures of this kind do not occur. The only situation when the system writes Installation Aborted when installing the firmware is due to the fact that the user installs the Firmware independently.
In principle, this is a kind of protective function, similar to the appearance of a blue screen in Windows systems. Only Android behaves much more modestly.
The main problem is not even the installation method, but the fact that this firmware may simply not correspond to the device on which it is installed. And to begin with, when canceling the process, simply restart your mobile device and restore the original system. After this, you can proceed to install the new firmware again.
Lock
Sometimes, when installing firmware, Installation Aborted also signals that the original update file was not placed in the area that is perceived by the device as a default reserve.
As a rule, in order to avoid Installation Aborted failure when flashing a smartphone or tablet, the Update.zip file should initially be placed in the root directory of the internal storage (Android). Only after this can additional actions be performed.
Operating system update
Another failure option, when the system writes Installation Aborted when flashing the firmware, can be interpreted as the current version of the operating system not matching the one the user is trying to upgrade to.
This is akin to trying to jump from Windows XP to Windows 10 on desktop computers. First, for the Android OS itself, you need to install an update that is supported by both the system and the device, and only after that start flashing the device.
Many experts also call freeing up space on the internal storage as one of the most basic conditions for the successful completion of the process. Don't look at the fact that there is enough space on it. The most basic problem is that it contains undeleted cache data, which is perceived by the system as real garbage, although it may not signal this.
Thus, one of the options for eliminating the Installation Aborted failure during firmware is to initially delete this type of data. You can use standard settings, from where you go to the applications section, select “All” and then clear the cache of each applet presented in the list.
It is much better (and this makes the task easier) if the user has an optimizer application installed on his phone or tablet. Such applets, in general, behave quite correctly. True, cleaning issues sometimes raise legitimate doubts, since the user sees one thing on the application screen, but in fact nothing really happens. Don't believe me? Look in any file manager at the DCIM and 100ANDRO directories, which are located directly on the internal drive where the operating system itself is installed.
CMW Installation Issues
Another point related to the possibility of eliminating the problem of the Installation Aborted error appearing during firmware relates to the installation of the CMW module, which is extremely necessary for such operations. Its installation will allow you to avoid problems associated with incompatibility of ROM drives. But to use it, you initially need to obtain so-called root rights.
In the simplest version, you can use the Kingo Root program, which is initially installed on a personal computer or laptop. After connecting the mobile device, the rooting driver will be downloaded, and then the mobile applet will be installed on the mobile device (a confirmation will be given on the computer directly in the program). After this, it will be enough to simply launch the corresponding mobile applet to perform further actions.
They consist of installing Rom Manager, and in Recovery mode, using the Setup section, go to the ClockworkMod Recovery menu, find your mobile device model in the list provided and agree to carry out further operations.
Restoring factory firmware
Sometimes this approach does not work, since sometimes the presented solutions can only be used on original firmware. Resetting the settings on your phone or tablet won't really do anything.
Therefore, it is advisable to immediately install the program that best suits your device (Xperia Companion, Samsung Kies, etc.), and restore the factory firmware via the Internet using it. And only after that you can start installing new firmware, if necessary.
Instead of a total
This is the solution to the Installation Aborted error when flashing firmware. What to do, I think, is already clear. In general, by and large, it is worth saying that flashing a mobile device using unsupported versions of Firmware is not recommended at all. So you can, as they say, simply ruin the device. You can install the firmware only if it is actually taken from an official source and is fully compatible with the model of the device that is supposed to be flashed. Otherwise, don’t even try to perform any such actions.
We translate... Translate Chinese (Simplified) Chinese (Traditional) English French German Italian Portuguese Russian Spanish Turkish
Unfortunately, we are unable to translate this information right now - please try again later.
Security Enhancements for Android (SEAndroid)
New features have appeared in the Android operating system version 4.4 (Kitkat). Most important among the new features is the ability to integrate SEAndroid in a push mode, that is, placing all access rights to all Android components under the control of SEAndroid.
What is SEAndroid? SEAndroid stands for Security Enhancements for Android. It is a security solution for Android that identifies and fixes important vulnerabilities. The original goal of the project was to use SELinux features in the Android system to limit the damage associated with running defective or malicious applications and provide separation between applications. The scope of the project was then expanded. Now SEAndroid is an entire platform to implement SELinux Mandatory Access Control (MAC) and Middle Mandatory Access Control (MMAC) on the Android platform.
Some concepts related to SEAndroid should be clarified:
- Security-Enhanced Linux* (SELinux) is an implementation of enforcement of access control using Linux Security Modules (LSMs) in the Linux kernel based on the principle of least privilege. It is not a Linux distribution, but a set of modifications that can be applied to UNIX*-like operating systems such as Linux and BSD.
- Discretionary Access Control (DAC) is a standard security model in Linux. In this model, access rights depend on the identity of the user and the ownership of objects.
- Mandatory access control (MAC, Mandatory Access Control) limits access rights for subjects (processes) and objects (files, sockets, devices, etc.).
SELinux does not change existing security features in the Linux environment; instead, SELinux extends the security model by adding mandatory access control (i.e., both MAC and DAC are used in the SELinux environment).
SEAndroid extends the Android system by adding SELinux support to the kernel and user space to perform the following tasks:
- Limiting privileged daemons to protect against misuse and limit potential damage
- Using a sandbox, isolating applications from each other and from the system
- Prevent application elevation of privileges
- Managing application privileges during installation and execution using MIAC
- Centralized policy with analysis capabilities
Moreover, in Android 4.4, the SEAndroid platform runs in an enforced mode instead of a non-functional disabled mode or a permissive mode (which only issues notifications). This means that all illegal operations will be prohibited in the Android runtime.
SEAndroid Policy
The SEAndroid policy is one of the core elements of the entire SEAndroid security mechanism. In addition, the security architecture must also include a strict security policy to ensure that the access subject has only the minimum necessary access rights to the object. Then the program will be able to perform its basic functions, but will not be able to cause harm.
As stated above, SEAndroid's implementation uses an enforced mode instead of a non-functional disabled mode or a permissive mode (which only issues notifications). This simplifies testing and development.
The SEAndroid security context is generally compatible with SELinux. Its four components are described below: user, role, type and level, for example u: object_r: system_data_file: s0:
- User: The security context of the first column in SEAndroid is the user, it is denoted as u.
- Role: The second column indicates the role in SEAndroid: these are r and object_r, respectively.
- Type: In the third column, SEAndroid defines 139 different policy types, such as device, process, file system, network, IPC, and so on.
- Security Level: The fourth column is for multi-level security (MLS extension), which is an access mechanism with the addition of security and privacy context of the format [:categorylist][-privacy[:categorylist]], for example s0 - s15: c0 - c1023. Moreover, the category may not be required for the current version of Android. The combination of privacy and category determines the current security level, with numeric values assigned to the lowest and highest security levels. The parameters in this column are used when checking MLS restrictions: 15 is the most sensitive and 1023 is the highest category. This range of parameters can be set in Android.mk.
The security context is the most important part of the third column, the process type is called the domain. Type is the most important SEAndroid parameter; The policy options are significantly expanded, so it is important that the appropriate type is specified for each file.
SEAndroid policy sources are located in the external/sepolicy folder.
The policy consists of the source files used to create the SELinux kernel policy file, as well as the file_contexts, property_contexts, seapp_contexts, and mac_permissions.xml configurations.
- The file_contexts configuration is used to mark files at build time (eg the system partition) and at runtime (eg device nodes, service socket files, /data folders created by init.rc, etc.).
- The property_contexts configuration specifies the Android property security context for permission checking.
- The seapp_contexts configuration is used to mark application processes and application package directories.
- The mac_permissions.xml configuration is the MMAC policy.
Policies that apply to a device are located in the device/ folder<поставщик>/<устройство>.
- This policy can be set by specifying the variables BOARD_SEPOLICY_DIRS, BOARD_SEPOLICY_UNION and BOARD_SEPOLICY_REPLACE in the BoardConfig.mk file located in the device/ folder<поставщик>/<устройство>or vendor/<поставщик>/<устройство>. For example, the configuration file for the FFRD8 tablet based on the Intel® Atom processor (Bay Trail) is located in the /device/intel/baytrail/BoardConfig.mk folder.
- For an example, see device/intel/baytrail/BoardConfig.mk, where these variables are set according to the device policy files in device/intel/baytrail/sepolicy.
- For documentation on device policies, see external/sepolicy/README.
SEAndroid Policy Change
SEAndroid policy files are located in the /external/sepolicy folder. You can modify these files and see what happens when the modified policy is applied. Be careful when changing policy files because incorrect configuration may cause the entire system to hang at boot. Below is an example:
Step 1. Check before changes
First you need to check the /device/intel/baytrail/BoardConfig.mk file. The following sepolicy configuration is used:
BOARD_SEPOLICY_DIRS:= device/intel/baytrail/sepolicy BOARD_SEPOLICY_UNION:= file_contexts seapp_contexts file.te genfs_contexts fs_use device.te healthd.te app.te untrusted_app.te surfaceflinger.te vold.te ecryptfs.te zygote.te netd.te
BOARD_SEPOLICY_DIRS specifies the directory where policy files for a specific device are located. BOARD_SEPOLICY_UNION - The resulting policy configuration combining general policy files and device-specific policy files. When building Android, the compiler will check for conflicts between different policies. If BOARD_SEPOLICY_REPLACE is applied, this means that the device policies will replace the general policies.
Secondly, you need to open the file /external/sepolicy/untrusted_app.te and make sure that it contains the following lines:
Allow untrusted_app shell_data_file:file rw_file_perms Allow untrusted_app shell_data_file:dir r_dir_perms
The two policy elements listed above give untrusted applications (regular applications, not system applications) the ability to read and write files, and read directories with type shell_data_file at runtime. The shell_data_file parameter points to any file in /data/local/tmp/ in the runtime environment, set to /external/sepolicy/file_contexts in the development environment as follows:
The permissions listed above have certain limitations. If there are files and folders in /data/local/tmp/, then untrusted applications can read and write these files, enter these folders. But untrusted applications cannot create their own files and folders in /data/local/tmp/. Only system applications or services can create files and folders for untrusted applications. If you need to give untrusted applications more permissions, you can apply the changes described in step 2.
Step 2: Add new policy elements
Now you need to edit the /device/intel/baytrail/sepolicy/untrusted_app.te file by adding the following two lines at the end of the file:
Allow untrusted_app shell_data_file:file create_file_perms Allow untrusted_app shell_data_file:dir create_dir_perms
These two elements grant permissions to untrusted applications to create files and folders in /data/local/tmp/ at runtime. They are set in /external/sepolicy/file_contexts in the following development environment:
/data/local/tmp(/.*)? u:object_r:shell_data_file:s0
Basic permissions for files and folders are defined in /external/sepolicy/global_macros:
define(`x_file_perms", `( getattr execute execute_no_trans )") define(`r_file_perms", `( getattr open read ioctl lock )") define(`w_file_perms", `( open append write )") define(`rx_file_perms", `( r_file_perms x_file_perms )") define(`ra_file_perms", `( r_file_perms append )") define(`rw_file_perms", `( r_file_perms w_file_perms )") define(`rwx_file_perms", `( rw_file_perms x_file_perms )") define(`link_file_perms ", `( getattr link unlink rename )") define(`create_file_perms", `( create setattr rw_file_perms link_file_perms )") define(`r_dir_perms", `( open getattr read search ioctl )") define(`w_dir_perms", `( open search write add_name remove_name )") define(`ra_dir_perms", `( r_dir_perms add_name write )") define(`rw_dir_perms", `( r_dir_perms w_dir_perms )") define(`create_dir_perms", `( create reparent rmdir setattr rw_dir_perms link_file_perms ) ")
We can see that the permissions, for example file operation ( getattr open read ioctl lock ), are the same as the file operation functions in a real file system.
Finally, you need to rebuild the Android source tree and push the new image to the Bay Trail FFRD8 device.
SEAndroid Policy Check
After downloading FFRD8, you can download the FileManager app from the Android app store and then open a command shell from the FileManager menu. This allows you to simulate file operations of untrusted applications.
We can create a new file and a new folder: we need to go into the /data/local/tmp/ folder and create a new folder and a new file inside it. (On a standard FFRD8 device, creating a new file and a new directory is prohibited.) The result of applying the modified policy is shown in the figure below. The impact of the original policies is shown on the left, and the modified ones on the right:
Figure 1. Comparison of file permissions between normal and modified policies.
Conclusion
This article describes how the SEAndroid policy works and provides an example of adding a new policy to the SEAndroid policy set on an Intel Atom (Bay Trail) platform. This article will help device developers interested in creating customized versions of SEAndroid to better understand the SEAndroid policy mechanism.
About the author
Liang Z. Zhang is an Application Development Engineer in the Developer Relations Division at Intel China. Lian Zhan is responsible for supporting security technologies based on Intel platforms.
Notes
THE INFORMATION IN THIS DOCUMENT IS PROVIDED FOR INTEL PRODUCTS ONLY. NO EXPRESS OR IMPLIED LICENSE, ELIGIBILITY, OR OTHER INTELLECTUAL PROPERTY RIGHT IS GRANTED HEREIN. EXCEPT AS PROVIDED IN THE TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL DISCLAIMS ANY LIABILITY FOR AND DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO THE SALE AND/OR USE OF ITS PRODUCTS, INCLUDING LIABILITY OR WARRANTY TIPS AS TO THEIR FITNESS FOR A PARTICULAR PURPOSE, PROFIT OR NON-INFRINGEMENT -EITHER PATENTS, COPYRIGHTS OR OTHER INTELLECTUAL PROPERTY RIGHTS.
EXCEPT AS AGREED IN WRITING BY INTEL, INTEL PRODUCTS ARE NOT INTENDED FOR USE IN SITUATIONS WHERE FAILURE COULD RESULT IN INJURY OR DEATH.
Intel reserves the right to change the specifications and descriptions of its products without notice. Designers should not rely on missing characteristics, or characteristics marked “reserved” or “unspecified.” These features are reserved by Intel for future use and are not guaranteed to have no compatibility conflicts. The information in this document is subject to change without notice. Do not use this information in the final design.
The products described in this document may contain errors or inaccuracies which may cause actual product specifications to differ from those described herein. Already identified errors can be provided upon request.
Please obtain the latest specifications from your local Intel sales office or local distributor before placing your order.
Copies of documents referenced in this document or other Intel documentation may be obtained by calling 1-800-548-4725 or visiting: http://www.intel.com/design/literature.htm
The software and workloads used in benchmark tests may have been optimized to achieve high performance on Intel microprocessors. Performance tests, such as SYSmark* and MobileMark*, are performed on specific computer systems, components, programs, operations and functions. Any changes to any of these elements may change the results. When selecting the products you purchase, you should consult other information and performance tests, including tests of the performance of a particular product in combination with other products.
This document and the software described herein are provided under a license and may be used and distributed only in accordance with the terms of the license.
Decided to install custom firmware on your Android smartphone or tablet, entered custom TWRP Recovery, but received error 7 during installation? Don't despair; fixing this problem is quite simple.
Many beginners may be discouraged by any steps in installing custom firmware, especially if this procedure is performed for the first time. One of the serious obstacles during firmware installation can be error 7 in TWRP Recovery.
The seriousness of this error is that it does not allow you to install custom firmware on the device at all and all your preparation will go down the drain. But it turns out that this error 7 in recovery is quite easy to fix without resorting to lengthy actions! Today’s article is about how to get rid of this problem!
Where did error 7 come from?
This error can occur in two cases:
- If you try install firmware not from your device, this often occurs when under one name a smartphone or tablet there can be many models with slight differences for certain markets (for example, the LG G2 smartphone has models VS980, LS980, D800, D802, F320K). Make sure that the firmware is designed specifically for your device!
- The firmware installation script does not include the model name of your Android smartphone or tablet.
How to fix Error 7 when flashing firmware in Recovery?
Option 1 (action 1)
If you have already read how error 7 could occur, then your very first action will be to check that you have actually downloaded the firmware specifically for your smartphone or tablet model (check the name and version).
If you notice that you downloaded the wrong firmware, then download it for your device. Problem solved! If this is not the case and the firmware is correct, then proceed to the second step.
Option 2 (action 2)
Try to find more information on the Internet new version of custom Recovery and then install it on your device, and then try to install the firmware, which previously gave error 7.
Option 3 (action 3)
Android 4.4 KitKat firmware for Lenovo S930 - s215_140714
Firmware from the Russian region for updating from a PC!
Possibility of installation on any firmware version!
Build number: S930_ROW_s215_140714
Date: 14.07.2014
Creator: Lenovo release QC for ROW region
Compound: Full firmware image/OTA update
OS: Android 4.4.2
Description:
- languages: Russian, English, Chinese, Vietnamese, Indonesian
- keyboard: multi-language
Change log:
- Android 4.4.2
- VibeUI 1.5
- Almost all applications from Lenovo have been updated
- New system interface
- Improved performance of the system interface
- energy optimization
Download:
- OTA update from firmware S119_140325 to firmware S215_140714 / mirror
- Firmware for PC:
Instructions:
Instructions:
Installing the OTA update
MEMORY WILL BE RE-ALLOCATED
User data will be saved.
AND ALSO_ WIPE IS STRICTLY SPECIFIED AFTER OTTA! OTHERWISE, YOUR EMAILS WILL NOT WORK, WILL NOT OPEN, BUGLY, WILL BE SIMPLY SPAM!
I repeat again - THIS IS A CHANGE OF OS VERSION! SPEND YOUR TIME - MAKE A WIPE AND SET EVERYTHING AGAIN! IT'S WORTH IT!
Installed ONLY ON OFF S119_140325 with standard recovery Installed only on S119_140325 and only through standard (not extended) recovery.
RUT rights will have to be obtained AGAIN
Installation:
0. Make sure that the official firmware is installed S119_140325 , standard (not extended) recovery* and system (GOOGLE) applications were not erased/changed**. And also that there is no memory re-allocation. If at least one point is not fulfilled, the firmware will not install. nothing bad will happen, the update will simply not install and the previous version will remain. We make sure to check (IF WE WENT FROM a PC to 119) that the REGION CODE FOR RF has been entered!) After updating the firmware from the PC to version 119, open the dialer, dial ####682# and select the RU region from the list! If this is not done, then the firmware over the air will not install correctly!
1- Download the archive S930_OTA_from_S119_140325_to_S215_140714 on PC
2- Unpack and extract the update.zip archive
In ANY way NOT unpacking update.zip, copy this archive either to the root of the memory card or to the root of the built-in memory
3. Reboot into recovery in ANY way
With the phone turned off, press the power button and hold it for 1-2 seconds, then press the volume rocker “+” and “-” at the same time, hold the rocker and power until you enter recovery.
4. The installation starts AUTOMATICALLY.
6- Open the dialer = - Dialer. Dial the code ####7777# to confirm the reset.
7- if you do not reset or select the region code, the result is NOT guaranteed and with this firmware they will NOT be accepted into the service under warranty! Success!
9- Success!
Installing firmware from a PC
ATTENTION - use only the new utility SP_Flash_Tool_v5.1352.01
Brief instructions for using the new utility SP_Flash_Tool_v5.1352.01