CN110895473B - Self-starting keep-alive system and method based on android mobile equipment - Google Patents

Self-starting keep-alive system and method based on android mobile equipment Download PDF

Info

Publication number
CN110895473B
CN110895473B CN201810972699.6A CN201810972699A CN110895473B CN 110895473 B CN110895473 B CN 110895473B CN 201810972699 A CN201810972699 A CN 201810972699A CN 110895473 B CN110895473 B CN 110895473B
Authority
CN
China
Prior art keywords
class
android
service class
alive
keep
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
CN201810972699.6A
Other languages
Chinese (zh)
Other versions
CN110895473A (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.)
Shandong Chinasoft Goldencis Software Co ltd
Original Assignee
Shandong Chinasoft Goldencis Software Co ltd
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 Shandong Chinasoft Goldencis Software Co ltd filed Critical Shandong Chinasoft Goldencis Software Co ltd
Priority to CN201810972699.6A priority Critical patent/CN110895473B/en
Publication of CN110895473A publication Critical patent/CN110895473A/en
Application granted granted Critical
Publication of CN110895473B publication Critical patent/CN110895473B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • 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

Landscapes

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

Abstract

The invention discloses a self-starting keep-alive system and a method based on android mobile equipment, comprising defining service classes and activity classes, wherein the system automatically generates configuration files in the process of defining the classes; declaring the defined service class and activity class in the configuration file; setting a transparent default desktop, and then jumping to the default desktop of the system; the application software is displayed in a running module in the android device; when restarting equipment, forcedly killing a process or cleaning one key on android equipment, the keep-alive self-starting protects the survival of application software in the running service class module displayed in the interface, thereby realizing the integration of the startup self-starting, the background continuous running of a program, and the process keep-alive and anti-killing of the application.

Description

