├── .gitignore
├── Docs
└── Index.md
├── LICENSE
├── README.md
└── Screenshots
├── ConnectedDevices.png
├── DeviceExplorer.png
├── Filters.png
├── LogOutput.png
├── Processes.png
├── Screenshot.png
├── ThemeSelector.png
├── Toolbar.png
├── ToolbarEx.png
└── ToolbarEx2.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Uncomment these types if you want even more clean repository. But be careful.
2 | # It can make harm to an existing project source. Read explanations below.
3 | #
4 | # Resource files are binaries containing manifest, project icon and version info.
5 | # They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files.
6 | #*.res
7 | #
8 | # Type library file (binary). In old Delphi versions it should be stored.
9 | # Since Delphi 2009 it is produced from .ridl file and can safely be ignored.
10 | #*.tlb
11 | #
12 | # Diagram Portfolio file. Used by the diagram editor up to Delphi 7.
13 | # Uncomment this if you are not using diagrams or use newer Delphi version.
14 | #*.ddp
15 | #
16 | # Visual LiveBindings file. Added in Delphi XE2.
17 | # Uncomment this if you are not using LiveBindings Designer.
18 | #*.vlb
19 | #
20 | # Deployment Manager configuration file for your project. Added in Delphi XE2.
21 | # Uncomment this if it is not mobile development and you do not use remote debug feature.
22 | #*.deployproj
23 | #
24 | # C++ object files produced when C/C++ Output file generation is configured.
25 | # Uncomment this if you are not using external objects (zlib library for example).
26 | #*.obj
27 | #
28 |
29 | # Delphi compiler-generated binaries (safe to delete)
30 | *.exe
31 | *.dll
32 | *.bpl
33 | *.bpi
34 | *.dcp
35 | *.so
36 | *.apk
37 | *.drc
38 | *.map
39 | *.dres
40 | *.rsm
41 | *.tds
42 | *.dcu
43 | *.lib
44 | *.a
45 | *.o
46 | *.ocx
47 |
48 | # Delphi autogenerated files (duplicated info)
49 | *.cfg
50 | *.hpp
51 | *Resource.rc
52 |
53 | # Delphi local files (user-specific info)
54 | *.local
55 | *.identcache
56 | *.projdata
57 | *.tvsconfig
58 | *.dsk
59 |
60 | # Delphi history and backups
61 | __history/
62 | __recovery/
63 | *.~*
64 |
65 | # Castalia statistics file (since XE7 Castalia is distributed with Delphi)
66 | *.stat
67 |
--------------------------------------------------------------------------------
/Docs/Index.md:
--------------------------------------------------------------------------------
1 | # Device Lens Documentation
2 |
3 | ## Toolbar
4 |
5 | The toolbar provides convenient buttons for operating device lens:
6 |
7 |
8 |
9 | The operations for the buttons are described in the [Basic Operations](#basic-operations) section.
10 |
11 | When the `Auto Scroll` checkbox is checked, the log output automatically scrolls the output down to the most recent entry. Unchecking the checkbox stops the output from automatically scrolling.
12 |
13 | The model and serial of the selected device is displayed to the right of the Auto Scroll checkbox, when log monitoring is active.
14 |
15 | ## Toolbar functions
16 |
17 | Play Clear Log Doze On Doze Off Explorer Screenshot
18 |
19 |
20 |
21 | ### Play
22 |
23 | Click the `Play` button to start monitoring the output for all processes, if monitoring is not already started.
24 |
25 | ### Clear log
26 |
27 | Click the `Clear Log` button to clear all log entries from the log output in Device Lens (i.e it does not clear the actual logs on the device)
28 |
29 | ### Doze On/Off
30 |
31 | This feature may be used the least of all, however it serves a fairly useful function, especially when it comes to testing applications that need to do something when the device is in "doze" mode. Normally the device goes into this mode only after an extended period of time, after the display turns off, all while the device is not connected to power. With this function, you can simulate "doze" mode even while the display is still on!
32 |
33 | The reason why there are 2 buttons: there appears to be no way to monitor when the device comes out of doze mode, so using the "Doze Off" button guarantees (hopefully) that the device has exited "doze" mode.
34 |
35 | There are ways to determine via _code_ whether or not the device is in "doze" mode, such as [in the Kastri library](https://github.com/DelphiWorlds/Kastri/blob/54f826a78c365449d9b930065ccf9487da77768c/Core/DW.Background.Android.pas#L194). In your code [you can monitor for this change](https://github.com/DelphiWorlds/Kastri/blob/54f826a78c365449d9b930065ccf9487da77768c/Core/DW.Background.Android.pas#L39) and use log statements, so that you can see when the device enters/exits "doze" mode.
36 |
37 | ### Device Explorer
38 |
39 | Click the `Device Explorer` button to bring up the Device Explorer:
40 |
41 |
42 |
43 | Select a device from the connected devices list, and Device Lens will populate the Packages list.
44 |
45 | The Package Filter edit filters the Packages list to match the text anywhere in the package name, and is case-insensitive.
46 |
47 | Selecting a package and clicking the `Dump` button will dump information about the package in the Package Dump edit.
48 |
49 | Selecting a package and clicking the `Download` button will download the APK associated with the package to the folder selected, when prompted.
50 |
51 | Checking the checkbox next to packages allows you `Uninstall` the packages that have their checkbox checked.
52 |
53 | ### Screenshot
54 |
55 | Clicking the `Screenshot` button brings up a window while Device Lens is sending a command to the device to take a screenshot if/when it returns a result (it can be problematic on some devices), the image is displayed in the window:
56 |
57 |
58 |
59 | In the screenshot window, click the `Copy` button to copy the image to the clipboard, and click the `Re-capture` button to take a new capture of the device screen
60 |
61 | ## Log output
62 |
63 | When device log monitoring starts, Device Lens shows the log output in the area below the toolbar.
64 | Different log levels of the output log are colored according to the settings in the [Filters](#filters). The output is selectable using the mouse, and the output can be copied to the clipboard using `Ctrl-C`. Right-clicking the output brings up a popup menu which has an option to save the output to a text file:
65 |
66 |
67 |
68 | ## Filters
69 |
70 |
71 |
72 | ### Filter On Text
73 |
74 | Filters on text contained in the `Text` column of the log output
75 |
76 | ### Filter On Tag
77 |
78 | Filters on text contained in the `Tag` column of the log output
79 |
80 | ### Filter On Application
81 |
82 | Filters on text contained in the `Application` column of the log output. This filter is automatically populated when double-clicking on an application name in the Process List.
83 |
84 | The above 3 filters are **case sensitive**, the filter value can appear **anywhere** in the text being filtered, and the filtering for these is applied once the user has stopped typing.
85 |
86 | ### Filter By Log Level
87 |
88 | Filters log messages based on the `Level` column of the log output. Using the `Toggle` button will check/uncheck all levels at once. This filter is applied immediately after a change. The color of the entire line of log output for a particular log level can be controlled using the color edits for each log level.
89 |
90 | ## Connected Devices List
91 |
92 |
93 |
94 | This shows the devices connected to the machine where debugging via ADB is available.
95 |
96 | Once a device is selected, the toolbar buttons should enable.
97 |
98 | ## Processes List
99 |
100 |
101 |
102 | Shows the currently running processes on the selected device. Device Lens filters out processes that are suspected to be system processes, which you would be unlikely to want to monitor the log output for.
103 |
104 | Double-clicking a process in the Process List will start monitoring the log output for the device, and automatically populate the Filter On Application value.
105 |
106 | ## Changing Themes
107 |
108 | The theme selector allows you to choose between a number of different themes supported by Device Lens. Drop down the combo and select the theme of your choice.
109 |
110 |
111 |
112 | You may need to change the [colors for log levels](#filter-by-log-level) after selecting a new theme.
113 |
114 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020-2023 Dave Nottage
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Device Lens
2 |
3 | Device Lens is a debugging tool that allows you to view logs on your mobile devices (presently **Android only**). This repository is currently for the documentation and for reporting issues
4 |
5 | ## Installing Device Lens
6 |
7 | **NOTE**: The installers that used to be in this repository have been removed.
8 |
9 | The latest version of Device Lens is [here](https://delphiworlds.com/devicelens/latest).
10 |
11 | Older versions are available [here](https://delphiworlds.com/devicelens/older).
12 |
13 | Just run the setup and follow the prompts!
14 |
15 | ## Change history:
16 |
17 | v2.1.0 (Oct 19th, 2023)
18 |
19 | * A number of significant changes "under the hood"
20 | * Added ability to save the image in screenshot feature
21 | * Added "Auto Start" feature - starts logcat immediately when a device is detected
22 | * Suppress system beep when applying of filter by application name when pressing enter
23 | * Other minor fixes
24 |
25 | v2.0.3 (Jun 12th, 2023)
26 |
27 | * Fixed device selection when there are multiple devices
28 | * Fixed applying of filter by application name when pressing enter
29 |
30 | v2.0.2 (May 24th, 2023)
31 |
32 | * Fixed parsing of log output - was broken for some devices including WSA
33 |
34 | v2.0.1 (Apr 10th, 2023)
35 |
36 | * Fixed behaviour when changing filters (logcat was being started when it should not be)
37 |
38 | v2.0.0 (Feb 21st, 2023)
39 |
40 | * Major revamp of the user interface
41 | * Added support for a number of themes
42 | * Added saving of log output to file
43 | * Fixed font sizing in the log output for high DPI
44 |
45 | v1.3.0 (May 13th, 2021)
46 |
47 | * Added screenshot function
48 | * Added download APK function
49 | * Added uninstall package function
50 | * Fixed another issue with process parsing
51 |
52 | v1.2.2 (July 20th, 2020)
53 |
54 | * Fixed process parsing - should now work on Android 11
55 | * Fixed SDK Installer button
56 | * Fixed issue with device explorer not clearing package info
57 |
58 | v1.2.1 (June 3rd, 2020)
59 |
60 | * Fixed issue with filtering on Text and Tag
61 |
62 | v1.2.0 (May 9th, 2020)
63 |
64 | * Added SDK Installer function
65 | * Added Configure device for TCP/IP mode function
66 | * Added filtering on Tag value (issue #5)
67 | * Added memo below the grid to display the "text" portion of the selected row (issue #4)
68 | * Fixed issue #6 - disable Explorer view function when no devices selected
69 |
70 | v1.1.0 (January 2nd, 2020)
71 |
72 | * Added Device Explorer
73 | * Added simulation of "doze" mode
74 | * Fixed auto search/config for location of SDK, adb executable etc so that Device Lens can run on a machine without Delphi installed
75 |
76 | v1.0.1 (October 3rd, 2019)
77 |
78 | * Fixed parsing of process list for (at least) Symbol TC70 and Lenovo Tab 3 devices
79 |
80 | v1.0.0 (September 30th, 2019)
81 |
82 | * Initial release
83 |
84 | ## Help
85 |
86 | ### Device Lens Documentation
87 |
88 | The documentation [starts here](./Docs/Index.md).
89 |
90 | ### Tutorial Videos
91 |
92 | * [Introduction to Device Lens](https://www.youtube.com/watch?v=-J3PQiLQ6bw)
93 | * Using Device Lens to help debug Delphi apps (Coming soon!)
94 |
95 | ### Slack channel
96 |
97 | If you need help beyond the documentation/videos, please [join the Delphi Worlds Slack team](https://slack.delphiworlds.com), and go to the #devicelens channel. Dave Nottage can usually answer questions from around 07:00 until 19:00 Australian Central Standard Time (GMT +9:30), however others may also be on hand.
98 |
99 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/Screenshots/ConnectedDevices.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/ConnectedDevices.png
--------------------------------------------------------------------------------
/Screenshots/DeviceExplorer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/DeviceExplorer.png
--------------------------------------------------------------------------------
/Screenshots/Filters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/Filters.png
--------------------------------------------------------------------------------
/Screenshots/LogOutput.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/LogOutput.png
--------------------------------------------------------------------------------
/Screenshots/Processes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/Processes.png
--------------------------------------------------------------------------------
/Screenshots/Screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/Screenshot.png
--------------------------------------------------------------------------------
/Screenshots/ThemeSelector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/ThemeSelector.png
--------------------------------------------------------------------------------
/Screenshots/Toolbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/Toolbar.png
--------------------------------------------------------------------------------
/Screenshots/ToolbarEx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/ToolbarEx.png
--------------------------------------------------------------------------------
/Screenshots/ToolbarEx2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DelphiWorlds/DeviceLens/e626ec75f28d9612fbba75b123c97d19e271e4b6/Screenshots/ToolbarEx2.png
--------------------------------------------------------------------------------