CN102880498A - Method of virtual SD (Security Digital) card on device with android system - Google Patents

Method of virtual SD (Security Digital) card on device with android system Download PDF

Info

Publication number
CN102880498A
CN102880498A CN2012103385524A CN201210338552A CN102880498A CN 102880498 A CN102880498 A CN 102880498A CN 2012103385524 A CN2012103385524 A CN 2012103385524A CN 201210338552 A CN201210338552 A CN 201210338552A CN 102880498 A CN102880498 A CN 102880498A
Authority
CN
China
Prior art keywords
loop
card
android system
virtual
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.)
Granted
Application number
CN2012103385524A
Other languages
Chinese (zh)
Other versions
CN102880498B (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.)
SHENZHEN AVIT SOFTWARE Co Ltd
Original Assignee
SHENZHEN AVIT 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 SHENZHEN AVIT SOFTWARE Co Ltd filed Critical SHENZHEN AVIT SOFTWARE Co Ltd
Priority to CN201210338552.4A priority Critical patent/CN102880498B/en
Publication of CN102880498A publication Critical patent/CN102880498A/en
Application granted granted Critical
Publication of CN102880498B publication Critical patent/CN102880498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for a virtual SD (Security Digital) card on a device with an android system. The method comprises the steps as follows: 1) downloading a partitioned mirror image document into a Flash memory or a hard disk of the device; 2) finding idle Loop equipment of the android system of the device; 3) sending a user space adding message to the Loop equipment by a Linux kernel of the android system, and enabling the android system to identify the Loop equipment as disk equipment; 4) correlating the Loop equipment with the partitioned mirror image file, and enabling the partitioned mirror image file to serve as memory space of the Loop equipment; and 5) sending a user space partition insertion message to the Loop equipment by the Linux kernel of the android system. Compared with the conventional method of the virtual SD card of the android system, the method has the advantages of easiness for realization, strong adaptability and safety and the like.

Description

The method of virtual SD card on the device of Android system
[technical field]
The present invention relates to the method for virtual SD card on the device of Android system.
[background technology]
The Android(Android) system's mobile phone operating system of increasing income based on linux kernel that to be Google announce in November, 2007 is to move software for a whole set of of portable terminal exploitation.Google has set up global alliance organization, jointly formed by numerous mobile-phone manufacturers, telecom operators, chip manufacturer, and joint development Android system, the Android system constantly upgrades since then, and function is also more and more perfect.At present, Samsung, HTC, Motorola have all released the Android mobile phone of oneself, Google has also released the TV of Google based on the Android system, adds the e way M7 navigating instrument of Hong Kong Hua cutting edge of a knife or a sword, the high definition set top box of MIPS, and these all allow the Android system yield unusually brilliant results.Google just is being devoted to allow the Android system not rely on the hardware platform of equipment, by with mobile-phone manufacturers and the mobile operator cooperation of all parts of the world, the Information Mobile Service product is also promoted in exploitation.Develop into today, a lot of manufacturers have all released the Android product of oneself, and the usable range of Android system has been not limited to the mobile devices such as mobile phone, at various embedded devices, such as set-top box, multimedia player, handheld device, navigating instrument etc., on all be used widely.
In the Android system, (the SD card is a kind of memory device of based semiconductor flash memory to the SD card, be widely used on various mancarried devices) be indispensable ingredient, many system applications, such as the application of the Android system core, camera, Photo Browser, music player etc., all needing to read the SD card could normal operation.The deviser of Android system is when design Android system, have a mind to add the SD card, main storage space as files such as video, audio frequency and photos, because this class file and system's operation do not have direct relation, the overwhelming majority is some users' data, thus, just realized separating of user data and system data, make the data management of system more clear, the while also allows user's separation instrumentation to check or changes the SD card, and is more convenient to use.
It is very general using the SD card at mobile phone, and in the relatively-stationary equipment of the use occasions such as navigating instrument, set-top box, use the SD card, many unreasonable parts are but arranged: often have larger internal storage space in (1) this kind equipment, and the SD card wants high with respect to the paster Flash of same memory space or the cost of SATA hard disk, and this can increase the manufacturing cost of equipment undoubtedly; (2) need to so not only increase the difficulty of hardware design for the SD card adds specific hardware driving chip, and reserves slot for it when the hardware platform of designing apparatus, while peripheral hardware SD card has also reduced the integrality of equipment.Based on above consideration, to navigating instrument and the such equipment of set-top box, can use virtual SD to substitute true SD card.
Use virtual SD card, just need to open up a storage space at Flash storer or disk, storage space as virtual SD card, so not only can solve the weakness of above-mentioned true SD card, and since the read or write speed of Flash storer and disk usually above true SD card, so system will obviously improve the access speed of virtual SD card.In addition, virtual SD card size is controlled, can adjust as required, and because virtual SD is stuck in the internal system realization, can not plug by physics, so be difficult for losing and damaging.To the relatively-stationary embedded device of use occasion, virtual SD card truly has the incomparable superiority of true SD card.
At present, producer is also arranged at the virtual SD card technique of research.Google takes the lead in having realized virtual SD card at its Android simulator.The Android simulator has used the QEMU software virtual machine, is used at virtual ARM mobile device of x86 computing machine simulation, then simulates whole Android system thereon.Because the operation of Android system needs the support of SD card, so the Android simulator utilizes SDK to carry instrument mksdca rd and emulator realizes virtual SD card.But QEMU is comparatively complicated and be used for simulating whole ARM platform, is not suitable for independent simulation SD card, therefore is difficult to use at real equipment.The rule of doing of other manufacturers is to use a file as the storage space of virtual SD card, by revising Android system source code, the MountService service of deception Framework layer, make MountService think the current SD of existence card, and the file that in fact deposits virtual SD card in all is stored in this document folder.Although this method is feasible, the difficulty of Codes Revised is very large, and virtual SD card is also also incomplete same in the use with true SD.In addition, this method is easy to destroy globality and the security of Android system, so that the situation of fluctuation of service appears in system in follow-up use.
[summary of the invention]
In order to overcome the deficiencies in the prior art, the invention provides a kind of on the device of Android system the method for virtual SD card so that virtual SD jig has the advantages such as more simple, safety and strong adaptability on the device of Android system.
A kind of on the device of Android system the method for virtual SD card, comprise the steps:
1) image file behind the subregion is downloaded in the Flash storer or hard disk of device;
2) find the Loop equipment of the Android system free time of device;
3) linux kernel of Android system sends to described Loop equipment and adds user's space message, and making Android system is disk unit with described Loop recognition of devices;
4) described Loop equipment is associated with image file behind the subregion, makes image file behind the described subregion as the storage space of described Loop equipment;
5) linux kernel of Android system sends subregion to described Loop equipment and inserts user's space message.
Preferably, the image file behind the subregion in the described step 1) obtains as follows:
1.1) in the linux system of Linux main frame, find idle main frame Loop equipment;
1.2) create image file at the Linux main frame;
1.3) described main frame Loop equipment is associated with described image file, make described image file as the storage space of described main frame Loop equipment;
1.4) described image file is carried out image file after subregion obtains described subregion.
Preferably, the Loop device drives is compiled among the linux kernel of Android system of described device by the crossstool chain on the described Linux main frame.
Preferably, comprise the steps:
Make virtual SD card carry script and be kept in the described device;
Create service in the booting script under the system file root directory of the Android system that installs, described service is so that after the described device start operation, Android system moves described virtual SD card carry script automatically;
After the described virtual SD card carry script operation, carry out described step 2) to step 5).
Preferably, the Loop device drives is compiled as the kernel module of the Android system of described device by the crossstool chain on the described Linux main frame, generate simultaneously the kernel module file, and described kernel module file is downloaded under the file directory of Android system of described device.
Preferably, comprise the steps:
Make virtual SD card carry script and be kept in the described device;
Create service in the booting script under the system file root directory of the Android system that installs, described service is so that after the described device start operation, Android system moves described virtual SD card carry script automatically;
After the described virtual SD card carry script operation, with described kernel module file load in linux kernel, thereby load the Loop device drives;
Carry out described step 2) to step 5).
Beneficial effect of the present invention comprises following several aspect:
The method of operating of the virtual SD card that this method realizes is identical with true SD card, and can make needs the application program of SD card normally to move among the Android; The virtual SD card that this method realizes is the operations such as plug, carry, unloading of analog machine normally, can normally carry out subregion and format; The virtual SD card that this method realizes adopts modularization to revise, and makes amendment for separate modular, and the code revision amount is few, can not impact other functional modules, implements simply simple operation; The virtual SD card that adopts this method to realize need not to revise the flow process of SD card carry among the Android, and the Android later release is had certain adaptability; Make the more integration of equipment of operation Android system, when hardware design, need not to consider separately for the SD card again; Because Android equipment is less than access speed to the machine internal memory to the access speed of SD card, therefore adopt the access speed of the virtual SD card that this method realizes faster than common SD card; The cost of the paster Flash of same memory space and SATA hard disk is higher because the SD card is compared, and this method utilizes Flash or disk space to realize virtual SD card, therefore can significantly reduce equipment cost; The virtual SD card amount of capacity that adopts this method to realize is controlled flexibly, can adjust arbitrarily with demand; The virtual SD card of the large capacity of virtual SD card support that this method realizes; Use virtual SD jig that higher security is arranged, be difficult for losing, damaging; This method is applicable to move the various kinds of equipment of Android system, such as handheld device, set-top box, game machine, panel computer, phone, web pad, televisor, DVD player.
[description of drawings]
Fig. 1 is the realization block diagram of the method for virtual SD card on the device of Android system of an embodiment of the present invention;
Fig. 2 is the process flow diagram of the method for virtual SD card on the device of Android system of an embodiment of the present invention;
Fig. 3 is the part process flow diagram of the method for virtual SD card on the device of Android system of an embodiment of the present invention.
[embodiment]
Below with reference to accompanying drawing, specific embodiments of the invention are described in further detail.
Block device is a concept on the (SuSE) Linux OS, refers to the equipment that those are accessed take piece as unit, and Flash storer, SD card, disk etc. all are common block devices.By the flow process of research Android system's carry true SD card, a virtual SD card the simplest and be to a kind of method of code change amount minimum: makes up a virtual block device, the SD card that is virtually reality like reality with this virtual block device.In order more clearly to set forth implementation method of the present invention, in the software environment that this given first the method adopts, as shown in the table:
Figure BDA0000213503071
Step 1: make up virtual block device.
In order to make up virtual block device, at first should write the dummy block will device drives in the Linux underlying operating system that the Android system relies on, the Linux underlying operating system can join dummy block will equipment in the system by loading this device drives like this.One class is arranged in (SuSE) Linux OS, and special block device is called " Loop " equipment, this kind equipment is not real physical equipment, self does not have storage space yet, but it can be positioned at disk or Flash storer on image file be associated, thereby the storage space of image file as self used.After this, all are operation to image file by the Loop device translates namely to the operation of Loop equipment.From the application program angle, application program also is indifferent to Loop equipment and specifically how is stored data, Loop equipment is regarded as a kind of common block device, and true SD card also is a kind of block device, application program when operation Loop equipment with the true SD card of operation and indifference.Therefore can use the virtual block device of Loop device build under the Linux, thereby for virtual SD card under Android provides technical foundation, Loop equipment has played the Link role that the image file on the disk is converted to dummy block will equipment therein, as shown in Figure 1.
Make up dummy block will equipment and need to carry out FOUR EASY STEPS: for the user who uses early stage linux version kernel, at first need to revise the mistake of Loop device drives in the kernel; , need add Loop equipment maximum number of partitions destination code being set, the subregion of Loop equipment can be worked thereafter; Again, need configuration and compiling linux kernel and amended Loop device drives; At last, Loop number of devices and maximum number of partitions correctly are set and load the Loop device drives, thus the dummy block will equipment under the structure (SuSE) Linux OS.The specific implementation method of each step is as follows.
(1) mistake of Loop device drives in the early stage linux kernel of correction
Because linux system is an operating system of increasing income, constantly updating, can there be some problems unavoidably in the source code of each version, so before the Loop device build dummy block will equipment that uses (SuSE) Linux OS, need to make amendment to the driving source code of Loop equipment for the (SuSE) Linux OS of different editions.
The present invention uses linux kernel stable release 2.6.32.59, and under this version, the method that the present invention relates to is working properly, need not carry out the operation steps that this corrects mistakes.For the linux kernel before the 2.6.32.59 version, this method is applicable equally, but need to make amendment to Loop device drives file.The source code of Loop device drives is positioned at ./linux-<version 〉/the drivers/block/loop.c file, wherein<version〉be linux kernel version number.Modification to it concentrates in the loop_init function, and this function has been finished the work of Loop device initialize.In the loop_init function, the Loop device drives can judge whether the user has specified the Loop number of devices, and namely whether the user to the max_loop variable assignments, and is its shared scope of Loop equipment application accordingly in kernel.
1.1 the modification to the error code source
But in the linux kernel before the 2.6.32.59 version, processing procedure herein is incorrect, and source code is as follows:
Figure BDA0000213503073
In the above-mentioned source code, the range variable storage Loop equipment in the shared scope of kernel spacing.Can find out from code, specify the user in the situation of Loop number of devices that then giving the range variable assignments is max_loop, the range variable is consistent with the number of Loop equipment.But be not the enough kernel spacings of subregion application of Loop equipment, when Loop equipment has one or more subregion, just may lead to errors.Therefore need to make amendment to above-mentioned source code during the linux kernel before using the 2.6.32.59 version, amended source code is as follows:
Figure BDA0000213503074
In the superincumbent code, the part_shift variable storage information of the maximum number of partitions of Loop equipment.Repair later range variable and will store the scope of the kernel spacing that whole Loop equipment and possible section post take, Loop equipment can correctly be supported a plurality of subregions, so just for providing condition with Loop device build dummy block will equipment.
1.2 for the interpolation of Loop device drives arranges maximum number of partitions destination code
The device drives of (SuSE) Linux OS is supported two kinds of compile modes: one, device drives can be compiled into kernel inside, and linux kernel can drive from moving loading equipment when starting like this; Its two, device drives can be compiled as module, generate the kernel module file, the user can be as required, manually the kernel module with device drives is loaded in the kernel.The Loop device drives is supported this two kinds of compile modes equally, but for can be when the kernel start-up loading Loop device drives, Loop number of devices and maximum number of partitions correctly are set, need to be at the source code ./linux-<version of Loop device drives 〉/corresponding code added in the drivers/block/loop.c file.Owing to existed in the original Loop device drives Loop number of devices destination code is set, needs interpolation that maximum number of partitions destination code is set at this and get final product.Specific code is as follows:
Figure BDA0000213503075
Italicized item in the top code is added between the #ifndef MODULE and #endif precompile order in the Loop device drives, realizes arranging maximum number of partitions purpose function.This device drives of the grand indication of MODULE compiles in the kernel module mode.Used _ _ setup is grand, makes linux kernel can Loop number of devices and maximum number of partitions be set by the kernel start-up parameter when starting. hereinNo matter be in the existing Loop of setting number of devices destination code, or new arranging in the maximum number of partitions destination code of adding, _ _ grand first parameter (" max_loop=" and " max_part=") of setup all can be registered as the config option in the kernel start-up parameter.
(2) configuration and compiling linux kernel and Loop device drives
No matter the Loop device drives is compiled in the linux kernel, still compiles it as kernel module, all need to compile linux kernel, difference is that the configuration mode of Loop device drives is different.In order to dispose and compile the Linux kernel, need at first prepare the crossstool chain of target device.The crossstool chain generally is arranged in the software development kit (SDK) of target device hardware platform, comprising a series of instruments, is used for obtaining the program that can move at the target device platform in the main frame compiling.If there is not the supporting crossstool chain of hardware, but also self manufacture.Suppose that herein the user has finished the configuration of crossstool chain, thereby provide the method for general configuration and compiling linux kernel.
At first at the linux kernel ./linux-<version of the Android of target device system 〉/following order carried out under the catalogue, open the kernel setup menu, the configuration linux kernel, in the order<arch〉architecture of expression target device,<cross-compiler-prefix〉represent the cross tool chain prefix of target device:
make ARCH=<arch> CROSS_COMPILE=<cross-compiler prefix> menuconfig
In menu, select successively " Device Drivers " (device drives), " Block devices " (block device) option.In namely having represented, checks " Loopback device support " option in " Block devices " submenu the support of Loop equipment.
Have two kinds of patterns available herein:
Input alphabet Y, Loopback device support option symbol<change into<*, the driving of Loop equipment can be compiled among the kernel, when starting, kernel can automatically load the Loop device drives;
Input alphabet M, Loopback device support option symbol<change into<M, the Loop device drives can be compiled as kernel module, the user can manually be loaded into kernel with it.
After selecting the compile mode of Loop device drives, just finished the configuration to the Loop device drives.The preservation configuration also utilizes with the compiling linux kernel of issuing orders:
make ARCH=<arch> CROSS_COMPILE=<cross-compiler prefix>
After compiling finishes, can be at ./linux-<version 〉/arch/<arch 〉/linux kernel after the compiling generated under the boot/ catalogue.If configuration is specified during linux kernel and is compiled the Loop device drives in the kernel module mode, then simultaneously at ./linux-<version 〉/the kernel module loop.ko file of Loop device drives generated under the drivers/block/ catalogue.
(3) arrange and load the Loop device drives
The Loop device drives both can be compiled among the linux kernel, also can be used as kernel module and separately compiling.The setting of the Loop device drives under two kinds of compile modes is different with loading procedure, is described below respectively.
If the Loop device drives is compiled among the linux kernel, then in the linux kernel start-up course, can automatically load the Loop device drives.Owing to added in Loop device drives source code maximum number of partitions destination code is set, the user can provide Loop number of devices and two parameters of maximum number of partitions to kernel by the kernel start-up parameter (Boot arguments) of Linux.And kernel can according to user's demand, correctly load the Loop device drives.
The linux kernel start-up parameter arranges in the Bootloader of target device platform usually.Bootloader is responsible for guiding linux kernel and the kernel start-up parameter that pre-sets is passed to the soon kernel of startup.Different target device platforms adopts different Bootloader, and the kernel start-up parameter of transmitting also is different, cannot treat different things as the same.But the mode that two parameters of Loop number of devices and maximum number of partitions is added the kernel start-up parameter is consistent, also is about to original kernel start-up parameter and expands to following form:
<original-bootargs> max_loop=<num> max_part=<part>
In above-mentioned kernel start-up parameter,<original-bootargs〉the original kernel start-up parameter of representative; Add the space thereafter, the number max_loop that Loop equipment is set then is<num 〉; Again add the space, maximum number of partitions is set is<part 〉.The user then needs according to the actual requirements, setting<num〉and<part concrete numerical value.Thereafter, the kernel start-up parameter that sets is preserved in the order that utilizes Bootloader to provide, and kernel just can correctly arrange and load Loop equipment according to user's request next time when guiding.
If the Loop device drives is compiled as kernel module, then needs to use the parameter of the insmod command set Loop equipment on the target device platform and load the Loop device drives.In addition, if need to remove the Loop device drives that has loaded, then also will use the rmmod order, but this order is not indispensable.On the Android equipment platform, insmod and rmmod order is provided by the Shell command tools case ToolBox of lightweight usually, so these two orders all can directly be used and need not to add separately.
At first compiled kernel module loop.ko file is downloaded under the file directory of target device, method for down loading is different along with the difference of target platform, and the user need to download according to the instruction manual of platform self.For explaining conveniently the existing file directory of loop.ko in target device being designated as<loop module path 〉.
Under the target device platform, use afterwards following command set and load the Loop device drives:
insmod /<loop module path>/loop.ko max_part=<part>
Loop.ko file and path thereof in this order represent the kernel module of Loop device drives to be loaded; After adding the space thereafter, the maximum number of partitions max_part that Loop equipment is set then is<part 〉.<part〉concrete numerical value need the user to arrange according to demand.Because the restriction of ordering among the Android ToolBox, can not specify the maximum quantity of Loop equipment herein is the max_loop variable again, but with the default value 8 in the source code.After the command execution, the kernel module of Loop device drives namely loads and finishes.In addition, if will remove the Loop device drives that has loaded, then need under the target device platform, to use as order:
rmmod loop
No matter be that the Loop device drives is compiled among the kernel, still compile it as kernel module, after correctly arranging and loading the Loop device drives, meeting is after sysfs(Linux kernel version 2 .6 reaches) lower relevant information of adding Loop equipment, if linux system is supported udev or similar equipment manager, then can under/dev/ catalogue, create the Loop device file.
So far, the dummy block will equipment that successfully used the Loop device build in the linux kernel in the Android system.Use this dummy block will equipment and cooperate subsequent step, can finally be implemented in the target of virtual SD card under the Android system.
Step 2: use the compiling of crossstool chain to obtain running on the losetup order of target platform
After successfully arranging and load the Loop device drives, also need it is associated with a image file on being positioned at disk or Flash storer, with the physical memory space of image file as Loop equipment, could make up virtual SD card under the Android system with Loop equipment.And this is finished the process that an image file is associated with Loop equipment usually by the losetup order.
Yet, owing to do not use traditional Shell command tools case BusyBox in the Android system, and used the lightweight Shell command tools case ToolBox through simplifying, and the losetup order is not in this tool box.This means and under the Android system environments, can not directly use the losetup order.Although can be with BusyBox tool box integral transplanting to Android system equipment platform, and then the losetup order of using BusyBox to provide, but do like this integrality of having destroyed on the one hand Android system itself, can cause on the other hand ToolBox and BusyBox respectively to provide a cover overlapped order, when increasing redundancy, also can affect Security of the system.Therefore a kind of practical ways are: use the compiling of crossstool chain can run on the losetup order of target device platform.
At first need to write at main frame the source code of losetup order.Can write according to the interface that the Loop device drives provides the source code of losetup order, perhaps with reference to the source code of the following losetup order of having finished writing, and make amendment according to self-demand thereon and add.The file and the explanation that relate in the identifying code see the following form.
Related, the function of separating and inquiring about of the file that this losetup order has only realized losetup order in the Busybox tool box and equipment have been removed the functions such as wherein unwanted encryption.With reference to the losetup order source code of source code from Busybox, and with its separately proposition from the Busybox source code, remove no function, add the program entry function, make it to be compiled as executable program.As previously mentioned, not losetup order in the Android system, the reference source code that provides losetup herein is to carry out cross compile for cross tool chain that can enough Android platforms, the losetup order that generation can move at the Android platform.The implementation structure of losetup order is as follows:
Command forms: losetup [f/-d/-o] [equipment code name] [file]
Practical function: winding equipment is set, with file virtual be the block of system equipment.
Parameter declaration :-d separation equipment and file
-o arranges data offset
-f inquires about current Loop equipment state, shows first free device in all Loop equipment
The realization flow of losetup order is as follows:
Be the entrance of losetup order with reference to the main function among the source code losetup.c, in the main function, judge the given option parameter of user by calling system function getopt_long, and then judge the desired operation of user.If the option parameter of user's input is-f, then carry out the function query_loop that is used for inquiry Loop equipment state, if the option parameter of user's appointment is-d, then carry out the function del_loop for separating of Loop equipment and file, if specified option parameter or specified option parameter are not-o, then Loop equipment and the file with user's appointment joins by the set_loop functional dependence.If the parameter of user's appointment is wrong, then can call the print_usage function with correct order using method output, for reference.
Comprised necessary header file with reference to source code loop-core.h, defined necessary grand, structure, a plurality of functions that define among the loop-core.c have been stated, externally called with convenient.
Realized query_loop, del_loop and three functions of set_loop with reference to source code loop-core.c, finished respectively the Loop device status inquiries, separated the operation of Loop equipment and file and related Loop equipment and file.The three all uses the open function to open Loop equipment, sends different orders, complete operation by the ioctl function to Loop equipment.The query_loop function sends the state of BB_LOOP_GET_STATUS order inquiry Loop equipment to Loop equipment; The del_loop function sends the LOOP_CLR_FD order and separates Loop equipment and file; The set_loop function then sends the related Loop equipment of LOOP_SET_FD and file, sends thereafter the state complete operation that the Loop equipment after the association is upgraded in the BB_LOOP_SET_STATUS order.All as follows with reference to source code:
Figure BDA0000213503077
Figure BDA0000213503078
Figure BDA0000213503079
Figure BDA00002135030710
Figure BDA00002135030711
Figure BDA00002135030713
Figure BDA00002135030714
Figure BDA00002135030715
Secondly, need to use cross-compiler at main frame, the source code of above-mentioned referral procedure is compiled as executable program on target platform.For convenient compiling, can write a Makefile file, the Makefile file of referral procedure is as follows.
Makfile
CC := <c cross-compiler>
OBJECT := losetup.o loop-core.o
TARGET := losetup
all: $(OBJECT)
$(CC) -o $(TARGET) $(OBJECT)
clean:
rm -rf $(TARGET)
rm -rf *.o
During use, need with among the above-mentioned Makefile<c cross-compiler be replaced by the C language cross-compiler of target platform, and three source files of Makefile file and above-mentioned referral procedure are placed under the same catalogue, be designated as<losetup-src catalogue.Thereafter, input begins to compile the losetup order as ordering in the Linux of main frame control desk.
cd <losetup-src>
make clean
make all
After being finished, can main frame<losetup-src generate executable file losetup under the catalogue, afterwards according to the platform instruction manual, the losetup program is downloaded to target platform root file system /the sbin catalogue in.So far, target platform can normally use losetup to order.
Step 3: create image file
As previously mentioned, Loop equipment is not real physical equipment, and self is storage space not also, but it can be positioned at disk or Flash storer on image file be associated, thereby the storage space of image file as self used.If so will fictionalize a SD card to target platform, need to create an image file for the Loop equipment of target platform, for it provides storage space.
/ dev/zero is a specific installation under the Linux, and the user reads once it to it at every turn and just externally exports a byte, can create with it the empty image file of a specific size.The user can come right/dev/zero to operate the establishment image file with the order of the dd under the Linux.The effect of dd order is with a file of block copy of specifying size.Create an image file, only need to carry out as ordering at main frame.
dd if=/dev/zero of=/<img_path>/<img_name> bs=<bytes> count=<blocks>
Wherein, if is import file name; Of is export file name; Bs=<bytes〉be the byte number of once reading in; Count=<blocks〉be the number of the piece that reads,<bytes with<blocks product equal the size of the image file that will create, the size of making the image file of virtual SD card should be 8MB between the 32GB.
After command execution is complete, can/<img_path lower generate a by name<img_name image file, its size is<bytes〉*<blocks.
Step 4: image file is carried out subregion
After the image file establishment is complete, can not carry out accessing operation, need carry out subregion to it first.Acquiescence has Loop equipment under the main frame Linux environment, therefore at first image file is associated with on the Loop equipment of main frame, on main frame it is carried out subregion.
The linux system acquiescence of main frame has the losetup order.The losetup order can be associated with image file on the Loop equipment of main frame.Previous step will be created/<img_path 〉/<img_name〉image file is associated with on the Loop equipment of main frame, at first will inquire about the Loop equipment state of main frame, seeks idle Loop equipment so that related image file.Under the Linux control desk, carry out to order.
losetup -f
After this command execution was complete, information :/dev/loop<x can appear in control desk 〉, wherein<x〉be a numeral, represent the numbering of Loop equipment.Information/dev/loop<x〉then represent the Loop equipment that first is idle, the Loop equipment before it is all occupied.
The user can directly carry out to issue orders, will be in idle condition /dev/loop<x equipment and<img_name image file is associated.
losetup /dev/loop<x> /<img_path>/<img_name>
After command execution is complete,<img_name〉image file namely is associated with loop<x〉on the equipment.
At this moment, can again carry out losetup – f order and observe the Loop equipment of current free time, if display device is not/dev/loop<x 〉, loop<x then is described〉equipment is in busy state, show<img_name image file successfully is associated with loop<x on the equipment.
After image file being associated with the Loop equipment of main frame, just can operate image file by the Loop equipment of main frame.This Loop equipment can carry out division operation just as a real memory device at this moment.The subregion order is specially fdisk, for related upper mirror image file /dev/loop<x equipment, can in the control desk of main frame, carry out as ordering:
fdisk /dev/loop<x>
After command execution was complete, a prompting list can appear in control desk:
Command (m for help):
According to prompting, behind the input m, a menu will appear in control desk:
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
According to prompting, a new subregion is added in the representative of n key.Prompting appears in input n:
Command action
e extended
p primary partition (1-4)
Wherein e represents extended partition p and represents main subregion.Input p, main area code is selected in prompting:
Partition number (1-4):
The input user wants the area code (scope is 1 ~ 4) selected, and then start cylinder is selected in prompting:
First cylinder (1-XX, default 1):
Wherein default value is 1, can directly press carriage return and select default value.Input complete rear prompting end of input cylinder:
Last cylinder, +cylinders or +size{K,M,G} (1-XX, default XX):
Default value is selected in same input carriage return.
At this moment, input p checks partition information, then following partition information can occur:
Command (m for help): p
Disk /dev/loop0: XXX MB, XXXX bytes
XXX heads, XX sectors/track, XX cylinders
Units = cylinders of XXXX * XX = XXXX bytes
Sector size (logical/physical): XXX bytes / XXX bytes
I/O size (minimum/optimal): XXX bytes / XXX bytes
Disk identifier: 0xbb2b4b2e
Device Boot Start End Blocks Id System
/dev/loop0p1 1 XX XXXX XX Linux
The disk partition success is described, number of partitions is one.Size is full of whole disk size.Usually the SD card only has a subregion, so situation recommends only whole disk to be carried out a subzone instantly.(XX and XXXX represent certain specifically numeral, different partition size, more than numeral can be different) last, press w and preserve and withdraw from the fdisk order.The warning message that can ignore appearance.
So far, on main frame, finished right/dev/loop<x〉division operation, also namely finished image file<img_name〉division operation, this moment image file in comprised partition table information.Can be with image file and/dev/loop<x〉equipment breaks away from.Can under the Linux of main frame control desk, input as order.
losetup -d /dev/loop<x>
Again carry out losetup-f inquiry Loop equipment state.If control desk shows current free device and is/dev/loop<x 〉, illustrate that then Loop equipment and image file break away from successfully.
Step 5: carry and the virtual SD card of format
After mirrored partition is complete, need download it on the target platform, can use in target platform, the mode of download need to be consulted the operation instruction of platform and download because of platform.
Suppose path that the user downloads to target platform with image file for/<img_path/<img_name.
Because compiling has obtained being used for the losetup order of target platform in step 2, therefore in available losetup order on the target platform image file is associated with Loop equipment under the target platform.At first need to search the idle Loop equipment on the target device, input is as giving an order under the control desk of target device.
losetup -f
Prompting for/dev/loop<x of the control desk that obtains 〉, the loop<x of expression under the target platform〉equipment is in idle condition at present, can be used for being associated with image file.
Real SD card belongs to hot swappable equipment, and this kind equipment can produce uevent event (user space event user's space message) when carrying out hot plug operations.True SD card can trigger twice the uevent event when inserting, one is the uevent event that Disk inserts, the uevent event that another inserts for Partition.The vold process of Android system is come the SD card is managed by intercepting uevent event, twice uevent event more than vold has intercepted, and then can think has new SD card to insert.In order to use virtual SD card, can write to the uevent node of Loop equipment under the sysfs file system " add n " character string, thereby realize the uevent event that the manual Disk of triggering inserts, simulate the hot plug process of virtual SD card.
Under the control desk of target platform, carry out as ordering, linux kernel is to the loop<x that is in idle condition〉equipment transmission " add " message (adding user's space message), the update of analog D isk, making the Android system with loop<x〉recognition of devices is the Disk equipment of SD card, and makes the SD card be in standby condition:
echo "add" >/sys/block/loop<x>/uevent
Then with image file/<img_path/<img_name be associated with loop<x on the equipment, order as follows:
losetup /dev/loop<x> /<img_path>/<img_name>
This order can make linux kernel from trend loop<x〉equipment transmission Partition insertion uevent event (subregion inserts user's space message).After being finished, command-line prompt:
loop: module loaded
loop0: p1
Loop<x then is described〉equipment successfully has been associated with image file.
Enter Android system this moment and " (setting) is set "-〉 " storage (storge) ", visible " SD card (Mount SD card) is installed " option becomes highlighted operable state by the not operable state of grey.
Selected " SD card (Mount SD card) is installed ", then virtual SD card is by carry, and the above shows the information such as SD card space parameter.Carry out " format storage card (Erase SD card) ".Virtual SD card is reloaded after formatted.Just can stick into capable data operation to virtual SD afterwards, can carry out in virtual SD card and download and install the operations such as application program, download file, these performances are all consistent with true SD card performance.
Step 6: make the automatic carry script of virtual SD card
Because the virtual SD card of making does not have the insert action of real SD card, so can it be set to start shooting and automatically insert, system is thought all the time has the SD card to exist.The user needs at first to create a filename with the script file of .sh ending at main frame, and name is designated as<mount config〉.sh.
1. if adopt the mode that the Loop device drives is enrolled kernel, then theing contents are as follows of the virtual automatic carry script of SD card:
#! /system/bin/sh
var=$(losetup -f)
LOOPX=${var##*/}
echo "add" >/sys/block/$LOOPX/uevent
losetup $var /<img_path>/<img_name>
In the above-mentioned script/<img_path 〉/<img_name〉be that image file is at path and the filename of target device.The first row of script specifies the interpreter of this script to be/system/bin/sh; The var variable storage is in the Loop equipment of idle condition, as/dev/loop0; The LOOPX variable is removed the routing information of var variable, and the device file name of the LOOP equipment that obtains is such as loop0.The echo order then is used for manual triggers uevent event, sends the uevent event that Disk inserts; At last by losetup order with the Loop equipment of free time with give image file related, and can automatically send the uevent event (Partition uevent event comprises that Partition add uevent event is subregion insertion user's space event, Partition remove uevent event) of Partition insertion.
If 2. adopt with Loop equipment compile for module mode, then the content for script of carry is as follows automatically:
#! /system/bin/sh
insmod /loop.ko max_part=<part>
var=$(losetup -f)
LOOPX=${var##*/}
echo "add" >/sys/block/$LOOPX/uevent
losetup $var /<img_path>/<img_name>
Similar with previous automatic carry content for script, different is at first to be loaded in the linux kernel by the kernel module of insmod order with Loop equipment, and specifies the number of partitions<part of maximum possible 〉, need to select according to concrete applicable cases.Thereafter operation is then identical with previous automatic carry script.
After virtual SD card carry script establishment is complete, download it under a certain catalogue of target device, the catalogue with target platform is designated as<sd mount path herein〉catalogue.
In order to automatically perform script file in when start, need to revise the init.rc(booting script under the Android system file root directory) in the startup configuration, create a service, but the service name arbitrary disposition is designated as<auto_mount 〉.Add at last at init.rc:
service <auto_mount> /system/bin/sh /<sd mount path>/<mount config>.sh
oneshot
Like this, after start next time, the Android system can stick into line operate with the virtual SD card of automatic carry to virtual SD behind the Android system boot.
Embodiment one
Present embodiment computer run environment is Ubuntu 10.04.2; Target device set-top box operational system is Android 2.3.4, kernel is Linux Kernel 2.6.32.59, and set-top box Trident PNX8473 adopts ARM-Cortex A9 processor architecture, and Nand Flash size is 1GB * 8, Nor Flash size is 32Mb, and the DDR size is 128MB * 2.
The Loop equipment that the present embodiment purpose is about to this target device is compiled as kernel module, is the virtual SD card of 4G for size of its carry.
Step 1: configuration and compiling linux kernel and Loop device drives
After finishing the configuration of crossstool chain, under linux kernel ./linux-2.6.32.59/ catalogue, carry out following order, open the kernel setup menu, the configuration linux kernel, the utility command row is as follows:
make menuconfig
In menu, select successively " Device Drivers " (device drives), " Block devices " (block device) option.In namely having represented, checks " Loopback device support " option in " Block devices " submenu the support of Loop equipment.
Press M, Loopback device support option is changed into<M 〉, the Loop device drives can be compiled as kernel module, the preservation configuration also utilizes with the compiling linux kernel of issuing orders:
make
After compiling is finished, compiled kernel module loop.ko file is downloaded under the file directory/lib/modules/2.6.32/ of target device.
Step 2: create on computers image file and to its subregion:
1. under the home of computer file system catalogue, create the image file of a 4G, as the required image file of virtual SD card.The order line of using is as follows:
dd if=/dev/zero of=/home/4G.img bs=512 count=8000k
2. to the image file subregion.
Loop equipment in the (SuSE) Linux OS can be associated with image file, thereby the storage space of image file as self used.After this, all are operation to image file by the Loop device translates namely to the operation of Loop equipment.
To the image file subregion time, first image file is mounted on the Loop equipment on the computing machine, be its subregion again.
A) during carry, need to use idle Loop equipment, use the Loop equipment of following inquiry of command line free time: losetup-f
Idle Loop equipment is Loop0;
B) image file is mounted on the idle Loop equipment loop0 of computing machine, the utility command row is as follows:
losetup /dev/loop0 /home/4G.img
C) use fdisk order new partition, the utility command row is as follows:
fdisk /dev/loop0;
Can input the instruction of m query manipulation this moment, and according to prompting, input n adds a new subregion, points out new divisional type;
The newly-built main partition of input p, main area code is selected in prompting;
Input 1, then start cylinder is selected in prompting;
The start cylinder default value is 1, can directly press enter key and select default value, inputs complete rear prompting end of input cylinder, finishes cylinder and inputs equally carriage return, selects default value 509;
At this moment, input p checks partition information, then as shown in the figure information can occur, the disk partition success, and number of partitions is one;
After subregion was finished, input w preserved and withdraws from the fdisk instruction, and this moment, the WARNING item of prompting did not affect the subregion result;
D) image file is unloaded from computing machine, the utility command row is as follows:
losetup -d /dev/loop0。
Step 3: make automatic carry script:
Make on computers the automatic carry script of virtual SD card auto_mount.sh, after completing script copied to set-top-box system /etc/ under.Content for script is as follows:
#! /system/bin/sh
var=$(losetup -f)
LOOPX=${var##*/}
insmod /lib/modules/2.6.32/loop.ko max_loop=16 max_part=5
echo "add" >/sys/block/$LOOPX/uevent
losetup $var /SDCard/4G.img
In above-mentioned script, use the insmod order that the Loop EM equipment module is joined in the system of running environment, max_loop be set simultaneously be the maximum number of the Loop equipment that allows in the system, max_part is the maximum number of partitions that a Loop equipment can be realized, can make amendment to script as required.At first inquire about idle Loop equipment during carry Loop equipment, carry image file on the equipment of free time.
Target approach device systems root directory, utility command vi opens and revises/init.rc, and in the end delegation adds order line, and then after start next time, system is automatic Run Script file, finishes virtual SD and is stuck in installation in the Android system.It is as follows to add order line:
service auto_mount /system/bin/sh /etc/auto_mount.sh
oneshot
Step 4: the virtual SD card of BootLoader
Create file " SDCard " under the set-top box root directory, ready-made image file copies under this catalogue on computers.
The starter motor top box, in the following path of Android system, " setting "-" storage "-and " format SD card ", virtual SD card can be formatd, and realize automatic carry, can be observed SD card total volume this moment is 4G.
Embodiment two
Present embodiment computer run environment is Ubuntu 10.04.2; Target device set-top box operational system is Android 2.3.4, kernel is Linux Kernel 2.6.32.59, and set-top box Trident PNX8473 adopts ARM-Cortex A9 processor architecture, and Nand Flash size is 1GB * 8, Nor Flash size is 32Mb, and the DDR size is 128MB * 2.
The Loop device drives that the present embodiment purpose is about to this target device is compiled in the linux kernel, is the virtual SD card of 4G for size of its carry.
Step 1: make up virtual block device for target device on computers:
1. add for the Loop device drives maximum number of partitions destination code is set
In order to make the target device can be when the kernel start-up loading Loop device drives, Loop number of devices and maximum number of partitions correctly are set, need in the source code ./linux-2.6.32.59/drivers/block/loop.c of Loop device drives file, add corresponding code.Specific code is as follows:
Figure BDA00002135030716
Figure BDA00002135030717
2. dispose and compiling linux kernel and Loop device drives
After finishing the configuration of crossstool chain, under the linux kernel ./linux-2.6.32.59/ of target device catalogue, carry out following order, open the kernel setup menu, the configuration linux kernel, the utility command row is as follows:
make menuconfig
In menu, select successively " Device Drivers " (device drives), " Block devices " (block device) option.In namely having represented, checks " Loopback device support " option in " Block devices " submenu the support of Loop equipment.
Press Y, Loopback device support option is changed into<* 〉, the driving of Loop equipment can be compiled among the kernel, when starting, kernel can automatically load the Loop device drives, and the preservation configuration also utilizes with the compiling linux kernel of issuing orders:
make
After compiling is finished, compiled kernel file is downloaded under the file directory of target device platform.
Step 2: create on computers image file and to its subregion:
3. under the home of computer file system catalogue, create the image file of a 4G, as the required image file of virtual SD card.The order line of using is as follows:
dd if=/dev/zero of=/home/4G.img bs=512 count=8000k;
4. to the image file subregion.
Loop equipment in the (SuSE) Linux OS can be associated with image file, thereby the storage space of image file as self used.After this, all are operation to image file by the Loop device translates namely to the operation of Loop equipment.
To the image file subregion time, first image file is mounted on the Loop equipment on the computing machine, be its subregion again.
A) during carry, need to use idle Loop equipment, use the Loop equipment of following inquiry of command line free time: losetup-f
The Loop equipment of the free time that obtains is Loop0;
B) image file is mounted on the idle Loop equipment loop0 of computing machine, the utility command row is as follows:
losetup /dev/loop0 /home/4G.img;
C) use fdisk order new partition, the utility command row is as follows:
fdisk /dev/loop0;
Can input the instruction of m query manipulation this moment;
According to the prompting of the menu that demonstrates, input n adds a new subregion, points out new divisional type;
The newly-built main partition of input p, main area code is selected in prompting;
Input 1, then start cylinder is selected in prompting;
The start cylinder default value is 1, can directly press enter key and select default value, inputs complete rear prompting end of input cylinder, finishes cylinder and inputs equally carriage return, selects default value 509;
At this moment, input p checks partition information, then as shown in the figure information can occur, the disk partition success, and number of partitions is one;
After subregion was finished, input w preserved and withdraws from the fdisk instruction, and this moment, the WARNING item of prompting did not affect the subregion result;
D) image file is unloaded from computing machine, the utility command row is as follows:
losetup -d /dev/loop0
Step 3: the target device setting also loads the Loop device drives:
Can automatically load the Loop device drives in the linux kernel start-up course of target device, provide Loop number of devices and two parameters of maximum number of partitions by the kernel start-up parameter (Boot arguments) that Linux is set to kernel.The linux kernel start-up parameter arranges in the Bootloader of target device platform.Loop number of devices and two parameters of maximum number of partitions with target device add the kernel start-up parameter on computers, and with original kernel start-up parameter expansion, form is as follows:
<original-bootargs> max_loop=16 max_part=5
In above-mentioned kernel start-up parameter,<original-bootargs〉the original kernel start-up parameter of representative, the number max_loop that Loop equipment is set is 16, it is 5 that maximum number of partitions max_part is set.The user can according to the actual requirements, revise concrete numerical value.Thereafter, the kernel start-up parameter that sets is preserved in the order that utilizes Bootloader to provide, and kernel just can correctly arrange and load Loop equipment according to user's request next time when guiding.
Step 4: make automatic carry script:
Make on computers the automatic carry script of virtual SD card auto_mount.sh, after completing script copied to set-top-box system /etc/ under.Content for script is as follows:
#!/system/bin/sh
var=$(losetup -f)
LOOPX=${var##*/}
echo "add" >/sys/block/$LOOPX/uevent
losetup $var /SDCard/4G.img
In above-mentioned script, at first inquire about idle Loop equipment during carry Loop equipment, carry image file on the equipment of free time.
Target approach equipment root directory uses vi to open and revise/init.rc, and in the end delegation adds order line, and then after start next time, system is automatic Run Script file, finishes virtual SD and is stuck in installation in the Android system.It is as follows to add order line:
service auto_mount /system/bin/sh /etc/auto_mount.sh
oneshot
Step 5: the virtual SD card of BootLoader
Create file " SDCard " under the set-top box root directory, ready-made image file copies under this catalogue on computers.The starter motor top box, in the following path of Android system, " setting "-" storage "-and " format SD card ", virtual SD card can be formatd, and realize automatic carry, can be observed SD card total volume this moment is 4G.

Claims (6)

1. the method for a virtual SD card on the device of Android system is characterized in that, comprises the steps:.
1) image file behind the subregion is downloaded in the Flash storer or hard disk of device;
2) find the Loop equipment of the Android system free time of device;
3) linux kernel of Android system sends to described Loop equipment and adds user's space message, and making Android system is disk unit with described Loop recognition of devices;
4) described Loop equipment is associated with image file behind the subregion, makes image file behind the described subregion as the storage space of described Loop equipment;
5) linux kernel of Android system sends subregion to described Loop equipment and inserts user's space message.
As claimed in claim 1 on the device of Android system the method for virtual SD card, it is characterized in that the image file behind the subregion in the described step 1) obtains as follows:
1.1) in the linux system of Linux main frame, find idle main frame Loop equipment;
1.2) create image file at the Linux main frame;
1.3) described main frame Loop equipment is associated with described image file, make described image file as the storage space of described main frame Loop equipment;
1.4) described image file is carried out image file after subregion obtains described subregion.
As claimed in claim 2 on the device of Android system the method for virtual SD card, it is characterized in that, by the crossstool chain on the described Linux main frame Loop device drives is compiled among the linux kernel of Android system of described device.
As claimed in claim 3 on the device of Android system the method for virtual SD card, it is characterized in that, comprise the steps:
Make virtual SD card carry script and be kept in the described device;
Create service in the booting script under the system file root directory of the Android system that installs, described service is so that after the described device start operation, Android system moves described virtual SD card carry script automatically;
After the described virtual SD card carry script operation, carry out described step 2) to step 5).
As claimed in claim 2 on the device of Android system the method for virtual SD card, it is characterized in that, the Loop device drives is compiled as the kernel module of the Android system of described device by the crossstool chain on the described Linux main frame, generate simultaneously the kernel module file, and described kernel module file is downloaded under the file directory of Android system of described device.
As claimed in claim 5 on the device of Android system the method for virtual SD card, it is characterized in that, comprise the steps:
Make virtual SD card carry script and be kept in the described device;
Create service in the booting script under the system file root directory of the Android system that installs, described service is so that after the described device start operation, Android system moves described virtual SD card carry script automatically;
After the described virtual SD card carry script operation, with described kernel module file load in linux kernel, thereby load the Loop device drives;
Carry out described step 2) to step 5).
CN201210338552.4A 2012-09-13 2012-09-13 The method of virtual SD card on the device of Android system Active CN102880498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210338552.4A CN102880498B (en) 2012-09-13 2012-09-13 The method of virtual SD card on the device of Android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210338552.4A CN102880498B (en) 2012-09-13 2012-09-13 The method of virtual SD card on the device of Android system

Publications (2)

Publication Number Publication Date
CN102880498A true CN102880498A (en) 2013-01-16
CN102880498B CN102880498B (en) 2016-08-03

Family

ID=47481837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210338552.4A Active CN102880498B (en) 2012-09-13 2012-09-13 The method of virtual SD card on the device of Android system

Country Status (1)

Country Link
CN (1) CN102880498B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150516A (en) * 2013-03-01 2013-06-12 中科创达软件股份有限公司 Method and device for enabling Android system equipment to enter temporary mode
WO2014161407A1 (en) * 2013-10-22 2014-10-09 中兴通讯股份有限公司 Mobile terminal and method thereof for using virtual memory card
CN104317661A (en) * 2014-11-04 2015-01-28 上海斐讯数据通信技术有限公司 Intersystem communication method and device of dual embedded systems
CN104346572A (en) * 2013-07-25 2015-02-11 中国科学院信息工程研究所 Construction method of universal external intelligent terminal safety operation environment
CN104391657A (en) * 2014-11-24 2015-03-04 上海盈方微电子有限公司 Method for mounting multi-partition storage device in Android system
CN104484217A (en) * 2014-12-31 2015-04-01 闻泰通讯股份有限公司 Partition ratio compilation adaptation method
CN104615946A (en) * 2015-02-13 2015-05-13 成都卫士通信息安全技术有限公司 Virtual encrypted disk data protection system and method based on intelligent mobile terminals
CN105094871A (en) * 2014-05-15 2015-11-25 林保成 Localization system and localization method for mounting games in portable storage device into game machine
CN105573820A (en) * 2015-12-15 2016-05-11 国云科技股份有限公司 Hot plug method for Xen virtual machine compact disc
CN105808269A (en) * 2014-12-30 2016-07-27 Tcl集团股份有限公司 Method and apparatus for installing application to virtual SD (Secure Digital) card
CN106650477A (en) * 2016-12-28 2017-05-10 郑州云海信息技术有限公司 Encryption method and apparatus
CN109142868A (en) * 2018-08-10 2019-01-04 上海电机学院 Electric harmonic detector
CN109379634A (en) * 2018-09-17 2019-02-22 四川长虹电器股份有限公司 A method of TVINFO is obtained based on device drives smart television
CN111309451A (en) * 2020-03-24 2020-06-19 广西梯度科技有限公司 Method for realizing cross compilation of Docker mirror images
CN112506822A (en) * 2020-12-04 2021-03-16 四川效率源信息安全技术股份有限公司 Method for mounting hard disk by PCIE card
CN113934461A (en) * 2021-09-26 2022-01-14 厦门亿联网络技术股份有限公司 DEX-based android system formatting method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506840A (en) * 2002-12-09 2004-06-23 联想(北京)有限公司 Method of utilizing virtual equipment file system in expanding memory capacity of movable device
US20120124390A1 (en) * 2010-11-15 2012-05-17 Mod Systems Incorporated Virtual Secure Digital Card

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506840A (en) * 2002-12-09 2004-06-23 联想(北京)有限公司 Method of utilizing virtual equipment file system in expanding memory capacity of movable device
US20120124390A1 (en) * 2010-11-15 2012-05-17 Mod Systems Incorporated Virtual Secure Digital Card

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
孙海勇: "《手把手教你构建自己的linux系统》", 31 December 2010, article "手把手教你构建自己的linux系统", pages: 265-268 *
张竞凯等: "基于S3c2410和linux2.6内核的嵌入式系统存储扩展", 《微计算机应用》, vol. 29, no. 4, 30 April 2008 (2008-04-30), pages 104 - 109 *
邓凡平: "《深入理解Android:卷Ⅰ》", 30 September 2011, article "深入理解Android:卷Ⅰ", pages: 397-398 *
钟子昌: "《Linux高级配置详解》", 31 January 2002, article "Linux高级配置详解", pages: 103 *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150516A (en) * 2013-03-01 2013-06-12 中科创达软件股份有限公司 Method and device for enabling Android system equipment to enter temporary mode
CN103150516B (en) * 2013-03-01 2015-10-28 中科创达软件股份有限公司 A kind of android system equipment enters method and the device of temporary mode
CN104346572B (en) * 2013-07-25 2017-11-14 中国科学院信息工程研究所 A kind of general external intelligent terminal secure operating environment construction method
CN104346572A (en) * 2013-07-25 2015-02-11 中国科学院信息工程研究所 Construction method of universal external intelligent terminal safety operation environment
WO2014161407A1 (en) * 2013-10-22 2014-10-09 中兴通讯股份有限公司 Mobile terminal and method thereof for using virtual memory card
CN104580669A (en) * 2013-10-22 2015-04-29 中兴通讯股份有限公司 Mobile terminal and virtual memory card use method thereof
CN105094871B (en) * 2014-05-15 2018-08-31 林保成 The localization system and its method played in game machine carry portable memory device
CN105094871A (en) * 2014-05-15 2015-11-25 林保成 Localization system and localization method for mounting games in portable storage device into game machine
CN104317661A (en) * 2014-11-04 2015-01-28 上海斐讯数据通信技术有限公司 Intersystem communication method and device of dual embedded systems
CN104391657A (en) * 2014-11-24 2015-03-04 上海盈方微电子有限公司 Method for mounting multi-partition storage device in Android system
CN105808269B (en) * 2014-12-30 2019-11-12 Tcl集团股份有限公司 A kind of method and device that application is installed to virtual SD card
CN105808269A (en) * 2014-12-30 2016-07-27 Tcl集团股份有限公司 Method and apparatus for installing application to virtual SD (Secure Digital) card
CN104484217A (en) * 2014-12-31 2015-04-01 闻泰通讯股份有限公司 Partition ratio compilation adaptation method
CN104484217B (en) * 2014-12-31 2017-11-28 闻泰通讯股份有限公司 Subregion proportioning compiling adaptation method
CN104615946A (en) * 2015-02-13 2015-05-13 成都卫士通信息安全技术有限公司 Virtual encrypted disk data protection system and method based on intelligent mobile terminals
CN105573820A (en) * 2015-12-15 2016-05-11 国云科技股份有限公司 Hot plug method for Xen virtual machine compact disc
CN106650477A (en) * 2016-12-28 2017-05-10 郑州云海信息技术有限公司 Encryption method and apparatus
CN109142868A (en) * 2018-08-10 2019-01-04 上海电机学院 Electric harmonic detector
CN109379634A (en) * 2018-09-17 2019-02-22 四川长虹电器股份有限公司 A method of TVINFO is obtained based on device drives smart television
CN111309451A (en) * 2020-03-24 2020-06-19 广西梯度科技有限公司 Method for realizing cross compilation of Docker mirror images
CN111309451B (en) * 2020-03-24 2023-07-14 广西梯度科技股份有限公司 Method for realizing Docker mirror image cross compiling
CN112506822A (en) * 2020-12-04 2021-03-16 四川效率源信息安全技术股份有限公司 Method for mounting hard disk by PCIE card
CN112506822B (en) * 2020-12-04 2023-06-02 四川效率源信息安全技术股份有限公司 Method for mounting hard disk by PCIE card
CN113934461A (en) * 2021-09-26 2022-01-14 厦门亿联网络技术股份有限公司 DEX-based android system formatting method and device
CN113934461B (en) * 2021-09-26 2023-10-13 厦门亿联网络技术股份有限公司 DEX-based android system formatting method and device

