application wise battery usage on android device through adb shell dumpsys - android

how do I get application wise battery usage on android device
I have used below command and the out put listed below.
adb shell dumpsys batterystats --unplugged com.honeywell.tools.ezconfig
How do I convert below information into useful?. Like 15% battery consumed by ezconfig app.
Battery History:
-9m49s747ms 100 64020043 status=discharging health=good plug=none temp
=317 volt=4145 +wifi +wifi_running +wake_lock +sensor brightness=light signal_st
rength=great
-9m49s507ms 100 24020043 -wake_lock
-9m46s968ms 100 24020043
-9m43s749ms 100 24020043 volt=4107
-9m38s472ms 100 240a0043 status=full plug=ac temp=318 +plugged
Per-PID Stats:
PID 1184 wake time: +1s315ms
PID 5096 wake time: +1s18ms
PID 1184 wake time: +29ms
PID 1945 wake time: +188ms
PID 2125 wake time: +42ms
PID 3757 wake time: +25ms
PID 1184 wake time: +11ms
PID 1184 wake time: +12ms
PID 4008 wake time: +90ms
PID 7441 wake time: +28ms
Statistics since last unplugged:
Time on battery: 11s 275ms (1.9%) realtime, 11s 275ms (1.9%) uptime
Total run time: 9m 49s 748ms realtime, 9m 49s 748ms uptime,
Screen on: 0ms (0.0%), Input events: 0, Active phone call: 0ms (0.0%)
Screen brightnesses: No activity
Mobile total received: 0B, Total sent: 0B
Wi-Fi total received: 0B, Total sent: 0B
Total full wakelock time: 0ms , Total partial wakelock time: 1s 151ms
Signal levels: great 11s 275ms (100.0%) 0x
Signal scanning time: 0ms
Radio types: none 11s 275ms (100.0%) 0x
Radio data uptime when unplugged: 0 ms
Wifi on: 11s 275ms (100.0%), Wifi running: 11s 275ms (100.0%), Bluetooth on: 0
ms (0.0%)
Device is currently plugged into power
Last discharge cycle start level: 100
Last discharge cycle end level: 100
Amount discharged while screen on: 0
Amount discharged while screen off: 0
1000:
User activity: 6 other, 1 touch
Wake lock SCREEN_FROZEN: 187ms partial (1 times) realtime
Wake lock StartingDockService: 832ms partial (1 times) realtime
Wake lock DockObserver: 10ms partial (1 times) realtime
Wake lock AlarmManager: 56ms partial (1 times) realtime
TOTAL wake: 1s 85ms partial realtime
Sensor 21: 11s 275ms realtime (0 times)
Sensor 33: 11s 275ms realtime (0 times)
Proc mm-pp-daemon:
CPU: 0ms usr + 180ms krn ; 0ms fg
Proc charger_monitor:
CPU: 0ms usr + 20ms krn ; 0ms fg
Proc com.honeywell.licenseservice:
CPU: 0ms usr + 10ms krn ; 0ms fg
Proc com.qualcomm.qualcommsettings:
CPU: 0ms usr + 10ms krn ; 0ms fg
Proc surfaceflinger:
CPU: 70ms usr + 100ms krn ; 0ms fg
Proc com.android.settings:
CPU: 10ms usr + 0ms krn ; 0ms fg
Proc system_server:
CPU: 540ms usr + 370ms krn ; 0ms fg
Proc com.hsm.android.counters:
CPU: 20ms usr + 0ms krn ; 0ms fg
Proc com.honeywell.tools.honsystemservice:
CPU: 10ms usr + 0ms krn ; 0ms fg
Apk com.android.settings:
Service com.android.settings.bluetooth.DockService:
Created for: 1s 8ms uptime
Starts: 1, launches: 1

Related

What's the meaning of "faults" in Android ANR log?

