WO2014187106A1 - 终端调试端口的开启方法、装置与终端 - Google Patents

终端调试端口的开启方法、装置与终端 Download PDF

Info

Publication number
WO2014187106A1
WO2014187106A1 PCT/CN2013/088897 CN2013088897W WO2014187106A1 WO 2014187106 A1 WO2014187106 A1 WO 2014187106A1 CN 2013088897 W CN2013088897 W CN 2013088897W WO 2014187106 A1 WO2014187106 A1 WO 2014187106A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
infrared sensor
button
state
instruction
Prior art date
Application number
PCT/CN2013/088897
Other languages
English (en)
French (fr)
Inventor
彭宁华
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to EP13885247.0A priority Critical patent/EP3001653B1/en
Priority to US14/891,424 priority patent/US9501435B2/en
Publication of WO2014187106A1 publication Critical patent/WO2014187106A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/002Specific input/output arrangements not covered by G06F3/01 - G06F3/16
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/66Substation equipment, e.g. for use by subscribers with means for preventing unauthorised or fraudulent calling
    • H04M1/667Preventing unauthorised calls from a telephone set
    • H04M1/67Preventing unauthorised calls from a telephone set by electronic means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/64Details of telephonic subscriber devices file transfer between terminals

Definitions

  • the present invention relates to the field of smart phones, and more particularly to a method, device and terminal for opening a terminal debugging port. Background technique
  • the touch screen is the most frequently used component of the smart phone.
  • the mainstream is the capacitive touch screen, which requires a finger or a capacitive pen to touch the screen when positioning.
  • Capacitive touch screens are relatively fragile, and prolonged touch can easily lead to local failure. Affected by temperature and magnetic field, it is also easy to cause the touch screen to drift, resulting in inaccurate touch. Moisture, static electricity, squeezing, and dropping often result in permanent failure of the touch screen.
  • an embodiment of the present invention provides a method, a device, and a terminal for opening a terminal debugging port.
  • a terminal debugging is provided.
  • the method of opening the port and adopting the following technical solutions:
  • the method for opening the terminal debugging port includes: acquiring an instruction input by the user to enable the debugging port, where the instruction is a second operation of performing an infrared sensor of the terminal while the first operation of pressing the button of the terminal is performed Generating; according to the instruction, triggering an interrupt service subroutine of the infrared sensor; determining, according to the interrupt service subroutine, a state of the infrared sensor and a pressed state of a button of the terminal, and obtaining a judgment result And determining that the terminal screen is unlocked and the debug port is enabled when the determination result meets a preset criterion.
  • the instruction is generated by performing a second operation of blocking the infrared sensor of the terminal while performing the first operation of pressing the upper volume key and the lower volume key of the terminal.
  • the interrupt service subroutine determines that the determination result satisfies a preset criterion, and includes: the interrupt service subroutine acquires a state of the infrared sensor and a pressed state of a button of the terminal; and determines the infrared sensor Whether the state is a proximity event and whether the pressed state of the button is valid, and the determination result is obtained; wherein the state of the infrared sensor is a proximity event and the pressed state of the button is valid When it is confirmed, the judgment result satisfies the preset criterion.
  • the state of the infrared sensor refers to: an approach event of the infrared sensor.
  • the case where the pressed state of the button is valid means: the time when the button is pressed, and the button is held down to reach the preset time value.
  • an apparatus for opening a terminal debugging port is provided, and the following technical solutions are adopted:
  • the opening device of the terminal debugging port includes: an acquiring module configured to acquire a command input by the user to enable the debugging port, where the instruction is to perform the first operation of pressing the button of the terminal, and the infrared sensor of the executing terminal is blocked Generated by the second operation; trigger module, with Setting the interrupt service subroutine of the infrared sensor according to the instruction; the determining module is configured to determine, according to the interrupt service subroutine, the state of the infrared sensor and the pressed state of the button of the terminal, And obtaining a judgment result; the control module is configured to: when the determination result meets the preset criterion, control the terminal screen to unlock and open the debug port.
  • the determining module includes: an obtaining submodule configured to acquire, by the interrupt service subroutine, a state of the infrared sensor and a pressed state of a button of the terminal; and a determining submodule configured to determine the infrared sensor Whether the state is a proximity event and the pressed state of the button is valid, and the determination result is obtained;
  • the confirmation module is configured to confirm that the determination result satisfies the preset criterion when the state of the determination that the infrared sensor is in the proximity event and the pressed state of the button is valid.
  • a terminal is provided, and the following technical solution is adopted:
  • the terminal includes the above-described opening device.
  • the ADB debugging port of the mobile phone USB can be reliably opened by using the infrared sensor and the button, so that the mobile phone management software in the computer can connect the mobile phone through the USB data cable.
  • the personal information in the computer is imported into the computer, thereby improving the quality of the mobile phone and the user experience.
  • FIG. 1 is a flowchart of a method for opening a terminal debugging port according to the first embodiment of the present invention
  • FIG. 2 is a flowchart showing a method for opening a terminal debugging port according to the second embodiment of the present invention
  • 4 is a schematic structural diagram of a device for opening a terminal debugging port according to Embodiment 4 of the present invention
  • FIG. 5 is a schematic structural diagram of a determining module according to Embodiment 4 of the present invention.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • FIG. 1 is a flowchart of a method for opening a terminal debugging port according to Embodiment 1 of the present invention. As shown in Figure 1, the method for enabling the terminal debugging port includes:
  • S101 Acquire an instruction input by the user to enable the debug port, where the instruction is generated when a first operation of pressing a button of the terminal and a second operation of blocking the infrared sensor of the terminal are simultaneously operated;
  • S103 trigger an interrupt service subroutine of the infrared sensor according to the instruction;
  • S105 determine, according to the interrupt service subroutine, a state of the infrared sensor and a pressed state of a button of the terminal, and obtain a judgment Result
  • step S101 acquires an instruction input by the user to enable the debug port, and the command needs to be generated by two operations simultaneously, that is, the first operation of pressing the button of the terminal and the infrared sensor of the terminal are The second operation of the cover is generated at the same time;
  • the button can be the up and down button of the volume, or other buttons on the terminal;
  • the infrared sensor is covered: the finger is used to cover the infrared while the button is pressed
  • the proximity sensor ie: the infrared sensor can be an infrared proximity sensor.
  • step 103 an interrupt service subroutine of the infrared sensor is triggered according to the generated instruction, and the interrupt service subroutine is used to determine that the user is covering the state of the infrared proximity sensor with a finger and the state in which the button is pressed. .
  • step S105 the state of the infrared sensor and the pressed state of the button of the terminal are determined according to the interrupt service subroutine, and a determination result is obtained.
  • step S107 the terminal screen is unlocked and the debug port is turned on when the determination result satisfies a preset criterion.
  • the preset standard is: a state standard in which the preset infrared sensor is blocked and a state standard in which the button is pressed.
  • the state in which the infrared sensor is blocked reaches the state standard, it is determined as a proximity event, and the state of the button press can be a preset duration.
  • step 107 the screen is unlocked and the ADB debug port setting interface is popped up, and the ADB debug port is opened, and the user can then export the data in the mobile phone to the computer through the USB data cable. It can then be imported into a new phone for the ultimate purpose.
  • the interruption is interrupted.
  • the service subroutine will judge as abnormal, choose to push directly, no longer implement other functions, and will not unlock the screen and pop up the ADB debug port setting interface.
  • the infrared sensor and the up and down volume keys can be used to effectively realize the opening of the ADB debugging port of the mobile phone USB in the case that the capacitive touch screen fails, so that the mobile phone management software of the computer passes through the USB data line. Import personal information from your phone to your computer.
  • the method for opening the terminal debugging port can be explained by implementing two.
  • FIG. 2 is a flowchart of a method for opening a terminal debugging port according to Embodiment 2 of the present invention.
  • the method for opening the terminal debugging port includes:
  • the user is required to press the up and down volume keys while covering the infrared proximity sensor with a finger to implement an interrupt service subroutine that triggers the infrared proximity sensor.
  • S203 determining whether it is a proximity event, whether the up and down volume button is pressed, and the pressed time reaches a preset value
  • the subroutine reads the sensor status information to determine if it is a proximity event. If it is not close to the event, the subroutine is exited, and there is no other operation; if it is a close event, it is further determined whether the up and down volume keys are effectively pressed. If the up and down volume keys are not pressed effectively, the subroutine is exited, and there is no other operation; if the up and down volume keys are pressed effectively, it is further determined whether the length of the pressed time reaches the preset value. If the preset value is not reached, the subroutine is exited, and no other operations are performed. If the preset value is reached, the judged operation is completed and the unlock screen step is entered.
  • the ADB debugging port can be reliably opened, and the user mobile phone data is successfully exported, thereby reducing user loss.
  • the method of opening the ADB port of the mobile phone USB by using the infrared sensor and the up and down volume keys can be explained by the third embodiment.
  • FIG. 3 is a flowchart of a method for opening a terminal debugging port according to Embodiment 3 of the present invention. As shown in Figure 3, the method for enabling the terminal debugging port includes:
  • S301 triggering a wake-up call event;
  • the wake up mobile phone event is triggered to make the mobile phone in a lock screen state;
  • S302 Press the up and down volume keys, and the finger covers the infrared proximity sensor to trigger the infrared interruption event;
  • the infrared proximity sensor is blocked by the finger, and the infrared proximity sensor senses the proximity event, triggering the interrupt signal to the processor to form an interrupt notification event;
  • the processor responds to the interrupt signal, executes the interrupt service subroutine corresponding to the interrupt, and obtains the status information of the infrared sensor through the controller bus of the infrared sensor, such as the I2C bus, to determine whether it is a proximity event; if yes, execute Step S304, otherwise step S306;
  • step S304 Determine whether the up and down volume button is pressed, and whether the pressing time reaches the preset value;
  • the monitoring timer is turned on, and the time zone is set.
  • step S305 detecting whether the up and down volume buttons are simultaneously pressed, and whether the pressed time reaches the set time zone value, if it is reached, it means that the up and down volume keys are valid, step S305 is performed; otherwise, step S306 is performed;
  • the interrupt service routine does not do any processing and exits directly.
  • the embodiment provides a method for opening the ADB port of the mobile phone USB by using the infrared sensor and the up and down volume keys. It is not difficult to see from the foregoing description that when the touch screen of the mobile phone fails, the existing hardware resources are used, and only the mobile phone software is added.
  • the code of this function can reliably open the ADB port, so that the user's personal information can be imported into the PC, thereby improving the quality of the mobile phone, reducing user loss and improving the user experience.
  • FIG. 4 shows a device for opening a terminal debugging port according to Embodiment 4 of the present invention.
  • the opening device of the terminal debugging port includes:
  • the obtaining module 401 is configured to acquire an instruction input by the user to enable the debugging port, where the instruction is generated when the first operation of pressing the button of the terminal and the second operation of the infrared sensor of the terminal are simultaneously operated;
  • the triggering module 403 is configured to trigger an interrupt service subroutine of the infrared sensor according to the instruction;
  • the determining module 405 is configured to determine, according to the interrupt service subroutine, a state of the infrared sensor and a pressed state of a button of the terminal, and obtain a determination result;
  • the control module 407 is configured to control the terminal screen to unlock and open the debug port when the determination result meets a preset criterion.
  • the obtaining module, the triggering module, the determining module, and the control module may be implemented by a central processing unit (CPU), a digital signal processor (DSP), or a programmable signal array in the terminal. (Field - Programmable Gate Array, FPGA) implementation.
  • CPU central processing unit
  • DSP digital signal processor
  • FPGA Field - Programmable Gate Array
  • the determining module 405 includes:
  • the obtaining submodule 4051 is configured to acquire the state of the infrared sensor and the pressed state of the button of the terminal by the interrupt service subroutine; the interrupt service subroutine acquires the state of the infrared sensor and the pressed state of the button of the terminal ;
  • the determining sub-module 4053 is configured to determine whether the state of the red line sensor is close to the event and whether the pressed state of the button is valid, and the determination result is obtained;
  • the confirmation module 4055 is configured to confirm that the determination result satisfies the preset criterion when the determination result is that the state of the infrared sensor is a proximity event and the pressed state of the button is valid.
  • the obtaining submodule, the determining submodule, and the confirming module may be CPUs in the terminal, DSP or FPGA implementation.
  • the terminal provided by the embodiment of the present invention includes the above-mentioned opening device.
  • the embodiment of the present invention uses the infrared sensor and the up and down volume keys to open the ADB debug port of the mobile phone USB, and reliably opens the ADB by using existing hardware resources.
  • the port successfully implements the export of the user's mobile phone data, reducing the user's loss. Thereby improving the quality of the mobile phone and the user experience.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware aspects. Moreover, the invention can take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • the infrared sensor and the up and down volume keys can be used to effectively enable the ADB debug port of the mobile phone USB, so that the mobile phone management software of the computer can import the personal information in the mobile phone into the computer through the USB data line.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Telephone Function (AREA)

Abstract

本发明实施例公开一种终端调试端口的开启方法、装置与终端,配置为在触摸屏失效的情况下,开启终端调试端口。该方法包括:获取用户输入的开启所述调试端口的指令,所述指令是按下终端的按键的第一操作以及终端的红外线传感器被遮住的第二操作同时操作时产生的;根据指令,触发红外线传感器的中断服务子程序;根据中断服务子程序对所述红外线传感器的状态以及所述终端的按键的按下状态进行判断,并得到判断结果;在判断结果满足预设标准时控制所述终端屏幕解锁并开启所述调试端口。采用本发明实施例的技术方案,能够在触摸屏失效的情况下,可靠地开启手机USB的ADB调试端口,以实现电脑的手机管理软件通过USB数据线将手机中的个人信息导入电脑。

Description

终端调试端口的开启方法、 装置与终端 技术领域
本发明涉及智能手机领域, 更具体的, 涉及一种终端调试端口的开启 方法、 装置与终端。 背景技术
目前, 触摸屏是智能手机使用最频繁的部件, 主流是电容触摸屏, 定 位时需要手指或电容笔触摸屏幕。 电容触摸屏的材质比较脆弱, 长时间触 摸容易导致局部失效。 受温度和磁场的影响, 也容易导致触摸屏漂移, 造 成触摸不准。 而受潮、 静电、 挤压和跌落则常常导致触摸屏永久性失效。
对于正常的安卓手机, 只要用户开启 ADB ( Android Debug Bridge, 调 试桥)调试端口, 通过 USB数据线, 在 PC中安装豌豆荚之类的应用软件, 就能完成将用户的联系人名单, 短信和应用程序导出, 甚至可以备份系统。 如果手机端和电脑中安装相应的软件, 也可以实现 PC通过 USB数据线操 控智能手机。 而触摸屏失灵后, 如更换手机, 用户通常希望导出旧手机里 的联系人名单等, 再导入到新手机中。 但是, 如果没有事先开启 ADB调试 端口, 则难以导出旧手机里的数据。
因此, 在触摸屏失效的情况下, 现有技术中存在不能可靠地开启 ADB 端口, 导致用户的个人信息丟失的问题。 发明内容
为解决现有存在的技术问题, 本发明实施例提供一种终端调试端口的 开启方法、 装置与终端。
为实现上述目的, 根据本发明实施例的一个方面, 提供一种终端调试 端口的开启方法, 并采用如下技术方案:
终端调试端口的开启方法包括: 获取用户输入的开启所述调试端口的 指令, 所述指令是在执行按下终端的按键的第一操作的同时, 执行终端的 红外线传感器被遮住的第二操作产生的; 根据所述指令, 触发所述红外线 传感器的中断服务子程序; 根据所述中断服务子程序对所述红外线传感器 的状态以及所述终端的按键的按下状态进行判断, 并得到判断结果; 确定 所述判断结果满足预设标准时, 控制所述终端屏幕解锁并开启所述调试端 口。
优选地, 所述指令是在执行按下终端的上音量键和下音量键的第一操 作的同时, 执行终端的红外线传感器被遮住的第二操作产生的。
优选地, 所述中断服务子程序确定所述判断结果满足预设标准, 包括: 所述中断服务子程序获取所述红外线传感器的状态以及所述终端的按 键的按下状态; 判断所述红外线传感器的状态是否为接近事件、 且所述按 键的按下状态是否为有效, 得到所述判断结果; 在所述判断结果为所述红 外线传感器的状态为接近事件且所述按键的按下状态为有效时, 确认所述 判断结果满足所述预设标准。
优选地, 所述红外线传感器的状态是指: 所述红外线传感器的接近事 件。
优选地, 所述按键的按下状态有效的情况是指: 按键按下、 且按住按 键的时间达到预设时间值。
根据本发明实施例的另外一个方面, 提供一种终端调试端口的开启装 置, 并采用如下技术方案:
终端调试端口的开启装置包括: 获取模块, 配置为获取用户输入的开 启所述调试端口的指令, 所述指令是在执行按下终端的按键的第一操作的 同时, 执行终端的红外线传感器被遮住的第二操作产生的; 触发模块, 配 置为根据所述指令, 触发所述红外线传感器的中断服务子程序; 判断模块, 配置为根据所述中断服务子程序对所述红外线传感器的状态以及所述终端 的按键的按下状态进行判断, 并得到判断结果; 控制模块, 配置为确定所 述判断结果满足预设标准时, 控制所述终端屏幕解锁并开启所述调试端口。
优选地, 所述判断模块包括: 获取子模块, 配置为所述中断服务子程 序获取所述红外线传感器的状态以及所述终端的按键的按下状态; 判断子 模块, 配置为判断所述红外线传感器的状态是否为接近事件且所述按键的 按下状态是否为有效, 得到所述判断结果;
确认模块, 配置为在所述判断结果为所述红外线传感器的状态为接近 事件、 且所述按键的按下状态为有效时, 确认所述判断结果满足所述预设 标准。
根据本发明实施例的又一个方面, 提供一种终端, 并采用如下技术方 案:
终端包括上述的开启装置。
采用本发明实施例提供的技术方案, 可以使得手机触摸屏失效的情况 下, 利用红外线传感器和按键, 能够可靠地开启手机 USB的 ADB调试端 口, 以实现电脑中的手机管理软件通过 USB数据线将手机中的个人信息导 入电脑, 从而提高了手机品质和用户体验。 附图说明
附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发明 的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图中:
图 1表示本发明实施例一所述的终端调试端口的开启方法流程图; 图 2表示本发明实施例二所述的终端调试端口的开启方法流程图; 图 3表示本发明实施例三所述的终端调试端口的开启方法流程图; 图 4表示本发明实施例四所述的终端调试端口的开启装置结构示意图; 图 5表示本发明实施例四所述判断模块的结构示意图。 具体实施方式
以下结合附图对本发明的实施例进行详细说明, 但是本发明可以由权 利要求限定和覆盖的多种不同方式实施。
实施例一:
图 1表示本发明实施例一所述的终端调试端口的开启方法流程图。 参见图 1所示, 终端调试端口的开启方法包括:
S101 : 获取用户输入的开启所述调试端口的指令, 所述指令是按下终 端的按键的第一操作以及终端的红外线传感器被遮住的第二操作同时操作 时产生的;
S103: 根据所述指令, 触发所述红外线传感器的中断服务子程序; S105: 根据所述中断服务子程序对所述红外线传感器的状态以及所述 终端的按键的按下状态进行判断, 并得到判断结果;
S107: 在所述判断结果满足预设标准时, 控制所述终端屏幕解锁并开 启所述调试端口。
在本实施例中, 步骤 S101获取用户输入的开启所述调试端口的指令, 该指令需由两个操作同时产生才可以生成, 即: 按下终端的按键的第一操 作以及终端的红外线传感器被遮住的第二操作同时操作时产生的; 该按键 可以是音量的上下按键, 也可以是终端上的其他按键; 红外线传感器被遮 住是指: 在按下按键的同时, 用手指遮住红外接近传感器, 即: 所述红外 线传感器可为红外接近传感器。
在步骤 103 中, 根据上述产生的指令, 触发所述红外线传感器的中断 服务子程序, 该中断服务子程序用于判断用户是用手指遮住所述红外接近 传感器的状态以及按键被按下的状态。 在步骤 S105中, 根据所述中断服务子程序对所述红外线传感器的状态 以及所述终端的按键的按下状态进行判断, 并得到判断结果。
在步骤 S107中, 在所述判断结果满足预设标准时控制所述终端屏幕解 锁并开启所述调试端口。 该预设标准是指: 预先设定的红外线传感器被遮 住的状态标准以及按键被按下的状态标准。 在红外线传感器被遮住的状态 达到该状态标准时, 确定为接近事件, 按键按下的状态标准可以为一预设 时长。 当确定以上操作均为有效时, 在步骤 107 中, 就会解锁屏幕并弹出 ADB调试端口设置界面, 开启 ADB调试端口, 此时用户就可以通过 USB 数据线将手机中的数据导出到电脑中, 进而可以再导入到新手机中, 达到 最终目的。
当读取红外线传感器的状态信息为非接近事件时, 或是用户用手指遮 住红外接近传感器的同时没有按下上下音量键, 或是按下上下音量键的时 长没有达到预设值时, 中断服务子程序都会判断为异常, 选择直接推出, 不再实现其它功能, 也就不会解锁屏幕和弹出 ADB调试端口设置界面了。
采用本实施例的上述技术方案, 可以在电容触摸屏失效的情况下, 利 用红外线传感器和上下音量键, 有效地实现手机 USB的 ADB调试端口的 开启, 以实现电脑的手机管理软件通过 USB数据线将手机中的个人信息导 入电脑。
更具体地, 终端调试端口的开启方法可通过实施二进行说明。
实施例二
图 2表示本发明实施例二所述的终端调试端口的开启方法流程图。 参见图 2所示, 终端调试端口的开启方法包括:
S201 : 唤醒手机(处于锁屏状态)事件;
在此步骤中, 在电容触摸屏失效的情况下, 手机处于锁屏状态, 获取 到用户提出开启 ADB调试端口的需求。 S202: 按下上下音量键, 手指遮住红外接近传感器, 触发红外中断事 件;
在此步骤中, 需要用户在用手指遮住红外接近传感器的同时按下上下 音量键, 以实现触发红外接近传感器的中断服务子程序。
S203 : 判断是否为接近事件, 上下音量按键是否被按下, 且被按下时 间达到预设值;
在此步骤中, 子程序读取传感器状态信息, 判断是否是接近事件。 如 果不是接近事件, 则退出子程序, 不再有其它任何操作; 如果是接近事件, 则进一步判断上下音量键是否有效按下。 如果没有有效按下上下音量键, 则退出子程序, 不再有其它任何操作; 如果有效按下上下音量键, 再进一 步判断按下的时间长度是否达到预设值。 如果没有达到预设值, 则退出子 程序, 不再进行其它任何操作, 如果达到预设值, 判断的操作执行完毕, 进入解锁屏幕步骤。
S204: 解锁屏幕, 弹出 ADB调试端口设置界面, 开启 ADB调试端口。 在此步骤中, 成功解锁屏幕, 弹出 ADB 调试端口设置界面, 并开启 ADB调试端口。 之后, 用户就可以通过 USB数据线连接到电脑, 电脑启动 管理软件, 完成个人信息的导入工作。
采用本发明实施例的技术方法, 能够可靠地开启 ADB调试端口, 成功 实现用户手机数据的导出, 减小了用户损失。
优选地, 利用红外线传感器和上下音量键开启手机 USB的 ADB端口 方法可以通过实施例三进行说明。
实施例三
图 3表示本发明实施例三所述的终端调试端口的开启方法流程图。 参见图 3所示, 终端调试端口的开启方法包括:
S301 : 触发唤醒手机事件; 在此步骤中, 触发唤醒手机事件, 以使手机处于锁屏状态;
S302: 按下上下音量键, 手指遮住红外接近传感器, 触发红外中断事 件;
在此步骤中, 按住上下音量键的同时, 用手指遮住红外接近传感器, 红外接近传感器感应到接近事件, 触发中断信号给处理器, 形成中断通知 事件;
S303: 判断红外感应是否为接近事件;
在此步骤中, 处理器响应中断信号, 执行此中断对应的中断服务子程 序, 通过红外线传感器的控制器总线, 如 I2C 总线, 获取红外线传感器的 状态信息, 判断是否为接近事件; 如果是则执行步骤 S304, 否则执行步骤 S306;
S304: 判断上下音量按键是否按下, 且按下时间是否达到预设值; 在此步骤中, 红外线传感器的中断服务子程序中, 开启监测定时器, 并设定时间区。 在这个时间区中, 检测上下音量按键是否都同时按下, 且 按下的时间是否达到这个设定的时间区值, 如果达到, 则表示上下音量按 键有效, 执行步骤 S305; 否则执行步骤 S306;
S305: 解锁屏幕, 弹出 ADB调试端口设置界面, 开启 ADB调试端口;
S306: 中断服务子程序退出。
在此步骤中, 中断服务子程序不做任何处理, 直接退出。
本实施例提供了一个利用红外线传感器和上下音量键开启手机 USB的 ADB端口方法, 从前面的描述不难看出, 当手机的触摸屏失效的状况下, 利用现有硬件资源, 只需手机软件添加实现了此功能的代码, 就能可靠地 开启 ADB端口, 使用户的个人信息能够导入 PC机, 从而提高手机品质, 减小用户损失, 提高用户体验。
实施例四 图 4表示本发明实施例四所述的终端调试端口的开启装置。 参见图 4所示, 终端调试端口的开启装置包括:
获取模块 401, 配置为获取用户输入的开启所述调试端口的指令, 所述 指令是按下终端的按键的第一操作以及终端的红外线传感器被遮住的第二 操作同时操作时产生的;
触发模块 403, 配置为根据所述指令, 触发所述红外线传感器的中断服 务子程序;
判断模块 405,配置为根据所述中断服务子程序对所述红外线传感器的 状态以及所述终端的按键的按下状态进行判断, 并得到判断结果;
控制模块 407,配置为在所述判断结果满足预设标准时控制所述终端屏 幕解锁并开启所述调试端口。
这里, 所述获取模块、 触发模块、 判断模块和控制模块可由终端中的 中央处理器( Central Processing Unit, CPU )、数字信号处理器( Digital Signal Processor, DSP )或可编程遝辑阵歹 'J ( Field - Programmable Gate Array, FPGA ) 实现。
可选地, 如图 5所示, 所述判断模块 405包括:
获取子模块 4051, 配置为所述中断服务子程序获取红外线传感器的状 态以及所述终端的按键的按下状态; 所述中断服务子程序获取红外线传感 器的状态以及所述终端的按键的按下状态;
判断子模块 4053, 配置为判断所述红线外传感器的状态是否为接近事 件且所述按键的按下状态是否为有效, 得到所述判断结果;
确认模块 4055, 配置为在所述判断结果为所述红外线传感器的状态为 接近事件、 且所述按键的按下状态为有效时, 确认所述判断结果满足所述 预设标准。
这里, 所述获取子模块、 判断子模块和确认模块可由终端中的 CPU、 DSP或 FPGA实现。
本发明实施例提供的终端, 包括上述的开启装置。
本发明的技术方案, 相较现有的技术, 当手机的触摸屏失效的状况下, 本发明实施例利用红外线传感器和上下音量键开启手机 USB的 ADB调试 端口, 利用现有硬件资源可靠地开启 ADB端口, 成功地实现了用户手机数 据的导出, 减小了用户的损失。 从而提高了手机品质和用户体验。
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或计算机程序产品。 因此, 本发明可采用硬件实施例、 软件实施例、 或结 合软件和硬件方面的实施例的形式。 而且, 本发明可采用在一个或多个其 中包含有计算机可用程序代码的计算机可用存储介质 (包括但不限于磁盘 存储器和光学存储器等 )上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、 设备(系统)、 和计算机程序 产品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程 图和 /或方框图中的每一流程和 /或方框、以及流程图和 /或方框图中的流程和 /或方框的结合。 可提供这些计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器, 使得 通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现 在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功 能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理 设备以特定方式工作的计算机可读存储器中, 使得存储在该计算机可读存 储器中的指令产生包括指令装置的制造品, 该指令装置实现在流程图一个 流程或多个流程和 /或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备 上, 使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机 实现的处理, 从而在计算机或其他可编程设备上执行的指令提供用于实现 在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功 能的步骤。
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。 工业实用性 所述指令, 触发所述红外线传感器的中断服务子程序; 根据所述中断服务 子程序对所述红外线传感器的状态以及所述终端的按键的按下状态进行判 断, 并得到判断结果; 确定所述判断结果满足预设标准时, 控制所述终端 屏幕解锁并开启所述调试端口。 因此, 在触摸屏失效的状况下, 可利用红 外线传感器和上下音量键, 有效地实现手机 USB的 ADB调试端口的开启, 以实现电脑的手机管理软件通过 USB 数据线将手机中的个人信息导入电 脑。

Claims

权利要求书
1. 一种终端调试端口的开启方法, 该方法包括:
获取用户输入的开启所述调试端口的指令, 所述指令是在执行按下终 端的按键的第一操作的同时, 执行终端的红外线传感器被遮住的第二操作 产生的;
根据所述指令, 触发所述红外线传感器的中断服务子程序;
根据所述中断服务子程序对所述红外线传感器的状态以及所述终端的 按键的按下状态进行判断, 并得到判断结果;
确定所述判断结果满足预设标准时, 控制所述终端屏幕解锁并开启所 述调试端口。
2. 如权利要求 1所述的开启方法, 其中, 所述指令是在执行按下终端 的上音量键和下音量键的第一操作的同时, 执行终端的红外线传感器被遮 住的第二操作产生的。
3. 如权利要求 1所述的开启方法, 其中, 所述中断服务子程序确定所 述判断结果满足预设标准, 包括:
所述中断服务子程序获取所述红外线传感器的状态以及所述终端的按 键的按下状态;
判断所述红外线传感器的状态是否为接近事件, 且所述按键的按下状 态是否为有效, 并得到所述判断结果;
在所述判断结果为所述红外线传感器的状态为接近事件, 且所述按键 的按下状态为有效时, 确认所述判断结果满足所述预设标准。
4. 如权利要求 3所述的开启方法, 其中, 所述红外线传感器的状态是 指: 所述红外线传感器的接近事件。
5. 如权利要求 3所述的开启方法, 其中, 所述按键的按下状态有效是 指: 所述按键按下、 且按住所述按键的时间达到预设时间值。
6. 一种终端调试端口的开启装置, 该装置包括:
获取模块, 配置为获取用户输入的开启所述调试端口的指令, 所述指 令是在执行按下终端的按键的第一操作的同时, 执行终端的红外线传感器 被遮住的第二操作产生的;
触发模块, 配置为根据所述指令, 触发所述红外线传感器的中断服务 子程序;
判断模块, 配置为根据所述中断服务子程序对所述红外线传感器的状 态以及所述终端的按键的按下状态进行判断, 并得到判断结果;
控制模块, 配置为确定所述判断结果满足预设标准时, 控制所述终端 屏幕解锁并开启所述调试端口。
7. 如权利要求 6所述的开启装置, 其中, 所述判断模块包括: 获取子模块, 配置为所述中断服务子程序获取所述红外线传感器的状 态以及所述终端的按键的按下状态;
判断子模块, 配置为判断所述红外线传感器的状态是否为接近事件, 且所述按键的按下状态是否为有效, 并得到所述判断结果;
确认模块, 配置为在所述判断结果为所述红外线传感器的状态为接近 事件, 且所述按键的按下状态为有效时, 确认所述判断结果满足所述预设 标准。
8.—种终端, 所述终端包括权利要求 6至 7中任一项所述的开启装置。
PCT/CN2013/088897 2013-05-20 2013-12-09 终端调试端口的开启方法、装置与终端 WO2014187106A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP13885247.0A EP3001653B1 (en) 2013-05-20 2013-12-09 Method and device for starting debugging port of terminal, and terminal
US14/891,424 US9501435B2 (en) 2013-05-20 2013-12-09 Enabling method and enabling device for debugging port of terminal, and terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310188289.X 2013-05-20
CN201310188289.XA CN104184875B (zh) 2013-05-20 2013-05-20 终端调试端口的开启方法、装置与终端

