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 PDF

Info

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
Application number
CN202111101280.1A
Other languages
Chinese (zh)
Inventor
李飞
孙大林
胡鹏
曾欢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Xiaosuan Technology Information Co ltd
Original Assignee
Hunan Xiaosuan Technology Information Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Xiaosuan Technology Information Co ltd filed Critical Hunan Xiaosuan Technology Information Co ltd
Priority to CN202111101280.1A priority Critical patent/CN113791869A/en
Publication of CN113791869A publication Critical patent/CN113791869A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
    • G06F9/45512Command shells
    • 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction 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
    • 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction 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/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/068Authentication 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

Method for acquiring shell permission of terminal equipment based on android system
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.
CN202111101280.1A 2021-09-18 2021-09-18 Method for acquiring shell permission of terminal equipment based on android system Pending CN113791869A (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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
CN105354065B (en) A kind of multi-product method for upgrading software and terminal
CN114237676B (en) FPGA logic updating method, device, equipment and readable storage medium
CN113836505A (en) Method for rapidly acquiring shell permission of terminal equipment based on android system
CN113268416A (en) Application program testing method and device, storage medium and terminal
CN113791869A (en) Method for acquiring shell permission of terminal equipment based on android system
CN106445300A (en) Misoperation recognition method and device and terminal
CN111651232A (en) One-machine multi-control method, device and system and electronic equipment
CN104915228A (en) Application program language setting method and device
CN109522174B (en) Method, device, terminal and storage medium for controlling adb enabling
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN110192178A (en) Method, apparatus, micro-control unit and the terminal device of program patch installing
CN108009084B (en) Testing method, device and system for hybrid mobile application
CN114217879B (en) Method for breaking through android ghost process limitation during program starting and running
CN115357355A (en) Method, device and equipment for software cross-system migration and readable storage medium
CN109634690A (en) Data clearing method, device, terminal and storage medium based on WinPE system
CN110764840B (en) Method, device and system for wirelessly debugging android device
CN109413714B (en) User agent information processing method, device, storage medium and terminal
CN113918179A (en) Method and system for automatically installing OS (operating system) by cooperation of host and intelligent network card under Linux
CN109871288B (en) Method, device, equipment and medium for executing Android system command
CN112214404A (en) Mobile application testing method and device, storage medium and electronic equipment
CN111221723A (en) Test record generation method and device, storage medium and electronic equipment

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