case study: optimus one = ku3700/lu3700/su370 = optimus t = optimus s = optimus … ·...

37
Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인, leemgs.at.gmail.com) Jeongsoo Yang (Nick:들풀, yangjeongsoo.at.gmail.com) * 본 문서는 비상업적 용도에 한해서 자유롭게 수정 및 재배포 가능합니다. 단, 이 경우 그 출처를 명시해야 합니다. Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus Vortex = Optimus Chic www.kandroid.org

Upload: others

Post on 02-Aug-2020

20 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

Android based Optimus One Anatomy( Ver 0.9 )

12-25--2010, Fri

Geunsik Lim (Nick:인베인, leemgs.at.gmail.com) Jeongsoo Yang (Nick:들풀, yangjeongsoo.at.gmail.com)

ü * 본 문서는 비상업적 용도에 한해서 자유롭게 수정 및 재배포 가능합니다. 단, 이 경우 그 출처를 명시해야 합니다.

Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus Vortex = Optimus Chic

www.kandroid.org

Page 2: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

CONTENTS

1. OptimusOne Spec

2. Host Linux Environments

3. License Issues of OptimusOne

4. CPU & Memory Information

5. OptimusOne’s BSP Source Summary

6. Build Android Full source for OptimusOne

7. Build Android Kernel source for OptimusOne

8. Fastboot to update the flash filesystem

9. Make custom image for performance directly

10. Kernel internals of OptimusOne

11. Appendix. OptimusOne’s Update Flowchart

How to Solve Some Problems After Purchase

Android Technology Session

Page 3: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

3/37Korea Android Mini Seminar

LG Optimus One Specs

1. Software Google Android 2.2 (Froyo)

2. ChipsetCPU: Texas Instruments OMAP 3630 (ARMV6 Cortex-A8)Clock Speed: 600Mhz

3. Display Display Type: color transflective TFT , 262144 scales Display-Diagonal: 3.2 " Display_Resolution: 320 x 480

4. Cellular PhoneCellular-Networks: CDMA800, CDMA1900Call Alert: 72 -chord melody

5. EtcPositioning:Device: Multi-touch screen Expansion-Slots: microSD, microSDHC, TransFlash USB: USB 2.0 client, 480Mbit/s(MAX), micro-USBBluetooth: SupportedWireless+LAN: 802.11b, 802.11g Complementary: Assisted GPS, QuickGPS, Geotagging Main_Camera: 3.1 MPBattery+Capacity: 1500 mAh

Page 4: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

4/37Korea Android Mini Seminar

* Linux Distribution: Fedora 11 - http://ftp.neowiz.com/pub/fedora/releases/11/Fedora/i386/iso/Fedora-11-i386-DVD.iso

* Linux Kernel: Linux 2.6.29.6-217.2.3.fc11.i686.PAE #1 SMP

* GCC Compiler: gcc 3.4.6 20060404 (Red Hat 3.4.6-13) gcc 4.4.1 20090801 (Red Hat 4.4.1-2)

* JAVA Virtual Machine - Java(TM) 2 Runtime Environment Standard Edition (build 1.5.0_22-b03) - http://java.sun.com/javase/downloads/previous.jsp

Environment of Host Linux

Page 5: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

5/37Korea Android Mini Seminar

MemTotal: 427556 kBMemFree: 10060 kBBuffers: 4028 kBCached: 133004 kBSwapCached: 0 kBActive: 185308 kBInactive: 194332 kBActive(anon): 121880 kBInactive(anon): 124568 kBActive(file): 63428 kBInactive(file): 69764 kBUnevictable: 2760 kBMlocked: 0 kBSwapTotal: 0 kBSwapFree: 0 kB

Dirty: 24 kBWriteback: 0 kBAnonPages: 245376 kBMapped: 53952 kBShmem: 1080 kBSlab: 11440 kBSReclaimable: 3448 kBSUnreclaim: 7992 kBKernelStack: 4520 kBPageTables: 16404 kBNFS_Unstable: 0 kBBounce: 0 kBWritebackTmp: 0 kBCommitLimit: 213776 kBCommitted_AS: 6075776 kBVmallocTotal: 303104 kBVmallocUsed: 87112 kBVmallocChunk: 182276 kB

Process(Thread) and Memory Information

* Total Numbers: 612

* Kernel Threads: 46

* U/S Processes : 79

* U/S Threads: 487

●system_server 67●m.android.phone 32●e.process.gapps 29●ogle.android.gm 23●com.kakao.talk 22●d.process.acore 21

QuizQuiz

Page 6: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

6/37Korea Android Mini Seminar

I/O Memory Information

12800000-2fefffff : System RAM (493,879,295bytes)1282d000-12deafff : Kernel text (6,021,119 bytes)12e10000-130785ef : Kernel data (2,524,655 bytess)1611c000-1631bfff : kgsl_phys_memory 2ff00000-2ff3ffff : ram_console98000000-9800ffff : dmb_ebi2_phys_memorya0000000-a001ffff : kgsl_reg_memory a0000000-a001ffff : kgsla0200000-a0200fff : msm_serial_hs.0a0400000-a0400fff : msm_sdcc.1a0500000-a0500fff : msm_sdcc.2a0800000-a08003ff : msm_hsusb a0800000-a08003ff : msm_otga0a00000-a0a007ff : msm_nand_physa0d00000-a0d000ff : dmb_ebi2_cr_basea0d10000-a0d100ff : dmb_ebi2_xm_basea9900000-a9900fff : msm_i2c.0a9900000-a9900fff : msm_i2caa200000-aa2effff : mdpaa600000-aa600fff : pmdh

Page 7: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

7/37Korea Android Mini Seminar

* What are GPL l icenses that used on OptimusOne model ? - Linux, DBUS, BLUETOOTH, ALSA , and so on

   libdbus.so GPL Message Bus System Library              

   lib-bluetooth.so GPL Bluetooth library (bluez-plugin )          

   libalsa.so(libsnd.so) GPL Advanced Linux Sound Architecture (ALSA)      

   wireless.ko GPL kernel module for broadcom wireless device driver             

Linux Kernel GPL Kernel source by Linus Tovalds

* Offic ial Notice for providing source code (Setting Menu)LG Electronics offers to provide source code to you on CD-ROM for a chargecovering the cost of performing such distribution, such as the cost of media,shipping and handling upon e-mail request to LG Electronics at [email protected] offer is valid for a period of three years from the date of thedistribution of the product by LG Electronics. (http://opensource.lge.com)

Open-source License Technical Issues

Page 8: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

8/37Korea Android Mini Seminar

Android 기반 모바일 폰의 Android 2.2소스를 정상 빌드 후에 빌드된 이미지 (예: zImage(Kernel) , ramdisk.img , system.img, userdata.img)를Android Phone에 탑재하기 위해 판매회사의 담당자에게 해당 지침서 또는 가이드를 요청.

SFLC( Software Freedom Law Center; www.softwarefreedom.org )의 권고 준수사항에 의하면, 오픈소스 제공의무의 범위는 “GPL관련 소스들의 컴파일 결과물을 제품에 탑재하는 것에 대한 가이드 까지 제공해야 하는 것”을 의무조항으로 하고 있다.

SFLC 기관에서 소스코드의 제공 범위에 대해서 아래와 같이 해석하고 있다.

• GPLV2/V3(Original Code) -> 생산/배포자 -> GPLV2/V3 based S/W release ->Open sources [ (1) Related source code + (2) Items “needed to generate +(3) install & run” the GPL’d programs ] -> End User(Customers)

해당 라이센스의 준수사항에 대해 질의 내용 및 요구사항들이 있다면,www.softwarefreedom.org 및 gpl-violation.org에 해당 사항에 대해 논의가 가능하다. 라인센스 조항 미 준수사항이 밝혀지게 되는 경우 관련 회사는 브랜드 이미지 실추 및 클레임에 대한 제바 비용을 감당해야 한다.또한, 자유 소프트웨어 해커들로부터 전반적인 제품에 대한 보다 적극적인 위반여부를 감시받을 수 있다.

Open-source License Legal Issues

Page 9: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

9/37Korea Android Mini Seminar

Android Applications for H/W Benchmark

* Quadrant Standard Edition (CPU, Memory, I/O, 2D/3D graphics)

*J android hacker's system tool : CPU Frequency Moni-toring

* DEQP-Mini: the quality of the graphics support(OpenGL ES 2.0 benchamrk) in your device

Subset of aroung 400 OpenGL ES 2.0 tests

Page 10: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

10/37Korea Android Mini Seminar

geunsik@f11#>geunsik@f11#>geunsik@f11#> sudo yum install git-core gnupg sun-java5-jdk \flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev \build-essential zip curl libncurses5-dev zlib1g-dev valgrind libpng libpng-dev

Necessary packages in Host Linux PC

Page 11: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

11/37Korea Android Mini Seminar

geunsik@f11#>geunsik@f11#> yum install compat-gcc*geunsik@f11#> rpm -qa | grep compat-gcccompat-gcc-34-3.4.6-9.i386compat-gcc-34-c++-3.4.6-9.i386compat-gcc-34-g77-3.4.6-9.i386

geunsik@f11#>geunsik@f11#> vi /etc/profile# http://java.sun.com/javase/downloads/previous.jspexport JAVA_HOME=/usr/lib/jvm/jdk1.5.0_22export PATH=.:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:/home/invain/bin:$PATHexport ANDROID_JAVA_HOME=$JAVA_HOMEgeunsik@f11#>geunsik@f11#> source /etc/profile

Installation GCC & JAVA to build android full source

Page 12: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

12/37Korea Android Mini Seminar

geunsik@f11#> cd /opt/mydroid-froyogeunsik@f11#> wget http://android.git.kernel.org/repogeunsik@f11#> chmod 755 repogeunsik@f11#> repo init -u \ git://android.git.kernel.org/platform/manifest.git -b froyogeunsik@f11#> time repo sync

Download Android Full source from official web-site

Page 13: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

13/37Korea Android Mini Seminar

* Contacts : “  OpenSource” <[email protected]> “OpensourceMC” <[email protected]>

* Official URL: http://opensource.lge.com - Mobile Phone - “KU3700”

* BSP files : KU3700_Android_Froyo_OpenSource.zip (99MB) 1) LG-KU3700_kernel.tar.gz (65MB) 2) LG-KU3700_android.tar.gz (34MB)

Download OptimusOne BSP source from LGE

61.0MB ./dalvik95.0MB ./external13.0MB ./hardware01.9MB ./vendor

Page 14: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

14/37Korea Android Mini Seminar

geunsik@f11#> du -sh ./OptimusOne_OpenSource_V2.2-20101105              

4.0K ./Makefile13M ./bionic4.2M ./bootable4.1M ./build74M ./cts97M ./dalvik39M ./development9.6M ./device750M./external303M./frameworks37M ./hardware374M./kernel61M ./ndk

3.9G3.9G ./out./out98M ./packages945M./prebuilt14M ./sdk26M ./system1.9M ./vendor

Sub-directories information

Page 15: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

15/37Korea Android Mini Seminar

geunsik@f11#> cd /opt/mydroid-froyogeunsik@f11#> cp -arf /opt/KU3700/ku3700_opensource_android/* /opt/mydroid-froyo/

geunsik@f11#> cd /opt/mydroid-froyogeunsik@f11#> cp -arf /opt/KU3700/kernel /opt/mydroid-froyo/

Merge BSP into Android 2.2 Generic source

Page 16: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

16/37Korea Android Mini Seminar

geunsik@f11#> cd /opt/mydroid-froyo/kernelgeunsik@f11#> cp -arf ../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1 /usr/local/

geunsik@f11#> vi /etc/profile# Crosscompiler env setting for OptimusOne 2.2(Froyo)export PATH=$PATH:/usr/local/arm-eabi-4.2.1/bin/

geunsik@f11#> make ku3700-perf_defconfiggeunsik@f11#> ls -al ./arch/arm/boot/

- zImage(3.0MB ; Image 6.7MB) file will be located in ./arch/arm/boot/ directory.   

Build Kernel Source (Linux 2.6.32 base) 1/2

* “ku3700-perf_defconfig” 환경파일의 주요 구성 내용. CPU : Qualcom MSM7X27 (ARM V6 32Bit ARM1136jf-S @600Mhz). ARM THUMB Support. ARM TLB V6. Preemptible Mode (Preemption Mode). OABI Compatibile Mode. Command Mode: init=/sbin/init root=/dev/ram rw initrd=0x11000000,16M console=ttyDCC0 mem=88M

Page 17: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

17/37Korea Android Mini Seminar

*arch/arm/mach-msm/dma_test.ko *arch/arm/mach-msm/reset_modem.ko *crypto/ansi_cprng.ko *drivers/input/evbug.ko *drivers/input/lgosp-hid/lgosp-hid.ko *drivers/misc/pmem_kernel_test.ko *drivers/mtd/tests/mtd_oobtest.ko *drivers/mtd/tests/mtd_pagetest.ko *drivers/mtd/tests/mtd_readtest.ko *drivers/mtd/tests/mtd_speedtest.ko *drivers/mtd/tests/mtd_stresstest.ko *drivers/mtd/tests/mtd_subpagetest.ko *drivers/mtd/tests/mtd_torturetest.ko *drivers/net/wireless/bcm4325/wireless.ko *drivers/net/wireless/libra/librasdioif.ko *drivers/scsi/scsi_wait_scan.ko

Build Kernel Source (Linux 2.6.32 base) 2/2

geunsik@f11#> make -j 4 ; make modules ; geunsik@f11#> sudo make modules_installgeunsik@f11#> tree /lib/modules/2.6.32.9/kernel/

Page 18: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

18/37Korea Android Mini Seminar

* Do we have to select Preemptible Linux Kernel for real-time characteristics?* How to optimize for size reduction (tools: dumpstae, getprop, ps )

Can You customize Linux Kernel Really? 1/2

* Linux version 2.6.32.9 (mclab1@lge) (gcc ver-sion 4.4.0 (GCC) ) #3 PREEMPT Fri Sep 24 14:31:02 KST 2010

/proc/config.gz

Page 19: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

19/37Korea Android Mini Seminar

* Tune BogoMIPS for the faster operation and arithmetic* Will we use YAFFS2 instead of EXT2/3/4 for high performance of Nand storage?

Can You customize Linux Kernel Really? 2/2

/proc/config.gz

●Processor : ARMv6-compatible processor rev 5 (v6l)●BogoMIPS : 245.61●Features : swp half thumb fastmult vfp edsp java ●CPU implementer : 0x41●CPU architecture: 6TEJ●CPU variant : 0x1●CPU part : 0xb36●CPU revision : 5●Hardware : KU3700 Global board (LGE KU3700)●Revision : 0000●Serial : 0000000000000000

Page 20: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

20/37Korea Android Mini Seminar

geunsik@f11#> cd /opt/mydroid-froyogeunsik@f11#> . ./build/envsetup.sh 

including device/htc/dream/vendorsetup.shincluding device/htc/passion/vendorsetup.shincluding device/htc/sapphire/vendorsetup.sh

geunsik@f11#> time -j4 make  

geunsik@f11#>

Build android full source including BSP

* TroubelShooting1) rm -f ./dalvik/libcore/xml/src/main/java/org/apache/xml/serializer/utils/./SerializerMessages_de.java

2) chmod -R 755 ./external ( permission of executable file )3) yum install -y iibpng*4) make update-api (out/target/common/obj/PACKAGING/checkapi-current-timestamp] error 38)

==============================PLATFORM_VERSION_CODENAME=RELPLATFORM_VERSION=2.2.1TARGET_PRODUCT=genericTARGET_BUILD_VARIANT=engTARGET_SIMULATOR=TARGET_BUILD_TYPE=releaseTARGET_BUILD_APPS=TARGET_ARCH=armHOST_ARCH=x86HOST_OS=linuxHOST_BUILD_TYPE=releaseBUILD_ID=MASTER==============================

Page 21: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

21/37Korea Android Mini Seminar

- *.img fi le wil l be located in ./out/target/product/generic/ directory.

geunsik@f11#>geunsik@f11#>geunsik@f11#> ls ./out/target/product/generic/ -al

-rw-rw-r-- 1 invain invain 7 2010-11-13 15:19 android-info.txt-rw-rw-r-- 1 invain invain 8866 2010-11-13 15:54 clean_steps.mkdrwxrwxr-x 3 invain invain 4096 2010-11-13 15:21 data-rw-rw-r-- 1 invain invain 15655 2010-11-13 16:01 installed-files.txtdrwxrwxr-x 13 invain invain 4096 2010-11-13 16:01 obj-rw-rw-r-- 1 invain invain 50 2010-11-13 15:54 previous_build_config.mk-rw-rw-r-- 1 invain invain 164888 2010-11-13 15:34 ramdisk.imgdrwxrwxr-x 8 invain invain 4096 2010-11-13 15:34 rootdrwxrwxr-x 4 invain invain 4096 2010-11-13 15:33 symbolsdrwxrwxr-x 10 invain invain 4096 2010-11-13 15:34 system-rw------- 1 invain invain 59032512 2010-11-13 16:01 system.img-rw------- 1 invain invain 1461504 2010-11-13 15:31 userdata.imggeunsik@f11#>

Image files for Android based Real phone

Page 22: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

22/37Korea Android Mini Seminar

* system.imgTarget1 : ./out/target/product/<BOARD>/obj/PACKAGING/systemimage_unopt_intermediates/system.img./out/host/linux-x86/bin/mkyaffs2image -f -s 2048 out/target/product/<BOARD>/system \./out/target/product/<BOARD>/obj/PACKAGING/systemimage_unopt_intermediates/system.img \

Target2 : ./out/target/product/<BOARD>/system.img./out/host/linux-x86/bin/acp -fpt \./out/target/product/<BOARD>/obj/PACKAGING/systemimage_unopt_intermediates/system.img \./out/target/product/<BOARD>/system.imgchmod a+r ./out/target/product/<BOARD>/system.img

* userdata.img./out/host/linux-x86/bin/mkyaffs2image -f -s 2048 \ ./out/target/product/<BOARD>/data ./out/target/product/<BOARD>/userdata.img chmod a+r ./out/target/product/<BOARD>/userdata.img

How to modify *.image that you want only. 1/2

Page 23: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

23/37Korea Android Mini Seminar

* ramdisk.imgTarget : ./out/target/product/<BOARD>/ramdisk.img./out/host/linux-x86/bin/mkbootfs ./out/target/product/<BOARD>/root | \./out/host/linux-x86/bin/minigzip > ./out/target/product/KU3700/ramdisk.img

* boot.img = Kernel + ramdisk.img Target : ./out/target/product/<BOARD>/boot.img./out/host/linux-x86/bin/mkbootimg --kernel ./out/target/product/<BOARD>/kernel \ --ramdisk ./out/target/product/<BOARD>/ramdisk.img --cmdline "console=ttyMSM1,115200n8" \ --base 0x20000000 --pagesize 2048 --output out/target/product/<BOARD>/boot.img

How to modify *.image that you want only. 2/2

Page 24: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

24/37Korea Android Mini Seminar

Rooting of OptimusOne for Linux users (방법1)1. Setting of phone1.1 Setting – Application – Development – USB Debugging --> Connect USB Debugging1.2 Connect ADB cable between PC and Phone --> Check Debug mode

2. Install ncurse/stcc++ libraries(for ADB) , Mono(for *.exe), Winforms(for Mono)U104#>apt-get install -y lib32ncurses5 lib32stdc++ mono libmono-winforms2.0-cil F11#> yum install -y compat-libstdc++* mono*F11#> unzip SuperOneClickv1.5.5-ShortFus.zipF11#> chmod 755 adblinuxF11#> ./adblinux devicesList of devices attached LG_ANDROID_KU3700** deviceF11#> ./adblinux shell iduid=0(root) gid=0(root)F11#> sudo mono SuperOneClick.exe --> Click “root” menu

3. Start “Superuser” application in the phone4. Utilize “root explorer” or “z4root” application to delete unnecessary files after you get the Root privilege.

AdbWinApi.dllAdbWinUsbApi.dllSuperOneClick.exeSuperuser.apkadb.exeadblinuxadbmacbusyboxrageagainstthecagesqlite3su

*SuperOneClick.exe: PE32 executable for MS Windows (GUI) Intel 80386 32-bit Mono/.Net assembly

Page 25: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

25/37Korea Android Mini Seminar

f11#> ./adb push rageagainstthecage /data/local/tmp/rageagainstthecagef11#> ./adb shellandroid# cd /data/local/tmpandroid# chmod 4755 rageagainstthecageandroid# ./rageagainstthecage

f11#> ./adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

f11#> ./adb push su /system/binf11#> ./adb push Superuser.apk /system/appf11#> ./adb shell chmod 4755 /system/bin/su

f11#> ./adb shell rm /data/local/tmp/rageagainstthecagef11#> ./adb reboot

Run “Terminal Emulator” Android S/W android$ suandroid# id

Rooting of OptimusOne for Linux users (방법2)

Page 26: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

26/37Korea Android Mini Seminar

Manufacturer USB Vendor ID

Acer 0502

Dell 413c

Foxconn 0489

Garmin-Asus 091E

HTC 0bb4

Huawei 12d1

Kyocera 0482

LG 1004

Motorola 22b8

Nvidia 0955

Pantech 10A9

Samsung 04e8

Sharp 04dd

Sony Ericsson 0fce

ZTE 19D2

This table provides a reference to the vendor IDs needed in order to add USB de-vice support on Linux. The USB Vendor ID is the value given to the SYSFS{idVendor} property in the rules file, as described in udev setting step.

USB Vendor IDs

F11#> vi /etc/udev/rules.d/99-android.rules SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8",

SYMLINK+="android_adb",MODE="0666"SUBSYSTEM=="usb", ATTRS{idVendor}=="1004",

SYMLINK+="android_adb",MODE="0666"

Page 27: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

27/37Korea Android Mini Seminar

OptimusOne’s Official Firmware Update

(1)

(2)

(3)

(4)(5)

14minutes

* Official Download : http://www.cyon.co.kr/

Page 28: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

28/37Korea Android Mini Seminar

2. Usageusage: fastboot [ <option> ] <command>

3. Commands:update <filename> reflash device from update.zip                    flashall ‘flash boot’ + ‘flash system’                               flash <partition> [ <filename> ] write a file to a flash partition        erase <partition> erase a flash partition                     getvar <variable> display a bootloader variable                   boot <kernel> [ <ramdisk> ] download and boot kernel      flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it   devices list all connected devices                           reboot reboot device normally                           reboot-bootloader reboot device into bootloader                   

4. options:

-w erase userdata and cache                                  -s <serial number> specify device serial number                     -p <product> specify product name                           -c <cmdline> override kernel commandline                           -i <vendor id> specify a custom USB vendor id                          

fastboot command1. fastboot : protocol used to update the flash filesystem in Android devices

from a host over USB. {./mydroid/out/host/<platform>/bin/}

Page 29: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

29/37Korea Android Mini Seminar

Turn on with Power button + Home key for fastboot mode.

f11#>fastboot flash boot zImage_ramdisk [=boot.img]( f11#>fastboot flash kernel zImage )( f11#>fastboot flash ramdisk ramdisk-uboot.img )

f11#>fastboot flash system system.img

f11#>fastboot flash userdata userdata.img

How to flash custom images with fastboot command

*‘fastboot’ file is located in ./out/host/linux-x86/bin/fastboot directory.

Page 30: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

30/37Korea Android Mini Seminar

F11 #> adb shellphone#> flash_image                                                                  usage: flash_image partition file.imgphone#>      phone#>                                     phone#> cat /proc/mtddev: size erasesize name bytes filesystemmtd0: 00600000 00020000 "boot" 6,144kbmtd1: 12200000 00020000 "/system" 296,960kb yaffs2mtd2: 00600000 00020000 "recovery" 6,144kbmtd3: 002c0000 00020000 "/lgdrm" 2,816kb yaffs2mtd4: 00100000 00020000 "splash" 1,024kbmtd5: 00040000 00020000 "misc" 256kbmtd6: 04000000 00020000 "/cache" 65,563kb yaffs2mtd7: 263e0000 00020000 "/userdata" 626,560kb yaffs2

                                                                  

phone#>phone#> flash_image /dev/block/mtdblock2 ./system.img 

MTD(Memory Technology Device) Partition

Page 31: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

31/37Korea Android Mini Seminar

https://github.com/leemgs/OptimusOneKernel-KandroidCommunity

OptimusOne Kernel Features & Optimization

Coming Soon !!!

Page 32: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

32/37Korea Android Mini Seminar

● LGE Cyon Official Homepage, http://www.cyon.co.kr/

● LGE GPL Center, http://opensource.lge.com - “KU3700”

● LGE Official Blog Homepage, http://blog.lge.com

● XDA Developer Website, http://forum.xda-developers.com

● Android Git Repository, http://android.git.kernel.org

● Android Developer Homepage, http://developer.android.com

● Korea Android Technical Community, http://www.kandroid.org

● Linux Weekly News, http://www.lwn.net

References

Page 33: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

33/37Korea Android Mini Seminar

Conclusion

• A free target board for a poor embedded developers

• From now, Make your custom ROM that we want to produce

• You can get technical knowledge via android software rapidly

• Share your experiences between phone manufacturers and open-source community for realistic win-win

• Use another Linux distribution instead of easy-to-use Ubuntu to get trouble-shooting ability If you can. No pains, No gains

• Closed Innovation vs. Open Innovation . Closed innovation is a paradigm that successful innovation requires control.

. Open innovation is a paradigm that assumes that firms can and should use external ideas as well

as internal ideas to advance their technology.

Page 34: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

34/37Korea Android Mini Seminar

Any Questions?

Page 35: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

35/37Korea Android Mini Seminar

THANKS

Page 36: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

36/37Korea Android Mini Seminar

How to Solve Some Problems After Purchase

S/W: Reduce the max value of SMS list from 200 to 50 for stable performance...

A.

H/W: Dust at the bottom of left side according to hardware flaw

… . ‘’’ ‘.”.. ,.` `... . . ..

Page 37: Case study: Optimus One = KU3700/LU3700/SU370 = Optimus T = Optimus S = Optimus … · 2014-11-22 · Android based Optimus One Anatomy ( Ver 0.9 ) 12-25--2010, Fri Geunsik Lim (Nick:인베인,

37/37Korea Android Mini Seminar

Entire Flowchart to flash OptimusOne Image

KU370012.cab KU370012.wdb

KU3700(0.0.1.2).dll

*.dfat , *.fls KP500-Utils-EN.exe

*.fat renameYour Custom Images

fastboot

modify

* XXX.wdb C:\ProgramData\LGMOBILEAX\Phone\KU370012.wdb (Nov-19-2010, 198MB)* XXX.dll C:\ProgramData\LGMOBILEAX\Phone\KU3700(0.0.1.2).dll

Auto Save

OR

A.