My plan is to use my phone (Google Pixel) as a screen for a raspberry pi, and I'm worried that my power supply isn't sufficient. Is there a way to prohibit the Pixel from charging while still maintaining data flow? I haven't done much electrical work and I don't know if phones are equipped with this option, let alone if it's even possible. My power source is, if memory serves me, 3000 mWh, capable of 5 volt 2 amp (I can verify later if that turns out to be important).
Upon some deeper searching, (not sure how I missed it to begin with), I found some posts suggesting commands such as
echo 0 > /sys/class/power_supply/batterycharging_enabled/charging_enabled. My updated question is, then does this actually work? How does it work?