How to use my almost useless phone
So, my Touchscreen still works. i simply can't see anything on the screen.
Using the Mobizen App
i can see and control my phone over WiFi.... but what to do with it?
Use it as an IP Cam:
Thanks to the app "IP Cam
" you can transform you phone into a IP Cam.
Place it somewhere connected to Power and use it as a Surveilance camera. 720p MJPEG for integration into Synology Surveillance station? no problemo, all under /video
The only thing is the phone will get about 55-65°C warm in a room with 23°C ^^
Continuous streaming and video recording takes its toll.
Use it as a HTPC:
You still have a working 3.5mm jack for Audio Output, and the Kodi Android App
is pretty neat.
So why not use that to connect an old HiFi in your home? (yeah yeah yeah i know, for some people it's really hard to find a HiFi that's not already fully connected, especially with RaspberryPi 3 that has included WiFi and Bluetooth for 35$) If you have a Local NAS you can stream all the Music and don't need a local Database on your phone.
There is one little Problem though. Because my screen is broken i cannot start Kodi when the phone boots.
How did i solve this? a simple script at boot
monkey -p org.xbmc.kodi 1
the 1 starts the launcher activity of kodi, using Script Manager
I set start at boot rights, and done, no more problems with rebooting.
So.... What about Batterylife?
Continuously connecting your phone to the charger and keeping it at 98-100% is bad for the battery right?
After hours of googling i finally found a solution for this issue
(yep.... most time was spent on figuring out how to write bash..... )
How to Start/Stop Charging your phone while being connected to USB/Wallcharger
OR How to stop Charging an always connected phone
(And it also works on the magnetic dock if the Xperia Z2)
It's actually pretty easy.
Should return a 1, use a echo > 0 and it stops charging
Using the command
shows at what Percentage your battery is right now.
Putting this all together in one script we get:
if [ "$Battery_Level" -ge 75 ]; then
echo 0 > /sys/class/power_supply/battery/charging_enabled
else [ "$Battery_Level" -le 30 ]
echo 1 > /sys/class/power_supply/battery/charging_enabled
So the phone will charge between 30% and 75%, Stops if it goes over 74%, starts if it falls under 31%.
This script is run every 10 Minutes aka 600 seconds.
Set as root, and set at boot. Voilą
Don't forget to completly drain an load your phone from 0% to 100% every 3-6 months.