As in the following example, besides the cpu usage value in each process, there's also a pair of "faults" values in "minor" and "major". What's the exact meaning?
ANR in com.rescuetime.android
PID: 11517
Reason: Broadcast of Intent { act=android.intent.action.SCREEN_ON flg=0x50000010 }
Load: 3.35 / 5.22 / 9.91
CPU usage from 0ms to 7475ms later with 99% awake:
97% 947/system_server: 80% user + 16% kernel / faults: 7489 minor 81 major
0.1% 269/debuggerd: 0% user + 0% kernel / faults: 4711 minor 16 major
7% 1493/com.android.phone: 3.3% user + 3.7% kernel / faults: 3615 minor 10 major
6.5% 1201/com.android.systemui: 3.3% user + 3.2% kernel / faults: 3074 minor 5 major
Yes the minor/major fault is just the minor/major page fault in Linux Kernel terminology. Explanation for them can be found on the Internet.
Android is reading such data from the proc file system. For a particular pid, the data is read from "/proc/" + pid + "/stats". One example of that is copied below:
/proc/24759 # cat stat
24759 (t_app_installer) S 2580 2580 0 0 -1 1077952832 13620 0 177 0 40 25 0 0 20 0 15 0 44123212 1066246144 12491 4294967295 2248540160 2248562159 3202042320 3202035120 2966304256 0 4612 1 1073775864 4294967295 0 0 17 6 0 0 0 0 0 2248567976 2248568832 2249576448 3202042577 3202042653 3202042653 3202043876 0
As of now, the 10th value is the minor fault. 13620 in this case. And the 12th is the major fault.

reduce the memory when starting a Service(EGL mtrack too big)

First I declared the Service at manifest:
<service android:name=".TestService"
android:process=":test">
</service>
Then, I create a Service that does nothing:
public class TestService extends Service{
#Nullable
#Override
public IBinder onBind(Intent intent) {
return null;
}
}
I started a Service with
mContext.startService(new Intent(mContext, TestService.class));
in my Application,then I found the memory usage in 'Runing App' (get there by settings-> apps-> running) is 24M.And here is the meminfo I got:
adb shell dumpsys meminfo com.mypush:test
Applications Memory Usage (kB):
Uptime: 79955214 Realtime: 87129943
** MEMINFO in pid 2452 [com.mypush:test] **
Pss Private Private Swapped Heap Heap Heap
Total Dirty Clean Dirty Size Alloc Free
------ ------ ------ ------ ------ ------ ------
Native Heap 2508 2468 0 0 12288 4916 7371
Dalvik Heap 1354 956 0 0 22320 16969 5351
Dalvik Other 400 400 0 0
Stack 136 136 0 0
Gfx dev 628 628 0 0
Other dev 4 0 4 0
.so mmap 860 336 4 0
.apk mmap 29 0 0 0
.ttf mmap 9 0 0 0
.dex mmap 156 0 4 0
.oat mmap 191 0 0 0
.art mmap 564 268 0 0
Other mmap 36 4 0 0
EGL mtrack 13888 13888 0 0
GL mtrack 3272 3272 0 0
Unknown 152 152 0 0
TOTAL 24187 22508 12 0 34608 21885 12722
Objects
Views: 0 ViewRootImpl: 0
AppContexts: 3 Activities: 0
Assets: 3 AssetManagers: 3
Local Binders: 8 Proxy Binders: 13
Parcel memory: 3 Parcel count: 12
Death Recipients: 2 OpenSSL Sockets: 0
SQL
MEMORY_USED: 0
PAGECACHE_OVERFLOW: 0 MALLOC_SIZE: 0
I am running on Android 5.0/Nexus5, and found some apps used a Service use less memory than mine.So I want to know why?
Update
I have found that the EGL mtrack dumped is about 13M, it is not normal for a app that only has a empty Service.

Camera not responding