Publications (1)

Publication Number Publication Date
WO2014187106A1 true WO2014187106A1 (zh) 2014-11-27

Family

ID=51932774

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/088897 WO2014187106A1 (zh) 2013-05-20 2013-12-09 终端调试端口的开启方法、装置与终端

Country Status (4)

Country Link
US (1) US9501435B2 (zh)
EP (1) EP3001653B1 (zh)
CN (1) CN104184875B (zh)
WO (1) WO2014187106A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389258A (zh) * 2015-12-10 2016-03-09 腾讯科技(深圳)有限公司 一种程序检测方法及装置
CN109388562A (zh) * 2018-09-21 2019-02-26 北京辰森世纪科技股份有限公司 调试pos机的方法及装置、系统、存储介质、电子装置
CN109977013A (zh) * 2019-03-19 2019-07-05 深圳市腾讯信息技术有限公司 一种调试信息获取方法、系统及装置

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106168774A (zh) * 2015-05-20 2016-11-30 西安中兴新软件有限责任公司 一种信息处理方法及电子设备
CN106295358A (zh) * 2015-05-20 2017-01-04 西安中兴新软件有限责任公司 一种信息处理方法及电子设备
CN105430171B (zh) * 2015-11-02 2019-10-18 Tcl移动通信科技(宁波)有限公司 一种触摸屏失灵时启用usb调试端口的方法及移动终端
CN105354134A (zh) * 2015-11-04 2016-02-24 惠州Tcl移动通信有限公司 一种移动终端及其调试方法
CN105868098A (zh) * 2015-11-06 2016-08-17 乐视移动智能信息技术(北京)有限公司 安卓调试桥的启动方法、装置及终端
CN105607739B (zh) * 2015-12-25 2019-04-30 惠州Tcl移动通信有限公司 一种移动终端智能开机系统及其方法
CN105893285A (zh) * 2016-03-30 2016-08-24 青岛海信移动通信技术股份有限公司 一种打开usb调试选项的方法及终端
CN106055472A (zh) * 2016-05-19 2016-10-26 乐视控股(北京)有限公司 进入调试模式的方法、装置及终端设备
CN106055492A (zh) * 2016-05-27 2016-10-26 维沃移动通信有限公司 启动usb调试模式的方法及移动终端
CN106339617A (zh) * 2016-09-19 2017-01-18 广东欧珀移动通信有限公司 终端设备的解锁方法及装置
CN106529236A (zh) * 2016-11-02 2017-03-22 广东欧珀移动通信有限公司 解锁方法、装置以及系统
US10318070B2 (en) * 2017-02-15 2019-06-11 Honeywell International Inc. Touch detector with a code debugger
CN107329865B (zh) * 2017-06-29 2021-06-15 努比亚技术有限公司 打开调试桥adb功能方法、移动终端和计算机可读介质
CN108073514B (zh) * 2017-07-18 2023-09-05 北京微应软件科技有限公司 个人电脑同时连接多个手机终端的方法及装置
CN107734143B (zh) * 2017-09-15 2020-09-18 维沃移动通信有限公司 一种故障提醒方法、移动终端及可读存储介质
CN111417923A (zh) * 2017-12-28 2020-07-14 深圳传音通讯有限公司 一种用于智能终端的截屏方法及截屏装置
CN108388402A (zh) * 2018-01-31 2018-08-10 华勤通讯技术有限公司 Usb调试端口的操作方法及电子设备
CN108829617A (zh) * 2018-06-29 2018-11-16 努比亚技术有限公司 数据抢救方法、移动终端、计算机可读存储介质
CN109885356A (zh) * 2019-02-21 2019-06-14 歌尔科技有限公司 ADB调试端口开启方法、装置、Android设备及可读存储介质
CN111506477B (zh) * 2020-04-16 2022-11-04 Oppo广东移动通信有限公司 触摸屏的日志抓取方法、装置及移动终端
CN114584815A (zh) * 2020-11-30 2022-06-03 上海新微技术研发中心有限公司 一种可回控投屏方法、计算机可读存储介质和装置
CN116736999B (zh) * 2022-09-09 2024-03-15 荣耀终端有限公司 电子设备的控制方法和电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100263043A1 (en) * 2009-04-09 2010-10-14 Freescale Semiconductor, Inc. Method and device for secure test port authentication
CN102446083A (zh) * 2011-09-07 2012-05-09 福州博远无线网络科技有限公司 PC端读取并保存Android手机屏幕显示内容的方法
CN103002155A (zh) * 2012-12-13 2013-03-27 江苏诚迈科技有限公司 一种利用车载终端进行Android手机部署的方法
CN102999335A (zh) * 2012-11-19 2013-03-27 东莞康特尔电子有限公司 一种清除安卓系统密码的方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020162052A1 (en) * 2001-04-25 2002-10-31 Lewis Timothy A. Method for entering system firmware recovery mode using software-detectable buttons
TW591395B (en) * 2003-02-27 2004-06-11 Acer Inc Recovery method of multi-functional operating system and system thereof
KR101038567B1 (ko) * 2004-07-13 2011-06-02 엘지전자 주식회사 시스템 응급 복구 장치 및 방법
US20150199028A1 (en) * 2011-12-14 2015-07-16 Google Inc. Keyboard-controlled developer mode
US8954800B1 (en) * 2012-03-07 2015-02-10 Google Inc. Recovery button for automatically entering recovery mode
CN102868387B (zh) * 2012-09-12 2015-09-30 广东欧珀移动通信有限公司 一种电平跳变复位ic设计电路
CN105302708A (zh) * 2014-06-30 2016-02-03 联发科技(新加坡)私人有限公司 一种移动终端及其检测方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100263043A1 (en) * 2009-04-09 2010-10-14 Freescale Semiconductor, Inc. Method and device for secure test port authentication
CN102446083A (zh) * 2011-09-07 2012-05-09 福州博远无线网络科技有限公司 PC端读取并保存Android手机屏幕显示内容的方法
CN102999335A (zh) * 2012-11-19 2013-03-27 东莞康特尔电子有限公司 一种清除安卓系统密码的方法
CN103002155A (zh) * 2012-12-13 2013-03-27 江苏诚迈科技有限公司 一种利用车载终端进行Android手机部署的方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3001653A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105389258A (zh) * 2015-12-10 2016-03-09 腾讯科技(深圳)有限公司 一种程序检测方法及装置
CN109388562A (zh) * 2018-09-21 2019-02-26 北京辰森世纪科技股份有限公司 调试pos机的方法及装置、系统、存储介质、电子装置
CN109977013A (zh) * 2019-03-19 2019-07-05 深圳市腾讯信息技术有限公司 一种调试信息获取方法、系统及装置
CN109977013B (zh) * 2019-03-19 2022-06-17 深圳市腾讯信息技术有限公司 一种调试信息获取方法、系统及装置

