简体   繁体   中英

How not to loose phone charge when connected with USB for prolonged period of time

I have a Android device which I keep connected with my Jenkins server(through USB) which basically run my automation every day at a specified time but every now and then I keep running into problems where device starts to loose charge overnight or when I am remotely accessing(Vysor) the device and run some automation tests on it , it starts to loose and eventually die down. I am looking for suggestion to keep my device up and running 24/7 without loosing charge when I am running my automation cases.

I had tried all of the options you mentioned. I am now using powered USB hub which keeps it charging on power 24/7.

There are some things that you can do to keep your Android device from going to sleep.

  1. enable developer mode (I assume you have done that already since you are running automatic tests).
  2. on settings->developer menu turn USB debugging on (again I assume this is already done)
  3. on settings->developer menu turn on Stay Awake so that the display never goes to sleep when the device is charging.

It may also be that the issue is with your device. In that case I suggest you try the same thing with some mainstream Android phone and see if the behavior differs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM