Linux commands

Monday, May 21, 2012

cc1: warnings being treated as errors/treat warning as error in gcc

Warnings are reported as errors 

-Werror  this flag in Makefile will treat warnings as errors.

//comment this line or remove the flag
CFLAGS += -Werror


Thursday, May 10, 2012

how to make clean module in android

clean module

 $ make clean-<moudlename>
 

   eg: make clean-libxyz (to clean libxyz.so) 


 $ make clean 
   will clean entire android code 


or


 $ mm -B  
   will rebuild all the code and dependencies

Wednesday, May 9, 2012

how to pop up window/notification on startup of android


SystemUI is responsible to display the notification and alters and dialog windows with out depend on Activity. If you want to display an Alert after the boot up of android then add a peace of your code in
SystemUI apk. If any Intent is broadcasted then SystemUI broadcast receiver will receive that intent and call your function,
for  example you want to display an alert after boot completed then add code at where the Boot_COMPLETED intent should receive in SystemUI

Tuesday, May 8, 2012

how to compile apk in android


Open the Android.mk of your apk then find the 

LOCAL_PACKAGE_NAME := Settings
or
LOCAL_MODULE := 

then come the back to android base folder 

$make Settings

Apk will be generated in out folder

If apk is your properitery then install it with 

adb install -r  xyz.apk

if the apk belongs to android base code
then 

adb root
adb remount
adb push xyz.apk /system/app/

how to pop up window/notification after bootup of android

SystemUI is responsible to display the notification and alters and dialog windows with out depend on Activity. If you want to display an Alert after the boot up of android then add a peace of your code in
SystemUI apk. If any Intent is broadcasted then SystemUI broadcast receiver will receive that intent and call your function,
for  example you want to display an alert after boot completed then add code at where the Boot_COMPLETED intent should receive in SystemUI

how to flash systemui.apk


$adb root
$adb remount
$adb push SystemUI.apk /system/app/
$adb reboot
After restarting it starts with new SystemUI