mateor / pdroid-manager

A replacement for the original PDroid application by Syvat (used to configure the privacy settings used by the Privacy Settings Manager)
56 stars 33 forks source link

App settings not displayed correctly after reviewing them 2 times (CM10) #46

Closed danielmmmm closed 11 years ago

danielmmmm commented 11 years ago

All my settings are being applied correctly, but they are all shown as "not blocked". This is slightly annoying, because I have no idea what settings are applied to all my apps, and I think some apps are seriously messed up due to pdroid blocking them without my knowledge.

How to reproduce:

1) modify settings for an app and press "safe" 2) view the settings of this app and go back to the app list by pressing "chancel" or the back button 3) repeat step 2 one more time => now all settings are "not blocked", even though the modification from step 1 are still being enforced!

I tried uninstalling pdroid-manager, deleting the privacy databases and the folder, and re-installing pdroid-manager again. Then I tried the same again with rebooting after each step, without any change. The ROM was installed freshly, after a factory reset and wiping of everything. The ROM is a modified CM10, patched with opendroid and pre-installed with pdroid-manager. I had pdroid 2.0 installed on my old ROM, but I hope all the resetting and wiping killed everything.

Here is my log for steps 1 to 3, that I tried out on 920 Text Editor (com.jecelyin.editor). I think the log is relatively clean and there is a cache miss happening (amongst other things). I also get a lot of "W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext" all the time (not related to this issue).

