Saturday, February 10, 2024

Protecting Your Android Device: The Dangers of Overheating and Overcharging

In the fast-paced digital age we live in, our smartphones have become an integral part of our daily lives. From staying connected with loved ones to managing our work and personal schedules, our Android devices serve as our lifelines. However, with increased usage and dependency on these devices, we often overlook the potential dangers associated with overheating and overcharging.

In this comprehensive guide, we'll explore the risks of overheating and overcharging your Android device, and discuss how the System MonCon app can help mitigate these dangers.

Understanding the Dangers

Overheating and overcharging are two common issues that Android device users may encounter. While smartphones are designed to handle a certain level of heat and charging, prolonged exposure to high temperatures and excessive charging can lead to serious consequences.

1. Overheating:

Android devices can overheat due to various factors such as prolonged usage, exposure to direct sunlight, or running resource-intensive apps. When your device overheats, it not only affects its performance but also poses potential risks to your safety and the longevity of your device.

  • Performance Degradation: Overheating can cause your device to slow down, freeze, or crash, making it difficult to carry out tasks effectively.
  • Battery Damage: Excessive heat can degrade your device's battery health over time, leading to reduced battery life and increased risk of battery swelling or leakage.
  • Safety Hazards: In extreme cases, overheating can pose safety hazards such as battery explosions or device malfunction, putting both you and your device at risk.

2. Overcharging:

Overcharging occurs when you leave your device plugged in for extended periods after it has reached full battery capacity. While modern smartphones are equipped with built-in mechanisms to prevent overcharging, leaving your device plugged in overnight or for prolonged periods can still have negative consequences.

  • Battery Wear: Overcharging accelerates the wear and tear of your device's battery, leading to reduced overall battery lifespan and capacity.
  • Heat Generation: Charging generates heat, and when your device remains plugged in for long periods, it can lead to excessive heat buildup, further exacerbating the risk of overheating.
  • Energy Waste: Overcharging not only harms your device's battery but also wastes electricity, contributing to unnecessary energy consumption and higher utility bills.

Introducing System MonCon: Your Guardian Against Overheating and Overcharging

System MonCon is an innovative Android application designed to monitor and manage various aspects of your device's performance, including temperature, battery health, and charging status. With its user-friendly interface and powerful features, System MonCon serves as your guardian against the dangers of overheating and overcharging.

Key Features of System MonCon:

  1. Temperature Monitoring: System MonCon provides real-time monitoring of your device's temperature, allowing you to stay informed about any temperature fluctuations that may indicate potential overheating issues. By keeping track of your device's temperature, you can take proactive measures to prevent overheating and avoid potential damage.
  2. Battery Health Analysis: With System MonCon, you can assess the health of your device's battery and track its performance over time. The app provides valuable insights into battery capacity, charge cycles, and usage patterns, empowering you to make informed decisions about your device's battery management.
  3. Charging Optimization: System MonCon offers advanced charging optimization features to help you maximize your device's battery lifespan and efficiency. The app allows you to set charging limits, schedule charging times, and receive alerts when your device reaches full charge, helping you avoid the pitfalls of overcharging.
  4. Resource Management: In addition to temperature and battery monitoring, System MonCon offers resource management tools to optimize your device's performance. You can view CPU usage, memory usage, and running processes, allowing you to identify and close resource-intensive apps that may contribute to overheating.
  5. Customizable Alerts: System MonCon allows you to customize alerts and notifications based on your preferences. Whether you want to be notified when your device overheats, reaches full charge, or experiences abnormal battery behavior, the app keeps you informed and empowered to take action.

Conclusion

In conclusion, the dangers of overheating and overcharging pose significant risks to the performance, safety, and longevity of your Android device. However, with the help of innovative solutions like System MonCon, you can proactively monitor, manage, and mitigate these risks, ensuring optimal performance and safety for your device.

By leveraging the powerful features of System MonCon, you can take control of your device's temperature, battery health, and charging habits, empowering you to safeguard your device against the perils of overheating and overcharging.

