CN105808269A - Method and apparatus for installing application to virtual SD (Secure Digital) card - Google Patents
Method and apparatus for installing application to virtual SD (Secure Digital) card Download PDFInfo
- Publication number
- CN105808269A CN105808269A CN201410839245.3A CN201410839245A CN105808269A CN 105808269 A CN105808269 A CN 105808269A CN 201410839245 A CN201410839245 A CN 201410839245A CN 105808269 A CN105808269 A CN 105808269A
- Authority
- CN
- China
- Prior art keywords
- card
- virtual
- application
- carry
- directory
- 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.)
- Granted
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a method and an apparatus for installing an application to a virtual SD (Secure Digital) card. The method comprises the steps of modifying a daemon process of the virtual SD card, mounting a real Flash space corresponding to the virtual SD card to a temporary directory, and then mounting the temporary directory to a mounting point of the virtual SD card; creating a hidden directory used for simulating a real SD card and mounting the hidden directory to a middle directory; and starting a mounting binding service in a mounting service, and triggering a peripheral media updating method of an application installation service to mount the middle directory to an application installation package directory. According to the method and apparatus, by modifying the daemon process of the virtual SD card in an Android system, the function of the virtual SD card achieves the same application installation effect as the real SD card, namely, the application installed to the virtual SD card does not automatically disappear after system restarting, so that a virtual SD card mechanism is perfected.
Description
Technical field
The present invention relates to software field, particularly relate to a kind of method and device that application is installed to virtual SD card.
Background technology
In android system, SD card (ExternalStorage) function is very powerful, application program can select to be installed to SD card, some application program is in operation and is likely to need SD card to store data, also some big game needs substantial amounts of SD card space, if so system does not access SD card, some APK will encounter the problem installed or run, but for present hardware platform, a lot of all built-in memory spaces (Nand/iNandFlash) of several even dozens of G, therefore a part of spatial simulation of built-in Flash can be generally SD card (virtual SD card) by manufacturer, so when not accessing external SD card, system can also normally use the function of SD card.
In prior art, it is typically all use FUSE(FilesysteminUserspace, user's space file system) mechanism realizes the function of SD card, but when application program is installed to this virtual SD card, after restarting system, the application program being before installed to virtual SD card can disappear automatically, namely cannot realize the function of true SD card.
Therefore, prior art has yet to be improved and developed.
Summary of the invention
In view of above-mentioned the deficiencies in the prior art, it is an object of the invention to provide and a kind of application is installed to method and the device of virtual SD card, it is intended to solve after existing virtual SD is stuck in and restarts system, the problem that the application program of installation disappears automatically.
Technical scheme is as follows:
A kind of method that application is installed to virtual SD card, wherein, including step:
A, revise virtual SD card finger daemon, the true Flash space that virtual SD card is corresponding is mounted to a temp directory, then temp directory is mounted to the mount point of virtual SD card;
Collapse directories, for simulating the collapse directories of true SD card, is mounted to a middle directory by B, establishment one;
C, BootLoader binding service in carry services, and trigger the renewal peripheral hardware media method of application program build-in services, middle directory to be mounted to application installation kit catalogue.
The described method that application is installed to virtual SD card, wherein, described step B specifically includes:
B1, in described true Flash space, create described collapse directories;
B2, described collapse directories is mounted to middle directory.
The described method that application is installed to virtual SD card, wherein, described step C specifically includes:
C1, BootLoader binding service in carry service arrangement method;
C2, in carry service system preparation method, trigger the renewal peripheral hardware media state method of application program;
C3, notified that by described renewal peripheral hardware media state method middle directory is mounted to application installation kit catalogue by equipment carry program.
The described method that application is installed to virtual SD card, wherein, also includes after described step C3:
After C4, system boot by scan described application installation kit catalogue come check whether there is application be installed on virtual SD card.
A kind of device that application is installed to virtual SD card, it is characterised in that including:
Process modified module, is used for revising virtual SD card finger daemon, the true Flash space that virtual SD card is corresponding is mounted to a temp directory, then temp directory is mounted to the mount point of virtual SD card;
Module is added in carry binding service, for creating one for simulating the collapse directories of true SD card, collapse directories is mounted to a middle directory;
Carry service modified module, services for BootLoader binding in servicing at carry, and triggers the renewal peripheral hardware media method of application program build-in services, so that middle directory to be mounted to application installation kit catalogue.
The described device that application is installed to virtual SD card, wherein, the binding service of described carry is added module and is specifically included:
Collapse directories creating unit, for creating described collapse directories in described true Flash space;
First carry unit, for being mounted to middle directory by described collapse directories.
The described device that application is installed to virtual SD card, wherein, described carry service modified module specifically includes:
Start unit, for the binding service of BootLoader in carry service arrangement method;
Trigger element, for triggering the renewal peripheral hardware media state method of application program in carry service system preparation method;
By described renewal peripheral hardware media state method, second carry unit, for notifying that middle directory is mounted to application installation kit catalogue by equipment carry program.
The described device that application is installed to virtual SD card, wherein, described carry service modified module also includes:
Inspection unit, for after system boot by scan described application installation kit catalogue come check whether there is application be installed to virtual SD card.
Beneficial effect: the present invention is modified the virtual SD card finger daemon in android system and carry service, virtual SD khaki function is made to reach, with true SD card, the effect that application is identical is installed, namely after restarting system, it is installed to the application program of virtual SD card without automatic disappearance, thus perfect virtual SD card mechanism.
Accompanying drawing explanation
Fig. 1 is the flow chart of a kind of method preferred embodiment that application is installed to virtual SD card of the present invention.
Fig. 2 is the particular flow sheet of step S102 in method shown in Fig. 1.
Fig. 3 is the particular flow sheet of step S103 in method shown in Fig. 1.
Fig. 4 is the structured flowchart of a kind of device preferred embodiment that application is installed to virtual SD card of the present invention.
Fig. 5 is the concrete structure block diagram that in Fig. 4 shown device, module is added in carry binding service.
Fig. 6 is the concrete structure block diagram of carry service modified module in Fig. 4 shown device.
Detailed description of the invention
The present invention provides a kind of method and device that application is installed to virtual SD card, and for making the purpose of the present invention, technical scheme and effect clearly, clearly, the present invention is described in more detail below.Should be appreciated that specific embodiment described herein is only in order to explain the present invention, is not intended to limit the present invention.
The present invention is by being installed to SD card to APP2SD(software) functional study discovery, APK can be installed to when application program is installed to SD card/mnt/asec catalogue (application installation kit catalogue), this catalogue creates when system initialization, and a tempfs memory file system can be mounted to, and when the .android_secure catalogue being mapped to after SD card carry on SD, android_secure is a collapse directories on SD card, purpose is to set up a catalogue that only root user accesses, and is used for depositing the application being arranged on SD card.
Owing to the function of virtual SD card conventional at present all uses FUSE mechanism to realize, virtual SD card finger daemon in android system is exactly the place implemented, / mnt/asec catalogue can't be mapped to the collapse directories (such as: the .android_secure catalogue of SD card) on Flash by following the trail of the carry finding virtual SD card, therefore/mnt/asec is simply mounted to tempfs memory file system, contact is set up without with real peripheral hardware, therefore the application being installed to virtual SD card can be wholly absent after restart, accordingly, the present invention is modified this finger daemon and reaches the effect identical with the installation application of true SD card, to improve virtual SD card mechanism.Below in conjunction with accompanying drawing, present pre-ferred embodiments is illustrated.
Referring to the flow chart that Fig. 1, Fig. 1 are a kind of method preferred embodiment that application is installed to virtual SD card of the present invention, it includes step:
S101, revise virtual SD card finger daemon, the true Flash space that virtual SD card is corresponding is mounted to a temp directory, then temp directory is mounted to the mount point of virtual SD card;
Collapse directories, for simulating the collapse directories of true SD card, is mounted to a middle directory by S102, establishment one;
S103, BootLoader binding service in carry services, and trigger the renewal peripheral hardware media method of application program build-in services, middle directory to be mounted to application installation kit catalogue.
In the present embodiment, revise the virtual SD card finger daemon in android system and carry service, and add self-defined service, create a collapse directories simulating true SD card, and this collapse directories is mounted to a middle directory, middle directory is mounted to application installation kit catalogue the most at last so that virtual SD card and peripheral hardware establish and contact, make virtual SD khaki function reach, with true SD card, the effect that application is identical is installed, extend the function of virtual SD card.
In step S101 wherein, the true Flash space corresponding by/data/media(virtual SD card) it is mounted to/mnt/secure/staging catalogue, / mnt/secure/staging catalogue is a temp directory, it is primarily to general/data/meida and is mapped to/storage/sdcard0 (mount point of virtual sd card, user is visible).
Amendment/system/core/sdcard/sdcard.crun method is as follows:
res=mount("/dev/fuse","/mnt/secure/staging","fuse",MS_NOSUID|MS_NODEV,opts)。
Amended virtual SD card carry flow process is as follows:
First general/data/media is mounted to/mnt/secure/staging catalogue;
Then general/data/media catalogue is moved to another mount point/storage/sdcard0 by mount point/mnt/secure/staging, so can realize being mounted to/data/media by the mode of FUSE the mount point/storage/sdcard0 of virtual SD card.Code is as follows:
servicebindMounts/system/bin/bindMounts
Classmain
Disabled
Onshot
Further, as in figure 2 it is shown, described step S102 specifically includes:
S201, in described true Flash space, create described collapse directories;
S202, described collapse directories is mounted to middle directory.
In above-mentioned steps, first in true Flash space, establishment/data/media/.android_secure collapse directories (simulates the collapse directories of true SD card), general/data/media/.android_secure collapse directories is mounted to/mnt/secure/asec (middle directory, this middle directory is eventually mounted to/mnt/asec, and arranging middle directory is the consideration for safety and rights concerns) catalogue.
Further, as it is shown on figure 3, described step S103 specifically includes:
S301, BootLoader binding service in carry service arrangement method;
S302, in carry service system preparation method, trigger the renewal peripheral hardware media state method of application program;
S303, notified that by described renewal peripheral hardware media state method middle directory is mounted to application installation kit catalogue by equipment carry program.
After S304, system boot by scan described application installation kit catalogue come check whether there is application be installed on virtual SD card.
In above-mentioned steps, be primarily implemented in MountService(carry service) in start bindMounts(carry binding service), and trigger PackageManagerService(application program build-in services) UpdateExternalMediaStatus(update peripheral hardware media state) method.
Specifically, starting bindMounts service in MountService building method, code is as follows:
SystemProperties.set("ctl.start","bindMounts");
Then at MountservicesystemReady(carry service system preparation method) the middle UpdateExternalMediaStatus method triggering PackageManagerService, the method is notified that the equipment carry program in vold(Android system) program general/mnt/secure/asec/ catalogue is mounted to/mnt/asec, then, system boot can scan this catalogue come check whether there is application be installed to virtual SD card.Its code is as follows:
Runnabler=newRunnable(){
publicvoidrun(){
mPms.updateExternalMediaStatus(true,false);
}};
mHandler.postDelayed(r,2000)。
Based on said method, the present invention also provides for a kind of device preferred embodiment that application is installed to virtual SD card, as shown in Figure 4, comprising:
Process modified module 100, is used for revising virtual SD card finger daemon, the true Flash space that virtual SD card is corresponding is mounted to a temp directory, then temp directory is mounted to the mount point of virtual SD card;
Module 200 is added in carry binding service, for creating one for simulating the collapse directories of true SD card, collapse directories is mounted to a middle directory;
Carry service modified module 300, services for BootLoader binding in servicing at carry, and triggers the renewal peripheral hardware media method of application program build-in services, so that middle directory to be mounted to application installation kit catalogue.
Further, as it is shown in figure 5, the binding service of described carry is added module 200 and specifically included:
Collapse directories creating unit 210, for creating described collapse directories in described true Flash space;
First carry unit 220, for being mounted to middle directory by described collapse directories.
Further, as shown in Figure 6, described carry service modified module 300 specifically includes:
Start unit 310, for the binding service of BootLoader in carry service arrangement method;
Trigger element 320, for triggering the renewal peripheral hardware media state method of application program in carry service system preparation method;
By described renewal peripheral hardware media state method, second carry unit 330, for notifying that middle directory is mounted to application installation kit catalogue by equipment carry program.
Further, described carry service modified module 300 also includes:
Inspection unit, for after system boot by scan described application installation kit catalogue come check whether there is application be installed to virtual SD card.
About ins and outs existing detailed description in method above of above-mentioned modular unit, therefore repeat no more.
In sum, the present invention is modified the virtual SD card finger daemon in android system, virtual SD khaki function is made to reach, with true SD card, the effect that application is identical is installed, namely after restarting system, it is installed to the application program of virtual SD card without automatic disappearance, thus perfect virtual SD card mechanism.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, it is possible to improved according to the above description or convert, all these improve and convert the protection domain that all should belong to claims of the present invention.
Claims (8)
1. the method that application is installed to virtual SD card, it is characterised in that include step:
A, revise virtual SD card finger daemon, the true Flash space that virtual SD card is corresponding is mounted to a temp directory, then temp directory is mounted to the mount point of virtual SD card;
Collapse directories, for simulating the collapse directories of true SD card, is mounted to a middle directory by B, establishment one;
C, BootLoader binding service in carry services, and trigger the renewal peripheral hardware media method of application program build-in services, middle directory to be mounted to application installation kit catalogue.
2. the method that application is installed to virtual SD card according to claim 1, it is characterised in that described step B specifically includes:
B1, in described true Flash space, create described collapse directories;
B2, described collapse directories is mounted to middle directory.
3. the method that application is installed to virtual SD card according to claim 1, it is characterised in that described step C specifically includes:
C1, BootLoader binding service in carry service arrangement method;
C2, in carry service system preparation method, trigger the renewal peripheral hardware media state method of application program;
C3, notified that by described renewal peripheral hardware media state method middle directory is mounted to application installation kit catalogue by equipment carry program.
4. the method that application is installed to virtual SD card according to claim 3, it is characterised in that also include after described step C3:
After C4, system boot by scan described application installation kit catalogue come check whether there is application be installed on virtual SD card.
5. the device that application is installed to virtual SD card, it is characterised in that including:
Process modified module, is used for revising virtual SD card finger daemon, the true Flash space that virtual SD card is corresponding is mounted to a temp directory, then temp directory is mounted to the mount point of virtual SD card;
Module is added in carry binding service, for creating one for simulating the collapse directories of true SD card, collapse directories is mounted to a middle directory;
Carry service modified module, services for BootLoader binding in servicing at carry, and triggers the renewal peripheral hardware media method of application program build-in services, so that middle directory to be mounted to application installation kit catalogue.
6. the device that application is installed to virtual SD card according to claim 5, it is characterised in that the binding service of described carry is added module and specifically included:
Collapse directories creating unit, for creating described collapse directories in described true Flash space;
First carry unit, for being mounted to middle directory by described collapse directories.
7. the device that application is installed to virtual SD card according to claim 5, it is characterised in that described carry service modified module specifically includes:
Start unit, for the binding service of BootLoader in carry service arrangement method;
Trigger element, for triggering the renewal peripheral hardware media state method of application program in carry service system preparation method;
By described renewal peripheral hardware media state method, second carry unit, for notifying that middle directory is mounted to application installation kit catalogue by equipment carry program.
8. the device that application is installed to virtual SD card according to claim 7, it is characterised in that described carry service modified module also includes:
Inspection unit, for after system boot by scan described application installation kit catalogue come check whether there is application be installed to virtual SD card.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410839245.3A CN105808269B (en) | 2014-12-30 | 2014-12-30 | A kind of method and device that application is installed to virtual SD card |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410839245.3A CN105808269B (en) | 2014-12-30 | 2014-12-30 | A kind of method and device that application is installed to virtual SD card |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105808269A true CN105808269A (en) | 2016-07-27 |
CN105808269B CN105808269B (en) | 2019-11-12 |
Family
ID=56980939
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410839245.3A Active CN105808269B (en) | 2014-12-30 | 2014-12-30 | A kind of method and device that application is installed to virtual SD card |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105808269B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108509435A (en) * | 2017-02-24 | 2018-09-07 | 海马云(天津)信息技术有限公司 | The method and apparatus of instance system carry telefile |
CN112445414A (en) * | 2019-08-30 | 2021-03-05 | 青岛海信移动通信技术股份有限公司 | Data processing method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102262543A (en) * | 2010-05-25 | 2011-11-30 | 上海中标软件有限公司 | Power-failure resistant method for starting Linux system |
CN102831173A (en) * | 2012-07-27 | 2012-12-19 | Tcl集团股份有限公司 | Memory expanding method, device and terminal based on Android system |
CN102880498A (en) * | 2012-09-13 | 2013-01-16 | 深圳市佳创软件有限公司 | Method of virtual SD (Security Digital) card on device with android system |
CN102902488A (en) * | 2012-08-06 | 2013-01-30 | 广东欧珀移动通信有限公司 | Memory card of handheld equipment and dynamic mounting method of memory card |
-
2014
- 2014-12-30 CN CN201410839245.3A patent/CN105808269B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102262543A (en) * | 2010-05-25 | 2011-11-30 | 上海中标软件有限公司 | Power-failure resistant method for starting Linux system |
CN102831173A (en) * | 2012-07-27 | 2012-12-19 | Tcl集团股份有限公司 | Memory expanding method, device and terminal based on Android system |
CN102902488A (en) * | 2012-08-06 | 2013-01-30 | 广东欧珀移动通信有限公司 | Memory card of handheld equipment and dynamic mounting method of memory card |
CN102880498A (en) * | 2012-09-13 | 2013-01-16 | 深圳市佳创软件有限公司 | Method of virtual SD (Security Digital) card on device with android system |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108509435A (en) * | 2017-02-24 | 2018-09-07 | 海马云(天津)信息技术有限公司 | The method and apparatus of instance system carry telefile |
CN108509435B (en) * | 2017-02-24 | 2021-03-23 | 海马云(天津)信息技术有限公司 | Method and device for mounting remote file by example system |
CN112445414A (en) * | 2019-08-30 | 2021-03-05 | 青岛海信移动通信技术股份有限公司 | Data processing method and device |
CN112445414B (en) * | 2019-08-30 | 2023-02-03 | 青岛海信移动通信技术股份有限公司 | Data processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN105808269B (en) | 2019-11-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5576949B2 (en) | Updating firmware in a hybrid computing environment | |
US8914785B2 (en) | Providing virtual appliance system firmware images | |
US9507604B2 (en) | Boot method and boot system | |
US8874892B1 (en) | Assessing BIOS information prior to reversion | |
US20120144391A1 (en) | Provisioning a virtual machine | |
WO2019062703A1 (en) | Update method, and embedded system | |
US7962736B1 (en) | Interactive pre-OS firmware update with repeated disabling of interrupts | |
JP2009070375A (en) | System and method for custom installation of operating system on remote client | |
TW201409255A (en) | High-speed automated cluster system deployment method using virtual disks | |
CN101546270A (en) | Automatic installation method for Linux operation system, device and system | |
CN101014034A (en) | U disk server-based cluster solving method | |
US20150039875A1 (en) | Deployment of Software Images with Distinct Configuration Logic | |
JP2010079440A (en) | Device and method for updating firmware | |
CN103761088A (en) | Multiple operation system switching method applicable to ARM (advanced risc machine) framework mobile equipment | |
CN103744708A (en) | Method of fixing disk device names in Linux operating system | |
CN103853586A (en) | Method of realizing wireless card driver in UEFI (unified extensible firmware interface) layer | |
RU2635891C2 (en) | Installation mechanism and package format for parallelizable reliable installations | |
GB2434667A (en) | Maintaining System Management BIOS in a computer system | |
CN106406944A (en) | Control method and system for forbidding self-starting of application | |
WO2016062146A1 (en) | Serial number information update method, device and terminal | |
WO2015018302A1 (en) | Hot patching method and device | |
CN104391713A (en) | Automatic installation method for Windows system | |
CN102073524B (en) | A kind of method of wireless communication terminal and self-starting thereof | |
JP6198843B2 (en) | Hard disk system operating method, storage system, and processor | |
CN103984585A (en) | Method for upgrading Linux kernel in running process of kernel module capable of being plugged in thermal mode |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |