In the case of Android, this should be done by trial and error. For example, turn off background animation, experiment with the image rendering mechanism - this depends on your specific device and it is impossible to recommend specific options. If your device does not have a more or less modern graphics subsystem, then lags will occur even with minimal settings, because Ren'Py usually always slows down on budget devices.