I am working on a car surveillance project that will use an Android phone as the central processing unit. This topic focuses on how to maintain the phone always powered on, no matter you use the car daily or not use it for weeks. What I have in mind is: Hw: 1. have the Android phone hidden somewhere in the car 2. have a Attiny85 device - always powered on from the battery of the car - connected to the USB external port of the Android device - connected to a car signal informing it when engine is on/off - having a transistor or relay for being able to provide 1A at 5V to the phone, through the USB connector Sw: 1. the Android phone runs a custom application written with B4A that: - communicates over USB with the Attiny device. The Attiny is seen like a CDC device - monitors the level of the phone battery and sends a message to the Attiny when level goes under a defined threshold or when it gets up to 100% 2. the Attiny runs an Arduino sketch that: - when engine is on, charges the Android phone no matter the battery level reported - when engine is off, starts charging the Android phone when message is received over USB that level is under threshold and stops charging when Android says it's full
The question that I have is: will the phone accept to be powered from the Attiny device, giving the fact that it will run as USB host and the Attiny as USB device? In this configuration I guess the phone will want to power the device rather then being powered from it, but I am not sure.
Thank you in advance.