Kodak Black got some good news while sitting in his jail cell that will help him get out much sooner than expected ... TMZ has learned.
The rapper's attorney, Bradford Cohen, tells us 2 remaining charges from the January raid of his Florida home have been dropped. The charges were for marijuana possession and possession of ammunition.
We're told Kodak admitted 2 other probation violation charges -- driving with a suspended license and associating with people engaged in criminal activity. He'll get credit for time served, which puts him in line for an October release with good behavior.
Once the rapper's free, the remaining year of house arrest and 4 years of probation will be wiped from his slate ... according to Cohen. He adds, "Kodak [and I] are extremely happy to resolve this case with an excellent resolution. It was very nice to deal with a fair judge who understood the circumstances -- along with prosecutors."
As we reported ... Kodak was arrested after an Instagram Live vid alerted cops to criminal activity, and he was hit with 7 charges. He was looking at around 12 years behind bars, until 3 charges were initially dropped.