I'm currently working on a personal project which requires my android phone (rooted Xiaomi A1 Global edition running Android 8.1) to boot when plugged into usb charger, rather than simply displaying the charge animation. As a result, I need someone to provide me with working instructions on how to modify the system/ramdisk/??? files to disable this offline charging mode. The provided solution must also check the battery level at boot and only boot once the battery reaches a pre-determined minimum charge level (e.g. 10%) to avoid entering a boot loop on low charge state.