2022
Google Camera and its unholy ports have an option to “Save Location” for photos taken with the app. This adds GPS coordinates to the photo’s EXIF data, making it easier to generate albums by Place. On LineageOS and GrapheneOS this coordinate saving likely won’t work on a fresh install. GCam requires Google Services Framework to start, but uses Google Play Services for location. Google Play Services is probably missing the Location permission “Allow all the time” If you have Google Play Services installed (sandboxed or otherwise), go to Settings > Apps > Google Play Services > Permissions > Location and ensure the permission is Allowed all the time. I’d you’re using MicroG, do the same with the MicroG app. Your photos should now be saved with location data included. There’s likely a good reason why, but on these aftermarket ROMs GPlay Services is not given background location permissions by default. 🤷
My phone’s data plan is 500/MB per month. This low cap makes me think very conservatively about what gets sent across the modem as I’m going about my day. While a good source of information, the OpenStreetMap Wiki is not viewable offline. There is no native app nor a PWA to use. The ZIM files from Kiwix are very outdated (at the time of writing). A clever solution is to retrofit the existing Wikipedia App for Android, which already has a “Save page offline” feature and a very nice interface. It might even be as simple as changing the urls. After all, most Wiki sites share a similar backend and API, called Mediawiki, and I was hoping to hook into this feature. Progress The primary reason for this retrofit’s difficulty is Wikipedia’s different (slightly proprietary) rest API. It isn’t shared with the mediawiki suite. This is outlined very clearly in the API comparison table. OK, so a lot more needs to change for OSM to wriggle its way into this app. ‘Simply’ Changing the URLs I had some promising results after changing the base rest_api URL to the ‘old’ Mediawiki target. Search now works immediately. However, internal pages didn’t work. Each wiki page in the app expects a well formatted summary from the API. I could get around this by changing the request for a /summary to the full /html of that article, and now we’re getting closer. Of course there were some other bugs that needed to be ironed out, but those didn’t seem critical. Mainly CSS and indexing issues. Save to Offline did not work, I’m not sure why yet. What do At this point I’m unsure if retrofitting the Wikipedia app is worth it. Rigging the app enough to do what I want would entail only a few more things: Custom CSS injection to fix the worst of the /html responses. Figure out why Save Offline doesn’t work. I’m working on this now in my little free time. 100% by-the-booke correct To do this properly, and not rigged just enough for Quinn’s phone, we would need way more. All the following: A well-formatted response (or converted response) from the Mediawiki API that is not in a Wiki format nor the ugly HTML. Markdown with inline images would be great. The remainder of the rest_v1 endpoints converted in the App’s RestService.kt and subsequent serializers. Reworking the Save to Offline feature, adapting the new (old) responses to the underlying SQLite schema. I’m not jazzed at those prospects, even less so when you consider keeping up to date with upstream. I’ll continue to try rigging it. My Other Idea for Offline OSM Wiki I’d like to investigate .zim files. How Kiwix packages wikis into openZIM format. If I can do this for OpenStreetMap on a more regular basis. If I can build a slightly nicer app to parse custom .zims. What do .zims know, do they know things? Let’s find out. Relevant links https://github.com/wikimedia/apps-android-wikipedia/blob/dc37d97ec30036a62527fb9896ae2875a12b328f/app/src/main/java/org/wikipedia/dataclient/Service.kt https://wiki.openstreetmap.org/w/api.php?action=help&modules=wbgetentities https://wiki.openstreetmap.org/w/api.php?format=json&formatversion=2&errorformat=html&errorsuselocal=1&action=wbgetentities&titles=Tag:tourism%3Dpicnic_site&sites=wiki https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/Android/App_hacking https://github.com/qcasey/apps-android-wikipedia https://wiki.openstreetmap.org/wiki/Special:Export
2021
My custom build of LineageOS for the OnePlus 7 Pro (Guacamole). These steps are completed in CI/CD once a month. Why? LineageOS is great, but its desire to not rock the corporate boat leaves out several ‘hacks’ that I find very valuable. The main Android repo is here on github, where you can see some of these changes being pulled in. Here are the customizations I make to my phone’s OS: Uses iOS emojis (from AppleColorEmoji). Adds custom apps to /system, such as Lawnchair, Google Photos, and the Play Store. Install the WireGuard kernel backend (This includes my OP7P kernel repo) Enable MicroG, a lightweight privacy focused replacement for Google Play Services. It also enables FDroid as a system app. Patches CTS key attestation. Enables signature spoofing for the Play Store. Enables call recording in the stock dialer. Much of this comes from lineageos4microg. Build Process The main repos I have modified can be found on github: https://github.com/qcasey/android https://github.com/qcasey/android_vendor_partner_gms https://github.com/qcasey/android_kernel_oneplus_sm8150 The repo doing builds in CI is on my gitlab: https://git.quinncasey.com/qcasey/lineageos-patches/-/tree/main Helpful Links KeyStore: Block key attestation for Google Play Services · ProtonAOSP/android_frameworks_base@7f7a9b1 GitHub - LSPosed/LSPosed: LSPosed Framework android_kernel_wireguard - Android ROM directory for WireGuard inclusion GitHub - kdrag0n/safetynet-fix: Universal fix for Google SafetyNet on Android devices with hardware attestation and unlocked bootloaders. Old signature spoofing attempts NanoDroid/DeodexServices.md at master · Nanolx/NanoDroid · GitHub NanoDroid/Issues.md at master · Nanolx/NanoDroid · GitHub How can I pass safety net on Android 11? | XDA Developers Forums Files · 11-attempt · oF2pks / Haystack · GitLab Custom ROM development - Android Kitchen Results LineageOS gets 6hrs screen on time on a 2yo OnePlus 7 pro Works (that I’ve seen not working before) Mobile Data Smooth launcher transitions and task switching (via QuickSwitch) WireGuard via kernel module (root still required) Play Store, signed in within Android Work profile Location services (Google Maps, location EXIF data in Camera) Yubikey / U2F / Fido2 (thanks, ale5000) Doesn’t Work All of these are due to missing APIs in Microg. Google Pay Ebay / other apps’ “Barcode Scanning” feature
2020
An Android App to share your documents with your Paperless server
The display in my car needs to automatically boot when powered. This custom patch should work for many LineageOS devices.