android-cheat
android-cheat copied to clipboard
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.
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.
- Getting started
-
Examples
- UI
- XMLLayout
- View
- TextView
- TextViewNewlinew
- TextViewBold
- TextViewHyperlink
- ScrollView
- ScrollingMovementMethod
-
EditText
- EditText.getText
-
Button
- Checkbox
- RadioButton
- setTextColor
- setBackgroundColor
-
setLayoutParams
- setLayoutParamsLinearLayout
- ViewGroup
- RelativeLayout
- LinearLayout
- Media
-
ImageView
- Bitmap
- VideoView
-
ImageView
- Screen
- Fullscreen
- Portrait
- TextView
- Activities
- TwoActivities
- ActivityLifecycle
- ChangeView
- Notifications
- Notification
- Toast
- AlertDialog
- Fragment
-
BackgroundJobsTheory
- Handler
-
IntentService
- IntentServiceTextView
- IntentServiceStartStop
- AsyncTask
-
ServerSocket
-
Socket
- SocketAsyncTask
-
Socket
- Hardware
-
Camera
- CameraOneShot
- CameraPreviewVideo
-
Camera
- Location theory 1.Location
- Env
-
Ndk
- NdkSyslog
- NDKLog
- NDKLibc
- NDKTwoFiles
- UI
- Theory
- Root
- Development
-
Build AOSP
- build-aosp
- build-aosp-hikey960
- Contribute to AOSP
-
Internals
- Device file hierarchy
- Networking
- android command
-
adb
-
Project file hierarchy
- AndroidManifest.xml
- ant
-
Project file hierarchy
- Debugging
- Gradle
-
Apps
-
GAPPS
- gmail
-
GAPPS
- SDK
- aapt
- Studio
- Emulator
-
Build AOSP
-
AOSP
- repo
-
Desktop
- POSIX
- Monitor app power consumption
- Mods
- CyanogenMod
- AOKP
- Google play
- Open source
- Trivia
- GPU
- Security
- Close app
- 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:
- http://www.phonearena.com/news/Cant-uninstall-an-Android-app-This-could-be-your-problem_id61301
- http://forum.xda-developers.com/xperia-j-e/help/st26a-uninstall-uninstallable-apps-t2622293
- http://stackoverflow.com/questions/6415304/uninstallable-app-for-android
Bibliography
- Android Authority
- https://www.youtube.com/channel/UCgyqtNWZmIxTx3b6OxTSALw
- https://en.wikipedia.org/wiki/XDA_Developers
- http://www.xda-developers.com/
Small apps
Stay on top of other apps.
Sample application: take screenshot!
- https://developer.sony.com/develop/smartphones-and-tablets/camera-add-on-small-apps-or-ir-remote-apis/about/small-app-api/
- http://developer.sonymobile.com/2012/09/26/let-your-app-stay-on-top-with-small-apps-for-xperia-tablet-s/
Screenshot
On Xperia Z3, Power key + volume down.
Icons
- http://android.stackexchange.com/questions/98975/complete-list-of-lollipop-system-icons-shown-in-notification-bar
- 4G vs H+ vs H
- completely different WWAN standards: http://android.stackexchange.com/questions/56269/what-are-the-different-signal-indicators-avalable-on-the-notification-bar
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:
- https://www.reddit.com/r/SonyXperia/comments/3101yj/how_do_i_disable_the_notification_transfer_data/
- https://talk.sonymobile.com/t5/Xperia-Z-ZL-ZR/Transfer-data-to-SD-card-notification/td-p/318761
Application updated notification
New voicemail notification
Disable:
- http://android.stackexchange.com/questions/60103/how-can-i-disable-voicemail-notifications
- http://forums.androidcentral.com/samsung-galaxy-s4/276901-there-way-turn-off-voicemail-notifications.html
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.
And on top of that, most bloatware cannot be uninstalled without rooting!!
Skins
GUI changes made by OEMs or carriers to steal your data.
- Samsung: https://en.wikipedia.org/wiki/TouchWiz
- LG G UI
- HTC Sense UI
- Sony Xperia UI
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
Died.
Google Nexus
https://en.wikipedia.org/wiki/Google_Nexus
No bloatware phones.
Strategy:
QR code scan
No built-in apparently:
- http://www.pcadvisor.co.uk/how-to/google-android/how-scan-codes-with-your-smartphone-3513431/
- https://www.quora.com/Why-havent-Google-or-Apple-embedded-a-QR-reader-in-their-Camera-apps
- http://www.androidcentral.com/using-android-and-qr-codes
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:
- any way http://android.stackexchange.com/questions/2016/how-can-you-tell-which-version-of-an-app-is-on-your-android-phone/130407#130407
- adb http://stackoverflow.com/questions/11942762/get-application-version-name-using-adb
Linux file transfer
Media transfer mode
Mass storage mode
- http://askubuntu.com/questions/189591/connecting-android-4ice-cream-sandwich-jelly-bean-kitkat-phone
- http://askubuntu.com/questions/199280/how-to-install-pc-companion-software-of-sony-xperia
- http://android.stackexchange.com/questions/66385/how-to-transfer-files-from-an-android-phone-to-a-ubuntu-pc-by-using-a-usb-cable
- http://android.stackexchange.com/questions/91900/is-there-a-viable-alternative-to-mtp-for-file-transfer?lq=1
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
- https://www.quora.com/What-is-Android-doing-when-after-an-upgrade-it-tells-you-its-optimizing-the-apps
- http://stackoverflow.com/questions/7541281/what-is-dalvik-and-dalvik-cache
- https://en.wikipedia.org/wiki/Dalvik_%28software%29
Replaced by ART in Android 5.
ART
Successor of Dalvik.
No JIT, full AOT is done.
x86
-
http://stackoverflow.com/questions/17770907/is-android-os-only-used-for-arm-cpus
-
TODO: linked to the Intel partnership? Or that one is yet to be released?
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.
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?
- https://www.reddit.com/r/xposed/comments/215ord/what_is_the_difference_between_reboot_and_soft/
- http://android.stackexchange.com/questions/123905/what-is-the-difference-between-temp-root-pemanent-root-what-is-a-soft-reboot
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
- http://thenextweb.com/google/2015/04/02/google-releases-a-tool-for-developers-to-launch-android-apps-on-windows-mac-linux-and-chrome-os/
- https://www.linux.com/learn/tutorials/842630-installing-android-apps-on-linux-with-archon
- https://www.maketecheasier.com/running-android-apps-on-linux/
Peripherals
- joystick root calibration method https://www.youtube.com/watch?v=GwrGpVquGyo
aar
Android library project
http://stackoverflow.com/questions/23915619/android-archive-library-aar-vs-standard-jar
fugu
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:
- http://android.stackexchange.com/questions/34958/what-are-the-minimum-hardware-specifications-for-android
- https://www.quora.com/What-is-the-minimum-RAM-size-needed-to-run-Android-5-1-or-6
Native libraries available
TODO Which native libraries must be available on all Android systems?
OpenCL: mostly not:
- http://arrayfire.com/opencl-on-mobile-devices/
- http://stackoverflow.com/questions/9005352/how-to-use-opencl-on-android
- http://stackoverflow.com/questions/26795921/does-android-support-opencl
UART
Serial
- via headphone jack! https://www.pentestpartners.com/blog/how-to-hardware-hack-android-over-uart/