HiddenRamblings / TagMo

GNU General Public License v3.0
2.99k stars 384 forks source link

[Issue]: BIN-Randomizer does not generate random IDs / Hex #731

Closed danizwam closed 5 months ago

danizwam commented 5 months ago

Issue Description

Hello everyone!

I hope I'm translating all the expressions correctly, because my TagMo is in German.

I stumbled across this problem last year in May when I wanted to clone various Amiibos for Zelda TOTK for my Flipper Zero.

The problem is as follows:

You can create up to 200 random new Amiibos from one Amiibo, but they all have the same ID or HEX value.

The problem will be that the calculation of the new HEX value always takes the original HEX as a basis.

A year ago, I helped myself by always generating a new Amiibo and then creating a new clone of it. This way I was able to create 10 different clones of all the Amiibos "without any problems", but with a lot of effort.

It's nice that it's now possible to create .NFC files directly for the Flipper Zero, but unfortunately all 200 Amiibos that had just been created had the same ID.

Am I possibly doing something wrong?

Greetings, Daniel

Logcat Output

TagMo 4.1.8 (GitHub Release) #3ff6437OnePlus TIRAMISU (13) - 10.00 GB RAM
--------- beginning of main05-02 19:25:20.684 17065 17065 E ANR_LOG : >>> msg's executing time is too long05-02 19:25:20.684 17065 17065 E ANR_LOG : Blocked msg = { when=-24s914ms what=0 target=android.view.Choreographer$FrameHandler callback=android.view.Choreographer$FrameDisplayEventReceiver } , cost  = 24912 ms05-02 19:25:20.684 17065 17065 E ANR_LOG : >>>Current msg List is:05-02 19:25:20.684 17065 17065 E ANR_LOG : Current msg <1> = { when=+5s680ms what=0 target=android.os.Handler callback=androidx.profileinstaller.ProfileInstallerInitializer$$ExternalSyntheticLambda1 }05-02 19:25:20.684 17065 17065 E ANR_LOG : >>>CURRENT MSG DUMP OVER<<<05-02 19:25:20.731 17065 17476 E .eightbit:TagMo: Loaded layer handle (6745095426794626403) for layer /my_product/lib64/libcolorx-loader.so05-02 19:25:20.731 17065 17476 E .eightbit:TagMo: Looking for entrypoint ColorX_Check05-02 19:25:20.731 17065 17476 E .eightbit:TagMo: Found ColorX_Check for /my_product/lib64/libcolorx-loader.so05-02 19:25:20.731 17065 17476 E .eightbit:TagMo: Check failed--------- beginning of system05-02 19:25:20.805 17065 17065 E OplusCustomizeRestrictionManager: sInstance is null, start a new sInstance05-02 19:25:20.994 17065 17065 W View    : requestLayout() improperly called by android.widget.FrameLayout{861d00b V.E..V... ......ID 0,0-1080,2100 #2} during layout: running second layout pass05-02 19:25:20.994 17065 17065 W View    : requestLayout() improperly called by androidx.recyclerview.widget.RecyclerView{39f05cf IFED.V... ......I. 0,2112-1080,2112 #7f09010d app:id/foomiibo_list} during layout: running second layout pass05-02 19:25:20.994 17065 17065 W View    : requestLayout() improperly called by androidx.recyclerview.widget.RecyclerView{bd30c30 VFED.V... ......ID 0,0-1080,2097 #7f090086 app:id/browser_content} during layout: running second layout pass05-02 19:25:21.044 17065 17474 W Parcel  : Expecting binder but got null!05-02 19:25:21.797 17065 17555 W Exception: java.lang.Exception: Daten müssen mit 0x04 beginnen.05-02 19:25:21.797 17065 17555 W Exception:  at com.hiddenramblings.tagmo.nfctech.TagArray.validateData(TagArray.kt:243)05-02 19:25:21.797 17065 17555 W Exception:  at com.hiddenramblings.tagmo.nfctech.TagArray.getValidatedData(TagArray.kt:349)05-02 19:25:21.797 17065 17555 W Exception:  at com.hiddenramblings.tagmo.nfctech.TagArray.getValidatedDocument(TagArray.kt:363)05-02 19:25:21.797 17065 17555 W Exception:  at com.hiddenramblings.tagmo.amiibo.AmiiboManager$listAmiiboDocuments$2$1$1$1.invokeSuspend(AmiiboManager.kt:361)05-02 19:25:21.797 17065 17555 W Exception:    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:21.797 17065 17555 W Exception:    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:21.797 17065 17555 W Exception:  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:21.797 17065 17555 W Exception:    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:21.797 17065 17555 W Exception:   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:21.797 17065 17555 W Exception:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:21.797 17065 17555 W Exception:    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:21.797 17065 17555 W Exception:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:26.004 17065 17474 W Parcel  : Expecting binder but got null!05-02 19:25:27.106 17065 17474 W Parcel  : Expecting binder but got null!05-02 19:25:31.551 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_0.bin05-02 19:25:31.551 17065 17479 W IllegalArgumentException:     at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.551 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.599 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_1.bin05-02 19:25:31.599 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.599 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.653 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_2.bin05-02 19:25:31.653 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.718 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_3.bin05-02 19:25:31.718 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.773 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_4.bin05-02 19:25:31.773 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.829 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_5.bin05-02 19:25:31.829 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.885 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_6.bin05-02 19:25:31.885 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.924 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_7.bin05-02 19:25:31.924 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.967 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_8.bin05-02 19:25:31.967 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:32.025 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_9.bin05-02 19:25:32.025 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:32.925 17065 17553 W Exception: java.lang.Exception: Daten müssen mit 0x04 beginnen.05-02 19:25:32.925 17065 17553 W Exception:    at com.hiddenramblings.tagmo.nfctech.TagArray.validateData(TagArray.kt:243)05-02 19:25:32.925 17065 17553 W Exception:  at com.hiddenramblings.tagmo.nfctech.TagArray.getValidatedData(TagArray.kt:349)05-02 19:25:32.925 17065 17553 W Exception:  at com.hiddenramblings.tagmo.nfctech.TagArray.getValidatedDocument(TagArray.kt:363)05-02 19:25:32.925 17065 17553 W Exception:  at com.hiddenramblings.tagmo.amiibo.AmiiboManager$listAmiiboDocuments$2$1$1$1.invokeSuspend(AmiiboManager.kt:361)05-02 19:25:32.925 17065 17553 W Exception:    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:32.925 17065 17553 W Exception:    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:32.925 17065 17553 W Exception:  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:32.925 17065 17553 W Exception:    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:32.925 17065 17553 W Exception:   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:32.925 17065 17553 W Exception:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:32.925 17065 17553 W Exception:    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:32.925 17065 17553 W Exception:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:35.909 17065 17065 E IPCThreadState: attemptIncStrongHandle(62): Not supported05-02 19:25:35.909 17065 17065 E IPCThreadState: attemptIncStrongHandle(64): Not supported05-02 19:25:35.935 17065 17474 W Parcel  : Expecting binder but got null!

Usage Requirements

AbandonedCart commented 5 months ago

I'll have to look into it. There was a request to export flipper files months, possibly even years ago. Like a lot of the more obscure features, it was never brought up again after the request. The logical assumption was it worked. It's not uncommon to find out much later it was never actually tested.

danizwam commented 5 months ago

Just to be clear, it does not affect the flipper zero export only. I just created 10 random bins and they have all the same hex.

grafik

AbandonedCart commented 5 months ago

What version are you using? The issue with none of them being changed was resolved a few versions ago. This is normally included in the log, but the log wasn't included.

https://github.com/HiddenRamblings/TagMo/wiki#reporting-issues

danizwam commented 5 months ago

What version are you using? The issue with none of them being changed was resolved a few versions ago. This is normally included in the log, but the log wasn't included.

https://github.com/HiddenRamblings/TagMo/wiki#reporting-issues

I found out how to create a log and i update my inital post. I think i am using the latest version (i updated from inside the app).

TagMo 4.1.8 (GitHub Release) #3ff6437
OnePlus TIRAMISU (13) - 10.00 GB RAM

--------- beginning of main
05-02 19:25:20.684 17065 17065 E ANR_LOG : >>> msg's executing time is too long
05-02 19:25:20.684 17065 17065 E ANR_LOG : Blocked msg = { when=-24s914ms what=0 target=android.view.Choreographer$FrameHandler callback=android.view.Choreographer$FrameDisplayEventReceiver } , cost  = 24912 ms
05-02 19:25:20.684 17065 17065 E ANR_LOG : >>>Current msg List is:
05-02 19:25:20.684 17065 17065 E ANR_LOG : Current msg <1> = { when=+5s680ms what=0 target=android.os.Handler callback=androidx.profileinstaller.ProfileInstallerInitializer$$ExternalSyntheticLambda1 }
05-02 19:25:20.684 17065 17065 E ANR_LOG : >>>CURRENT MSG DUMP OVER<<<
05-02 19:25:20.731 17065 17476 E .eightbit:TagMo: Loaded layer handle (6745095426794626403) for layer /my_product/lib64/libcolorx-loader.so
05-02 19:25:20.731 17065 17476 E .eightbit:TagMo: Looking for entrypoint ColorX_Check
05-02 19:25:20.731 17065 17476 E .eightbit:TagMo: Found ColorX_Check for /my_product/lib64/libcolorx-loader.so
05-02 19:25:20.731 17065 17476 E .eightbit:TagMo: Check failed
--------- beginning of system
05-02 19:25:20.805 17065 17065 E OplusCustomizeRestrictionManager: sInstance is null, start a new sInstance
05-02 19:25:20.994 17065 17065 W View    : requestLayout() improperly called by android.widget.FrameLayout{861d00b V.E..V... ......ID 0,0-1080,2100 #2} during layout: running second layout pass
05-02 19:25:20.994 17065 17065 W View    : requestLayout() improperly called by androidx.recyclerview.widget.RecyclerView{39f05cf IFED.V... ......I. 0,2112-1080,2112 #7f09010d app:id/foomiibo_list} during layout: running second layout pass
05-02 19:25:20.994 17065 17065 W View    : requestLayout() improperly called by androidx.recyclerview.widget.RecyclerView{bd30c30 VFED.V... ......ID 0,0-1080,2097 #7f090086 app:id/browser_content} during layout: running second layout pass
05-02 19:25:21.044 17065 17474 W Parcel  : Expecting binder but got null!
05-02 19:25:21.797 17065 17555 W Exception: java.lang.Exception: Daten müssen mit 0x04 beginnen.
05-02 19:25:21.797 17065 17555 W Exception:     at com.hiddenramblings.tagmo.nfctech.TagArray.validateData(TagArray.kt:243)
05-02 19:25:21.797 17065 17555 W Exception:     at com.hiddenramblings.tagmo.nfctech.TagArray.getValidatedData(TagArray.kt:349)
05-02 19:25:21.797 17065 17555 W Exception:     at com.hiddenramblings.tagmo.nfctech.TagArray.getValidatedDocument(TagArray.kt:363)
05-02 19:25:21.797 17065 17555 W Exception:     at com.hiddenramblings.tagmo.amiibo.AmiiboManager$listAmiiboDocuments$2$1$1$1.invokeSuspend(AmiiboManager.kt:361)
05-02 19:25:21.797 17065 17555 W Exception:     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
05-02 19:25:21.797 17065 17555 W Exception:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
05-02 19:25:21.797 17065 17555 W Exception:     at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
05-02 19:25:21.797 17065 17555 W Exception:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
05-02 19:25:21.797 17065 17555 W Exception:     at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
05-02 19:25:21.797 17065 17555 W Exception:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
05-02 19:25:21.797 17065 17555 W Exception:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
05-02 19:25:21.797 17065 17555 W Exception:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)
05-02 19:25:26.004 17065 17474 W Parcel  : Expecting binder but got null!
05-02 19:25:27.106 17065 17474 W Parcel  : Expecting binder but got null!0
5-02 19:25:31.551 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_0.bin
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
05-02 19:25:31.551 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_1.bin
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
05-02 19:25:31.599 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)
05-02 19:25:31.653 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_2.bin
05-02 19:25:31.653 17065 17479 W IllegalArgumentException:  at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.653 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.718 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_3.bin05-02 19:25:31.718 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.718 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.773 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_4.bin05-02 19:25:31.773 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.773 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.829 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_5.bin05-02 19:25:31.829 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.829 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.885 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_6.bin05-02 19:25:31.885 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.885 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.924 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_7.bin05-02 19:25:31.924 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.924 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:31.967 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_8.bin05-02 19:25:31.967 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:31.967 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:32.025 17065 17479 W IllegalArgumentException: java.lang.IllegalArgumentException: Invalid URI: 8-Bit Link[0448995DCAED4C80EB]-Validated_9.bin05-02 19:25:32.025 17065 17479 W IllegalArgumentException:   at android.provider.DocumentsContract.getTreeDocumentId(DocumentsContract.java:1289)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:  at androidx.documentfile.provider.DocumentFile$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at androidx.documentfile.provider.DocumentFile.fromTreeUri(DocumentFile.java:138)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at com.hiddenramblings.tagmo.BrowserActivity$cloneWithRandomSerial$1.invokeSuspend(BrowserActivity.kt:1030)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:32.025 17065 17479 W IllegalArgumentException:   at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:32.925 17065 17553 W Exception: java.lang.Exception: Daten müssen mit 0x04 beginnen.05-02 19:25:32.925 17065 17553 W Exception:    at com.hiddenramblings.tagmo.nfctech.TagArray.validateData(TagArray.kt:243)05-02 19:25:32.925 17065 17553 W Exception:  at com.hiddenramblings.tagmo.nfctech.TagArray.getValidatedData(TagArray.kt:349)05-02 19:25:32.925 17065 17553 W Exception:  at com.hiddenramblings.tagmo.nfctech.TagArray.getValidatedDocument(TagArray.kt:363)05-02 19:25:32.925 17065 17553 W Exception:  at com.hiddenramblings.tagmo.amiibo.AmiiboManager$listAmiiboDocuments$2$1$1$1.invokeSuspend(AmiiboManager.kt:361)05-02 19:25:32.925 17065 17553 W Exception:    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)05-02 19:25:32.925 17065 17553 W Exception:    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)05-02 19:25:32.925 17065 17553 W Exception:  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)05-02 19:25:32.925 17065 17553 W Exception:    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)05-02 19:25:32.925 17065 17553 W Exception:   at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)05-02 19:25:32.925 17065 17553 W Exception:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)05-02 19:25:32.925 17065 17553 W Exception:    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)05-02 19:25:32.925 17065 17553 W Exception:  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)05-02 19:25:35.909 17065 17065 E IPCThreadState: attemptIncStrongHandle(62): Not supported05-02 19:25:35.909 17065 17065 E IPCThreadState: attemptIncStrongHandle(64): Not supported05-02 19:25:35.935 17065 17474 W Parcel  : Expecting binder but got null!
AbandonedCart commented 5 months ago

