顯示具有 Android 標籤的文章。 顯示所有文章
顯示具有 Android 標籤的文章。 顯示所有文章

2013年6月28日 星期五

compile tiap_drv.ko

make -C system/wlan/ti/WiLink_AP/platforms/os/linux KERNEL_DIR= $(KERNEL) ARCH="arm" CROSS_COMPILE="$(ANDROID_BUILD_TOP)/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" HOST_PLATFORM="zoom2" REPORT_LOG=n

2013年2月25日 星期一

ramdisk and devtree for flipout

ramdisk:
    ./split_bootimg.pl CG35.smg
    mkdir ramdisk
    cd ramdisk
    gzip -dc ../CG35.smg-ramdisk.gz | cpio -i

    to new ramdisk:
    find . | cpio -o -H newc | gzip > ../newramdisk

devtree:
    apt-get install device-tree-compiler
    get device-tree directory from phone /proc
    dtc -f -I fs -O dtb -o devtree device-tree


reference: ramdisk:xda

2013年1月29日 星期二

ruth(MB511) device configure files for CM7, update rom status: RC Version 5

My ROM VERSION:
RUTEM_U3_01.14.16_DEBLUR_SIGNED_USARUTH15ND0RTINT056.0R_PDS000_USARUTHEHKTWEMARA_P011_A010_HWp3_1FF.sbf

RC version 5: v0.7.4
configure sources
gapps.zip

NOTICE:If you want update fix zip, you should use bootmenu to update.When boot at motologo,click click and click "vol -" to enter bootmenu. 
->because bootmenu executed by mot_boot_mode, so /system can't umount, only can remount.
--and update zip have to modify updater-script, remount /system.

can work:
camera
battd
fmradio
bluetooth
gps
sensors
usb connect
audio

half work:
video
-> 720p has problem.

wifi
->no softap.

ril
->I only use 2G service, so I can't test 3G.

2012年12月21日 星期五

2012年9月10日 星期一

flipout (rooted), conservative and powersave module of cpufreq

flipout has no compiled conservative and powersave of cpufreq in kernel.
but we can use compile kernel for modules.

module files:
cpufreq_conservative.ko
cpufreq_powersave.ko

BTW: flipout must be rooted.

2012年5月30日 星期三

2012年3月12日 星期一

xt502 CM7 z71 phone driver

when xt502 with CM7, the device become to z71 phone,
XP can't recognition the driver,
so we can use Google USB Driver package to install the driver.


1. download android SDK
2. use Android SDK Manager
3. in Extras, install Goole USB Driver package
4. the driver data will generated at extras directory
5. edit android_winusb.inf
the drive identify should be VID_0489&PID_C001
add to x86 or amd64


;Z71
%SingleAdbInterface%        = USB_Install, USB\VID_0489&PID_C001
%CompositeAdbInterface%     = USB_Install, USB\VID_0489&PID_C001&MI_01
;
6.install android_winusb.inf

2012年2月16日 星期四

tuning MB511 with sysctl

# white /system/etc/sysctl.conf

kernel.threads-max=4096 #max threads, smart phoen really use really use so much threads?
vm.swappiness = 0 #MB511 can't use swap, so...
vm.dirty_expire_centisecs=0
vm.dirty_writeback_centisecs=0
vm.min_free_kbytes = 4096 #keep minimum of 4MB idle space
vm.dirty_ratio = 90
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 10
vm.panic_on_oom = 2
vm.oom_kill_allocating_task = 1 #use android memory manager
kernel.panic = 5 #Enabling kernel panic reboot
kernel.shmmax = 2147483648 #256MB
kernel.shmall = 16777216 #16MB

#userinit.sh
sysctl -p

echo "1536,2048,4096,8192,16384,24576" > /sys/module/lowmemorykiller/parameters/
minfree #use android memory manager


JUST FOR FUN!!

2012年2月14日 星期二

tuning MB511


#write in userinit.sh
#use cgroup tuning cpu tasks, default init.rc can't write

busybox mkdir -p /dev/cgroup/cpu
busybox mount -t cgroup cgroup -o cpu /dev/cgroup/cpu
echo "/system/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent

busybox mkdir -m 0777 /dev/cgroup/cpu/bg_root
chown root.root /dev/cgroup/cpu/bg_root/tasks
chmod 0777 /dev/cgroup/cpu/bg_root/tasks
echo "500" > /dev/cgroup/cpu/bg_root/cpu.shares #root can get 50% cpu time?

busybox mkdir -m 0777 /dev/cgroup/cpu/bg_non_interactive
chown system.system /dev/cgroup/cpu/bg_non_interactive/tasks
chmod 0777 /dev/cgroup/cpu/bg_non_interactive/tasks
echo "200" > /dev/cgroup/cpu/bg_non_interactive/cpu.shares #system can get 20% cpu time ?

echo "1" > /dev/cgroup/cpu/notify_on_release
echo "1" > /dev/cgroup/cpu/bg_root/notify_on_release
echo "1" > /dev/cgroup/cpu/bg_non_interactive/notify_on_release

nice logcat > /system/sd/swap/$(date +%Y%m%d-%H).log &    #save log
find /system/sd/swap -mtime +3 -name "*.log" -exec rm -rf {} \ #del over 3 days log
nice /data/local/Clear.sh &
nice /data/local/SCgroupTask.sh & //60s update tasks

#Clear.sh

#!/system/bin/sh
while [ true ]
do
echo 'start'
for file in `find /system/sd/logs -mtime +3 -name '*.log' -print 2>/dev/null`
do
rm $file
done

sleep 24h
done


#SCgroupTask.sh
-----
while [ true ]
do 
    ps | grep root | awk '{print $2}' > /dev/cgroup/cpu/bg_root/tasks #add root tasks to cgroup
    ps | grep system\  | awk '{print $2}' > /dev/cgroup/cpu/bg_non_interactive/tasks  #add system tasks to cgroup
    sleep 60s
done
JUST FOR FUN!!

2012年2月10日 星期五

2008年5月6日 星期二

Android 試寫!!

本來以為Android跟寫Java差不多...沒有到還差蠻多的XD
先前碰了幾次都沒辦法適應,直到最近上課有講到XML,
才能比較瞭解要怎麼下手。

所以XML還是必須要搞懂阿!!雖然只是標籤,卻相當的重要。
試寫過後覺得要寫好一支程式好困難,
其實我應該不會寫程式XD

目前寫的感想
-res 是寫Android重要的地方
|--drawable 目前覺得是放圖片的地方
|--layout 版面配置就靠這裡去維持啦!!
|--values 顏色,字串等就靠這裡去定義

之後就是開始寫邏輯觀念了。看到Button, EditText, Label
在畫面上一整個就很興奮,可惜還是不熟怎麼寫,
一堆觀念也不懂。雖然有去找別人的教學,卻還是相當的懵懂
想要問卻不知如何問,問別人問題真的是一件困難的事。
像是程式的生命週期從以前到現在我都還沒有好好的瞭解Orz
希望以後能夠完全理解!!
還有一個最重要的地方,非常重要阿!!
英文能力好真的是非常令人羨慕,我也要好好努力T.T