Download System MonCon today from the Google Play Store and take the first step towards protecting your Android device from potential harm. Stay informed, stay proactive, and enjoy peace of mind knowing that your device is in safe hands.



Tuesday, January 13, 2015

Encrypt Decrypt file(s) using Openssl

Wonder how to encrypt file(s) using openssl with a password?
Check my video :)


For password I have used des3 encryption in openssl.

Sunday, January 11, 2015

Secure SSH Login to Your Ubuntu VPS

Change SSH Port to something else.

Using something other than the default Port 22 for the ssh server can help avoid attacks by script kiddies. To do so, run command to edit the ssh config file:


mahesh@mknsoft.com ~
[09:41:40]⌘  vim /etc/ssh/sshd_config


Find out Port 22, change to Port 22222 or any other number between 1024 and 65536. After this step, you can do SSH access by running below command:


mahesh@mknsoft.com ~
[09:42:40]⌘  ssh 192.168.1.100 -l root -p 22222


Tuesday, December 30, 2014

Setting up Push-to-Deploy with git

Requirements:

  • I have a computer at home/office.
  • We have a VPS on web.
  • On VPS we have a location for our website i.e. /var/www/example.com
  • I need a version control system.
  • I don't want to develop and upload changes manually.
  • I want to push a specific branch i.e. www to vps for deployment.
How can I achieve my goal? Find below the answer:

1. Lets create an example directory first.


Lets create a temp directory and then create sub-directories under it.


mahesh@mknsoft.com ~
[06:43:00]⌘  mkdir test && cd test

mahesh@mknsoft.com ~/test
[06:43:14]⌘  mkdir vps dev www


dev = My development computer
vps = Virtual Private Server on Internet
www = i,e, /var/www/example.com/

2. Setup a --bare git repo in vps.



mahesh@mknsoft.com ~/test
[06:43:33]⌘  cd vps

mahesh@mknsoft.com ~/test/vps
[06:45:51]⌘  git init --bare
Initialized empty Git repository in /Users/mahesh/test/vps/


3. Setup git repo in dev, add remote and do initial commit.



mahesh@mknsoft.com (BARE:master) ~/test/vps
[06:45:59]⌘  cd ../dev

mahesh@mknsoft.com ~/test/dev
[06:49:16]⌘  git init
Initialized empty Git repository in /Users/mahesh/test/dev/.git/

