There was a need to programmatically change the time and date in the system. Android. As I understand it, access to
setTime at the kernel level.
How can you get around this?
Application for personal needs. Googling didn't give a working answer.
it worked like this for me.
String s = time.format("%Y%m%d.%H%M%S"); Process process = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(process.getOutputStream()); os.writeBytes("date -s " + s + ";"); os.flush(); os.close();
in the manifest
but wants root-right. As without root – I did not find it.