--------- beginning of /dev/log/main W/System.err( 2288): PrivacyProcessManager: could not read privacy settings: systemLogsSetting W/System.err( 2288): java.io.IOException: read failed: ESRCH (No such process) W/System.err( 2288): at libcore.io.IoBridge.read(IoBridge.java:442) W/System.err( 2288): at java.io.FileInputStream.read(FileInputStream.java:179) W/System.err( 2288): at java.io.InputStreamReader.read(InputStreamReader.java:244) W/System.err( 2288): at java.io.BufferedReader.fillBuf(BufferedReader.java:130) W/System.err( 2288): at java.io.BufferedReader.readLine(BufferedReader.java:354) W/System.err( 2288): at java.lang.PrivacyProcessManager$PrivacyFileReader.readLine(PrivacyProcessManager.java:175) W/System.err( 2288): at java.lang.PrivacyProcessManager.hasPrivacyPermission(PrivacyProcessManager.java:48) W/System.err( 2288): at java.lang.ProcessManager$ProcessImpl.(ProcessManager.java:343) W/System.err( 2288): at java.lang.ProcessManager.exec(ProcessManager.java:300) W/System.err( 2288): at java.lang.Runtime.exec(Runtime.java:168) W/System.err( 2288): at java.lang.Runtime.exec(Runtime.java:123) W/System.err( 2288): at org.jtb.alogcat.LogActivity.clear(LogActivity.java:415) W/System.err( 2288): at org.jtb.alogcat.LogActivity.onOptionsItemSelected(LogActivity.java:363) W/System.err( 2288): at android.app.Activity.onMenuItemSelected(Activity.java:2534) W/System.err( 2288): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:977) W/System.err( 2288): at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735) W/System.err( 2288): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149) W/System.err( 2288): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874) W/System.err( 2288): at com.android.internal.view.menu.ListMenuPresenter.onItemClick(ListMenuPresenter.java:166) W/System.err( 2288): at android.widget.AdapterView.performItemClick(AdapterView.java:298) W/System.err( 2288): at android.widget.AbsListView.performItemClick(AbsListView.java:1088) W/System.err( 2288): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2861) W/System.err( 2288): at android.widget.AbsListView$1.run(AbsListView.java:3535) W/System.err( 2288): at android.os.Handler.handleCallback(Handler.java:615) W/System.err( 2288): at android.os.Handler.dispatchMessage(Handler.java:92) W/System.err( 2288): at android.os.Looper.loop(Looper.java:137) W/System.err( 2288): at android.app.ActivityThread.main(ActivityThread.java:4931) W/System.err( 2288): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err( 2288): at java.lang.reflect.Method.invoke(Method.java:511) W/System.err( 2288): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) W/System.err( 2288): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558) W/System.err( 2288): at dalvik.system.NativeStart.main(Native Method) W/System.err( 2288): Caused by: libcore.io.ErrnoException: read failed: ESRCH (No such process) W/System.err( 2288): at libcore.io.Posix.readBytes(Native Method) W/System.err( 2288): at libcore.io.Posix.read(Posix.java:118) W/System.err( 2288): at libcore.io.BlockGuardOs.read(BlockGuardOs.java:149) W/System.err( 2288): at libcore.io.IoBridge.read(IoBridge.java:432) W/System.err( 2288): ... 31 more I/System.out( 2288): tainted command part 0: logcat I/System.out( 2288): tainted command part 1: -v I/System.out( 2288): tainted command part 2: brief I/System.out( 2288): tainted command part 3: *:V --------- beginning of /dev/log/system W/InputMethodManagerService( 412): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@2bc14638 attribute=android.view.inputmethod.EditorInfo@2bcec668 D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache hit for com.bartat.android.elixir V/PDroidAlternative( 1083): NotificationHandler: Notification for: com.bartat.android.elixir:networkInfoCurrent:0 D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache hit for com.bartat.android.elixir V/PDroidAlternative( 1083): NotificationHandler: Notification for: com.bartat.android.elixir:networkInfoCurrent:0 D/Instrumentation( 1083): PDroid:Instrumentation:execStartActivity: execStartActivity for net.digitalfeed.pdroidalternative I/ActivityManager( 412): START {cmp=net.digitalfeed.pdroidalternative/.AppDetailActivity (has extras) u=0} from pid 1083 W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext D/PDroidAlternative( 1083): Looking up package name: com.jecelyin.editor D/PDroidAlternative( 1083): Application.fromDatabase: Loading package: com.jecelyin.editor D/PDroidAlternative( 1083): Application.fromDatabase: Loaded package from DB D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache miss for com.jecelyin.editor D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Increment DB access threads: now 1 D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:closeIdleDatabase: Opening privacy database D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: ReadLock: (pre)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: ReadLock: (post)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: ReadLock: (pre)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: ReadLock: (post)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:closeIdleDatabase: Decrement DB access threads: now 0 D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:closeIdleDatabase: Closing the PDroid database D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache put forcom.jecelyin.editor I/ActivityManager( 412): Displayed net.digitalfeed.pdroidalternative/.AppDetailActivity: +160ms D/PDroidAlternative( 1083): RadioButton clicked true D/PDroidAlternative( 1083): RadioButton clicked true D/PDroidAlternative( 1083): RadioButton clicked true D/PDroidAlternative( 1083): RadioButton clicked true D/PDroidAlternative( 1083): RadioButton clicked true D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache hit for com.jecelyin.editor D/PrivacySettingsManagerService( 412): saveSettings - checking if caller (UID: 10058) has sufficient permissions D/PrivacySettingsManagerService( 412): saveSettings - PrivacySettings [_id=null, accountsAuthTokensSetting=0, accountsSetting=0, bookmarksSetting=0, calendarSetting=0, callLogSetting=0, contactsSetting=0, deviceId=null, deviceIdSetting=0, incomingCallsSetting=0, intentBootCompletedSetting=0, line1Number=null, line1NumberSetting=0, locationGpsLat=null, locationGpsLon=null, locationGpsSetting=0, locationNetworkLat=null, locationNetworkLon=null, locationNetworkSetting=0, mmsSetting=0, networkInfoSetting=1, notificationSetting=0, outgoingCallsSetting=0, packageName=com.jecelyin.editor, simInfoSetting=1, simSerialNumber=null, simSerialNumberSetting=0, smsSetting=0, subscriberId=null, subscriberIdSetting=0, systemLogsSetting=0, uid=10078, phoneCallSetting=0, smsSendSetting=0, recordAudioSetting=0, cameraSetting=0, ipTableProtectSetting=1, iccAccessSetting=1, addOnManagementSetting=1, android ID=null, androidIdSetting=1, wifiInfoSetting=0, switchConnectivitySetting=0, sendMmsSetting=0, forceOnlineState=1, switchWifiStateSetting=0] D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:saveSettings: Increment DB access threads: now 1 D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:closeIdleDatabase: Opening privacy database D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:saveSettings: WriteLock: (pre)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:saveSettings: WriteLock: (post)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:saveSettings: Transaction: (pre)begin D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:saveSettings: Transaction: (post)begin D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:writeExternalSettings: WriteLock: (pre)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:writeExternalSettings: WriteLock: (post)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:writeExternalSettings: WriteLock: (pre)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:writeExternalSettings: WriteLock: (post)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:writeExternalSettings: WriteLock: (pre)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:writeExternalSettings: WriteLock: (post)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:writeExternalSettings: WriteLock: (pre)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:writeExternalSettings: WriteLock: (post)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:deleteSettings: Cache remove forcom.jecelyin.editor D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:saveSettings: Transaction: (pre)end D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:saveSettings: Transaction: (post)end D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:saveSettings: WriteLock: (pre)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:saveSettings: WriteLock: (post)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:closeIdleDatabase: Decrement DB access threads: now 0 D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:closeIdleDatabase: Closing the PDroid database D/PDroidAlternative( 1083): Application.fromDatabase: Loading package: com.jecelyin.editor D/PDroidAlternative( 1083): Application.fromDatabase: Loaded package from DB D/Instrumentation( 1083): PDroid:Instrumentation:execStartActivity: execStartActivity for net.digitalfeed.pdroidalternative I/ActivityManager( 412): START {flg=0x14000000 cmp=net.digitalfeed.pdroidalternative/.AppListActivity u=0} from pid 1083 W/ActivityManager( 412): Duplicate finish request for ActivityRecord{2beccf58 net.digitalfeed.pdroidalternative/.AppDetailActivity} W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext D/PDroidAlternative( 1083): AppListFragment:appList == null: reloading application objects I/ActivityManager( 412): Displayed net.digitalfeed.pdroidalternative/.AppListActivity: +341ms D/dalvikvm( 1083): GC_CONCURRENT freed 3365K, 33% free 9517K/14151K, paused 3ms+34ms, total 92ms D/PDroidAlternative( 1083): No results from app list load D/PDroidAlternative( 1083): List position is null D/PDroidAlternative( 1083): AppListAdapter == null D/PDroidAlternative( 1083): List position is null D/dalvikvm( 1083): GC_CONCURRENT freed 3147K, 39% free 8743K/14151K, paused 3ms+13ms, total 58ms D/Instrumentation( 1083): PDroid:Instrumentation:execStartActivity: execStartActivity for net.digitalfeed.pdroidalternative I/ActivityManager( 412): START {cmp=net.digitalfeed.pdroidalternative/.AppDetailActivity (has extras) u=0} from pid 1083 W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext D/PDroidAlternative( 1083): Looking up package name: com.jecelyin.editor D/PDroidAlternative( 1083): Application.fromDatabase: Loading package: com.jecelyin.editor D/PDroidAlternative( 1083): Application.fromDatabase: Loaded package from DB I/ActivityManager( 412): Displayed net.digitalfeed.pdroidalternative/.AppDetailActivity: +398ms D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache miss for com.jecelyin.editor D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Increment DB access threads: now 1 D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:closeIdleDatabase: Opening privacy database D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: ReadLock: (pre)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: ReadLock: (post)lock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: ReadLock: (pre)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: ReadLock: (post)unlock D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:closeIdleDatabase: Decrement DB access threads: now 0 D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:closeIdleDatabase: Closing the PDroid database D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache put forcom.jecelyin.editor D/Instrumentation( 1083): PDroid:Instrumentation:execStartActivity: execStartActivity for net.digitalfeed.pdroidalternative I/ActivityManager( 412): START {flg=0x14000000 cmp=net.digitalfeed.pdroidalternative/.AppListActivity u=0} from pid 1083 W/ActivityManager( 412): Duplicate finish request for ActivityRecord{2c3fc980 net.digitalfeed.pdroidalternative/.AppDetailActivity} W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext D/PDroidAlternative( 1083): AppListFragment:appList == null: reloading application objects I/ActivityManager( 412): Displayed net.digitalfeed.pdroidalternative/.AppListActivity: +279ms D/dalvikvm( 1083): GC_CONCURRENT freed 570K, 27% free 10361K/14151K, paused 2ms+100ms, total 195ms D/dalvikvm( 1083): WAIT_FOR_CONCURRENT_GC blocked 138ms D/dalvikvm( 412): GC_CONCURRENT freed 2678K, 43% free 8126K/14023K, paused 13ms+6ms, total 112ms D/dalvikvm( 1083): WAIT_FOR_CONCURRENT_GC blocked 429ms D/PDroidAlternative( 1083): No results from app list load D/PDroidAlternative( 1083): List position is null D/PDroidAlternative( 1083): AppListAdapter == null D/PDroidAlternative( 1083): List position is null D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache hit for com.bartat.android.elixir V/PDroidAlternative( 1083): NotificationHandler: Notification for: com.bartat.android.elixir:networkInfoCurrent:0 D/Instrumentation( 1083): PDroid:Instrumentation:execStartActivity: execStartActivity for net.digitalfeed.pdroidalternative I/ActivityManager( 412): START {cmp=net.digitalfeed.pdroidalternative/.AppDetailActivity (has extras) u=0} from pid 1083 W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache hit for com.bartat.android.elixir D/PDroidAlternative( 1083): Looking up package name: com.jecelyin.editor D/PDroidAlternative( 1083): Application.fromDatabase: Loading package: com.jecelyin.editor V/PDroidAlternative( 1083): NotificationHandler: Notification for: com.bartat.android.elixir:networkInfoCurrent:0 D/PDroidAlternative( 1083): Application.fromDatabase: Loaded package from DB I/ActivityManager( 412): Displayed net.digitalfeed.pdroidalternative/.AppDetailActivity: +157ms D/PrivacyPersistenceAdapter( 412): PrivacyPersistenceAdapter:getSettings: Cache hit for com.jecelyin.editor D/Instrumentation( 1083): PDroid:Instrumentation:execStartActivity: execStartActivity for net.digitalfeed.pdroidalternative I/ActivityManager( 412): START {flg=0x14000000 cmp=net.digitalfeed.pdroidalternative/.AppListActivity u=0} from pid 1083 W/ActivityManager( 412): Duplicate finish request for ActivityRecord{2ba098d8 net.digitalfeed.pdroidalternative/.AppDetailActivity} W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext W/ApplicationContext( 1083): PDroid:ContextImpl: ContextImpl being created but already has sOuterContext D/PDroidAlternative( 1083): AppListFragment:appList == null: reloading application objects D/dalvikvm( 1083): GC_FOR_ALLOC freed 3120K, 31% free 9782K/14151K, paused 31ms, total 31ms I/ActivityManager( 412): Displayed net.digitalfeed.pdroidalternative/.AppListActivity: +468ms D/PDroidAlternative( 1083): No results from app list load D/PDroidAlternative( 1083): List position is null D/PDroidAlternative( 1083): AppListAdapter == null D/PDroidAlternative( 1083): List position is null D/dalvikvm( 1054): GC_CONCURRENT freed 1727K, 64% free 3047K/8259K, paused 2ms+2ms, total 49ms W/InputMethodManagerService( 412): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@2ba1e1c0 (uid=10058 pid=1083) I/ActivityManager( 412): No longer want android.process.media (pid 588): hidden #16 D/Instrumentation( 2088): PDroid:Instrumentation:execStartActivity: execStartActivity for com.cyanogenmod.trebuchet I/ActivityManager( 412): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=org.jtb.alogcat cmp=org.jtb.alogcat/.LogActivity bnds=[256,107][320,169] u=0} from pid 2088 I/System.out( 2288): tainted command part 0: logcat I/System.out( 2288): tainted command part 1: -v I/System.out( 2288): tainted command part 2: brief I/System.out( 2288): tainted command part 3: *:V

