APEX File Recovery During Boot to Prevent Kernel Panic
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Corruption of apex files leads to kernel panic and platform restart issues, rendering the terminal unusable.
Innovation Solution
An electronic device is equipped with a processor to decompress compressed apex files, identify corruption, and perform recovery operations to restore the apex files, preventing kernel panic and platform restart.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If apex files are stored in a user data area with read/write capability, then ease of update is improved, but file corruption risk increases leading to kernel panic
Solution Approach 1:
The system performs preliminary integrity verification by checking hash values of apex files before they are mounted or executed. The kernel calculates the hash value of the apex file and compares it with the stored hash value to detect corruption in advance, preventing kernel panic caused by corrupted files.
Solution Approach 2:
The system implements a feedback mechanism where the kernel continuously monitors apex file integrity by recalculating and comparing hash values. When corruption is detected, the system provides feedback to the package manager service, which then triggers recovery operations to restore the corrupted apex files from backup copies.
2Reliability
If signature verification is performed on all apk files during framework initialization, then security is improved, but boot time increases
Solution Approach 1:
The system extracts and verifies only the critical signature information of apex files during kernel initialization, rather than performing complete signature verification on all apk files. This selective verification approach maintains security while significantly reducing the time required during boot-up.
Solution Approach 2:
Signature verification is performed in advance during apex file installation and storage, rather than during framework initialization. The hash values and signature information are pre-calculated and stored with the apex files, allowing for rapid verification during boot without delaying the initialization process.
3Ease of repair
If compressed apex files are decompressed and stored in user data area, then ease of recovery is improved, but storage space consumption increases
Solution Approach 1:
The system stores decompressed apex files in the user data area for easy recovery, while maintaining the original compressed files in the read-only system area. This allows the decompressed files to be readily available for recovery operations without permanently consuming excessive storage space, as the compressed originals serve as space-efficient backups.
Solution Approach 2:
The system implements a recovery mechanism where corrupted decompressed apex files in the user data area are detected and replaced by decompressing fresh copies from the compressed files stored in the read-only system area. This allows easy recovery while managing storage space efficiently through selective decompression and replacement.
Data Source
AI summary
An electronic device may comprise memory for storing a file obtained by compressing a file including at least one module as a package, and a processor, wherein the processor: generates an uncompressed file by decompressing the compressed file; stores the generated uncompressed file in the memory; during booting of the electronic device, identifies whether deformation has occurred in the uncompressed file; and in response to the occurrence of deformation in the uncompressed file, performs a recovery operation for the uncompressed file. A method comprises: generating an uncompressed file by decompressing a file obtained by compressing a file including at least one module as a package; storing the generated uncompressed file in a memory; during booting of the electronic device, identifying whether deformation has occurred in the uncompressed file; and in response to the occurrence of deformation in the uncompressed file, performing a recovery operation for the uncompressed file.


