15

Ok, guys, I think that's the right place to ask a question, because it's all about development(if I'm wrong or it's duplicate question, please tell me).

So, I want to dive deep in Android, understand how system works down to the kernel(and also learn what's behind rooting and other hacking stuff). Where should I go from here? Linux book? VM architecture?

Just downloading the source code didn't help as I don't understand how all that works.

  • 2
    Having spun up on Android myself over the past couple of months, I can say Linux and Java references are a good start (but ignore Swing and other non-Android toolkits) except that it I still haven't found a solid overview reference on the security model. The most common places I've hit a wall have been when trying to touch resources the system didn't want me to see, especially file system resources. I'm currently being burned because the emulator is not representative of real devices in this regard. – Gene Jun 29 '12 at 13:48
  • 1
    I suggest you to have a look at my thesis work (Italian source: https://github.com/jackbergus/pjproject-over-android; English Slides: http://www.slideshare.net/jackbergus/slides-21155397; Some source code: http://www.cs.unibo.it/~ghini/didattica/sistemimobili/BergamiGiacomo/index.html) – jackb Apr 11 '14 at 22:26
  • @jackb Thanks for the link to the slides. I am precisely trying to understand the entire flow when an App tries to access APIs that require permissions. How is it checked internally in Android. Like the libraries and files used etc. If it is covered in your Thesis, is it possible to get access to it? – Ankur Bhatia Apr 22 '16 at 09:35
  • Yes, I wrote a thesis but unfortunately it is written in Italian (see the GitHub link). – jackb Apr 22 '16 at 09:47
  • Briefly, the native libraries always communicate through the binder with the Java Android APIs, so the native libraries on your mobile phone are built for that purpose. – jackb Apr 22 '16 at 09:49

3 Answers3

15

Where should I go from here?

There are two books on Android internals that I am aware of:

  • One, XDA Developers' Android Hacker's Toolkit, is getting lousy reviews, but that may be because it does not cover much ground beyond what's found on XDA itself. However, if you're not super-familiar with the subject, it may still be worthwhile.

  • The other, Embedded Android: Porting, Extending, and Customizing, was supposed to be out in July, but it looks like the publication date got pushed out to August. I think that there is an early-access edition on the O'Reilly site for purchase.

Marakana's TechTV series includes a number of videos (e.g., conference presentations) on firmware mods. They, and a couple of other firms, also offer training on the subject.

You are certainly welcome to poke around XDA and its forum posts on firmware mods, but it's definitely more of a community site than a reference guide to the subject.

Beyond that, learning how the Linux OS works (kernel, drivers, etc.) would certainly help, as Android is based on that stuff.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 2
    Word of warning on the O'reilly book: They had a different Android book that got pushed back several times and then eventually scraped altogether. The preview version that was made available was nice but contained lots of source code errors in both the book, and the downloadable source. – FoamyGuy Jun 29 '12 at 14:09
3

And there's a new book out as of January 2015: At http://newandroidbook.com - Volume 1 of 2, however, with one more scheduled to discuss "deeper" internals

Technologeeks
  • 7,674
  • 25
  • 36
  • Vol 3 has been deferred-- the author says its worth while to just learn about the Linux Kernel as they're as "95%" similar. http://www.amazon.com/Android-Internals-Power-Users-View/dp/0991055527 – ignoramous Sep 13 '15 at 05:18
2

Nice introduction to Android internals is for example in slides for opersys course (http://www.opersys.com/training/embedded-android / courseware tab) - the slides are not fully self-explaining are they are may be a good starting point for next studium..

tpcz
  • 186
  • 1
  • 4