CN108024002B - Method for constructing dual-domain mobile phone system based on ROM - Google Patents

Method for constructing dual-domain mobile phone system based on ROM Download PDF

Info

Publication number
CN108024002B
CN108024002B CN201610928340.XA CN201610928340A CN108024002B CN 108024002 B CN108024002 B CN 108024002B CN 201610928340 A CN201610928340 A CN 201610928340A CN 108024002 B CN108024002 B CN 108024002B
Authority
CN
China
Prior art keywords
domain
mobile phone
dual
file
img
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610928340.XA
Other languages
Chinese (zh)
Other versions
CN108024002A (en
Inventor
彭元志
胡雪雷
李东
徐春强
卓贵明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Electronics Technology Network Security Technology Co ltd
Original Assignee
Chengdu Westone Information Industry Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Westone Information Industry Inc filed Critical Chengdu Westone Information Industry Inc
Priority to CN201610928340.XA priority Critical patent/CN108024002B/en
Publication of CN108024002A publication Critical patent/CN108024002A/en
Application granted granted Critical
Publication of CN108024002B publication Critical patent/CN108024002B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/572Secure firmware programming, e.g. of basic input output system [BIOS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a method for constructing a dual-domain mobile phone system based on a ROM, wherein the dual-domain mobile phone system comprises a master domain, a slave domain and a domain management program based on a mobile phone kernel, and the method specifically comprises the following steps: the method comprises the following steps: adding codes supporting the double-domain function in the original kernel of the mobile phone, and compiling to generate a new kernel binary file; step two: img mapping file of main domain is modified; step three: img mapping files of the master domain and the slave domain are modified; step four: and respectively burning the main domain boot. Therefore, the invention not only can reduce the coupling degree of the dual-domain system to mobile phone manufacturers, but also can protect the benefits of the mobile phone manufacturers, and simultaneously enable third-party mobile phone security solution providers to research and develop and apply the dual-domain system.

Description

Method for constructing dual-domain mobile phone system based on ROM
Technical Field
The invention relates to a mobile phone system, in particular to a method for constructing a dual-domain mobile phone system based on a ROM.
Background
With the smart phone going deep into the aspects of people's life, people can bring great convenience to the life through smart phone chatting, shopping, games, working and watching movies, but with the continuous occurrence of privacy disclosure and endless fraud incidents in this year, people are constantly reminded to pay attention to the security of the smart terminal. How to customize a set of safe mobile phone scheme capable of meeting the requirements of mobile office work, safe payment and privacy protection on the basis of not influencing the user experience isolates an intelligent terminal into operating environments suitable for different safety levels.
In order to solve the security threat of the current mobile terminal, research institutions or personnel in the industry propose a plurality of solutions, and the document of mobile virtualization technology and Android security refers to a method for constructing an Android dual-domain system by using a Linux container. However, such similar technical documents only consider the dual-domain implementation architecture, and do not consider the practical research and development and application problems of the dual-domain system. In the prior art, documents are all based on an assumption that a double-domain system research and development team has a whole set of Android system source codes from system application, system to kernel. The assumption causes that the research and development of the dual-domain system has great dependence on mobile phone manufacturers, and if a third-party security team has own dual-domain product and wants to apply the dual-domain product to an actual mobile phone, the mobile phone manufacturers must open a whole set of source codes. However, in order to protect the benefits of mobile phone manufacturers, the possibility of completely opening the source code is very low, and this situation brings obstacles to the development of the dual-domain system.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method for constructing a dual-domain mobile phone system based on ROM, which not only can reduce the coupling degree of the dual-domain system to mobile phone manufacturers, but also can protect the benefits of the mobile phone manufacturers, and simultaneously enable third-party mobile phone security solution providers to research and develop and apply their own dual-domain systems.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a method for constructing a dual-domain mobile phone system based on ROM, wherein the dual-domain mobile phone system comprises a master domain, a slave domain and a domain management program based on a mobile phone kernel, the method specifically comprises the following steps:
the method comprises the following steps: adding codes supporting the double-domain function in the original kernel of the mobile phone, and compiling to generate a new kernel binary file;
step two: img mapping file is modified, and the new kernel binary file is used for replacing the original kernel binary file of the mobile phone;
step three: img image files of the master domain and the slave domain are modified to add a domain management program;
step four: and respectively burning the main domain boot.img mapping file, the system.img mapping file and the slave domain system.img mapping file into corresponding flash partitions of the mobile phone to complete the construction of the dual-domain mobile phone system.
Preferably, the first step further includes unlocking a bootloader of the mobile phone and obtaining root authority of a system administrator.
Preferably, the specific steps of the second step include the following steps:
decompressing the main domain boot.img image file by using a decompressing tool;
modifying the original kernel binary file in the main domain boot.
Modifying a dual-domain service configuration file for initializing system resources of a dual-domain mobile phone system;
and regenerating the main domain boot.
Preferably, the step three of modifying the slave domain system.
Img image file, according to different storage positions of slave domain system, modifying different paths in domain management program to make domain management program start slave domain correctly.
Preferably, the storage location of the slave domain system. Img image files coexist in a mobile phone system partition, a mobile phone userdata partition and other independent mobile phone flash partitions with a main domain system.
Preferably, the step three of modifying the main domain system.
Img image file of main domain needs to be modified when it coexists with the image file of main domain or the domain management program needs to be saved in the image file of main domain, wherein the modification of the image file of main domain specifically includes: mounting and obtaining a main domain system.
Preferably, the specific method for modifying the original kernel binary file in the main domain boot. And replacing the original kernel binary file in the main domain boot.
As a further preferred method, the specific method for modifying the dual-domain service configuration file used for initializing the system resources of the dual-domain mobile phone system includes: if the dual-domain service configuration file is stored in the ramdisk file, the gunzip is needed to decompress the ramdisk file, and the ramdisk file is regenerated by using an mkboot fs command after the modification according to the dual-domain design scheme; if the service configuration file is stored in other positions during the design of the dual-domain system, corresponding modification is needed.
As a further preference, the decompression tool is an unpackbootimg tool or a split _ bootimg.
As a further preference, the regeneration boot.
Compared with the prior art, the invention has the advantages that after the technical scheme is adopted: the construction method mainly realizes the dual-domain management by modifying the technical means of the kernel, the main domain boot.img mapping file, the system.img mapping file of the main domain and the slave domain and the like provided by a mobile phone manufacturer, namely, the dual-domain system can be realized under the condition that the mobile phone manufacturer only opens the kernel source code, and meanwhile, the dependence of a third party team on the mobile phone manufacturer in the research and development process of the dual-domain system can be reduced, thereby being beneficial to the development of the mobile phone safety.
Drawings
The invention is further illustrated by the following figures and examples:
fig. 1 is a basic flowchart of a method for constructing a ROM-based dual-domain mobile phone system according to an embodiment of the present invention;
fig. 2 is a detailed flowchart of step S2 in fig. 1.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the following embodiments of the present invention, the master domain is an Android system originally configured by a manufacturer's mobile phone, and the slave domain is a third-party Android system. The main domain boot.img image file is used for booting the mobile phone system and initializing the related services of the system, wherein the main domain boot.img image file comprises a binary file required by the dual-domain system and a configuration file for initializing the dual-domain service. Img image files of the master domain and slave domain are used for loading and starting the upper Android system.
As shown in fig. 1 and fig. 2, an embodiment of the present invention provides a method for constructing a dual-domain mobile phone system based on a ROM, where the dual-domain mobile phone system includes a master domain, a slave domain and a domain manager based on a mobile phone kernel, and the method specifically includes:
the method comprises the following steps: adding codes supporting the double-domain function in the original inner core of the mobile phone, and compiling to generate a new inner core binary file. In the embodiment of the invention, the code with the double-domain function refers to all codes which are added by a kernel and used for constructing a double-domain operating environment; in addition, the kernel source code integrates a compiling script, the script generates a kernel binary file by calling a command provided by the gcc tool chain, and the kernel binary file can be compiled by calling the compiling script only through a make command during compiling.
Step two: and modifying the mapping file of the main domain boot. Because the kernel code is added with the related code supporting the dual-domain under the condition of replacing the kernel binary file, the original kernel binary file needs to be replaced by a binary file generated by a third party or self compiling. Due to different versions of manufacturers and Android, decompression tools of boot. In the embodiment of the present invention, the specific steps of step two include the following:
decompressing the main domain boot.img image file by using an unpackboot-img tool or a split _ boot.pl tool;
modifying the original kernel binary file in the main domain boot.img mapping file, wherein the specific method is that the newly generated kernel binary file is used for replacing the original kernel binary file in the main domain boot.img mapping file, and due to the difference between mobile phone manufacturers and Android versions, tools for decompressing and regenerating the ramdisk file may be changed, and a proper tool needs to be selected according to actual conditions;
modifying a dual-domain service configuration file for initializing system resources of a dual-domain mobile phone system, wherein the system resources mainly refer to a system process started by the service configuration file, and the specific method comprises the following steps:
if the dual-domain service configuration file is stored in the ramdisk file (virtual memory disk), decompressing the ramdisk file through gunzip, modifying the content of the dual-domain service configuration file according to the design of the dual-domain system, and regenerating the ramdisk file by using an mkbootfs command;
if the service configuration file is stored in other positions during the design of the dual-domain system, corresponding modification is needed, in the embodiment of the invention, except that the ramdisk file is stored for starting the service configuration file of the management domain, the configuration file changed by other domains relative to the management domain is currently placed in a system/etc directory, and in addition, because manufacturers and Android versions are different, tools for regenerating boot.
And regenerating a new main domain boot.
Step three: img image files of the master domain and the slave domain are modified again to add a domain manager. In the embodiment of the present invention, the modification of the slave domain system.
Img mapping file, according to different storage positions of slave domain system, modifying different paths in the domain management program to make the domain management program able to correctly start the slave domain;
after the modification of the domain management program is completed, the domain management program is stored in a suitable position, which may be in a main domain system.
In the specific embodiment of the invention, for the Android system running in the slave domain, a separate system is not needed to boot the boot.img image file, the boot.img image of the master domain can be directly used to start the mobile phone, and then the slave domain can be directly started by using the domain management program. Different double-domain systems are different in design and implementation modes, and specific functions completed by the domain management program are different, but the Android starting from the domain is completed by the domain management program. Img images from the domain Android system can exist in a variety of ways: img image files and main domain system image files coexist in a mobile phone system subarea, a mobile phone userdata subarea and other independent mobile phone flash subareas.
In the embodiment of the present invention, the step three of modifying the main domain system. Img image file of main domain needs to be modified when it coexists with the image file of main domain or the domain management program needs to be saved in the image file of main domain, wherein the modification of the image file of main domain specifically comprises: mounting and obtaining a main domain system. In an embodiment of the present invention, the adding of the file in the system image file of the master domain may be adding a system. In addition, the make _ ext4fs is a tool for making ext4 file system format images.
Step four: and respectively burning the main domain boot.img mapping file, the system.img mapping file and the slave domain system.img mapping file into corresponding flash partitions of the mobile phone to complete the construction of the dual-domain mobile phone system. In the embodiment of the present invention, the corresponding flash partition is an Android system, which generally includes a boot partition, a system partition, data, recovery partition and a cache partition, where a boot.
In the embodiment of the present invention, before the first step, the bootloader of the mobile phone is unlocked and root authority of a system administrator is obtained. The root authority of the system administrator refers to a super administrator user account in the Linux and unix systems, and the account has all object operability authorities of the whole system.
The technical scheme mainly modifies the kernel, the main domain boot.img mapping file, the system.img mapping file of the main domain and the slave domain and other technical means provided by a mobile phone manufacturer, thereby realizing the dual-domain management, namely realizing the dual-domain system under the condition that the mobile phone manufacturer only opens the kernel source code, and simultaneously reducing the dependence of a third party team on the mobile phone manufacturer in the research and development process of the dual-domain system.
Finally, it should also be noted that, in this document, terms such as "comprises" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The construction method of the dual-domain mobile phone system based on the ROM provided by the present invention is described in detail above, and the principle and the implementation of the present invention are explained in the present document by applying specific examples, and the description of the above examples is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A method for constructing a dual-domain mobile phone system based on ROM is characterized in that the dual-domain mobile phone system comprises a master domain, a slave domain and a domain management program based on a mobile phone kernel, and the method specifically comprises the following steps:
s1, unlocking a bootloader of the mobile phone and acquiring root authority of a system administrator;
s2, adding codes supporting the double-domain function in the original kernel of the mobile phone, and compiling to generate a new kernel binary file;
s3, modifying the main domain boot. img mapping file, and replacing the original kernel binary file of the mobile phone with the new kernel binary file;
s4, modifying the system.img image files of the master domain and the slave domain to add the domain management program;
and S5, respectively burning the main domain boot.
2. The method for constructing a dual-domain mobile phone system based on ROM of claim 1, wherein the step S3 includes the following steps:
s21, decompressing the main domain boot.
S22, modifying the original kernel binary file in the main domain boot.
S23, modifying a dual-domain service configuration file for initializing system resources of the dual-domain mobile phone system;
and S24, regenerating the main domain boot.
3. The method as claimed in claim 1, wherein the step S4 of modifying the slave domain system img image file specifically includes the following steps:
img image file, according to different storage positions of slave domain system, modifying different paths in domain management program to make domain management program start slave domain correctly.
4. The method of claim 3, wherein the storage location of the slave domain system img image file exists in a manner of: img image files coexist in a mobile phone system partition, a mobile phone userdata partition and other independent mobile phone flash partitions with a main domain system.
5. The method as claimed in claim 1, wherein the step S4 of modifying the home domain system.
When the slave domain system. Mounting and acquiring a system.img image file by using a mount command, adding a file in the system image file of the main domain, and regenerating a new main domain system.img image file by using a make _ ext4fs command.
6. The method for constructing a dual-domain mobile phone system based on ROM of claim 2, wherein the specific method for modifying the primary kernel binary file in the main domain boot. And replacing the original kernel binary file in the main domain boot.
7. The method according to claim 2, wherein the specific method for modifying the dual-domain service profile for initializing the system resources of the dual-domain mobile phone system comprises: if the dual-domain service configuration file is stored in the ramdisk file, decompressing the ramdisk file through gunzip, modifying the content of the dual-domain service configuration file according to the design of the dual-domain system, and regenerating the ramdisk file by using an mkbootfs command; if the service configuration file is stored in other positions during the design of the dual-domain system, corresponding modification is needed.
8. The method of claim 2, wherein the decompression tool is an unpackbootimg tool or a split _ bootimg.pl tool.
9. The method of claim 2, wherein the tool for regenerating boot.img is an mkboot img tool.
CN201610928340.XA 2016-10-31 2016-10-31 Method for constructing dual-domain mobile phone system based on ROM Active CN108024002B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610928340.XA CN108024002B (en) 2016-10-31 2016-10-31 Method for constructing dual-domain mobile phone system based on ROM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610928340.XA CN108024002B (en) 2016-10-31 2016-10-31 Method for constructing dual-domain mobile phone system based on ROM

Publications (2)

Publication Number Publication Date
CN108024002A CN108024002A (en) 2018-05-11
CN108024002B true CN108024002B (en) 2021-05-07

Family

ID=62070231

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610928340.XA Active CN108024002B (en) 2016-10-31 2016-10-31 Method for constructing dual-domain mobile phone system based on ROM

Country Status (1)

Country Link
CN (1) CN108024002B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112540892B (en) * 2020-12-08 2023-01-20 公安部第三研究所 Mobile phone isolation detection system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425527A (en) * 2012-05-23 2013-12-04 腾讯科技(深圳)有限公司 Multi-system switching method and switching device
CN103777985A (en) * 2014-01-26 2014-05-07 宝龙计算机系统(湖南)有限公司 Method and device for installing several multiple operating systems on one partition of storage medium
CN104040498A (en) * 2012-01-05 2014-09-10 大陆汽车有限责任公司 Computer system for updating programs and data in different memory areas with or without write authorizations
CN106055384A (en) * 2009-07-20 2016-10-26 谷歌技术控股有限责任公司 Multi-environment operating system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100750132B1 (en) * 2005-09-27 2007-08-21 삼성전자주식회사 Method and system for booting, updating software automatically and recovering update error, and computer readable medium recording the method
US9372711B2 (en) * 2009-07-20 2016-06-21 Google Technology Holdings LLC System and method for initiating a multi-environment operating system
CN101840341A (en) * 2010-04-01 2010-09-22 惠州Tcl移动通信有限公司 Intelligent mobile phone system and starting method thereof
CN101957769A (en) * 2010-09-27 2011-01-26 浙江大学 MID (Mobile Internet Device) multiple operating system parallelizing method
CN102232304B (en) * 2011-05-04 2014-01-08 华为终端有限公司 Method, system and terminal for system update between mobile communication terminals
US9183393B2 (en) * 2012-01-12 2015-11-10 Facebook, Inc. Multiple system images for over-the-air updates
CN104731602A (en) * 2015-03-31 2015-06-24 上海盈方微电子有限公司 Method for separating Android mirror image burning process
CN105511911B (en) * 2015-11-27 2019-02-12 青岛海信移动通信技术股份有限公司 The generation method and device of system firmware upgrade package
CN105468420B (en) * 2015-12-25 2018-12-28 广州视睿电子科技有限公司 Operating system update method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106055384A (en) * 2009-07-20 2016-10-26 谷歌技术控股有限责任公司 Multi-environment operating system
CN104040498A (en) * 2012-01-05 2014-09-10 大陆汽车有限责任公司 Computer system for updating programs and data in different memory areas with or without write authorizations
CN103425527A (en) * 2012-05-23 2013-12-04 腾讯科技(深圳)有限公司 Multi-system switching method and switching device
CN103777985A (en) * 2014-01-26 2014-05-07 宝龙计算机系统(湖南)有限公司 Method and device for installing several multiple operating systems on one partition of storage medium

Also Published As

Publication number Publication date
CN108024002A (en) 2018-05-11

Similar Documents

Publication Publication Date Title
CN103049692B (en) A kind of application installation method, device and equipment
WO2017031954A1 (en) Data communication method, user equipment, and server
CN106991321B (en) Method and device for running application program in multi-container system without trace
US9767274B2 (en) Approaches for efficient physical to virtual disk conversion
US20130191924A1 (en) Approaches for Protecting Sensitive Data Within a Guest Operating System
CN104866342A (en) Method and device for simultaneously starting multiple same applications on intelligent terminal
CN106453413B (en) Method and device for applying SELinux security policy in multi-system
CN103970563B (en) The method of dynamic load Android class
CN106776067B (en) Method and device for managing system resources in multi-container system
CN105830477A (en) Operating system integrated domain management
EP2887607A1 (en) Migration of assets of a trusted execution environment
KR20140077186A (en) Method of generating, from an initial package file comprising an application to be secured and an initial configuration file, a package file for securing the application, and associated computer program product and computing device
US20190155580A1 (en) Virtualization Layer for Mobile Applications
CN100507904C (en) Framework to build, deploy, service, and manage customizable and configurable re-usable applications
CN103544447A (en) Method and terminal for preventing leakage of confidential information according to Android system
CN102902911B (en) A kind of method of safe operation third party code in Java Virtual Machine
CN103067392A (en) Security access control method based on Android terminal
CN109669692B (en) Source code sharing method, server, computer readable storage medium and system
CN103716346A (en) Management method and device of application on android handset client
CN104035842A (en) Method for deleting and recovering built-in application program
CN103885763A (en) Operating system resource access method and system
WO2019015491A1 (en) Application program cloning method and apparatus, device and medium
KR20180101545A (en) A method for managing objects in a security element
CN108182070B (en) Method and device for customizing android system ROM and terminal equipment
CN108024002B (en) Method for constructing dual-domain mobile phone system based on ROM

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: No. 333, Yunhua Road, Chengdu hi tech Zone, China (Sichuan) pilot Free Trade Zone, Chengdu, Sichuan 610041

Patentee after: China Electronics Technology Network Security Technology Co.,Ltd.

Address before: No. 333, Yunhua Road, high tech Zone, Chengdu, Sichuan 610041

Patentee before: CHENGDU WESTONE INFORMATION INDUSTRY Inc.

CP03 Change of name, title or address