User:Rcampbellbassac

From postmarketOS Wiki

Robert M Campbell (Rcampbellbassac)

  • Mastodon: @rcampbellbassac@mastodon.social
  • Signal: +856 20 55 131 261

Owns devices

Device Notes
Google Nexus 5X(lg-bullhead) Working on getting the rest of it working as a learning experience



Notes on The Nexus 5X

I had trouble getting it to work on plasma-mobile, gnome, etc. sxmo was the best I have found so far (and fits my use case well, for the time being, though I want to tackle plasma-mobile at some point).

I started this off as a complete newbie to this kind of stuff, so I had some torubles getting it started, but the postmarketOS community on Matrix helped out a LOT!

First, I went through the standard install procedures. I OEM unlocked, installed TWRP, and then used pmbootstrap to get an Android Recovery ZIP that I would transfer via USB to the Internal storage when in recovery mode. I then booted postmarketOS (pmos) and got the USB networking working...

$ sudo route add default gw 172.16.42.2; echo nameserver 8.8.8.8 | sudo tee /etc/resolv.conf

...and then setup my host computer for IP forwarding. I then SSH'd in, using the credentials and 172.16.42.1 address.

Next, I needed the files to get the WiFi working. I mounted the /dev/disk/by-partlabel/modem device to a folder, and copied the contents to /lib/firmware/postmarketos (I had to sudo mkdir postmarketos the child folder). I then created a /lib/firmware/postmarketos/wlan/qca_cld folder (and subfolder). I needed some additional files there. I got the files located at https://github.com/LineageOS/android_device_lge_bullhead/tree/lineage-16.0/wifi and added them to the /lib/firmware/postmarketos/wlan/qca_cld folder. I then needed to create a MAC address file using nano(vim) called wlan_mac.bin in the /lib/firmware/postmarketos/wlan/qca_cld folder. Inside I placed the contents:

 Intf0MacAddress=8CFDF0XXXXXX 
 Intf1MacAddress=00AA00BB00C2 
 Intf2MacAddress=00AA00BB00C3 
 Intf3MacAddress=00AA00BB00C4 

The 6 X's in the first line will need to be changed to whatever you want. Use https://miniwebtool.com/mac-address-generator/ to generate some. 8CFDF0 is a Qualcomm vendor id. If you don't do this, the device won't initialize, complaining that it can't read the mac from the /lib/firmware/postmarketos/wlan/qca_cld/wlan_mac.bin file.

For your wpa_supplicant configuration file, you will want to reference the settings in the wpa_supplicant_overlay.conf file you got from https://github.com/LineageOS/android_device_lge_bullhead/blob/lineage-16.0/wifi.

In short, add three lines to your /etc/wpa_supplicant/wpa_supplicant.conf...

network={
        ssid="blahblahblah"
        psk=imalittlepskypasswordforyourwifi
        disable_scan_offload=1   ######################
        p2p_disabled=1           #  Add these 3 lines #
        tdls_external_control=1  ######################
}

Once done, you can issue two commands (root) to get your WiFi party started:

$ sudo su
# echo 1 > /dev/wcnss_wlan
# echo sta > /sys/module/wlan/parameters/fwpath
# exit