danielmmmm commented 11 years ago

Edit:

When I reload the app-list, the right settings for each app are displayed. But again, only for the first they are being viewed. The second time, everything is back to the default "not blocked". It doesn't matter in which order you view an apps settings. If you view the settings of app A, go back and view the settings of app B, and then the ones from A again, the settings for A will be "gone".

Also, when I hit "save" on the settings screen of an app to go back to the app list, I can see the correct settings as many times as I want (assumed I never use the "back" or "cancel" buttons, but always the "save" button).

wsot commented 11 years ago

Hi, The problem appears to have been an error in the OpenPDroid development code. If you are still having this problem, please let me know, as it should have been in all official releases of OpenPDroid (and indeed, the current development code).

(Sorry for long delays: Moved house, so been without decent net connection for 3 weeks)

danielmmmm commented 11 years ago

Thanks a lot for your work! I will have to wait a few weeks to get an updated version of OpenPDroid together with the custom ROM for my phone (the maintainer is on a trip). I will report back, if I still have a problem after the update (which will probably/hopefully not happen ;-).

wsot commented 11 years ago

Cool. If there is a ROM for your device which doesn't already have OpenPDroid integrated, you could try to grab it and use Autopatcher (which has version 1.01). If you have a more recent release and it fixes it, though, please do let me know.

Actually, out of curiosity - what ROM are you using?

danielmmmm commented 11 years ago

Yeah, I could try that, but I am surprisingly happy with the current ROM on my Sony Xperia Mini Pro! I am using M66B's extended FXP, and M66B is doing a great job (including the integration of PDroid ;-). Therefore I will wait until he releases a new build some time in March ... and report back here :-)

Great to see that you are so active here and answer to bug reports! OpenPDroid and PDroid manager are awesome and a "must have" and I don't know how I managed to live without them (before I switched from the official FXP to M66B's extended FXP)!

wsot commented 11 years ago

Yeah, that's cool. Just be aware that this problem will affect actual access too - i.e. apps may actually get access to stuff they shouldn't because of a cache bug in the development version that M66B was building from.

There's quite a bit of stuff going on with OpenPDroid (including merging with PDroid 2.0 core) in the background so hopefully there will be some cool new developments soon.

danielmmmm commented 11 years ago

M66B released a new version of his ROM, and my issue is gone now :-)