Author Archives: Vladimir Paskov

RJ45 Ethernet Pinout: T-568A and T-568B Crimping Reference

I only need to crimp Ethernet cables once every three or four years, which is just long enough to completely forget the RJ45 wire order every time.

So this post is mainly here as a quick reference for future me.

Use the diagram below for the connector orientation and pin numbering.

RJ45 Ethernet Pinout: T-568A and T-568B Crimping Reference

T-568B
This is the wiring order I normally use:

  1. White/Orange
  2. Orange
  3. White/Green
  4. Blue
  5. White/Blue
  6. Green
  7. White/Brown
  8. Brown

T-568A
For T-568A the green and orange pairs are swapped:

  1. White/Green
  2. Green
  3. White/Orange
  4. Blue
  5. White/Blue
  6. Orange
  7. White/Brown
  8. Brown

Which one should I use?
For a normal Ethernet cable, use the same standard on both ends:

T-568B → T-568B
T-568A → T-568A

I normally use T-568B unless I’m repairing or extending existing cabling that already uses T-568A.

Using T-568A on one end and T-568B on the other creates a crossover cable. Those are rarely necessary anymore because modern Ethernet equipment generally supports Auto MDI-X.

And that’s basically the entire reason this post exists: next time I need to crimp a cable in 2029 or 2030, I don’t have to search for the pinout again.

Old Android Emulator Location UI

Switching Android Emulator to the Old Location UI on GNU/Linux

It appears that the combination of Debian 13, Wayland, KDE 6.3, and NVIDIA drivers causes the new Android Emulator Location UI to break. When you select the Location tab, the map remains blank and the entire interface hangs.

After fiddling with it for a while without success, I found an alternative solution: disabling the new Location UI.

Digging through the Android Emulator source, I found the advancedFeatures.ini configuration file, which allows you to disable the new Location UI and control several other emulator features.

nano ~/.android/advancedFeatures.ini

Add the following line:

LocationUiV2 = off

Then completely close and restart the Android Emulator.

OpenWRT and PPTP VPN

Just a note on configuring OpenWRT and PPTP VPN.

Install:

kmod-nf-nathelper 
kmod-nf-nathelper-extra

NOTE: Those will be removed when you upgrade OpenWRT trough Sysupgrade image, so be sure to install them again after an upgrade.

If this does not fix the issue with PPTP VPN’s not connecting then ssh to the router and create a file: /etc/nftables.d/20-pptp-conntrack-helper.nft with the following content:

chain user_pre_output {
    type filter hook output priority -1; policy accept;
    tcp dport 1723 ct helper set "pptp"
}

and reboot the router.
https://github.com/openwrt/openwrt/issues/13009

P.S: If for some reason OpenWRT forgot to load your firewall rules after sysupgrade

fw4 print > /tmp/fw4.rules
nft -f /tmp/fw4.rules
/etc/init.d/firewall enable
ls -l /etc/rc.d/*firewall*
Debian 13 Trixie Xfce4 desktop

Restore Xfce4 to default settings

I run Debian 13 (Trixie) with KDE (on Wayland) as my daily driver for Android development on a Lenovo ThinkPad P50, with Xfce4 alongside mainly for tinkering. As with everything you tinker with, things tend to break along the way.

Here is a script that will restore Xfce to it’s default desktop settings for the current user.

#!/bin/bash
pkill -KILL xfconfd xfce4-panel xfce4-session xfsettingsd xfdesktop 2>/dev/null || true
 
rm -rf ~/.config/xfce4
rm -rf ~/.cache/xfce4
rm -rf ~/.config/xfconf
rm -rf ~/.cache/sessions
rm -rf ~/.local/share/xfce4
rm -rf ~/.local/share/xfce4-panel

Save it as restore_xfce.sh, and make it executable:

chmod +x restore_xfce.sh

Log out of your Xfce session and switch to a virtual console using Ctrl + Alt + F3, log in with your username and password, and run:

./restore_xfce.sh

Switch back to GUI by pressing Alt + F2 or Alt + F1.

ADB

Launch Android app via ADB using a deep link

adb shell am start -W \
  -n <package_name>/<fully_qualified_activity_name> \
  -a android.intent.action.VIEW \
  -c android.intent.category.BROWSABLE \
  -d "<deep_link>"

-W – Blocks activity manager (am) until the launch is finished (or times out) and then prints timing/status info.
-n – Sets the explicit component to launch. Ex: com.mypackage/com.mypackage.MainActivity.
-a – Sets the intent action.
-c – Sets the intent category.
-d – Sets the intent data. Can be anything that the app is configured to handle. Ex: https://mysite.com?action=1