Login Register

Vida CEM swapping

A mid-size luxury crossover SUV, the Volvo XC90 made its debut in 2002 at the Detroit Motor Show. Recognized for its safety, practicality, and comfort, the XC90 is a popular vehicle around the world. The XC90 proved to be very popular, and very good for Volvo's sales numbers, since its introduction in model year 2003 (North America). P2 platform.
Post Reply
daniel84uk
Posts: 4
Joined: 5 November 2025
Year and Model: 2010 c30
Location: uk
Has thanked: 2 times

Re: Vida CEM swapping

Post by daniel84uk »

vtl wrote: 10 Nov 2025, 05:50
daniel84uk wrote: 08 Nov 2025, 00:37 Firstly, thank you to the creator of the tool and those that contributed.

Anyone have idea why it intially reads the ECU part number correctly to then fails a few minutes later with "unknown cem part number 0" ?

Im assuming my wiring is correct as it initially reads the correct part number 31254749?

My car is facelift 2010 volvo c30 1.6D

using Christian Molson one_pass as suggest for P1 somewhere in this thread
https://github.com/cmolson/volvo-cem-cr ... e/one_pass

Tried in position 0 and position 1.


Im going to experiment more after sleeping :-) maybe try the main branch, and check dice / vida works in 0 person.

Kind regards.
31254749 is what sirloins (Christian) had, it should work. Both CAN buses are wired well? In-car cracking needs both buses to go into programming mode, otherwise the modules will still be sending packets that will interfere with the cracker.
Thank you for your response and all the work you've done.

Its was me, im going blind, id completely missed wire from pin 2 to pin 23! :lol:

Code: Select all

08:49:12.762 -> pin[3] choose candidate: 24
08:49:12.762 -> Candidate PIN 52 01 22 24 -- -- : brute forcing bytes 4 to 5 (2 bytes), will take up to 20 seconds
08:49:12.762 -> Progress: 0%..5%..10%..15%..20%..25%..30%..35%..40%..45%..50%..55%..60%..done
08:49:25.104 -> 
08:49:25.104 -> found PIN: 24 61 52 32 01 22
08:49:25.104 -> PIN is cracked in 816.33 seconds
08:49:25.104 -> Validating PIN
08:49:25.104 -> PIN verified.
08:49:25.104 -> done

All my parts were bought from pihut UK
transceivers used were Waveshare CAN Board (SN65HVD230)

I used USB power only on a lenovo legion 5 and removed the termination resistors on the PCBs, though that might not have been necessary.

Volvo C30 2010
I used
https://github.com/cmolson/volvo-cem-cr ... e/one_pass

Yariy
Posts: 41
Joined: 1 July 2024
Year and Model: XC90
Location: Moskow
Has thanked: 13 times
Been thanked: 10 times

Post by Yariy »

Hello everyone. I am trying to reverse engineer the firmware of the mc9s12 microcontroller in Ghidra. It uses paged memory access. I do not know how to download the firmware in Ghidra. Does anyone have any experience working with these microcontrollers in Ghidra?

dikidera
Posts: 1304
Joined: 15 August 2022
Year and Model: S60 2005
Location: Galaxy far far away
Has thanked: 67 times
Been thanked: 175 times

Post by dikidera »

As Promised, a working, though not feature complete Android VIDA, AI slop, but works.

The link for the compiled APK is https://limewire.com/d/iFyEp#lAbigVwiAT whilst the sources are attached and the python scripts to generate the relevant SQL files from an existing VIDA installation, the files should exist in /sdcard/VIDA (or /storage/emulated/0/VIDA etc).

I will try to upload the already pre-generated database files.

Build using gradle aka .\gradlew assembleDebug and the relevant Android SDK 34

The application has a profile builder much like VIDA Web, a VIN decoder to automatically set the proper data and a DTC browser which enumerates your available ECUs based on your configuration.
Attachments
android-vida.zip
(10.61 MiB) Downloaded 5 times
vida_to_sqlite_dtc_optimized.zip
(12.52 KiB) Downloaded 5 times

gavik  
Posts: 11
Joined: 17 January 2025
Year and Model: 2006 xc90
Location: Belarus
Has thanked: 16 times

Post by gavik »

dikidera wrote: 10 Dec 2025, 14:20 As Promised, a working, though not feature complete Android VIDA

Code: Select all

================================================================================
VIDA SQL Server to SQLite Migration
SIMPLIFIED VERSION - ALL FEATURES ENABLED
================================================================================

Clearing previous output directories...
  Removed: sqlite_migration
  Removed: sql_objects_documentation
  Created fresh output directories
2025-12-13 21:50:02,139 - INFO - ================================================================================
2025-12-13 21:50:02,139 - INFO - VIDA SQL Server to SQLite Migrator (SIMPLIFIED)
2025-12-13 21:50:02,139 - INFO - ALL FEATURES ENABLED - NO OPTIONS
2025-12-13 21:50:02,139 - INFO - Partner Groups: AME, EUR, INT
2025-12-13 21:50:02,139 - INFO - Languages: [19]
2025-12-13 21:50:02,139 - INFO - Output: sqlite_migration
2025-12-13 21:50:02,139 - INFO - Documentation: sql_objects_documentation
2025-12-13 21:50:02,139 - INFO - ================================================================================

================================================================================
STEP 1: Extracting SQL Objects for Documentation
================================================================================

Processing imagerepository...
2025-12-13 21:50:09,367 - INFO -   Stored procedures: 32
2025-12-13 21:50:09,398 - INFO -   Functions: 0
2025-12-13 21:50:09,414 - INFO -   Views: 0
2025-12-13 21:50:09,429 - INFO -   Triggers: 0

================================================================================
STEP 2: Migrating Databases to SQLite
================================================================================
2025-12-13 21:50:09,429 - INFO -
============================================================
2025-12-13 21:50:09,429 - INFO - Migrating database: imagerepository
2025-12-13 21:50:09,429 - INFO - Output: sqlite_migration\imagerepository_sqlite.sql
2025-12-13 21:50:09,429 - INFO - ============================================================
2025-12-13 21:50:09,476 - INFO - Found 8 tables
2025-12-13 21:50:09,476 - INFO - Processing: DBContent
2025-12-13 21:50:10,898 - INFO - Processing: DBSchema
2025-12-13 21:50:11,991 - INFO - Processing: DBStageVersion
2025-12-13 21:50:12,569 - INFO - Processing: dtproperties
2025-12-13 21:50:13,678 - INFO - Processing: GraphicCarConfigs
2025-12-13 21:50:14,834 - INFO - Processing: GraphicFormats
2025-12-13 21:50:14,943 - INFO - Processing: Graphics
2025-12-13 21:50:15,006 - INFO - Processing: LocalizedGraphics
2025-12-13 21:50:15,322 - INFO -   Exported 0 rows from DBContent
2025-12-13 21:50:15,337 - INFO -   Exported 1 rows from DBSchema
2025-12-13 21:50:15,337 - INFO -   Exported 1 rows from DBStageVersion
2025-12-13 21:50:15,352 - INFO -   Exported 7 rows from dtproperties
2025-12-13 21:50:15,352 - INFO -   Exported 0 rows from GraphicCarConfigs
2025-12-13 21:50:15,368 - INFO -   Exported 5 rows from GraphicFormats
2025-12-13 21:50:16,383 - INFO -   Exported 92,693 rows from Graphics
2025-12-13 21:56:34,849 - INFO -   Exported 92,693 rows from LocalizedGraphics
2025-12-13 21:58:35,906 - INFO - Migration complete: sqlite_migration\imagerepository_sqlite.sql
Creating SQLite database: sqlite_migration\imagerepository_sqlite.db
  Executing SQL statements in batches...
SQLite error at statement 100: duplicate column name: fkGraphic
Problematic statement: INSERT INTO "Graphics" ("id", "fkGraphicFormat", "width", "height", "isNavigable", "isLanguageDependent", "isVehicleModel", "isParts") VALUES
  ('0900c8af80054a35', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a3a', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a3c', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a41', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a43', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a43', 2, 34, 34, 0, 0, 0, 0),
  ('0900c8af80054a49', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a49', 2, 34, 34, 0, 0, 0...
FATAL: Failed on imagerepository: duplicate column name: fkGraphic
Hello. Can you tell me why I'm getting this error?

dikidera
Posts: 1304
Joined: 15 August 2022
Year and Model: S60 2005
Location: Galaxy far far away
Has thanked: 67 times
Been thanked: 175 times

Post by dikidera »

gavik wrote: 13 Dec 2025, 12:02
dikidera wrote: 10 Dec 2025, 14:20 As Promised, a working, though not feature complete Android VIDA

Code: Select all

================================================================================
VIDA SQL Server to SQLite Migration
SIMPLIFIED VERSION - ALL FEATURES ENABLED
================================================================================

Clearing previous output directories...
  Removed: sqlite_migration
  Removed: sql_objects_documentation
  Created fresh output directories
2025-12-13 21:50:02,139 - INFO - ================================================================================
2025-12-13 21:50:02,139 - INFO - VIDA SQL Server to SQLite Migrator (SIMPLIFIED)
2025-12-13 21:50:02,139 - INFO - ALL FEATURES ENABLED - NO OPTIONS
2025-12-13 21:50:02,139 - INFO - Partner Groups: AME, EUR, INT
2025-12-13 21:50:02,139 - INFO - Languages: [19]
2025-12-13 21:50:02,139 - INFO - Output: sqlite_migration
2025-12-13 21:50:02,139 - INFO - Documentation: sql_objects_documentation
2025-12-13 21:50:02,139 - INFO - ================================================================================

================================================================================
STEP 1: Extracting SQL Objects for Documentation
================================================================================

Processing imagerepository...
2025-12-13 21:50:09,367 - INFO -   Stored procedures: 32
2025-12-13 21:50:09,398 - INFO -   Functions: 0
2025-12-13 21:50:09,414 - INFO -   Views: 0
2025-12-13 21:50:09,429 - INFO -   Triggers: 0

================================================================================
STEP 2: Migrating Databases to SQLite
================================================================================
2025-12-13 21:50:09,429 - INFO -
============================================================
2025-12-13 21:50:09,429 - INFO - Migrating database: imagerepository
2025-12-13 21:50:09,429 - INFO - Output: sqlite_migration\imagerepository_sqlite.sql
2025-12-13 21:50:09,429 - INFO - ============================================================
2025-12-13 21:50:09,476 - INFO - Found 8 tables
2025-12-13 21:50:09,476 - INFO - Processing: DBContent
2025-12-13 21:50:10,898 - INFO - Processing: DBSchema
2025-12-13 21:50:11,991 - INFO - Processing: DBStageVersion
2025-12-13 21:50:12,569 - INFO - Processing: dtproperties
2025-12-13 21:50:13,678 - INFO - Processing: GraphicCarConfigs
2025-12-13 21:50:14,834 - INFO - Processing: GraphicFormats
2025-12-13 21:50:14,943 - INFO - Processing: Graphics
2025-12-13 21:50:15,006 - INFO - Processing: LocalizedGraphics
2025-12-13 21:50:15,322 - INFO -   Exported 0 rows from DBContent
2025-12-13 21:50:15,337 - INFO -   Exported 1 rows from DBSchema
2025-12-13 21:50:15,337 - INFO -   Exported 1 rows from DBStageVersion
2025-12-13 21:50:15,352 - INFO -   Exported 7 rows from dtproperties
2025-12-13 21:50:15,352 - INFO -   Exported 0 rows from GraphicCarConfigs
2025-12-13 21:50:15,368 - INFO -   Exported 5 rows from GraphicFormats
2025-12-13 21:50:16,383 - INFO -   Exported 92,693 rows from Graphics
2025-12-13 21:56:34,849 - INFO -   Exported 92,693 rows from LocalizedGraphics
2025-12-13 21:58:35,906 - INFO - Migration complete: sqlite_migration\imagerepository_sqlite.sql
Creating SQLite database: sqlite_migration\imagerepository_sqlite.db
  Executing SQL statements in batches...
SQLite error at statement 100: duplicate column name: fkGraphic
Problematic statement: INSERT INTO "Graphics" ("id", "fkGraphicFormat", "width", "height", "isNavigable", "isLanguageDependent", "isVehicleModel", "isParts") VALUES
  ('0900c8af80054a35', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a3a', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a3c', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a41', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a43', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a43', 2, 34, 34, 0, 0, 0, 0),
  ('0900c8af80054a49', 2, 0, 0, 0, 0, 0, 0),
  ('0900c8af80054a49', 2, 34, 34, 0, 0, 0...
FATAL: Failed on imagerepository: duplicate column name: fkGraphic
Hello. Can you tell me why I'm getting this error? Other databases also build with this error.
Modify the file to exclude the imagerepository.

E.g remove everything but basedata, EPC and carcom

databases = [
'basedata', # Vehicle base data - ESSENTIAL
'EPC', # Electronic Parts Catalog - ESSENTIAL
'carcom', # Car communication/diagnostics - ESSENTIAL
'imagerepository', # Images for EPC and service
'DiagSwdlRepository', # Diagnostic software download repository
'DiagSwdlSession', # Diagnostic software download sessions
'DiceTiming' # Diagnostic timing data
]

gavik  
Posts: 11
Joined: 17 January 2025
Year and Model: 2006 xc90
Location: Belarus
Has thanked: 16 times

Post by gavik »

I've already tried this. basedata builds fine, but the others have errors. Could it be related to the language? I only changed it to Russian.

gavik  
Posts: 11
Joined: 17 January 2025
Year and Model: 2006 xc90
Location: Belarus
Has thanked: 16 times

Post by gavik »

It's unlikely to be language related... here's an error when building carcom that's only in English

Code: Select all

    Executed 286300 statements...
SQLite error at statement 286400: unrecognized token: "'Bit 25:

Valeo;
"
Problematic statement: INSERT INTO "T141_Block" ("id", "fkT142_BlockType", "fkT143_BlockDataType", "name", "fkT190_Text", "offset", "length", "exclude", "composite") VALUES
  (6459990, 8, 2, 'Last Lock origin (2nd Latest)', 0, 232, 8, 0, 0),
  (6459991, 45, 50, '1904', 0, 0, 0, 0, 1),
  (6459992, 8, 2, 'LoadCtrlCurrAct', 0, 0, 8, 0, 0),
  (6459993, 5, 50, 'PCM Target ID', 0, 0, 64, 0, 0),
  (6459994, 61, 50, '1902', 0, 0, 0, 0, 1),
  (6459995, 8, 2, 'Front', 0, 0, 16, 0, 0),
  (6459996, 8, 2, 'Bit 25:

Valeo;
...
FATAL: Failed on carcom: unrecognized token: "'Bit 25:

Valeo;

dikidera
Posts: 1304
Joined: 15 August 2022
Year and Model: S60 2005
Location: Galaxy far far away
Has thanked: 67 times
Been thanked: 175 times

Post by dikidera »

vida_to_sqlite_migrator.zip
(7.55 KiB) Downloaded 6 times
The issue is that that particular entry contains a character which messes with the script. The reason this logic was done(by the AI at the time) was to enable query execution in chunks, because it causes sqlite to spaz out. Weirdly, I didn't have this issue at the time.

The new script should work now(at least for that particular issue so only for carcom, basedata and EPC ).

The fix was simple I changed if stripped.endswith(';') to if stripped.endswith(');') (yes, I, not the AI). It was actually fun to think about the problem for once and debug it myself.

t3mp
Posts: 1
Joined: 14 December 2025
Year and Model: 2004 XC90
Location: Bucharest
Has thanked: 7 times

Post by t3mp »

@mechanikas
Hello. If it's actual for you, I'm succesfully used solution you trying to on 3 xc90 2004 CEMs and one s60 2002 CEM.
I had this non-informative timeout message, which has been caused by +5V not connected to Arduino (it's on the smd capacitor on the instruction photo). So check it, or patch Arduino code to bypass +5V check (there are different code blocks for diffrerent arduinos/other boards, choose yours).
Also I'll try today to reimplant 0x400 bytes of data at offset 0x4000 (with PIN and presumably other blocks info) from xc90 2004 CEM dump into s60 2002 CEM with this tool (I'm trying to ressurrect correct functioning of xc90 2004 with fried original CEM (with saved original dump)).

gavik  
Posts: 11
Joined: 17 January 2025
Year and Model: 2006 xc90
Location: Belarus
Has thanked: 16 times

Post by gavik »

dikidera wrote: 13 Dec 2025, 13:33 vida_to_sqlite_migrator.zipThe issue is that that particular entry contains a character which messes with the script. The reason this logic was done(by the AI at the time) was to enable query execution in chunks, because it causes sqlite to spaz out. Weirdly, I didn't have this issue at the time.

The new script should work now(at least for that particular issue so only for carcom, basedata and EPC ).

The fix was simple I changed if stripped.endswith(';') to if stripped.endswith(');') (yes, I, not the AI). It was actually fun to think about the problem for once and debug it myself.
Thanks! The script works great! Now I have a different problem.
Screenshot_2025-12-14-22-10-10-279_com.ford.vcc.vida.android.jpg

Post Reply
  • Similar Topics
    Replies
    Views
    Last post