Skip to content

Dozens of minimal Android demo apps, each a example of one single Android API concept. Tested on Ubuntu 17.10 host, Android Studio 3, Android SDK 26, and an Android 6.0.1 device.

cirosantilli/android-cheat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Cheat

Dozens of minimal Android demo apps, each a example of one single Android API concept. Tested on Ubuntu 17.10 host, Android Studio 3, Android SDK 26, and an Android 6.0.1 device.

  1. Getting started
  2. Examples
    1. UI
      1. XMLLayout
      2. View
        1. TextView
          1. TextViewNewlinew
          2. TextViewBold
          3. TextViewHyperlink
          4. ScrollView
          5. ScrollingMovementMethod
          6. EditText
            1. EditText.getText
          7. Button
            1. Checkbox
            2. RadioButton
          8. setTextColor
        2. setBackgroundColor
        3. setLayoutParams
          1. setLayoutParamsLinearLayout
        4. ViewGroup
          1. RelativeLayout
          2. LinearLayout
        5. Media
          1. ImageView
            1. Bitmap
          2. VideoView
        6. Screen
          1. Fullscreen
          2. Portrait
      3. Activities
        1. TwoActivities
        2. ActivityLifecycle
        3. ChangeView
      4. Notifications
        1. Notification
        2. Toast
        3. AlertDialog
      5. Fragment
    2. BackgroundJobsTheory
      1. Handler
      2. IntentService
        1. IntentServiceTextView
        2. IntentServiceStartStop
      3. AsyncTask
    3. ServerSocket
      1. Socket
        1. SocketAsyncTask
    4. Hardware
      1. Camera
        1. CameraOneShot
        2. CameraPreviewVideo
    5. Location theory 1.Location
    6. Env
    7. Ndk
      1. NdkSyslog
      2. NDKLog
      3. NDKLibc
      4. NDKTwoFiles
  3. Theory
    1. Root
    2. Development
      1. Build AOSP
        1. build-aosp
        2. build-aosp-hikey960
      2. Contribute to AOSP
      3. Internals
        1. Device file hierarchy
        2. Networking
      4. android command
      5. adb
        1. Project file hierarchy
          1. AndroidManifest.xml
        2. ant
      6. Debugging
      7. Gradle
      8. Apps
        1. GAPPS
          1. gmail
        2. WhatsApp
      9. SDK
      10. aapt
      11. Studio
      12. Emulator
    3. AOSP
      1. repo
    4. Desktop
      1. POSIX
    5. Monitor app power consumption
    6. Mods
      1. CyanogenMod
      2. AOKP
    7. Google play
    8. Open source
    9. Trivia
    10. GPU
    11. Security
    12. Close app
    13. Fingerprint sensor

Chats

Mark all as read:

https://productforums.google.com/forum/#!topic/gmail/h-7PALCVZH0

Uninstallable apps

Some bloatware cannot be removed at all:

Bibliography

Small apps

Stay on top of other apps.

Sample application: take screenshot!

Screenshot

On Xperia Z3, Power key + volume down.

Icons

UI

Status bar

Topmost bar on the screen, contains several icons like signal .

Lock screen

What you see when you hit the power button.

Lock screen widgets

Removed apparently in Android 5.

http://www.androidauthority.com/lock-screen-widgets-android-lollipop-611516/

Toast

http://www.mkyong.com/android/android-toast-example/

Notification history

Notifications

Transfer data to SD card notification

Disable:

Application updated notification

Disable: http://android.stackexchange.com/questions/58021/how-to-get-rid-of-update-notifications-for-a-given-app-in-google-play-store

New voicemail notification

Disable:

Bloatware

Shitty software pre-installed by OEMs or carriers to get money from your personal information.

E.g., my Vivo (Brazilian carrier) + Sony Xperia Z3 has bloatware from both Vivo and Sony.

Apple forbids carriers from doing it it seems.

http://www.greenbot.com/article/2920125/dear-carriers-please-stop-putting-bloatware-on-my-android-phone.html

And on top of that, most bloatware cannot be uninstalled without rooting!!

Skins

GUI changes made by OEMs or carriers to steal your data.

Stock device

No bloatware.

Near stock devices: http://www.phonearena.com/news/Best-2015-smartphones-that-run-stock-or-near-stock-Android_id75780

Google play edition

Certified near stock devices.

https://en.wikipedia.org/wiki/List_of_Google_Play_edition_devices

http://arstechnica.com/gadgets/2015/01/dont-cry-for-the-google-play-edition-program-it-was-already-dead/

Died.

Google Nexus

https://en.wikipedia.org/wiki/Google_Nexus

No bloatware phones.

Strategy:

QR code scan

No built-in apparently:

Panoramic photo

Was installed by default on 5.1.1 Xperia Z3 as a "camera app".

Open the camera, and search for it.

App version

Find:

Linux file transfer

Media transfer mode

Mass storage mode

SSH method working: http://askubuntu.com/questions/189591/connecting-android-4ice-cream-sandwich-jelly-bean-kitkat-phone#comment1035980_222851

App isolation

Each App runs under a different UID: http://security.stackexchange.com/questions/67188/android-app-isolation-risks-implementation So it just reuses Linux's security.

HTML GUI

http://stackoverflow.com/questions/9045355/how-to-create-an-android-app-using-html-5 http://developer.android.com/guide/webapps/index.html

Android uses it's custom GUI API. Some day, maybe.

APK

Packaging format for android apps.

Aligned vs unaligned

http://stackoverflow.com/questions/22058210/why-unaligned-apk-is-needed

AOKP

https://en.wikipedia.org/wiki/AOKP

http://android.stackexchange.com/questions/50491/what-is-the-difference-between-aosp-and-aokp

ODEX

Optimizing apps

Dalvik cache

Replaced by ART in Android 5.

ART

Successor of Dalvik.

No JIT, full AOT is done.

x86

Java 8

Nope: http://stackoverflow.com/questions/23318109/is-it-possible-to-use-java-8-for-android-development

libc

Bionic, Google-made.

ROM

Read only memory.

Stores the OS.

Mounted under /system

If you root the device, you can change it, and make a custom Android however you like.

https://www.youtube.com/watch?v=RIi4KXgZYsI&feature=iv&src_vid=AWNykj-lb-I&annotation_id=annotation_162326159

USB debugging mode

TODO? What is that?

Enabled from Developer options

Disable the eternal notification: http://android.stackexchange.com/questions/5075/how-do-i-disable-the-usb-connected-notification

Tether

https://en.wikipedia.org/wiki/Tethering

Requires root, but available on Google Store.

Carriers may require you to pay for that if you tether from their network instead of LAN, which is why Android disables it by default.

Root allows you to re-enable that.

HBOOT

The Android bootloader?

Smart lock

Unlock in some cases without a password.

On-body detection: http://www.androidcentral.com/body-detection-explained Uses accelerometer.

Known WIFI not available it seems:

Piracy

Soft reset vs reboot

TODO?

Apparently soft rest is more superficial, and thus faster, but solves less problems.

Sony Xperia

Xperia Home

Reset home screen to device default:

Settings -> Apps -> All -> Xperia Home -> Clear data -> OK.

Do not disturb

Silent mode

Blocking mode

TODO where is it?? How to turn it on?

Linux run Android app natively

Peripherals

aar

Android library project

http://stackoverflow.com/questions/23915619/android-archive-library-aar-vs-standard-jar

fugu

http://www.androidpolice.com/2014/11/05/the-nexus-player-fugu-initial-android-5-0-factory-image-and-binaries-are-ready-to-download-now/

Screen pinning

http://www.cnet.com/how-to/ho-to-pin-apps-in-android-5-lollipop/

Phone without battery

If you link USB power cables directly to the battery energy entry points, it works: https://www.youtube.com/watch?v=f0IuBld2lzA

Secret codes

http://android.stackexchange.com/questions/35758/how-to-view-the-android-service-menu-secret-menu

Vary with Model, OEM and Carrier. TODO: are any built into the core?

Hardware

http://developer.android.com/guide/topics/sensors/sensors_environment.html

Enterprises

Open Handset Alliance

https://en.wikipedia.org/wiki/Open_Handset_Alliance

Hardware requirements

Memory:

Native libraries available

TODO Which native libraries must be available on all Android systems?

OpenCL: mostly not:

UART

Serial

About

Dozens of minimal Android demo apps, each a example of one single Android API concept. Tested on Ubuntu 17.10 host, Android Studio 3, Android SDK 26, and an Android 6.0.1 device.

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published