Multiwavelength observations toward protostars reveal complex properties of dust polarization, whichis challenging to interpret. Here we study the physical processes inducing the alignment of the grainaxis of maximum inertia moment with the angular momentum (J, i.e., internal alignment) and ofJ with the magnetic field (i.e., external alignment) of very large grains (VLGs, of radius a >10μm)using the alignment framework based on radiative torques (RATs) and mechanical torques (METs). We derive analytical formulae for critical sizes of grain alignment, assuming grains aligned at low？Jand high？Jattractors by RATs (METs). For protostellar cores, we find that super-Barnett relaxationinduces efficient internal alignment for VLGs with large iron inclusions, but inelastic relaxation isefficient for VLGs regardless of composition aligned at high？Jattractors by RATs (METs). Forexternal alignment, VLGs with iron inclusions aligned at high？Jattractors have magnetic alignmentby RATs (B？RAT) or METs (B-MET), enabling dust polarization as a reliable tracer of magneticfields in dense regions. Still, grains at low-Jattractors or without iron inclusions have alignment withJalong the radiation direction (k-RAT) or gas flow (v-MET). For protostellar disks, we find thatsuper-Barnett relaxation is efficient for grains with large iron inclusions in the outer disk thanks tospin-up by METs, but inelastic relaxation is inefficient. VLGs aligned at low-J attractors can havek？RAT (v-MET) alignment, but grains aligned at high-Jattractors have likelyB？RAT (B-MET)alignment. We also find that grain alignment by METs is more important than RATs in protostellardisks.