in my experience portable drills tend to fail in two main areas. One area is the batteries and the other area is the chuck where it is often very difficult getting the keyless chuck off. In relation to the batteries, They have a finite life. I used to repack the NiCd battery packs but have given this away due to the use of Li Ion type and repacking is no longer economical. As a consequence I now have a drawer full of perfectly good drills but they have dead batteries. To make use of these otherwise useless drills, depending on the voltage, these can be converted into 12Volt DC operation by hooking up a flexible twin wire cable to the empty battery pack. Just use the original contacts inside the battery pack and feed the cable through a suitable hole drilled in the battery pack casing. Put a set of clips on the other end of the lead to go on a car battery and hey presto you have a 12 volt drill. You should be able to use drills rated between say 9.6V to 14V. Just experiment.
In the second area, the keyless chuck tends to malfunction making it impossible to use with small drill bits. To use a drill with malfunctioning keyless chuck, I have successfully employed an old chuck and spindle from a cannibalized drill (see pic). Another application uses a right angle drill attachment (see pic). In both cases the chuck jaws worked sufficiently to grip the attachment.