/FixMyLinks

🔗🛠️ Replace domain names and remove unwanted tracking data from links shared on Android

Primary LanguageKotlinGNU General Public License v3.0GPL-3.0

FixMyLinks

🔗🛠️ Replace domain names and remove unwanted tracking data from links shared on Android


How do I use FixMyLinks?

Replace domain names

Bring back twitter.com! With FixMyLinks, you can turn x.com links back into twitter.com links and remove all tracking data (URL parameters) from these links while you're at it.

You can also set up custom rules to replace domain names in any other links you wish to modify.

Remove unwanted URL parameters

Content links generated by apps via their "share" functionality often contain URL parameters used for tracking purposes. FixMyLinks makes it super easy to ensure these links don't contain tracking parameters by removing them for you.

Note

URL parameters can also be used for necessary purposes that affect the link's destination and/or the content you see on screen. Therefore, it's important to avoid removing such parameters from links when creating custom rules.

Find out more about tracking parameters here (external link)

Installation

Currently, the only way to install FixMyLinks is to build from source. Other installation options may be added in the future.

Build from source

Prerequisites
Instructions
  1. Clone the repository and enter the project directory

    git clone https://github.com/suvanl/FixMyLinks.git FixMyLinks
    cd FixMyLinks
  2. Create a local.properties file in the project root containing the path to the Android SDK:

    Windows
    echo "sdk.dir=C\:\\Users\\<YOUR-USERNAME>\\AppData\\Local\\Android\\Sdk" >> local.properties
    macOS
    echo "sdk.dir = /Users/<YOUR-USERNAME>/Library/Android/sdk" >> local.properties
    Linux
    echo "sdk.dir = /home/<YOUR-USERNAME>/Android/sdk" >> local.properties
  3. Build the app

    Windows
    .\gradlew assemble
    macOS and Linux
    ./gradlew assemble

    You may need to grant execute permissions to gradlew first:

    chmod +x gradlew
  4. Install the built APK on a connected device

    adb install app/build/outputs/apk/debug/app-debug.apk
  5. Open the app using the device's launcher. Alternatively, use the following command to run the app:

    adb shell am start -n "com.suvanl.fixmylinks/com.suvanl.fixmylinks.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

    Optionally, you may use the --splashscreen-show-icon flag.

Usage

The following usage examples assume that FixMyLinks is installed on a supported Android device.

Example 1: modifying links when sharing content

  1. Share content from an app that a built-in or custom rule exists for, such as Twitter/X.
    1. On a piece of shareable content, such as a Tweet/Post, tap the share button. This may open a custom share sheet provided by the app or may open the native share sheet.
    2. If a custom share sheet is displayed, tap the option to open the native share sheet (i.e., "Share via..." in the Twitter/X app).
  2. In the native share sheet, select the FixMyLinks "Share to.." option
  3. This will recreate the share sheet, but for a modified link as per the rule that was matched.
  4. Select any share option you wish to use. The share target will receive the modified link.

Example 2: using built-in rules

Coming soon

Example 3: using custom rules

Coming soon

Built-in rules

FixMyLinks currently contains the following rules out of the box:

  • Twitter/X**
  • Instagram*
  • Spotify*
* remove tracking parameters
** replace domain name and remove tracking parameters

More built-in rules will be added in future releases.

Custom rules

Coming soon — custom rule support will be implemented in a future release.

License

FixMyLinks is licensed under the GNU General Public License v3.0 (GPL-3.0).