problem: After the compiled image is burned to the small board, it is found that the setup---> store only displays 0.98G of system space and crashes when the settings---> Application point is opened. The log information at the time of crash is as follows:
Time (3407): at Com.android.settings.applications.manageapplications$tabinfo.updatestorageusage ( manageapplications.java:333) E/androidruntime (3407): at Com.android.settings.applications.manageapplications$tabinfo.setcontainerservice ( manageapplications.java:234) E/androidruntime (3407): at com.android.settings.applications.manageapplications$2.onserviceconnected ( manageapplications.java:1227) W/activitymanager (2177): Process Com.android.settings has crashed too many times:killing! W/activitymanager (2177): Force finishing Activity com.android.settings/. Settings I/activitymanager (2177): Killing proc 3407:com.android.settings/1000:crash W/inputdispatcher (2177): Channel ' 417bd5b0 com.android.settings/com.android.settings.settings (server) ' ~ Consumer Closed input channel or an error occurred. events=0x9 E/inputdispatcher (2177): Channel ' 417bd5b0 com.android.settings/com.android.settings.settings (server) ' ~ Channel is Unrecoverably broken and would be disposed! W/inputdispatcher (2177): Attempted to unregister already unregistered input channel ' 417bd5b0 com.android.settings/ Com.android.settings.Settings (server) ' I/windowstate (2177): WIN death:window{417bd5b0 u0 Com.android.settings/com.android.settings.settings} binder:2177:2249 transaction failed 29189, size 100-4 binder:2177:2517 transaction failed 29189, size 4-0
Binder:send failed reply for transaction 29309, Target dead |
|
Careful review of the error message found that the cause of the crash is related to the storage device. All of the problems come down to the problem that the Android system does not fully recognize the storage device.
Found in the shell, the system can identify only 4 g of storage, while our device 8G eMMC
:
[Email protected]:/# df Filesystem Size used free Blksize/dev 475M 68K 475M 4096/mnt 475M 0K 475M 4096/mnt /secure 475M 0K 475M 4096/mnt/asec 475M 0K 475M 4096/mnt/obb 475M 0K 475M 4096/system 492M 254M 237M 4096/ Data 1007M 72M 935M 4096-------> This is the internal storage shown in the settings. /cache 98M 4M 94M 4096
Since we are burning the system using an upgrade, there should be a script to process the partition in the upgrade file. After searching, the Updater-script upgrade script exists in the meta-inf\com\google\android directory of Update.zip, where the operation of the partition is in the script, and no sdcard action is involved in the script. The following files were found in the Android source bootable\recovery\etc\meta-inf\com\google\android directory:
In contrast, UPDATER-SCRIPT-EMMC is the upgrade script I used by default at compile time, and the following code is reversed in UPDATER-SCRIPT-PRODUCE-EMMC:
Ui_print ("Foramt sdcard ..."); Format ("Ext4", "EMMC", "/dev/block/platform/hi_mci.1/by-name/sdcard", "0", "/sdcard ");
The function of this piece of code is to format the SDcard partition, and then just
Updater-script-produce-emmc renamed to Updater-script-emmc, and then the source root directory execution: Make updatezip-j8 can be in out/target/product/ HI3716C/EMMC directory under the upgrade package Update.zip, and then use the upgrade package upgrade system can be. After the upgrade, view the system partition under Shell as follows:
[Email protected]:/# dffilesystem Size used free blksize/dev 475M 68K 475M 4096/ MNT 475M 0K 475M 4096/mnt/secure 475M 0K 475M 4096/mnt/asec 475M 0K 475M 4096/mnt/obb 475M 0K 475M 4096/system 492M 254M 237M 4096/data 1007M 61M 946M 4096/cache 98M 4M 94M 4096/mnt/ SDcard 5G 98M 5G 4096/mnt/secure/asec 5G 98M 5G 4096
As you can see, all the partitions are recognized.
Note that the 1:android system generally divides the entire storage (8G Emmc of this example) into two parts, one as a system partition, and one as a part of the internal SD card partition.
Note 2: The above modifications are only for production use, and the upgrade scripts used in the upgrade package Update.zip provided to the user must not contain formatting operations on SDcard. In other words, the user upgrade package must use the original UPDATER-SCRIPT-EMMC upgrade script.
============================================================================================
Appendix: The role of each partition.
/system Partition--->rom information
--app------> Pre-installed applications and system software
--data------> Pre-installed data information for applications and software
/data partition---------> user software Information
--app------> User installation software, copy the APK file to this directory during installation
--data------> Stores information such as Lib and XML files for all software (/system/app,/data/app and/mnt/asec). and the program cache file.
--dalvik-cache-----> Install the Dex file in the APK into the Dalvik-cache directory (the Dex file is the executable file for the Dalvik virtual machine, which is approximately one-fourth of the original apk file size)
/MNT partition---------> Mount external devices
--sdcar---> Built-in SD card partition for storing downloaded maps, music, videos, and more.