rootadb | restart adbd with root privileges | DevOps library
kandi X-RAY | rootadb Summary
kandi X-RAY | rootadb Summary
restart adbd with root privileges.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rootadb
rootadb Key Features
rootadb Examples and Code Snippets
Community Discussions
Trending Discussions on rootadb
QUESTION
The android debug bridge daemon adbd
that runs on Android devices may be compiled without root support (ALLOW_ADBD_ROOT=0
).
There is a tool called rootadb
which is able to patch an existing adbd
binary by (as I understood it) replacing the calls to setuid()
and setgid()
with NOP instructions, effectively preventing it from dropping its privileges.
I don't understand how the code finds the place of the syscalls inside the binary.
As far as I see, it iterates over the all the bytes and checks if the bytes match something:
...ANSWER
Answered 2019-Oct-01 at 12:31I'm not 100% sure, but I have a reasonable idea.
The first line of code loads a pointer to the address of setgid, and treats it as a 32 bit pointer.
The loop iterates over the binary, and looks for occurrences of 8 bytes that equal address of the setgid function. If it finds one, it applies the patch, starting at the first byte of that location.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rootadb
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page