This paper proposes a miniaturized antenna in package (AiP) for 5G millimeter-wave smartphone that incorporates broadside and end-fire arrays and supports a dual band covering 28 and 39 GHz. This paper demonstrates that the proposed AiP is 5.8 mm × 19 mm × 1.122 mm. It is believed that this is the smallest 5G AiP that can support a 10 dBi antenna gain, a 10 dB return-loss bandwidth of 3 GHz, and more than 10 dB isolation for both broadside and end-fire arrays. AiP consists of a 1 × 4 patch antenna array for broadside radiation and a 1 × 4 dipole antenna array for end-fire radiation. To miniaturize the patch antenna elements, a multi-layer Reactive Impedance Surface (RIS) is embedded between the patch layer and the ground plane. This multi-layer RIS idea greatly fits in 5G PCB-stack up antennas where each stack-up layer essentially requires certain portion of copper area. For the end-fire array antenna miniaturization with bandwidth improvement is achieved by modifying the Vertically Bent Folded Dipole Antenna (VBFDA) and adding a tightly-coupled T-shape side via wall. The AiP achieves a 10 dB return-loss bandwidth of 26.22 to 29.57 GHz and 35.18 to 41.00 GHz for Multi-Layer RIS Patch Antenna(MLRPA), and 26.40 to 29.74 GHz and 36.65 to 40.72 GHz for VBFDA. The antenna gain is 11.6 dBi for MLRPA and 10.0 dBi for VBFDA.