[Terminal][Busybox] Real-time free-RAM, CPU usage and Running Processes tracking - Android Software/Hacking General [Developers Only]

Busybox is somehow considered a prerequisite when you are planning to tweak your android device, for a reason that some tweak scripts out there require them busybox pre-installed. Even they don't require busybox, it is still good to keep it handy.
After we inject some tweak scripts into our android system, we would want to keep track of important things afterwards which concerns you the most when it comes to performance. Like:
CPU usage. So we can be alerted of how the cpu is doing currently. Is it already bullied by your running processes? and which is which? is it the system or the user or some 'niced' daemons the one bullying the cpu?
Free-RAM left. Some people wants keep track of the free RAM left so once they see that the RAM is already below their self-established critical level, they then go insane and open a task manager then purge everything up. You can always check the free RAM left from the settings. But before you reach it, you need to pass different activities which is too cumbersome. So that's why you instead install a third-party app that keeps track of some system informations like free RAM.
Number of Processes running. This is obvious. This is not that relevant, but it's a good thing to keep informed of how many processes are running all in all in your system.
If you have a Terminal Emulator and Busybox, you can perform some commands that will track your cpu usage, free ram or ram usage and no. of processes running in real-time second-by-second or millisecond-by-millisecond easily and natively...
CPU-usage
This will show you a graph instead of numeric data. Each line is divided into few several parts which determines which is using most.
Command: nmeter %[c40] -d 100
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Free RAM left
This will print free ram left update every second
Command: nmeter %[mf]
No. of Running Processes
This will print the update of total running processes every second
Command: nmeter %[pn]
There are still other things you can make use of Busybox. It is rich of additional commands that you can't find on built-in Toolbox. All you need is to explore those commands. XD

Related

Storage Speed / Device Encryption

