Can I replace a 3.8V 2900mAh battery with capacitors?
So the goal here is to trick the phone into working without a battery? not to provide useful runtime.

I suspect you will have to do a few things.

First I suspect you will have to pre-charge the capacitor to a voltage that is reasonable for a lithium ion battery. Deeply discharged lithium ion batteries can be dangerous if later recharged, so lithium battery systems will generally have an under-voltage lockout.

Secondly the capacitor will have to be big enough to prevent over or under-voltage swings. Just how big may require some experimentation. IIRC the charge circuits in smartphones are often insufficient to cover peak power demand with the battery being expected to take up the slack.

Thirdly many phone battery packs will have some kind of temperature sensor in them. I suspect you may need to find a way to fake the response from said sensor (in many cases I suspect this will just be a resistor of appropriate value).