[android-kernel] In a Native C program, how to call java API: ActivityManager::getMemoryInfo()

2011-05-10 Thread linlone9
In Java program, we can use following codes to get the system memory info: === ActivityManager activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE); MemoryInfo info = new MemoryInfo(); activityManager.*getMemoryInfo*(info

[android-kernel] A simplest Application access "Content Provider"

2010-05-05 Thread linlone9
hi, Usually, we can inherit class "Activity" to access "Content Provider", such as SMS/Contacts with following codes: === public class ActivityTest extends Activity { ... private void insertSms(String str_address, String content){ ContentResolver contentResolver

[android-kernel] SGX driver impact Android phone

2009-11-23 Thread linlone9
hi In latest Android phone, SGX driver has replaced framebuffer. However I find "frameworks/base/opengl/tests/swapinterval/swapinterval.cpp" don't work well, the error output is as blow: == C:\>adb shell test-opengl-swapinterval # configs = 27 couldn't find an EGLCon

[android-kernel] How to get all the log from phone reboot to IDLE

2009-11-03 Thread linlone9
hi, I want to get all the log info from phone reboot to enter IDLE screen. Using this reboot log info, I can debug some initialized prcocess. Thanks. -- unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel

[android-kernel] After call fork(), sub-process can't be executed

2009-11-03 Thread linlone9
hi, In recent release of Android, I suddenly find the fork() will NOT run sub-process once parent-process exit. For example, following program will only output "main()", not output "sub-process continue": printf("main()\n"); pid_t pid = fork(); if

[android-kernel] Re: When issue "adb shell sendevent", I don't want ADB server redirect any printf's info to terminal at Windows CMD.

2009-03-23 Thread linlone9
My real requirement is that: sendevent will consume more than 10 seconds, so, I wish Windows CMD don't wait so long, and Windows CMD can immediately return to user-input-status. Currently I can bethink of calling close(), likely as belows: -

[android-kernel] When issue "adb shell sendevent", I don't want ADB server redirect any printf's info to terminal at Windows CMD.

2009-03-23 Thread linlone9
As you know, when issue "adb shell sendevent", the printf of sendevent will write to "/dev/pts/1", and at that time, ADB server will read from "/dev/ptmx". Finally, the printf of sendevent will show at Windows CMD. But, I don't want any printf's info is shown at Windows CMD. How to do at sendevent

[android-kernel] How to lighten LED in key driver, when user press any KEY.

2009-03-12 Thread linlone9
hi, In G1 phone, when user press any KEY, the LED that be as backlight of "HOME" KEY, will be lightened. I check Android source codes, and want to know how to lighten the LED in key driver, but, don't find any clue. I have checked following source codes: -- kern