Self-starting keep-alive system and method based on android mobile equipment
Technical Field
The invention relates to the technical field of mobile internet, in particular to a self-starting keep-alive system and method based on android mobile equipment.
Background
For the running smoothness of the respective system and the security of the mobile phone, the mobile phone manufacturers on the market at present basically except that the system application can always survive in the background, furthermore, some OS systems can carry out white list and self-starting default release on APP with large user body volume, but for common third party application, the system cannot always survive on various OS systems customized by domestic mobile phone manufacturers based on Android depth
Survival and boot-up self-start.
In the existing solution, a user is generally guided to start a self-starting switch on various OS systems manually, or the APP is forcedly brushed into the system in a root mode to be used as a system application, and the APP is mutually awakened in various similar full-home barrel APP modes, and various multi-process and double-process keep-alive modes are adopted.
Although the method in the scheme can finally solve the problems of self-starting and process keep-alive on part of equipment, the method in the scheme has great limitation and poor suitability for various Android equipment, when one-key cleaning or process killing is carried out on an Android high-version, whether double-process daemon or multi-process daemon is arranged, the method can kill the processes, and the method is difficult and complicated to realize by adopting a root mode, because the safety management and control of mobile phone manufacturers on Android mobile phones are stricter in China at present, the step of acquiring root authorities is more and more complicated, and the time cost and the realization cost are too high for developers of third-party APP.
Disclosure of Invention
(one) solving the technical problems
Aiming at the defects of the prior art, the invention provides a self-starting protection system and method based on android mobile equipment, solves the problem of great difficulty in adapting to various android equipment, and realizes the integration of three mechanisms of starting up self-starting, continuous running of a program in the background, and process keep-alive and anti-killing of an application.
(II) technical scheme
In order to achieve the above purpose, the invention is realized by the following technical scheme: an android mobile device-based self-starting keep-alive system, comprising:
the definition class module is used for defining service classes and activity classes, and the system automatically generates configuration files in the process of defining the class module;
the configuration module is used for defining the transparent android system starter in the configuration file of the activity class;
the setting module is used for setting the defined transparent android system starter as a default starter, and the desktop is displayed as a default desktop;
the jump module jumps to a default desktop of the android device system by using an application programming interface in the android system in the activity class;
the display module is used for starting the defined service class after the jump is completed, so as to display the application software in the android device;
and the keep-alive self-starting module is used for protecting the survival of application software in the running service class module displayed in the interface when restarting the equipment, forcedly killing the process or cleaning by one key.
Preferably, the method of overwriting the service class lifecycle in the defined service class and the method of overwriting the service class lifecycle in the service class declaration are performed.
Preferably, the configuration module is further configured to declare a defined service class and an activity class in the configuration file, where the service class declaration is used to detect the service class, and register a process while the service class declares, so as to view the effect of self-starting keep-alive in the service class running in the system; the theme is changed to a theme that is not displayed at all in the declaration of the activity class to set the activity class to a class that is only allowed to be displayed.
Preferably, seven methods of overwriting the active class lifecycle in the active class, and a log printing operation is performed in several methods of overwriting the service class lifecycle for quick debugging.
A self-starting keep-alive method based on android mobile equipment comprises the following steps:
defining service classes and activity classes, and automatically generating configuration files by a system in the process of defining the classes;
defining a transparent android system starter in a configuration file of the activity class;
setting a default desktop, namely setting the application software on the desktop to a default attribute, clicking a Home key on the android device or restarting the mobile phone, and selecting a defined transparent android system starter, wherein the desktop is set to be the default desktop;
jumping to a default desktop, and jumping to the default desktop of the android device system by using an application programming interface in the android system in the activity class;
the application software is displayed in a running module in the android device, and the application software is displayed in the android device by opening a defined service class;
keep-alive self-starting, when restarting equipment, forcedly killing a process or cleaning one key on android equipment, protecting the application software in the running service class module displayed in the interface from survival.
Preferably, the method of overwriting the service class lifecycle in the defined service class and the method of overwriting the service class lifecycle in the service class declaration are performed.
Preferably, the configuration file is further used for declaring defined service classes and activity classes, the service class declaration is used for detecting the service classes, and a process is registered while the service classes are declared so as to check the self-starting keep-alive effect of the service classes running in the system; the theme is changed to a theme that is not displayed at all in the declaration of the activity class to set the activity class to a class that is only allowed to be displayed.
Preferably, seven methods of overwriting the active class lifecycle in the active class, and a log printing operation is performed in several methods of overwriting the service class lifecycle for quick debugging.
(III) beneficial effects
The invention has the following beneficial effects:
1. the android device is not required to acquire Root permission, and only a default desktop is required to be replaced on the android device;
2. the android device hardware, the android system-based depth customization system of each big mobile phone manufacturer and the installed application software have no hard requirements;
3. the stability is good, and the situation that the executing task can be deleted after shutdown or forced killing does not exist;
4. the adaptability is good, and the functions of keep-alive self-starting, anti-killing and the like can be realized as long as a default desktop can be set;
5. powerful, a function setting can satisfy simultaneously that the start is from starting, process keep-alive, several functions such as service prevention and killing unify.
Drawings
FIG. 1 is a flow chart of a self-initiated keep-alive system based on android mobile devices;
FIG. 2 is a flow chart of a method of self-starting keep-alive based on android mobile devices;
FIG. 3 illustrates a method of use of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Android, android: the operating system is a free and open source code operating system based on Linux, and is mainly used for mobile equipment such as smart phones and tablet computers, and is led and developed by Google corporation and open mobile phone alliance.
APP, application software: the mobile phone software mainly refers to software installed on the smart phone, and improves the defects and individuation of an original system.
OS: an operating system.
Themes: for setting the theme of each android project and the respective project class
A subject that is not shown at all: setting a completely undisplayed theme for each android item
Content-filter: the labels in the Android engineering configuration file are used for setting one or more filters for the components.
action: an operation that the component can perform is declared, and the value must be a string about the operation and not a class constant.
category: to declare an accepted Intent type.
Root is a unique super user existing in Linux distribution plates such as UNIX systems, ubuntu and archlinux and Android systems.
Android system starter: is one of main program components in the android system, and an android desktop cannot be started without an android system starter in the android system.
Embodiments of the invention: referring to fig. 1, a self-starting keep-alive system based on an android mobile device includes:
the system is used for automatically generating configuration files in the process of defining the class module, defining a service class in an android, rewriting a plurality of methods in the service class life cycle in the service class, and executing related log printing operation and related functions in each rewritten method, wherein the purpose of the log printing operation is to quickly debug and take the log printing operation as evidence after the log printing operation is argued; an activity class in an android is defined, seven methods in the life cycle of the activity class are rewritten in the class, and corresponding logic is executed in each method.
The configuration module is used for declaring the defined service class and the activity class in the configuration file, and the purpose of declaring the service class is to enable the system to detect the service so as to execute the method for defining the service class to be realized, and simultaneously register a process in the declared service class so as to enable the running service module in the system to be more convenient to check when checking the package activity and the self-starting effect; setting the theme of the activity class as a completely non-displayed theme in the activity class declaration file, setting the configuration purpose to set the activity class as a class which only allows non-display, thereby realizing a method for executing only the life cycle in the activity class, setting one or more filters for components by using an content-filter tag in the configuration file after the activity class is operated and nothing is displayed, and adding actions and category attributes in the filters for defining transparent android system launchers.
The setting module is used for clicking a Home key on the android device or restarting the mobile phone after setting application software defining the attributes of the android system starter, so that a user can select a default android system starter popup window and select the defined transparent android system starter. Therefore, the default desktop of the system is seen to be displayed, and the current transparent android system starter actually set is the transparent android system starter customized by a developer, so that the purposes of keep-alive and self-starting are achieved.
And the jump module is used for realizing the operation of jumping to the self-contained default desktop of each android device system in the activity class defined in the definition class module, searching the package name and the starting class name of the default transparent android system starter, and loading and jumping by using the application programming interface provided by the android.
And the display module is used for starting the service class declared in the configuration module after the definition of the transparent android system starter is finished, so that the main service and the main process of the application software are displayed in the running service module of the android device.
And the keep-alive self-starting module is used for protecting the survival of application software in the running service class module displayed in the interface when restarting the equipment, forcedly killing the process or cleaning by one key.
Embodiments of the invention: referring to fig. 2, a self-starting keep-alive method based on an android mobile device includes:
defining service class and activity class, automatically generating configuration file by system in the course of defining class module, defining a service class in android, in which several methods in service class life cycle are rewritten, and in every rewritten method the related log printing operation and related functions are implemented, and the purpose of log printing operation is to quickly debug and use it as evidence after it is disputed; an activity class in an android is defined, seven methods in the life cycle of the activity class are rewritten in the class, and corresponding logic is executed in each method.
The defined service class and the activity class are declared in the configuration file, and the purpose of the declaration is to enable the system to detect the service so as to execute a method to be realized by definition in the service class, and a process is registered in the declared service class, so that a running service module in the system can be more conveniently checked when checking package activity and self-starting effect; setting the theme of the activity class as a completely non-displayed theme in the activity class declaration file, setting the configuration purpose to set the activity class as a class only allowed to be non-displayed, thereby realizing a method only executing the life cycle in the activity class, setting one or more filters for components by using an content-filter tag in the configuration file after the activity class is operated and nothing is displayed, and adding commands and classification attributes in the filters for defining transparent android system launchers.
Setting a default desktop, clicking a Home key on android device or restarting a mobile phone after setting application software defining the properties of the android system launcher, enabling a user to select a default android system launcher popup window, and selecting the default android system launcher. Therefore, the default desktop of the system is seen to be displayed, and the current transparent android system starter actually set is the transparent android system starter customized by a developer, so that the purposes of keep-alive and self-starting are achieved.
And jumping to a default desktop, wherein the operation of jumping to the default desktop of each android device system is realized in an activity class defined in a definition class module, searching for the package name and the starting class name of a default transparent android system starter, and loading and jumping by using an application programming interface provided by the android.
The application software is displayed in the running module of the android device, and after the definition of the transparent android system starter is completed, the service class declared in the configuration module is opened, so that the main service and the main process of the application software are displayed in the running service module of the android device.
And the keep-alive self-starting is used for protecting the survival of the application software in the running service class module displayed in the interface when restarting the equipment, forcedly killing the process or cleaning by one key.
The application method of the invention comprises the following steps: referring to fig. 1-3, in a first step, an android project is newly created and then a desktop settings activity class and a service class are declared, both of which are declaratively registered in a configuration file.
And secondly, adding a default desktop name and a starting class name of the current equipment according to the current mobile phone model into the desktop setting class.
And thirdly, installing the application software on the android device, clicking a home key or restarting the device, selecting a default desktop, and hooking the application as the default desktop.
And fourthly, after the third step is finished, the current default desktop is the desktop setting class set in the second step, and because the custom desktop setting class is the class of only executing the method without displaying the interface, the jump to the default desktop of the mobile phone factory according to the current mobile phone model can be directly executed in the class, so that the actual default desktop is a custom transparent android system starter, and the original system is provided in a sense.

Claims (8)

1. A self-initiated keep-alive system based on an android mobile device, comprising:
the definition class module is used for defining service classes and activity classes, and the system automatically generates configuration files in the process of defining the class module;
the configuration module is used for defining the transparent android system starter in the configuration file of the activity class;
the setting module is used for setting the defined transparent android system starter as a default starter, and the desktop is displayed as a default desktop;
the jump module jumps to a default desktop of the android device system by using an application programming interface in the android system in the activity class;
the display module is used for starting the defined service class after the jump is completed, so as to display the application software in the android device;
and the keep-alive self-starting module is used for protecting the survival of application software in the running service class module displayed in the interface when restarting the equipment, forcedly killing the process or cleaning by one key.
2. The android mobile device-based self-initiated keep-alive system of claim 1, wherein: several methods of overwriting service class lifecycles in the defined service class and several methods of overwriting service class lifecycles in the service class declarations are performed.
3. The android mobile device-based self-initiated keep-alive system of claim 1, wherein: the configuration module is also used for declaring the defined service class and the defined activity class in the configuration file, the service class declaration is used for detecting the service class, and a process is registered while the service class declares, so that the service class running in the system can check the self-starting keep-alive effect; the theme is changed to a theme that is not displayed at all in the declaration of the activity class to set the activity class to a class that is only allowed to be displayed.
4. The android mobile device-based self-initiated keep-alive system of claim 1, wherein: seven methods of overwriting the active class lifecycle in the active class, a log print operation is performed in several methods of overwriting the service class lifecycle for quick debugging.
5. A self-starting keep-alive method based on android mobile equipment is characterized in that:
defining service classes and activity classes, and automatically generating configuration files by a system in the process of defining the classes;
defining a transparent android system starter in a configuration file of the activity class;
setting a default desktop, namely setting the application software on the desktop to a default attribute, clicking a Home key on the android device or restarting the mobile phone, and selecting a defined transparent android system starter, wherein the desktop is set to be the default desktop;
jumping to a default desktop, and jumping to the default desktop of the android device system by using an application programming interface in the android system in the activity class;
the application software is displayed in a running module in the android device, and the application software is displayed in the android device by opening a defined service class;
keep-alive self-starting, when restarting equipment, forcedly killing a process or cleaning one key on android equipment, protecting the application software in the running service class module displayed in the interface from survival.
6. The android mobile device-based self-starting keep-alive method of claim 5, wherein: several methods of overwriting service class lifecycles in the defined service class and several methods of overwriting service class lifecycles in the service class declarations are performed.
7. The android mobile device-based self-starting keep-alive method of claim 5, wherein: the configuration file is also used for declaring defined service class and activity class, the service class declaration is used for detecting the service class, and a process is registered while the service class declaration is carried out, so that the running service class in the system can check the self-starting keep-alive effect; the theme is changed to a theme that is not displayed at all in the declaration of the activity class to set the activity class to a class that is only allowed to be displayed.
8. The android mobile device-based self-starting keep-alive method of claim 5, wherein: seven methods of overwriting the active class lifecycle in the active class, a log print operation is performed in several methods of overwriting the service class lifecycle for quick debugging.
CN201810972699.6A 2018-08-24 2018-08-24 Self-starting keep-alive system and method based on android mobile equipment Active CN110895473B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810972699.6A CN110895473B (en) 2018-08-24 2018-08-24 Self-starting keep-alive system and method based on android mobile equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810972699.6A CN110895473B (en) 2018-08-24 2018-08-24 Self-starting keep-alive system and method based on android mobile equipment

