31 December 2014

android file partition

s5

$df
Filesystem                   Size     Used     Free   Blksize
/dev                       845.9M   144.0K   845.7M      4.0K
/sys/fs/cgroup             845.9M    12.0K   845.9M      4.0K
/mnt/secure                845.9M     0.0K   845.9M      4.0K
/mnt/secure/asec           845.9M     0.0K   845.9M      4.0K
/mnt/asec                  845.9M     0.0K   845.9M      4.0K
/mnt/obb                   845.9M     0.0K   845.9M      4.0K
/system                      2.4G     2.3G   139.0M      4.0K
/data                       11.8G     8.2G     3.6G      4.0K
/cache                      31.5M     4.4M    27.1M      4.0K
/persist                     7.9M     4.0M     3.8M      4.0K
/efs                        13.8M     4.3M     9.5M      4.0K
/persdata/absolute           8.8M     4.1M     4.8M      4.0K
/firmware                   77.0M     6.8M    70.2M     16.0K
/firmware-modem             64.0M    52.3M    11.7M     16.0K
/mnt/shell/privatemode      11.8G     8.2G     3.6G      4.0K
/mnt/shell/knox-emulated    11.8G     8.2G     3.6G      4.0K
/mnt/shell/emulated         11.8G     8.2G     3.5G      4.0K



$ mount                                      
[ext4]
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,errors=panic,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/efs /efs ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persdata /persdata/absolute ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0

[vfat]
/dev/block/platform/msm_sdcc.1/by-name/apnhlos /firmware vfat ro,context=u:object_r:firmware:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware-modem vfat ro,context=u:object_r:firmware:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0


[sdcardfs [all partition has same size]]
/data/privatemode /mnt/shell/privatemode sdcardfs rw,nosuid,nodev,relatime,uid=1000,gid=1000,derive=none 0 0
/data/knox/sdcard /mnt/shell/knox-emulated sdcardfs rw,nosuid,nodev,relatime,uid=1000,gid=1000,derive=none 0 0
/data/media /mnt/shell/emulated sdcardfs rw,nosuid,nodev,relatime,uid=1023,gid=1023,derive=legacy,reserved=20MB 0 0

[tmpfs [all partition has same size]]
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=866180k,nr_inodes=128706,mode=755 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=866180k,nr_inodes=128706,mode=750,gid=1000 0 0
tmpfs /mnt/secure tmpfs rw,seclabel,relatime,size=866180k,nr_inodes=128706,mode=700 0 0
tmpfs /mnt/secure/asec tmpfs rw,seclabel,relatime,size=866180k,nr_inodes=128706,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=866180k,nr_inodes=128706,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=866180k,nr_inodes=128706,mode=755,gid=1000 0 0

[below not mention in df]
rootfs / rootfs ro,relatime 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0



--------------------------------

cm11 s5

Filesystem               Size     Used     Free   Blksize
/dev                   846.4M   132.0K   846.2M   4096
/sys/fs/cgroup         846.4M    12.0K   846.4M   4096
/mnt/asec              846.4M     0.0K   846.4M   4096
/mnt/obb               846.4M     0.0K   846.4M   4096
/mnt/fuse              846.4M     0.0K   846.4M   4096
/system                  2.4G   670.5M     1.7G   4096
/data                   11.8G     6.8G     5.0G   4096
/cache                 196.7M     4.9M   191.8M   4096
/firmware               77.0M     6.8M    70.2M   16384
/firmware-modem         64.0M    52.3M    11.7M   16384
/persist                 7.9M     4.0M     3.8M   4096
/efs                    13.8M     4.3M     9.5M   4096
/persdata/absolute       8.8M     4.1M     4.8M   4096
/mnt/shell/emulated     11.8G     6.8G     5.0G   4096



$mount
[ext4]
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 rw,seclabel,relatime,errors=panic,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,noatime,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/efs /efs ext4 rw,seclabel,nosuid,nodev,noatime,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persdata /persdata/absolute ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0

[vfat]
/dev/block/platform/msm_sdcc.1/by-name/apnhlos /firmware vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1026,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware-modem vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1026,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0

[fuse]
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

[tmpfs  [all partition has same size]]
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=866688k,nr_inodes=128961,mode=755 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=866688k,nr_inodes=128961,mode=750,gid=1000 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=866688k,nr_inodes=128961,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=866688k,nr_inodes=128961,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,seclabel,relatime,size=866688k,nr_inodes=128961,mode=775,gid=1000 0 0
-----------------
[not in mention in df]
rootfs / rootfs ro,relatime 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0

30 December 2014

android /systemp/build.prop

S5 file = /system/build.prop

ro.build.id=KOT49H
ro.build.display.id=KOT49H.G900FXXUANI4
ro.build.version.sdk=19
ro.build.version.codename=REL
ro.build.version.release=4.4.2

