Getting the Android’s AlarmClock application source from official repositories:
git clone git://android.git.kernel.org/platform/packages/apps/AlarmClock.git
To get the head version for an old platform like the 1.4 (codename donut), choose the correspondent branch using -o or –origin:
git clone git://android.git.kernel.org/platform/packages/apps/AlarmClock.git --origin donut
Is there an automated way to get the source code for an open-source application which is not part of the android core?
Like apt-get source from debian/maemo.