similar information can already be obtained from existing commands without adb
cat /proc/meminfo|grep Mem
MemTotal: 3553360 kB
MemFree: 46344 kB
MemAvailable: 704540 kB
free -h
total used free shared buff/cache available
Mem: 3.4Gi 2.3Gi 42Mi 25Mi 1.0Gi 820Mi
Swap: 2.0Gi 1.2Gi 826Mi
am start -n com.android.settings/com.android.settings.Settings\$AppMemoryUsageActivity
termux permissions
these are all the permissions that accomplish the same thing
exit info can be granted to termux
pm grant com.termux android.permission.DUMP
pm grant com.termux android.permission.PACKAGE_USAGE_STATS
dumpsys activity exit-info com.termux
ACTIVITY MANAGER PROCESS EXIT INFO (dumpsys activity exit-info) Last Timestamp of Persistence Into Persistent Storage: 2024-07-24 22:24:05.492 package: com.termux Historical Process Exit for uid=10190 ApplicationExitInfo #0: timestamp=2024-07-24 23:17:22.764 pid=5678 realUid=10190 packageUid=10190 definingUid=10190 user=0 process=com.termux reason=8 (PERMISSION CHANGE) subreason=0 (UNKNOWN) status=0 importance=100 pss=70MB rss=183MB description=permission grant or revoke changed gids state=empty trace=null
i had to click allow here but had no gui. emulator ... -qemu -vnc :0 vnc is disabled in the goldfish emulator so no gui. it has to be granted every time it used from gui
this is not allowed in production builds. this will grant a memory log without adb in emulator by disabling security enhancement but binder still enabled
adb root
setenforce 0
dumpsys meminfo
running services can be shown from the gui only every command i tried failed even with debugging enabled
am start -n com.android.settings/com.android.settings.RunningServices
am start -n com.android.settings/com.android.settings.Settings\$RunningServicesActivity
am start -n com.android.settings/.SubSettings -e :settings:show_fragment com.android.settings.applications.RunningServices
localhost adbd
i wrote this to confirm that i need adb to debug my problem . i have no computer or wifi and hence no adb. my phone has memory problems. firefox is sometimes terminated from the foreground and AppMemoryUsageActivity show 600 meg max for firefox. logcat|grep lowmem confirm the kill of 0 oom score foreground app. it has reached 3400 meg sometimes . i have to investigate the memory usage of 200 programs that my phone is running all the time that can't be killed. when they gradually leak firefox is eventually killed at 600 meg. the stress program has reached 2600 meg of 3600 total on another occasion
i am working on removing the wifi checks for wireless debugging. the toggle button block is in WirelessDebuggingEnabler.java. there is another check that disable it when wifi disconnect that i haven't found. after that hopefully the menus will still show the port number despite there being no wifi ip address
termux debug through localhost and wifi is irrelevant
settings put global airplane_mode_on 1
settings put global adb_wifi_enabled 1
adb pair localhost:1234
adb connect localhost:1234
this will print all memory info available without adb. it turned out to be a disappointment and closing as useless. only adb can give more info
the exit reason is LOW_MEMORY with empty description . there is no more memory info without adb
sample output
similar information can already be obtained from existing commands without adb
termux permissions
these are all the permissions that accomplish the same thing
exit info can be granted to termux
i had to click allow here but had no gui.
emulator ... -qemu -vnc :0
vnc is disabled in the goldfish emulator so no gui. it has to be granted every time it used from guithis is not allowed in production builds. this will grant a memory log without adb in emulator by disabling security enhancement but binder still enabled
running services can be shown from the gui only every command i tried failed even with debugging enabled
localhost adbd
i wrote this to confirm that i need adb to debug my problem . i have no computer or wifi and hence no adb. my phone has memory problems. firefox is sometimes terminated from the foreground and AppMemoryUsageActivity show 600 meg max for firefox. logcat|grep lowmem confirm the kill of 0 oom score foreground app. it has reached 3400 meg sometimes . i have to investigate the memory usage of 200 programs that my phone is running all the time that can't be killed. when they gradually leak firefox is eventually killed at 600 meg. the stress program has reached 2600 meg of 3600 total on another occasion
i am working on removing the wifi checks for wireless debugging. the toggle button block is in WirelessDebuggingEnabler.java. there is another check that disable it when wifi disconnect that i haven't found. after that hopefully the menus will still show the port number despite there being no wifi ip address
termux debug through localhost and wifi is irrelevant