This is a report done on all the projects that make up for the android project, my copy of it is synced as of May 23rd 2010, 6pm



[bash]

——————————————————————————–

Language files blank comment code

——————————————————————————–

XML 4130 26919 62996 3044624

C 7191 494387 685731 2826741

Java 16473 423278 986294 2084883

C++ 5623 349754 385625 1754053

C/C++ Header 12278 300773 653608 1153456

HTML 2325 13539 14681 348935

Bourne Shell 501 45684 46947 317410

Javascript 1717 41901 76306 208012

Assembly 1704 18732 51392 96700

D 2181 16936 24 59142

m4 116 6026 1813 49502

Perl 221 8189 8246 40058

Python 236 9805 14225 38852

make 381 6844 3837 37059

IDL 421 3128 0 24181

Objective C 93 2804 3371 10032

yacc 15 1300 742 9660

CSS 42 1760 617 8566

Teamcenter def 41 631 95 5430

C# 93 863 537 5283

Bourne Again Shell 99 569 1643 3784

lex 21 776 754 3492

Expect 20 105 168 2170

Ada 10 599 560 1681

Ruby 14 393 228 1433

XSLT 8 105 110 1328

XSD 7 182 359 1048

Pascal 4 218 200 985

DOS Batch 34 252 399 911

awk 14 92 198 899

DTD 9 66 42 289

sed 9 32 143 277

Korn Shell 1 39 46 223

Lisp 2 32 5 144

MSBuild scripts 1 1 0 140

NAnt scripts 2 10 0 89

ASP.Net 3 5 0 76

YAML 6 27 42 66

SQL 1 5 0 21

PHP 1 0 0 3

——————————————————————————–

SUM: 56048 1776761 3001984 12141638

——————————————————————————–

[/bash]

Update

It seems like this post got some attention on Reddit, YCombinator news and other sites on monday. I hadn’t noticed until today, so here are some answers to many of the FAQs about the post.

Yes it was done using cloc. Don’t shoot me I’m just the messenger.

It was run at the base folder of the entire Android OS source checkout, so yes it will include sample and tests I suppose.

C#, Ada, Objective-C? I also thought the same… It’s probably worth the try doing a few finds and greps to see if this is true, again I just posted the output of cloc, I didn’t intend to make this a scientific paper, just a fun and curious post to get a rough number on the lines of code, that breakdown was just icing on the cake for me (as inaccurate as it maybe)

Update

This post is now being referenced in Wikipedia! on the “Android (operating system)” article.

About Gubatron & Android

Ever since the iPhone OS handicapped millions of smartphone devices with its draconian laws, I started looking more and more seriously at Android as THE platform for every non-iPhone device coming to the mobile and TV space. Now I’m part of the developer team of FrostWire for Android, an application that exploits all the power of the device and the freedoms of the platform to allow people to connect and share.