Automated genotyping of drug-resistant Mycobacterium tuberculosis (MTB) directly from sputum is challenging for three primary reasons. First, the sample matrix, sputum, is highly viscous and heterogeneous, posing a challenge for sample processing. Second, acid-fast MTB bacilli are difficult to lyse. And third, there are hundreds of MTB mutations that confer drug resistance. An additional constraint is that MTB is most prevalent where test affordability is paramount. We address the challenge of sample homogenization and cell lysis using magnetic rotation of an external magnet, at high (5000) rpm, to induce the rotation of a disposable stir disc that causes chaotic mixing of glass beads ("MagVor"). Nucleic acid is purified using a pipet tip with an embedded matrix that isolates nucleic acid ("TruTip"). We address the challenge of cost and genotyping multiple mutations using 203 porous three-dimensional gel elements printed on a film substrate and enclosed in a microfluidic laminate assembly ("Lab-on-a-Film"). This Lab-on-a-Film assembly (LFA) serves as a platform for amplification, hybridization, washing, and fluorescent imaging, while maintaining a closed format to prevent amplicon contamination of the workspace. We integrated and automated MagVor homogenization, TruTip purification, and LFA amplification in a multisample, sputum-to-genotype system. Using this system, we report detection down to 43 cfu/mL of MTB bacilli from raw sputum.