Coder Social home page Coder Social logo

android_x86_root's Introduction

android_x86_root

These steps will elaborate how to enable root access for Android in x86-based machine from a terminal in the host Android itself(Not through adb). I am using Intel's Celadon branch for Android 8.1-x86_64.

This is not a permanent solution to enable root. However, it still works in a straightforward way.

  1. Change the sepolicy from enforcing to permissive in device/intel/project-celadon/celadon/mixins.spec. Now, we can at least see the su binary in /system/xbin from a devloper mode Terminal app in Android. However, we still cannot execute the su binary for other users through the Terminal app because of file permissions (execute access is not available for other users).
  2. To enable execute access for other users, we need to change the system/core/libcutils/fs_config.cpp file. Find and change the line to { 04755, AID_ROOT, AID_SHELL, 0, "system/xbin/su" } to enable execute permission of the su binary.
  3. Finally, we need to change the su program itself in system/extras/su/su.cpp. I commented out the following line in the main function: if (current_uid != AID_ROOT && current_uid != AID_SHELL) error(1, 0, "not allowed"); This is because we want to enable access to any program (in our case the Terminal app) so that it can change the user to root.

The Terminal app is available by enabling the developer mode in Android settings.

android_x86_root's People

Contributors

sohamm17 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

thakkarv

android_x86_root's Issues

Unable to access root privileges

Hi,
Thanks for reply in advance.
I have followed the instructions provided in README for Intel Celadon Android 9, but even making the changes I was not able to access root privileges. Is there anything to be done extra for Android 9 or Am I missing something.
Error:
/system/bin/sh: su not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.