34

I am looking for the source code of the android lock screen. It can be for any version of Android (1.5, 1.6, 2.0, etc).

I tried looking in the repository at: https://android.googlesource.com/, but it doesn't look like it's under platform/frameworks/base. Maybe it's closed source?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Daniel Benedykt
  • 6,496
  • 12
  • 51
  • 73

2 Answers2

22

Do an actual full checkout of the source according to Google's directions.

As of Android 4.2, the keyguard source is at frameworks/base/policy/src/com/android/internal/policy/impl/keyguard. There's a mirror on GitHub you can look at online (I pegged this link to the JB MR 1.1 release in case the location changes again in a future release).

When this question was originally answered, Android 2.3 and lower had their lockscreen source at frameworks/policies/base/phone/com/android/internal/policy/impl. You can also view these sources online in their GitHub mirror; that source is still kicking in the current repo, but hasn't been updated in several years.

Yoni Samlan
  • 37,905
  • 5
  • 60
  • 62
  • I'm trying to pinpoint the exact file in the AOSP source, but haven't been successful; I've only managed to locate [these layout files](https://github.com/android/platform_frameworks_base/tree/master/core/res/res/layout-sw600dp) that don't appear to be referenced anywhere. – Paul Lammertsma Mar 25 '13 at 11:07
  • Updated my answer with the new location in Jellybean. – Yoni Samlan Mar 29 '13 at 18:41
10

For those who are on kitkat (android 4.4) or above source code, it seems the code has been moved to

frameworks/base/packages/Keyguard
justfortherec
  • 1,590
  • 1
  • 13
  • 17
xip
  • 2,475
  • 3
  • 18
  • 24