mcbegamerxx954 / mcbe_shader_redirector

a (very) experimental shader redirector for android written in rust
13 stars 3 forks source link

Giving storage perm on A11/12+ doesn't load shaders #6

Open atashi764 opened 4 months ago

atashi764 commented 4 months ago

if i guess correct, newer android versions don't request any storage permission for using Android folder (that's what Minecraft does now)

Not sure about a11 but for a12/13 sure it is.

now the problem is when trying to import skins you have to grant storage permission. doing which doesn't load any shaders.

this is same as the old a10 bug but for newer androids now.

one of my testers told me this, i will confirm later by myself

mcbegamerxx954 commented 4 months ago

I have not faced that bug in a14 , since i just used the gallery method, but that is weird, jni should have fixed that

CallMeSoumya2063 commented 3 months ago

Hey @atashi764, kind of offtopic here but can you take a look at my new script I have been working on for quite some time actually, it can patch Minecraft apk (including Minecraft from playstore) using a lot of patches like automatic dex patching for loading shaders using mcbe redirector, old storage path and a few others.

It's working in 1.21.2.02 (and 1.20.81 too maybe, I can't remember) but not in 1.21.21.01, even though I specifically made the patches work by searching for a specific line and editing text (inserting or replacing) with some line offset according to it. Can you maybe check what's wrong with it?

atashi764 commented 3 months ago

@CallMeSoumya2063 alright i will give it a try and let you know if there's anything wrong

atashi764 commented 3 months ago

you said its working for minecraft from play store but it doesnt automatically get apks or try .apks file in Download folder

CallMeSoumya2063 commented 3 months ago

It has to be an already antisplit apk, forgot to mention in repo

atashi764 commented 3 months ago

I tried it. as i can see there is no entries for draco in classes.dex.

there's a weird bug when you select nothing in mod selection it deletes the minecraft apk.

it fully decompiles the apk for modifications as i can see.

but i guess it's possible to use a different, faster approach.

apks are basically zips. all you have to do is extract the files you intend to modify.

then add them back and sign the apk.

On Sat, Aug 17, 2024, 8:34 AM CallMeSoumya2063 @.***> wrote:

It has to be an already antisplit apk, forgot to mention in repo

— Reply to this email directly, view it on GitHub https://github.com/mcbegamerxx954/mcbe_shader_redirector/issues/6#issuecomment-2294572885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSL35SIHGZZ23XKKKIBFXTZR2ZDBAVCNFSM6AAAAABKN2E2WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJUGU3TEOBYGU . You are receiving this because you were mentioned.Message ID: @.***>

CallMeSoumya2063 commented 3 months ago

apks are basically zips. all you have to do is extract the files you intend to modify.

I actually was taking this approach before settling on full decompilation, and it didn't work because of a single thing that I couldn't figure out how it was possible: editing AndroidManifest.xml to add the storage permission in it. Usually it's in binary format when inside of the apk but I couldn't find any way to convert it to regular xml and convert back after editing.

as i can see there is no entries for draco in classes.dex.

I'm directly using mcbe redirector from dex method but God knows why it's not consistently adding lines based on offset relative with text position (for example, adding the lines in onCreate method)

there's a weird bug when you select nothing in mod selection it deletes the minecraft apk.

It's not deleted, it's just moved to termux's home directory because apkeditor (and other tools) decompiles faster when it outputs in termux's home (idk why). I also tested this and found true when using time java -jar with apktool and apkeditor, it performs better by a good margin. Also I overlooked that part where it should have moved the file back when doesn't find any selected patches and fails, I can fix it.

it doesnt automatically get apks or try .apks file in Download folder

Apkeditor jar can actually antisplit this, I'll add it in future maybe.

Also if you don't mind then let's talk about this in that repo since it's not mcbe redirector issue

atashi764 commented 3 months ago

Sure, no problem.

On Sun, Aug 18, 2024, 6:08 AM CallMeSoumya2063 @.***> wrote:

apks are basically zips. all you have to do is extract the files you intend to modify. I actually was taking this approach before settling on full decompilation, and it didn't work because of a single thing that I couldn't figure out how it was possible: editing AndroidManifest.xml to add the storage permission in it. Usually it's in binary format when inside of the apk but I couldn't find any way to convert it to regular xml and convert back after editing.

as i can see there is no entries for draco in classes.dex. I'm directly using mcbe redirector from dex method but God knows why it's not consistently adding lines based on offset relative with text position (for example, adding the lines in onCreate method)

there's a weird bug when you select nothing in mod selection it deletes the minecraft apk. It's not deleted, it's just moved to termux's home directory because apkeditor (and other tools) decompiles faster when it outputs in termux's home (idk why). I also tested this and found true when using time java -jar with apktool and apkeditor, it performs better by a good margin. Also I overlooked that part where it should have moved the file back when doesn't find any selected patches and fails, I can fix it.

it doesnt automatically get apks or try .apks file in Download folder Apkeditor jar can actually antisplit this, I'll add it in future maybe.

Also if you don't mind then let's talk about this in that repo since it's not mcbe redirector issue

— Reply to this email directly, view it on GitHub https://github.com/mcbegamerxx954/mcbe_shader_redirector/issues/6#issuecomment-2295035759, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSL35TUB4WXLK6QCPWNTHDZR7QXHAVCNFSM6AAAAABKN2E2WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGAZTKNZVHE . You are receiving this because you were mentioned.Message ID: @.***>

mcbegamerxx954 commented 2 months ago

Is there any changes in the json path after triggering this bug?, any new files created?

faizul726 commented 2 months ago

Is there any changes in the json path after triggering this bug?, any new files created?

@mcbegamerxx954 i tried it yesterday on chromeos a9 and a11 and it worked in application mode