Vernee Thor (vernee-k506)

== Contributors ==
* Dahrkael
== Users owning this device ==
== How to enter flash mode ==
* Recovery: Power on the device with both and buttons. Then select Recovery pressing and confirm with .
* Fastboot: Do the same as for Recovery, but select the Fastboot option in the menu.
* MediaTek Preloader: The preloader triggers automatically everytime the phone turns on or reboots.
== Installation ==
Fastboot doesn't allow flashing on this phone.
pmOS can be installed either using a Recovery ZIP through TWRP or using MediaTek's SP Flash Tool.
=== Unlock the bootloader ===
# Enable Developer Mode in Android tapping 5 times the Build Number in Settings -> About Phone.
# Then go to Settings -> Developer Options and tap OEM Unlock.
=== Install using Recovery ZIP ===
Follow the Installation from recovery mode guide.
=== Install using SP Flash Tool ===
# Export the pmOS files running pmbootstrap install && pmbootstrap export
# Open SP Flash Tool.
# Select the MT6753 scatter file.
# Asign boot.img-vernee-k506 to partition boot and vernee-k506.img to partition system
# Click and turn on/restart the phone. It will automatically flash the files.
== SoC features ==
WiFi, Bluetooth, GPS and FM Radio are all integrated into the SoC and need to be initialized all at the same time.
To do this the proprietary firmware files matching the kernel need to be copied into /lib/firmware/postmarketos.
To initialize the chip and drivers MediaTek provides two proprietary programs:
* wmt_loader: initializes the chip and starts the drivers.
* 6620_launcher (or connsys_launcher): finds and loads the firmware files into their respective chips.
These tools are not officially available outside Android, but there are source code versions available that do work.
In the case of the Vernee Thor all the required connectivity drivers are compiled into the kernel, so theres no need to load them prior to executing these programs.
# Execute sudo ./wmt_loader without parameters. /dev/wmtDetect should appear.
# Execute sudo ./6620_launcher -p /lib/firmware/postmarketos. This program needs to keep running, so better send it to background with &.
If it worked now there should be a bunch of /dev/stp* entries and /dev/wmtWifi.
For debugging use dmesg | grep wmt. Execute sysctl -w kernel.printk=7 to improve verbosity.
Caution: the phone will crash if wmt_loader runs twice.
=== WiFi ===
To get WiFi working first initialize the chip and driver.
# Execute sudo chmod 644 /dev/wmtWifi
# Execute sudo echo "1" > /dev/wmtWifi
# Check with ifconfig that the interface wlan0 appeared
To connect to a network:
# Bring the interface up: ifconfig wlan0 up
# Scan to find out what WiFi networks are detected: iw dev wlan0 scan
# Connect to WPA/WPA2 WiFi network: wpa_passphrase SSID PASS >> /etc/wpa_supplicant/wpa_supplicant.conf
# Start wpa_supplicant to connect to the network: wpa_supplicant -B -D nl80211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
# Verify that you are indeed connected to the SSID: iw wlan0 link
# Start udhcpc to get an ip address: udhcpc -b -i wlan0
If everything seems fine but theres no network traffic (ping postmarketos.org doesn't work) it probably means the firmware files are not the correct ones.
== See also ==
* TWRP 3.0.2 ROM for Vernee Thor
* Initial merge request
* Firmware merge request
* 
*