[LG Watch Urbane 2] Chanman:
This guide will cover enabling a custom APN to support MVNO's (FreedomPop, Ting, etc) on your LG Urbane 2 for Android Wear 2.0.

Prerequisites:

Root watch (I recommend this thread)

ADB minimal and fastboot

Linux system

A little bit of SQL knowledge

Shoutouts:

zbask - Rooting the LG Urbane 2

majdinj - Dumping ROMs

hoodred - Changing APNs

Enable USB debugging on the watch

- Settings -> System -> About -> keep tapping Build Number until developer options are enabled

- Developer Options -> ADB Debugging

- Connect charger, then connect charger to computer

- Click "OK" on watch face for "Allow Debugging"

Extract /system from watch

The watch uses squashfs for /system, which is a compressed filesystem, and read-only, even if you have root. Therefore, it is not possible to directly make changes to /system through adb. However, we can dump the filesystem to an image, decompress it on a computer, modify it, and put it back on the watch.

Steps:

adb shell
su
ls -al /dev/block/platform/msm_sdcc.1/by-name

msm_sdcc.1 may be different on your watch. look for this line:

lrwxrwxrwx 1 root root 21 1970-01-02 00:25 system -> /dev/block/mmcblk0p27

The watch actually has 1GB or so of internal storage. Let's dump the system file there so we can get it with adb pull.

dd if=/dev/block/mmcblk0p27 of=/sdcard/system.img

Remember to erase this file later, since it's very large and you don't want it taking up all the internal storage on your watch.

Extract telephony database from watch

The watch's telephony database is under /data. On my watch it is /data/user_de/0/com.android.providers.telephony/databases/telephony.db. Your location might vary. I found this by going to root (cd /) and typing

find | grep telephony.db

Since this file is only accessible by root, let's copy it to the sdcard as well so we can get it off.

cp /data/user_de/0/com.android.providers.telephony/databases/telephony.db /sdcard

Copy files to computer

adb pull /sdcard/system.img
adb pull /sdcard/telephony.db

On your Linux computer - modify the telephony database

We're going to put our MVNO APN into the telephony database. The telephony database is a .db file, which is sqlite3. You'll have to install sqlite3 support on your Linux computer.

sudo apt-get install sqlite3
sqlite3 telephony.db

A useful SQLite3 command is

.schema

which shows the table structure.

sqlite> select * from siminfo;
1|890XX_MY_ICC_ID__|0|CARD 1|AT&T|0|-16746133||1|1|310|170|1|1|1|1|4|0|1|1|0|1|0|1
sqlite> select mcc,mnc from siminfo;
310|170

Take note of the MCC and MNC for your SIM card.

In my case, the carrier exists in the telephony database already as AT&T. My MVNO, Freedompop, is on the same MCC and MNC, so I am going to modify the record.

sqlite> select * from carriers where mcc = 310 and mnc = 170;
744|ATT Phone|310170|310|170|phone||||||proxy.mobile.att.net|80|http://mmsc.mobile.att.net|-1|default,mms,supl,fota,hipri|1|IPV4V6|IPV4V6|1|0|0|||-1|0|1|0|0|0|1410|0|1

Your carrier may not exist in the telephony DB. If that's the case, you'll have to insert a record with a SQL command, which is left as an exercise for the reader.

In my case, since the record exists already, just under the wrong name (AT&T), I updated its info:

sqlite> update carriers set name = 'FreedomPop', apn = 'fp.com.attz', mmsproxy = null, mmsport = null, mmsc = null where mcc = 310 and mnc = 170;

On your Linux computer - Decompress system.img

We are going to modify our /system image now. Your Linux system should have the squashfs tools installed. You can usually get these with:

sudo apt-get install squashfs-tools

Put system.img in a directory and decompress it.

sudo unsquashfs system.img

This creates a directory named squashfs-root with the contents of system.img. Modify the file squashfs-root/etc/apns-conf.xml. You will want to add your desired APN information here. You'll need to know your carrier's MCC and MNC. You can get it from the siminfo table in the prior telephony database step or look it up at http://mcc-mnc.com. My carrier is Freedompop, so I inserted this info:

<apn carrier="FreedomPop"
mcc="310"
mnc="170"
apn="fp.com.attz"
type="default,mms,supl,fota,hipri"
protocol="IPV4V6"
roaming_protocol="IPV4V6"
profile_id="0"
modem_cognitive="true"
mtu="1410"
/>

Now that apns-conf.xml is modified, it's time to recompress the file system into system.img so we can flash it back to the watch. First let's get some parameters from the original system.img:

unsquashfs -s system.img

Found a valid SQUASHFS 4:0 superblock on system.img.
Creation or last append time Fri Aug 3 20:22:45 2018
Filesystem size 333522.78 Kbytes (325.71 Mbytes)
Compression lz4
High Compression option specified (-Xhc)
Block size 131072
Filesystem is exportable via NFS
Inodes are compressed
Data is compressed
Fragments are not stored
Xattrs are compressed
Duplicates are not removed
Number of fragments 0
Number of inodes 1475
Number of ids 4

Check the block size and the compression, in this case it's 131072 and lz4. Recompress using that as a parameter:

sudo mksquashfs squashfs-root system-modified.img -comp lz4 -b 131072 -no-fragments -no-duplicates -Xhc

Replace the telephony database on the watch

adb push telephony.db /sdcard/
adb shell
cp /sdcard/telephony.db /data/user_de/0/com.android.providers.telephony/databases/telephony.db
rm /sdcard/telephony.db
rm /sdcard/system.img

Flash your modified system.img

adb reboot bootloader
fastboot flash system system-modified.img

After the watch reboots, you should be able to pick the new APN.

Settings -> Connectivity -> Cellular -> Advanced -> Access Point Names

Congratulations, your watch is now on an MVNO cellular network!