Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install old versions of apps #392

Open
Red1860 opened this issue Jun 3, 2021 · 7 comments
Open

Install old versions of apps #392

Red1860 opened this issue Jun 3, 2021 · 7 comments

Comments

@Red1860
Copy link

Red1860 commented Jun 3, 2021

Investigation Resources

https://github.com/majd/ipatool
majd/ipatool#6 (comment)
https://github.com/NyaMisty/ipatool-py#download-old-version
https://www.txthinking.com/talks/articles/ios-old-version-app-en.article
https://tools.lancely.tech/apple/app-version/cn/447188370

Original Issue

Is your feature request related to a problem? Please describe.
I was wondering if it is possible to downgrade apps downloaded from the app store using mas. (If the older versions of the app have been downloaded/linked to the apple id)

Describe the solution you'd like
If all the app updates are linked to the apple id then maybe mas can install them using something like a install-old version command

I don't know if it would be possible though.

@chris-araman
Copy link
Contributor

chris-araman commented Jun 3, 2021

I don't know that this will be possible. The App Store is focused on getting the current version of apps to users. I'm not aware of a way to query it for previous versions.

If it's something that the App Store app (the GUI) can do, then it might be possible for mas to do. I don't think the App Store app provides a way for users to install old versions of an app, only the most current version.

@phatblat
Copy link
Member

phatblat commented Jun 4, 2021

I'm also doubtful that this is possible. Does the Mac App Store offer installation of an older version of an app when the latest/current version of the app requires a higher version of macOS than is currently installed? I know that's how iOS app installs work. I'm wondering if there's an API for these older versions, but it might not be exposed to us.

@phatblat
Copy link
Member

phatblat commented Jun 4, 2021

FYI, #386 is a request to "pin" apps so that they are not upgraded the latest version by mas. I know that is different than this request, but it relates versions of apps.

@Red1860
Copy link
Author

Red1860 commented Jun 5, 2021

I'm also doubtful that this is possible. Does the Mac App Store offer installation of an older version of an app when the latest/current version of the app requires a higher version of macOS than is currently installed?

Yes it does. So for eg, i'm on Catalina and Latest version of Xcode requires Big Sur. I just run the mas command for installing Xcode on Catalina and it prompts me whether i want to download an old version of the app or not and it downloads fine after that. So i'm guessing it all has to do with the Specific id of the App.

As far as on iOS, you can downgrade your apps via jailbreak but you require the app version's id that you want to downgrade to. For eg, if you want to downgrade snapchat you just find your bundle id from here to downgrade to a specific version.

Unfortunately i wasn't able to find any mac apps from that website but I believe thats how it works for Mac App Store too but i'm not sure though.

@phatblat
Copy link
Member

phatblat commented Jun 9, 2021

Good to know. It may be possible to use that version ID if we can figure out how to get it and find the macOS API for specifying it. mas is already using private APIs to install and upgrade apps.

@jankais3r
Copy link
Contributor

I made a naive attempt and I hardcoded an appExtVrsId belonging to an older app version in Sources/MasKit/AppStore/SSPurchase.swift, but that lead to an error on download. Turns out, not all API endpoints allow setting that value, as discussed here.

The solution applied by ipatool-py to allow downloading older version of (iOS) apps is to install the last Windows version of iTunes that bundled the App Store functionality and hook into it with Frida to sniff the kbsync token needed for interaction with appExtVrsId-enabled API endpoints. As of right now, Frida doesn't work very well on Monterey, so possibly similarly convoluted approach would likely have to be deployed here.

@txthinking
Copy link

I have done this using brook, the script inside is available for reference, download older versions of any iOS app: https://www.txthinking.com/talks/articles/ios-old-version-app-en.article

@rgoldberg rgoldberg changed the title Downgrade apps using MAS Install old versions of apps Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants