====== Information ======
* [[https://www.oneplus.com/us/6|OnePlus 6]]
* https://en.wikipedia.org/wiki/OnePlus_6
* https://www.oneplus.com/us/6/specs
* https://www.gsmarena.com/oneplus_6-9109.php
* https://wiki.lineageos.org/devices/enchilada/
* [[https://wiki.postmarketos.org/wiki/OnePlus_6_(oneplus-enchilada)]]
* 2024/11/25: LineageOS 21, No Google apps
====== LineageOS ======
* [[https://download.lineageos.org/devices/enchilada/builds|Downloads]]
* [[https://wiki.lineageos.org/devices/enchilada/install|Install Instructions - LOS Wiki]]
* [[https://xdaforums.com/t/rom-official-enchilada-14-lineageos-21.4656607/|LineageOS 21 - XDA Forums]]
====== Recovery ======
* https://community.oneplus.com/thread/1541327
* https://forum.xda-developers.com/t/op6-latest-10-3-7-collection-of-unbrick-tools.3914109/
* :!: If [[#restore|edl]] was ever used instead of Msmdownloadtools: OOS 5.1.11 (with NV param ''*#268#'') -> 9.0.9 OTA -> 11.1.2.2 (TODO: info)
* :!: Above also applies to 5.1.11 with Msmdownloadtools in SMT mode ([[https://xdaforums.com/t/when-msmdownloadtools-upgrade-mode-isnt-enough.3952331/page-3#post-89796453|post]])
* TODO: Update chain for 5 -> 9 -> 11 alongside 10.3.8's
* OOS 10.3.8 -> 11.1.2.2 OTA -> LineageOS
====== HOSTS ======
* https://scripttiger.github.io/alts/compressed/blacklist-fg.txt
* Unified hosts + fakenews + gambling
* Also applies to network-tethered devices
* LineageOS Recovery -> Advanced: Mount/unmount system and Enable ADB
* Expects ''blacklist-fg.txt'' in ''Downloads''
adb shell "mount -o 'rw,remount' '/mnt/system'"
adb push "%UserProfile%\Downloads\blacklist-fg.txt" "/mnt/system/system/etc/hosts"
adb push ~/'Downloads/blacklist-fg.txt' '/mnt/system/system/etc/hosts'
adb shell "restorecon -F -v '/mnt/system/system/etc/hosts'"
adb shell "cat '/mnt/system/system/etc/hosts' && sync"
====== Apps ======
===== F-Droid =====
* [[https://f-droid.org/packages/org.fdroid.basic/|F-Droid Basic]]
* [[https://www.collaboraoffice.com/collabora-office-android-ios/|Collabora Office]] ([[https://www.collaboraoffice.com/wp-content/uploads/2020/10/installing-collabora-office-for-android-via-f-droid-qr-code-300x300.png|QR]])
* [[https://f-droid.org/en/packages/com.kunzisoft.keepass.libre/|KeePassDX]]
* [[https://f-droid.org/en/packages/org.mozilla.fennec_fdroid/|Fennec]] (Firefox)
* [[https://f-droid.org/en/packages/com.fsck.k9/|K-9 Mail]]
* [[https://f-droid.org/en/packages/me.hackerchick.catima/|Catima]]
* [[https://f-droid.org/en/packages/com.foobnix.pro.pdf.reader/|Librera Reader]]
* [[https://f-droid.org/en/packages/software.mdev.bookstracker/|Openreads]]
* [[https://f-droid.org/en/packages/org.videolan.vlc/|VLC]]
* [[https://f-droid.org/en/packages/com.termux/|Termux]]
* [[https://f-droid.org/packages/at.bitfire.davdroid/|DAVx⁵]]
* [[https://f-droid.org/en/packages/org.tasks/|Tasks.org: Open-source To-Do Lists & Reminders]]
* [[https://f-droid.org/en/packages/org.woheller69.omweather/|Cirrus]]
* [[https://f-droid.org/en/packages/com.reecedunn.espeak/|eSpeak]]
* [[https://f-droid.org/en/packages/com.enjoyingfoss.feeel/|Feeel - home workouts]]
* [[https://f-droid.org/en/packages/de.dennisguse.opentracks/|OpenTracks]]
* [[https://f-droid.org/en/packages/net.osmand.plus/|OsmAnd~]]
* [[https://f-droid.org/en/packages/com.omgodse.notally/|Notally | Minimalist Notes]]
* [[https://f-droid.org/en/packages/de.westnordost.streetcomplete/|StreetComplete]]
* [[https://f-droid.org/packages/info.zamojski.soft.towercollector/|Tower Collector]]
* [[https://f-droid.org/en/packages/com.vrem.wifianalyzer/|WiFiAnalyzer]]
* [[https://f-droid.org/en/packages/com.aaronjwood.portauthority/|Port Authority]]
* [[https://f-droid.org/en/packages/com.bobek.compass/|Compass]]
* [[https://f-droid.org/en/packages/com.vonglasow.michael.satstat/|SatStat]]
* [[https://f-droid.org/en/packages/com.karin.idTech4Amm/|idTech4A++]]
===== Other =====
* [[https://a.app.qq.com/o/simple.jsp?pkgname=com.topstep.fitcloudpro|FitCloudPro]]
* [[https://github.com/Piwigo/piwigo-flutter-app/releases|Piwigo Next Generation]]
* [[https://github.com/wordpress-mobile/WordPress-Android/releases|WordPress]] (no Jetpack)
* [[https://apkmody.com/apps/spotify-lite|Spotify Lite MOD]]
===== Smart Stuff =====
==== Meta Quest 2 ====
* Meta Horizon
* ''com.oculus.twilight''
* 293.0.0.21.109
* [[https://www.apkmirror.com/apk/facebook-technologies-llc/oculus-2/#all_versions|APKMirror]]
==== HK28 Smart Watch ====
* FitCloudPro
* ''com.topstep.fitcloudpro''
* 2.4.1
* [[https://a.app.qq.com/o/simple.jsp?pkgname=com.topstep.fitcloudpro|Tencent App Store]]
==== Oral-B Toothbrush ====
* TODO: Model
* Oral-B
* ''com.pg.oralb.oralbapp''
* 10.1.1
* [[https://www.apkmirror.com/apk/pg-health-care/oral-b/#all_versions|APKMirror]]
==== CLABEL Label Maker ====
* https://www.amazon.com/gp/product/B0CR6BMTK3
* Clabel mini
* ''com.ct.clabel.mini''
* 1.8.4
==== OPOWO Humidifier ====
* https://www.amazon.com/gp/product/B0CCVRFMFP
* Tuya Smart
* ''com.tuya.smart''
* 5.18.1
* [[https://www.apkmirror.com/apk/tuya-inc/tuya-smart/#all_versions|APKMirror]]
==== YHW RGB Floor Lamp ====
* https://www.amazon.com/gp/product/B0CHHWJY74
* Surplife
* ''com.zennge.magichome2''
* 1.4.9
====== Settings ======
===== Disable Backup Manager =====
****
adb shell "bmgr transport 'com.android.localtransport/.LocalTransport' && bmgr enable '0' && sync"
===== Private DNS =====
* [[servers:upstream_dns_servers#for_families|1.1.1.1 for Families]], see [[servers:upstream_dns_servers|DNS Servers]] for other addresses
security.cloudflare-dns.com
===== Termux =====
pkg clean && pkg upgrade && sync && exit
termux-change-repo
pkg install 'openssh'
sync && exit
===== Piwigo =====
****
media.realmofespionage.xyz
===== WordPress =====
****
https://blog.realmofespionage.xyz
====== GSF SafetyNet Integrity ======
* https://www.google.com/android/uncertified
* https://docs.waydro.id/faq/google-play-certification
* 2024/11/08: No known-benefit on LineageOS 21
adb shell
sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"
====== ROM Testing ======
===== OxygenOS =====
* OOS
* Provides 60 FPS 1080p/4K video recording, and Certified Play Store status in 2024 for Ingress
* :!: Android 11
* :?: 2024/06: Lock screen with Spotify would flicker oddly, and Google Messages would show a notification for doing background work suspiciously
* :!: 2024/07/21 to 2024/11/10: No longer passes Strong Play Integrity regardless of known EDL or MsmDownloadTool restore methods
===== HydrogenOS =====
* H2OS
* https://forum.xda-developers.com/t/msm-and-latest-ota-for-hydrogen-os-not-oxygen-oos.4619633/
* :!: Seemingly no Android 11
* 2023: No known benefit to use in-general or even as a base for other ROMs since OxygenOS has more up-to-date firmware
* :?: 2024: postmarketOS mentioned somewhere that coming from Android 10 had differences in how GPS performed; does OOS 10 firmware differ from H2OS 10's?
===== LineageOS =====
* https://xdaforums.com/t/rom-official-enchilada-14-lineageos-21.4656607/
* Works great
* MindTheGapps is pretty minimal, but Google is still //grossly// invasive with device-wide permissions
* 2024/06/12: Flashing the latest LOS21 update had Google services breaking left and right; LOS OTAs with Gapps need flashed with in-OS updater tool instead of sideload (TODO: XDA post)
===== DivestOS =====
* https://forum.xda-developers.com/t/divestos.4563495/#post-88942497
* https://divestos.org/pages/devices#device-enchilada
* Documentation is top-notch
* Can re-lock the bootloader, although there's still a boot warning about a different OS ([[https://xdaforums.com/t/divestos.4563495/page-2#post-89400572|useful for verifying hashes]])
* Overall: Great security, but //feels// too locked-down (and LOS weekly update frequency is more fun)
* :!: VoWifi is removed and it's kind of nice when-needed
* :?: OTA update looks odd as it always presents the current update as an update?
===== LineageOS for microG =====
* LOS4mG
* https://lineage.microg.org/
* :!: 2023/09/29: Pokemon GO and Monster Hunter Now don't work with Google sign-in, but Ingress does ([[https://github.com/microg/GmsCore/issues/1979#issuecomment-1715564291|#1979]])
* Only really useful for playing Pokemon GO with a Trainer Club account
* :!: 2024/03/01: Couldn't get Pokemon GO working with a PTC account; possible Play Integrity/SafetyNet changes aren't implemented?
* 2024/02/25: LineageOS officially supports signature spoofing ([[https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/383573|commit]]), but requires GsmCore.apk pushed to priv-app(?) and some mainifest permissions that make base LOS + microG manual not worthwhile
===== Ubuntu Touch =====
* 2023/11/01: The top-rated Radio app in OpenStore didn't play/pause consistently
* :!: 2023/11/01: The top-rated KeePass app in OpenStore didn't open my database
* No fingerprint reader
* :!: 2023/11/01: VLC nor Firefox existed in OpenStore
* Was neat being able to use Waydroid and start up OSRS with seemingly good FPS
===== postmarketOS =====
* :!: VoLTE: https://gitlab.com/postmarketOS/pmaports/-/issues/1878
* [[https://wiki.postmarketos.org/wiki/OnePlus_6_(oneplus-enchilada)]]
* :!: 2023: Apparently limited camera and GPS support
===== Renegade Project =====
* https://forum.xda-developers.com/t/windows-arm64-on-enchilada.4302911/page-3#post-88850523
* https://forum.xda-developers.com/t/definitive-guide-for-windows-10-arm-installation.4519291/
* :!: 2024/02/29: No camera, no GPS, no tri-state button, no cellular calls/texts (no app); not viable for a main phone, but does run WoW Classic ARM64 around 50 FPS pretty well! ([[https://xdaforums.com/t/windows-arm64-on-enchilada.4302911/page-3#post-89371050|XDA tech notes]], [[https://us.forums.blizzard.com/en/wow/t/classic-era-arm64-runs-great-with-project-renegade-and-windows-10-on-oneplus-6/1799276|WoW-specific notes]])
* TODO: GitHub threads about calls/SMS
====== Restore ======
* Last tested: 2024/08/08
===== Prerequisites =====
* [[linux;distros;fedora_kde|Fedora KDE Plasma Desktop]]
===== EDL Tools =====
* https://github.com/bkerler/edl
==== Dependencies ====
* https://github.com/bkerler/edl?tab=readme-ov-file#linux-debianubuntumintetc
sudo dnf install adb fastboot python3-devel python3-pip xz-devel git
==== Download Sources ====
* https://github.com/bkerler/oppo_decrypt
* https://github.com/bkerler/edl
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/bkerler-oppo_decrypt/src' ~/'Projects/bkerler-edl/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/bkerler/oppo_decrypt.git' ~/'Projects/bkerler-oppo_decrypt/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/bkerler/edl.git' ~/'Projects/bkerler-edl/src' && sync
==== Build ====
pip3 install --user --requirement ~/'Projects/bkerler-edl/src/requirements.txt'
cd ~/'Projects/bkerler-edl/src' && python3 ~/'Projects/bkerler-edl/src/setup.py' 'build'
==== udev Rules ====
****
sudo mkdir -p '/etc/udev/rules.d/' && sudo cp ~/'Projects/bkerler-edl/src/Drivers/50-android.rules' ~/'Projects/bkerler-edl/src/Drivers/51-edl.rules' '/etc/udev/rules.d/' && sudo udevadm control --reload
===== Image =====
* :!: 2024/08/08: OOS 5.1.11 needs to be used to workaround NVBackupUI errors ([[https://github.com/bkerler/edl/issues/432#issuecomment-2276870891|comment]])
* :!: TODO: Everything below needs switched to 5.1.11
==== Download ====
* https://forum.xda-developers.com/t/op6-latest-10-3-7-collection-of-unbrick-tools.3914109/
* https://onepluscommunityserver.com/list/Unbrick_Tools/OnePlus_6/Q/OnePlus_6_OxygenOS_10.3.8.zip
wget -O ~/'Downloads/OnePlus_6_OxygenOS_10.3.8.zip' 'https://onepluscommunityserver.com/list/Unbrick_Tools/OnePlus_6/Q/OnePlus_6_OxygenOS_10.3.8.zip'
==== Extract ====
* 1st is OnePlusCommunityServer from above, 2nd is Android File Host ((the archives have different hashes but the ''.ops'' is consistent))
rm -Rf ~/'Downloads/enchilada_22_J.50_210121/'
md5sum ~/'Downloads/OnePlus_6_OxygenOS_10.3.8.zip' | grep 'cac18fdf6e8bc87a17a911ec95d67078' && unzip -qq -b -d ~/'Downloads/' ~/'Downloads/OnePlus_6_OxygenOS_10.3.8.zip' && sync
md5sum ~/'Downloads/enchilada_22_J.50_210121.zip' | grep '279ca4f14f88bd669da3a01585d2770c' && unzip -qq -b -d ~/'Downloads/' ~/'Downloads/enchilada_22_J.50_210121.zip' && sync
ls ~/'Downloads/enchilada_22_J.50_210121/enchilada_22_J.50_210121.ops'
==== Decrypt ====
****
md5sum ~/'Downloads/enchilada_22_J.50_210121/enchilada_22_J.50_210121.ops' | grep '4d11ee9081b9a314cc10aec784f12acd' && python3 ~/'Projects/bkerler-oppo_decrypt/src/opscrypto.py' decrypt ~/'Downloads/enchilada_22_J.50_210121/enchilada_22_J.50_210121.ops' --extractdir='decrypted-ops' && sync
===== Restore XMLs =====
==== Generate ====
* https://github.com/bkerler/edl/issues/432#issuecomment-1848670396
nano ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/op6-restore-patches.py'
with open('settings.xml', 'rt') as f:
xml = f.read()
for intag, outtag, out in (('Program', 'data', 'rawprogram'), ('Patch', 'patches', 'patch')):
for pr in xml.split(f'<{intag}')[1:]:
num, data = pr.split('>', 1)
lines = filter(lambda x: x, map(lambda x: x.strip(), data.split(f'{intag}')[0].split('\n')))
with open(f'{out}{num}.xml', 'wt') as f:
print(f'\n<{outtag}>', file=f)
for line in lines:
print(' ', line, file=f)
print(f'{outtag}>', file=f)
# End
==== Create XMLs ====
****
cd ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/' && python3 ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/op6-restore-patches.py' && sync
===== Restore =====
==== Disable ModemManager ====
****
sudo systemctl disable 'ModemManager' --now
==== Boot to EDL ====
* Power OP6 off
* Hold Vol Up
* Connect data USB cable to PC
* :?: Possibly requires Power button to be held too
==== Fastboot Unlock ====
* Also tests ''edl'' functionality
cd ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/' && ~/'Projects/bkerler-edl/src/edl' modules 'oemunlock' 'enable'
==== Flash ====
* https://github.com/bkerler/edl/issues/432#issuecomment-1848670396
* This does ''edl qfil rawprogram#.xml patch#.xml dir'' for each ''xml'' (there's 6)
* :!: ''0'' and ''4'' take some minutes but the rest are quick/instant
cd ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/' && ~/'Projects/bkerler-edl/src/edl' qfil ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/rawprogram0.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/patch0.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops'
cd ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/' && ~/'Projects/bkerler-edl/src/edl' qfil ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/rawprogram1.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/patch1.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops'
cd ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/' && ~/'Projects/bkerler-edl/src/edl' qfil ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/rawprogram2.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/patch2.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops'
cd ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/' && ~/'Projects/bkerler-edl/src/edl' qfil ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/rawprogram3.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/patch3.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops'
cd ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/' && ~/'Projects/bkerler-edl/src/edl' qfil ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/rawprogram4.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/patch4.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops'
cd ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/' && ~/'Projects/bkerler-edl/src/edl' qfil ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/rawprogram5.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops/patch5.xml' ~/'Downloads/enchilada_22_J.50_210121/decrypted-ops'
==== Reboot ====
****
~/'Projects/bkerler-edl/src/edl' reset
===== Clean-up =====
* TODO
sudo systemctl enable 'ModemManager' --now
===== NVBackupUI Fix =====
* https://github.com/bkerler/edl/issues/432#issuecomment-2268917053