IOS app runs with root privileges

Source: Internet
Author: User

1. Add at the main function of the program

setuid (0);

Setgid (0);

2. Modify the executable file (because the app does not allow root permission to run when the application is booted)

Open the. App, find the executable file in it, copy it, and replace it with a bit of content.

#!/bin/bash
root=$ (dirname "$")
exec "${root}"/textxt_

(Note punctuation)

(principle: Use this script to guide our program, the script is not root permission, so can pass)

3. When you package Deb, the Postinst script is written to Deb, and the Postinst script reads as follows: (The script is to modify the permissions of the executable in the package when it is copied to the application directory)

#!/bin/bash

CD "/applications/textxt.app/"

# process Origin Binary
Chown Root.wheel Textxt_
chmod +s Textxt_
chmod +x Textxt_

IOS app runs with root privileges

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.