No description
Find a file
2025-09-24 22:01:13 +02:00
hsr_wish_url_finder.sh fix colors 2025-09-12 00:45:17 +02:00
LICENSE Initial commit 2025-09-12 00:36:15 +02:00
README.md correct command for interactive shell execution 2025-09-24 22:01:13 +02:00

Honkai: Star Rail Warp URL Finder (Linux)

A Linux bash script that automatically finds and extracts your Honkai: Star Rail warp history URL from game cache files. This URL can then be used with warp tracking tools to import your pull history.

Quick Start

One-Line Installation & Run

bash <(curl -sSL https://git.yumeo.dev/Yumeo/hsr-wish-url-finder/raw/branch/main/hsr_wish_url_finder.sh)

Manual Download & Run

# Download the script
wget https://git.yumeo.dev/Yumeo/hsr-wish-url-finder/raw/branch/main/hsr_wish_url_finder.sh

# Make it executable
chmod +x hsr_wish_url_finder.sh

# Run it
./hsr_wish_url_finder.sh

Prerequisites

  1. Open your Warp History first!

    • Launch Honkai: Star Rail
    • Go to WarpRecordsDetails
    • Browse through your warp history tabs
    • Then run this script
  2. Install clipboard tools (optional, for automatic clipboard copying):

    # For X11 systems
    sudo apt install xclip
    # OR
    sudo apt install xsel
    
    # For Wayland systems
    sudo apt install wl-clipboard
    

Supported Game Installations

The script automatically searches for Honkai: Star Rail installations in:

Wine

  • ~/.wine/drive_c/users/*/AppData/LocalLow/Cognosphere/Star Rail
  • Custom Wine prefixes in ~/.local/share/wineprefixes

Lutris

  • ~/Games/*honkai* or ~/Games/*star* (case-insensitive search)

Mounted Windows Drives

  • All mounted drives with Windows-style paths:
    • /mnt/*/Programs/HoYoPlay/games/Star Rail Games/StarRail_Data/
    • /media/*/Programs/HoYoPlay/games/Star Rail Games/StarRail_Data/
    • And other common Windows installation paths

How It Works

  1. Automatic Search: The script searches common installation locations for Honkai: Star Rail
  2. Cache Analysis: Examines game cache files for the warp history URL:
    • webCaches/Cache/Cache_Data/data_2
    • Version-specific cache folders (e.g., webCaches/1.2.3.4/Cache/Cache_Data/data_2)
  3. URL Extraction: Finds and extracts the warp history URL containing getGachaLog
  4. URL Validation: Tests the URL to ensure it returns valid warp data
  5. Clipboard Copy: Automatically copies the URL to your clipboard (if clipboard tools are available)

Troubleshooting

No URL Found?

  1. Did you open Warp History? This is the most common issue - you must browse your warp records in-game first
  2. Third-party tools: Some tools can interfere with game cache - try disabling them or reinstalling the game
  3. Cache permissions: Ensure the script has read access to the game cache files

Game Not Found?

  • The script will prompt you to manually enter your game installation path
  • Common manual paths:
    ~/.wine/drive_c/Program Files/Honkai- Star Rail
    ~/.wine/drive_c/Program Files (x86)/Honkai- Star Rail
    ~/Games/honkai-star-rail
    /mnt/windows/Programs/HoYoPlay/games/Star Rail Games/StarRail_Data
    

Permission Issues?

  • Ensure the script has execute permissions: chmod +x hsr_wish_url_finder.sh
  • For mounted Windows drives, you may need proper mount permissions

Third-Party App Interference

If you see a warning about third-party apps:

  • Disable any HSR-related tools or scripts temporarily
  • Consider reinstalling the game if cache corruption is suspected
  • Make sure no other applications are accessing the game files

Usage with Warp Trackers

  1. Run this script to get your warp URL
  2. Visit your preferred HSR warp tracking website
  3. Paste the URL and import your history
  4. Your warp history will be imported automatically

Technical Details

  • Cache Detection: Uses intelligent version detection for HoYoPlay cache structure
  • URL Validation: Tests extracted URLs with HTTP requests to ensure validity
  • Multi-Platform: Supports Wine, Lutris, and native Windows installations on mounted drives
  • Error Handling: Comprehensive error reporting and troubleshooting guidance

Support

  • Issues: If the script finds your game directory but can't extract the URL, make sure you've opened your Warp History in-game first
  • Cache Problems: Try clearing browser cache or reinstalling the game if cache files appear corrupted

License

This script is licensed under the MIT License.

Credits

  • Originally created by @Yumeo for Wuthering Waves
  • Improvements by @thekiwibirdddd (color output & optimized search logic)
  • Modified for Honkai: Star Rail by @Yumeo