Publications (2)

Publication Number Publication Date
CN110895473A CN110895473A (en) 2020-03-20
CN110895473B true CN110895473B (en) 2023-05-02

Family

ID=69784739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810972699.6A Active CN110895473B (en) 2018-08-24 2018-08-24 Self-starting keep-alive system and method based on android mobile equipment

Country Status (1)

Country Link
CN (1) CN110895473B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901677B (en) * 2020-07-24 2022-08-02 海信视像科技股份有限公司 Method for uniformly controlling process starting and display equipment
CN115033305A (en) * 2022-06-27 2022-09-09 Oppo广东移动通信有限公司 Application identification method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2614795A1 (en) * 2006-12-27 2008-06-27 Yaron Mayer System and method for improving the efficiency, comfort, and/or reliability in operating systems, such as for example windows
CN105045643A (en) * 2015-09-01 2015-11-11 北京奇虎科技有限公司 Starting method and device of Launchers in Android system
WO2016059564A1 (en) * 2014-10-17 2016-04-21 Hand Me In Partial access screen lock
CN106537288A (en) * 2016-10-21 2017-03-22 北京小米移动软件有限公司 Application autostart control method and device
CN106845218A (en) * 2016-12-22 2017-06-13 山东华软金盾软件股份有限公司 A kind of word auditing method of mobile device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7366800B2 (en) * 2003-10-09 2008-04-29 International Business Machines Corporation System and method for dynamically assigning I/O priority

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2614795A1 (en) * 2006-12-27 2008-06-27 Yaron Mayer System and method for improving the efficiency, comfort, and/or reliability in operating systems, such as for example windows
WO2016059564A1 (en) * 2014-10-17 2016-04-21 Hand Me In Partial access screen lock
CN105045643A (en) * 2015-09-01 2015-11-11 北京奇虎科技有限公司 Starting method and device of Launchers in Android system
CN106537288A (en) * 2016-10-21 2017-03-22 北京小米移动软件有限公司 Application autostart control method and device
CN106845218A (en) * 2016-12-22 2017-06-13 山东华软金盾软件股份有限公司 A kind of word auditing method of mobile device

