Why does the same function work on a phone with stock firmware but not on the same phone with custom firmware?
This question is better directed to the developers of custom firmware. Often, while improving one aspect, they may inadvertently break another. Our focus is on developing the application according to the technical specifications of the Android OS. Therefore, we recommend either using stock firmware or installing the free mcpro24fps Demo app to assess the compatibility of the modifications introduced by third-party developers into your custom firmware.