How to set date/time in Android (non rooted phones)

1 reply [Last post]
shabina.sherif
Offline
Joined: 04/12/2016

adb shell date -s YYYYMMDD.HHMMSS is not working

elementSetProperty is not working.

Anyone tried in S6 with 5 or 6 OS version

arundoss
Offline
Joined: 02/04/2015

Hi,

Due to the restrictions in android, you will have to set the time using Non-instrumented Native Recognition.
https://docs.experitest.com/display/public/SA/Non-Instrumented+Native+Re...

Regarding adb shell date -s YYYYMMDD.HHMMSS, this will print the current date-time.

You can use the Run command to see the outputs of it.
https://docs.experitest.com/display/public/SA/Run

Also, you can use GetDeviceProperty("device.time") to get the device time.