[General Questions and Answers] ntn_labs:
My App Store is crashing for a few days. Did an update, after that there is no way I can start my App Store. Did a security update (just a coincidence it came the same day), did the clean cache, revert and stuff blablabla...

Decided to dig into it myself and logcat shows some funny stuff:

07-03 09:36:28.781 2204 25544 I BroadcastQueue: am_broadcast_finished: [background,1,Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 pkg=com.google.android.googlequicksearchbox (has extras) }]
07-03 09:36:28.801 2204 3566 I BroadcastQueue: am_broadcast_finished: [background,1,Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 pkg=com.google.android.gms (has extras) }]
07-03 09:36:28.822 9045 9045 I art : Starting a blocking GC AddRemoveAppImageSpace
07-03 09:36:28.825 9045 9045 W System : ClassLoader referenced unknown path: /system/priv-app/Phonesky/lib/arm64
07-03 09:36:28.833 9045 9045 I LoadedApk: No resource references to update in package alias:dummy.dummy
07-03 09:36:28.846 9045 9045 W Finsky.CrashDetector: Read crash info cnt=7 ts=1499066092355 cause=NullPointerException.
07-03 09:36:28.847 9045 9045 W Finsky.CrashDetector: Cleanup cache cnt=7 ts=1499066092355 cause=NullPointerException.
07-03 09:36:28.847 9045 9045 W Finsky.CrashDetector: Failed to delete file: /data/user/0/com.android.vending/cache/cache_and_sync_images cnt=7 ts=1499066092355 cause=NullPointerException.
07-03 09:36:28.847 9045 9045 W Finsky.CrashDetector: Failed to delete file: /data/user/0/com.android.vending/cache/hipri cnt=7 ts=1499066092355 cause=NullPointerException.
07-03 09:36:28.847 9045 9045 W Finsky.CrashDetector: Cleanup data stores cnt=7 ts=1499066092355 cause=NullPointerException.
07-03 09:36:28.848 9045 9045 W Finsky.CrashDetector: Cleanup restore data store cnt=7 ts=1499066092355 cause=NullPointerException.
07-03 09:36:28.848 9045 9045 W Finsky.CrashDetector: Cleanup installer data store cnt=7 ts=1499066092355 cause=NullPointerException.
07-03 09:36:28.901 9045 9073 E AndroidRuntime: FATAL EXCEPTION: PackageInstallerImpl
07-03 09:36:28.901 9045 9073 E AndroidRuntime: Process: com.android.vending, PID: 9045
07-03 09:36:28.901 9045 9073 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.AppOpsManager.checkPackage(int, java.lang.String)' on a null object reference
07-03 09:36:28.901 9045 9073 E AndroidRuntime:	at android.os.Parcel.readException(Parcel.java:1698)
07-03 09:36:28.901 9045 9073 E AndroidRuntime:	at android.os.Parcel.readException(Parcel.java:1641)
07-03 09:36:28.901 9045 9073 E AndroidRuntime:	at android.content.pm.IPackageInstaller$Stub$Proxy.getMySessions(IPackageInstaller.java:385)
07-03 09:36:28.901 9045 9073 E AndroidRuntime:	at android.content.pm.PackageInstaller.getMySessions(PackageInstaller.java:406)
07-03 09:36:28.901 9045 9073 E AndroidRuntime:	at com.google.android.finsky.installer.am.run(SourceFile:102)
07-03 09:36:28.901 9045 9073 E AndroidRuntime:	at android.os.Handler.handleCallback(Handler.java:751)
07-03 09:36:28.901 9045 9073 E AndroidRuntime:	at android.os.Handler.dispatchMessage(Handler.java:95)
07-03 09:36:28.901 9045 9073 E AndroidRuntime:	at android.os.Looper.loop(Looper.java:241)
07-03 09:36:28.901 9045 9073 E AndroidRuntime:	at android.os.HandlerThread.run(HandlerThread.java:61)
07-03 09:36:28.901 2204 25543 D ActivityManager: New dropbox entry: com.android.vending, system_app_crash, 530d052a-fae7-42a9-8de9-68f990e4ada1
07-03 09:36:28.902 2204 25543 W ActivityManager: Force finishing activity com.android.vending/.AssetBrowserActivity
07-03 09:36:28.904 2204 25543 I InputDispatcher: Focus entered window: Window{c145681 u0 com.google.android.googlequicksearchbox/com.google.android.launcher.GEL}
07-03 09:36:28.906 2204 3589 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@a330406 attribute=null, token = android.os.BinderProxy@d1f3268
07-03 09:36:28.907 2204 25543 D ActivityTrigger: ActivityTrigger activityPauseTrigger
07-03 09:36:28.909 9045 9045 I Finsky : [1] com.google.android.finsky.dailyhygiene.DailyHygiene.a(323): No need to run daily hygiene.
07-03 09:36:28.912 691 691 D clmlib : Got activities:0x00000008
07-03 09:36:28.912 691 691 I JavaDumper:JavaDumperThread: addEvent: system_app_crash@1499067388912.txt processName: com.android.vending
07-03 09:36:28.912 2204 2204 I BroadcastQueue: am_broadcast_enqueue: [background,1,Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) },3]
07-03 09:36:28.913 691 817 I JavaDumper:JavaDumperThread: Event: system_app_crash@1499067388912.txt TimeStamp: 1499067388

Instead of googling the crash stack trace I noticed the Failed to delete file thing. And because I know this has been an issue before, I just checked on other phone. I do not have two equal phones so... Maybe this is just a thing that changed between L and N, but maybe someone has a clue how to fix these permissions on a nonrooted device?

Because on a working phone the /data/user/0/com.android.vending is accessible:

1|shell@jflte:/data/user/0 $ ls -ld com.android.vending
drwxr-x--x u0_a101 u0_a101 2017-06-28 10:14 com.android.vending

And on the not working phone the same directory is not accessible.

1|E6653:/data/user/0 $ ls -ld com.android.vending
drwx------ 11 u0_a62 u0_a62 4096 2017-07-01 20:20 com.android.vending

Please someone with not rooted phone can confirm how are the permission on this directory set up?

Device: Sony E6653 (xperia Z5), Android 7.1.1 (a.k.a. N) build number 32.4.A.0.160, security patch june 1. 2017. Not rooted, stock.