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

@MuntashirAkon

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.

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