Follow:

Latest articles in ‘Android’


  1. How to examine Android SELinux policy

    Published: Mon 15 August 2016 in Cookbook.
    A step-by-step guide from building your environment to a concrete example showing the tools in action.

    Examining SELinux policy should be a trivial thing, but Android turns this into some kind of nightmare. In fact, Google has designed Android mainly from a consumer perspective, and not for power users. The result is that, as soon as you want to do something outside of using the latest Facebook app or playing Candy Crush, you very quickly find yourself back in realm of early-2000 Linux, when a developer-like knowledge was required to change what should be simple settings. I believe that the situation will fastly evolve as Android system gets more mature, but for now we have to do with what we have got…

    As you said, there are two reasons why it is necessary to compile your own SELinux toolset:

    • The system provided toolset is usually a version behind. While Android’s SELinux relies on policy DB version 30, current Linux boxes usually handle only version up …

  2. How to unpack and edit Android boot img?

    Published: Thu 11 August 2016 in Cookbook.
    A step-by-step guide from fetching and editing to reflashing an Android boot image.

    Tools selection

    The method I present here relies on CyanogenMod’s Android source code.

    While Google’s AOSP only provides to the tool to build the boot.img file, CyanogenMod also adds the unpackbootimg tool allowing you to unpack it. This tool does not seem specifically designed for CyanogenMod in any way, so most chances are that it will work for other ROMs as well.

    There are however a relatively large number of alternatives to unpack the boot.img file which all work more-or-less the same.

    Basically, such unpack tool will extract the content of the boot.img file and display a set of parameters you will have to pass to Google’s mkbootimg tool to build a file whose configuration (mainly kernel parameters and memory addresses) will match the original one.

    Here are a few examples, I did not test them personally so cannot recommend any and I present …

Popular tags see all

Website

Author

Follow