Android: Clear cache before upgrading to a new firmware

I have been using CyanogenMod for a few weeks and am currently running 4.1.9.2 without an issue (no crashes, FCs etc).

Many users complain on the XDA-Developers forum about issues, but I truly believe that if people followed some basics, there would not be so many problems in the first place.

I have now upgraded from 4.0.4 to 4.1.7 to 4.1.8 and then 4.1.9 without having to do a wipe (and suffering data loss / re-install) by doing the following:

  1. Clear cache before installs: (boot into recovery and drop to terminal)
    mount system
    mount system/sd
    rm -rf system/sd/dalvik-cache
    umount system/sd
    umount system
    reboot recovery
  2. Upgrade to the latest firmware
  3. Reboot (be patient – it will take about 10 minutes. you can always remote attach via ./adb shell logcat to watch progress)
  4. Wait (don’t touch the phone until remote logcat has finished)
  5. Reboot into recovery and drop into terminal
  6. Fix permissions via fix_permissions
  7. Reboot & Enjoy the new firmware