CN105183505A - Method for implementing silent installation of application and handheld device - Google Patents
Method for implementing silent installation of application and handheld device Download PDFInfo
- Publication number
- CN105183505A CN105183505A CN201510496634.5A CN201510496634A CN105183505A CN 105183505 A CN105183505 A CN 105183505A CN 201510496634 A CN201510496634 A CN 201510496634A CN 105183505 A CN105183505 A CN 105183505A
- Authority
- CN
- China
- Prior art keywords
- application program
- handheld device
- silence
- external memory
- memory equipment
- 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
Abstract
The present invention discloses a method for implementing silent installation of an application and a handheld device. The method comprises: S1. when a handheld device determines restoration of factory configuration, determining whether the handheld device is connected to an external storage device; S2. when the handheld device is connected to an external storage device, determining whether an installation package and a script file of an application are stored in the external storage device, wherein the script file is used for implementing silent installation of the application; and S3. when the installation package and the script file of the application are stored in the external storage device, executing the script file to perform the silent installation of the application. By implementing the technical scheme provided by the present invention, even if the handheld device restores the factory configuration, a user does not need to manually install the application, thereby improving user experience.
Description
Technical field
The present invention relates to field, particularly relate to a kind of realize application program mourn in silence install method and handheld device.
Background technology
In handheld device (such as based on the RFID handheld device of Android system), when file system is destroyed, system just cannot normally be run, now usually need to allow System recover Default Value, but the application program of after factory reset, handheld device being installed just can be lost, user if desired re-uses these application programs, can only manual installation be carried out, be brought very burden to user like this, experience sense extreme difference.
Summary of the invention
The technical problem to be solved in the present invention is, for the defect of the above-mentioned poor user experience of prior art, provide a kind of Consumer's Experience good realize application program mourn in silence install method and handheld device.
The technical solution adopted for the present invention to solve the technical problems is: construct a kind of realize application program mourn in silence install method, comprising:
S1. handheld device is when judging to recover plant, judges whether to be connected with External memory equipment;
S2. when being connected with External memory equipment, judge the installation kit and the script file that whether store application program in described External memory equipment, described script file is for realizing the installation of mourning in silence of described application program;
S3. when storing installation kit and the script file of application program, described script file is performed, with installation of mourning in silence to described application program.
Mourn in silence in the method for installation in the application program that realizes of the present invention, described handheld device is the handheld device based on Android system, and described External memory equipment is SD card.
Mourn in silence in the method for installation in the application program that realizes of the present invention, described step S3 comprises:
S31. the installation kit of described application program is processed;
S32. the installation kit after process is resolved;
S33. the installation kit after parsing is installed.
Mourn in silence in the method for installation in the application program that realizes of the present invention, in described step S1, judge whether that the step being connected with External memory equipment comprises:
S11. kernel bottom detects and load driver automatically, and has during External memory equipment in judgement and send corresponding event message to system layer;
S12. system layer produces corresponding/mnt/sdcard node detecting when kernel bottom sends corresponding event message;
S13. existence/mnt/sdcard node is judged whether.
Mourn in silence in the method for installation in the application program that realizes of the present invention, in described step S1, judge whether factory reset by zone bit.
The present invention also construct a kind of realize application program mourn in silence install handheld device, comprising:
First judge module, for when judging that handheld device recovers plant, judges whether to be connected with External memory equipment;
Second judge module, for when being connected with External memory equipment, judges the installation kit and the script file that whether store application program in described External memory equipment, and described script file is for realizing the installation of mourning in silence of described application program;
Execution module, for when storing installation kit and the script file of application program, performs described script file, with installation of mourning in silence to described application program.
Mourn in silence in the handheld device of installation in the application program that realizes of the present invention, described handheld device is the handheld device based on Android system, and described External memory equipment is SD card.
Mourn in silence in the handheld device of installation in the application program that realizes of the present invention, described execution module comprises:
Processing unit, processes the installation kit of described application program;
Resolution unit, for resolving the installation kit after process;
Installation unit, for installing the installation kit after parsing.
Mourn in silence in the handheld device of installation in the application program that realizes of the present invention, described first judge module comprises:
Kernel bottom detecting unit, for automatically detecting and load driver, and has during External memory equipment and sends corresponding event message in judgement to system layer;
System layer detecting unit, for producing corresponding/mnt/sdcard node detecting when kernel bottom sends corresponding event message;
Node judging unit, for judging whether existence/mnt/sdcard node.
Mourn in silence in the handheld device of installation in the application program that realizes of the present invention, described first judge module, for judging whether factory reset by zone bit.
Implement technical scheme of the present invention, in advance by the installation kit of application program and script file stored in External memory equipment.When handheld device needs factory reset because system cannot normally run, External memory equipment can be connected to this handheld device, the system of handheld device can from this External memory equipment set up applications, and, due to employing is mounting means of mourning in silence, and allows user be confirmed whether to install so can not point out when installing.Like this, even if handheld device factory reset, also without the need to user's manual installation application program, therefore improve Consumer's Experience.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is that the present invention realizes application program and to mourn in silence the process flow diagram of embodiment of the method one installed;
Fig. 2 is the process flow diagram of step S1 preferred embodiment in Fig. 1;
Fig. 3 is the process flow diagram of step S3 preferred embodiment in Fig. 1;
Fig. 4 is that the present invention realizes application program and to mourn in silence the logical diagram of handheld device embodiment one installed.
Embodiment
Fig. 1 is that the present invention realizes application program and to mourn in silence the process flow diagram of embodiment of the method one installed, and the application program of this embodiment method of installing of mourning in silence comprises the following steps:
S1. handheld device is when judging to recover plant, judges whether to be connected with External memory equipment, if so, then performs step S2; If not, then step S4 is performed.In this step, External memory equipment is such as SD card or USB flash disk.In addition, judge whether factory reset by zone bit, such as, if zone bit is 1, expression system does not have factory reset, then normally enter the main interface of system.If zone bit is 0, represent system factory reset;
S2. judge the installation kit and the script file that whether store application program in described External memory equipment, described script file, for realizing the installation of mourning in silence of described application program, if so, then performs step S3; If not, then step S4 is performed;
S3. described script file is performed, with installation of mourning in silence to described application program;
S4. main interface is got back to.
By implementing the technical scheme of this embodiment, in advance by the installation kit of application program and script file stored in External memory equipment.When the system of handheld device cannot normally run need factory reset time, the system of handheld device can from this External memory equipment set up applications, External memory equipment is SD card or USB flash disk such as, and, due to employing is mounting means of mourning in silence, and allows user be confirmed whether to install so can not point out when installing.Like this, even if handheld device factory reset, also without the need to user's manual installation application program, therefore improve Consumer's Experience.
Described herein, below in an example, handheld device is the handheld device based on Android (Android) system, and External memory equipment is SD card.Certainly, in other embodiments, handheld device also can be the handheld device based on other system, and External memory equipment also can be USB flash disk etc.
And script file is text, user can use arbitrary text editor to create script file.Script is the extension of autoexec, is the program that a kind of plain text is preserved, different command in combination can be got up, and perform automatically and continuously by the order determined, realize certain logic branch etc.Performing script file is rely on Runtime class, and it is a class relevant with JVM runtime environment, and Runtime.getRuntime () can obtain the runtime environment of current JVM, and the exit method in Runtime exits the method for current JVM.
In an embodiment of the present invention, the content of the AutoRun.sh script file write is: pminstall-r/mnt/sdcard/*.apk, wherein ,/mnt/sdcard/ is after SD card inserts handheld device, the path that carry (mount) gets up in system; Pminstall-r is set up applications of mourning in silence.That is, before application programs is carried out mourning in silence and installed, need the path first determining carry SD card, namely determine/mnt/sdcard node.
Composition graphs 2, in step S1 embodiment illustrated in fig. 1, judges whether that the step being connected with External memory equipment specifically comprises:
S11. kernel bottom detects and load driver automatically, and has during External memory equipment in judgement and send corresponding event message to system layer;
S12. system layer produces corresponding/mnt/sdcard node detecting when kernel bottom sends corresponding event message;
S13. judge whether existence/mnt/sdcard node, if so, then illustrate that this handheld device is inserted with SD card, perform step S2; If not, then illustrate that this handheld device does not insert SD card, perform step S4.
In the step S11 of this embodiment, when there being new equipment SD card to insert, kernel bottom (kernel) automatically will detect and loads corresponding driving, and the sysfs mechanism simultaneously in kernel bottom can send corresponding event (event) message when there being new drive load to system layer.
In the step S12 of this embodiment, system layer can experience following step: in NetlinkManager, onEvent () method by reference in NetlinkHandler class receives the event message from kernel bottom, event message after NetlinkManager process can be divided into five kinds, respectively: block, switch, usb_composite, battery, power_supply, wherein, the event of SD card carry is block.In VolumeManager, receive the event message after NetlinkManager process.In DirectVolume, primary responsibility is further processed the event imported into, and block event can be divided into again: Add, Removed, Change, Noaction these four kinds, in the flow process of SD card carry, corresponding A ddaction, that is, create equipment/mnt/sdcard node.In Volume, such is the main class of responsible SD card carry, and wherein, Volume.cpp primary responsibility checks SD card form, and carry is carried out to the SD card of composite demand, and by Socket by the Message Transmission of SD card carry to NativeDaemonConnector.In MountSD card, MountService is a service class, and this service is system service, provides the management to External memory equipment, inquiry etc.When outside storage device status changes, such can send and inform upper layer application accordingly.
Step S3 in composition graphs 3, Fig. 1 can specifically comprise:
S31. the installation kit of described application program is processed;
S32. the installation kit after process is resolved;
S33. the installation kit after parsing is installed.
In this embodiment, first, call pm program to start to install, when calling Pm installation, be generally that shell runs a pm order, and transmit corresponding parameter, we are connected to machine by adb, and when we install a software package, shell runs pm program and imports the parameters such as pminstall*** into.When matching install, run runInstall.Then, in PackageManagerService, installation pre-treatment is carried out to installation kit, first calls the installPackage interface of PackageManager, and the installPackage finally calling PackageManagerService carries out concrete installment work.In nstallPackage, a main transmission INIT_COPY message finally calls doHandleMessage to this message of PackageHandler, PackageHandler process.For INIT_COPY message, first connectToService is called, Connection Service DefaultContainerService, the onServiceConnected of DefaultContainerConnection is triggered when successful connection, a MCS_BOUND has been sent out toward PackageHandler, trigger startCopy, handleStartCopy and carry out the front preliminary work of some installations, finally call handleReturnCode.Here a New message, is set to new Runnable out here its callback, finally can be called in run method by Handle, Looper, Message mechanism and carry out.In installPackageLI, package can be resolved new PackageParser, call parsePackage function parsePackage (FilesourceFile, StringdestCodePath, DisplayMetricsmetrics, intflags) after function carries out some process to parameter, finally call parsePackage (Resourcesres, XmlResourceParserparser, intflags, String [] outError) bag is resolved, mainly configuration file AndroidManifest.xml file is resolved inside this function.After having resolved, call the installation that installNewPackageLI carries out wrapping, here mainly have invoked scanPackageLI, bag is installed, and the information such as package, provider, service, receiver and activity of preserving are kept in PackageManagerService service.Finally to be communicated the do_install called in installd.c by socket, namely create some catalogues.
Fig. 4 is that the present invention realizes application program and to mourn in silence the logical diagram of handheld device embodiment one installed, the handheld device of this embodiment comprises: the first judge module 10, second judge module 20 and execution module 30, wherein, first judge module 10 is for when judging that handheld device recovers plant, judge whether to be connected with External memory equipment, preferably, this first judge module 10 judges whether factory reset by zone bit; Second judge module 20, for when being connected with External memory equipment, judges the installation kit and the script file that whether store application program in described External memory equipment, and described script file is for realizing the installation of mourning in silence of described application program; Execution module 30, for when storing installation kit and the script file of application program, performs described script file, with installation of mourning in silence to described application program.
It should be noted that, be below that the handheld device inserted based on Android system for SD card is described.In a preferred embodiment, first judge module can specifically comprise: kernel bottom detecting unit, system layer detecting unit and node judging unit, wherein, kernel bottom detecting unit, for automatically detecting and load driver, and have during External memory equipment and send corresponding event message in judgement to system layer; System layer detecting unit, for producing corresponding/mnt/sdcard node detecting when kernel bottom sends corresponding event message; Node judging unit, for judging whether existence/mnt/sdcard node.In a further advantageous embodiment, execution module can specifically comprise: processing unit, resolution unit and installation unit, and wherein, the installation kit of processing unit to described application program processes; Resolution unit is used for the installation kit after to process and resolves; Installation unit is used for the installation kit after to parsing and installs.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within right of the present invention.
Claims (10)
1. realize application program mourn in silence install a method, it is characterized in that, comprising:
S1. handheld device is when judging to recover plant, judges whether to be connected with External memory equipment;
S2. when being connected with External memory equipment, judge the installation kit and the script file that whether store application program in described External memory equipment, described script file is for realizing the installation of mourning in silence of described application program;
S3. when storing installation kit and the script file of application program, described script file is performed, with installation of mourning in silence to described application program.
2. according to claim 1 realize application program mourn in silence install method, it is characterized in that, described handheld device is the handheld device based on Android system, and described External memory equipment is SD card.
3. according to claim 2 realize application program mourn in silence install method, it is characterized in that, described step S3 comprises:
S31. the installation kit of described application program is processed;
S32. the installation kit after process is resolved;
S33. the installation kit after parsing is installed.
4. according to claim 2 realize application program mourn in silence install method, it is characterized in that,
In described step S1, judge whether that the step being connected with External memory equipment comprises:
S11. kernel bottom detects and load driver automatically, and has during External memory equipment in judgement and send corresponding event message to system layer;
S12. system layer produces corresponding/mnt/sdcard node detecting when kernel bottom sends corresponding event message;
S13. existence/mnt/sdcard node is judged whether.
5. according to claim 2 realize application program mourn in silence install method, it is characterized in that, in described step S1, judge whether factory reset by zone bit.
6. realize application program mourn in silence install a handheld device, it is characterized in that, comprising:
First judge module, for when judging that handheld device recovers plant, judges whether to be connected with External memory equipment;
Second judge module, for when being connected with External memory equipment, judges the installation kit and the script file that whether store application program in described External memory equipment, and described script file is for realizing the installation of mourning in silence of described application program;
Execution module, for when storing installation kit and the script file of application program, performs described script file, with installation of mourning in silence to described application program.
7. according to claim 6 realize application program mourn in silence install handheld device, it is characterized in that, described handheld device is the handheld device based on Android system, and described External memory equipment is SD card.
8. according to claim 7 realize application program mourn in silence install handheld device, it is characterized in that, described execution module comprises:
Processing unit, processes the installation kit of described application program;
Resolution unit, for resolving the installation kit after process;
Installation unit, for installing the installation kit after parsing.
9. according to claim 7 realize application program mourn in silence install handheld device, it is characterized in that,
Described first judge module comprises:
Kernel bottom detecting unit, for automatically detecting and load driver, and has during External memory equipment and sends corresponding event message in judgement to system layer;
System layer detecting unit, for producing corresponding/mnt/sdcard node detecting when kernel bottom sends corresponding event message;
Node judging unit, for judging whether existence/mnt/sdcard node.
10. according to claim 7 realize application program mourn in silence install handheld device, it is characterized in that, described first judge module, for judging whether factory reset by zone bit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510496634.5A CN105183505A (en) | 2015-08-13 | 2015-08-13 | Method for implementing silent installation of application and handheld device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510496634.5A CN105183505A (en) | 2015-08-13 | 2015-08-13 | Method for implementing silent installation of application and handheld device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105183505A true CN105183505A (en) | 2015-12-23 |
Family
ID=54905603
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510496634.5A Pending CN105183505A (en) | 2015-08-13 | 2015-08-13 | Method for implementing silent installation of application and handheld device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105183505A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105843647A (en) * | 2016-03-28 | 2016-08-10 | 上海斐讯数据通信技术有限公司 | Application installation method and device |
CN105893082A (en) * | 2016-03-28 | 2016-08-24 | 上海斐讯数据通信技术有限公司 | Application installation system and method |
CN108566492A (en) * | 2018-04-26 | 2018-09-21 | 三星电子(中国)研发中心 | A kind of method and apparatus for the system level setting restoring APP |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101051912A (en) * | 2006-04-05 | 2007-10-10 | 迈世亚(北京)科技有限公司 | Data automatic updating method |
CN102622241A (en) * | 2011-01-26 | 2012-08-01 | 腾讯科技(深圳)有限公司 | Software upgrading method and software upgrading device |
CN103902300A (en) * | 2012-12-24 | 2014-07-02 | 珠海市君天电子科技有限公司 | Method and system for rapidly installing APK program on Android simulator |
CN104461587A (en) * | 2013-09-13 | 2015-03-25 | 卓望数码技术(深圳)有限公司 | Method and device for installing application package in Android terminal |
-
2015
- 2015-08-13 CN CN201510496634.5A patent/CN105183505A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101051912A (en) * | 2006-04-05 | 2007-10-10 | 迈世亚(北京)科技有限公司 | Data automatic updating method |
CN102622241A (en) * | 2011-01-26 | 2012-08-01 | 腾讯科技(深圳)有限公司 | Software upgrading method and software upgrading device |
CN103902300A (en) * | 2012-12-24 | 2014-07-02 | 珠海市君天电子科技有限公司 | Method and system for rapidly installing APK program on Android simulator |
CN104461587A (en) * | 2013-09-13 | 2015-03-25 | 卓望数码技术(深圳)有限公司 | Method and device for installing application package in Android terminal |
Non-Patent Citations (1)
Title |
---|
刘成: ""安卓手机系统备份那些事"", 《电脑知识与技术(经验技巧)》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105843647A (en) * | 2016-03-28 | 2016-08-10 | 上海斐讯数据通信技术有限公司 | Application installation method and device |
CN105893082A (en) * | 2016-03-28 | 2016-08-24 | 上海斐讯数据通信技术有限公司 | Application installation system and method |
CN108566492A (en) * | 2018-04-26 | 2018-09-21 | 三星电子(中国)研发中心 | A kind of method and apparatus for the system level setting restoring APP |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10761860B2 (en) | Dynamically loaded plugin architecture | |
CN102402427B (en) | A kind of update method of java application and device | |
US7840970B2 (en) | Graphical user interface components that interact through a collaboration server | |
WO2016177341A1 (en) | Interface calling method and device, and terminal | |
EP2701059A1 (en) | Method and apparatus for loading application program | |
CN108121543B (en) | Software code compiling processing method and device | |
CN103019941B (en) | program debugging method and device | |
CN106066803B (en) | application program operation control method and device | |
CN105159732A (en) | Method for installing or updating application program in mobile terminal and mobile terminal | |
EP3040854B1 (en) | Method, apparatus and storage medium for dynamically patching function | |
CN101025698A (en) | Apparatus for forcibly terminating thread blocked on input/output operation and method for the same | |
CN105183505A (en) | Method for implementing silent installation of application and handheld device | |
CN104731622B (en) | The loading method of a kind of application program, device and mobile terminal | |
US20160357535A1 (en) | System and method for importing and exporting an integration flow in a cloud-based integration platform | |
CN107678782B (en) | Process protection method, device, equipment and computer readable storage medium | |
CN101957766A (en) | Method, device and system for weaving byte code | |
CN101719074A (en) | patch-realizing method and device | |
WO2017041499A1 (en) | Software upgrade method and system, and computer-readable storage medium | |
CN104636172A (en) | Application upgrading method and device | |
CN103970601A (en) | Operational order execution method and operational order execution device | |
CN111143034B (en) | Method, device and system for controlling network data forwarding plane | |
CN105260184B (en) | A kind of adjustment method and device for restoring image file | |
US10949306B2 (en) | System and method of a cloud service provider virtual machine recovery | |
CN107911442B (en) | Receiving response interface interaction method and device, computer equipment and storage medium | |
CN113051088B (en) | Program loading method, device, equipment and computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20151223 |
|
RJ01 | Rejection of invention patent application after publication |