├── README.md ├── README.ru.md ├── anbox.md ├── checklist.md └── notes.md /README.md: -------------------------------------------------------------------------------- 1 | # Notes and things 2 | 3 | Read everything, on the bottom you will find installation instructions. 4 | [Russian Instruction/Русская иструкция](https://github.com/ubports-oneplus6/documentation/blob/master/README.ru.md) 5 | # Join our discord 6 | 7 | https://discord.gg/haVG9Ga [There are many reasons for joining it](https://imgur.com/a/WM9ZNDc). 8 | 9 | # Port status 10 | 11 | | Component | Status | Details | 12 | |------------------:|:------:|--------------------| 13 | | AppArmor | Y | | 14 | | Boot into UI | Y | | 15 | | Camera | Y | If app crashes after taking photo try switching cameras and turning flash on, and off. | 16 | | Phone Calls | Y | Only works on SIM2, you will have to move your SIM card. | 17 | | Cellular Data | Y | | 18 | | GPS | Y | | 19 | | Sensors | Y | | 20 | | Sound | Y | | 21 | | UBPorts Installer | N | | 22 | | UBPorts Recovery | N | | 23 | | Vibrator | Y | | 24 | | Wi-Fi | Y | Occasionally disconnects while device is sleeping. | 25 | 26 | # Build status 27 | 28 | | Component | Status | 29 | |------------------:|:-------| 30 | | halium-boot.img | [![Build Status](https://oldpc.mrcyjanek.net:443/ci/job/ubports-oneplus6-android_kernel_oneplus_sdm845/badge/icon)](https://oldpc.mrcyjanek.net:443/ci/job/ubports-oneplus6-android_kernel_oneplus_sdm845/) | 31 | 32 | # How to install this OS? 33 | 34 | * [Stock rom, twrp and stuff for fajita (6T)](https://oldpc.mrcyjanek.net/files/:D/Documents/Porting/fajita) [stock 9](https://otafsg1.h2os.com/patch/amazone2/GLO/OnePlus6TOxygen/OnePlus6TOxygen_34.O.24_GLO_024_1909112343/OnePlus6TOxygen_34_OTA_024_all_1909112343_d5b1905.zip) 35 | * [Stock rom for enchilada (6)](https://oldpc.mrcyjanek.net/files/:D/Documents/Porting/enchilada) [stock 9](https://otafsg1.h2os.com/patch/amazone2/GLO/OnePlus6Oxygen/OnePlus6Oxygen_22.O.34_GLO_034_1909112343/OnePlus6Oxygen_22_OTA_034_all_1909112343_dd26.zip) 36 | 37 | # Downloads 38 | Download Ubuntu Touch from https://github.com/ubports-oneplus6/documentation/releases 39 | 40 | Set it going whilst reading the information and instructions below. 41 | 42 | ## Some preliminary information 43 | 44 | The OnePlus 6/T supports a feature known as slots, designed to allow for seamless updates without interrupting the user other than to reboot. Functionally, this means the devices have 2 of all the important system partitions, this is great for us as we can use it to our advantage by installing Android on one and ubuntu touch on the other, allowing users to perform a tethered dual boot - for now switching OS requires a PC. 45 | 46 | This guide if followed correctly will preserve your existing Android system and all your data, allowing you to switch back whenever you please. It also assumes you are currently running some Android 10 based ROM. 47 | 48 | You will need the lates Android tools, they can be fetched from here: https://developer.android.com/studio/releases/platform-tools, on Arch linux `pacman -S android-tools` 49 | 50 | ## Installation instructions 51 | 52 | 1. Downgrade to OOS 9 - this is needed and ubuntu touch doesn't work with Android 10 base 53 | * Download stock OOS 9 for your device from links above, you need `OnePlus6TOxygen_twrp_34_OTA_android_9_Pie.zip`. 54 | * You will unfortunately need 2 different TWRP versions if your wish to dual boot, download the latest for Android 10 - [Enchilada](https://eu.dl.twrp.me/enchilada/twrp-3.4.0-3-enchilada.img.html)/[Fajita](https://dl.twrp.me/fajita/twrp-3.4.0-1-fajita.img.html) and an older version for Android 9 [Enchilada](https://eu.dl.twrp.me/enchilada/twrp-3.3.1-2-enchilada.img.html)/[Fajita](https://dl.twrp.me/fajita/twrp-3.3.1-1-fajita.img.html). 55 | * Power off your device and then turn it on while holding volume up, you should now be on a screen [like this](https://gist.github.com/Jim-Bar/a74dc9f45d049340c2a8576f2bdef701#file-oneplus_6_bootloader-jpg). 56 | * Now boot into TWRP recovery with the command `fastboot boot twrp-3.4.0-3-.img`, once on on the main screen, you should see your phone in `adb devices` on your PC. 57 | * Move OxygenOS 9 zip file to your device with `adb push OnePlus6TOxygen_twrp_34_OTA_android_9_Pie.zip /sdcard` 58 | * In TWRP go to install and choose `OnePlus6TOxygen_twrp_34_OTA_android_9_Pie.zip`. Swipe to confirm flash and wait, it will take a few minutes. Note that this will install it to your other slot, it won't affect whatever Android system you're currently running. 59 | * Once it's done, go to the reboot menu and pick `bootloader`, then hit reboot. You should be in the bootloader - on a black screen with `START` in green letters like before, however you're now on the other slot (the one you just installed Android 9 to). 60 | 2. Flash Ubuntu Touch 61 | * If not already in the bootloader, power off the device and enter it by holding volume up and power. 62 | * Boot into TWRP 3.3 (the one for Andorid 9) with `fastboot boot twrp-3.3.1-.img` 63 | * Copy the Ubuntu Touch installer to the device with `adb push target.zip /sdcard` 64 | * Install it from `install` menu in TWRP. 65 | 3. Flash kernel 66 | * Download kernel from [here](https://github.com/ubports-oneplus6/documentation/releases) 67 | * With the system installed, next is the kernel, from the reboot menu pick `bootloader` again. 68 | * Whilst in the bootloader, run `fastboot flash boot halium-boot.img`. 69 | 4. Choose system from TWRP reboot menu, don't install the TWRP app! 70 | Enjoy your new system 71 | 1734895. Everything should be working now c: 72 | 73 | ## Switching back to Android 74 | * Power off the device, hold volume up and power to enter bootloader mode. 75 | * Run `fastboot getvar current-slot`, this will tell you which slot ubuntu touch is installed to. 76 | * Switch slots, if your current slot is `a` then run `fastboot --set-active=b`, if it's `b` use `--set-active=a`. 77 | * `fastboot reboot` 78 | 79 | The same steps can be used to switch to Ubuntu Touch again. 80 | -------------------------------------------------------------------------------- /README.ru.md: -------------------------------------------------------------------------------- 1 | # Заметки и прочее 2 | 3 | Прочтите все! Ниже вы найдете инструкцию по установке. 4 | [English Instruction/Английская инструкция](https://github.com/ubports-oneplus6/documentation/blob/master/README.md) 5 | # Присоеденяйтесь к нашему Discord-серверу! 6 | 7 | https://discord.gg/haVG9Ga [У нас есть много причин для этого!](https://imgur.com/a/WM9ZNDc). 8 | 9 | # Статус прошивки 10 | 11 | | Компонет | Статус | Детали | 12 | |------------------:|:------:|--------------------| 13 | | AppArmor | Y | | 14 | | Boot into UI | Y | | 15 | | Camera | Y | If app crashes after taking photo try switching cameras and turning flash on, and off. | 16 | | Phone Calls | Y | Only works on SIM2, you will have to move your SIM card. | 17 | | Cellular Data | Y | | 18 | | GPS | Y | | 19 | | Sensors | Y | | 20 | | Sound | Y | | 21 | | UBPorts Installer | N | | 22 | | UBPorts Recovery | N | | 23 | | Vibrator | Y | | 24 | | Wi-Fi | Y | Occasionally disconnects while device is sleeping. | 25 | 26 | # Статус сборки 27 | 28 | | Компонент | Статус | 29 | |------------------:|:-------| 30 | | halium-boot.img | [![Статус сборки](https://oldpc.mrcyjanek.net:443/ci/job/ubports-oneplus6-android_kernel_oneplus_sdm845/badge/icon)](https://oldpc.mrcyjanek.net:443/ci/job/ubports-oneplus6-android_kernel_oneplus_sdm845/) | 31 | 32 | # Как установить данную ОС? 33 | 34 | * [Стоковая прошивка, TWRP и прочие вещи для fajita (6T)](https://oldpc.mrcyjanek.net/files/all/Documents/Porting/fajita) 35 | * [Стоковая прошивка для enchilada (6)](https://oldpc.mrcyjanek.net/files/all/Documents/Porting/enchilada) 36 | 37 | ## Загрузки 38 | Скачать Ubuntu Touch можно отюда: https://oldpc.mrcyjanek.net/ci/job/ubports-gsi-make-flashable-zip/ 39 | Зеркало для более высокой скорости скачивания: https://build.connolly.tech/ubports/ (target.zip) 40 | 41 | Set it going whilst reading the information and instructions below. 42 | 43 | ## Важная информация 44 | 45 | OnePlus 6(T) поддерживает функцию, известную как слоты, предназначенную для обеспечения бесшовных обновлений, не прерывая работу пользователя, кроме перезагрузки. Функционально это означает, что на устройствах есть 2 из всех важных системных разделов, это здорово для нас, так как мы можем использовать это в наших интересах, установив Android на одном и ubuntu touch в другом, что позволяет пользователям выполнять привязанную двойную загрузку - для теперь для переключения ОС требуется ПК. 46 | 47 | Это руководство, если следовать ему правильно, сохранит вашу существующую систему Android и все ваши данные, что позволит вам в любое время переключиться обратно. Также предполагается, что вы в настоящее время используете прошивку на базе Android 10. 48 | 49 | Вам понадобится скачать последние версии Android SDK, их можно получить здесь.: https://developer.android.com/studio/releases/platform-tools, или для Arch Linux `pacman -S android-tools` 50 | 51 | ## Инструкция по устновке 52 | 53 | 1. Откат на OOS 9 - это необходимо, а ubuntu touch не работает с Android 10 54 | * Загрузите стоковую OOS 9 для своего устройства по ссылкам выше, вам нужно `OnePlus6TOxygen_twrp_34_OTA_android_9_Pie.zip`. 55 | * К сожалению, вам понадобятся 2 разные версии TWRP, если вы хотите использовать двойную загрузку, загрузите последнюю версию для Android 10. - [Enchilada](https://eu.dl.twrp.me/enchilada/twrp-3.4.0-3-enchilada.img.html)/[Fajita](https://dl.twrp.me/fajita/twrp-3.4.0-1-fajita.img.html) для более старой версии Android 9 [Enchilada](https://eu.dl.twrp.me/enchilada/twrp-3.3.1-2-enchilada.img.html)/[Fajita](https://dl.twrp.me/fajita/twrp-3.3.1-1-fajita.img.html). 56 | * Выключите устройство, а затем включите его, удерживая увеличение и уменьшение громкости, теперь вы должны быть на экране [Как здесь](https://gist.github.com/Jim-Bar/a74dc9f45d049340c2a8576f2bdef701#file-oneplus_6_bootloader-jpg). 57 | * Теперь загрузитесь в TWRP через FastBoot `fastboot boot twrp-3.4.0-3-.img`, после включения на главном экране вы должны увидеть свой телефон в `adb devices` на вашем ПК. 58 | * Переместите zip-файл OxygenOS 9 на свое устройство с помощью `adb push OnePlus6TOxygen_twrp_34_OTA_android_9_Pie.zip /sdcard` 59 | * В TWRP зайдите в установку и выберите `OnePlus6TOxygen_twrp_34_OTA_android_9_Pie.zip`. Проведите пальцем, чтобы подтвердить установку, и подождите, это займет несколько минут. Обратите внимание, что это установит его в другой слот, это не повлияет на любую систему Android, которую вы сейчас используете. 60 | * Как только это будет сделано, перейдите в меню перезагрузки и выберите `bootloader`, затем перезагрузитесь. Вы должны быть в загрузчике - на черном экране с надписью `START` зелеными буквами, как и раньше, однако теперь вы находитесь в другом слоте (в который вы только что установили Android 9). 61 | 2. Установите Ubuntu Touch 62 | * Если это еще не в загрузчике, выключите устройство и войдите в него, удерживая 2 кнопки громкость и питание. 63 | * Загрузитесь в TWRP 3.3 (тот, что для Andorid 9) через `fastboot boot twrp-3.3.1-.img` 64 | * Скопируйте установщик Ubuntu Touch на устройство через `adb push target.zip /sdcard` 65 | * Установите его из меню `install` в TWRP. 66 | 3. Установите ядро 67 | * Скачайте ядро [отсюда](https://mrcyjanek.net/ci/job/ubports-oneplus6-android_kernel_oneplus_sdm845/) 68 | * После установки системы, идет ядро. Снова в меню перезагрузки выберите «bootloader». 69 | * Находясь в загрузчике, запустите `fastboot flash boot halium-boot.img`. 70 | 4. Выберите систему в меню перезагрузки TWRP, не устанавливайте приложение TWRP! 71 | Наслаждайтесь своей новой системой 72 | 1734895. Теперь все должно работать! c: 73 | 74 | ## Возвращение в Android 75 | * Выключите устройство, удерживайте увеличение и уменьшение громкости, и питание, чтобы войти в режим загрузчика. 76 | * Запустите `fastboot getvar current-slot`, это скажет вам, в какой слот установлен ubuntu touch. 77 | * Переключите слоты, если ваш текущий слот `a` тогда запустите `fastboot --set-active=b`, если `b` выполните `--set-active=a`. 78 | * `fastboot reboot` 79 | 80 | Те же шаги можно использовать для повторного переключения на Ubuntu Touch. 81 | -------------------------------------------------------------------------------- /anbox.md: -------------------------------------------------------------------------------- 1 | # Install the image 2 | 3 | ``` 4 | sudo mount -o rw,remount / 5 | sudo apt update && sudo apt install -y anbox-ubuntu-touch android-tools-adb 6 | mkdir ~/anbox-data 7 | wget http://cdimage.ubports.com/anbox-images/android-armhf-64binder.img -O ~/anbox-data/android.img 8 | touch ~/anbox-data/.enable 9 | sudo chmod -R o+wrx /home/phablet/anbox-data/data 10 | sudo start -q anbox-container 11 | ``` 12 | 13 | # Symlink Android documents to system 14 | 15 | ``` 16 | ln -s ~/anbox-data/data/media/0/Documents ~/Documents/android 17 | ln -s ~/anbox-data/data/media/0/Pictures ~/Pictures/android 18 | ln -s ~/anbox-data/data/media/0/Music ~/Music/android 19 | ln -s ~/anbox-data/data/media/0/Movies ~/Videos/android 20 | ``` 21 | 22 | > **NOTE:** CURRENTLY IN TESTING! You should expect increased battery drain. Networking inside the container doesn't currently work. 23 | 24 | -------------------------------------------------------------------------------- /checklist.md: -------------------------------------------------------------------------------- 1 | Device Checklist 2 | ================ 3 | 4 | This Checklist is a supplement for all porters to be able to inform users in detail about their progress, as well as track their readiness for being added as a community or core device. 5 | 6 | For either qualifying as a community or a core device a corresponding feature set from the list below needs to be confirmed working. The details will be published soon here. 7 | 8 | For the convenience of your users present this list in the following way: 9 | 10 | Working 11 | ------- 12 | 13 | * Actors: Notification LED 14 | * Misc: Anbox patches applied to kernel 15 | * GPU: Boot into UI 16 | * Camera: Flashlight 17 | * Camera: Photo 18 | * Camera: Video 19 | * Camera: Switch between back and front camera 20 | * Bluetooth: Driver loaded at startup 21 | * Bluetooth: Enable/disable and flightmode works 22 | * Bluetooth: Persistent MAC address between reboots 23 | * Bluetooth: Pairing with headset works, volume control ok 24 | * Cellular: Carrier info, signal strength 25 | * Cellular: Data connection 26 | * Cellular: Enable/disable mobile data and flightmode works 27 | * Misc: AppArmor patches applied to kernel 28 | * Misc: Battery percentage 29 | * Misc: Offline charging (Power down, connect USB cable, device should not boot to UT) 30 | * Misc: Online charging (Green charging symbol, percentage increase in stats etc) 31 | * WiFi: Persistent MAC address between reboots 32 | * WiFi: Driver loaded at startup 33 | * WiFi: Enable/disable and flightmode works 34 | * Sensors: Rotation 35 | * Sensors: Touchscreen 36 | * Sound: Earphones detected, volume control 37 | * Sound: Loudspeaker 38 | * Sound: Microphone 39 | * Misc: Shutdown / Reboot 40 | * Sound: Loudspeaker volume control 41 | 42 | 43 | Working with additional steps 44 | ----------------------------- 45 | 46 | * Actors: Torchlight - need https://github.com/ubports/indicator-power/commit/a5d15893826c8e9e9e86b26911fc26ecc912ea3f which isn't in stable yet, deb available here: https://ci.ubports.com/job/ubports/job/indicator-power/job/xenial_-_android9/3/artifact/indicator-power_12.10.8+ubports2+0~20210122175117.3~1.gbp9966c9_arm64.deb just install and reboot 47 | 48 | * Actors: Vibration - waiting for https://github.com/ubports/hfd-service/pull/13 to be merged, can install https://ci.ubports.com/job/hfd-service/job/PR-13/4/artifact/hfd-service_0.1.0+0%7E20210121155028.4%7E1.gbp6bc0ac_arm64.deb 49 | 50 | * Actors: Manual brightness - need erfan repowerd fork 51 | * Sensors: Automatic brightness - same as above 52 | 53 | Not working 54 | ----------- 55 | 56 | Put all working features in under the first headline. Put features where the user needs to to additonal (manual) steps under the second headline. Everything else goes under the third headline. 57 | 58 | Untested 59 | -------- 60 | 61 | * Cellular: Incoming, outgoing calls 62 | * Cellular: MMS in, out 63 | * Cellular: PIN unlock 64 | * Cellular: SMS in, out 65 | * Cellular: Change audio routings 66 | * Cellular: Voice in calls 67 | * Cellular: Switch connection speed between 2G/3G/4G works for all SIMs 68 | * Cellular: Switch preferred SIM for calling and SMS - only for devices that support it 69 | 1234 70 | 71 | * Endurance: Battery lifetime > 24h from 100% 72 | * Endurance: No reboot needed for 1 week 73 | 74 | * GPU: Hardware video decoding 75 | 76 | 77 | * Misc: Recovery image builds and works 78 | * Misc: Reset to factory defaults 79 | * Misc: Date and time are correct after reboot (go to flight mode before) 80 | 81 | * (Network: NFC - disabled atm due to no middleware) 82 | 83 | 84 | * WiFi: Hotspot can be configured, switched on and off, can serve data to clients 85 | 86 | * Sensors: Fingerprint reader, register and use fingerprints (Halium 9.0 only) 87 | * Sensors: GPS 88 | * Sensors: Proximity 89 | 90 | * USB: MTP access 91 | * (USB: ADB access - disabled atm due to no middleware) 92 | * USB: External monitor - only for devices that support it 93 | -------------------------------------------------------------------------------- /notes.md: -------------------------------------------------------------------------------- 1 | # Various notes on porting 2 | 3 | # wlan 4 | 5 | * Sometimes indicator-network starts too early and doesn't detect wlan properly leading to wifi menus not appearing in settings 6 | 7 | The issue with wlan not loading properly (as well as everything else) was firmware parts not being mounted... See [this commit](https://gitlab.com/ubports/community-ports/android9/oneplus-6/oneplus-enchilada-fajita/-/commit/544919b5c02aa6d36ff63cd61ff3d3f3a8e3d2cb). 8 | 9 | # Haptics 10 | 11 | * Maybe need [hfd-service.override?](https://github.com/erfanoabdi/rootfs-builder-debos-android9/blob/android9/android9/overlay/etc/init/hfd-service.override) 12 | 13 | # SIM card stuff 14 | 15 | * Support for [both SIM slots](https://github.com/erfanoabdi/rootfs-builder-debos-android9/commit/9624599beb88a8f7511dd3173175ae04c32151c0) 16 | * [This patch](https://github.com/erfanoabdi/rootfs-builder-debos-android9/commit/715fb34835d3d3676a977ce5ce854c514033670f) might help with mobile data. 17 | 18 | ## Brightness 19 | 20 | * Need [patched repowerd](https://github.com/erfanoabdi/repowerd/commit/afbd490578a252e844b5e8e96b86c325e90b20a9) to use sysfs instead of HAL for brightness control as HAL is broken on op6. 21 | 22 | ## Resizing system image 23 | ```bash 24 | simg2img system.img system.img.raw 25 | resize2fs -f system.img.raw 732160 26 | e2fsck -fy system.img.raw 27 | img2simg system.img.raw system.img.small 28 | ``` 29 | --------------------------------------------------------------------------------