2394425147 / astrodx

727 stars 32 forks source link

Android 13 Unauthorized Access Issue #42

Closed johnvinsongo closed 11 months ago

johnvinsongo commented 11 months ago

Describe the bug Android 13 had introduced a security feature to block access to Android/obb and Android/data folders. Thus, placing the charts within Android/data/xxxx/files/levels is really a big issue.

To Reproduce Steps to reproduce the behavior:

  1. Update your Android OS to 13
  2. Place any charts within android/data/xxxx/files/levels

Expected behavior Imported Charts should be able to load.

Screenshots Error: UnauthorizedAccessException: Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/03. GreeN/BREAK YOU!!/maidata.txt" is denied. System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <00000000000000000000000000000000>:0) System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) (at <00000000000000000000000000000000>:0) SimaiSharp.SimaiFile+d2.MoveNext () (at <00000000000000000000000000000000>:0) AstroDX.Cache.LevelMeta.UpdateMaidata (System.String fullFileName) (at <00000000000000000000000000000000>:0) AstroDX.Cache.LevelMeta.Update () (at <00000000000000000000000000000000>:0) AstroDX.Cache.DataLibrary.InstallCollection (System.String collectionName, System.String parentDirectory, System.Collections.Generic.ICollection1[T] removalList, System.IProgress1[T] progressReporter, System.Boolean ignoreExisting) (at <00000000000000000000000000000000>:0) AstroDX.Cache.DataLibrary+<>cDisplayClass16_0.b1 (System.String fullDirectoryPath) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Parallel+<>cDisplayClass32_02[TSource,TLocal].<ForEachWorker>b__0 (System.Int32 i) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Parallel+<>c__DisplayClass19_01[TLocal].b1 (System.Threading.Tasks.RangeWorker& currentWorker, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.TaskReplicator+Replica.Execute () (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Task.Execute () (at <00000000000000000000000000000000>:0) System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task& currentTaskSlot) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Task.ExecuteEntry (System.Boolean bPreventDoubleExecution) (at <00000000000000000000000000000000>:0) System.Threading.ThreadPoolWorkQueue.Dispatch () (at <00000000000000000000000000000000>:0) --- End of stack trace from previous location where exception was thrown --- System.Threading.Tasks.Parallel+<>cDisplayClass19_01[TLocal].<ForWorker>b__1 (System.Threading.Tasks.RangeWorker& currentWorker, System.Int32 timeout, System.Boolean& replicationDelegateYieldedBeforeCompletion) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.TaskReplicator+Replica.Execute () (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Task.Execute () (at <00000000000000000000000000000000>:0) System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task& currentTaskSlot) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Task.ExecuteEntry (System.Boolean bPreventDoubleExecution) (at <00000000000000000000000000000000>:0) System.Threading.ThreadPoolWorkQueue.Dispatch () (at <00000000000000000000000000000000>:0) Rethrow as AggregateException: One or more errors occurred. (Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/03. GreeN/BREAK YOU!!/maidata.txt" is denied.) (Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/09. MURASAKi/7 Girls War/maidata.txt" is denied.) (Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/05. ORANGE/383_Link/maidata.txt" is denied.) (Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/11. MiLK/Bang Babang Bang!!!/maidata.txt" is denied.) (Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/07. PiNK/7thSense/maidata.txt" is denied.) (Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/01. maimai/BaBan!! -甘い罠-/maidata.txt" is denied.) (Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/17. Splash PLUS/ALiVE/maidata.txt" is denied.) (Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/13. FiNALE/-OutsideRRequieM-/maidata.txt" is denied.) (Access to the path "/storage/emulated/0/Android/data/com.Reflektone.AstroDX/files/levels/15. DX PLUS/Bad Apple!! feat.nomico (REDALiCE Remix)/maidata.txt" is denied.) System.Threading.Tasks.TaskReplicator.Run[TState] (System.Threading.Tasks.TaskReplicator+ReplicatableUserAction1[TState] action, System.Threading.Tasks.ParallelOptions options, System.Boolean stopOnFirstFailure) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Parallel.ForWorker[TLocal] (System.Int32 fromInclusive, System.Int32 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action1[T] body, System.Action2[T1,T2] bodyWithState, System.Func4[T1,T2,T3,TResult] bodyWithLocal, System.Func1[TResult] localInit, System.Action1[T] localFinally) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal] (TSource[] array, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action1[T] body, System.Action2[T1,T2] bodyWithState, System.Action3[T1,T2,T3] bodyWithStateAndIndex, System.Func4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func1[TResult] localInit, System.Action1[T] localFinally) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal] (System.Collections.Generic.IEnumerable1[T] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action1[T] body, System.Action2[T1,T2] bodyWithState, System.Action3[T1,T2,T3] bodyWithStateAndIndex, System.Func4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func1[TResult] localInit, System.Action1[T] localFinally) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Parallel.ForEach[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Action1[T] body) (at <00000000000000000000000000000000>:0) AstroDX.Cache.DataLibrary.ReloadAll (System.IProgress1[T] progressReporter, System.Boolean ignoreExisting) (at <00000000000000000000000000000000>:0) AstroDX.Globals.Persistent.Initialize (System.IProgress1[T] notifier) (at <00000000000000000000000000000000>:0) AstroDX.Contexts.Hub.Startup.StartupWindow.Start () (at <00000000000000000000000000000000>:0) --- End of stack trace from previous location where exception was thrown --- System.Threading.Tasks.Parallel.ForWorker[TLocal] (System.Int32 fromInclusive, System.Int32 toExclusive, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action1[T] body, System.Action2[T1,T2] bodyWithState, System.Func4[T1,T2,T3,TResult] bodyWithLocal, System.Func1[TResult] localInit, System.Action1[T] localFinally) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal] (TSource[] array, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action1[T] body, System.Action2[T1,T2] bodyWithState, System.Action3[T1,T2,T3] bodyWithStateAndIndex, System.Func4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func1[TResult] localInit, System.Action1[T] localFinally) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal] (System.Collections.Generic.IEnumerable1[T] source, System.Threading.Tasks.ParallelOptions parallelOptions, System.Action1[T] body, System.Action2[T1,T2] bodyWithState, System.Action3[T1,T2,T3] bodyWithStateAndIndex, System.Func4[T1,T2,T3,TResult] bodyWithStateAndLocal, System.Func5[T1,T2,T3,T4,TResult] bodyWithEverything, System.Func1[TResult] localInit, System.Action1[T] localFinally) (at <00000000000000000000000000000000>:0) System.Threading.Tasks.Parallel.ForEach[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Action1[T] body) (at <00000000000000000000000000000000>:0) AstroDX.Cache.DataLibrary.ReloadAll (System.IProgress1[T] progressReporter, System.Boolean ignoreExisting) (at <00000000000000000000000000000000>:0) AstroDX.Globals.Persistent.Initialize (System.IProgress1[T] notifier) (at <00000000000000000000000000000000>:0) AstroDX.Contexts.Hub.Startup.StartupWindow.Start () (at <00000000000000000000000000000000>:0)

Device specs

Additional context Add any other context about the problem here.

johnvinsongo commented 11 months ago

I have rechecked the AstroDX app. It seems that the said app didn't even asked for permission to be granted.

Screenshot_2023_0716_175142

You might also want to check this: https://stackoverflow.com/questions/31746787/xamarin-android-system-unauthorizedaccessexception-access-to-the-path-is-de/53201077#53201077

2394425147 commented 11 months ago

Hello,

From the looks of it, this might be an issue with the file manager you're using having a higher management role than the game.

Would you mind using an alternative program (e.g. ZArchiver) and see if that works better?

(If that doesn't work, we're also working on a website that allows the game to download songs, which might help with the issue.)

johnvinsongo commented 11 months ago

Should I delete my other FIle Managers and just retain ZArchiver?

On Sun, Jul 16, 2023 at 6:28 PM fumiko @.***> wrote:

Hello,

From the looks of it, this might be an issue with the file manager you're using having a higher management role than the game.

Would you mind using an alternative program (e.g. ZArchiver) and see if that works better?

(If that doesn't work, we're also working on a website that allows the game to download songs, which might help with the issue.)

— Reply to this email directly, view it on GitHub https://github.com/2394425147/maipaddx/issues/42#issuecomment-1637046978, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCOWFA75N5GJA2AHN6SRLLXQO637ANCNFSM6AAAAAA2LQAIUE . You are receiving this because you authored the thread.Message ID: @.***>

-- best regards,

John Vinson Go

johnvinsongo commented 11 months ago

Thank you very much for pointing that out (ZArchiver). That's the missing piece that made the issue go away.

You can close the reported issue.

On Sun, Jul 16, 2023, 22:03 John Vinson Go @.***> wrote:

Should I delete my other FIle Managers and just retain ZArchiver?

On Sun, Jul 16, 2023 at 6:28 PM fumiko @.***> wrote:

Hello,

From the looks of it, this might be an issue with the file manager you're using having a higher management role than the game.

Would you mind using an alternative program (e.g. ZArchiver) and see if that works better?

(If that doesn't work, we're also working on a website that allows the game to download songs, which might help with the issue.)

— Reply to this email directly, view it on GitHub https://github.com/2394425147/maipaddx/issues/42#issuecomment-1637046978, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCOWFA75N5GJA2AHN6SRLLXQO637ANCNFSM6AAAAAA2LQAIUE . You are receiving this because you authored the thread.Message ID: @.***>

-- best regards,

John Vinson Go