Set date/time using ADB shell

后端 未结 11 2436
野趣味
野趣味 2020-12-04 15:59

I´m trying to set the date/time using the ADB shell but the shell only returns the current time.

I´ve tried:

adb shell date -s YYYYMMDD.HHmmss
         


        
11条回答
  •  Happy的楠姐
    2020-12-04 16:10

    To make this work on my Xperia S, I had to break the commands as follows:

    > adb shell
    # su -
    # date /* see current date */
    # date -s YYYYmmdd
    

    Motive: my device had reverted to the beginning of Linux time, and I wasn't particularly worried with time, all I wanted was to set the correct date -- which, BTW I couldn't do through system settings because my custom MIUI ROM kept crashing...

提交回复
热议问题