I am using the built in camera app in android using intents like this:
final Button Capture=(Button)findViewById(sankalp.jain.sky.R.id.capture);
Capture.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
Uri fileUri;
final Intent intent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
Log.w("intent","for camera");//displayed
fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); // create a file to save the image
Log.w("getoutput","getit");//displayed
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name
Log.w("hello","hello the 2nd step");//displayed
startActivityForResult(intent,CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
}
I have implemented the relevant getOutputMediafile() method and the image gets saved in /mnt/sdcard/Pictures/Samarth/chart.png
The sdcard is 40MB and there are only 2 files presently totaling some 100KB.
The problem is that the camera works perfectly for some random number of snaps and then randomly hangs and then gives an ANR.
Its totally random,restarting the emulator doesnt work and sometimes it does.
Here is the logcat output
LOGCAT:
I/ActivityManager( 70): Displayed sankalp.jain.sky/.Tabinit: +1s364ms
W/intent ( 596): for camera
D/path ( 596): /mnt/sdcard/Pictures/Samarth
W/getoutput( 596): getit
W/hello ( 596): hello the 2nd step
I/ActivityManager( 70): Starting: Intent { act=android.media.action.IMAGE_CAPT
URE cmp=com.android.camera/.Camera (has extras) } from pid 596
D/PhoneWindow( 596): couldn't save which view has focus because the focused vie
w com.android.internal.policy.impl.PhoneWindow$DecorView#4056d7e0 has no id.
I/WindowManager( 70): Setting rotation to 1, animFlags=1
I/ActivityManager( 70): Config changed: { scale=1.0 imsi=310/260 loc=en_US tou
ch=3 keys=2/1/2 nav=3/1 orien=2 layout=34 uiMode=17 seq=13}
V/CameraHolder( 411): open camera 0
D/CameraHardwareStub( 34): initHeapLocked: preview size=320x240
I/StagefrightPlayer( 34): setDataSource('/system/media/audio/ui/camera_click.o
gg')
I/StagefrightPlayer( 34): setDataSource('/system/media/audio/ui/VideoRecord.og
g')
D/Camera ( 411): app passed NULL surface
D/CameraHardwareStub( 34): initHeapLocked: preview size=320x240
V/camera ( 411): startPreview
I/ActivityManager( 70): Displayed com.android.camera/.Camera: +1s198ms
W/OrientationEventListener( 411): Cannot detect sensors. Not enabled
E/SurfaceFlinger( 70): texture=10, using format 17, which is not supported by
the GL
V/GLRootView( 411): onSurfaceChanged: 627x470, gl10: com.google.android.gles_jn
i.GLImpl#40511140
V/GLRootView( 411): layout content pane 627x470
W/IInputConnectionWrapper( 596): showStatusIcon on inactive InputConnection
D/dalvikvm( 70): GC_EXPLICIT freed 130K, 47% free 4929K/9159K, external 3511K/
4385K, paused 795ms
V/camera ( 411): Start autofocus.
D/dalvikvm( 411): GC_EXTERNAL_ALLOC freed 34K, 51% free 2932K/5895K, external 2
480K/2565K, paused 697ms
V/camera ( 411): mAutoFocusTime = 1622ms
V/camera ( 411): doSnap: mFocusState=3
D/CameraHardwareStub( 34): initHeapLocked: preview size=320x240
D/dalvikvm( 596): GC_EXPLICIT freed 209K, 49% free 2870K/5575K, external 3065K/
3507K, paused 650ms
D/SntpClient( 70): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
I/InputDispatcher( 70): Application is not responding: Window{40751af8 com.and
roid.camera/com.android.camera.Camera paused=false}. 5014.6ms since event, 5014
.0ms since wait started
I/WindowManager( 70): Input event dispatching timed out sending to com.android
.camera/com.android.camera.Camera
I/Process ( 70): Sending signal. PID: 411 SIG: 3
I/dalvikvm( 411): threadid=4: reacting to signal 3
I/dalvikvm( 411): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 70): Sending signal. PID: 70 SIG: 3
I/dalvikvm( 70): threadid=4: reacting to signal 3
I/dalvikvm( 70): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 70): Sending signal. PID: 340 SIG: 3
I/dalvikvm( 340): threadid=4: reacting to signal 3
I/dalvikvm( 340): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 70): Sending signal. PID: 115 SIG: 3
I/dalvikvm( 115): threadid=4: reacting to signal 3
I/dalvikvm( 115): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 70): GC_EXPLICIT freed 354K, 45% free 5052K/9159K, external 3511K/
4385K, paused 157ms
E/ActivityManager( 70): ANR in com.android.camera (com.android.camera/.Camera)
E/ActivityManager( 70): Reason: keyDispatchingTimedOut
E/ActivityManager( 70): Load: 0.12 / 0.23 / 0.25
E/ActivityManager( 70): CPU usage from 42677ms to 0ms ago:
E/ActivityManager( 70): 0.3% 70/system_server: 0.1% user + 0.1% kernel / fau
lts: 5 minor
E/ActivityManager( 70): 0.3% 115/com.android.systemui: 0.2% user + 0% kernel
/ faults: 4 minor
E/ActivityManager( 70): 0.1% 340/com.android.phone: 0% user + 0% kernel / fa
ults: 4 minor
E/ActivityManager( 70): 0% 34/mediaserver: 0% user + 0% kernel
E/ActivityManager( 70): 0% 32/rild: 0% user + 0% kernel
E/ActivityManager( 70): 0% 41/adbd: 0% user + 0% kernel
E/ActivityManager( 70): 1.1% TOTAL: 0.7% user + 0.4% kernel
E/ActivityManager( 70): CPU usage from 1031ms to 1675ms later:
E/ActivityManager( 70): 10% 70/system_server: 6.2% user + 4.6% kernel
E/ActivityManager( 70): 10% 100/InputDispatcher: 7.8% user + 3.1% kernel
E/ActivityManager( 70): 34% TOTAL: 17% user + 17% kernel
I/InputDispatcher( 70): Dropping event because the pointer is not down.
D/dalvikvm( 115): GC_CONCURRENT freed 365K, 49% free 2977K/5831K, external 2169
K/2674K, paused 9ms+6ms
D/SntpClient( 70): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
W/ProcessStats( 70): Skipping unknown process pid 734
W/ProcessStats( 70): Skipping unknown process pid 735
V/BackupManagerService( 70): Backup requested but nothing pending
D/SntpClient( 70): request time failed: java.net.SocketException: Address fami
ly not supported by protocol
I/EventLogService( 266): Aggregate from 1332336498594 (log), 1332336498594 (dat
a)
D/dalvikvm( 266): GC_EXPLICIT freed 61K, 55% free 3085K/6727K, external 1625K/2
137K, paused 296ms
I could never figure out the reason myself but due to some problems when I decided to upgrade the emulator to Google API15(from API10) the camera doesn't hang anymore.
Upgrading also rectified some weird problems like
Force portrait mode in camera
Hope that helps someone.

