ADB Command
ADB Command can be executed using wifi, Please follow below steps to execute adb command
First connect mobile devices using USB cable with your machine and give following command
adb tcpip 5555
restarting in TCP mode port: 5555
Cltr +z (Exit from this command)
adb connect 192.xxx.xx.xx
connected to 192.xxx.xx.xx:5555
After that disconnect mobile devices which is connected USB cable and give following command
adb connect 192.xxx.xx.xx
connected to 192.xxx.xx.xx:5555
adb devices
List of devices attached
192.xxx.xx.xx:5555 device
To disconnect from wifi give following ADB command
adb disconnect 192.xxx.xx.xx
Some of ADB command are as follows:
adb shell dumpsys cpuinfo
adb shell dumpsys wifi
adb shell dumpsys meminfo
adb shell dumpsys battery
adb shell svc wifi enable
adb shell dumpsys meminfo com.mgeek.android.DolphinBrowser.Browser
adb shell am force-stop com.mgeek.android.DolphinBrowser.Browser
adb shell dumpsys meminfo com.mgeek.android.DolphinBrowser.Browser
emulator -avd AVD_for_Nexus_S_by_Google
adb -s SH27YTV01032 shell dumpsys cpuinfo
adb -s SH27YTV01032 shell am force-stop mobi.mgeek.TunnyBrowser
aapt dump badging
adb kill-server && adb devices
adb -e reboot
adb devices -l
To Check android database content
adb -s emulator-5554 shell
sqlite3 /data/data/com.project.android.test.appName/databases/google_analytics_v4.db
.tables
select * from hits2;
To get specific log use following below adb command
adb logcat | grep "^I"
I/InputDispatcher( 581): Delivering key to: action: 0x0 (34)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (35)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (36)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (37)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (38)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (39)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (40)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (41)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (42)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (43)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (44)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (45)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (46)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (47)
O/P Of adb meminfo
To get the Activity name and package naem
adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
mCurrentFocus=Window{42521d88 u0 com.egantereon.converter/com.egantereon.converter.activities.HomeScreenActivity}
mFocusedApp=AppWindowToken{42d94dd8 token=Token{42b49878 ActivityRecord{42b49710 u0 com.egantereon.converter/.activities.HomeScreenActivity t37}}}
capabilities.setCapability("appPackage", "com.egantereon.converter");
capabilities.setCapability("appActivity", ".activities.HomeScreenActivity");
Some of tools used to get benchmark are as follows:
ADB Commands - Memory Usage
Android Assistance - Battery Usage
ATI CPU Monitor - CPU Usage
First connect mobile devices using USB cable with your machine and give following command
adb tcpip 5555
restarting in TCP mode port: 5555
Cltr +z (Exit from this command)
adb connect 192.xxx.xx.xx
connected to 192.xxx.xx.xx:5555
After that disconnect mobile devices which is connected USB cable and give following command
adb connect 192.xxx.xx.xx
connected to 192.xxx.xx.xx:5555
adb devices
List of devices attached
192.xxx.xx.xx:5555 device
To disconnect from wifi give following ADB command
adb disconnect 192.xxx.xx.xx
Some of ADB command are as follows:
adb shell dumpsys cpuinfo
adb shell dumpsys wifi
adb shell dumpsys meminfo
adb shell dumpsys battery
adb shell svc wifi enable
adb shell dumpsys meminfo com.mgeek.android.DolphinBrowser.Browser
adb shell am force-stop com.mgeek.android.DolphinBrowser.Browser
adb shell dumpsys meminfo com.mgeek.android.DolphinBrowser.Browser
emulator -avd AVD_for_Nexus_S_by_Google
adb -s SH27YTV01032 shell dumpsys cpuinfo
adb -s SH27YTV01032 shell am force-stop mobi.mgeek.TunnyBrowser
aapt dump badging
adb kill-server && adb devices
adb -e reboot
To Check android database content
adb -s emulator-5554 shell
sqlite3 /data/data/com.project.android.test.appName/databases/google_analytics_v4.db
.tables
select * from hits2;
To get specific log use following below adb command
adb logcat | grep "^I"
I/InputDispatcher( 581): Delivering key to: action: 0x0 (34)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (35)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (36)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (37)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (38)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (39)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (40)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (41)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (42)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (43)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (44)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (45)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (46)
I/InputDispatcher( 581): Delivering key to: action: 0x0 (47)
O/P Of adb meminfo
adb shell dumpsys meminfo com.package.projectName
Applications Memory Usage (kB):
Uptime: 2102199 Realtime: 2102199
** MEMINFO in pid 19514 [com.package.projectName] **
Pss Private Private Swapped Heap Heap Heap
Total Dirty Clean Dirty Size Alloc Free
------ ------ ------ ------ ------ ------ ------
Native Heap 0 0 0 0 2744 2737 6
Dalvik Heap 9625 9436 0 484 14044 12661 1383
Dalvik Other 1440 1292 0 1120
Stack 76 76 0 8
Other dev 5 0 4 0
.so mmap 736 504 12 3068
.jar mmap 4 0 4 0
.apk mmap 108 0 8 0
.ttf mmap 201 0 164 0
.dex mmap 1394 40 684 120
Other mmap 11 4 0 0
Unknown 1136 1116 0 160
TOTAL 14736 12468 876 4960 16788 15398 1389
Objects
Views: 16 ViewRootImpl: 1
AppContexts: 4 Activities: 0
Assets: 3 AssetManagers: 3
Local Binders: 17 Proxy Binders: 24
Death Recipients: 1
OpenSSL Sockets: 0
SQL
MEMORY_USED: 0
PAGECACHE_OVERFLOW: 0 MALLOC_SIZE: 0
To get the Activity name and package naem
adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
mCurrentFocus=Window{42521d88 u0 com.egantereon.converter/com.egantereon.converter.activities.HomeScreenActivity}
mFocusedApp=AppWindowToken{42d94dd8 token=Token{42b49878 ActivityRecord{42b49710 u0 com.egantereon.converter/.activities.HomeScreenActivity t37}}}
capabilities.setCapability("appPackage", "com.egantereon.converter");
capabilities.setCapability("appActivity", ".activities.HomeScreenActivity");
Some of tools used to get benchmark are as follows:
ADB Commands - Memory Usage
Android Assistance - Battery Usage
ATI CPU Monitor - CPU Usage
Comments
Post a Comment