CN113791869A - Method for acquiring shell permission of terminal equipment based on android system - Google Patents
Method for acquiring shell permission of terminal equipment based on android system Download PDFInfo
- Publication number
- CN113791869A CN113791869A CN202111101280.1A CN202111101280A CN113791869A CN 113791869 A CN113791869 A CN 113791869A CN 202111101280 A CN202111101280 A CN 202111101280A CN 113791869 A CN113791869 A CN 113791869A
- Authority
- CN
- China
- Prior art keywords
- android
- program
- demo
- pairing
- shell
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000004891 communication Methods 0.000 claims abstract description 9
- 238000012544 monitoring process Methods 0.000 claims abstract description 5
- 238000005034 decoration Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
- G06F9/45508—Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
- G06F9/45512—Command shells
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0482—Interaction with lists of selectable items, e.g. menus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
- H04W12/068—Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention relates to a method for acquiring shell permission of terminal equipment based on an android system, which comprises the following steps: s1, connecting the terminal equipment to a wireless network and installing the DEMO android program into the terminal equipment; s2, opening the option of the developer, starting system split screen, and respectively starting system setting and DEMO android program in the split screen; s3, starting the equipment pairing of wireless debugging in the system setting, and displaying the pairing code; s4, pairing after inputting the pairing code and the port number in the DEMO android program; s5, inputting an ADB monitoring port in the DEMO android program, and enabling the DEMO android program to communicate with an android system ADBD by using an ADB communication protocol; and S6, running a preset script program in the DEMO android program, and starting a daemon process in the script program. The method abandons the mode of connecting the computer through the USB data line, removes the dependence on the computer, greatly reduces the use cost of the application program requiring the shell authority, improves the user experience of the application program and lowers the threshold of the application program.
Description
Technical Field
The invention belongs to the technical field of android system application, and particularly relates to a method for acquiring shell permission of terminal equipment based on an android system.
Background
The Android (Android) system is widely applied due to the characteristics of open sources, and all large mobile phone manufacturers put into production and design own Android systems, which become the most influential mobile phone operating systems.
The application ecology based on the android system is more and more mature, the shell authority referred by the invention is also called developer authority, and is one of system authorities, after the developer authority is obtained, a developer can more conveniently control a mobile phone, application installation can be directly initiated, a dump sys command is executed to check equipment information, and capabilities which common apps do not have such as click simulation, text input and the like can be simulated. Generally, in order to acquire the shell permission, a computer is needed, a mobile phone is connected to the computer through a usb cable, and a usb debugging function of the mobile phone is turned on, so that the shell permission of the mobile phone can be acquired through an adb tool on the computer.
In summary, it is desirable to provide a method for acquiring a shell permission of a terminal device based on an android system, which can remove dependence on a computer and greatly reduce the use cost of an application program requiring the shell permission.
Disclosure of Invention
The invention aims to provide a method for acquiring a shell permission of terminal equipment based on an android system, which can remove the dependence on a computer and greatly reduce the use cost of an application program requiring the shell permission.
The above purpose is realized by the following technical scheme: a method for acquiring shell permission of terminal equipment based on an android system comprises the following steps:
s1, connecting the terminal equipment with a wireless network and installing a DEMO android program into the terminal equipment, wherein the DEMO android program is used for acquiring the shell authority of the terminal equipment;
s2, opening the option of the developer, starting system split screen, and respectively starting system setting and DEMO android program in the split screen;
s3, starting the equipment pairing of wireless debugging in the system setting, and displaying the pairing code;
s4, inputting a pairing code and a port number in the DEMO android program, and pairing with an android system ADBD by using a standard ADB pairing protocol;
s5, inputting an ADB monitoring port in the DEMO android program after pairing is successful, wherein the DEMO android program uses an ADB communication protocol to communicate with an ADBD of an android system;
and S6, running a preset script program in the DEMO android program, starting a daemon process in the script program, wherein the daemon process at the moment has the shell authority.
It should be noted that, it should be clear to those skilled in the art that such a program can be programmed according to the functions and steps to be implemented by the DEMO android program to implement obtaining the shell rights of the terminal device.
The further technical scheme is that the step of entering the developer option in the step S2 is as follows:
the further technical scheme is that the specific steps in the step S3 are as follows:
s3.1, clicking a developer option in the setting;
s3.2, opening wireless debugging in the developer option;
s3.3, clicking wireless debugging;
s3.4, clicking the pairing equipment using the pairing code;
and S3.5, displaying the pairing code, the IP address and the port.
The further technical scheme is that the specific steps in the step S4 are as follows:
s4.1, clicking pairing in the DEMO android program;
s4.2, inputting the pairing code and the port number displayed in the S3.5 into a dialog box;
and S4.3, determining by clicking and successfully pairing.
The further technical scheme is that the specific steps in the step S5 are as follows:
s5.1, wireless debugging and pairing;
s5.2, inputting a port number for wireless debugging in the developer option in a dialog box;
s5.3, communication is successful.
The further technical scheme is that the specific steps in the step S6 are as follows:
s6.1, clicking and running in the DEMO android program;
s6.2, selecting a preset script program;
s6.3, starting a daemon process after the script program runs;
s6.4, the daemon process has the shell authority.
The invention provides a method for acquiring shell permission of terminal equipment based on an android system, which is characterized in that after the terminal equipment is provided with a DEMO android program, a wireless debugging function is utilized, a user only needs to operate on a mobile phone of the user in the whole process, the shell permission can be acquired, the method is different from the conventional mode that the user needs to be connected with a computer through a USB data line, the dependence on the computer is removed, the use cost of application programs needing the shell permission is greatly reduced, the user experience of the application programs is improved, and the threshold of the application programs is lowered.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention.
Fig. 1 is a schematic flow chart of a method for acquiring a shell permission of a terminal device based on an android system according to an embodiment of the present invention;
fig. 2 is an operation schematic diagram of a method for acquiring a shell permission of a terminal device based on an android system according to an embodiment of the present invention.
Detailed Description
The present invention will now be described in detail with reference to the drawings, which are given by way of illustration and explanation only and should not be construed to limit the scope of the present invention in any way. Furthermore, features from embodiments in this document and from different embodiments may be combined accordingly by a person skilled in the art from the description in this document.
The embodiment of the invention provides a method for acquiring a shell permission of terminal equipment based on an android system, which comprises the following steps of:
s1, connecting the terminal equipment with a wireless network and installing a DEMO android program into the terminal equipment, wherein the DEMO android program is used for acquiring the shell authority of the terminal equipment;
s2, opening the option of the developer, starting system split screen, and respectively starting system setting and DEMO android program in the split screen;
s3, starting the equipment pairing of wireless debugging in the system setting, and displaying the pairing code;
s4, inputting a pairing code and a port number in the DEMO android program, and pairing with an android system ADBD by using a standard ADB pairing protocol;
s5, inputting an ADB monitoring port in the DEMO android program after pairing is successful, wherein the DEMO android program uses an ADB communication protocol to communicate with an ADBD of an android system;
and S6, running a preset script program in the DEMO android program, starting a daemon process in the script program, wherein the daemon process at the moment has the shell authority.
It should be noted that, it should be clear to those skilled in the art that such a program can be programmed according to the functions and steps to be implemented by the DEMO android program to implement obtaining the shell rights of the terminal device.
On the basis of the above embodiment, in another embodiment of the present invention, the step of entering the developer option in step S2 is:
s2.1, entering setting;
s2.2, clicking about the mobile phone;
s2.3, clicking the version number 7 times;
s2.4, the developer option is successfully opened.
On the basis of the foregoing embodiment, in another embodiment of the present invention, as shown in fig. 2, the specific steps in step S3 are as follows:
s3.1, clicking a developer option in the setting;
s3.2, opening wireless debugging in the developer option;
s3.3, clicking wireless debugging;
s3.4, clicking the pairing equipment using the pairing code;
and S3.5, displaying the pairing code, the IP address and the port.
On the basis of the foregoing embodiment, in another embodiment of the present invention, as shown in fig. 2, the specific steps in step S4 are as follows:
s4.1, clicking pairing in the DEMO android program;
s4.2, inputting the pairing code and the port number displayed in the S3.5 into a dialog box;
and S4.3, determining by clicking and successfully pairing.
On the basis of the foregoing embodiment, in another embodiment of the present invention, as shown in fig. 2, the specific steps in step S5 are as follows:
s5.1, wireless debugging and pairing;
s5.2, inputting a port number for wireless debugging in the developer option in a dialog box;
s5.3, communication is successful.
On the basis of the foregoing embodiment, in another embodiment of the present invention, as shown in fig. 2, the specific steps in step S6 are as follows:
s6.1, clicking and running in the DEMO android program;
s6.2, selecting a preset script program;
s6.3, starting a daemon process after the script program runs;
s6.4, the daemon process has the shell authority.
The invention provides a method for acquiring shell permission of terminal equipment based on an android system, which is characterized in that after the terminal equipment is provided with a DEMO android program, a wireless debugging function is utilized, a user only needs to operate on a mobile phone of the user in the whole process, the shell permission can be acquired, the method is different from the conventional mode that the user needs to be connected with a computer through a USB data line, the dependence on the computer is removed, the use cost of application programs needing the shell permission is greatly reduced, the user experience of the application programs is improved, and the threshold of the application programs is lowered.
The terminology used in the present invention is as follows:
an android system: the Linux-based operating system is a Linux-based free and open source code operating system, is mainly used for mobile equipment such as intelligent terminals and tablet computers, and is led and developed by Google corporation and open terminal alliance.
A shell: refers to a program in an operating system that provides access to services provided by a kernel.
ADB: and the command line tool is used for communicating the Android operating system and the desktop computer.
ADBD: android developers debug background services.
To better explain the technical solution of the present invention, a specific embodiment is provided herein, as shown in fig. 1, a method for acquiring a shell permission of a terminal device equipped with an android system, taking an android phone as an example, as shown in fig. 1 and fig. 2, including the following steps:
and S1, connecting the android mobile phone to a WIFI (wireless network), installing the DEMO android program for acquiring the shell permission of the terminal device on the android mobile phone, and making the program according to functions and steps to be realized later by the DEMO android program, which should be clear to a person skilled in the art.
S2, opening developer options in the setting of the android system; the method comprises the following specific steps:
s2.1, entering setting;
s2.2, clicking about the mobile phone;
s2.3, clicking the version number 7 times;
s2.4, the developer option is successfully opened.
Then, starting system split screen, and simultaneously starting system setting and DEMO android program in the split screen;
s3, starting the equipment pairing of wireless debugging in the system setting, and displaying the pairing code, the concrete steps are as follows:
s3.1, clicking a developer option in the setting;
s3.2, opening wireless debugging in the developer option;
s3.3, clicking wireless debugging;
s3.4, clicking the pairing equipment using the pairing code;
and S3.5, displaying the pairing code, the IP address and the port.
S4, inputting a pairing code and a port number in the DEMO android program, and pairing with the local android system ADBD by using a standard ADB pairing protocol, wherein the specific steps are as follows:
s4.1, clicking pairing in the DEMO android program;
s4.2, inputting the pairing code and the port number displayed in the S3.5 into a dialog box;
and S4.3, determining by clicking and successfully pairing.
S5, after pairing is successful, inputting an ADB monitoring port in the DEMO android program, and enabling the DEMO android program to communicate with the local android system ADBD by using an ADB communication protocol, wherein the specific steps are as follows:
s5.1, wireless debugging and pairing;
s5.2, inputting a port number for wireless debugging in the developer option in a dialog box;
s5.3, communication is successful.
S6, running the appointed script, starting the daemon process in the script, wherein the daemon process has the shell authority, and the specific steps are as follows:
s6.1, clicking and running in the DEMO android program;
s6.2, selecting a preset script program;
s6.3, starting a daemon process after the script program runs;
s6.4, the daemon process has the shell authority.
During specific implementation, the android mobile phone is connected to WIFI, developer options are started, split screens are started, and after a specified script is run, the current authority can be confirmed by executing an id command and returning a result according to the command;
for example:
uid=2000(shell)gid=2000(shell)groups=2000(shell)
then the representation of the currently executing process is the shell permission
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (6)
1. A method for acquiring shell permission of terminal equipment based on an android system is characterized by comprising the following steps:
s1, connecting the terminal equipment with a wireless network and installing a DEMO android program into the terminal equipment, wherein the DEMO android program is used for acquiring the shell authority of the terminal equipment;
s2, opening the option of the developer, starting system split screen, and respectively starting system setting and DEMO android program in the split screen;
s3, starting the equipment pairing of wireless debugging in the system setting, and displaying the pairing code;
s4, inputting a pairing code and a port number in the DEMO android program, and pairing with an android system ADBD by using a standard ADB pairing protocol;
s5, inputting an ADB monitoring port in the DEMO android program after pairing is successful, wherein the DEMO android program uses an ADB communication protocol to communicate with an ADBD of an android system;
and S6, running a preset script program in the DEMO android program, starting a daemon process in the script program, wherein the daemon process at the moment has the shell authority.
2. The method for acquiring the shell permission of the android-based terminal device, according to claim 1, wherein the step of entering the developer option in step S2 is:
s2.1, entering setting;
s2.2, clicking about the mobile phone;
s2.3, clicking the version number 7 times;
s2.4, the developer option is successfully opened.
3. The method for acquiring the shell permission of the terminal device based on the android system as claimed in claim 2, wherein the specific step in step S3 is:
s3.1, clicking a developer option in the setting;
s3.2, opening wireless debugging in the developer option;
s3.3, clicking wireless debugging;
s3.4, clicking the pairing equipment using the pairing code;
and S3.5, displaying the pairing code, the IP address and the port.
4. The method for acquiring the shell permission of the terminal device based on the android system as claimed in claim 3, wherein the specific step in the step S4 is:
s4.1, clicking pairing in the DEMO android program;
s4.2, inputting the pairing code and the port number displayed in the S3.5 into a dialog box;
and S4.3, determining by clicking and successfully pairing.
5. The method for acquiring the shell permission of the terminal device based on the android system as claimed in claim 4, wherein the specific step in the step S5 is:
s5.1, wireless debugging and pairing;
s5.2, inputting a port number for wireless debugging in the developer option in a dialog box;
s5.3, communication is successful.
6. The method for acquiring shell permission of terminal equipment based on the android system as claimed in any one of claims 1 to 5, wherein the specific step in the step S6 is:
s6.1, clicking and running in the DEMO android program;
s6.2, selecting a preset script program;
s6.3, starting a daemon process after the script program runs;
s6.4, the daemon process has the shell authority.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111101280.1A CN113791869A (en) | 2021-09-18 | 2021-09-18 | Method for acquiring shell permission of terminal equipment based on android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111101280.1A CN113791869A (en) | 2021-09-18 | 2021-09-18 | Method for acquiring shell permission of terminal equipment based on android system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113791869A true CN113791869A (en) | 2021-12-14 |
Family
ID=79184184
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111101280.1A Pending CN113791869A (en) | 2021-09-18 | 2021-09-18 | Method for acquiring shell permission of terminal equipment based on android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113791869A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114217879A (en) * | 2021-12-23 | 2022-03-22 | 湖南小算科技信息有限公司 | Method for breaking limitation of android ghost process during program starting and running |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102999335A (en) * | 2012-11-19 | 2013-03-27 | 东莞康特尔电子有限公司 | Method for clearing Android system passwords |
CN105893193A (en) * | 2015-12-08 | 2016-08-24 | 乐视移动智能信息技术(北京)有限公司 | Connection control method of adb (Android Debug Bridge) and related equipment |
CN110764840A (en) * | 2019-09-29 | 2020-02-07 | 北京东软望海科技有限公司 | Method, device and system for wirelessly debugging android device |
CN111581095A (en) * | 2020-05-08 | 2020-08-25 | 广州大学 | Self-starting USB debugging method and device based on barrier-free service and storage medium |
-
2021
- 2021-09-18 CN CN202111101280.1A patent/CN113791869A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102999335A (en) * | 2012-11-19 | 2013-03-27 | 东莞康特尔电子有限公司 | Method for clearing Android system passwords |
CN105893193A (en) * | 2015-12-08 | 2016-08-24 | 乐视移动智能信息技术(北京)有限公司 | Connection control method of adb (Android Debug Bridge) and related equipment |
CN110764840A (en) * | 2019-09-29 | 2020-02-07 | 北京东软望海科技有限公司 | Method, device and system for wirelessly debugging android device |
CN111581095A (en) * | 2020-05-08 | 2020-08-25 | 广州大学 | Self-starting USB debugging method and device based on barrier-free service and storage medium |
Non-Patent Citations (1)
Title |
---|
MISHAAL RAHMAN: "如何不需要连接PC以去除手机中的臃肿功能", pages 1 - 7, Retrieved from the Internet <URL:https://www.xda-developers.com/debloat-your-phone-run-adb-shell-commands-no-root-no-pc/> * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114217879A (en) * | 2021-12-23 | 2022-03-22 | 湖南小算科技信息有限公司 | Method for breaking limitation of android ghost process during program starting and running |
CN114217879B (en) * | 2021-12-23 | 2023-05-23 | 湖南小算科技信息有限公司 | Method for breaking through android ghost process limitation during program starting and running |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102232304B (en) | Method, system and terminal for system update between mobile communication terminals | |
CN107992308B (en) | Plug-in management method for android terminal application program | |
US20220052866A1 (en) | Smart home system control method and apparatus, electronic device | |
CN103927256A (en) | Method for controlling multiple Android devices | |
CN114237676B (en) | FPGA logic updating method, device, equipment and readable storage medium | |
CN110688305B (en) | Test environment synchronization method, device, medium and electronic equipment | |
CN111651232A (en) | One-machine multi-control method, device and system and electronic equipment | |
CN110192178A (en) | Method, apparatus, micro-control unit and the terminal device of program patch installing | |
CN113791869A (en) | Method for acquiring shell permission of terminal equipment based on android system | |
CN113836505A (en) | Method for rapidly acquiring shell permission of terminal equipment based on android system | |
CN105095076A (en) | Method and device for testing compatibility between application software versions | |
CN109522174B (en) | Method, device, terminal and storage medium for controlling adb enabling | |
US10095209B2 (en) | Programming system for device control | |
CN109413714B (en) | User agent information processing method, device, storage medium and terminal | |
CN108009084B (en) | Testing method, device and system for hybrid mobile application | |
CN112491799B (en) | Remote repair method and device for communication module, computer equipment and storage medium | |
CN114217879B (en) | Method for breaking through android ghost process limitation during program starting and running | |
CN109634690A (en) | Data clearing method, device, terminal and storage medium based on WinPE system | |
CN115357355A (en) | Method, device and equipment for software cross-system migration and readable storage medium | |
CN110764840B (en) | Method, device and system for wirelessly debugging android device | |
CN113918179A (en) | Method and system for automatically installing OS (operating system) by cooperation of host and intelligent network card under Linux | |
CN114579267A (en) | Method for setting scheduling system language and related device | |
CN113031964A (en) | Management method, device, equipment and storage medium for big data application | |
CN107220053B (en) | BIOS management method and electronic equipment | |
CN111143227A (en) | Data operation method, device, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |