Skip to content

Accidentally blocked some components which is causing a bootloop or the OS to crash during startup. How to fix via recovery? #10

Open

Description

@MuntashirAkon
  1. Try to remember the blocking method you’ve used. Default is IFW + Disable. This is also the worst case scenario here. So, if you can’t remember it, assume it’s the default.
  2. Take note of the packages and components that App Manager blocked. You can find them at /data/user/0/io.github.muntashirakon.AppManager/files/conf/ (assuming the user ID was 0). Rules for each app is saved in a file with format <package-name>.tsv (eg. io.github.muntashirakon.AppManager.tsv). If you only need the components blocked in a particular interval, you can do this by inspecting the modification date of the files.
  3. Navigate to /data/secure/system/ifw (Android M or earlier) or /data/system/ifw (Android N onwards) and delete the noted packages or components. App Manager stores rules for each package in a file with format <package-name>.xml (eg. io.github.muntashirakon.AppManager.xml)
  4. Navigate to /data/system/users/0/package-restrictions.xml, find the package names you noted earlier and delete all the XML tags called disabled-components.
    Example: Say you’ve accidentally block the .MainActivity of App Manager. You should find an entry like this:
    <pkg name="io.github.muntashirakon.AppManager" ceDataIndoe="12345" install-reason="3">
        <disabled-components>
            <item name=".MainActivity">
        </disabled-components>
    </pkg>
    If there's an entry like above, delete only the content beginning with <disabled-components> and ending with </disabled-components> like this:
        <disabled-components>
            <item name=".MainActivity">
        </disabled-components>
    So, the final results would be something like this:
    <pkg name="io.github.muntashirakon.AppManager" ceDataIndoe="12345" install-reason="3">
    </pkg>

In order to ensure that you didn’t corrupt the file, you should copy this file to your PC, delete the entries, validate the file using any XML validator and copy it back to where it belongs. Also, none of these files are accessible from ADB without root, but you can do this in the recovery if it supports this. If the recovery doesn't offer a terminal or a file manager, use something like the Aroma FM.

Activity

  1. koma312 commented on Jul 30, 2024

    @koma312

    Thank for this. It saved my arse from having to restore from recovery.

  2. jackyzy823 commented on Dec 19, 2025

    @jackyzy823

    Additional notes for step 4:

    Since Android 12, package-restrictions.xml might be in ABX format (binary serialisation of XML data), you need to convert the file from abx format to plain xml format, and edit it then convert it back to abx format.

    Some tools might help:

    https://github.com/rhythmcache/android-xml-converter
    https://github.com/cclgroupltd/android-bits

    Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/main/cmds/abx/
    Ref: https://www.cclsolutionsgroup.com/post/android-abx-binary-xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions