ENHANCED BATTERY LIFE AND USER INTERFACE FOR AN ANDROID BASED PHONE

joyfulfightΚινητά – Ασύρματες Τεχνολογίες

10 Δεκ 2013 (πριν από 3 χρόνια και 11 μήνες)

88 εμφανίσεις


Volume
2
, No.
05
,
July

201
3 ISSN


2278
-
1080

The International Journal of Computer Science & Applications (TIJCSA)

RESEARCH PAPER

Available Online at
http://www.journalofcomputerscience.com/


© 201
3
,
http://www.journalofcomputerscience.com

-

TIJCSA

All Rights Reserved



23

ENHANCED BATTERY LIFE AND USER
INTERFACE FOR AN ANDROID BASED
PHONE

V.R.Prudhvee Bharadwaj
,

School of computer science and engineering


VIT UNIVERSITY

Vellore, India

vrpruthvi@gmail.com




Abstract:


Android is one of the
trends

in mobile operating system
s. Even though it has wide range of
applications, the power utilization for application is more which affects the battery
performance. So the android stock applications are modified for best results. As kernel plays
a vital role in computing so it is impor
tant to maintain performance while tuning for better
battery life, which is achieved through customized scripts. Modifications in the interface like
improving touch sensitivity, Stylish transition between screens, transparent task bar, etc are
also added t
o the ROM by using android kitchen. In the end a lightweight ROM is deployed
and users are given full access to clock the CPU speed and customize the interface. A cross
check is done between the existing ROM and customized ROM for projecting the
improvemen
ts. The customized ROM is applicable for daily use in android devices which
supports gingerbread version (2.3).

Keywords
-

Optimization, Android kitchen, ROM, Lightweight, Clock, Gingerbread, Power
management




1.

Introduction



Android is a software stack fo
r mobile devices that includes
Linux kernel as underlying
an operating system, middleware and key applications

[2]
. The
Android SDK

provides
the tools and APIs necessary to begin developing applications on the Android platform

V.R.Prudhvee Bharadwaj
,

The International Journal of Computer Science & Applications
(TIJCSA)

ISSN


2278
-
1080, Vol.
2

No.

05

July

201
3


© 201
3
,
http://www.journalofcomputerscience.com

-

TIJCSA

All Rights Reserved



24

using the Java programming la
nguage.
Google purchased the initial developer of the
software, Android Inc., in 2005.

The unveiling of the Android distribution in 2007 was
announced with the founding of the

Open Handset Alliance, a consortium of 86

hardware,
software, and

telecommunicat
ion

companies devoted to advancing

open standards

for
mobile devices.
Although Android is built on the top of Linux kernel and relies on the
kernel for its various OS subsystems such as scheduler, memory management, process
execution, device drivers, netwo
rking support etc., it adds its own enhancements to the
mainline kernel. So even though some literatures claim Android itself as operating
system, it is not but a software framework or stack built on the top of Linux kernel.


Major modules of this pap
er

are:



Embellishing Interface



ROM Development



Kernel Script


1.1

Embellishing Interface

In this module the user interface of existing Android version (Gingerbread 2.3) is
modified for more attractive and ease of use

[5]
. The framework part of the Gingerbread
is edited which consists of framework
-
res.apk and System
-
UI.apk.

1.2

ROM

Development

This module deals with de
ployi
ng of ROM by making use of
Android Kitchen tool
.
Preparing new ROM requires collection of system applications which doesn’t drain
battery and per
forms well

[8]
. So, apps are gathered from different version of android.

1.3

Kernel Script

A Script name 'V3' developed for the customized ROM which ca
n be flashed after
installing

the ROM (OS). Script consists of some pre defined and experimental values
consi
dered by going through several forums on web
[5]
. We first boost the SD card speed
so that it doesn’t take much time while accessing it and also it speeds up the
start
-
up

process of system
[3]
. Later some of the network values have also been changed which
re
duces the kernel processing time.


2.

Software

Requirements


The given below are the tools/utilities required by the operating system for development
of new application (including ROM) and embedding in device:



JDK 7 or higher



Android SDK (Linux / Windows vers
ion)



Eclipse IDE



Android Development Tools (ADT plug
-
in for eclipse)


V.R.Prudhvee Bharadwaj
,

The International Journal of Computer Science & Applications
(TIJCSA)

ISSN


2278
-
1080, Vol.
2

No.

05

July

201
3


© 201
3
,
http://www.journalofcomputerscience.com

-

TIJCSA

All Rights Reserved



25



Android Kitchen by dsixda (xda
-
developers.com)



Cygwin packages for setting Linux environment if working in Windows.



Android Emulator


3.


Solution Methodology


3.1

Gathering best applications
from different types of the ROM (.APK files)


For preparing new ROM we require collection of system applications which doesn’t
drain battery and performs well

[4]
. So, we have gathered apps from different version of
android.

3.2

Check compatibility of applicat
ions with base ROM

Once we have the set of apps, now we need to make sure that collected apps run in our
ROM. As customized ROM base version is Gingerbread so checking in that platform
will be enough

[2]
. In order to do this we need to import application i
nto Eclipse for
debugging but we can’t import .APK files directly into Eclipse

[9]
.


The files can be obtained from .APK by using the below tools (de
-
compilers):



APK tool
à

manifest.xml , res



Dex2jar
à

jar file



Jd
-
gui for windows
à

java files

(src)


Now place all the files under a single folder named ‘APP’

then
Main folder (App):



Res



Src



Manifest


The following are steps for checking compatibility:
-

i)

I
mport res, manifest, .xml, src into eclipse:



File
à

N
ew Android project
à

import from existing project (2
nd

option)

ii)

Now make the app compatible in Gingerbread by rectifying the errors in it. The
following are some known errors:



Missing library files



Missing attribute names



Invalid package hierarchy

iii)

After removing errors, insta
ll app in virtual emulator and test it.


V.R.Prudhvee Bharadwaj
,

The International Journal of Computer Science & Applications
(TIJCSA)

ISSN


2278
-
1080, Vol.
2

No.

05

July

201
3


© 201
3
,
http://www.journalofcomputerscience.com

-

TIJCSA

All Rights Reserved



26


3.3 ROM development:

1)

Use android kitchen to unzip the base version (2.3) file into working folder.

2)

Copy prepared .APK files into the appropriate hierarchy of working folder.

3)

Sign all APK files and check for er
rors.

4)

Give ROM name and version, deploy the .zip file

3.4

Installing

custom ROM

As said earlier

the base version is Gingerbread (2.3).So, first before installing custom
ROM, the device should be using Gingerbread 2.3.4 with

root permission

[4]
.

In order to ins
tall Gingerbread and root device, follow the instructions given in xda
-
developers.com for your phone model. After completing above process do the following
steps:
-

1.

Copy the custom ROM zip file into the SD
-
CARD.

2.

Now boot your phone into recovery mod
e
i.e., CLOCKWORKMOD (CWM) having


some version.

3.

Before installing, the ROM needs CWM 5.x version so first flash corresponding zip


file.

4.

After rebooting in recovery again, you will be presented with CWM v5 menu.

5.

Select “install fr
om SD
-
CARD”, choose the ROM file. i.e., zip file which we copied



in 1
st

step.

6.

The process of installing new ROM will complete in 10
-
15 min’s.

7.

Now reboot your phone, for first time boot process will take time.

8.

Later add Google accounts
and set your preferences (optional).

3.5


Generating Scripts:

The following are some of the commands used to change kernel values:

i.

echo:
Command used to set values for variables, works as '=' operator.

ii.

setprop:
For setting the properties of device variables.

iii.

b
usybox:
The busybox package is included in order to extend the features of terminal
in the ROM

iv.

sysctl:
The cache can be controlled in order to avoid overflow or underflow of data
using this command, etc.




The following kernel values

(variables
) have been modified:


V.R.Prudhvee Bharadwaj
,

The International Journal of Computer Science & Applications
(TIJCSA)

ISSN


2278
-
1080, Vol.
2

No.

05

July

201
3


© 201
3
,
http://www.journalofcomputerscience.com

-

TIJCSA

All Rights Reserved



27

i.

/sys/class/touch/switch/set_touchscreen:
Improving touch experience by
increasing the DPI(dots per inches) for rendering.

ii.

/proc/sys/kernel/sem:
Increased the no. of semaphores.

iii.

/proc/sys/net/ipv4/tcp_window_scaling:
Window scaling is
enabled as Android
devices have low network load.

iv.

/sys/devices/virtual/bdi/read_ahead_kb:
raising read_ahead_kb cache
-
value for
sd
-
card to 2048, etc.


For installing/enabling script, select script zip file instead of ROM zip file(step 5) in




installing ROM process.


4.


Results and
Comparison

After installing the custom ROM, the battery life and performance is tested by
subjecting the phone to constant usage

for an entire day
. Later we capture the
screenshots of battery graph g
enerated by the
android device. Fig 1

denotes the
battery usage of Gingerbread which stood up to 12 hours and ended up with low
battery i.e.
less than 15% battery. The Fig 2

is captured from the customized ROM
which last for 16 hours and with a back up of 50% remaining. H
ence from the below
graphs it is clear that battery life has been enhanced in the customized ROM when
compared to previous version (2.3).




Fig.
1
:

Gingerbread




Fig.
2
:

Mixed cream



(Existing ROM battery graph)

(
Customized ROM battery graph)




V.R.Prudhvee Bharadwaj
,

The International Journal of Computer Science & Applications
(TIJCSA)

ISSN


2278
-
1080, Vol.
2

No.

05

July

201
3


© 201
3
,
http://www.journalofcomputerscience.com

-

TIJCSA

All Rights Reserved



28





Fig. 3:

Sleep modes setting



(The phone can be made to sleep whenever it is idle by setting above option)





Fig. 4:

Changing frequencies

(For more b
attery saving, the frequency can be increased or decreased)



The maximum and minimum frequency of the CPU can be changed directly by user
and for users who don’t know about these settings can select from existing governor.


V.R.Prudhvee Bharadwaj
,

The International Journal of Computer Science & Applications
(TIJCSA)

ISSN


2278
-
1080, Vol.
2

No.

05

July

201
3


© 201
3
,
http://www.journalofcomputerscience.com

-

TIJCSA

All Rights Reserved



29









Fig. 5:

Transparent task
-
bar


(Android 4 ICS

(Ice Cream Sandwich) feature)


5.

Conclusio
n


The high
-
end devices come with advanced android version 4.0 (Ice
cream sandwich)
which has better user interface and improved battery life. While coming to the middle
class smart phones which come with android version 2.3 (Gingerbread) doesn’t have a
much better interface and battery life. The developed ROM (Mixed cream
) is extension of
Gingerbread having enhanced interface and combination of best Apps (considering both
performance and battery factor) from different ROM’s. Hence the customized ROM will
have a huge impact on economic android smart phones.


References

[
1
]

Venkatesh Pallipadi and Alexey Stari
kovskiy (2006), “The on demand Governor:
Past,

Present and Future”, In Proceedings of Linux Symposium

[
2
]

Joo
-
Young Hwang, Sang
-
Bum Suh (2008), Woo
-
Bok Yi, Jun
-
HeeKim, Ji
-

Hong Kim,

Low Power MPEG4 Player, In t
he
Proceedings of Linux Symposium
Lin
ux
Symposium
.

[
3
]

Jeff Sharkey (2009), “Coding for Life

Battery Life, That

Is”,http://code.google.com/events/io/2
009/sessions/CodingLifeBattery
Life.html.

[
4
]

http://www.netmite.com/android/mydroid/development/pdk/docs/

[
5
]

Linux_2.6.32_source/ Documentation/cpu
-
freq/governors.txt.


V.R.Prudhvee Bharadwaj
,

The International Journal of Computer Science & Applications
(TIJCSA)

ISSN


2278
-
1080, Vol.
2

No.

05

July

201
3


© 201
3
,
http://www.journalofcomputerscience.com

-

TIJCSA

All Rights Reserved



30

[
6
]

Welcome to Android,
http://source.android.com/download
.

[7]
Android Market. http://www.android.com/market/.

[8]
Android permiss
io
ns.
http://android.git.kernel.org/?p=platform/

frameworks/base.git;



a=blob;f=core/res/AndroidManifest.xml.

[9]
IPhone App Store.


http://www.apple.com/iphone/apps
-
for
-
iphone/.

[1
0] MobiStealth. http://www.mobistealth.com/.