Android download large files

I'm trying to download a large .zip file from a web server but I have a weird behaviour, the description is:
I'm executing the code in the device emulator, API level 3 (version 1.5) with an SD card of 512MB. I start the device with "Wipe data user"
The length of the size from conexion.getContentLength() is 7012725
The server address is localhost (10.0.2.2), but I've tried with an external server and the behaviour is the same. I've double checked that I can download the file through a web browser.
I have these permisions in the manifest file:
-
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
The error:
It starts downloading the file, I can see the text 10, 20, 30, 40, 50 and then it stops at 60.
After a while, the emulator reboots itself.
Workarounds:
This issue in stackoverflow is working in the device, not in my case.
About this wifi lock issue what I've done is add this permission "android.permission.WAKE_LOCK" and then this piece of code, but with exactly the same behaviour:
WifiManager.WifiLock wifilock;
WifiManager manager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
wifilock = manager.createWifiLock("wifilock");
wifilock.acquire();
...
wifilock.release();
Here is the code, that it's being executing in a separate thread:
private void downloadData(){
try{
Log.v(TAG, "downloading data");
URL url = new URL("http://10.0.2.2/1.zip");
URLConnection connection = url.openConnection();
connection.connect();
int lenghtOfFile = connection.getContentLength();
Log.v(TAG, "lenghtOfFile = "+lenghtOfFile);
InputStream is = url.openStream();
File testDirectory = new File(Environment.getExternalStorageDirectory()+"/testDirectory/");
if(!testDirectory.exists()){
testDirectory.mkdir();
}
FileOutputStream fos = new FileOutputStream(testDirectory+"/files.zip");
byte data[] = new byte[1024];
int count = 0;
long total = 0;
int progress = 0;
while ((count=is.read(data)) != -1)
{
total += count;
int progress_temp = (int)total*100/lenghtOfFile;
if(progress_temp%10 == 0 && progress != progress_temp){
progress = progress_temp;
Log.v(TAG, "total = "+progress);
}
fos.write(data, 0, count);
}
is.close();
fos.close();
Log.v(TAG, "downloading finished");
}catch(Exception e){
Log.v(TAG, "exception in downloadData");
e.printStackTrace();
}
}
Any clue?
Thank you very much.
Update with more log description:
Hi Chris, I've tried to discover what
was going on at first with this log in
the Eclipse environment. Here are a
little bit more detail about what is
happening (time - action), note that
I've changed the file to download for
another one in orther to do more
tests, but the results are quite the
same:
00:00 It starts downloading:
V/iPhoto ( 853): downloading data
V/iPhoto ( 853): lenghtOfFile = 7732809
V/iPhoto ( 853): total = 10
V/iPhoto ( 853): total = 20
V/iPhoto ( 853): total = 30
V/iPhoto ( 853): total = 40
V/iPhoto ( 853): total = 50 (round 00:05)
-> Here it stops and the DDMS disconnects the device immediately
03:40 It finish the download (not always) and the device reboots on its own:
I/Process ( 595): Sending signal. PID: 595 SIG: 3
I/dalvikvm( 595): threadid=7: reacting to signal 3
D/dalvikvm( 722): GC freed 2193 objects / 135808 bytes in 176 sec
V/iPhoto ( 853): total = 60
I/dalvikvm( 595): Wrote stack trace to '/data/anr/traces.txt'
I/ActivityManager( 595): Process com.google.android.apps.maps:FriendService (pid 778) has died.
I/ActivityManager( 595): Process com.android.mms (pid 732) has died.
V/iPhoto ( 853): total = 70
V/iPhoto ( 853): total = 80
V/iPhoto ( 853): total = 90
V/iPhoto ( 853): total = 100
V/iPhoto ( 853): downloading finished
V/iPhoto ( 853): thread finish loading
I/Process ( 595): Sending signal. PID: 595 SIG: 9
I/ActivityThread( 757): Removing dead content provider: settings
I/ActivityThread( 748): Removing dead content provider: settings
I/ActivityThread( 722): Removing dead content provider: settings
I/ActivityThread( 700): Removing dead content provider: settings
I/ServiceManager( 549): service 'package' died
... services dying...
I/ServiceManager( 549): service 'wifi' died
E/installd( 557): eof
E/installd( 557): failed to read size
I/installd( 557): closing connection
D/qemud ( 560): fdhandler_event: disconnect on fd 11
D/qemud ( 560): fdhandler_event: disconnect on fd 12
E/vold ( 550): Framework disconnected
I/Zygote ( 554): Exit zygote because system server (595) has terminated
I/ServiceManager( 549): service 'simphonebook' died
I/ServiceManager( 549): service 'isms' died
I/ServiceManager( 549): service 'iphonesubinfo' died
I/ServiceManager( 549): service 'phone' died
D/AndroidRuntime( 949):
D/AndroidRuntime( 949): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
... and starting ...
Could anyone try my code and to download a zip file with size round 8MB? Does it works for you?
I've just tried this code in a real device and it works perfectly. There must be something weird in the emulator.
The "emulator rebooting itself" does not sound good. I would recommend you start up logcat on the dev machine and log to a file... ie, on a linux dev machine something like
adb logcat | tee logfile
Then look at the logfile and see what you can learn about why it rebooted.

