Repairing a bicycle tire almost always means repairing or replacing the flat tire. Leaks or holes in the inflatable rubber tube between the rim and the tire cause deflation. To fix the problem, you have to remove the wheel, remove the tube, repair or replace the tube and put everything back together. It may sound like a lot, but it's an essential technique for any rider, as well as being pretty easy once you get the hang of it.
Steps
Part 1 of 4: Remove the wheel from the bike

Step 1. Use an upright bike stand to raise the wheel as you work
If necessary, you can turn the bike upside down to work on it, just make sure to place a towel or old cloth under the seat and handlebars to prevent scratches.

Step 2. Loosen the wheel axle nuts with a wrench
Use silicone spray or even kitchen spray if the nuts refuse to loosen with just a wrench or ratchet. Some of the newer bike models have much simpler, quick-release wheel locks. In this case, you will only have to open the lock without removing the wheel for now.

Step 3. Disengage the brakes if they hinder removal of the wheel
There are several types of brake mechanisms with different forms of release, but you will often find a quick release on the brake calipers or on the handbrake lever. Sometimes it is necessary to squeeze the brake calipers to disconnect the cable. Check your bike's instruction manual, if you have one, or look on the bike or brake manufacturer's website.

Step 4. Remove the chain if you are removing the rear wheel
You can give the chain more slack by adjusting the gears. Shift until the chain is in the outermost gear on the rear wheel and the innermost gear on the pedal spindle. Pull back on the rear derailleur (which guides the chain during gear changes) to separate the chain from the sprockets (shift disc).

Step 5. Slide the wheel off the bike
All you have to do is guide the front wheel axle, which will have the nuts or lock released at this point, out of the slot in the fork that holds it to the frame. In the case of the rear wheel, however, you should more carefully guide the wheel down and forward (for an upright bike) past the chain and anything else that gets in the way. Keep pulling the rear derailleur back so the chain separates from the wheel.
Part 2 of 4: Remove the damaged inner tube

Step 1. Let the rest of the air escape from the tire
If you have a Presta valve, unscrew the top of the valve stem to release the air. With a Schrader (American) valve, use a thin tool (such as an Allen wrench) to push the plunger into the threaded stem of the valve. For a Dunlop valve, pull on the valve tip after giving the plug a few turns to loosen it.
- Schrader valves are the same as those used in car tires. Presta valves have a nut on the tip and are longer and thinner than Schraders. Dunlop valves are thicker than Prestas, but thinner than Schraders and only have threads near the top.
- Some bicycle wheels use a locking ring to secure the valve stem to the bicycle rim. Unscrew and save this lock ring if your wheel has one.

Step 2. Use a tire lever to separate a portion of the outer tire and the rim from the wheel
You'll need a set of 2 plastic tire levers to complete the job - they're inexpensive and metal alternatives like a spoon or screwdriver can easily damage the wheel. Place a lever between the outer tire and the rim, to separate a part of the tire. Now instead of sitting in the channel on the inside of the rim, this section will be on the outside. Keep the lever locked in place.

Step 3. Take out the rest of the outer tire with the second tire lever
Insert the second lever next to the first, into the space between the rim and the section of the tire that is outside the channel. Keeping one of the levers in place, loop the other around the rim. The outer tire should come out of the channel as you go, almost as if you were unzipping a jacket.

Step 4. Search the gap between the rim and the tire to remove the tube
Separate the tire and rim until you can reach into the opening and grasp the inside of the rubber tube. Put your hand around the wheel and take out the whole camera. Push the valve stem through the rim when you get to it, then pull it up with the rest of the tube.
Part 3 of 4: Patch or Replace the Inner Tube

Step 1. Check for sharp objects on the inside of the tire tread
Wipe your finger or a cloth around the entire channel that the bike's camera rests on when installed. Be careful not to cut yourself, as you could come across a nail or a glass shard. Remove anything that could damage the camera that you are going to repair or replace.
As you do this, inspect the tire as well for cuts or other damage. If you find a cut longer than 1⁄4 inch (6 mm), change the tire instead of trying to repair it

Step 2. Add some air, and use your hearing and sight to find the puncture in the chamber
Pump enough air for the chamber to take its circular shape and then place it close to your ear, one section at a time. If you can't hear the hiss of the leak, submerge the tubing one section at a time in a bucket of water. Keep it still for a few seconds at a time. When you see air bubbles coming out of the chamber, mark the puncture you just found with a marker or some masking tape.
Even if you can see a puncture right away, it's wise to check for more holes or tears

Step 3. Sand, apply, glue and place a patch from the repair kit on the damaged area
Bicycle inner tube repair kits are cheap and very easy and useful to have on hand. Scrape the area around the puncture with the sandpaper included in the kit. Then apply the glue as directed on the kit. Press the patch onto the glue and hold it for as long as the kit indicates. Peel off the plastic covering from the top of the patch to complete the repair. Now, the camera should be like new.
If you've lost the piece of sandpaper from the kit, you can use a rough surface like pavement or even a zipper to scrape off the camera

Step 4. Replace the camera if it is too damaged to be repaired
There is not really a limit to the number of small punctures you can patch in order to reuse the camera. However, very large holes or tears are another matter. If the camera you have removed is visibly broken or shattered, you will simply have to install a new one in the same way that you would install a patched one. Replacement tubes are cheap and easy to carry in a bike backpack.

Step 5. Cut and tie the camera in an emergency situation
You should always have a repair kit and at least one replacement tube in a bike backpack, but all is not lost if you don't have one. You can cut the tube at the puncture site, tie each cut end with a knot, and then tie the two knots together. The rubber tube of the bicycle should be elastic enough to fit on the rim of the wheel. Use it only as a temporary solution.
This is not an ideal solution and should only be done if absolutely necessary. The tire can suddenly fail with this type of repair, which could lead to serious injury

Step 6. Do a short-term repair if you have no other options
Pull up some blades of grass if you don't have a repair kit or replacement tube and the tube is completely broken. Pile as many handfuls of grass as you can between the outer tire and the rim to create a semi-rigid cushion. However, install a suitable camera as soon as possible!
Be careful when driving, as you will not be able to handle the bicycle well when you resort to this type of repair. Also, be aware that this type of fix can damage the wheel
Part 4 of 4: Insert the tube and attach the wheel

Step 1. Add enough air to give the chamber its basic circular shape
It's okay to fill it to about a third or half of its final pressure. This will make it easier to install the tube and less likely to get caught between the outer tire and the rim, causing a tear.

Step 2. Separate the outer tire from the rim and push the inner tube
Pass the valve stem through the hole in the rim to start the process and secure it to the rim with the lock ring, if equipped. Then carefully push the tube into place around the wheel. Check often to make sure the camera isn't crooked or sticking out anywhere.

Step 3. Pull and push the outer tire back into place on the rim
Once you've installed the inner tube, insert one section of the tire at a time, using your hands, back into the channel on the inside of the rim. You may find it easier to pull the tire with one hand while pushing with the other. You can use the tire levers if necessary, but you could end up puncturing the tube or scratching or bending the wheel with them.

Step 4. Pump the tube to the maximum recommended tire pressure
Find the recommended pressure in psi (pounds per square inch), in bars, or in kilopascals on the side of the outer tire. Check the pressure with a tire gauge, as a poorly inflated tire is more likely to suffer a puncture or tear.

Step 5. Put the wheel back on the bike
Reverse the process you used to remove the wheel from the bike:
- Slide the wheel onto the frame fork, avoiding the chain or other obstructions.
- Engage the brakes, reversing the procedure you used to disengage them. This will vary depending on the type of brake.
- Tighten the lug nuts or quick release that hold the wheel in place.
- Get on the bike and go for a ride!