ro.product.name=kltexx
ro.product.device=klte
ro.product.board=MSM8974
ro.product.platform=msm8974
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.locale.language=en
ro.product.locale.region=GB
ro.product.model=SM-G900F
#  ro.build.product is obselete
ro.build.product=klte

joomla 3, cheat sheet

1)  dapatkan component options
$params = JFactory::getApplication()->getParams();
$google_apps_domain = $params->get('google_apps_domain'); 
  -variable 'google_apps_domain' define dalam administrator/components/com_mycomponent/config.xml

04 December 2014

zygote fork

Q. how does zygote exactly fork Dalvik VM?
Short Answer: Zygote process basically cold boots a VM on system start up. Once done, it listens to a socket for incoming commands. Other processes (e.g. ActivityManagerService) writes commands to this socket, whenever it needs a new process for an application. This command is read by the Zygote process and calls fork() - so the child process now gets a pre-warmed up VM in which to run. This is how zygote forks the Dalvik VM.
Long answer: (this could be really long) After kernel is loaded, init.rc is parsed and native services are started. With this, the /system/bin/app_process (Source code:frameworks/base/cmds/app_process/app_main.cpp) is run. This eventually calls AndroidRuntime.start() function (Source code: frameworks/base/core/jni/AndroidRuntime.cpp), passing it the parameters com.android.internal.os.ZygoteInit and start-system-server.
The AndroidRuntime.start() starts the Java VM, then calls ZygoteInit.main() (Source code:frameworks/base/core/java/com/android/internal/os/ZygoteInit.java), passing it the parameter start-system-server.
ZygoteInit.main() first registers the zygote socket (the zygote process listens to a socket for incoming commands, and on receiving new command, spawns a new process as requested). Next thing that happens is, it preloads a lot of classes (which is listed in frameworks/base/preloaded-classes, last I checked, 2307 lines, in android 4.0.4) and all the system-wide resources like drawables, xmls, etc. Then it calls startSystemServer() which forks a new process for com.android.server.SystemServer(Source code: frameworks/base/services/java/com/android/server/SystemServer.java). Forking of system server is a special case, because in all other cases, zygote process listens to a socket and forks for new commands, as we will see soon.
After SystemServer is forked, a function runSelectLoopMode() is called. This is a while(true) loop which basically establishes a ZygoteConnection with the zygote socket and waits for commands on it. When a command is received, ZygoteConnection.runOnce() is called (Source code:frameworks/base/core/java/com/android/internal/os/ZygoteConnection.java)
ZygoteConnection.runOnce() calls Zygote.forkAndSpecialize() (Source code:libcore/dalvik/src/main/java/dalvik/system/Zygote.java) which simply calls a natvie function to do the fork. Thus, like in the case of SystemServer, a child process is created which has a pre-warmed up Dalvik for itself.
Q. why it is not possible to run multiple applications in the same Dalvik VM?
This is a design decision as far as I know. Android guys just decided to fork a new VM per process, for security via sandboxing.




ref: http://stackoverflow.com/questions/9153166/understanding-android-zygote-and-dalvikvm

03 December 2014

git: lokasi asal (remote)

git branch -a
git remote show
git remote show origin

or

cat manifests.git/config 
[core]
        repositoryformatversion = 0
        filemode = true
[remote "origin"]
        url = /usr/local/aosp/mirror/platform/manifest.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "default"]
        remote = origin
        merge = android-4.4.2_r1
[user]
        email = siperdana@gmail.com

masalah compile android


  1. semak version java* dan jar* dalam:
    • /etc/alternatives/jar*
    • /etc/alternatives/java*
    • pastikan semua guna version sama (on ubuntu12.04):
    • /etc/alternatives/jar -> /usr/lib/jvm/java-6-oracle/bin/jar*
    • /etc/alternatives/jarsigner -> /usr/lib/jvm/java-6-oracle/bin/jarsigner*
  2. package com.sun.javadoc does not exist 
    • export PATH=/home/rev/BIN/jdk-6u34/jdk1.6.0_34/bin/:$PATH
    • buang / lepas bin
    • export PATH=/home/rev/BIN/jdk-6u34/jdk1.6.0_34/bin:$PATH 



01 December 2014

root dengan odin

http://www.ibtimes.com/how-root-samsung-galaxy-s5-all-models-android-442-kitkat-using-cf-auto-root-tutorial-1577576

vnc on ubuntu server

ref: http://rbgeek.wordpress.com/2012/06/25/how-to-install-vnc-server-on-ubuntu-server-12-04/

ubuntu 14.04
http://www.howtoforge.com/how-to-install-vnc-server-on-ubuntu-14.04