Code Monkey home page Code Monkey logo

Comments (11)

JJTech0130 avatar JJTech0130 commented on July 23, 2024 1

This is done in the Docker image, so I'm going to close this issue.

from provision.

Dadoum avatar Dadoum commented on July 23, 2024

Yes it is. I am currently trying to download only part of the APK, because I think it should not download 127 MB while we only need few files.

from provision.

JJTech0130 avatar JJTech0130 commented on July 23, 2024

Yeah. If Apple's server supports content-range, that should be possible, right?

from provision.

Dadoum avatar Dadoum commented on July 23, 2024

It seems that Apple supports Content-Range only with gzipped requests, but we can't unzip a part of gzip file, so it seems impossible…

from provision.

Macleykun avatar Macleykun commented on July 23, 2024

Perhaps using a docker image to make the download as small as possible is an idea :)
i'm working on it, it does work but have to write it up nicely.

I do have one question, you have any clue why this happens in alpine but not ubuntu?

/test # ./anisette_server-aarch64
/bin/sh: ./anisette_server-aarch64: not found
/test # sh anisette_server-aarch64
anisette_server-aarch64: line 1:ELF▒▒▒@▒L▒@8: not found
anisette_server-aarch64: line 2: syntax error: unexpected ")"

it's not a big issue, but i like to use alpine for docker images :)

from provision.

JJTech0130 avatar JJTech0130 commented on July 23, 2024

It seems that Apple supports Content-Range only with gzipped requests, but we can't unzip a part of gzip file, so it seems impossible…

Wait, so I don't actually get why this is a problem. The GZIP compression is applied on the HTTP level, on top of the ZIP compression of the APK. Thus, simply wrap the partial ZIP requests in a GZIP decompression.

That's why curl's --compressed flag works: it can transparently decrypt the entire GZIP compression, even when the request is only partial.

from provision.

Dadoum avatar Dadoum commented on July 23, 2024

Perhaps using a docker image to make the download as small as possible is an idea :) i'm working on it, it does work but have to write it up nicely.

I do have one question, you have any clue why this happens in alpine but not ubuntu?

/test # ./anisette_server-aarch64
/bin/sh: ./anisette_server-aarch64: not found
/test # sh anisette_server-aarch64
anisette_server-aarch64: line 1:ELF▒▒▒@▒L▒@8: not found
anisette_server-aarch64: line 2: syntax error: unexpected ")"

it's not a big issue, but i like to use alpine for docker images :)

I guess it's related to interpreter? Is the file /lib/ld-linux-aarch64.so.1 on your system? if not, type file /bin/sh and see the interpreter name, and then use patchelf --set-interpreter <interpreter name> ./anisette-server to change the one specified in the original file.

from provision.

Dadoum avatar Dadoum commented on July 23, 2024

It seems that Apple supports Content-Range only with gzipped requests, but we can't unzip a part of gzip file, so it seems impossible…

Wait, so I don't actually get why this is a problem. The GZIP compression is applied on the HTTP level, on top of the ZIP compression of the APK. Thus, simply wrap the partial ZIP requests in a GZIP decompression.

That's why curl's --compressed flag works: it can transparently decrypt the entire GZIP compression, even when the request is only partial.

I should take a look, especially since I am working on a full AltServer reimplementation.

from provision.

JJTech0130 avatar JJTech0130 commented on July 23, 2024

It seems that Apple supports Content-Range only with gzipped requests, but we can't unzip a part of gzip file, so it seems impossible…

Wait, so I don't actually get why this is a problem. The GZIP compression is applied on the HTTP level, on top of the ZIP compression of the APK. Thus, simply wrap the partial ZIP requests in a GZIP decompression.
That's why curl's --compressed flag works: it can transparently decrypt the entire GZIP compression, even when the request is only partial.

I should take a look, especially since I am working on a full AltServer reimplementation.

Now I'm confused: I was trying this, and I can't get it to work. Now that I'm looking at it, maybe it does do gzip on the whole thing, and I was just mixing up it and Transfer-Encoding (which doens't affect Apple's server)

from provision.

JJTech0130 avatar JJTech0130 commented on July 23, 2024

So... I have an idea.
It looks like you can generate an index for a GZIP file, which lets you seek through it like a ZIP.
So, we could host that index, and it wouldn't actually contain the file, just the index to let it unzip parts of the gzip.
Then, you could use a partial zip algorithm on those.

It would be kinda complex tho, might just be easier to bite the bullet and download all 100 some MB

from provision.

Macleykun avatar Macleykun commented on July 23, 2024

So... I have an idea. It looks like you can generate an index for a GZIP file, which lets you seek through it like a ZIP. So, we could host that index, and it wouldn't actually contain the file, just the index to let it unzip parts of the gzip. Then, you could use a partial zip algorithm on those.

It would be kinda complex tho, might just be easier to bite the bullet and download all 100 some MB

i think it might be better to just download it all. They only have to download it once anyways :)

from provision.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.