Application works in Android 1.5 but not 2.2

The spinning globe application unning on the emulator works on android 1.5 as target but puts out a "force close application" error in android 2.2 target. Where should i look to find the problem ?
I have enclosed the logcat details that I get,
D/MediaScanner( 183): prescan time: 4913ms
D/MediaScanner( 183): scan time: 693ms
D/MediaScanner( 183): postscan time: 45ms
D/MediaScanner( 183): total time: 5651ms
D/MediaScannerService( 183): done scanning volume internal
I/PackageManager( 67): Removing non-system package:com.android.SpinningGlobe
I/ActivityManager( 67): Force stopping package com.android.SpinningGlobe uid=10038
D/dalvikvm( 127): GC_EXPLICIT freed 12963 objects / 655936 bytes in 168ms
D/PackageManager( 67): Scanning package com.android.SpinningGlobe
I/PackageManager( 67): Package com.android.SpinningGlobe codePath changed from /data/app/com.android.SpinningGlobe-2.apk to /data/app/com.android.SpinningGlobe-1.apk; Retaining data and using new
I/PackageManager( 67): /data/app/com.android.SpinningGlobe-1.apk changed; unpacking
D/installd( 34): DexInv: --- BEGIN '/data/app/com.android.SpinningGlobe-1.apk' ---
D/dalvikvm( 255): DexOpt: load 214ms, verify 229ms, opt 5ms
D/installd( 34): DexInv: --- END '/data/app/com.android.SpinningGlobe-1.apk' success)---
W/PackageManager( 67): Code path for pkg : com.android.SpinningGlobe changing from /data/app/com.android.SpinningGlobe-2.apk to /data/app/com.android.SpinningGlobe-1.apk
W/PackageManager( 67): Resource path for pkg : com.android.SpinningGlobe changing from /data/app/com.android.SpinningGlobe-2.apk to /data/app/com.android.SpinningGlobe-1.apk
I/ActivityManager( 67): Force stopping package com.android.SpinningGlobe uid=10038
D/PackageManager( 67): Activities: com.android.SpinningGlobe.GLApp
I/installd( 34): move /data/dalvik-cache/data#app#com.android.SpinningGlobe-1.apk#classes.dex -> /data/dalvik-cache/data#app#com.android.SpinningGlobe-1.apk#classes.dex
D/PackageManager( 67): New package installed in /data/app/com.android.SpinningGlobe-1.apk
I/ActivityManager( 67): Force stopping package com.android.SpinningGlobe uid=10038
I/ActivityManager( 67): Start proc com.svox.pico for broadcast com.svox.pico/.VoiceDataInstallerReceiver: pid=256 uid=10028 gids={}
D/dalvikvm( 167): GC_EXPLICIT freed 3943 objects / 244424 bytes in 1708ms
D/dalvikvm( 67): GC_EXPLICIT freed 7297 objects / 468432 bytes in 667ms
W/RecognitionManagerService( 67): no available voice recognition services found
I/ActivityThread( 256): Publishing provider com.svox.pico.providers.SettingsProvider: com.svox.pico.providers.SettingsProvider
I/installd( 34): unlink /data/dalvik-cache/data#app#com.android.SpinningGlobe-2.apk#classes.dex
D/AndroidRuntime( 118): Shutting down VM
D/jdwp ( 118): adbd disconnected
I/AndroidRuntime( 118): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 266):
D/AndroidRuntime( 266): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 266): CheckJNI is ON
D/AndroidRuntime( 266): --- registering native functions ---
I/ActivityManager( 67): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.SpinningGlobe/.GLApp }
D/AndroidRuntime( 266): Shutting down VM
D/jdwp ( 266): adbd disconnected
I/AndroidRuntime( 266): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager( 67): Start proc com.android.SpinningGlobe for activity com.android.SpinningGlobe/.GLApp: pid=273 uid=10038 gids={1015}
I/ARMAssembler( 67): generated scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at [0x32b4a0:0x32b5ac] in 3627836 ns
D/libEGL ( 273): egl.cfg not found, using default config
D/libEGL ( 273): loaded /system/lib/egl/libGLES_android.so
D/dalvikvm( 273): GC_EXTERNAL_ALLOC freed 839 objects / 59328 bytes in 151ms
W/dalvikvm( 273): threadid=7: thread exiting with uncaught exception (group=0x4001d800)
I/ActivityManager( 67): Displayed activity com.android.SpinningGlobe/.GLApp: 4870 ms (total 4870 ms)
E/AndroidRuntime( 273): FATAL EXCEPTION: GLThread 8
E/AndroidRuntime( 273): java.lang.IndexOutOfBoundsException
E/AndroidRuntime( 273): at java.nio.IntArrayBuffer.get(IntArrayBuffer.java:63)
E/AndroidRuntime( 273): at com.android.SpinningGlobe.GLRenderer.onDrawFrame(GLRenderer.java:105)
E/AndroidRuntime( 273): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
E/AndroidRuntime( 273): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
W/ActivityManager( 67): Force finishing activity com.android.SpinningGlobe/.GLApp
I/ARMAssembler( 67): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x33f9a8:0x33fa64] in 1258819 ns
Any insights on where the problem could be ?
You should look at the log from the emulator.
You can get this on the command line using:
adb logcat
Or if you're using the ADT Plugin for Eclipse the log is visible there. If you can't see it select Window ▶ Show View ▶ Other... and then select Android ▶ LogCat.
It's probably also worth reading the Debugging page in the Android Developer Documentation.
Recompile it under 2.2 and look for deprecated warnings

Categories

Resources