https://wiki.postmarketos.org/api.php?action=feedcontributions&user=Dahrkael&feedformat=atompostmarketOS - User contributions [en]2024-03-28T12:58:24ZUser contributionsMediaWiki 1.39.6https://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=14102Vernee Thor (vernee-k506)2020-09-07T00:02:34Z<p>Dahrkael: added category</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:verne-k506.jpg<br />
| imagecaption = pmOS splash<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = Y<br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
<br />
== SoC features ==<br />
WiFi, Bluetooth, GPS and FM Radio are all integrated into the SoC and need to be initialized all at the same time.<br />
<br />
To do this the proprietary firmware files matching the kernel need to be copied into <code>/lib/firmware/postmarketos</code>.<br />
<br />
<br />
To initialize the chip and drivers MediaTek provides two proprietary programs:<br />
* '''wmt_loader:''' initializes the chip and starts the drivers.<br />
* '''6620_launcher (or connsys_launcher):''' finds and loads the firmware files into their respective chips.<br />
These tools are not officially available outside Android, but there are source code versions available that do work.<br />
<br />
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.<br />
# Execute <code>sudo ./wmt_loader</code> without parameters. ''/dev/wmtDetect'' should appear.<br />
# Execute <code>sudo ./6620_launcher -p /lib/firmware/postmarketos</code>. This program needs to keep running, so better send it to background with <code>&</code>.<br />
<br />
If it worked now there should be a bunch of ''/dev/stp*'' entries and ''/dev/wmtWifi''.<br />
<br />
For debugging use <code>dmesg | grep wmt</code>. Execute <code>sysctl -w kernel.printk=7</code> to improve verbosity.<br />
<br />
'''Caution:''' the phone will crash if '''wmt_loader''' runs twice.<br />
<br />
=== WiFi ===<br />
To get WiFi working first initialize the chip and driver.<br />
# Execute <code>sudo chmod 644 /dev/wmtWifi</code><br />
# Execute <code>sudo echo "1" > /dev/wmtWifi</code><br />
# Check with <code>ifconfig</code> that the interface ''wlan0'' appeared<br />
<br />
To connect to a network:<br />
# Bring the interface up: <code>ifconfig wlan0 up</code><br />
# Scan to find out what WiFi networks are detected: <code>iw dev wlan0 scan</code><br />
# Connect to WPA/WPA2 WiFi network: <code>wpa_passphrase SSID PASS &gt;&gt; /etc/wpa_supplicant/wpa_supplicant.conf</code><br />
# Start wpa_supplicant to connect to the network: <code>wpa_supplicant -B -D nl80211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf</code><br />
# Verify that you are indeed connected to the SSID: <code>iw wlan0 link</code><br />
# Start udhcpc to get an ip address: <code>udhcpc -b -i wlan0</code><br />
<br />
If everything seems fine but theres no network traffic (<code>ping postmarketos.org</code> doesn't work) it probably means the firmware files are not the correct ones.<br />
<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
* {{MR|1439|pmaports}} Initial merge request<br />
* {{MR|1456|pmaports}} Firmware merge request<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}<br />
<br />
[[Category:Mediatek]]</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=13925Vernee Thor (vernee-k506)2020-08-28T20:28:31Z<p>Dahrkael: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:verne-k506.jpg<br />
| imagecaption = pmOS splash<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = Y<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = Y<br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
<br />
== SoC features ==<br />
WiFi, Bluetooth, GPS and FM Radio are all integrated into the SoC and need to be initialized all at the same time.<br />
<br />
To do this the proprietary firmware files matching the kernel need to be copied into <code>/lib/firmware/postmarketos</code>.<br />
<br />
<br />
To initialize the chip and drivers MediaTek provides two proprietary programs:<br />
* '''wmt_loader:''' initializes the chip and starts the drivers.<br />
* '''6620_launcher (or connsys_launcher):''' finds and loads the firmware files into their respective chips.<br />
These tools are not officially available outside Android, but there are source code versions available that do work.<br />
<br />
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.<br />
# Execute <code>sudo ./wmt_loader</code> without parameters. ''/dev/wmtDetect'' should appear.<br />
# Execute <code>sudo ./6620_launcher -p /lib/firmware/postmarketos</code>. This program needs to keep running, so better send it to background with <code>&</code>.<br />
<br />
If it worked now there should be a bunch of ''/dev/stp*'' entries and ''/dev/wmtWifi''.<br />
<br />
For debugging use <code>dmesg | grep wmt</code>. Execute <code>sysctl -w kernel.printk=7</code> to improve verbosity.<br />
<br />
'''Caution:''' the phone will crash if '''wmt_loader''' runs twice.<br />
<br />
=== WiFi ===<br />
To get WiFi working first initialize the chip and driver.<br />
# Execute <code>sudo chmod 644 /dev/wmtWifi</code><br />
# Execute <code>sudo echo "1" > /dev/wmtWifi</code><br />
# Check with <code>ifconfig</code> that the interface ''wlan0'' appeared<br />
<br />
To connect to a network:<br />
# Bring the interface up: <code>ifconfig wlan0 up</code><br />
# Scan to find out what WiFi networks are detected: <code>iw dev wlan0 scan</code><br />
# Connect to WPA/WPA2 WiFi network: <code>wpa_passphrase SSID PASS &gt;&gt; /etc/wpa_supplicant/wpa_supplicant.conf</code><br />
# Start wpa_supplicant to connect to the network: <code>wpa_supplicant -B -D nl80211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf</code><br />
# Verify that you are indeed connected to the SSID: <code>iw wlan0 link</code><br />
# Start udhcpc to get an ip address: <code>udhcpc -b -i wlan0</code><br />
<br />
If everything seems fine but theres no network traffic (<code>ping postmarketos.org</code> doesn't work) it probably means the firmware files are not the correct ones.<br />
<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
* {{MR|1439|pmaports}} Initial merge request<br />
* {{MR|1456|pmaports}} Firmware merge request<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=WiFi&diff=13408WiFi2020-07-29T12:55:53Z<p>Dahrkael: improve mediatek explanation</p>
<hr />
<div>== General information ==<br />
To get wireless LAN working, most WiFi chips need a proprietary firmware blob. While it would be more secure to replace that with open source software in the long term, it isn't feasible right now, so we try to get it working with that closed source firmware.<br /><br />
A great place to start looking for information about many available WiFi chips is [https://wireless.wiki.kernel.org/en/users/drivers this kernel.org page]. It often provides driver sources and the required firmware blobs as well. For a start if you want Internet working try the [[USB Internet]] guide.<br />
<br />
{{note|Instead of mounting Android's firmware partition, we package the files ourselves (see the [[FAQ#Why_don.27t_we_use_firmware_files_from_Android.27s_firmware_partition.3F|FAQ]]).}}<br />
<br />
Useful links:<br />
* [[Firmware|How to find WiFi firmware files]]<br />
* [[Device_specific_package#Proprietary_firmware_or_userland_blobs|How to package WiFi firmware]]<br />
<br />
== Qualcomm WiFi ==<br />
<br />
Devices with Qualcomm WiFi chips are usually very easy to get working. <br />
<br />
You need to find the firmware files for your device, the main file is called <code>wcnss.mdt</code> and there should also be more files which are called <code>wcnss.b00</code>, <code>wcnss.b01</code>, etc. Copy them all onto your device info <code>/lib/firmware/postmarketos</code>.<br />
There may also be files starting with WCNSS, e.g. <code>WCNSS_cfg.dat WCNSS_qcom_cfg.ini WCNSS_qcom_wlan_nv.bin</code> - those should go into <code>/lib/firmware/postmarketos/wlan/prima</code>. You can use existing firmware packages as examples for which files go where, e.g. <code>aports/firmware/firmware-xiaomi-armani</code>.<br />
<br />
Then you can run as root <code>echo 1 > /dev/wcnss_wlan</code> and <code>echo sta > /sys/module/wlan/parameters/fwpath</code>. Check the output of <code>ip link</code> and a <code>wlan0</code> interface should have appeared! Now you can use NetworkManager to [[#Connecting_to_APs|connect to a WiFi]]!<br />
<br />
If that didn't work, please check the [[#Debugging|debugging]] section how to find out what went wrong.<br />
<br />
For packaging, see [[Device_specific_package#Proprietary_firmware_or_userland_blobs|that page]] and add the <code>wcnss-wlan</code> package (which runs the two commands above at boot automatically) as a dependency to the WiFi subpackage.<br />
<br />
Test your packaging by flashing a new rootfs which includes your changes and see if WiFi works without any manual configuration.<br />
<br />
== Broadcom WiFi ==<br />
<br />
{{todo|This section needs expansion.}}<br />
<br />
Devices with Broadcom WiFi chips usually have the path to the firmware hardcoded in the kernel, mostly to <code>/system/vendor/firmware</code>. <br />
<br />
In most cases you should be able to set <code>CONFIG_BCMDHD_FW_PATH</code> and <code>CONFIG_BCMDHD_NVRAM_PATH</code> in the kernel config. In other cases, you need to patch the kernel and change the path to <code>/lib/firmware/postmarketos</code> (see [https://gitlab.com/postmarketOS/pmbootstrap/blob/2fe8eb0fdfa37381d521844b6137c03593279002/aports/linux-samsung-i9070/04_change_dhd_firmware_dir.patch this patch].<br />
<br />
You can use the command <code>git grep "lib/firmware/postmarketos" device/linux-*</code> in pmaports to find how it's done for other devices.<br />
<br />
An example of how Broadcom was made to work can be found at [[Samsung_Galaxy_S_Advance_(samsung-i9070)#How_drebrez_made_wifi_work]] and [https://github.com/postmarketOS/pmbootstrap/pull/138/commits in the corresponding GitHub pull request]. Another example is [[Medion_Lifetab_S9714_(medion-kai)#How_bonsaiblue_made_wifi_work]].<br />
<br />
Here's a quick rundown of the steps required to get Broadcom WiFi up and running:<br />
<br />
* Locate the nvram and firmware files. You might be able to use the ones from <code>firmware-aosp-broadcom-wlan</code>, but if they don't work you can package your own.<br />
* Modify your kernel config to point to the new firmware paths.<br />
* Modify your kernel APKBUILD to build modules, so that you can use bcmdhd.<br />
* Add a modules-load.conf file to your device package and put the bcmdhd module name (usually dhd) in it, then modify the APKBUILD to install the file. (This will auto-load the dhd module on startup.)<br />
<br />
See the [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/device-samsung-i9070 Galaxy S Advance device package], [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/linux-samsung-i9070 Galaxy S Advance linux package] and [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/firmware-samsung-i9070 Galaxy S Advance firmware package] for reference.<br />
<br />
== Mediatek WiFi ==<br />
{{todo|Improve this section to include a general explanation for all MTK SoCs}}<br />
{{note|There is one MediaTek device with WiFi working. [[Vernee_Thor_(vernee-k506)#SoC_features|Vernee Thor Wifi Guide]]}}<br />
<br />
Devices with Mediatek WiFi chips are much more complicated to get working. The best way to know how your specific SoC works is to look at the init.rc scripts from an Android ROM available for your phone and look for the chip initialization (search for "/dev/stp", "mtk_stp" and "wmt").<br />
<br />
On MT6589 devices, there is a tool called <code>6620_launcher</code> which (probably) loads the firmware from the filesystem into the kernel. This tool is a binary included in the Android installation and linked against the bionic libc. There is a [https://github.com/MediaDeb/android_hardware_mediatek/blob/master/combo_tool/src/stp_uart_launcher.c source code version of the tool available] which can be compiled on a normal Linux system. On the [[Fairphone_1_(fairphone-fp1)|Fairphone 1]], the order for initialization should be the following (based on the init.rc files from Android):<br />
<pre><br />
# Install the files mt6628_ant_m1.cfg mt6628_patch_e1_hdr.bin mt6628_patch_e2_0_hdr.bin mt6628_patch_e2_1_hdr.bin WIFI_RAM_CODE_MT6628 WMT.cfg into /system/etc/firmware/ (path could be patched in the kernel sources)<br />
insmod mtk_hif_sdio.ko<br />
insmod mtk_stp_wmt.ko<br />
insmod mtk_stp_uart.ko<br />
insmod mtk_stp_gps.ko<br />
insmod mtk_stp_bt.ko<br />
insmod mtk_wmt_wifi.ko<br />
<br />
mknod /dev/stpwmt c 190 0<br />
mknod /dev/stpgps c 191 0<br />
mknod /dev/stpbt c 192 0<br />
mknod /dev/wmtWifi c 153 0<br />
<br />
insmod wlan_mt6628.ko<br />
<br />
6620_launcher -p /system/etc/firmware/<br />
<br />
echo 1 > /dev/wmtWifi<br />
</pre><br />
<br />
The MediaDeb project has made systemd unit files running more or less the commands above on two of their supported devices:<br />
* wifi_loader.service: runs <code>mt6620_loader.sh</code> (which does <code>mknod</code>) & runs <code>wifi_loader</code> bin<br />
* mt6620_launcher.service: runs 6620_launcher (<code>/usr/sbin/6620_launcher -b 4000000 -p /lib/firmware/ -d /dev/ttyMT2</code>)<br />
* wifi.service: runs <code>echo 1 > /dev/wmtWifi</code><br />
<br />
== Debugging ==<br />
<br />
First check, if the network interface is available by running <code>ip link</code> (<code>wlan0</code> on most phones).<br />
<br />
If the network interface is not listed and you've followed the section for your WiFi chip above, it's most likely an error of missing or misplaced firmware files:<br />
* <code>dmesg</code><br />
* <code>tail /var/log/firmwareload.log</code><br />
<br />
In case you need any more help, just ask in our [[Matrix_and_IRC|Matrix/IRC channel]]!<br />
<br />
== Connecting to APs ==<br />
<br />
=== Using NetworkManager ===<br />
<br />
You can use NetworkManager from the command line either with <code>nmtui</code> (a terminal user interface) or <code>nmcli</code>.<br />
<br />
To use <code>nmtui</code>, just run <code>sudo nmtui</code> in your terminal.<br />
<br />
To use <code>nmcli</code>, you can use the following commands, modified for your use case:<br />
<pre><br />
$ sudo nmcli device wifi list ifname wlan0<br />
$ sudo nmcli device wifi connect "$SSID" password "$PASSWORD" ifname "wlan0"<br />
</pre><br />
<br />
=== Using wpa_supplicant ===<br />
<br />
{{note|In most cases using NetworkManager is preferred! You might need to set your wlan interface to unmanaged in NetworkManager or stop NetworkManager to configure it manually.}}<br />
<br />
postmarketOS currently configures the wpa_supplicant service to start on boot. This service will fail to start unless <code>/etc/wpa_supplicant/wpa_supplicant.conf</code> has been defined. This can be configured using the <code>wpa_passphrase</code> utility:<br />
<br />
<pre>$ wpa_passphrase YOUR_SSID YOUR_PASSPHRASE | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf</pre><br />
<br />
Note: If you are connecting to a hidden wireless network, make sure to add line "scan_ssid=1" after the ssid line in your generated conf file<br />
<br />
Next you'll need to set up the <code>networking</code> service by adding interfaces to <code>/etc/network/interfaces</code>. In some cases, the loopback device may need to precede the wlan interface:<br />
<br />
<pre>auto lo <br />
iface lo inet loopback <br />
auto wlan0 <br />
iface wlan0 inet dhcp</pre><br />
Finally, set the networking service to start on boot:<br />
<br />
<pre>$ sudo rc-update add networking default</pre><br />
Note that on some systems (e.g. the RX51 [this seems not to be required on RX-51 as of 16th May 2018 but YMMV]) you may have to configure wpa_supplicant to use the Linux kernel wireless extensions by editing <code>/etc/conf.d/wpa_supplicant</code>:<br />
<br />
<pre>wpa_supplicant_args=&quot;-Dwext&quot;</pre><br />
You will have to reboot, or manually restart the aforementioned services, before your device will connect to the access point.<br />
<br />
=== Using wpa_supplicant (manually) ===<br />
<br />
If you experience problems or just want to test wifi you can start wpa supplicant (using -Dwext or nl80211 driver) and the dhcp service:<br />
<br />
<pre><br />
sudo wpa_supplicant -u -Dnl80211 -B -c /etc/wpa_supplicant/wpa_supplicant.conf -iwlan0<br />
sudo udhcpc -i wlan0<br />
</pre><br />
<br />
== See also ==<br />
* [[Samsung_Galaxy_S_Advance_(samsung-i9070)#How_drebrez_made_wifi_work|samsung-i9070: How drebrez made wifi work]]<br />
<br />
[[Category:Guide]]</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=WiFi&diff=13404WiFi2020-07-29T10:50:29Z<p>Dahrkael: </p>
<hr />
<div>== General information ==<br />
To get wireless LAN working, most WiFi chips need a proprietary firmware blob. While it would be more secure to replace that with open source software in the long term, it isn't feasible right now, so we try to get it working with that closed source firmware.<br /><br />
A great place to start looking for information about many available WiFi chips is [https://wireless.wiki.kernel.org/en/users/drivers this kernel.org page]. It often provides driver sources and the required firmware blobs as well. For a start if you want Internet working try the [[USB Internet]] guide.<br />
<br />
{{note|Instead of mounting Android's firmware partition, we package the files ourselves (see the [[FAQ#Why_don.27t_we_use_firmware_files_from_Android.27s_firmware_partition.3F|FAQ]]).}}<br />
<br />
Useful links:<br />
* [[Firmware|How to find WiFi firmware files]]<br />
* [[Device_specific_package#Proprietary_firmware_or_userland_blobs|How to package WiFi firmware]]<br />
<br />
== Qualcomm WiFi ==<br />
<br />
Devices with Qualcomm WiFi chips are usually very easy to get working. <br />
<br />
You need to find the firmware files for your device, the main file is called <code>wcnss.mdt</code> and there should also be more files which are called <code>wcnss.b00</code>, <code>wcnss.b01</code>, etc. Copy them all onto your device info <code>/lib/firmware/postmarketos</code>.<br />
There may also be files starting with WCNSS, e.g. <code>WCNSS_cfg.dat WCNSS_qcom_cfg.ini WCNSS_qcom_wlan_nv.bin</code> - those should go into <code>/lib/firmware/postmarketos/wlan/prima</code>. You can use existing firmware packages as examples for which files go where, e.g. <code>aports/firmware/firmware-xiaomi-armani</code>.<br />
<br />
Then you can run as root <code>echo 1 > /dev/wcnss_wlan</code> and <code>echo sta > /sys/module/wlan/parameters/fwpath</code>. Check the output of <code>ip link</code> and a <code>wlan0</code> interface should have appeared! Now you can use NetworkManager to [[#Connecting_to_APs|connect to a WiFi]]!<br />
<br />
If that didn't work, please check the [[#Debugging|debugging]] section how to find out what went wrong.<br />
<br />
For packaging, see [[Device_specific_package#Proprietary_firmware_or_userland_blobs|that page]] and add the <code>wcnss-wlan</code> package (which runs the two commands above at boot automatically) as a dependency to the WiFi subpackage.<br />
<br />
Test your packaging by flashing a new rootfs which includes your changes and see if WiFi works without any manual configuration.<br />
<br />
== Broadcom WiFi ==<br />
<br />
{{todo|This section needs expansion.}}<br />
<br />
Devices with Broadcom WiFi chips usually have the path to the firmware hardcoded in the kernel, mostly to <code>/system/vendor/firmware</code>. <br />
<br />
In most cases you should be able to set <code>CONFIG_BCMDHD_FW_PATH</code> and <code>CONFIG_BCMDHD_NVRAM_PATH</code> in the kernel config. In other cases, you need to patch the kernel and change the path to <code>/lib/firmware/postmarketos</code> (see [https://gitlab.com/postmarketOS/pmbootstrap/blob/2fe8eb0fdfa37381d521844b6137c03593279002/aports/linux-samsung-i9070/04_change_dhd_firmware_dir.patch this patch].<br />
<br />
You can use the command <code>git grep "lib/firmware/postmarketos" device/linux-*</code> in pmaports to find how it's done for other devices.<br />
<br />
An example of how Broadcom was made to work can be found at [[Samsung_Galaxy_S_Advance_(samsung-i9070)#How_drebrez_made_wifi_work]] and [https://github.com/postmarketOS/pmbootstrap/pull/138/commits in the corresponding GitHub pull request]. Another example is [[Medion_Lifetab_S9714_(medion-kai)#How_bonsaiblue_made_wifi_work]].<br />
<br />
Here's a quick rundown of the steps required to get Broadcom WiFi up and running:<br />
<br />
* Locate the nvram and firmware files. You might be able to use the ones from <code>firmware-aosp-broadcom-wlan</code>, but if they don't work you can package your own.<br />
* Modify your kernel config to point to the new firmware paths.<br />
* Modify your kernel APKBUILD to build modules, so that you can use bcmdhd.<br />
* Add a modules-load.conf file to your device package and put the bcmdhd module name (usually dhd) in it, then modify the APKBUILD to install the file. (This will auto-load the dhd module on startup.)<br />
<br />
See the [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/device-samsung-i9070 Galaxy S Advance device package], [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/linux-samsung-i9070 Galaxy S Advance linux package] and [https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/firmware-samsung-i9070 Galaxy S Advance firmware package] for reference.<br />
<br />
== Mediatek WiFi ==<br />
{{todo|Improve this section to include a general explanation for all MTK SoCs}}<br />
{{note|There is one MediaTek device with WiFi working. [[Vernee_Thor_(vernee-k506)#SoC_features|Vernee Thor Wifi Guide]]}}<br />
<br />
Devices with Mediatek WiFi chips are much more complicated to get working. On MT6589 devices, there is a tool called <code>6620_launcher</code> which (probably) loads the firmware from the filesystem into the kernel. This tool is a binary included in the Android installation and linked against the bionic libc. There is a [https://github.com/MediaDeb/android_hardware_mediatek/blob/master/combo_tool/src/stp_uart_launcher.c source code version of the tool available] which can be compiled on a normal Linux system. On the [[Fairphone_1_(fairphone-fp1)|Fairphone 1]], the order for initialization should be the following (based on the init.rc files from Android):<br />
<pre><br />
# Install the files mt6628_ant_m1.cfg mt6628_patch_e1_hdr.bin mt6628_patch_e2_0_hdr.bin mt6628_patch_e2_1_hdr.bin WIFI_RAM_CODE_MT6628 WMT.cfg into /system/etc/firmware/ (path could be patched in the kernel sources)<br />
insmod mtk_hif_sdio.ko<br />
insmod mtk_stp_wmt.ko<br />
insmod mtk_stp_uart.ko<br />
insmod mtk_stp_gps.ko<br />
insmod mtk_stp_bt.ko<br />
insmod mtk_wmt_wifi.ko<br />
<br />
mknod /dev/stpwmt c 190 0<br />
mknod /dev/stpgps c 191 0<br />
mknod /dev/stpbt c 192 0<br />
mknod /dev/wmtWifi c 153 0<br />
<br />
insmod wlan_mt6628.ko<br />
<br />
6620_launcher -p /system/etc/firmware/<br />
<br />
echo 1 > /dev/wmtWifi<br />
</pre><br />
<br />
The MediaDeb project has made systemd unit files running more or less the commands above on two of their supported devices:<br />
* wifi_loader.service: runs <code>mt6620_loader.sh</code> (which does <code>mknod</code>) & runs <code>wifi_loader</code> bin<br />
* mt6620_launcher.service: runs 6620_launcher (<code>/usr/sbin/6620_launcher -b 4000000 -p /lib/firmware/ -d /dev/ttyMT2</code>)<br />
* wifi.service: runs <code>echo 1 > /dev/wmtWifi</code><br />
<br />
== Debugging ==<br />
<br />
First check, if the network interface is available by running <code>ip link</code> (<code>wlan0</code> on most phones).<br />
<br />
If the network interface is not listed and you've followed the section for your WiFi chip above, it's most likely an error of missing or misplaced firmware files:<br />
* <code>dmesg</code><br />
* <code>tail /var/log/firmwareload.log</code><br />
<br />
In case you need any more help, just ask in our [[Matrix_and_IRC|Matrix/IRC channel]]!<br />
<br />
== Connecting to APs ==<br />
<br />
=== Using NetworkManager ===<br />
<br />
You can use NetworkManager from the command line either with <code>nmtui</code> (a terminal user interface) or <code>nmcli</code>.<br />
<br />
To use <code>nmtui</code>, just run <code>sudo nmtui</code> in your terminal.<br />
<br />
To use <code>nmcli</code>, you can use the following commands, modified for your use case:<br />
<pre><br />
$ sudo nmcli device wifi list ifname wlan0<br />
$ sudo nmcli device wifi connect "$SSID" password "$PASSWORD" ifname "wlan0"<br />
</pre><br />
<br />
=== Using wpa_supplicant ===<br />
<br />
{{note|In most cases using NetworkManager is preferred! You might need to set your wlan interface to unmanaged in NetworkManager or stop NetworkManager to configure it manually.}}<br />
<br />
postmarketOS currently configures the wpa_supplicant service to start on boot. This service will fail to start unless <code>/etc/wpa_supplicant/wpa_supplicant.conf</code> has been defined. This can be configured using the <code>wpa_passphrase</code> utility:<br />
<br />
<pre>$ wpa_passphrase YOUR_SSID YOUR_PASSPHRASE | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf</pre><br />
<br />
Note: If you are connecting to a hidden wireless network, make sure to add line "scan_ssid=1" after the ssid line in your generated conf file<br />
<br />
Next you'll need to set up the <code>networking</code> service by adding interfaces to <code>/etc/network/interfaces</code>. In some cases, the loopback device may need to precede the wlan interface:<br />
<br />
<pre>auto lo <br />
iface lo inet loopback <br />
auto wlan0 <br />
iface wlan0 inet dhcp</pre><br />
Finally, set the networking service to start on boot:<br />
<br />
<pre>$ sudo rc-update add networking default</pre><br />
Note that on some systems (e.g. the RX51 [this seems not to be required on RX-51 as of 16th May 2018 but YMMV]) you may have to configure wpa_supplicant to use the Linux kernel wireless extensions by editing <code>/etc/conf.d/wpa_supplicant</code>:<br />
<br />
<pre>wpa_supplicant_args=&quot;-Dwext&quot;</pre><br />
You will have to reboot, or manually restart the aforementioned services, before your device will connect to the access point.<br />
<br />
=== Using wpa_supplicant (manually) ===<br />
<br />
If you experience problems or just want to test wifi you can start wpa supplicant (using -Dwext or nl80211 driver) and the dhcp service:<br />
<br />
<pre><br />
sudo wpa_supplicant -u -Dnl80211 -B -c /etc/wpa_supplicant/wpa_supplicant.conf -iwlan0<br />
sudo udhcpc -i wlan0<br />
</pre><br />
<br />
== See also ==<br />
* [[Samsung_Galaxy_S_Advance_(samsung-i9070)#How_drebrez_made_wifi_work|samsung-i9070: How drebrez made wifi work]]<br />
<br />
[[Category:Guide]]</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=13403Vernee Thor (vernee-k506)2020-07-29T10:46:55Z<p>Dahrkael: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:verne-k506.jpg<br />
| imagecaption = pmOS splash<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = P<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = <br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
<br />
== SoC features ==<br />
WiFi, Bluetooth, GPS and FM Radio are all integrated into the SoC and need to be initialized all at the same time.<br />
<br />
To do this the proprietary firmware files matching the kernel need to be copied into <code>/lib/firmware/postmarketos</code>.<br />
<br />
<br />
To initialize the chip and drivers MediaTek provides two proprietary programs:<br />
* '''wmt_loader:''' initializes the chip and starts the drivers.<br />
* '''6620_launcher (or connsys_launcher):''' finds and loads the firmware files into their respective chips.<br />
These tools are not officially available outside Android, but there are source code versions available that do work.<br />
<br />
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.<br />
# Execute <code>sudo ./wmt_loader</code> without parameters. ''/dev/wmtDetect'' should appear.<br />
# Execute <code>sudo ./6620_launcher -p /lib/firmware/postmarketos</code>. This program needs to keep running, so better send it to background with <code>&</code>.<br />
<br />
If it worked now there should be a bunch of ''/dev/stp*'' entries and ''/dev/wmtWifi''.<br />
<br />
For debugging use <code>dmesg | grep wmt</code>. Execute <code>sysctl -w kernel.printk=7</code> to improve verbosity.<br />
<br />
'''Caution:''' the phone will crash if '''wmt_loader''' runs twice.<br />
<br />
=== WiFi ===<br />
To get WiFi working first initialize the chip and driver.<br />
# Execute <code>sudo chmod 644 /dev/wmtWifi</code><br />
# Execute <code>sudo echo "1" > /dev/wmtWifi</code><br />
# Check with <code>ifconfig</code> that the interface ''wlan0'' appeared<br />
<br />
To connect to a network:<br />
# Bring the interface up: <code>ifconfig wlan0 up</code><br />
# Scan to find out what WiFi networks are detected: <code>iw dev wlan0 scan</code><br />
# Connect to WPA/WPA2 WiFi network: <code>wpa_passphrase SSID PASS &gt;&gt; /etc/wpa_supplicant/wpa_supplicant.conf</code><br />
# Start wpa_supplicant to connect to the network: <code>wpa_supplicant -B -D nl80211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf</code><br />
# Verify that you are indeed connected to the SSID: <code>iw wlan0 link</code><br />
# Start udhcpc to get an ip address: <code>udhcpc -b -i wlan0</code><br />
<br />
If everything seems fine but theres no network traffic (<code>ping postmarketos.org</code> doesn't work) it probably means the firmware files are not the correct ones.<br />
<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
* {{MR|1439|pmaports}} Initial merge request<br />
* {{MR|1456|pmaports}} Firmware merge request<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=13390Vernee Thor (vernee-k506)2020-07-28T19:15:10Z<p>Dahrkael: added SoC initialization and WiFi explanation</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:verne-k506.jpg<br />
| imagecaption = pmOS splash<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = P<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = <br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
<br />
== SoC features ==<br />
WiFi, Bluetooth, GPS and FM Radio are all integrated into the SoC and need to be initialized all at the same time.<br />
<br />
To do this the proprietary firmware files matching the kernel need to be copied into <code>/lib/firmware/postmarketos</code>.<br />
<br />
<br />
To initialize the chip and drivers MediaTek provides two proprietary programs:<br />
* '''wmt_loader:''' initializes the chip and starts the drivers.<br />
* '''6620_launcher (or connsys_launcher):''' finds and loads the firmware files into their respective chips.<br />
These tools are not officially available outside Android, but there are source code versions available that do work.<br />
<br />
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.<br />
# Execute <code>sudo ./wmt_loader</code> without parameters. ''/dev/wmtDetect'' should appear.<br />
# Execute <code>sudo ./6620_launcher -p /lib/firmware/postmarketos</code>. This program needs to keep running, so better send it to background with <code>&</code>.<br />
<br />
If it worked now there should be a bunch of ''/dev/stp*'' entries and ''/dev/wmtWifi''.<br />
<br />
For debugging use <code>dmesg | grep wmt</code>. Execute <code>sysctl -w kernel.printk=7</code> to improve verbosity.<br />
<br />
'''Caution:''' the phone will crash if '''wmt_loader''' runs twice.<br />
<br />
== WiFi ==<br />
To get WiFi working first initialize the chip and driver.<br />
# Execute <code>sudo chmod 644 /dev/wmtWifi</code><br />
# Execute <code>sudo echo "1" > /dev/wmtWifi</code><br />
# Check with <code>ifconfig</code> that the interface ''wlan0'' appeared<br />
<br />
To connect to a network:<br />
# Bring the interface up: <code>ifconfig wlan0 up</code><br />
# Scan to find out what WiFi networks are detected: <code>iw dev wlan0 scan</code><br />
# Connect to WPA/WPA2 WiFi network: <code>wpa_passphrase SSID PASS &gt;&gt; /etc/wpa_supplicant/wpa_supplicant.conf</code><br />
# Start wpa_supplicant to connect to the network: <code>wpa_supplicant -B -D nl80211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf</code><br />
# Verify that you are indeed connected to the SSID: <code>iw wlan0 link</code><br />
# Start udhcpc to get an ip address: <code>udhcpc -b -i wlan0</code><br />
<br />
If everything seems fine but theres no network traffic (<code>ping postmarketos.org</code> doesn't work) it probably means the firmware files are not the correct ones.<br />
<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
* {{MR|1439|pmaports}} Initial merge request<br />
* {{MR|1456|pmaports}} Firmware merge request<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=13388Vernee Thor (vernee-k506)2020-07-28T18:27:28Z<p>Dahrkael: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:verne-k506.jpg<br />
| imagecaption = pmOS splash<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = P<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = <br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
* {{MR|1439|pmaports}} Initial merge request<br />
* {{MR|1456|pmaports}} Firmware merge request<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=13387Vernee Thor (vernee-k506)2020-07-28T17:34:20Z<p>Dahrkael: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:verne-k506.jpg<br />
| imagecaption = pmOS splash<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = <br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
* {{MR|1439|pmaports}} Initial merge request<br />
* {{MR|1456|pmaports}} Firmware merge request<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Device_specific_package&diff=13364Device specific package2020-07-26T18:17:17Z<p>Dahrkael: /* Proprietary firmware or userland blobs */</p>
<hr />
<div>We aim to have ideally only one device specific package. Other packages should be shared between all devices.<br />
<br />
However, in practice, we need an extra package for the kernel (unless the device has been [[The Mainline Kernel|mainlined]]). And sometimes one for device specific [[firmware]] (in theory it is possible to divide these in the firmware files for specific chips, and then share these chip-specific firmware packages across multiple devices, but we're not quite there yet).<br />
<br />
Every device specific package contains at least the [[deviceinfo]] file, and the {{alpine|APKBUILD}}. This article describes special characteristics of the device <code>APKBUILD</code>.<br />
<br />
== Generate a template ==<br />
The recommended way to start with a new device package is using <code>pmbootstrap init</code> and typing in a new device name. But it is also possible to directly call the device package wizard with <code>pmbootstrap aportgen device-changeme-changeme</code> (adjust <i>changeme</i> accordingly).<br />
<br />
== devicepkg-dev ==<br />
In order to share code between the <code>APKBUILD</code>s of these packages, all new device packages depend on a <code>devicepkg-dev</code> package and call its functions inside their <code>APKBUILD</code>s:<br />
<br />
<syntaxhighlight lang="bash"><br />
makedepends="devicepkg-dev"<br />
<br />
build() {<br />
devicepkg_build $startdir $pkgname<br />
}<br />
<br />
package() {<br />
devicepkg_package $startdir $pkgname<br />
}<br />
</syntaxhighlight><br />
<br />
The variables <code>$startdir</code> and <code>$pkgname</code> are always available where they are used, and must be passed to these functions. <code>devicepkg_build</code> and <code>devicepkg_package</code> are simple shell scripts, and they get packaged from [https://gitlab.com/postmarketOS/pmaports/tree/master/main/devicepkg-dev here].<br />
<br />
=== devicepkg_build ===<br />
Optionally creates an udev rule for the device's touch screen, based on the data from the <code>deviceinfo</code>. We can extend this to do more when it makes sense.<br />
<br />
The source code is in [https://gitlab.com/postmarketOS/pmaports/blob/master/main/devicepkg-dev/devicepkg_build.sh devicepkg_build.sh] of the devicepkg-dev pmaport.<br />
<br />
=== devicepkg_package ===<br />
Installs the <code>deviceinfo</code> file (to <code>/etc/deviceinfo</code>) and all other files, that may have been generated during <code>devicepkg_build</code>.<br />
<br />
The source code is in [https://gitlab.com/postmarketOS/pmaports/blob/master/main/devicepkg-dev/devicepkg_package.sh devicepkg_package.sh] of the devicepkg-dev pmaport.<br />
<br />
== Use install_if to pull in packages ==<br />
If your device requires a specific X11 driver for example, it is possible to say: "Install this driver when this device package and Xorg are installed.".<br />
<br />
Here is one example from [https://gitlab.com/postmarketOS/pmaports/tree/master/device/device-qemu-amd64 <code>device-qemu-amd64</code>]:<br />
<syntaxhighlight lang="bash"><br />
subpackages="$pkgname-x11"<br />
<br />
x11() {<br />
install_if="$pkgname xorg-server"<br />
depends="xf86-video-qxl"<br />
mkdir "$subpkgdir"<br />
}<br />
</syntaxhighlight><br />
<br />
We only create the <code>$subpkgdir</code>, because building subpackages fails, when the subpackage folder does not exist. You can add multiple subpackages per package, see {{alpine|APKBUILD_Reference#subpackages}}.<br />
<br />
== Add a device specific config file ==<br />
It might be, that you would like to disable Xweston for your device, because it does not work and then weston does not start. To accomplish this, we will also make use of <code>install_if</code> and a subpackage. But this time we won't pull in another package, but install the config file:<br />
<syntaxhighlight lang="bash"><br />
subpackages="$pkgname-weston"<br />
source="deviceinfo weston.ini"<br />
<br />
weston() {<br />
install_if="$pkgname weston"<br />
install -Dm644 "$srcdir"/weston.ini \<br />
"$subpkgdir"/etc/xdg/weston/weston.ini<br />
}<br />
</syntaxhighlight><br />
<br />
This will only install the custom Weston config, when <code>weston</code> is installed. The <code>$subpkgdir</code> is implicitly created with <code>install -D</code>.<br />
<br />
== Proprietary firmware or userland blobs ==<br />
The actual blobs don't belong into the device package, but into their own package:<br />
* Either a <code>linux-firmware-*</code> package [https://pkgs.alpinelinux.org/packages?name=linux-firmware-*&branch=edge&repo=main&arch=armhf from Alpine]<br />
* Or a <code>firmware-</code> package (for firmware, use another name for userland blobs) from postmarketOS' aports<br />
** check out the existing ones we already have for reference.<br />
<br />
Once you have that package, modify your device package:<br />
* Add <code>$pkgname-nonfree-firmware:nonfree_firmware</code> or <code>$pkgname-nonfree-userland:nonfree_userland</code> to the <code>subpackages=""</code> line<br />
** Do not replace the <code>$pkgname</code> variable.<br />
** If you're packaging both firmware and userland blobs, then add both subpackages.<br />
* Add a block based on the following at the end of your device package's <code>APKBUILD</code>, before the <code>sha512sums</code>.<br />
** Replace <code>nonfree_firmware</code> with <code>nonfree_userland</code> depending on what you're packaging.<br />
** Change <code>firmware-motorola-titan</code> to the blob package that you found/made for your device.<br />
** Adjust the <code>pkgdesc</code> accordingly. It will be shown to the user in <code>pmbootstrap init</code> when deciding how libre they want their postmarketOS installation to be.<br />
** Keep the <code>$subpkgdir</code> variable, that variable exists in this context.<br />
: <syntaxhighlight lang="bash"><br />
nonfree_firmware() {<br />
pkgdesc="Wifi firmware"<br />
depends="firmware-motorola-titan"<br />
mkdir "$subpkgdir"<br />
}<br />
</syntaxhighlight><br />
Update the checksums and rebuild your device package.<br />
<br />
== Multiple kernels ==<br />
This is relevant in case it is possible to boot your device with multiple kernels (most common case is the downstream kernel from the vendor <code>linux-$devicename</code>, and one of the upstream <code>linux-postmarketos-*</code> kernels).<br />
<br />
* Remove the current kernel package from <code>depends</code> of your device's <code>APKBUILD</code><br />
* Add the kernel subpackages and subpackage functions. One example from <code>device-sony-amami</code>:<br />
: <syntaxhighlight lang="bash"><br />
...<br />
subpackages="<br />
$pkgname-kernel-downstream:kernel_downstream<br />
$pkgname-kernel-mainline:kernel_mainline<br />
$pkgname-nonfree-firmware:nonfree_firmware<br />
"<br />
...<br />
kernel_downstream() {<br />
pkgdesc="Display and wifi works (see device table for details)"<br />
depends="linux-sony-amami"<br />
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname<br />
}<br />
<br />
kernel_mainline() {<br />
pkgdesc="For kernel development only (most features aren't working)"<br />
depends="linux-postmarketos-mainline"<br />
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname<br />
}<br />
...<br />
</syntaxhighlight><br />
* Additionally in your <code>deviceinfo</code> file you can use the suffix from your kernel subpackage (e.g. <code>_mainline</code> or <code>_downstream</code>) to limit the variables to one kernel variant in case you need different values. An example:<br />
: <syntaxhighlight lang="bash"><br />
...<br />
deviceinfo_dtb_mainline="qcom-msm8974-fairphone-fp2"<br />
deviceinfo_append_dtb_mainline="true"<br />
...<br />
deviceinfo_bootimg_qcdt_downstream="true"<br />
...<br />
</syntaxhighlight><br />
* Also consider adjusting the dependencies of your device package to not include downstream- or mainline-specific helper packages, such as <code>adsp-audio</code>, <code>wcnss-wlan</code> or <code>msm-modem-downstream</code>. You can use <code>device-fairphone-fp2</code> as an example for that.<br />
* Run <code>pmbootstrap init</code> afterwards to test the change. It should ask you for the kernel now.<br />
* See <code>device-qemu-amd64</code> for another example.<br />
* Implementation details and discussion in {{github|1363}}<br />
<br />
== Initramfs hook ==<br />
Some devices need to run special commands at boot time, for example turning on the display or kicking a watchdog. It is possible to do this with a device specific initramfs hook.<br />
<br />
Create a new <code>initfs-hook.sh</code> file in your device package's dir and fill it with the command that needs to be executed, along with a comment describing what it does:<br />
<syntaxhighlight lang="shell"><br />
#!/bin/sh<br />
<br />
# set usb properties<br />
echo 4 > /sys/devices/platform/android_usb/usb_function_switch<br />
</syntaxhighlight><br />
<br />
Then open the APKBUILD and add <code>initfs-hook.sh</code> to <code>source=</code>.<br />
<br />
As usually, update the checksums, build the package with <code>--force</code> and test the hook on your device.<br />
<br />
=== Notes ===<br />
If you have a modern device-specific APKBUILD (i.e. because you have just generated it), it will use <code>devicepkg_package</code> in <code>package()</code>, which will detect the initfs hook and install it automatically ({{MR|191|pmaports}}). This is the preferred way to do things. Otherwise you would have to copy [https://gitlab.com/postmarketOS/pmaports/blob/0d966c7a6fe92486c5b9b8fe4525fef7f89c3a90/main/devicepkg-dev/devicepkg_package.sh#L30-31 this install command] to the end of your <code>package()</code> function.<br />
<br />
For reference, you can look at the existing initfs-hooks:<br />
<syntaxhighlight lang="shell-session"><br />
$ cd ~/code/pmbootstrap/aports/device<br />
$ find -name initfs-hook.sh<br />
./device-motorola-osprey/initfs-hook.sh<br />
./device-samsung-i9070/initfs-hook.sh<br />
./device-htc-m8/initfs-hook.sh<br />
./device-htc-a5ul/initfs-hook.sh<br />
...<br />
</syntaxhighlight><br />
<br />
== See also ==<br />
* [[deviceinfo]]<br />
* [[vendor kernel specific package]]<br />
<br />
<br />
[[Category:Technical Reference]]</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Device_specific_package&diff=13363Device specific package2020-07-26T18:17:04Z<p>Dahrkael: /* Proprietary firmware or userland blobs */</p>
<hr />
<div>We aim to have ideally only one device specific package. Other packages should be shared between all devices.<br />
<br />
However, in practice, we need an extra package for the kernel (unless the device has been [[The Mainline Kernel|mainlined]]). And sometimes one for device specific [[firmware]] (in theory it is possible to divide these in the firmware files for specific chips, and then share these chip-specific firmware packages across multiple devices, but we're not quite there yet).<br />
<br />
Every device specific package contains at least the [[deviceinfo]] file, and the {{alpine|APKBUILD}}. This article describes special characteristics of the device <code>APKBUILD</code>.<br />
<br />
== Generate a template ==<br />
The recommended way to start with a new device package is using <code>pmbootstrap init</code> and typing in a new device name. But it is also possible to directly call the device package wizard with <code>pmbootstrap aportgen device-changeme-changeme</code> (adjust <i>changeme</i> accordingly).<br />
<br />
== devicepkg-dev ==<br />
In order to share code between the <code>APKBUILD</code>s of these packages, all new device packages depend on a <code>devicepkg-dev</code> package and call its functions inside their <code>APKBUILD</code>s:<br />
<br />
<syntaxhighlight lang="bash"><br />
makedepends="devicepkg-dev"<br />
<br />
build() {<br />
devicepkg_build $startdir $pkgname<br />
}<br />
<br />
package() {<br />
devicepkg_package $startdir $pkgname<br />
}<br />
</syntaxhighlight><br />
<br />
The variables <code>$startdir</code> and <code>$pkgname</code> are always available where they are used, and must be passed to these functions. <code>devicepkg_build</code> and <code>devicepkg_package</code> are simple shell scripts, and they get packaged from [https://gitlab.com/postmarketOS/pmaports/tree/master/main/devicepkg-dev here].<br />
<br />
=== devicepkg_build ===<br />
Optionally creates an udev rule for the device's touch screen, based on the data from the <code>deviceinfo</code>. We can extend this to do more when it makes sense.<br />
<br />
The source code is in [https://gitlab.com/postmarketOS/pmaports/blob/master/main/devicepkg-dev/devicepkg_build.sh devicepkg_build.sh] of the devicepkg-dev pmaport.<br />
<br />
=== devicepkg_package ===<br />
Installs the <code>deviceinfo</code> file (to <code>/etc/deviceinfo</code>) and all other files, that may have been generated during <code>devicepkg_build</code>.<br />
<br />
The source code is in [https://gitlab.com/postmarketOS/pmaports/blob/master/main/devicepkg-dev/devicepkg_package.sh devicepkg_package.sh] of the devicepkg-dev pmaport.<br />
<br />
== Use install_if to pull in packages ==<br />
If your device requires a specific X11 driver for example, it is possible to say: "Install this driver when this device package and Xorg are installed.".<br />
<br />
Here is one example from [https://gitlab.com/postmarketOS/pmaports/tree/master/device/device-qemu-amd64 <code>device-qemu-amd64</code>]:<br />
<syntaxhighlight lang="bash"><br />
subpackages="$pkgname-x11"<br />
<br />
x11() {<br />
install_if="$pkgname xorg-server"<br />
depends="xf86-video-qxl"<br />
mkdir "$subpkgdir"<br />
}<br />
</syntaxhighlight><br />
<br />
We only create the <code>$subpkgdir</code>, because building subpackages fails, when the subpackage folder does not exist. You can add multiple subpackages per package, see {{alpine|APKBUILD_Reference#subpackages}}.<br />
<br />
== Add a device specific config file ==<br />
It might be, that you would like to disable Xweston for your device, because it does not work and then weston does not start. To accomplish this, we will also make use of <code>install_if</code> and a subpackage. But this time we won't pull in another package, but install the config file:<br />
<syntaxhighlight lang="bash"><br />
subpackages="$pkgname-weston"<br />
source="deviceinfo weston.ini"<br />
<br />
weston() {<br />
install_if="$pkgname weston"<br />
install -Dm644 "$srcdir"/weston.ini \<br />
"$subpkgdir"/etc/xdg/weston/weston.ini<br />
}<br />
</syntaxhighlight><br />
<br />
This will only install the custom Weston config, when <code>weston</code> is installed. The <code>$subpkgdir</code> is implicitly created with <code>install -D</code>.<br />
<br />
== Proprietary firmware or userland blobs ==<br />
The actual blobs don't belong into the device package, but into their own package:<br />
* Either a <code>linux-firmware-*</code> package [https://pkgs.alpinelinux.org/packages?name=linux-firmware-*&branch=edge&repo=main&arch=armhf from Alpine]<br />
* Or a <code>firmware-</code> package (for firmware, use another name for userland blobs) from postmarketOS' aports<br />
** check out the existing ones we already have for reference.<br />
<br />
Once you have that package, modify your device package:<br />
* Add <code>$pkgname-nonfree-firmware:nonfree_firmware</code> or <code>$pkgname-nonfree-userland:nonfree_userland</code> to the <code>subpackages=""</code> line<br />
** Do not replace the <code>$pkgname</code> variable.<br />
** If you're packaging both firmware and userland blobs, then add both subpackages.<br />
* Add a block based on the following at the end of your device package's <code>APKBUILD</code>, before the <code>sha512sums</code>.<br />
** Replace <code>nonfree_firmware</code> with <code>nonfree_userland</code> depending on what you're packaging.<br />
** Change <code>firmware-motorola-titan</code> to the blob package that you found/made for your device.<br />
** Adjust the <code>pkgdesc</code> accordingly. It will be shown to the user in <code>pmbootstrap init</code> when deciding how libre they want their postmarketOS installation to be.<br />
** Keep the <code>$subpkgdir</code> variable, that variable exists in this context.<br />
: <syntaxhighlight lang="bash"><br />
nonfree_firmware() {<br />
pkgdesc="Wifi firmware"<br />
depends="firmware-motorola-titan"<br />
mkdir "$subpkgdir"<br />
}<br />
Update the checksums and rebuild your device package.<br />
</syntaxhighlight><br />
<br />
== Multiple kernels ==<br />
This is relevant in case it is possible to boot your device with multiple kernels (most common case is the downstream kernel from the vendor <code>linux-$devicename</code>, and one of the upstream <code>linux-postmarketos-*</code> kernels).<br />
<br />
* Remove the current kernel package from <code>depends</code> of your device's <code>APKBUILD</code><br />
* Add the kernel subpackages and subpackage functions. One example from <code>device-sony-amami</code>:<br />
: <syntaxhighlight lang="bash"><br />
...<br />
subpackages="<br />
$pkgname-kernel-downstream:kernel_downstream<br />
$pkgname-kernel-mainline:kernel_mainline<br />
$pkgname-nonfree-firmware:nonfree_firmware<br />
"<br />
...<br />
kernel_downstream() {<br />
pkgdesc="Display and wifi works (see device table for details)"<br />
depends="linux-sony-amami"<br />
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname<br />
}<br />
<br />
kernel_mainline() {<br />
pkgdesc="For kernel development only (most features aren't working)"<br />
depends="linux-postmarketos-mainline"<br />
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname<br />
}<br />
...<br />
</syntaxhighlight><br />
* Additionally in your <code>deviceinfo</code> file you can use the suffix from your kernel subpackage (e.g. <code>_mainline</code> or <code>_downstream</code>) to limit the variables to one kernel variant in case you need different values. An example:<br />
: <syntaxhighlight lang="bash"><br />
...<br />
deviceinfo_dtb_mainline="qcom-msm8974-fairphone-fp2"<br />
deviceinfo_append_dtb_mainline="true"<br />
...<br />
deviceinfo_bootimg_qcdt_downstream="true"<br />
...<br />
</syntaxhighlight><br />
* Also consider adjusting the dependencies of your device package to not include downstream- or mainline-specific helper packages, such as <code>adsp-audio</code>, <code>wcnss-wlan</code> or <code>msm-modem-downstream</code>. You can use <code>device-fairphone-fp2</code> as an example for that.<br />
* Run <code>pmbootstrap init</code> afterwards to test the change. It should ask you for the kernel now.<br />
* See <code>device-qemu-amd64</code> for another example.<br />
* Implementation details and discussion in {{github|1363}}<br />
<br />
== Initramfs hook ==<br />
Some devices need to run special commands at boot time, for example turning on the display or kicking a watchdog. It is possible to do this with a device specific initramfs hook.<br />
<br />
Create a new <code>initfs-hook.sh</code> file in your device package's dir and fill it with the command that needs to be executed, along with a comment describing what it does:<br />
<syntaxhighlight lang="shell"><br />
#!/bin/sh<br />
<br />
# set usb properties<br />
echo 4 > /sys/devices/platform/android_usb/usb_function_switch<br />
</syntaxhighlight><br />
<br />
Then open the APKBUILD and add <code>initfs-hook.sh</code> to <code>source=</code>.<br />
<br />
As usually, update the checksums, build the package with <code>--force</code> and test the hook on your device.<br />
<br />
=== Notes ===<br />
If you have a modern device-specific APKBUILD (i.e. because you have just generated it), it will use <code>devicepkg_package</code> in <code>package()</code>, which will detect the initfs hook and install it automatically ({{MR|191|pmaports}}). This is the preferred way to do things. Otherwise you would have to copy [https://gitlab.com/postmarketOS/pmaports/blob/0d966c7a6fe92486c5b9b8fe4525fef7f89c3a90/main/devicepkg-dev/devicepkg_package.sh#L30-31 this install command] to the end of your <code>package()</code> function.<br />
<br />
For reference, you can look at the existing initfs-hooks:<br />
<syntaxhighlight lang="shell-session"><br />
$ cd ~/code/pmbootstrap/aports/device<br />
$ find -name initfs-hook.sh<br />
./device-motorola-osprey/initfs-hook.sh<br />
./device-samsung-i9070/initfs-hook.sh<br />
./device-htc-m8/initfs-hook.sh<br />
./device-htc-a5ul/initfs-hook.sh<br />
...<br />
</syntaxhighlight><br />
<br />
== See also ==<br />
* [[deviceinfo]]<br />
* [[vendor kernel specific package]]<br />
<br />
<br />
[[Category:Technical Reference]]</div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=13329Vernee Thor (vernee-k506)2020-07-22T23:10:09Z<p>Dahrkael: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:verne-k506.jpg<br />
| imagecaption = pmOS splash<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = <br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
<!--<br />
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):<br />
* {{MR|CHANGEME|pmaports}} Initial merge request<br />
* {{issue|CHANGEME|pmaports}} Some related issue<br />
--><br />
<!--<br />
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}<br />
--></div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=13328Vernee Thor (vernee-k506)2020-07-22T23:07:38Z<p>Dahrkael: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:verne-k506.jpg<br />
| imagecaption = pmOS splash<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = <br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
<!--<br />
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):<br />
* {{MR|CHANGEME|pmaports}} Initial merge request<br />
* {{issue|CHANGEME|pmaports}} Some related issue<br />
--><br />
<!--<br />
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}<br />
--></div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=File:Verne-k506.jpg&diff=13327File:Verne-k506.jpg2020-07-22T23:06:09Z<p>Dahrkael: </p>
<hr />
<div></div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=13326Vernee Thor (vernee-k506)2020-07-22T23:01:43Z<p>Dahrkael: </p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:verne-k506.jpg<br />
| imagecaption = CHANGE_ME<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = <br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
<!--<br />
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):<br />
* {{MR|CHANGEME|pmaports}} Initial merge request<br />
* {{issue|CHANGEME|pmaports}} Some related issue<br />
--><br />
<!--<br />
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}<br />
--></div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=Vernee_Thor_(vernee-k506)&diff=13325Vernee Thor (vernee-k506)2020-07-22T22:39:46Z<p>Dahrkael: initial entry for vernee-k506</p>
<hr />
<div>{{Infobox device<br />
| manufacturer = Vernee<br />
| name = Thor<br />
| codename = vernee-k506<br />
| image = File:CHANGE_ME_TO_DEVICE_CODENAME.jpg<br />
| imagecaption = CHANGE_ME<br />
| releaseyear = 2016<br />
| originalsoftware = Android 6.0<br />
| chipset = MediaTek MT6753<br />
| cpu = Octa-core Cortex-A53 1.3GHz<br />
| gpu = Mali-T720 MP3<br />
| storage = 16GB<br />
| display = 5" IPS 720x1280<br />
| memory = 3GB<br />
| architecture = aarch64<br />
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) --><br />
| status_usbnet = Y<br />
| status_flashing = P<br />
| status_touch = Y<br />
| status_screen = Y<br />
| status_wifi = N<br />
| status_xwayland = N<br />
| status_fde = <br />
| status_mainline = N<br />
| status_battery = <br />
| status_3d = N<br />
| status_accel = <br />
| status_audio = N<br />
| status_bluetooth = N<br />
| status_camera = N<br />
| status_gps = N<br />
| status_mobiledata = N<br />
| status_sms = N<br />
| status_calls = N<br />
| status = <br />
| booting = yes<br />
| pmoskernel = 3.18.99<br />
<!-- you can also use these lines if you need to:<br />
if the device haven't originally ran Android OS, e.g. Nokia N900<br />
| n-android = ✔<br />
see Unixbench page on wiki<br />
| whet_dhry = 0.0<br />
Is OTG available, not used in wiki<br />
| status_otg = -<br />
--><br />
}}<br />
<br />
== Contributors ==<br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Maintainer(s) ==<br />
<!-- Only if this device doesn't run on linux-postmarketos yet! --><br />
* [[user:Dahrkael|Dahrkael]]<br />
<br />
== Users owning this device ==<br />
{{Device owners}}<br />
<!-- autogenerated, use {{Owns device|devicepage|notes}} on your profile page --><br />
<!-- use _ instead of spaces in device page name, e.g. {{Owns device|HTC_Desire_(htc-bravo)|custom notes}}--><br />
<!-- you may need to purge page cache to see changes (more->purge cache)--><br />
<!-- you can use {{My devices}} on your profile page to show table with all your devices --><br />
<br />
== How to enter flash mode ==<br />
* '''Recovery:''' Power on the device with both {{Button|Power}} and {{Button|Volume Up}} buttons. Then select ''Recovery'' pressing {{Button|Volume Up}} and confirm with {{Button|Volume Down}}.<br />
* '''Fastboot:''' Do the same as for Recovery, but select the ''Fastboot'' option in the menu.<br />
* '''MediaTek Preloader:''' The preloader triggers automatically everytime the phone turns on or reboots.<br />
<br />
== Installation ==<br />
Fastboot doesn't allow flashing on this phone.<br />
<br />
pmOS can be installed either using a ''Recovery ZIP'' through '''TWRP''' or using MediaTek's '''SP Flash Tool'''.<br />
<br />
=== Unlock the bootloader ===<br />
# Enable Developer Mode in Android tapping 5 times the <code>Build Number</code> in <code>Settings -> About Phone</code>.<br />
# Then go to <code>Settings -> Developer Options</code> and tap <code>OEM Unlock</code>.<br />
=== Install using Recovery ZIP ===<br />
Follow the [[Installation_from_recovery_mode|Installation from recovery mode]] guide.<br />
=== Install using SP Flash Tool ===<br />
# Export the pmOS files running <code>pmbootstrap install && pmbootstrap export</code><br />
# Open '''SP Flash Tool'''.<br />
# Select the [https://pastebin.com/aUfY5kPk MT6753 scatter file].<br />
# Asign <code>boot.img-vernee-k506</code> to partition '''boot''' and <code>vernee-k506.img</code> to partition '''system'''<br />
# Click {{Button|Download}} and turn on/restart the phone. It will automatically flash the files.<br />
== See also ==<br />
* [https://www.needrom.com/download/twrp-thor/ TWRP 3.0.2 ROM for Vernee Thor]<br />
<br />
<!--<br />
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):<br />
* {{MR|CHANGEME|pmaports}} Initial merge request<br />
* {{issue|CHANGEME|pmaports}} Some related issue<br />
--><br />
<!--<br />
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.<br />
* {{Device package|vernee-k506}}<br />
* {{Kernel package|vernee-k506}}<br />
--></div>Dahrkaelhttps://wiki.postmarketos.org/index.php?title=User:Dahrkael&diff=13324User:Dahrkael2020-07-22T21:35:23Z<p>Dahrkael: Created page with "<div style="float: right;"> {{User GitLab|Dahrkael}} </div> {{My devices}} {{Owns device|Vernee_Thor_(vernee-k506)}}"</p>
<hr />
<div><div style="float: right;"><br />
{{User GitLab|Dahrkael}}<br />
</div><br />
{{My devices}}<br />
{{Owns device|Vernee_Thor_(vernee-k506)}}</div>Dahrkael