📱 How to Capture x-device-code
A comprehensive guide for mobile app developers and security researchers
🔍 What is x-device-code?
x-device-code is a unique identifier sent in HTTP headers by mobile applications. This identifier is typically used for:
- Device-level authentication
- Request validation
- User tracking
- API communication security
When you see this in request headers (as shown in the image), it represents a device-specific signature that APIs use to verify legitimate requests.
📱 iOS Devices — Using Reqable
Requirements
- Reqable installed on Windows/Mac
- iPhone connected to same Wi-Fi network
- SSL Proxying configured in Reqable
- Trust certificate installed on iPhone
Step-by-Step Instructions
-
1
Install & Configure Reqable
- Download and install Reqable on your computer
- Enable SSL Proxying:
Settings → SSL Proxying → Enable it
- Add
:* to capture all traffic
-
2
Setup iPhone Proxy
- On your iPhone:
Settings → Wi-Fi → [Your Network] → ⓘ
- Set HTTP Proxy to Manual
- Enter your computer's IP address
- Port:
8888 (default Reqable port)
-
3
Install Certificate
- On iPhone, open Safari
- Navigate to:
http://reqable.com/cert
- Tap to download the certificate
- Install the profile:
Settings → General → Profiles
- Trust the certificate:
Settings → General → About → Certificate Trust Settings → Enable full trust
-
4
Capture Traffic
- Launch the target app on your iPhone
- In Reqable, filter requests by domain (optional)
- Locate requests to the target API
- Examine headers for
x-device-code value
🤖 Android Devices — Using Reqable + ADB
Requirements
- Reqable installed on your computer
- Android Debug Bridge (ADB)
- Android device with USB Debugging enabled
Step-by-Step Instructions
-
1
Prepare Android Device
- Enable Developer Options (tap Build Number 7 times)
- Enable USB Debugging in Developer Options
- Connect device via USB to your computer
-
2
Configure Reqable
- Enable HTTPS decryption in Reqable
- In Reqable, go to Device tab → click Install Certificate to Android
-
3
Setup Certificate on Android
- Follow the prompts in Reqable
- Reqable will install its SSL certificate and configure the proxy automatically
-
4
Capture x-device-code
- Launch the target app
- Monitor traffic in Reqable
- Look for the
x-device-code header in API requests
💻 Android Emulator (Nox) — Rooted Method
Requirements
- Rooted Nox emulator
- Reqable configured for HTTPS inspection
- Root Explorer (or similar file manager with root access)
Step-by-Step Instructions
-
1
Setup Nox
- Enable Root access in Nox settings
- Install a file manager with root capabilities (e.g., Root Explorer)
-
2
Prepare Certificate
- Export Reqable's certificate:
- In Reqable:
Settings → SSL Proxying → Export Certificate (.crt)
- Rename to
reqable.pem (lowercase, no spaces)
-
3
Install Certificate
- Copy certificate to Nox's shared folder
- Using Root Explorer, navigate to
/system/etc/security/cacerts/
- Copy
reqable.pem to this location
- Set permissions to
644 (rw-r--r--)
-
4
Configure Proxy
- In Nox, go to Wi-Fi settings
- Long-press your connected network
- Modify network → Advanced options
- Set proxy to Manual
- Enter your computer's IP address and port
8888
-
5
Verify & Capture
- Reboot Nox
- Launch target application
- Monitor traffic in Reqable
- Look for the
x-device-code in request headers
🎮 LDPlayer — Using Reqable
Requirements
- LDPlayer emulator installed
- Reqable for capturing traffic
- Root access in LDPlayer
Step-by-Step Instructions
-
1
Setup LDPlayer
- Install and launch LDPlayer on your computer
- Enable Root access in LDPlayer settings
- Install a file manager with root capabilities
-
2
Configure Reqable
- Set up Reqable as your proxy server
- Enable SSL Proxying in Reqable settings
- Export Reqable's SSL certificate
-
3
Configure Network Settings
- In LDPlayer:
Settings → Network → Modify Wi-Fi
- Set proxy to Manual
- Enter your computer's IP address
- Port:
8888 (default Reqable port)
-
4
Install Certificate
- Import the certificate to LDPlayer's trusted certificate store
- For detailed steps, follow our video guide
-
5
Capture Traffic
- Launch your target app in LDPlayer
- Monitor traffic in Reqable
- Locate the
x-device-code in request headers
📊 Troubleshooting
| Problem |
Solution |
| Certificate not trusted |
Verify installation location and permissions |
| No HTTPS traffic captured |
Check SSL Proxying settings in Reqable |
| Connection errors |
Confirm proxy IP and port configuration |
| App crashes |
Some apps have certificate pinning; try a rooted device |
| Empty headers |
Filter for correct domain in Reqable |
🛡️ Security Notice
This guide is provided for educational purposes and legitimate development testing only. Always:
- Test only on apps you own or have permission to test
- Respect privacy and terms of service
- Never use these techniques for malicious purposes
🚀 Публикация на Cloudflare Pages
Следуйте этой пошаговой инструкции, чтобы разместить этот HTML-документ на Cloudflare Pages.
1
Подготовка проекта
- Создайте папку на вашем компьютере для проекта
- Сохраните этот HTML-документ как
index.html в этой папке
- Если у вас есть дополнительные ресурсы (изображения, CSS, JS), добавьте их в соответствующие подпапки
2
Создание репозитория Git
- Инициализируйте Git репозиторий в этой папке командой
git init
- Добавьте файлы в репозиторий:
git add .
- Создайте коммит:
git commit -m "Первоначальная загрузка"
- Создайте новый репозиторий на GitHub, GitLab или другой Git-платформе
- Свяжите локальный репозиторий с удаленным и отправьте изменения
3
Настройка Cloudflare Pages
- Войдите в панель управления Cloudflare (dash.cloudflare.com)
- Выберите учетную запись и нажмите Pages в боковом меню
- Нажмите кнопку Создать проект
- Выберите опцию Подключить к Git
- Подключите свой репозиторий на GitHub/GitLab, следуя инструкциям
4
Настройка сборки
- Имя проекта: введите желаемое название вашего проекта
- Для статического HTML не требуется настройка сборки:
- Оставьте поле Команда сборки пустым
- В поле Директория публикации введите
/ (корневая директория)
- Нажмите Сохранить и развернуть
5
Дождитесь завершения развертывания
- Cloudflare будет развертывать ваш сайт (обычно это занимает менее минуты)
- После успешного завершения вы получите URL вида
your-project-name.pages.dev
- Нажмите на этот URL или на кнопку Просмотр сайта, чтобы открыть ваш опубликованный сайт
6
Настройка пользовательского домена (опционально)
- В панели управления проектом Pages нажмите на вкладку Пользовательские домены
- Нажмите Настроить домен
- Введите ваш домен и следуйте инструкциям для настройки DNS
- Cloudflare автоматически выдаст SSL-сертификат для вашего домена
7
Обновление сайта
- Для обновления сайта просто внесите изменения в ваш HTML-файл
- Создайте новый коммит:
git commit -am "Обновление контента"
- Отправьте изменения:
git push
- Cloudflare автоматически обнаружит изменения и выполнит новое развертывание
Преимущества Cloudflare Pages:
- Быстрая глобальная CDN-сеть
- Автоматические SSL-сертификаты
- Бесплатный хостинг для личных проектов
- Защита от DDoS-атак
- Неограниченные запросы и пропускная способность
Last updated: April 2025