mahesh@mknsoft.com (master #) ~/test/dev
[06:49:31]⌘  git remote add origin ../vps

mahesh@mknsoft.com (master #) ~/test/dev
[06:50:15]⌘  echo "Test line 1" >> file.txt

mahesh@mknsoft.com (master #) ~/test/dev
[06:50:40]⌘  git add .

mahesh@mknsoft.com (master #) ~/test/dev
[06:50:50]⌘  git commit -m "Initial commit."
[master (root-commit) 1683234] Initial commit.
 1 file changed, 1 insertion(+)
 create mode 100644 file.txt

mahesh@mknsoft.com (master) ~/test/dev
[06:51:07]⌘  git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 231 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To ../vps
 * [new branch]      master -> master


4. How to publish?


At this point we are still unable to publish anything inside www directory. Now what can I do? Humm..., this is where hooks come to picture. Lets create a hook (post-receive) inside vps to track new pushes.


mahesh@mknsoft.com (master) ~/test/dev
[06:51:21]⌘  cd ../vps/hooks

mahesh@mknsoft.com (BARE:master) ~/test/vps/hooks
[07:02:04]⌘  touch post-receive

mahesh@mknsoft.com (BARE:master) ~/test/vps/hooks
[07:02:28]⌘  chmod +x post-receive


Lets get inside post-receive and write some code as per requirement.


mahesh@mknsoft.com (BARE:master) ~/test/vps/hooks
[07:02:49]⌘  vim post-receive




  1 #!/bin/bash
  2 
  3 read oldrev newrev refname
  4 echo "Old revision  : $oldrev"
  5 echo "New revision  : $newrev"
  6 echo "Reference name: $refname"
  7 
  8 BRANCH=${refname#refs/heads/}
  9 
 10 echo "Pushed branch : $BRANCH"
 11 
 12 if [ $BRANCH = www ]; then
 13         export GIT_WORK_TREE=/Users/mahesh/test/www
 14         git checkout -f www
 15         echo "Published."
 16 else
 17         echo "Push on branch www to publish"
 18 fi


So fare so good. Lets test it out right away.


mahesh@mknsoft.com (BARE:master) ~/test/vps/hooks
[07:10:50]⌘  cd ../../dev

mahesh@mknsoft.com (master) ~/test/dev
[07:14:13]⌘  git branch www && git checkout www
Switched to branch 'www'

mahesh@mknsoft.com (www) ~/test/dev
[07:14:44]⌘  git push origin www
Total 0 (delta 0), reused 0 (delta 0)
remote: Old revision  : 0000000000000000000000000000000000000000
remote: New revision  : 168323487f78ac6e03022ed4b456e1c0e95af21b
remote: Reference name: refs/heads/www
remote: Pushed branch : www
remote: Switched to branch 'www'
remote: Published.
To ../vps
 * [new branch]      www -> www

mahesh@mknsoft.com (www) ~/test/dev
[07:15:28]⌘  ls ../www
file.txt

Note: If you push in master branch, new updates will not be published as condition specified in post-receive source code.

Thursday, December 25, 2014

Bash script - utility bin

Bash utility script files for all.
Can be useful for linux based OS users. Below is the location.

https://github.com/t2mahesh/bin

Fork, contribute or comment is welcome. Enjoy :)

Wednesday, October 8, 2014

Start a Simple Web Server from Any Director

If you haven't installed Python yet, do it right away. This thing requires Python and it's available as a module inside Python.

Navigate to the directory using your terminal window where you want the web server to start and issue the following command:

$ python -m SimpleHTTPServer 8080

It will start the web server right away.

Open web browser and goto:
http://localhost:8080

Enjoy :)


Friday, September 27, 2013

Screen Lock app for Android


Screen Lock app for Android by Prahallad is very handy for quickly locking off the device. Just a click to turn off the screen and lock the device. Animations are their so you can turn off with style. There
are various options to use the app quite smoothly. And the important thing is; it has no bugs at all, and found to be working perfectly in almost all the devices. Most such apps fail to work right on Android 4.0 and above but this Screen Lock app works just perfect and act as unbeaten from its 100s of competitors.




You get lots of options to use Screen Lock app as you need:
  1. Create a shortcut
  2. Use widget
  3. Enable in notification area
  4. Shake to lock the device
  5. Screen on and off without locking the device (Available in Pro version). Very useful one.
Features include with lock:
  1. Enable vibration upon lock
  2. Adjust vibration strength
  3. Enable lock and unlock sound
  4. Select sounds already present in your device
The development team has promised to give more features with the upcoming future releases. Some of the interesting features to be expected are:
  1. Custom name for the shortcut
  2. Various icons to choose
  3. Awesome device movement to Lock and to wakeup the device. (Will be very interesting to use)
The very interesting part is the flexibility provided with Transition Animation Scale. Unlike other such apps, this app adjusts itself with the value as set in your device, making the animation smoother and make it a perfect app. Also no screen flickering after lock is really awesome. Not to mention the icon provided with free and with pro version of this app is just outstanding.



Sunday, July 21, 2013

lsb_release error, Ubuntu 12.04

It's a crash because of TeamViewer installation, it has been reported to TeamViewer developer team. Meanwhile a solution is proposed by gerlosgm which works perfectly fine for me.


Thanks for the solution :)


Thursday, February 14, 2013

Linux terminal prompt (PS1)

I wanted to change a little bit on appearance of my terminal prompt. Don't need username and host to see but the path should be clean and clear. Also if there is a big path I find it hard to make commands. So need the path upside and the command just below that. Again some times I go root user, so lets make root user as red and normal user as green. Get my favourite PS1:

For normal user add the following line at the end of /home/<user>/.bashrc
# My custom prompt for normal user
PS1="\[$(tput setaf 2)\]\n[\w]\n# \[$(tput sgr0)\]"

Example output:
[~/path/to/dir]

For root user add the following line at the end of /root/.bashrc
# My custom prompt for root user
PS1="\[$(tput setaf 1)\]\n[\w]\n# \[$(tput sgr0)\]"

Example output:
[/etc/path/to/dir]

How is that :) ?


Tuesday, February 12, 2013

“Vi” Editor

vi filename
vi editor is a default editor of all Unix systems. It has several modes. Make sure that your terminal has correct settings, vt100 emulation works good if you are logged in using pc.
  • i for insert mode.
    • I inserts text at the curson
    • A appends text at the end of the line.
    • a appends text after cursor.
    • O open a new line of text above the curson.
    • o open a new line of text below the curson.
  • : for command mode.
    • <escape> to invoke command mode from insert mode.
    • :!sh to run unix commands.
    • x to delete a single character.
    • dd to delete an entire line
    • ndd to delete n number of lines.
    • d$ to delete from cursor to end of line.
    • yy to copy a line to buffer.
    • P to paste text from buffer.
    • nyy copy n number of lines to buffer.
    • :%s/stringA/stringb /g to replace stringA with stringB in whole file.
    • G to go to last line in file.
    • 1G to go to the first line in file.
    • w to move forward to next word.
    • b to move backwards to next word.
    • $ to move to the end of line.
    • J join a line with the one below it.
  • /string to search string in file.
  • n to search for next occurence of string.
Once you are done typing then to be in command mode where you can write/search/ you need to hit  :w filename to write, and in case you are done writing and want to exit :w! will write and exit.

Vim 7: Turning auto completion on

Omni completion isn't automatically turned on for Vim 7, and it's super useful if you code in HTML, CSS, Javascript, XML, Python etc.

In your vimrc you can add following to turn completion on:

autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType c set omnifunc=ccomplete#Complete

You complete things with CTRL-X O.


VIM Quick Command Tutorial #2

DESCRIPTION: Marks are useful when you are working in various places of a file or working in various files. You may need to jump to that place quite frequently. At this situation marks just do great.
1. List all marks
 :marks - Shows a list of marks

2. Marked file places, and global file places
 m - start marking
  a-z - for places within file
  A-Z - for places within global

3. Go to specified mark
 g' - start mark selection
  a-z - for places within file
  A-Z - for places within global
 i.e. g'C will go to C marked file place
      g'c will go to c marked place within the file

4. Deleting marks
 :delmarks a b C V - deletes the provided marks i.e. a b C and V
DESCRIPTION: Now about some buffers. These are files loaded in your current session of VIM.
5. List all buffers
 :buffers - to see all buffers list in current session

6. Working with buffer(s)
 :b 1 - b stands for buffer and 1 stands for the buffer number.
  This will load the buffer number 1 to your VIM window
  Alternatively you can give the name of the file and
  press <tab> to crawl all the relative names.

7. Deleting buffer(s)
 :bdelete! N1 N2 ...
 :bdelete! {bufname}
  N1 N2 stands for buffer number to delete
  alternatively you can give the buffer name and press
   <tab> to select the exact file you want to unload from
   buffer list

VIM Quick Command Tutorial #1

There are 3 basic modes in VIM.
a) <Esc> - Normal
b) i - Insert
c) v - Visual
1. Opening Vim
 vim            - open
 vim [filename] - open a file

