Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with KitKat #29

Open
frispete opened this issue Jul 11, 2015 · 4 comments
Open

Not working with KitKat #29

frispete opened this issue Jul 11, 2015 · 4 comments

Comments

@frispete
Copy link

on a Samsung Galaxy Note 10.1 2014 (android 4.4.2).

No related message with logcat.

@Jonny007-MKD
Copy link

It's the same on my rooted Marshmallow.

The app says "time was set" but that's not true, the time stays wrong.
Perhaps you need to request the permission to change system settings?

Edit: logcat says:
D/su (29288): su invoked. E/su (29288): SU from: u0_a139 D/su (29288): Checking whether app [uid:10139, pkgName: org.ntpsync] is allowed to be root I/SuControllerImpl(10309): Got change D/su (29288): Privilege elevation allowed by appops D/su (29288): Allowing via appops. D/su (29288): 10139 /system/bin/app_process32_xposed executing 0 /system/bin/sh using binary /system/bin/sh : sh D/su (29288): Waiting for pid 29293. E/SystemClock(18305): Unable to set RTC E/SystemClock(18305): java.lang.SecurityException: setTime: Neither user 10139 nor current process has android.permission.SET_TIME. E/SystemClock(18305): at android.os.Parcel.readException(Parcel.java:1620) E/SystemClock(18305): at android.os.Parcel.readException(Parcel.java:1573) E/SystemClock(18305): at android.app.IAlarmManager$Stub$Proxy.setTime(IAlarmManager.java:224) E/SystemClock(18305): at android.os.SystemClock.setCurrentTimeMillis(SystemClock.java:150) E/SystemClock(18305): at org.sufficientlysecure.rootcommands.Toolbox$2.whileHavingPermissions(Toolbox.java:708) E/SystemClock(18305): at org.sufficientlysecure.rootcommands.Toolbox.withPermission(Toolbox.java:654) E/SystemClock(18305): at org.sufficientlysecure.rootcommands.Toolbox.withWritePermissions(Toolbox.java:672) E/SystemClock(18305): at org.sufficientlysecure.rootcommands.Toolbox.adjustSystemClock(Toolbox.java:704) E/SystemClock(18305): at org.ntpsync.util.Utils.setTime(Utils.java:82) E/SystemClock(18305): at org.ntpsync.service.NtpSyncService.onHandleIntent(NtpSyncService.java:163) E/SystemClock(18305): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66) E/SystemClock(18305): at android.os.Handler.dispatchMessage(Handler.java:102) E/SystemClock(18305): at android.os.Looper.loop(Looper.java:148) E/SystemClock(18305): at android.os.HandlerThread.run(HandlerThread.java:61) W/AppOps (10033): Finishing op nesting under-run: uid 10139 pkg org.ntpsync code 40 time=1455609612983 duration=5473 nesting=0 D/su (29288): Finishing su operation for app [uid:10139, pkgName: org.ntpsync] E/PhoneWindow(18305): Circular progress bar not located in current window decor I/SuControllerImpl(10309): Got change

@Jonny007-MKD
Copy link

As a Android app newbie I'd say we should add to the manifest:

<uses-permission android:name="android.permission.SET_TIME" />

as stated on http://www.anddev.org/sdk-adt-emulator-problems-f16/issue-with-systemclock-setcurrenttimemillis-t15623.html
Can somebody test this?

@umlaeute
Copy link

if this worked, does it mean NTPsync wouldn't require root-priviliges any more?

@Jonny007-MKD
Copy link

According to stackoverflow, SET_TIME is a "signatureOrSystem" permission, so it can only be used by apps

  • Signed with the system image
  • Installed to the /system/ folder

AFAICT NTPsync would still require root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants