Android Full Disk Encryption Workflow (default encryption)

This study is based on Android Marshmallow. Android full disk encryption use dm-crypt, which works with block devices. Please refer to the following docs for more detail: Full Disk Encryption How to setup full disk encryption Android support forceencrypt and encryptable encryption flags, and only support ext4 and f2fs file systems. Setup forceencrypt fstab.bullhead: /dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,forceencrypt=/dev/block/platform/soc.0/f9824900.sdhci/by-name/metadata Setup encryptable fstab.hammerhead: /dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata Related Properties and source code location Related source code:...

April 29, 2016 · 3 min · oopsmonk

Dependency src specified more than once

This problem appered when I was checking out older tag from the Chromium project. Working with Release Branches ~/chromium_build/src$ git fetch --tags ~/chromium_build/src$ git checkout -b tag_35.0.1849.0 35.0.1849.0 ~/chromium_build/src$ gclient sync --with_branch_heads --jobs 16 Error log: Syncing projects: 100% ( 1/ 1) src src (ERROR) ---------------------------------------- [0:00:00] Started. ________ running 'git reset --hard HEAD' in '/home/sam.chen/chromium_source/src' [0:00:00] HEAD is now at 77bd011 Publish DEPS for Chromium 35.0.1849.0 [0:00:00] _____ src : Attempting rebase onto 77bd011602b1799f715591e697806c55e7ef8b7f....

July 31, 2015 · 1 min · oopsmonk

Build Android WebView From The Chromium Projects

First, check out and install the depot_tools package. $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $ export PATH=$PATH:/path/to/depot_tools Checkout source code $ mkdir ~/chromium_build && cd $_ ~/chromium_build$ fetch --nohooks android //Configure GYP ~/chromium_build$ echo "{ 'GYP_DEFINES': 'OS=android', }" > chromium.gyp_env //Update projects from gyp files. //You may need to run this again when you have added new files, updated gyp files, or sync'ed your repository. ~/chromium_build$ gclient runhooks Environment setup ~/chromium_build$ sudo apt-get install openjdk-7-jdk //config default JDK ~/chromium_build$ sudo update-alternatives --config javac ~/chromium_build$ sudo update-alternatives --config java ~/chromium_build$ sudo update-alternatives --config javaws ~/chromium_build$ sudo update-alternatives --config javap ~/chromium_build$ sudo update-alternatives --config jar ~/chromium_build$ sudo update-alternatives --config jarsigner //install build dependencies ~/chromium_build$ src/build/install-build-deps-android....

July 31, 2015 · 1 min · oopsmonk

How to split boot.img and get kernel config

boot_cm9.img file from mk802_legacy-compatibility_v1.zip Device: Rikomagic MK802 Script files : Split_bootimg.pl , extract-ikconfig ( in {kernel_source}/script ) Split boot.img Copy boot_cm9.img, Split_bootimg.pl, extract-ikconfig into ‘split_boot’ $ mkdir split_boot $ cd split_boot $ ./split_bootimg.pl boot_cm9.img Page size: 2048 (0x00000800) Kernel size: 8094708 (0x007b83f4) Ramdisk size: 178940 (0x0002bafc) Second size: 0 (0x00000000) Board name: Command line: console=ttyS0,115200 rw init=/init loglevel=8 Writing boot_cm9.img-kernel ... complete. Writing boot_cm9.img-ramdisk.gz ... complete. Get kernel image (boot_cm9.img-kernel) and ramdisk (boot_cm9....

September 12, 2012 · 1 min · oopsmonk

How to extract kernel config from uImage

Get extract-ikconfig in kernel-source/scripts/ $mkdir extreact-uImage $cd extreact-uImage $cp {kernel-source}/scripts/extract-ikconfig . Dump uImage skip 1024 bytes $cp {uImage/what/you/want} uImage $dd if=uImage of=dd_uImage bs=1024 skip=1 $./extract-ikconfig dd_uImage > config

August 21, 2012 · 1 min · oopsmonk

XBMC for Android on MK802

XBMC announced XBMC for Android. 不過並不打算放上Google Play, 需要自行compile及打包, 方法可參考: Build XBMC for Android on lubuntu 12.04 在此記錄一下目前在MK802跑起來的情況. MK802介紹可參考: Android 4.0 mini PC 最小的主機MK802 CPU : Allwinner A10 - ARM Cortex A8 SoC GPU : ARM Mali 400 RAM : 1GB 以公定價$79USD及讓人跌破眼鏡的入手價, 拿來玩真是夠本了. 這次是要用Android 手機來控制 XBMC, 因為MK802沒有IR只能用滑鼠操作上有些不便. Google Play上有Official XBMC Remote可直接下載來用. 中文設定: 切換到Appearance -> Setting -> International -> Language 為了能透過HTTP連到MK802的XBMC, 需要將"網站伺服"的功能打開, 設定port number 接著查看IP, 設定手機上的XBMC Remote如下: 連線成功就會出現控制選項 用手機上"Remote Control" Navigation, 測試播放USB裡的影片...

July 29, 2012 · 1 min · oopsmonk

Build XBMC for Android on lubuntu 12.04

Install required packages # sudo apt-get install build-essential default-jdk git curl autoconf \ unzip zip zlib1g-dev gawk gperf Getting the Android SDK and NDK http://developer.android.com/sdk/index.html SDK : android-sdk_r20.0.1-linux.tgz crystax-5 NDK with enabled support of C++ exceptions, RTTI and Standard C++ Library http://www.crystax.net/en/android/ndk/7#download NDK : android-ndk-r7-crystax-5.beta2-linux-x86.tar.bz2 Installing Android SDK packages <android-sdk> : $HOME/XBMC_Project/android-sdk-linux # cd <android-sdk>/tools # ./android update sdk -u -t platform,platform-tool Setup the Android toolchain <android-ndk> : $HOME/XBMC_Project/android-ndk-r8b <android-toolchain> : $HOME/XBMC_Project/android_toolchain/android-9...

July 28, 2012 · 2 min · oopsmonk