Also Published As

Publication number Publication date
CN104184875A (zh) 2014-12-03
EP3001653A1 (en) 2016-03-30
US9501435B2 (en) 2016-11-22
CN104184875B (zh) 2019-01-11
EP3001653B1 (en) 2017-05-03
US20160085699A1 (en) 2016-03-24
EP3001653A4 (en) 2016-06-22

Similar Documents

Publication Publication Date Title
WO2014187106A1 (zh) 终端调试端口的开启方法、装置与终端
EP2904535B1 (en) Limiting the functionality of a software program based on a security model
WO2015096469A1 (zh) 一种移动终端的音量调控装置及方法、移动终端
WO2016041240A1 (zh) 一种双系统的快捷切换方法、装置及终端
US20150067829A1 (en) Electronic Device and Method for Unlocking Screen of Electronic Device
WO2014032554A1 (zh) 一种防止误操作的方法、装置和设备
WO2015176358A1 (zh) 基于手势对应用程序进行操作的方法、终端及存储介质
CN104123164A (zh) 一种应用程序的启动方法和装置
TWI675329B (zh) 資訊圖像顯示方法及裝置
CN104866749A (zh) 操作响应方法及装置
CN105045477A (zh) 一种终端解锁方法及终端
WO2018107396A1 (zh) 一种指纹识别方法及终端设备
CN104318185B (zh) 一种应用控制方法、设备及移动终端
US9984232B2 (en) Method of operating security function and electronic device supporting the same
CN103699298A (zh) 一种信息处理方法及电子设备
CN103106040A (zh) 移动终端操作方法和使用该方法的装置
US20150074798A1 (en) Electronic Device and Method for Unlocking Screen of Electronic Device
CN104731593A (zh) 一种信息处理方法及电子设备
TW201421291A (zh) 手持式電子裝置及啟動其應用軟體之方法
TW201327256A (zh) 螢幕解鎖系統及方法
TWI557648B (zh) 指紋感測功能的裝置
JP2014086090A (ja) タッチスクリーン情報機器の選択的なロック方法
CN104427097B (zh) 终端设备以及切换方法
WO2016147755A1 (ja) 情報処理装置、画面表示方法、及び制御プログラム
CN108990041B (zh) 一种进行主副卡设置的方法和设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13885247

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14891424

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2013885247

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013885247

Country of ref document: EP