I work on Android Studio while using actual device for ADB using ADB over tcp/ip through command prompt (no additional software). But, this new device gets offline the moment screen turns off. I've tried turning off everything related to Battery Optimization or Wifi. Although, there's no such specific setting to let the Wifi awake after device sleeps like my old phone Huawei.
I'd also posted this over the official forum of Realme about a week ago but no one has replied so far. Link - Wifi gets turned off after screen lock - ADB issues.
So, Device's status in ADB devices goes to offline the very moment screen locks and then I've to do the process of ADB Wifi all over again and I don't want to use cable all the time because it affects battery through that 0.5/0.9 mA slow charging through motherboard. It is already slow enough that battery gets discharged even after continuous charging. I use ADB Wifi for more than 14 hours per day hence I need a stable solution.
So, my question is how to keep the device's Wifi on even after screen lock? I know it's device specific because of the custom changes to the ROM but I really need something.