CN112667311A - Software state switching method applied to android system - Google Patents
Software state switching method applied to android system Download PDFInfo
- Publication number
- CN112667311A CN112667311A CN202011538747.4A CN202011538747A CN112667311A CN 112667311 A CN112667311 A CN 112667311A CN 202011538747 A CN202011538747 A CN 202011538747A CN 112667311 A CN112667311 A CN 112667311A
- Authority
- CN
- China
- Prior art keywords
- android
- attribute
- software
- software state
- state switching
- 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
Images
Abstract
The invention discloses a software state switching method applied to an android system, and relates to the technical field of data processing. The method comprises the following steps: step 1: defining the name of the software state attribute as a prefix type of 'persistence.'; step 2: presetting application and system code requirements to perform function separation according to software state attributes; and step 3: and the preset state switching application calls an android system attribute setting interface to set the software state attribute. According to the method, the configuration of the state of the whole machine software is realized through the system attributes of the Android standard, and the problem that the Android application cannot switch the state of the whole machine through the standard Android interface is solved.
Description
Technical Field
The invention relates to the field of software design of an Android system, in particular to a software state switching method applied to the Android system.
Background
At present, in order to meet different requirements of multiple market channels such as families, hotels, schools, projects and the like, a television manufacturer can carry different software states to match the requirements. From the consideration of software development efficiency and maintenance cost, television manufacturers adopt the same production mirror image for the television complete machine adopting the same core scheme, and the mirror image comprises state options of a plurality of complete machine models, so that the state options correspond to a plurality of software states. During production, the state data of the specific complete machine to be produced is written into the independent data partition through the data configuration tool, and after the complete television is started, the state data is read from the storage equipment, and the software state is automatically switched to the corresponding state.
In some special market demands, customers want to dynamically switch software states for purchased televisions, and only need to change state data in the data partition as understood from the above production flow. The usual approach is for the television manufacturer to preset a status switch application by which to change the status data in the data partition. Due to the particularity of the state data, the Android application cannot call standard interface change. In order to support Android applications to change the data, a set of special interface supply calls is packaged from a driver layer to a native layer and then to java of a data partition. The method has poor process universality, and meanwhile, if the packaged interface is exposed, the risk of illegal tampering of state data by other applications exists.
Disclosure of Invention
The invention aims to provide a software state switching method applied to an android system, and aims to solve the problems in the background art. The method adopts an android system attribute read-write mechanism from the aspects of method universality and illegal tampering prevention
In order to achieve the purpose, the invention adopts the following technical scheme:
a software state switching method applied to an android system comprises the following steps:
step 1: defining the name of the software state attribute as a prefix type of 'persistence.';
step 2: presetting application and system code requirements to perform function separation according to software state attributes;
and step 3: the preset state switching application calls the android system attribute setting interface to set the software state attribute, so that the software work of the packaging interface is avoided, and the problem of universality is solved.
In the step 3, the system attribute setting interface is native android setting interface comprising Java
Set, set interface property _ set of layer C, Shell command setprop.
In the step 3, before the preset state switching application calls the android system attribute setting interface to set the software state attribute, an authority checking mechanism is added in the system attribute setting process, and the system attribute value can be changed after the checking is passed, so that the problem of configuration falsification by illegal application is solved.
Compared with the prior art, the invention has the beneficial effects that:
the method abandons independent data partitioning and encapsulates a set of special interface, and adopts a system attribute interface mode with better universality; and an authority checking mechanism of attribute setting is added, so that the risk of illegal tampering of other applications is prevented. According to the method, the configuration of the state of the whole machine software is realized through the system attributes of the Android standard, and the problem that the Android application cannot switch the state of the whole machine through the standard Android interface is solved.
Drawings
Fig. 1 is a flowchart of a software state switching method applied to an android system.
Detailed Description
The present invention will be further described with reference to the following examples, which are intended to illustrate only some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, other embodiments used by those skilled in the art without any creative effort belong to the protection scope of the present invention.
Example 1:
as shown in fig. 1, the specific implementation on the intelligent television software (9.0 in android version) of the model of the changhong 32D5PF _ LJPJ is as follows:
(1) the method comprises the steps of specifying a software state attribute name as persistence.config.firmware, representing home and hotel software states by two different attribute values respectively, distinguishing different functions and displaying by preset application through the persistence.config.firmware, and distinguishing system flows such as an application installation flow, a background application process keep-alive mechanism and the like in a system code through the persistence.config.firmware.
(2) The SystemConfig application is preset in the system partition, one of its functions is used to remotely control the change property persistence.
(3) The SystemConfig application has a login interface, and only when the login verification is passed, the persistence.
(4) And adding permission check in an interface set by the system attribute, wherein the permission can be changed only by the process of the SystemConfig application.
The above description is only a preferred embodiment of the present invention, and the present invention is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.
Claims (3)
1. A software state switching method applied to an android system is characterized by comprising the following steps:
step 1: defining the name of the software state attribute as a prefix type of 'persistence.';
step 2: presetting application and system code requirements to perform function separation according to software state attributes;
and step 3: and the preset state switching application calls an android system attribute setting interface to set the software state attribute.
2. The software state switching method applied to the android system according to claim 1, wherein in the step 3, the system attribute setting interface is an android native setting interface system properties.set including Java, a setting interface property _ set of a C layer, and a Shell command setprop.
3. The software state switching method applied to the android system according to claim 1, wherein in step 3, before a preset state switching application calls a system attribute setting interface of the android to set the software state attribute, an authority check mechanism is added in a process of setting the system attribute, and a system attribute value can be changed after the check is passed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011538747.4A CN112667311A (en) | 2020-12-23 | 2020-12-23 | Software state switching method applied to android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011538747.4A CN112667311A (en) | 2020-12-23 | 2020-12-23 | Software state switching method applied to android system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112667311A true CN112667311A (en) | 2021-04-16 |
Family
ID=75408491
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011538747.4A Pending CN112667311A (en) | 2020-12-23 | 2020-12-23 | Software state switching method applied to android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112667311A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104281803A (en) * | 2014-09-16 | 2015-01-14 | 中国科学院信息工程研究所 | System permission management method and equipment |
CN106569948A (en) * | 2016-10-26 | 2017-04-19 | 北京小鸟看看科技有限公司 | Method and device for grabbing debugging information of Android equipment |
CN108595214A (en) * | 2018-04-11 | 2018-09-28 | 北京海杭通讯科技有限公司 | Android user versions obtain the method and system of root privileges under SELinux compulsory modes |
CN109656577A (en) * | 2018-12-07 | 2019-04-19 | 陕西瑞迅电子信息技术有限公司 | A kind of method and device of the customized ROM of industrial personal computer |
-
2020
- 2020-12-23 CN CN202011538747.4A patent/CN112667311A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104281803A (en) * | 2014-09-16 | 2015-01-14 | 中国科学院信息工程研究所 | System permission management method and equipment |
CN106569948A (en) * | 2016-10-26 | 2017-04-19 | 北京小鸟看看科技有限公司 | Method and device for grabbing debugging information of Android equipment |
CN108595214A (en) * | 2018-04-11 | 2018-09-28 | 北京海杭通讯科技有限公司 | Android user versions obtain the method and system of root privileges under SELinux compulsory modes |
CN109656577A (en) * | 2018-12-07 | 2019-04-19 | 陕西瑞迅电子信息技术有限公司 | A kind of method and device of the customized ROM of industrial personal computer |
Non-Patent Citations (1)
Title |
---|
XIEZHAOXIAN: ""android persist属性使用"", 《HTTPS://BLOG.CSDN.NET/XZX208/ARTICLE/DETAILS/85637647》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7676752B2 (en) | System and method to specify device specific user interface information in the firmware of a USB device | |
US9792113B2 (en) | Self-describing device module and system and computer-readable medium for the production thereof | |
EP3242199B1 (en) | Flash memory controller and control method for flash memory controller | |
CN100470519C (en) | Multiple burst protocol device controller | |
KR100255098B1 (en) | Test apparatus | |
CN103176789A (en) | Method and system used for realizing function extension of open platform | |
JPH10171681A (en) | Object-oriented device management system | |
JP2723367B2 (en) | Communication network equipment | |
CN104615396A (en) | Android-based resolution ratio automatic adjustment method and system | |
CN110798462B (en) | Smart home system and equipment access method | |
CN105867295A (en) | Communication method and upper computer | |
JPH0348959A (en) | Selector of memory and peripheral chip | |
CN112667311A (en) | Software state switching method applied to android system | |
CN104216728A (en) | Method for connecting USB network card, USB network card and PC | |
US7100032B2 (en) | Method and apparatus for identifying hardware compatibility and enabling stable software images | |
JPH04245545A (en) | Method of constituting multi-user virtual computer system and multi-user virtual computer system | |
CN105227984A (en) | Remote controller key distribution method and device | |
US11144370B2 (en) | Communication method for virtual machines, electronic device, and non-transitory computer readable storage medium | |
KR100191110B1 (en) | Control system for controlling consumer apparatus, in particular audio and/or video apparatus and consumer apparatus | |
US6453024B1 (en) | Graphical software for reconfiguring modems having an electrically adaptable telephone line interface | |
EP3242237B1 (en) | Sub-area-based method and device for protecting information of mcu chip | |
CN112230945B (en) | Method and device for improving equipment compatibility, electronic equipment and storage medium | |
CN110673894A (en) | Automatic loading method for BOB module ED of home gateway | |
CN113218042A (en) | Air conditioner outdoor unit parameter modification method and device, storage medium and air conditioning system | |
CN104484215A (en) | Application installation method, device and intelligent terminal |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210416 |