Android battery monitoring method Android phones powered by a constant 4v DC external supply (no battery) still show battery charge diminishing to low battery warning. Switching the mains off and then back on and restarting the phone restores the battery meter to 70% which then starts depleting again.

How does Android do this without sensing the actual "battery" voltage?

How does Android decide that this non-existent 4 volt battery is flat and needs recharging?
Usually there is a special battery controller chip (IC) in your phone which is always active even if the phone is switched off. This chip does the calculation on whatever base.

Android running on the main CPU just queries this special controller, retrieves and displays the values.

For a more detailed answer see How does charging a phone battery work?.