Skip to content

Instantly share code, notes, and snippets.

@MatthewKosloski
Last active April 6, 2021 11:20
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save MatthewKosloski/2146b28e1fbba6a168f11f7a2576a39c to your computer and use it in GitHub Desktop.
Save MatthewKosloski/2146b28e1fbba6a168f11f7a2576a39c to your computer and use it in GitHub Desktop.
Extracts each .spa file in Spotify's Apps directory without manually doing it yourself.
/*
Extracts each .spa file in Spotify's Apps directory without manually doing it yourself.
The default folder is put on the desktop.
To change that, change the following part of the command:
`~/Desktop/Apps && cd ~/Desktop/Apps`
Procedure:
1. Change directory to /Applications/Spotify.app/Contents/Resources/Apps
2. Copy the files within the directory to ~/Desktop/Apps and change directory
3. Make folders for all modules
4. Unpack all modules
5. Delete all .spa files
*/
cd /Applications/Spotify.app/Contents/Resources/Apps && cp -R . ~/Desktop/Apps && cd ~/Desktop/Apps && mkdir about ad album artist-chart artist browse buddy-list chart collection-album collection-artist collection-songs collection concerts creator-about discover error feedback findfriends full-screen-modal genre glue-resources hub licenses lyrics messages notification-center people playlist-desktop playlist-folder profile radio-hub search settings share social-feed station stations suggest zlink-queue zlink zlogin && tar -xvf about.spa -C ./about && tar -xvf ad.spa -C ./ad && tar -xvf album.spa -C ./album && tar -xvf artist-chart.spa -C ./artist-chart && tar -xvf artist.spa -C ./artist && tar -xvf browse.spa -C ./browse && tar -xvf buddy-list.spa -C ./buddy-list && tar -xvf chart.spa -C ./chart && tar -xvf collection-album.spa -C ./collection-album && tar -xvf collection-artist.spa -C ./collection-artist && tar -xvf collection-songs.spa -C ./collection-songs && tar -xvf collection.spa -C ./collection && tar -xvf concerts.spa -C ./concerts && tar -xvf creator-about.spa -C ./creator-about && tar -xvf discover.spa -C ./discover && tar -xvf error.spa -C ./error && tar -xvf feedback.spa -C ./feedback && tar -xvf findfriends.spa -C ./findfriends && tar -xvf full-screen-modal.spa -C ./full-screen-modal && tar -xvf genre.spa -C ./genre && tar -xvf glue-resources.spa -C ./glue-resources && tar -xvf hub.spa -C ./hub && tar -xvf licenses.spa -C ./licenses && tar -xvf lyrics.spa -C ./lyrics && tar -xvf messages.spa -C ./messages && tar -xvf notification-center.spa -C ./notification-center && tar -xvf people.spa -C ./people && tar -xvf playlist-desktop.spa -C ./playlist-desktop && tar -xvf playlist-folder.spa -C ./playlist-folder && tar -xvf profile.spa -C ./profile && tar -xvf radio-hub.spa -C ./radio-hub && tar -xvf search.spa -C ./search && tar -xvf settings.spa -C ./settings && tar -xvf share.spa -C ./share && tar -xvf social-feed.spa -C ./social-feed && tar -xvf station.spa -C ./station && tar -xvf stations.spa -C ./stations && tar -xvf suggest.spa -C ./suggest && tar -xvf zlink-queue.spa -C ./zlink-queue && tar -xvf zlink.spa -C ./zlink && tar -xvf zlogin.spa -C ./zlogin && rm about.spa ad.spa album.spa artist-chart.spa artist.spa browse.spa buddy-list.spa chart.spa collection-album.spa collection-artist.spa collection-songs.spa collection.spa concerts.spa creator-about.spa discover.spa error.spa feedback.spa findfriends.spa full-screen-modal.spa genre.spa glue-resources.spa hub.spa licenses.spa lyrics.spa messages.spa notification-center.spa people.spa playlist-desktop.spa playlist-folder.spa profile.spa radio-hub.spa search.spa settings.spa share.spa social-feed.spa station.spa stations.spa suggest.spa zlink-queue.spa zlink.spa zlogin.spa
@CoolJoe72
Copy link

CoolJoe72 commented Aug 21, 2020

Some .spa files have been added and/or removed and the command resulted in errors.
The following bash script does steps 3-5 in the Procedure without having to name each .spa file/folder.

for i in *.spa; do  mkdir ${i%%.*}; tar -xvf $i -C ${i%%.*};rm $i; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment