i2c slave address cloning

Hello guys !
i am trying to figure out how can i clone an i2c address of a simple ... let say light sensor in order to use it in another circuit ...

the circuit runs by checking if the device has that specific light sensor, if it's another light sensor, the system shuts down.

lets assume that the light sensor is broken and i need to change it but system wont operate if the address of the sensor is different then the one "master" is looking for. So what i want... is to use another sensor and copy the address of the original sensor in order to trick the circuit that the sensor is the original one ... what is the smallest IC or .. Diode or ... whatever SMD that can be I2C programmed to that specific address of that original sensor.
I have a logic analyser, didn;t test it yet, i am just trying to figure out what are my next steps.

program an atmega as I2C Slave and set the address and the registers like the OEM one.
Search for I2C slave Arduino

what is the smallest IC

why does size matter?

When a Arduino is set as I2C Slave, then it used "clock pulse stretching", because the Slave mode is part hardware and part software.
The Master of an existing device does probably not support clock pulse stretching, that means it is not possible.

Perhaps another approach would be to use an Arduino UNO to act as a slave device using the hardware I2C interface and try and emulate the sensor. If you can fool the master into thinking that the Arduino is actually the light sensor, then you could then add in a software I2C implementation to talk to the replacement light sensor behind the scenes as it were.

Depending on the characteristics of the light sensor, maybe a simple analog device like an LDR attached to one of the A2D pins would work.

If you can get that working, then maybe look to a smaller AVR device. You don't need many components to get a 328p up and running.

program an atmega as I2C Slave and set the address and the registers like the OEM one.
Search for I2C slave Arduino

why does size matter?

it matters because it's actually a light sensor and it's inside a mobile phone... i cannot put a atmega or arduino inside it .. so i need something small, this is shitty apple's idea of face id and many other ic's paired together just to limit us from repairing those phones.

For a company that wants to a make something like that and sell millions of it, that is possible. There are chips that can do that and some manufacturers can adapt their chip for a client. A development environment is required and time and money is required to make it work. Apple made it very hard for a reason.

In the Arduino world it is not possible. By the way, Arduino is open source. The Arduino IDE itself is open source, the compiler is open source, the schematics of the boards is open source, the Arduino libraries are open source and the many user libraries on Github is open source. Tell Apple to make a open source phone :wink: