Background technology
In current Android (android) equipment, the connection mode with computer has two kinds, and one is USB debugging mode, and one is massive store pattern (USB flash disk pattern).Under massive store pattern, mobile device function as USB flash disk, be connected to computer directly as memorizer.User, by operation computer, may browse through the file in mobile phone in a computer.
USB debugging mode is the pattern of Android system authority open to external program.Under USB debugging mode, external program may be used for directly replicating data at computer and equipment, set up applications on equipment, and reads record data, and does not issues a separate notice.If external program to take over or to participate in Android system control, being necessary under USB debugging mode, otherwise external program cannot realize its control function.Such as: the cell phone managing softwares such as Semen Pisi sativi folder, 91 mobile phone assistants must could be managed operation under USB debugging mode to mobile phone.If under massive store pattern, it is impossible to carry out the operations such as the storage of data, duplication.The cell phone managing softwares such as existing pea pods, 91 mobile phone assistants are after mobile phone open USB debugging switch, connected by USB data line, driver needed for mobile phone is installed just can the file in mobile phone be managed, including install APK application program, replicate, shear, mobile file etc. operates.
Under massive store pattern, Android device function as USB flash disk, be directly connected to computer by USB data line, use as memorizer in a computer.In a computer, the internal memory of Android device and external memory are as the movable memory equipment of computer.Being shown generically two drives in a computer, one is Android internal memory, and one is external memory.External memory is SD card.Under massive store pattern, it is impossible to the management operation that the files such as the video in Android device, audio frequency, picture are similar under USB debugging mode.And, under massive store pattern, it is impossible to be written and read waiting operation to the file of its external memory by mobile phone, computer to access can only be passed through.Mobile phone function as card reader, it reads internal memory and external memory.
Summary of the invention
The purpose of the present invention, it is simply that overcome the deficiencies in the prior art, it is provided that a kind of under massive store pattern, computer remains able to a kind of management method and system of android device files obtaining and being managed Android device file.
In order to achieve the above object, adopt the following technical scheme that
The management method of a kind of Android device file, for being managed the file of Android device after Android device with computer physical connection, comprises the following steps: read the connection mode of Android device and computer;Judge whether Android device is massive store pattern with the connection mode of computer, the memorizer subset that if so, search Android device produces at computer, obtain the destination address of this memorizer subset;File by destination address management Android device.
Further, the connection mode reading Android device specifically includes following steps: read the device id of Android device;The driver that starting device ID is corresponding;Send the inquiry Android device querying command with the connection mode of computer to Android device;Inquiry Android device and the state value of the connection mode of computer, determine the connection mode of Android device and computer.
Further, described reading Android device is further comprising the steps of with the connection mode of computer: read the device id of Android device;Whether detection Android device produces the memorizer subset of this device id at computer, the most then Android device is massive store pattern with the connection mode of computer.
Further, the destination address of this memorizer subset of described acquisition includes obtaining internal memory and the destination address of external memory.
Further, the described file by destination address management Android device comprises the following steps: read the information of the file of Android device by destination address;Show the information of described file in a computer;Read the operation that described file is performed by user;The operation that described file is performed by transmission user is to Android device;Android device performs described operation.
A kind of management system of Android device file, for Android file being managed after Android device with computer physical connection, including: reading device, for reading the connection mode of Android device and computer;Judge acquisition device, for judging whether Android device is massive store pattern with the connection mode of computer, the memorizer subset that if so, search Android device produces at computer, obtain the destination address of this memorizer subset;Managing device, for the file by destination address management Android device.
Further, described reading device includes read module, for reading the device id of Android device;Drive module, for the driver that starting device ID is corresponding;Command module, for sending the inquiry Android device querying command with the connection mode of computer to Android device;Enquiry module, for inquiring about the state value of Android device and the connection mode of computer, determines the connection mode of Android device and computer.
Further, described reading device includes read module, for reading the device id of Android device;Whether detection module, produce the memorizer subset of this device id for detecting Android device at computer, the most then Android device is massive store pattern with the connection mode of computer.
Further, described memorizer subset includes internal memory subset and the external memory subset of Android device.
Further, described managing device includes file information read module, for being read the information of the file of Android device by destination address;Display module, for showing the information of described file in a computer;Monitoring module, for reading the operation that described file is performed by user;Sending module, for sending operation that described file performs by user to Android device;Perform module, perform described operation for Android device.
Compared with prior art, the beneficial effects of the present invention is:
The present invention can manage the file of Android device under massive store pattern, change by cell phone managing software, file cannot be replicated under traditional massive store pattern, shear, move, the operation such as installation.Eliminate user simultaneously and select the trouble of connection mode.Make user can be transferred through cell phone managing software under massive store pattern the file in Android device is managed, it is thus achieved that preferably experience.
Embodiment one
Referring to Fig. 1, it is the flow chart of steps of management method of a kind of Android device file, for being managed the file of mobile phone after mobile phone with computer physical connection, comprises the following steps:
S10: read the connection mode of mobile phone and computer.
Specifically, the mobile phone installing Android operation system has the connection mode of two kinds and computer.One is USB debugging mode, and it can directly replicate data, set up applications on mobile phone between computer and mobile phone, and reads record data, and does not issues a separate notice.Another kind is massive store pattern, is also called USB flash disk pattern.The file of mobile phone, under massive store pattern, only can be replicated, shears, the operation such as deletion by tradition.The operation that mobile phone can be carried out in both modes is different.Need to judge that mobile phone is in connection mode in which.Referring to Fig. 2, step S10 specifically includes following steps:
S101: read the device id of mobile phone.Device id is one group of character string of the unique identification hardware of a kind of energy, and having of all devices is numbered as follows: VID_XXXX&PID_YYYY.Wherein character string " XXXX " represents the numbering of producer is the self-defining product type of producer with " YYYY ".VID_XXXX&PID_YYYY can uniquely identify an equipment.By character string " YYYY " it is known that the model of this mobile phone.
S102: the driver that starting device ID is corresponding.By the model of device id identification mobile phone, thus start the driver of this mobile phone.If computer does not comprise the driver of this mobile phone model, then downloaded the driver of coupling by high in the clouds.Download after the driver mated is installed, start this driver.After starting driver, the communication that can set up computer and mobile phone connects, it is achieved the exchange of data.
S103: send the inquiry mobile phone querying command with the connection mode of computer to mobile phone.Utilize disclosed instrument " ADB " to send querying command and can identify this order to mobile phone, mobile phone terminal.
S104: inquiry mobile phone and the state value of the connection mode of computer, determine the connection mode of mobile phone and computer.After mobile phone receives querying command, a state value can be returned to computer.The connection mode of mobile phone and computer is may determine that according to this state value.
S20: judge whether mobile phone is massive store pattern with the connection mode of computer, the memorizer subset that if so, searching handset produces at computer, obtain the destination address of this memorizer subset.
Specifically, computer is from the code returned, and the numerical value of " nSdState " field represents connection mode.Can identify whether mobile phone opens massive store pattern from the numerical value of this field, i.e. state value.If state value is 2, then it represents that open massive store pattern.After opening massive store pattern, mobile phone produces memorizer subset in a computer.Memorizer subset includes internal memory subset and external memory subset.Internal memory subset is to be produced by the memorizer of embedded in mobile phone, and external memory subset is produced by expansion card.Mobile phone has internal memory subset, and external memory storage subset obtains according to the practical situation of mobile phone.When memorizer subset being detected, obtain the destination address of this memorizer subset.Such as, the drive of memorizer subset is H dish, then H dish is exactly the destination address of mobile phone memory.And for example, the drive of the internal memory subset of mobile phone is H dish, and the drive of internal memory subset is I dish, then the path at H dish place is exactly the destination address of internal memory, and the path at I dish place is exactly the destination address of external memory.
S30: by the file of destination address managing mobile phone.
Specifically, after obtaining the destination address of memorizer subset, it is possible to enter, by this destination address, the memorizer that this destination address is corresponding, enumerate the file in this memorizer, All Files is carried out Classification Management.Referring to Fig. 3, step S30 specifically includes following steps:
S301: read the information of the file of mobile phone by destination address.Enter memorizer by destination address, enumerate the All Files in memorizer, including picture, audio file, video file, apk, the files such as file are installed.Read the information such as the title of these files, amount of capacity, set-up time, icon, version number and position.
S302: show the information of described file in a computer.In a computer the icon of these files, title, amount of capacity, set-up time, version number and positional information are fabricated to the page or relation corresponding lists.The path distributed by computer according to positional information, i.e. this document by above-mentioned file in mobile phone, does a relationship map.Described file can be directly found by mapping, enter the file at described file place.
S303: read the operation that described file is performed by user.The operations such as above-mentioned file is such as sheared, replicated by user in a computer, installation.These operations of record user.
S304: the operation that described file is performed by transmission user is to mobile phone.Sending the operation information of record to mobile phone, by this operational order of Android system identification, and the operation for computer Chinese part carries out same operation.Such as, by the page or relation corresponding lists, one file is performed double click operation in a computer.Described file is apk file.Send this double click operation to instruct to mobile phone.Carry out next step.
S305: mobile phone performs described operation.Mobile phone performs the operation being equal in a computer to this document.Double click operation is to install for application program in a computer.Mobile phone performs the operation of equivalent, i.e. performs to install operation to apk file.
In a computer the file content of Computer display is operated, found the file of correspondence by destination address, respective file in mobile phone is carried out identical operation.Achieve the purpose of managing mobile phone file under massive store pattern.
Referring to Fig. 4, it is the structural representation of management system of a kind of Android device file, for being managed Android file after mobile phone with computer physical connection, including reading device 1, judges acquisition device 2 and managing device 3.
Referring to Fig. 5, described reading device 1 reads the connection mode of mobile phone and computer.The equipment being provided with Android operation system has the connection mode of two kinds and computer.One is USB debugging mode, and another kind is massive store pattern.USB debugging mode can directly replicate data, set up applications on mobile phone between computer and mobile phone, and reads record data, and does not issues a separate notice.Under massive store pattern, only the file of mobile phone can be replicated, shear, the operation such as deletion.The operation that mobile phone can be carried out in both modes is different.Described reading device 1 includes the read module 11 being located in mobile phone, and it is for reading the device id of mobile phone.The device id that the driving module 12 of computer reads according to read module 11, starts the driver that this device id is corresponding, and the communication set up between computer with mobile phone is connected.The command module 13 of computer sends the inquiry mobile phone querying command with the connection mode of computer to mobile phone.The enquiry module 14 of mobile phone, by itself and the state value of the connection mode of computer in inquiry mobile phone, determines the connection mode of mobile phone and computer.
Described judgement acquisition device 2 is located at computer, for judging whether mobile phone is massive store pattern with the connection mode of computer, and the memorizer subset that if so, searching handset produces at computer, obtain the destination address of this memorizer subset.Described memorizer subset includes internal memory subset and the external memory subset of Android device.
The described managing device 3 file by destination address managing mobile phone.Described managing device 3 includes file information read module 31, display module 32, monitoring module 33, sending module 34 and performs module 35.The described file information read module 31 being located at mobile phone passes through the drive at destination address lookup Android file place, and reads the information of the file of mobile phone.The information that the display module 32 of computer reads according to read module 31, shows the information of described file in a computer.Described information includes reading the information such as the title of file, amount of capacity, set-up time, icon, version number and position.The described monitoring module 33 being located at computer records the routine operation that described file is performed by user.Such as replicate, delete, unload, the routine operation such as stickup.Operation that described file performs by user is sent to mobile phone by the sending module 34 being located at computer.Execution module 35 at mobile phone performs user needs operation to be performed.
Android device described in the present embodiment includes but not limited to mobile phone, also includes the Android device such as panel computer.The present embodiment is applied in cell phone managing software, it is possible to achieve under Large Copacity pattern, and cell phone managing software can still provide for managing normally operation.Embodiment two
Referring to Fig. 6, it is the flow chart of steps of management method of a kind of Android device file.The difference of the present embodiment and embodiment one is the concrete steps of step S10, and it comprises the following steps:
S101: read the device id of Android device.This step is identical with embodiment one, does not repeats them here.
S102: whether detection Android device produces the memorizer subset of this device id at computer, the most then Android device is massive store pattern with the connection mode of computer.By reading the newly added equipment of task manager in computer, being appreciated that whether newly-increased external equipment produces memorizer subset, if producing, then explanation mobile phone is massive store pattern with the connection mode of computer.
Referring to Fig. 7, it is the structural representation of management system of a kind of Android device file.The reading device 1 of the present embodiment includes read module 11 and detection module 15.Described read module reads 11 device ids taking Android device.The system of the system of the present embodiment and embodiment one is distinguished and is, is located at the detection module 15 of computer and whether produces the memorizer subset of this device id for detecting mobile phone at computer.In Android system, if mobile phone is connected by massive store pattern with computer, then mobile phone can produce a memorizer subset in a computer.Including internal memory subset and external memory storage subset.If there being memorizer subset, then explanation mobile phone is massive store pattern with the connection mode of computer.
The technical scheme provided the embodiment of the present invention above is described in detail, principle and the embodiment of the embodiment of the present invention are set forth by specific case used herein, and the explanation of above example is only applicable to help to understand the principle of the embodiment of the present invention;Simultaneously for one of ordinary skill in the art, according to the embodiment of the present invention, all will change in detailed description of the invention and range of application, in sum, this specification content should not be construed as limitation of the present invention.