CN114610342A - Method for supporting Hongmon application installation on Android - Google Patents
Method for supporting Hongmon application installation on Android Download PDFInfo
- Publication number
- CN114610342A CN114610342A CN202210340476.4A CN202210340476A CN114610342A CN 114610342 A CN114610342 A CN 114610342A CN 202210340476 A CN202210340476 A CN 202210340476A CN 114610342 A CN114610342 A CN 114610342A
- Authority
- CN
- China
- Prior art keywords
- hongmeng
- application
- android
- data
- installation
- 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.)
- Pending
Links
- 238000009434 installation Methods 0.000 title claims abstract description 22
- 238000000034 method Methods 0.000 title claims abstract description 20
- 238000012795 verification Methods 0.000 claims abstract description 11
- 238000011900 installation process Methods 0.000 claims description 17
- 230000004927 fusion Effects 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 230000000694 effects Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
本发明提供一种在Android上支持鸿蒙应用安装的方法,包括以下步骤:步骤(1).定义鸿蒙应用的类型INSTALL_HAP;步骤(2).传入鸿蒙应用包的流文件;步骤(3).通过定义的INSTALL_HAP属性,在原生的校验过程中,跳过那些不需要的校验;步骤(4).存放鸿蒙应用的基本数据和运行数据,并在初始化的rc中,将此文件夹权限更改为系统data类型,让鸿蒙的runtime可以直接访问。本发明可以自由的在一个手机软件上安装鸿蒙应用和安卓应用,减小了用户换机带来的巨大数据成本;开发者可以用同一个硬件和手机软件,开发安卓应用和鸿蒙应用,为企业减少了研发成本。
The present invention provides a method for supporting the installation of HarmonyOS applications on Android, comprising the following steps: step (1). Define the type INSTALL_HAP of the HarmonyOS application; step (2). Incoming stream files of the HarmonyOS application package; step (3). Through the defined INSTALL_HAP attribute, in the native verification process, those unnecessary verifications are skipped; step (4). Store the basic data and running data of the HarmonyOS application, and in the initialized rc, set the permissions of this folder Change to the system data type, so that Hongmeng's runtime can directly access it. The present invention can freely install Hongmeng application and Android application on one mobile phone software, which reduces the huge data cost caused by user switching; developers can use the same hardware and mobile phone software to develop Android application and Hongmeng application, which is beneficial for enterprises Reduced R&D costs.
Description
技术领域technical field
本发明涉及嵌入式软件技术领域,具体为一种在Android上支持鸿蒙应用安装的方法。The invention relates to the technical field of embedded software, in particular to a method for supporting Hongmeng application installation on Android.
背景技术Background technique
近年,华为发布了鸿蒙系统,代表国产系统崛起的开始,但是在推广使用的过程中,却遇到了极大的阻力,重要原因之一就是软件应用不兼容、鸿蒙软件少,导致大家不愿舍弃正在使用的应用。为了让大家可以体验到鸿蒙应用的魅力,同时又可以保存之前的Android系统的数据,因此需要一套系统既可以安装鸿蒙应用,也可以安装Android应用。In recent years, Huawei has released the Hongmeng system, which represents the beginning of the rise of the domestic system. However, in the process of promoting and using it, it encountered great resistance. One of the important reasons is that the software applications are incompatible and there are few Hongmeng software, which makes people unwilling to give up. application in use. In order to allow everyone to experience the charm of Hongmeng apps and save the data of the previous Android system, a system is needed that can install both Hongmeng apps and Android apps.
发明内容SUMMARY OF THE INVENTION
本发明所解决的技术问题在于提供一种在Android上支持鸿蒙应用安装的方法,以解决上述背景技术中提出的问题。The technical problem solved by the present invention is to provide a method for supporting Hongmeng application installation on Android, so as to solve the problems raised in the above background technology.
本发明所解决的技术问题采用以下技术方案来实现:一种在Android上支持鸿蒙应用安装的方法,包括以下步骤:The technical problem solved by the present invention is realized by the following technical solutions: a method for supporting Hongmeng application installation on Android, comprising the following steps:
步骤(1).定义鸿蒙应用的类型INSTALL_HAP;Step (1). Define the type INSTALL_HAP of the HarmonyOS application;
步骤(2).传入鸿蒙应用包的流文件,通过上面的解析类解析此流文件,将鸿蒙的配置文件全部获取,在接下来的安装流程中通过上面的结构类返回给原生的安装进程,从而达到鸿蒙数据被安卓安装进程接收的目的;Step (2). Enter the flow file of the Hongmeng application package, parse the flow file through the above parsing class, obtain all the configuration files of Hongmeng, and return it to the native installation process through the above structure class in the next installation process , so as to achieve the purpose of Hongmeng data being received by the Android installation process;
步骤(3).通过定义的INSTALL_HAP属性,在原生的校验过程中,跳过那些不需要的校验,只保留安卓必须的校验和鸿蒙需要告知安卓系统的数据,达到鸿蒙安装和安卓安装融合的目的;Step (3). Through the defined INSTALL_HAP attribute, in the native verification process, skip those unnecessary verifications, and only keep the verifications necessary for Android and the data that Hongmeng needs to inform the Android system to achieve Hongmeng installation and Android installation. the purpose of the fusion;
步骤(4).创建文件夹/data/accounts/applications/和/data/accounts/appdata/用来存放鸿蒙应用的基本数据和运行数据,并在初始化的rc中,将此文件夹权限更改为系统data类型,让鸿蒙的runtime可以直接访问。Step (4). Create folders /data/accounts/applications/ and /data/accounts/appdata/ to store the basic data and running data of HarmonyOS applications, and in the initialized rc, change the permissions of this folder to system data type, so that Hongmeng's runtime can directly access it.
所述步骤(1)中在安装的时候带入此值会在原有的安装流程中走新增的鸿蒙应用安装流程。In the step (1), when this value is brought in during installation, the new Hongmeng application installation process will be followed in the original installation process.
所述步骤(2)中openJsonUtil是对传入的鸿蒙应用数据流解析,将鸿蒙应用包中的配置文件根据不同标签进行解析,并将每个标签的内容传递给创建好的结构类。In the step (2), openJsonUtil parses the incoming Hongmeng application data stream, parses the configuration files in the Hongmeng application package according to different tags, and transmits the content of each tag to the created structure class.
所述步骤(2)中JsonResourceParser是保存鸿蒙应用数据的结构类,在此类中会将属于这个鸿蒙应用的配置信息保存,并给出获取的方法接口,此接口会以系统接口的方式对外暴露。In the step (2), JsonResourceParser is a structure class that saves HarmonyOS application data. In this class, the configuration information belonging to this HarmonyOS application will be saved, and the obtained method interface will be given. This interface will be exposed as a system interface. .
与现有技术相比,本发明的有益效果是:本发明可以自由的在一个手机软件上安装鸿蒙应用和安卓应用,减小了用户换机带来的巨大数据成本;开发者可以用同一个硬件和手机软件,开发安卓应用和鸿蒙应用,为企业减少了研发成本。Compared with the prior art, the beneficial effects of the present invention are: the present invention can freely install Hongmeng application and Android application on a mobile phone software, reducing the huge data cost caused by user switching; developers can use the same mobile phone software. Hardware and mobile phone software, developing Android applications and Hongmeng applications, reducing research and development costs for enterprises.
附图说明Description of drawings
图1为本发明的方法流程图。FIG. 1 is a flow chart of the method of the present invention.
图2为本发明的安装成功的效果图。FIG. 2 is an effect diagram of the successful installation of the present invention.
具体实施方式Detailed ways
为了使本发明的实现技术手段、创作特征、达成目的与功效易于明白了解,下面结合具体图示,进一步阐述本发明,在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以两个元件内部的连通。In order to make the technical means, creation features, goals and effects of the present invention easy to understand, the present invention will be further described below in conjunction with the specific figures. In the description of the present invention, it should be noted that unless otherwise specified and Definition, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it may be a fixed connection or a detachable connection, or an integral connection may be a mechanical connection or an electrical connection; it may be a Direct connection, indirect connection through intermediate media, internal communication between two components.
如图1、图2所示,一种在Android上支持鸿蒙应用安装的方法,包括以下步骤:As shown in Figure 1 and Figure 2, a method for supporting Hongmeng application installation on Android includes the following steps:
步骤(1).定义鸿蒙应用的类型INSTALL_HAP;Step (1). Define the type INSTALL_HAP of the HarmonyOS application;
步骤(2).传入鸿蒙应用包的流文件,通过上面的解析类解析此流文件,将鸿蒙的配置文件全部获取,在接下来的安装流程中通过上面的结构类返回给原生的安装进程,从而达到鸿蒙数据被安卓安装进程接收的目的;Step (2). Enter the flow file of the Hongmeng application package, parse the flow file through the above parsing class, obtain all the configuration files of Hongmeng, and return it to the native installation process through the above structure class in the next installation process , so as to achieve the purpose of Hongmeng data being received by the Android installation process;
步骤(3).通过定义的INSTALL_HAP属性,在原生的校验过程中,跳过那些不需要的校验,只保留安卓必须的校验和鸿蒙需要告知安卓系统的数据,达到鸿蒙安装和安卓安装融合的目的;Step (3). Through the defined INSTALL_HAP attribute, in the native verification process, skip those unnecessary verifications, and only keep the verifications necessary for Android and the data that Hongmeng needs to inform the Android system to achieve Hongmeng installation and Android installation. the purpose of the fusion;
步骤(4).创建文件夹/data/accounts/applications/和/data/accounts/appdata/用来存放鸿蒙应用的基本数据和运行数据,并在初始化的rc中,将此文件夹权限更改为系统data类型,让鸿蒙的runtime可以直接访问。Step (4). Create folders /data/accounts/applications/ and /data/accounts/appdata/ to store the basic data and running data of HarmonyOS applications, and in the initialized rc, change the permissions of this folder to system data type, so that Hongmeng's runtime can directly access it.
所述步骤(1)中在安装的时候带入此值会在原有的安装流程中走新增的鸿蒙应用安装流程。In the step (1), when this value is brought in during installation, the new Hongmeng application installation process will be followed in the original installation process.
所述步骤(2)中openJsonUtil是对传入的鸿蒙应用数据流解析,将鸿蒙应用包中的配置文件根据不同标签进行解析,并将每个标签的内容传递给创建好的结构类。In the step (2), openJsonUtil parses the incoming HarmonyOS application data stream, parses the configuration files in the HarmonyOS application package according to different tags, and transmits the content of each tag to the created structure class.
所述步骤(2)中JsonResourceParser是保存鸿蒙应用数据的结构类,在此类中会将属于这个鸿蒙应用的配置信息保存,并给出获取的方法接口,此接口会以系统接口的方式对外暴露。In the step (2), JsonResourceParser is a structure class that saves HarmonyOS application data. In this class, the configuration information belonging to this HarmonyOS application will be saved, and the obtained method interface will be given. This interface will be exposed as a system interface. .
本发明新增原生系统的解析接口:原生只支持解析安卓应用内容,新增了鸿蒙应用的解压和内部数据的解析,并且可以通过解析接口获取解析的鸿蒙应用数据。The present invention adds a native system parsing interface: natively only supports parsing Android application content, adds decompression of Hongmeng application and parsing of internal data, and can obtain parsed Hongmeng application data through the parsing interface.
本发明利用原生已有的安卓安装流程,增加了鸿蒙应用的安装流程,让安卓系统可以识别安装鸿蒙应用,并且可以通过已有的系统接口,获取到鸿蒙的安装数据。The present invention utilizes the existing Android installation process to increase the installation process of the Hongmeng application, so that the Android system can identify and install the Hongmeng application, and the installation data of Hongmeng can be obtained through the existing system interface.
本发明新创建一个特定目录用来存放鸿蒙数据:鸿蒙应用数据结构和安卓应用完全不同,故安装成功后需要重新解压到特定目录运行,此目录需要额外通知到鸿蒙运行时系统The present invention newly creates a specific directory to store HarmonyOS data: the data structure of HarmonyOS application is completely different from that of Android application, so after successful installation, it needs to be re-decompressed to a specific directory to run, and this directory needs to be additionally notified to the HarmonyOS runtime system
以上显示和描述了本发明的基本原理和主要特征和本发明的优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明的要求保护范围由所附的权利要求书及其等效物界定。The basic principles and main features of the present invention and the advantages of the present invention have been shown and described above. Those skilled in the art should understand that the present invention is not limited by the above-mentioned embodiments, and the descriptions in the above-mentioned embodiments and the description are only to illustrate the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have Various changes and modifications fall within the scope of the claimed invention. The claimed scope of the present invention is defined by the appended claims and their equivalents.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210340476.4A CN114610342A (en) | 2022-04-02 | 2022-04-02 | Method for supporting Hongmon application installation on Android |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210340476.4A CN114610342A (en) | 2022-04-02 | 2022-04-02 | Method for supporting Hongmon application installation on Android |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114610342A true CN114610342A (en) | 2022-06-10 |
Family
ID=81867079
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210340476.4A Pending CN114610342A (en) | 2022-04-02 | 2022-04-02 | Method for supporting Hongmon application installation on Android |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114610342A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116483328A (en) * | 2023-06-19 | 2023-07-25 | 广州信位通讯科技有限公司 | System and method for running HongMong APP on ThreadX embedded software platform |
-
2022
- 2022-04-02 CN CN202210340476.4A patent/CN114610342A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116483328A (en) * | 2023-06-19 | 2023-07-25 | 广州信位通讯科技有限公司 | System and method for running HongMong APP on ThreadX embedded software platform |
CN116483328B (en) * | 2023-06-19 | 2023-09-12 | 广州信位通讯科技有限公司 | System and method for running HongMong APP on ThreadX embedded software platform |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11403364B2 (en) | Method and terminal device for extracting web page content | |
CN109325195B (en) | Rendering method and system for browser, computer device and computer storage medium | |
CN101656789B (en) | Method for managing application information of mobile phone and application program manager | |
CN104158836B (en) | A kind of method by data render mobile application interface | |
CN102057654A (en) | Mobile device application framework | |
CN104866512B (en) | Extract the method, apparatus and system of web page contents | |
US10185704B2 (en) | Webpage browsing method, webapp framework, method and device for executing javascript and mobile terminal | |
CN104111855A (en) | A method for dynamic updating of iOS client functions based on Lua | |
CN104765617A (en) | Stream application function interface distributing method and system realized on basis of HTML5 | |
CN101710327A (en) | Method for caching local temporary files into embedded browser | |
CN102184101B (en) | Software application frame and development system thereof for smartphones | |
CN101400167A (en) | Dynamic menu implementing method, apparatus and system for mobile terminal | |
CN104714968A (en) | Method and device for internationalizing web page | |
CN108108483A (en) | The methods, devices and systems of DAO layers of verification SQL are intercepted based on SpringAop | |
CN112035132A (en) | Application language switching method and device | |
CN114610342A (en) | Method for supporting Hongmon application installation on Android | |
CN110427505A (en) | A kind of method and apparatus that batch data imports image data base | |
TW201411382A (en) | Operating method and apparatus of browser engine, browser and terminal using the same | |
CN102255961A (en) | Java 2 micro edition (J2ME)-based Web Service interface calling method | |
CN102158542A (en) | CBAE platform | |
CN105718279A (en) | Firefox based OS application generation method and apparatus | |
CN101853264B (en) | Method for providing active webpage user interface | |
CN111857924A (en) | Multi-language implementation method and device for terminal | |
CN117271363A (en) | Application test method, application test model construction method, device and electronic equipment | |
CN116521630A (en) | Task progress real-time display method and device, computer equipment and storage medium |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20220610 |
|
WD01 | Invention patent application deemed withdrawn after publication |