android developer options & android sdk tools (for qa)

24
Android developer options & Android SDK tools (for QA)

Upload: techmagic

Post on 09-Jan-2017

58 views

Category:

Software


8 download

TRANSCRIPT

Page 1: Android developer options & android sdk tools (for qa)

Android developer options & Android SDK tools

(for QA)

Page 2: Android developer options & android sdk tools (for qa)

Agenda

1. Overview of the “android developer tools”

2. Overview of the “android sdk tools”

3. Developer tools - top list features

4. Short overview of tools & libs used by Good&Co android developers

Page 3: Android developer options & android sdk tools (for qa)

Developer options - How to install*

1. Go to the settings menu, scroll down to “About phone” and tap it.

2. Scroll down to the bottom again, where you see “Build number”

3. Tap it seven times. After the third tap, you will see a dialog that says: “you’re four

taps away from being a developer”. Keep on tapping until you have got your

special setting appear.

Note: it’s hidden by default starting from android 4. 2

Page 4: Android developer options & android sdk tools (for qa)

Android developer options structure

● Debugging options

● Input options

● Drawing / hardware accelerated rendering options

● Monitoring options

● Apps options

Page 5: Android developer options & android sdk tools (for qa)

Debugging options1. “USB debugging” - connecting device via usb.

2. “Take bug report / Bug report option” - collection info with logs about device state with

sending e-mail message.

3. “Desktop backup password” - allows to use ADB to backup and restore things like apps and their

associated data to and from your computer

4. “Stay awake / Always stay awake” - screen will never sleep while charging

5. “HDCP checking” - protecting files, which are shared via Wi-Fi, Bluetooth, etc.

6. “Enable Bluetooth HCI snoop log” - logging every transmitted file via bluetooth

7. “Process Stats” - monitoring app usage statistics

8. “Allow Mock Location” - forcing user location using GPS and 3-rd party resources

9. “Select debug app” - setting lets you choose an application to debug.

Page 6: Android developer options & android sdk tools (for qa)

Debugging options

10. “Verify apps via USB” - lets Android scan applications you installed via ADB for malicious behavior.

11. “Enable Wi-Fi verbose logging” - logging more information as usual (slows down device

performance)

12. “Wi-Fi to Cellular handover“- appropriate switching to wi-fi mode in case of slow cellular

connection and back again

Page 7: Android developer options & android sdk tools (for qa)

Input options

13. “Show touches” - displaying finger touches on the display (useful while screen-recording)

14. “Pointer Location” - this setting places an information bar at the top of your screen telling you the

screen coordinates of the last place the screen was touched.

Page 8: Android developer options & android sdk tools (for qa)
Page 9: Android developer options & android sdk tools (for qa)

Drawing options

15. “Surface update” - makes the edge of a "window" flash when its contents are updated.

16. “Show layout bounds” - marks the edges of all the elements in a dialog so you know where any touch

will activate them.

17. “Force RTL direction” - forces screen orientation for right to left language support.

18. “Window animation scale” - sets the speed for window animation. A lower number is faster.

19. “Simulate secondary displays” - this setting allows us to simulate different screen sizes.

Page 10: Android developer options & android sdk tools (for qa)
Page 11: Android developer options & android sdk tools (for qa)

Drawing / Hardware accelerated rendering options

20. “Show hardware layers updates” - displaying screen flashes when device updates surface (useful

when developing widgets)

21. “Debug GPU overdraw” - overdraw happens every time the application asks the system to draw

something on top of something else. This setting lets you see when and where this is happening so you know if

it is a problem.

Page 12: Android developer options & android sdk tools (for qa)

Monitoring options

22. “Strict mode enabled” - this setting flashes the screen when an application uses the main thread to

perform long, intensive operations.

23. “Show CPU usage” - places a window in the upper right of your screen with information about the

CPU and how it is being used

Page 13: Android developer options & android sdk tools (for qa)

Apps options

24. “Don’t keep activities” - destroys every activity as the user leaves it (if enabled, going to background

will destroy current app activity, if disabled - app will run in background) - In other words Android will destroy

and activity as soon as it’s stopped. We can simulate the case that Android will kill an activity in the background

due to memory pressure

25. “Background process limit” - limiting number of process which can run in background (may be

useful when testing apps on slow devices)

26. “Show all ANRs” - displays all “application not responding” dialogs while using the device

Page 14: Android developer options & android sdk tools (for qa)

Allow mock location option (How to set)

1. Enable “Allow mock location” option in developer options

2. Install app like “Fake GPS location” or similar

3. In the installed app set desired location

4. Use your mocked location in browser web-site or in app

Page 15: Android developer options & android sdk tools (for qa)

Android SDK tools

- Android Device Monitor:

- DDMS - tool to debug android applications

- Hierarchy Viewer - detailed displaying of app views, layouts

- PixelPerfect - comparing implemented app design with target design

- Retrieving data from device (SQL, SharedPreferences)

- Using AdbRun

- UiAutomatorViewer

- Displaying application view, layouts with resource identifiers

- Android Monkey

- Simple automation tool for light smoke run (useful to increase crash-free users)

Page 16: Android developer options & android sdk tools (for qa)
Page 17: Android developer options & android sdk tools (for qa)
Page 18: Android developer options & android sdk tools (for qa)
Page 19: Android developer options & android sdk tools (for qa)

ADB commands

- adb install C:\package.apk – Installs the package located at C:\package.apk on your computer on your

device.

- adb uninstall package.name – Uninstalls the package with package.name from your device.

- adb push C:\file /sdcard/file – Pushes a file from your computer to your device. For example, the

command here pushes the file located at C:\file on your computer to /sdcard/file on your device

- adb pull /sdcard/file C:\file – Pulls a file from your device to your computer – works like adb push, but in

reverse.

- adb logcat - views android device logs

- Running scripts

Page 20: Android developer options & android sdk tools (for qa)

Android monkey - basic usage

- adb shell monkey [options] <event-count>

- adb shell monkey -p your.package.name -v 500

- --help - prints a simple usage guide.

- --throttle <milliseconds> - inserts a fixed delay between events. You can use this

option to slow down the Monkey

- -p <allowed-package-name> - if you specify one or more packages this way, the

Monkey will only allow the system to visit activities within those packages.

Page 21: Android developer options & android sdk tools (for qa)

Other interesting tools

- “Spare parts” and it’s possibilities:

- Enable/Disable compatibility mode to allow Apps to work at full screen size on Galaxy Tab and other large screen devices

- Control windows animation speeds or disable them entirely to speed up your device!

- No annoying AdMob adverts

Page 22: Android developer options & android sdk tools (for qa)

Developer options - top list features

● Allow mock locations

● Don’t keep activities

● Show layout bounds

● Show touches

Page 23: Android developer options & android sdk tools (for qa)

Short overview of tools & libs used by Good&Co android developers

1. Lint - tool for syntax checking

2. DDMS

3. Cobertura - tool for Code Coverage

Page 24: Android developer options & android sdk tools (for qa)

Thanks for watching & Your questions