Wednesday, September 20, 2017

Recover Grub

I am using a system which is dual boot, can be switched to windows 10 or Ubuntu 16 via grub.

Windows 10 update corrupted the grub and i see this error.

error: no such partition.
Entering rescue mode...
grub rescue>
How to resolve this.

Make a bootable USB for ubuntu 16 and boot your system in Live mode through this usb

and follow steps here
http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

This method worked for me.

Saturday, August 15, 2015

Unable to run mksdcard tool

I came across this problem when I tried to run the android studio.

According to this ticket : https://code.google.com/p/android/issues/detail?id=82711

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

this command will solve the issue on ubuntu 14.04

But I had package dependencies broken on my ubuntu.

To run this successfully  added following line

deb http://security.ubuntu.com/ubuntu trusty-security main

to /etc/apt/source.list

Then I runt the command

sudo apt-get update

then it worked fine for me!

Wednesday, July 29, 2015

Spring boot: How to set URL prefix/context for app.


 server.context-path  in application.properties file will do the magic. 

http://stackoverflow.com/questions/20405474/spring-boot-context-root

Friday, September 13, 2013

How to find the model of iPhone?

Model of the iPhone is sometimes required to update the iOS. Model of the phone is written on the backside of the box of your iPhone.

Model details of all the versions of the iPhone can be found of this link:

http://support.apple.com/kb/HT3939?viewlocale=en_US&locale=en_US

Wednesday, September 11, 2013

Why Android phone becomes slow with time..?

Android apps runs on top of Java. Each application creates its own virtual machine. Initially when android OS boots up a virtual machine 'zygote' is created, which is then forked to create every new process in the system.

With increase in the number of processes on the a system. More system resources are consumed, CPU will be more busy, context switching is increased, but this is how modern system works.

Dalvik VM, which is equivalent of JVM, is loaded for each running process. If an Android phone user has 30 apps, which is common, there is a big chance that these apps are running almost all the time. Some apps creates 'services' in android which runs in the background. For example, Facebook, google maps etc.

Even if a user has closed an app these apps keep on running in the background to provide notifications and real time updates.

Running service and apps in an Android Phone can be viewed in

Settings ->
               Applications
                                   -> Running Services


As a user keep on downloading and installing applications, chances are that these apps will be running most of the time in the form of  'services'. More apps running simultaneously will consume more CPU even if it is Quad-Core. More CPU consumption means the Phone will be more power hungry and battery consumption will also increased.

Applications like Facebook creates multiple services on Android phones. Services in android can be run as a thread in a process or it can create a separate process, but this depends on the developer of the application.

A good practice can be to only keep those apps which are useful, all other apps should be deleted to improve the phone experience.