I have been toying around a bit with the feature of full phone encryption (not just the apps and data but also the "sdcard" internal storage partition.
Observation 1 (which may or not be known or evident to you already, but which I still find odd): It is possible to encrypt a "full" or half full device, but it seems to be not possible to go and decrypt the device again later on while retaiing the data (assuming the right password of course). Being a long time user of Truecrypt I find this irritating, one could of course argue it is safety measure of some kind, but I really would see no harm in enabling the possibility. As the password would of course be required to get into the system and initiate the decryption process there is no additional risk - if the attacker already has the password he can use it to gain access and copy the plaintexted data someplace else anyways. So is this caused by architecture of the pre boot authorization, just sloppy and careless coding or am I missing something vital here?
Observation 2: The performance impact with encryption enabled is worse than I would have dared to believe. I used two different SD Card Speed measurement apps from the market to test speed on a regular, non-encrypted setup and on an encrypted setup.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Encryption enabled
Plaintext operation
All other settings in the apps and the device were identical.
Is this sloppy coding or are the Snapdragon CPU just ill-equipped to handle encryption algorithms efficiently enough? I don't really want to get into a grassroots debate here over how useful encryption may or may not be on a device that most of us want s-off and rooted, therefore allowing all sorts of exploits etc. but I am honestly surprised by the heavy performance hit.
Does anyone know what algorithms are used? I assume some run of the mill AES?

[APP][2.2+] SDCard Watcher - Find out which apps clutter your SDCard

SDCard Watcher
Market Link: https://play.google.com/store/apps/details?id=com.desaster.sdcardwatcher
Description / Reasoning
Anyone who installs a lot of apps will soon find their SDCard cluttered with strange directories that don't seem to relate to any app you know. You could just remove them all, but how do you know which directories are from apps you are still using, and might contain some important data?
Since the sdcard filesystem lacks ownership info, there's really no easy way of knowing which app to blame. This app is my approach to the problem.
Basically the app lets you monitor any chosen directory for changes, and when a new file or directory is created, it checks which app is currently visible to the user, and saves this information in a database. This way, next time some app leaves an obscure directory rotting on your sdcard, you will know exactly which app to blame.
Why should you care?
Actually, you probably shouldn't. The extra bits of data often don't take any significant space on your memory card. However, it irritates me, and this app gives me a bit more of a sense of control. The XDA forum is probably the best place for me to post this app, since I know there are at least a few other like-minded people here who care about tweaking little things like these
Battery usage
The app's background process uses the kernel's inotify feature to catch changes in the filesystem, and thus uses virtually no processing power, and will not drain your battery.
Reliability
There are essentially two ways for an app to run a background service; as a background service, and as a background service with a notification icon. My app supports both ways, but the default is to run without a notification icon.
I am still unsure if android lets the service run reliably enough without the notification icon, so if you think you're missing file changes, I'd love to hear about it. In any case, the notification icon can be enabled in the settings and should help with the issue (should there be an issue).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

How To Improve Gaming In Any Android Phone

[HOW TO] Seeder 2.0
(new version) lag
reduction for all android
phones (Root Needed)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Lag reduction for ROOT USERS ONLY!
Many Android tasks run slower than
they should for one simple, yet not-so-
obvious reason: they consume large
amounts of random data from a limited
source. Random data is used to
generate session keys and unique
identifiers, in SSL and wifi, while
starting processes, and during inter-
process communication. This data
(entropy) runs out frequently, and that
causes processes reading from the
blocking device (if any) to temporarily
stop responding (lag). These processes
cannot continue until the Linux kernel
repopulates the entropy pool, which
takes time. In addition, input events are
pulled from the user interface (to refill
the pool), which may also contribute to
the problem. Seeder is a service for root
users. It assists the kernel in "topping
off" the entropy pool by re-seeding it
with data from the non-blocking (high
performance) random device.
Optionally, it can also help alleviate
MMC I/O contention by extending the I/
O queue, allowing the I/O scheduler to
make better decisions, and combine
more writes. On some devices,
applications load significantly faster
(particularly large ones like Facebook,
Chrome, and Youtube), and task
switching becomes effortless. Fewer
visual "hiccups" occur. You MUST be
running a rooted device to use this
application!
Download
4SHARED
http://www.4shared.com/android/fGHUS8Ry/Seeder_-__new-acesblogspotcom_.html
DATA FILE HOST
http://www.datafilehost.
com/download-c6fbbf96.html
RECOMMENDED SETTINGS : enable seeder :
ON
Then untick the first option and tick the
other two
Set profile to aggressive and restart ur
phone
Works Great on s5830I
Note: sometimes when u restart ur
phone u have to manually start seeder
again.... But no need to restart then.
Sent from my GT-S5830i using xda app-developers app
non root
is there any non root way
Unfortunately No.Because these performance improvement apps need to change some system files.
Why you don't root your phone
There are no disadvantages in rooting your phone:beer:
Sent from my GT-S5830i using xda app-developers app

[apps] [g tools] 12/3/14

FOR ALL ROOTED ROMS
This thread may eventually hold multiple apps related to general tools for the G3. I am happy to take suggestions on future apps that we can all use that we might find interesting. My apps are going to have a simple bare bones layout with no bells or whistles. I can't develop everything in the world but I will give it a try.
TEMPS apk
Temps is simple lightweight app that gives a data readout of all temp sensors within the G3. All data is listed per zone and refreshed every second for an accurate reading. Please don't ask me what each zone designation is. I simply don't know, and its not listed anywhere to my knowledge. The purpose of the app is simply to collect data. Nothing more.
I made it for some testing I was doing and figured maybe somebody else might have a use for it.
[emoji2]
DOWNLOAD
http://d-h.st/0KW
System Sampler application
REQUIREMENTS.
Must be rooted.
Set SeLinux to Permissive.
System Sampler is a tool to allow you to sample data deep in the system. It's great for developers and Android enthusiasts who have an interest what's happening in real time.
FEATURES.
- Adjust sampling time from 1-10 seconds.
- Set file permissions if needed to read data.
- Status bar readout viewable in any screen.
HOW TO USE.
1. Enter the file path in the box located at the top of the screen.
2. Turn on the sampling button.
3. If you are unable to read the file, use the "chmod" button to set file permissions to 777 and try again.
TIPS.
It's much easier to copy and paste the file path using the "getFilePath" application. Get it here..https://play.google.com/store/apps/details?id=net.fro9.android.app.getfilepath
POSSIBLE ISSUES.
This is a beta release!
System Sampler was built on Tasker and has only been tested on my LG G3. That being said, their may be issues with different devices with screen resolutions and the status bar readout.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
[DOWNLOAD.
Beta version 1
https://www.androidfilehost.com/?fid=23991606952615006
Future
Future2
Future3

[Guide][23/1/2020] Definitive solution for low SOT after android 10 update.

Here is the definitive solution for those suffering from low SOT and battery drain after updating to Android 10
a) 30 min video playback on mxplayer (720p movie)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
b)20 min web browsing on chrome (news articles and embedded media playback)
c)20 min web browsing on Opera mini(scrolling through forum)
So the real culprit for low SOT is poorly optimised/developed app (in my case opera mini)
--Conclusion--
1)Android 10.3.0 kernel does have reduced 'target load' (hope it might get restored to stock 90% in 10.3.1){as evidenced by checking kernel perameters and behaviour along with terminal emulator for ram usage_under root}
2)Some apps are getting released unoptimized for Android 10,they are exploiting poorly designed or rather I would say performance tuned kernels and are draining battery.
3)Battery optimization of OnePlus software won't work for such an app coz whenever it runs,either in foreground or background it will drain battery
--Solution--
1)Install an app which shows cpu states {the one I used is Ex kernel manager,it's a paid app and i use it to tweak kernel whenever i decide to root my phone,but there are free apps on playstore that offer battery stats functionality for free,download one and make sure the stats shown are that of Gold(big cluster) 825Mhz - 2803Mhz and not Silver(little cluster)}
2)Run the apps you regularly use one after another for atleast 20 min and check cpu stats before and after.
3)You will find app making cpu to run at 2.8Ghz,stop using it and find an alternative,if you can't avoid using it then hope either the app's or oneplus's next update fixes it.
Agreed, as we discussed in another thread. Since then i've seen multiple people talk about the stock kernel shooting up to high frequencies way too fast.
Wouldn't reducing the target load via EX Kernel Manager be possible ? I don't remember if the stock kernel exposes these settings in the app.

Categories

Resources