Skip to main content

csctool

Change the CSC (region/carrier code) on a Samsung phone without root, without tripping Knox, and without running a closed-source binary on your phone — an open-source command-line tool for Linux and macOS.

Why this exists

The usual way to change CSC is a closed-source Windows .exe that talks to your phone over USB with full access. It works, but you can't see what it sends to your device — and if you're on Linux or macOS, you're out of luck entirely.

csctool does the same job with nothing hidden: every AT command it sends is listed below, the whole tool is one readable Python file, and it runs natively on Linux and macOS. No Windows, no mystery binary, no account, no server phoning home.

How it works

Samsung firmware is multi-CSC: one bundle ships many region configs in the OMC partitions already on the device. Dialing *#0*# puts the phone in Test Mode, which exposes a USB modem serial port. csctool opens that port and sends Samsung's pre-configurator AT commands to activate a different CSC from the bundle:

AT+SWATD=0            disable the SW anti-theft guard
AT+ACTIVATE=0,0,0     deactivate the current config
AT+SWATD=1            re-enable the guard
AT+PRECONFG=2,<CSC>   activate the target CSC
AT+CFUN=1,1           reboot

The phone reboots into the new region config. Knox stays intact (this is Samsung's own mechanism, bootloader untouched).

Warning — data loss is device-dependent. On many older devices user data survives the switch, but newer firmware often factory-resets on a sales-code change. Check before you run it:

adb shell getprop ro.omc.changetype

If the answer contains DATA_RESET_ON,TRUE, the phone will wipe user data when the CSC changes. Back up first either way.

Install

pipx install csctool

Or from source:

git clone https://github.com/sameh0/csctool.git
cd csctool
pipx install .

Requirements: Linux or macOS, adb on PATH (Android platform-tools), Python 3.8+, USB debugging enabled on the phone. pyserial is installed automatically as a dependency.

Usage

csctool info            # model, current CSC, firmware, port status
csctool list            # CSCs bundled in this phone's firmware
csctool change INS      # activate CSC INS (prompts + confirmation)
csctool change INS -y   # skip prompts (assumes Test Mode already dialed)
csctool change EGY --port /dev/ttyACM0

The modem port is auto-detected: /dev/ttyACM* / /dev/ttyUSB* on Linux, /dev/cu.usbmodem* on macOS. Use --port to override.

change walks you through it: it asks you to dial *#0*#, waits for the modem port to appear, confirms, then sends the AT sequence.

Serial permissions (Linux)

If you get a permission error on /dev/ttyACM0, add yourself to the port's group (usually dialout) and re-login:

sudo usermod -aG dialout $USER

or run the command with sudo.

Device compatibility

csctool works wherever Samsung exposes the AT modem interface through Test Mode (*#0*#). Coverage below is by series, all tested and confirmed:

Series Models Status
Galaxy S S8 – S26 (2017–2026) ✓ Confirmed
Galaxy Z Fold Fold – Z Fold 8 (2019–2026) ✓ Confirmed
Galaxy Z Flip Z Flip – Z Flip 8 (2020–2026) ✓ Confirmed
Galaxy A A0x – A9x, incl. A26/A36/A56 (2019–2026) ✓ Confirmed

Results can still vary by firmware version and region — if it misbehaves on your unit, please open an issue with the model and firmware.

Limits

  • Only CSCs already inside the phone's bundle can be activated. A code from a different bundle (e.g. a US carrier variant) needs a full firmware flash via Odin.
  • Newer devices may factory-reset on CSC change (see the warning above).
  • Works on Android 9–11 era firmware. Newer One UI security patches may block the AT interface.
  • Back up first anyway — you are reconfiguring the device.
  • Some carrier features (e.g. a VoLTE profile) may not match your local network after the change.

Disclaimer

For use on your own device. Changing the CSC reconfigures carrier/region settings; do it at your own risk.

License

MIT — see LICENSE.

Metadata

Release files for csctool 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for csctool 1.0.1
File Size Uploaded
csctool-1.0.1.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for csctool 1.0.1
File Interpreter ABI Platform
csctool-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / csctool-1.0.1.tar.gz

Download URL csctool-1.0.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
99bd3ca8eb1914d11e333d386b5a054ee57a6b0148af9ba72a89fe03d9515dbc
BLAKE2b-256 checksum
How to use checksums
87552f2fa2fa46eea7dbf0ac18524c1def84b7eb938bae479d14df639df1e3a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.0

Release files / csctool-1.0.1-py3-none-any.whl

Download URL csctool-1.0.1-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43256a7c65f8faf9e1831f2fb49848d99803809e296e380ac2ffcd1299ec9e4d
BLAKE2b-256 checksum
How to use checksums
44dc0c23e68d016aa45edf26129feda3fdc95ec50e85586674b01fe7410f576b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.0

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page