Skip to main content

csctool

Change the CSC (region/carrier code) on a Samsung phone without root and without tripping Knox — a command-line equivalent of the "Change CSC" feature in the SamFW tool.

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.

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.

Requirements

  • Linux or macOS
  • adb on PATH (Android platform-tools)
  • Python 3.8+ with pyserial
  • USB debugging enabled on the phone

Install

pipx install .          # from this directory
# or
pip install pyserial && python3 csctool.py <command>

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.

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.0

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.0
File Size Uploaded
csctool-1.0.0.tar.gz 8.0 kB Details

Built distribution (wheel)

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

Total release size: 16.5 kB

Release files / csctool-1.0.0.tar.gz

Download URL csctool-1.0.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
78ce103757bb2047531c99ec35db85bf1344e1c7f212226cfdc78ef15f0202de
BLAKE2b-256 checksum
How to use checksums
dd04d880a68a823abdc777fd715b521695152c9429c5a3d67dfe663c9050b632
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.0-py3-none-any.whl

Download URL csctool-1.0.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d51f8776dbfa3aa6bd7ee287af0285cdc056f934151026ddc045a27ad575c17b
BLAKE2b-256 checksum
How to use checksums
1bcb9b9b0e04a3a32a59ae00c29fb1a2a947ba968bef4162b6a4865587e28e02
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

1.0.1

2 release files

This release

1.0.0 This release

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