Notes on understanding Android.

1. Storage

2. Security

3. getprop

This is a kind of “Registry” for system properties. “getprop” -T -Z

They have something like selinux attributes attached to them (crazy!), so you need to understand SELinux first, before doing anything useful with them.

I have not found a corresponding setprop, however, there exists settings

4. init.rc

This is something like what Android has instead of init.d (why would you reinvent the wheel again?). Magisk can plug into this file without making the system go insane, but I guess it is better to use Magisk’s services anyway.

5. List of Java apps:

/data/system/packages.list

6. am

Some command for activities/services management.

For example, you can restart “Airplane Mode” by typing:

#!/system/bin/sh
  settings put global airplane_mode_on 1
  sleep 1
  am broadcast -a android.intent.action.AIRPLANE_MODE
  sleep 1
  settings put global airplane_mode_on 0
  sleep 1
  am broadcast -a android.intent.action.AIRPLANE_MODE