Also Published As

Publication number Publication date
CN102880498B (en) 2016-08-03

Similar Documents

Publication Publication Date Title
CN102880498B (en) The method of virtual SD card on the device of Android system
CN102799464B (en) Virtual machine creation method and system, virtual machine reloading method and system
CN106775723B (en) Android platform-based system firmware customization method and Android device
CN106201927B (en) For network driver to be injected to the device and method of target images
CN103019775B (en) A kind of method of terminal device brush machine, device and equipment
CN101986266B (en) Method for transplanting Android mobile phone operating system to Atom development board
CN103826162A (en) Embedded system of intelligent set top box based on Android and recovery method of embedded system
US7721258B2 (en) Integrated development environment with managed platform registry
CN104182255A (en) Method and terminal for upgrading library files of system application
CN102402446A (en) Method and device for installing application software
CN107870769A (en) The installation method and device of operating system
CN101226477A (en) Method for implementing Linux operating system being suitable for mobile application
CN101515239A (en) Quick start method of X86 flight control computer
CN102937909B (en) A kind of method of disposing and upgrading linux system
WO2018090529A1 (en) Method and system for mirror image package preparation and application operation
US20150149756A1 (en) System and method for setting up a bootable storage device using image
CN113821221B (en) Method, apparatus and storage medium for installing operating system
CN104866324A (en) Method for constructing portable operating system and portable memorizer
CN101169729A (en) Embedded type system and method for renewing application program
CN105824678A (en) Method and device for installing operating system
CN104182257A (en) Application software installation method and device
CN108829465B (en) Local dynamic loading system and method based on direct read-write FLASH
WO2010035214A1 (en) Method and apparatus for updating a software image
CN104035757A (en) MIPS-based (microprocessor without interlocked piped stages-based) U-boot (universal boot loader) transplantation implementing method
CN106843973B (en) A method of transplanting embedded system simultaneously starts in SD card

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant