Support custom graphics.c.

TWRP does not use this, but is needed for other things that depend
on it like charger.

Change-Id: Ic7d10e8230151bcc4be6cfa222a1e07231e7139f