# # Created by @PhilippIRL # Windows, non MS-Store version only (but if you change the file path it might work on other operating systems too) # # This script patches Spotify's offline.bnk file (this file caches the remote config) to trick Spotify into thinking that your account is enabled for dev tools. # Spotify will automatically revert this local change after some time when it next fetches the remote config. # import os, sys # path of offline.bnk on windows (non ms-store) filePath = os.environ['LOCALAPPDATA'] + '\\Spotify\\offline.bnk' file = open(filePath, 'r+b') content = file.read() # find last occurence of string 'app-developer' loc = content.rindex(b'app-developer') # 15 bytes after this string is the location we want to patch patchLoc = loc + 15 # only patch if the value is what we expect if not (content[patchLoc] == 48 or content[patchLoc] == 50): print('Unexpected value', content[patchLoc]) sys.exit(1) file.seek(patchLoc) # change one byte to 50 (ascii '2') file.write(bytes([50])) file.close()