Skip to content

Enable KML output for coordinate-bearing artifacts#1624

Merged
abrignoni merged 2 commits into
mainfrom
kml-enable-coordinate-artifacts
Jun 26, 2026
Merged

Enable KML output for coordinate-bearing artifacts#1624
abrignoni merged 2 commits into
mainfrom
kml-enable-coordinate-artifacts

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

What

Audited every artifact that reports latitude/longitude and made sure they emit KML. The framework's kmlgen runs only when both are true:

  1. 'kml' is in the artifact's output_types (note: "standard" excludes kml), and
  2. the report has columns named exactly Latitude / Longitude.

38 artifacts had the coordinates but weren't producing KML. This PR fixes them:

35 — output_types only (already had exact Latitude/Longitude columns)

Enabled kml ("standard""all", or appended "kml" to the list). Examples: WhatsApp Messages, Health Workouts, all Apple Maps artifacts, 6× Uber, Threema/Zalo/Potato chats, Booking, Google Maps cache routes, Weather/WorldClock, Withings, life360 Chat, kleinanzeigen, swissmeteo, wire, photosDbexif, allTrails, cacheRoutesGmap, iOSCacheLocations, wifiNetworkStoreModel, foursquare Logs, uberLeveldb.

3 — single coordinate pair under a prefixed name → renamed columns + enabled kml

Artifact Old columns New
appleWifiPlist · WiFi BSS List Location Latitude/Longitude Latitude/Longitude
foursquareSwarm · Activity Feed Venue Latitude/Longitude Latitude/Longitude
uberClient · Uber - Account Latitude (startup)/Longitude (startup) Latitude/Longitude

(All three verified single-pair — no duplicate Latitude column results, so LAVA table creation is unaffected.)

Incidental lint hygiene

CI lints whole changed files, so two touched files needed pre-existing debt cleared:

  • iOSCacheLocations: silence an intentional broad except (disable comment).
  • wifiNetworkStoreModel: reindent tabs → 4 spaces. Logic and SQL unchanged (only whitespace).

Deferred (not in this PR)

  • BeReal "Posts": blocked by a latent bugprocess_bereal_preferences assigns the module globals bereal_user_id/_bereal_processed without a global declaration (the global is misplaced at module level), so they never update. That's a behavioral fix deserving its own review.
  • Photos.sqlite Ph* reference tables (21): multiple coordinate pairs per row (zAsset/zExtAttr/Moment) — no single point to plot.
  • Multi-pair artifacts: Withings Tracked Activities (start/end/center) and Apple Maps Trips (origin/destination) — ambiguous which pair to plot.

Verification

  • AST-driven edits so only the coordinate-bearing function in each multi-artifact file was touched (never its siblings).
  • All 26 changed files: pylint clean (no W/E/F), py_compile OK, structurally-changed modules import, no duplicate artifact names.
  • CRLF line endings preserved on the two CRLF files (foursquareSwarm, iOSCacheLocations).

The framework's kmlgen runs only when 'kml' is in an artifact's output_types
AND its report has columns named exactly 'Latitude'/'Longitude'. An audit of
every coordinate-reporting artifact found many that carry coordinates but were
not emitting KML (most were set to "standard", which excludes kml).

35 artifacts already had exact Latitude/Longitude columns but lacked kml ->
enabled it ("standard"->"all", or appended "kml" to the output_types list).

3 artifacts carried a single coordinate pair under a prefixed column name ->
renamed the report columns to Latitude/Longitude and enabled KML:
  - appleWifiPlist  : WiFi BSS List   (Location Latitude/Longitude)
  - foursquareSwarm : Activity Feed   (Venue Latitude/Longitude)
  - uberClient      : Uber - Account  (Latitude (startup)/Longitude (startup))

Incidental lint hygiene (CI lints whole changed files):
  - iOSCacheLocations  : silence intentional broad-except (disable comment)
  - wifiNetworkStoreModel: reindent tabs->4 spaces (logic and SQL unchanged)

Deferred by design / separate work:
  - BeReal "Posts": blocked by a latent missing-global bug in
    process_bereal_preferences (behavioral fix, handled separately).
  - Photos.sqlite Ph* reference tables: multiple coordinate pairs per row
    (zAsset/zExtAttr/Moment) - no single point to plot.
  - Multi-pair artifacts (Withings Tracked Activities; Apple Maps Trips):
    ambiguous which of several pairs to plot.
Drop cacheRoutesGmap from the KML enablement per request; restore its
output_types to the original 'standard'.
@abrignoni abrignoni merged commit dce0d9f into main Jun 26, 2026
1 check passed
@abrignoni abrignoni deleted the kml-enable-coordinate-artifacts branch June 26, 2026 21:54
pull Bot pushed a commit to itsbrex/iLEAPP that referenced this pull request Jun 26, 2026
The artifact walks the raw $objects array itself, but read files via
get_plist_file_content, which runs nska_deserialize on NSKeyedArchiver plists.
These CachedRoutes archives contain unhashable NSDictionary keys, so the
deserializer floods the log with 'unhashable' warnings -- and it strips the
$objects array this artifact actually needs. Read the raw plist with
plistlib.load instead: no deserializer, no warnings, $objects available as
intended.

Also re-enables KML output (output_types 'all'), which was reverted out of the
KML batch (abrignoni#1624) specifically because of these warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant