Flash memories have become a major storage media due to their good performance. However, they also face important challenges due to block erasure and noise. This poster summarizes both theoretical and practical results we had so far on mitigating the above issues: we propose coding schemes which supports rewriting and error correction at the same time based on write-once memories. Its construction is based on polar codes, and supports any number of rewrites and corrects a substantial number of errors;we propose efficient schemes for making polar codewords be easily adapted to flash page of any size. The decoding performance of shortened polar codes is shown using the data from real NAND flash chips. We further prove the feasibility of a practical adaptive polar decoder for flash memories.