Also Published As

Publication number Publication date
CN110895473A (en) 2020-03-20

Similar Documents

Publication Publication Date Title
US20210279123A1 (en) Systems and methods of detecting power bugs
US9355017B2 (en) Automated error checking system for a software application and method therefor
Pathak et al. What is keeping my phone awake? Characterizing and detecting no-sleep energy bugs in smartphone apps
US10671381B2 (en) Continuous integration with reusable context aware jobs
US8266692B2 (en) Malware automated removal system and method
US20180121316A1 (en) Framework For Efficient Security Coverage Of Mobile Software Applications
US9824209B1 (en) Framework for efficient security coverage of mobile software applications that is usable to harden in the field code
CN102236621B (en) Computer interface information configuration system and method
CN105183457B (en) Method and device for monitoring interface life cycle callback
US9063819B2 (en) Extensible patch management
TW201541353A (en) Method for loading driver and embedded device
WO2019227708A1 (en) Online debugging apparatus and method for test case, and computer-readable storage medium
CN105068881A (en) Method, device and system for repairing abnormal operation of application program
CN110895473B (en) Self-starting keep-alive system and method based on android mobile equipment
CN104185836A (en) Method and system for verifying proper operation of computing device after system change
US9817671B2 (en) Rule-based activation of behaviors in an extensible software application
CN111880804A (en) Application program code processing method and device
CN111949529A (en) System debugging method and device, computer equipment and storage medium
US20160062875A1 (en) Method for altering execution of a program, debugger, and computer-readable medium
CN110851168B (en) Data processing method and device and computer readable storage medium
CN110737463A (en) analysis method of key function source information, intelligent terminal and storage medium
Riganelli et al. Controlling interactions with libraries in android apps through runtime enforcement
WO2019136861A1 (en) Method and device for implementing hook function based on high-level programming language
CN110990054B (en) Configuration processing method and device of open source framework
CN104572199B (en) The method and apparatus that a kind of No starting item starts

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
PP01 Preservation of patent right

Effective date of registration: 20231113

Granted publication date: 20230502

PP01 Preservation of patent right