2. Quit, and save
 :q! - quit without saving
 :q - quit
 :w - write
 :wq or :x - write and quit

3. Cursor moving
  k       up
 h l  left right
  j      down

 ^ - content beginning of the line
 $ - end of line
 w - move by a word
 b - move backward by a ward
 gg - go to the head of the file
 <shift>+g - go to the end of the file
 :number - to line number of 

 { - previous paragraph
 } - next paragraph

4. Editing feature
 i - insert before the cursor
 a - append after the cursor
 o - new line below
 O - new line above

5. Copy(Yank), paste, and delete
 yy - copy the whole line
 yw - copy the word
 y^ - copy to the beginning of line from cursor position
 y$ - copy to the end of the line from cursor position

 p - paste
 np - where n represents number of times to paste

 dd - delete the current line
 dw - delete the current word
 d^ - delete to the beginning of the line from cursor position
 d$ - delete to the end of the line from cursor position

6. Visual mode
 v - select within line
 V - select lines

7. Formating
 < - shift back  > - shift forward
 == auto indent

8. Repeating
 . - repeats the previous command

Format JSON string in VIM

I need to format a JSON string in a better human readable way. How do I do it? It's easy, use the following Vim command:

:%!python -m json.tool

That all :).


Monday, February 11, 2013

Disable Ubuntu One, MySql, Apache services on boot – Ubuntu 12.04

