dalvik

Android LogCat shows BufferQueueProcedure

泄露秘密 提交于 2019-12-14 02:38:10
问题 At first please excuse my bad English. I have a final version of my App (school work) - it is taking photos and after that photos are being stitched using c++ code. I tested the app on my phone Xperia mini API 15 where everything is OK on this device. But I borrowed school Nexus 5 API 21 and there are two problems. First problem is frustrating. Today, I was debugging all day without solution. I have no idea, which part of code can make this error. Whenever the app is running - don't matter if

how are system calls in android OS executed and is it possible to monitor them?

拥有回忆 提交于 2019-12-13 17:25:17
问题 I'm having some trouble understanding how system calls come into play in android app execution. From my understanding of android app execution, .class file is translated into dalvik bytecode (DEX) which is combined together to form ODEX. ODEX is then compiled with JIT compiler directly into machine code for execution. In this case, how does system call on android's linux kernel comes into play? In addition, is there any possible way to monitor these system calls? 回答1: System calls are the

compilin error: fields must have a constant size: 'variable length array in structure' extension will never be supported on android 2.3.4 source code

为君一笑 提交于 2019-12-13 05:07:52
问题 Hi I am having the following error when tried make libdvm in android 2.3.4 source code, external/elfutils/libebl/eblobjnote.c:43:17: error: fields must have a constant size: 'variable length array in structure' extension will never be supported uint32_t version[descsz / 4 - 1]; this is a genuine c error reported by gcc 4.2 on my mac os x mountain lion. I guess there is some incompability with gcc 4.2 and android 2.3.4 source code. I had to change few things to make the compilation reach this

Android & calling methods that current API doesnt have

梦想与她 提交于 2019-12-13 04:44:40
问题 If i want to get the external path like this, and device has Android 2.1 (api 7) File f; int sdkVersion = Integer.parseInt(Build.VERSION.SDK); if (sdkVersion >= 8) { System.out.println(">=8"); f = getApplicationContext().getExternalFilesDir(null); } else { System.out.println("<=7"); f = Environment.getExternalStorageDirectory(); } LogCat will display: 05-25 15:44:08.355: W/dalvikvm(16688): VFY: unable to resolve virtual method 12: Landroid/content/Context;.getExternalFilesDir (Ljava/lang

Shared Constant Pool?

…衆ロ難τιáo~ 提交于 2019-12-12 21:23:13
问题 What does it mean when the Dalvik Virtual Machine got a "Shared Constant Pool" compared to the Java Virtual Machine? How is this a benefit and how does the Dalvik Machine achieve this? 回答1: The Java virtual machine stores each class in an individual .class file. Each class file has a constant pool for things like strings, method names, class names, etc. If multiple classes reference the same string, then each class file will have a copy of that string in its constant pool. The Dalvik virtual

Are primitive types garbage collected in Android?

跟風遠走 提交于 2019-12-12 09:30:07
问题 I know this may be a dumb question, but my background is more in c++ and managing my own memory. I am currently cutting down every single allocation that I can from one of my games to try and reduce the frequency of garbage collection and perceived "lag", so for every variable that I create that is an Object (String and Rect for example) I am making sure that I create it before hand in my constructor and not create temporary variables in simple 10 line functions... (I hope that makes sense)

entrypoint of android application

寵の児 提交于 2019-12-12 07:49:26
问题 When we develop an Android application, we always start from the onCreate() method of the main activity. It is obvious that there are some initializations that should be done before calling onCreate() . My question is: what is the entrypoint point (or the main method) of an Android application? What does the Dalvik VM invoke in the very beginning (i.e., when it finishes initialization of its own, and is about to transfer control to the application)? Where can I find the code of this main ?

How is Android permission enforced?

我只是一个虾纸丫 提交于 2019-12-12 07:17:46
问题 If I call socket() function in JNI C methods, the application will still fail with a permission error. And if I put a uses-permission line in AndroidManifest.xml, the problem is fixed. So it seems Android permission check is not implemented in Dalvik virtual machine since I'm calling a native C function and still gets checked. I would like to know how where check is performed, in Android kernel, or the application is traced with something like ptrace to intercept every system call, or any

DalvikError with my Function

筅森魡賤 提交于 2019-12-12 05:40:03
问题 I wrote a function to set the background of a view depending on the android version: package com.pthuermer.juraquiz; import android.graphics.drawable.Drawable; import android.view.View; public class SupportFunctions { @SuppressWarnings("deprecation") public static void setViewBackgroundWithDrawable(View v, Drawable drawable) { if(android.os.Build.VERSION.SDK_INT < 16) { v.setBackgroundDrawable(drawable); } else { v.setBackground(drawable); } } } This is how I call it: FrameLayout fl =

Unable to execute .java file through Davik VM

天大地大妈咪最大 提交于 2019-12-12 01:09:20
问题 I am following this link I have first executed this command successfully. javac <path + filename>.java Then after when I am trying to execute following command I facing an error " class name does not match path ". dx --dex --output=<path + filename>.dex <path + filename>.class I have same name for .class and .java but I think I have to write explicit path of .class file name. So what to do now. There is some minor mistake that I am doing but not able to find. 回答1: To avoid magic number