It looks like there is an actual error, which could explain why it's not changing the serial number.

danizwam commented 5 months ago

It looks like there is an actual error, which could explain why it's not changing the serial number.

Yes, i see it. There are no special chars, except [], which could cause the URI not to be valid. I even tried a file without spaces, but that did not work.

I haven't tried it yet, but maybe i'll clone the repo and take a look 😉

AbandonedCart commented 5 months ago

If you want to do that, the issue is going to be line 1030 in the BrowserActivity file.

danizwam commented 5 months ago

If you want to do that, the issue is going to be line 1030 in the BrowserActivity file.

I changed the [] to (), but i still have the same issue, so it's not only the brackets.

grafik

I still need to warm up to IntelliJ and Kotlin, but I'll take a closer look later.

AbandonedCart commented 5 months ago

The brackets aren't an issue. It's the file itself.

danizwam commented 5 months ago

@AbandonedCart

I think i fixed it, partially. The export of the flipper-zero files are now working. There where two different problems:

I would prefer to post the edited methods and classes and not create a pull request, because i could not overview any possible side effects.

  1. the URI for the generated file was invalid.

I modified the code and returned the URI-string of the newly created file to create a valid URI.

Class: TagArray.kt

@JvmStatic
@Throws(IOException::class)
fun writeBytesToDocument(
    context: Context, directory: DocumentFile, name: String, tagData: ByteArray?
): String? {
    // displayName – name of new document, without any file extension appended; the underlying provider may choose to append the extension
    // The underlying provider does NOT provide an extension, therefore one IS appended
    val newFile = directory.createFile(
        context.resources.getStringArray(R.array.mimetype_bin)[0], "$name.bin"
    )
    newFile?.let { file ->
        context.contentResolver.openOutputStream(file.uri).use { it?.write(tagData) }
    }
    //return newFile?.name
    return newFile?.uri.toString()
}

fun writeBytesWithName(context: Context, fileName: String?, directory: String, tagData: ByteArray?) : String? {
    val prefs = Preferences(context.applicationContext)
    return fileName?.let { name ->
        if (prefs.isDocumentStorage) {
            val rootUri = prefs.browserRootDocument() ?: throw NullPointerException("Root document URI is null")
            val rootDocument = DocumentFile.fromTreeUri(context, Uri.parse(rootUri)) ?: throw NullPointerException("Failed to create DocumentFile from URI")
            writeBytesToDocument(context, rootDocument, name, tagData)
        } else {
            val destination = Storage.getDownloadDir("TagMo", directory)
            destination.mkdirs()
            writeBytesToFile(destination, name, tagData)
        }
    }

With this modifications, the exception is gone. (I tried so many different ways and debugged for hours, i hope i got it all).

  1. The generated UIDs where not unique, due to a wrong handling in TagArray.kt in method withRandomSerials().

I found out, that Foomiibo.generateRandomUID() generates random UIDs, but they are not processed in the right way. DataList contained only objects with the same UID.

suspend fun ByteArray?.withRandomSerials(count: Int, keyManager: KeyManager? = null) : ArrayList<AmiiboData> {
    val dataList: ArrayList<AmiiboData> = arrayListOf()
    (keyManager?.decrypt(this) ?: this)?.let { originalTagData ->
        coroutineScope {
            (0 until count).map { async(Dispatchers.IO) {
                try {
                    val tagDataCopy = originalTagData.copyOf() 
                    AmiiboData(tagDataCopy).apply {
                        uID = Foomiibo.generateRandomUID() 
                    }.also {
                        dataList.add(it)
                    }
                } catch (e: Exception) {
                    Debug.warn(e)
                }
            } }.awaitAll()
        }
    }
    return dataList
}

With this modifications, dataList contains objects with different UIDs.

What does not work?:

If i create the Flipper-Zero .nfc files, they all have a different name.

grafik

Maybe you can look into the .bin filenames.

I hope i posted all methods, but if not, i think you´ll get what i wanted to do and will figure out the missing lines ;)

AbandonedCart commented 5 months ago

I’ll take a look at it as soon as I get a chance.

AbandonedCart commented 5 months ago

Unfortunately, attempting to overlay your code on the existing code and figure out what changed without including what broke seems like twice the work of just fixing it from scratch. I appreciate the effort, though.

danizwam commented 5 months ago

Unfortunately, attempting to overlay your code on the existing code and figure out what changed without including what broke seems like twice the work of just fixing it from scratch. I appreciate the effort, though.

I am happy if I could help ;)

Yes, that's what I was afraid of. I've really changed things in dozens of places. At first I thought it was the file name, then I went deeper and found out about the URI string. Parts of previous changes are of course still included. In summary, these are the fundamental changes:

AbandonedCart commented 5 months ago

No need to explain. I went through 100 iterations of how to do it when it was originally written, but had only started learning kotlin then. It's been long enough that I know what I'm doing now and can at least follow what you did on its own.

To give a better idea of when it was added, document storage was still optional.

AbandonedCart commented 5 months ago

I feel like somewhere changes had to have been overwritten because it did work last time I tried it and definitely didn't work when I went back to check into this issue.

There was also a computer that nearly exploded in that time so who knows. Anyway, it should work when I'm done.

AbandonedCart commented 5 months ago

Not sure why I was returning the name as just the name other than because it's what I named the function. Even just looking at it now that value gets parsed as the uri almost immediately after. Probably something I did late one night looking at it out of context.

Anyway, thanks again.