Ubuntu One is great, but when I am on battery power it just drains a lot. So what I need is, disable Ubuntu One service at startup. I can start it any time I like. But the problem is Ubuntu One is a hidden service. So let's unlock all the startup hidden services.

Open your terminal and fire up the following command:
$ sudo sed -i "s/NoDisplay=true/NoDisplay=false/g" /etc/xdg/autostart/*.desktop

Now open your "Startup Applications" GUI and you will be able to see a lot of things including Ubuntu One. Uncheck to make it disabled at startup. Enjoy :)

Use the follwing command to start or stop or to get more help later on for Ubuntu One:
$ u1sdtool --start
$ u1sdtool --quit
$ u1sdtool --help

Two other services I need on my system, but don’t want them to start unless I require them. They are running MySql and Apache.

To stop mysql from starting on boot:

sudo vim /etc/init/mysql.conf
# Comment out the following line
start on runlevel [2345]

To stop apache2 from starting on boot:
sudo update-rc.d -f apache2 remove

To enable apache2 on startup
sudo update-rc.d -f apache2 defaults


Thursday, January 24, 2013

Some useful regular expressions

HTML tags:
/<\/?[a-zA-Z][a-zA-Z0-9]*(\s+[a-zA-Z0-9]+=("|')[^("|')]+("|'))*(\s*\/)*>/g

Valid name:
/^(?:[A-Za-z]+(?:\s|$)){1,4}$/

Valid email:
/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix


Monday, November 5, 2012

Check Linux partitions and free space using terminal

To check list of partitions in partition table:

# fdisk -lu
Disk /dev/sda: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders, total 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      208844      104391   83  Linux
/dev/sda2          208845    10474379     5132767+  8e  Linux LVM


To check free space and usage details:

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      3.8G  884M  2.7G  25% /
/dev/sda1              99M   13M   82M  13% /boot
tmpfs                 252M     0  252M   0% /dev/shm


Sunday, November 4, 2012

How to remove old kernels from Ubuntu 12.04?

You might have upgraded from a previous Ubuntu release or may be your kernal is new and old ones still residing in your system. Some times we need to free space. Do the following to remove old kernels:

Open terminal and check your current kernel in use:
$ uname -r
NOTE: You must not remove this one.

To list all installed kernels on your system:
$ dpkg –list | grep linux-image

Identify all kernels that are lower than your current kernel and you want to remove. Now issue the following command to remove:
$ sudo apt-get purge linux-image-x.x.x-xx-generic-pae
NOTE: Replace all 'x' acording to your kernel version which you want to remove.

Finally, run grub2:
$ sudo update-grub2

Now reboot your system and you are all done.

Tuesday, October 30, 2012

Business Planning – 2 kinds, which to follow?

Most business planners tries to reduce the risk of failure by structuring, planning and doing market research. This approach reduces risk by removing possibilities of changes as much as possible.

You may be starting up or may be in the early stages of your business. You don't know exactly what your product will look like, who exactly are your target customers or market is. You don't know exactly what marketing strategy will bring you the best results. Your idea is innovative or innovative changes to an idea and, you need a planning approach.

There are two types of planning. You may or may not know about them.

Traditional planning

It's well known as waterfall approach and followed by most of the entrepreneur and business man. Traditional planning has four main phases:
  • Initiation
  • Planning
  • Execution
  • Closing
Plan everything, know your risk factors, competitors, do market research as much as you can.

When the product is well defined or the business is well defined you should take this model. In this traditional planning risk is reduced planning around it. Also you may develop a separate risk plan. It is fact that risk may come up. It can smack your schedule. You will never want a change to happen in your business model, because changes introduce risk and when a change happens you have to go back and re-evaluate the whole planning.

Agile Planning

This planning model is developed in software industry for dealing with situations where change isn't something that might happen, change is in the norm. If you remove or avoid changes it will results in more risk.

Everyone knows that the software industry is constantly changing. What is today, may not be tomorrow or things may changed. Try to document all the possible risks that a software company would face in next two years. You will definitely find some, but you can never guarantee about the number, type or changes of risk factors.

So do we need a new way of thinking about risk and changes? Answer is definitely yes. We need something which takes advantage of change. Using this agile strategy you can quickly respond to technology changes or to changes in user demand, also with other customers special feature request.

Can you use this planning to start your business? Think about it.
  • Why have you struggled with doing a business plan?
  • Is changes in the norm and you can't put something down because you can't define it yet?
  • If you can define the changes, are you all done?
So, try agile and see what you think. Agile is not haphazard or trial and error. It is a disciplined approach to planning that requires you to be very focused. But if you learn it and use, it can give you some amazing results for your business.

Example panning

Amuse, that you found a special idea. A software product. With agile we don't develop or plan everything. We do as we go. We go to market, we go to clients, we take suggestions and feature requests. Say your product has 1, 2, 3, 4, 5, 6 features. Each feature require 1 month time for production and release. Out of which 1, 2 and 3 are basic and it may never require a change. So bingo it's a 6 months job. You may say, Wow, let's do it. But wait, what if feature 4 and 5 got outdated after 6 months? What if feature 4 needs massive change after 6 months? Following “Traditional Planning”? Oh! No, now you need to re-evaluate almost everything.

Follow Agile:

Develop your product with just basic and raw features as required for minimal use. It is OK if you are way back from your competitors. Release it (1, 2, 3 only). Take you 3 months. Bingo, you are out in the market. Ok now consider feature 4. Is that valuable, is that in trained, is that OK to add? Ya, lets do it. How long? 1 month. Humm... users came up with change suggestions. OK we can do it quick. Next feature 5. Ya, that’s in current trained, lets do it. Done in next 1 month. Humm... some users came up with change request in feature 4. OK we are good. Lets update feature 4. Wow we are good. What next? Feature 6 or may be 7, 8, 9 feature request by users. Humm..., we are good here as well.

So, following Agile planning, you are always with current trained. You can quickly meet your user's or customer's expectation. Now think, are you any more back from your competitors? I hope you will never be.


Sunday, May 6, 2012

How To Change Mouse Cursor In Ubuntu 10.04/11.04/12.04 When Compiz Is Enabled

This bug is not fixed from Ubuntu 9.10 then fixed in 10.10 and now is back in 11.04. Found it their in latest 12.04 LTS.

The problem is when you change cursor theme it doesn't change if you have compiz turned on, it changes but it is only visible in some applications i.e. firefox.

If compiz is off then cursor theming works fine.

This instructions will fix this bug:
  1. Download cursor pack.
  2. Extract it as root to /usr/share/icons
  3. Edit as root the index.theme file located in usr/share/icons/default
  4. Change the line Inherits= to the name of your new icon theme
[Icon Theme]
Inherites=DMZ-Black

Logout and login back in, cursor will be changed.