Embodiment
Below in conjunction with accompanying drawing, the method and apparatus of realizing mobile phone USB binding according to the embodiment of the present invention is provided to description more specifically.
According to one embodiment of present invention, provide a kind of method that realizes mobile phone USB binding.Fig. 1 illustrates that the method that the present embodiment provides comprises following content according to the process flow diagram of the method that realizes mobile phone USB binding of this embodiment of the invention:
S110, mobile phone carry out USB connect time, prompting user whether enable USB binding function, wherein, described USB binding function provides the function of service on net for mobile phone is connected to other equipment by USB;
Specifically, such as, in the time that mobile phone is connected to computing equipment (computing machine, other mobile phones, portable mobile apparatus etc.) by USB connecting line, can first point out user whether to enable the USB binding function in mobile phone.In a preferred exemplary of the present invention, can inquire whether user enables USB binding function by the form of graphical dialog.
The operational order of S120, reception user input, whether described operational order is used to indicate enables USB binding function;
Specifically, can receive the operational order of whether enabling USB binding function that is used to indicate that user inputs by input equipment.For example, user can input described operational order by touching the specific region in graphical interfaces or the specific button of pressing on cell phone keyboard.
If when USB binding function is enabled in the described operational order instruction of S130, start the USB binding function of mobile phone;
Specifically, if user determines to enable USB binding function, can start for user the USB binding function of mobile phone.
If when USB binding function is not enabled in the described operational order instruction of S140, start the access facility of the memory unit in mobile phone;
Specifically, if user determines not enable USB binding function, can only enable the access facility of the memory unit in mobile phone for user.
Like this, by carry out when USB connects directly pointing out user whether to need to enable the USB binding function of mobile phone at mobile phone, can make user enable easily the USB binding function of mobile phone.
In addition, according in the method that realizes mobile phone USB binding of above-described embodiment, can utilize various suitable processing to start the USB binding function of mobile phone according to different situations.
Specifically, in the time that the mobile phone of Android system connects by USB, the google pattern of mobile phone in acquiescence, i.e. USB port pattern.Under this USB port pattern, if ADB is (Android Debug Bridge, Android debugging bridge) be enabled, can start by ADB order or SCSI (small computer system interface) order the USB binding function of mobile phone, to mobile phone is switched to USB binding pattern from USB port pattern; And if ADB is prohibited, the USB binding function of mobile phone can be started by scsi command, to mobile phone is switched to USB binding pattern from USB port pattern.
In one embodiment of the invention, under USB port pattern and the in the situation that ADB is enabled, can use any one in ADB order or scsi command at mobile phone, mobile phone is switched to USB binding pattern from USB port pattern.
In another embodiment of the present invention, under USB port pattern and in the forbidden situation of ADB, can use scsi command at mobile phone, mobile phone is switched to USB binding pattern.As a concrete example, can in driving, mobile phone increase do_scsi_command function branch as SC_SWTETHER, be switched to USB binding pattern to realize from USB port pattern.
Thus, realized mobile phone has been switched to USB binding pattern.
Embodiments of the invention described above are only example, the invention is not restricted to this but can also carry out other suitable remodeling or amendments.For example, with reference to figure 2, in another embodiment of the present invention, be also included in the access facility that further enables the memory unit in mobile phone in the situation of the USB binding function that enables mobile phone.Fig. 2 shows according to the process flow diagram of the method that realizes mobile phone USB binding of this embodiment.
In the method shown in Fig. 2, step S110, the S120, S130, the S140 that in the processing of step S210, S220, S230, S240 and Fig. 1, describe are similar, no longer repeat so that instructions keeps succinct at this.
As shown in Figure 2, in the case of the USB binding function that enables mobile phone, the party also comprises: step S250, an ADB port of increase, wherein, described USB binding function takies an ADB port transmits the data of described service on net, described USB binding function transmits the data in described memory unit by the ADB port increasing, so that mobile phone is realized the access facility of USB binding function and memory unit simultaneously;
As an example, in the situation that mobile phone USB binding function is activated, (be that mobile phone is in USB binding pattern, wherein USB binding function takies an ADB port), can increase ADB port, ADB port by described increase transmits the data in described memory unit, to carry out data interaction with mobile phone.Thus, mobile phone is realized the access facility of USB binding function and memory unit simultaneously.
By enabling by this way the access facility of the memory unit in mobile phone, the USB binding function that can realize at mobile phone, the access to memory unit in mobile phone simultaneously, is user-friendly to.
Embodiments of the invention described above are only example, the invention is not restricted to this but can also carry out other suitable remodeling or amendments.For example, with reference to figure 3, in another embodiment of the present invention, can also comprise the processing of the USB binding function of closing hand phone.Fig. 3 shows according to the process flow diagram of the method that realizes mobile phone USB binding of this embodiment.
In the method shown in Fig. 3, step S210, the S220, S230, S240, the S350 that in the processing of step S310, S320, S330, S340, S350 and Fig. 2, describe are similar, no longer repeat so that instructions keeps succinct at this.
As shown in Figure 3, in the situation that mobile phone USB binding function is enabled, if user wishes to close USB binding function, user can indicate the USB binding function of (for example,, by the touch of mobile phone interface being operated to send the instruction of closing USB binding function) closing hand phone.In this case, as a preferred exemplary, for example, at step S360 place, can utilize ADB port (for example, increase for realizing the ADB port of access of the memory unit to mobile phone) to carry out the USB binding function of closing hand phone.
Thus, user's USB binding function of closing hand phone easily.
Similar with the above-mentioned method that realizes mobile phone USB binding, with reference to figure 4, the embodiment of the present invention also provides corresponding device.Fig. 4 shows the device of realizing according to an embodiment of the invention mobile phone USB binding.
As shown in Figure 4, can comprise Tip element 410, receiving element 420, binding start unit 430 and access start unit 440 according to the device of realizing mobile phone USB binding of the embodiment of the present invention.
Wherein, Tip element 410 can be in the time that mobile phone carries out USB connection, and whether prompting user enables USB binding function, and wherein, described USB binding function provides the function of service on net for mobile phone is connected to other equipment by USB.Receiving element 420 can be for receiving the operational order of user's input, and whether described operational order is used to indicate enables USB binding function.If when binding start unit 430 can be enabled USB binding function for described operational order instruction, start the USB binding function of mobile phone.If access start unit 440 can not enabled USB binding function for described operational order instruction, start the access facility of the memory unit in mobile phone.
Like this, by according to the device of realizing mobile phone USB binding of the embodiment of the present invention, can make user enable easily the USB binding function of mobile phone.
In said apparatus, binding start unit can be further used for: when mobile phone is in USB port pattern, and when Android debugging bridge ADB is enabled, start the USB binding function of mobile phone by ADB order or small computer system interface scsi command, to mobile phone is switched to USB binding pattern from USB port pattern; Or when mobile phone is in USB port pattern, and Android debugging bridge ADB is while being prohibited, starts the USB binding function of mobile phone, to mobile phone is switched to USB binding pattern from USB port pattern by scsi command.
In an example of the present invention, at mobile phone, under google pattern and the in the situation that ADB is enabled, binding start unit can use any one in ADB order or scsi command, and mobile phone is switched to USB binding pattern.
In another example of the present invention, at mobile phone, under google pattern and in the forbidden situation of ADB, binding start unit can use scsi command, and mobile phone is switched to USB binding pattern.As a concrete example, can in driving, mobile phone increase do_scsi_command function branch as SC_SWTETHER, be switched to USB binding pattern to realize.
Thus, realized mobile phone has been switched to USB binding pattern.
Embodiments of the invention described above are only example, the invention is not restricted to this but can also carry out other suitable remodeling or amendments.
In another embodiment of the present invention, the above-mentioned device of realizing the binding of mobile phones universal serial bus USB can also comprise that port increases unit.Fig. 5 illustrates the device of realizing mobile phone USB binding according to this embodiment of the invention.As shown in Figure 5, comprise that according to the device of realizing mobile phone USB binding of this embodiment Tip element 510, receiving element 520, binding start unit 530, access start unit 540 and port increase unit 550.Wherein, Tip element 510, receiving element 520, binding start unit 530, access start unit 540 and the Tip element 410 shown in Fig. 4, receiving element 420, binding start unit 430, access start unit 440 are similar, do not repeat them here so that instructions keeps succinctly.
Described port increases unit for increasing an ADB port, wherein, described USB binding function takies an ADB port transmits the data of described service on net, described USB binding function transmits the data in described memory unit by the ADB port increasing, so that mobile phone is realized the access facility of USB binding function and memory unit simultaneously.
By enabling by this way the access facility of the memory unit in mobile phone, the access to memory unit in mobile phone the USB binding function that can realize at mobile phone, is user-friendly to.
In another embodiment of the present invention, the above-mentioned device of realizing the binding of mobile phones universal serial bus USB can also can further include closing unit.Described closing unit is for utilizing an ADB port of increase to carry out the USB binding function of closing hand phone.Fig. 6 illustrates the device of realizing mobile phone USB binding according to this embodiment of the invention.
As shown in Figure 6, comprise that according to the device of realizing mobile phone USB binding of this embodiment Tip element 610, receiving element 620, binding start unit 630, access start unit 640, port increase unit 650 and closing unit 660.Wherein, shown in Tip element 610, receiving element 620, binding start unit 630, access start unit 640, port increase unit 650 and Fig. 4, Fig. 5, parts are similar, do not repeat them here so that instructions keeps succinct.
As a preferred exemplary, closing unit 660 can utilize ADB port (for example, increase for realizing the ADB port of access of the memory unit to mobile phone) to carry out the USB binding function of closing hand phone.
Thus, user's USB binding function of closing hand phone easily.
Be corresponding with method technically according to the said apparatus of the embodiment of the present invention, can, referring to the detailed description of method, no longer repeat to make instructions to keep succinct at this about the ins and outs of device.
An alternative embodiment of the invention also provides a kind of mobile phone.Described in described mobile phone, mobile phone comprises according to the device of realizing the binding of mobile phones universal serial bus USB described in any above-described embodiment.In addition, described mobile phone also comprises: radio circuit, voicefrequency circuit, power circuit.
Wherein, described radio circuit can be set up communicating by letter of mobile phone and wireless network, realizes the digital received and sent of mobile phone and wireless network; Described voicefrequency circuit can gather sound and the sound of collection is converted into voice data, so that described mobile phone sends described voice data by described radio circuit to wireless network, and/or the voice data that described mobile phone is received from wireless network by described radio circuit, be reduced to sound and play this sound to user; Described power circuit can be used to each circuit or the device power supply of described mobile phone.
Although the method and apparatus of realizing mobile phones universal serial bus USB binding function according to the present invention is described as an example of mobile phone example above, the present invention not only only limits to mobile phone, but can be applied to any user terminal that uses Android system.
An alternative embodiment of the invention also provides a kind of terminal device that uses Android system.This terminal device for example can comprise: according to the device of realizing general-purpose serial bus USB binding described in any above-described embodiment; Power supply, described power supply is used for described power terminal equipment; Shell; Circuit board, described circuit board is placed in described enclosure; Input/output device, described input/output device is placed on described shell, and is electrically connected with described circuit board; Communication unit, described communication unit and external network communicate.
Specifically, described input/output device can be for example the combination of touch-screen or keyboard and display screen etc.
Described communication unit can be for example the parts of any appropriate such as WiFi module, 3G communications component, bluetooth module.
In addition, can also comprise the selectable unit (SU) such as microphone, loudspeaker according to the terminal device of the use Android system of the embodiment of the present invention.
In specific embodiments of the invention, described terminal device can be for example human-computer interaction terminal, e-book or other suitable terminal devices.
It should be appreciated by those skilled in the art that in the embodiment of the present invention, the function that is divided into of apparatus module is divided, actual concrete structure can be fractionation or the merging of above-mentioned functions module.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
The scheme that the content of claim is recorded is also the protection domain of the embodiment of the present invention.
One of ordinary skill in the art will appreciate that all or part of processing in above-described embodiment method is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in a kind of computer-readable recording medium.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.