ATTiny project resets when plugging in phone
Most proberbly you have a voltage drop when connecting or disconnecting the phone. You should always add some capacitance between VCC and GND to make the circuit less prone to voltage drops. Try to add two capacitors in parallel: 10uF (electrolytic) and 100nF (ceramic or foil). Mind the polarity of the electrolytic one! If this does not help, try to add more caps in parallel.

And, yes the transistor should have at least a 10 ohm base resistor.

Edit:
For Atmel MCUs, the correct capacitor values can be found in the datasheet or reference designs.

But: Maybe even more important are the parasitics (ESR, equivalent series resistance). Make sure to place a lower-ESR cap (ceramic) as close as possible to the MCU's supply pins. In general, the larger a cap the more ESR it will have. 100nF is a value commonly used close to the supply pins (chip level), whereas 10uF or 4.7uF is commonly used to buffer entire circuit parts (subcircuit level).

For your circuit it is certainly sufficient to add two 100nF in parallel to the power pins.