Can I get access to published js code or minified bundle?

Hello Expo Team,

I work at a software company and we had problems with our repositories, losing all source code. Our two apps have been published some time ago and i wish i could get back that code or even the minified bundle. We are desperate, if someone could help us, we would be glad.

Att.

Yes. You should be able to get this from the APK or IPA if you have them. They are basically just ZIP files. Rename them to yourapp.zip and you should be able to unzip them and find the original bundle from when the app was built.

Also, you can get the bundle the same way an app gets the published bundle. If I remember correctly you need to fetch the manifest from a URL like the following (with optional release channel parameter):

https://exp.host/@YOURUSER/YOURSLUG?release-channel=CHANNELNAME

but you need to send things like the SDK version and I think the OS as HTTP headers.

You can work out how if you put some sort of proxy between your app and the Expo servers to monitor the traffic, or else run expo export a simple app, then build it and maybe log on your web server where you’re hosting the files what requests are made. Then make similar requests to the Expo servers to fetch the bundles you’re interested in.

For an example of how to export an app to host on your own servers so that you can more easily monitor the app’s requests, see the following:

Try something like this:

curl -H "Accept: application/expo+json,application/json" -H "Expo-API-Version: 1" -H "Expo-Platform: android" -H "Expo-Release-Channel: default" -H "Expo-SDK-Version: 36.0.0,38.0.0,39.0.0,37.0.0" https://exp.host/@yourUsername/yourSlug

That should give you a bunch of JSON. In there will be a reference to a bundleUrl.