Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Adb connection through wifi

https://developer.android.com/studio/command-line/adb?hl=ko


 Android 11 or higher

1. Enter Developer Options > Wireless Debugging

2. Change to "Disabled" -> "In use"

3. Select device pairing by pairing code

     Check the pop-up

4. PC: adb pair ip:pair_port

     ip:pair_port is set to the information shown in the popup

5. PC: Enter the pairing code that appears in the pop-up at "Enter pairing code:"

6. PC: adb connect ip:adb_port

     Use ip and port displayed on the wireless debugging screen

7. PC: adb logcat


Android 10 or lower (also works on Android 11)

1. Developer Options > USB Debugging

2. Change to "Disabled" -> "In use"

3. Connect the device PC via USB

4. PC: adb tcpip 5555

5. PC: adb connect ip:5555

6. PC: adb logcat

Howto check android sepolicy status

Show sepolicy by process

1. connect adb to android device

2. adb shell ps -eZ

......                            
u:r:priv_app:s0:c522,c768      u10_a248      29036    825 33799276 202616 0                  0 S com.google.android.googlequicksearchbox:search    
u:r:priv_app:s0:c522,c768      u10_a247      29162    825 15532196 85196 0                   0 S com.google.process.gapps    
u:r:gmscore_app:s0:c522,c768   u10_a247      29170    825 16504752 154944 0                  0 S com.google.android.gms    
u:r:priv_app:s0:c522,c768      u10_a248      29251    825 16446808 150508 0                  0 S com.google.android.googlequicksearchbox:interactor    
u:r:untrusted_app:s0:c1,c257,c512,c768 u0_a257 29267  825 32630088 143932 0                  0 S com.android.chrome:privileged_process2    
u:r:app_zygote:s0:c512,c768    u0_a257       29274    825 16171312 74484 0                   0 S com.android.chrome_zygote    
u:r:untrusted_app:s0:c5,c257,c522,c768 u10_a261 29314 825 15570464 85916 0                   0 S com.google.android.webview:webview_service    
......

Show sepolicy by file

1. connect adb to android device

2. adb shell ls -lZ

......                            
drwxr-xr-x  18 root   system    u:object_r:tmpfs:s0                    380 2019-11-22 01:22 mnt    
drwxr-xr-x   4 root   root      u:object_r:vendor_file:s0             4096 2009-01-01 00:00 odm    
drwxr-xr-x   2 root   root      u:object_r:oemfs:s0                   4096 2009-01-01 00:00 oem    
drwxrwx--x   3 root   system    u:object_r:omr_file:s0                4096 2019-01-06 12:31 omr    
drwxr-xr-x   4 root   root      u:object_r:vendor_file:s0             4096 2009-01-01 00:00 optics    
drwxr-xr-x   7 root   root      u:object_r:system_file:s0             4096 2009-01-01 00:00 prism    
dr-xr-xr-x 846 root   root      u:object_r:proc:s0                       0 1970-01-01 09:00 proc    
drwxr-xr-x   9 root   root      u:object_r:system_file:s0             4096 2009-01-01 00:00 product    
......

 

Lognote - Log viewer, Android logcat viewer for Windows, Linux, Mac

android logcat viewer for Windows, Linux, Mac   https://github.com/cdcsgit/lognote Filtered log viewer Android logcat viewer, kotlin ...