• Save
Path to Surfdroid
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Path to Surfdroid

  • 722 views
Uploaded on

A lecture given at Oggcamp 2011 on building a custom android CyanogenMod rom for the Notion Ink Adam tablet

A lecture given at Oggcamp 2011 on building a custom android CyanogenMod rom for the Notion Ink Adam tablet

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
722
On Slideshare
718
From Embeds
4
Number of Embeds
2

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 4

http://www.linkedin.com 3
https://www.linkedin.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. The Path to SURFDROID An Android Rom Building Journey By Paul Dutot
  • 2. The Path to SURFDROID Where did I get the idea to built a rom ? Android Internals by Marko Gargenta at● http://www.youtube.com/watch?v=1_H4AlQaNa0 Google Android Source Page● http://source.android.com/source/index.html
  • 3. The Path to SURFDROID What do you need ?● Python 2.4 – 2.7● Java Development Kit (JDK) 6 for Gingerbread or JDK 5 for Froyo● Git 1.5.4 or newer● Dependencies listed on source.android.com● Correct usb access for adb
  • 4. The Path to SURFDROID Update.zip ContentsBootloader.bin – initial bootloader codeBoot.img – contains kernel and ramdiskSystem.img – android system imageRecovery.img – system recovery imageGoogle directory containing update script &binary
  • 5. The Path to SURFDROID Update.zip Structure ( Type 1)
  • 6. The Path to SURFDROID Update.zip Structure ( Type 2)
  • 7. The Path to SURFDROID The Type 1 Updater Script Function● Mount the system Partition● Copy the files into system● Make symbolic links to xbin● Set correct permissions on files and directories● Flash the boot.img file
  • 8. The Path to SURFDROID The Type 2 Updater Script Function● Flashes the bootloader.bin● Flashes the boot.img file● Flashes the system.img file● Flashes the recovery.img file
  • 9. The Path to SURFDROID Development Environment
  • 10. The Path to SURFDROID Notion Ink Partition Information 2 7 BCT MSC Boot Config data 3 8 PT SOS Partition Table data recovery.img 4 9 EBT LNK bootloader data bootloader.bin boot.img 5 10 NVC APP bootloader data microboot.bin system.img 6 11 MBT CAC data data mbtdata.img
  • 11. The Path to SURFDROID The NVFlash Utility & Recovery Modes● Utility for directly flashing all partitions used with forced recovery mode● Use with care – only for advanced users● Vol and + - normal recovery● Vol and - - forced recovery mode
  • 12. The Path to SURFDROID Building Android Source● Setup PATH variable● Pull Down repo command and make excutable● Sync repo ….wait...wait● Source build/envsetup.sh● lunch full-eng● make
  • 13. The Path to SURFDROID Android Source Directories● Build – build system● Device – device specific files● Prebuilt – Prebuilt stuff including toolchains and kernel● Out – compilation output directory● Vendor – vendor specific information
  • 14. The Path to SURFDROID
  • 15. The Path to SURFDROID The Next Stage... So What Do We Need ?● Kernel – Prebuilt or Compiled● A supported CM7 device● Device dependant proprietary binary files● Working boot.img and system.img● Packaged Update.zip file
  • 16. The Path to SURFDROID Building the kernel● Download the NI sources from https://github.com/notionink/adam-kernel.git● Get running config from tablet sudo ./adb shell then cat /proc/config > config.gz .sudo /adb pull <path to config file>/config.gz unzip config.gz then rename .config in kernel directory● Setup path variable then make ARCH= arm CROSS_COMPILE=<path to cross compiler toolchain>
  • 17. The Path to SURFDROID The Next Stage... So What Do We Need ?● Kernel – Prebuilt or Compiled● A supported CM7 device● Device dependant proprietary binary files● Working boot.img and system.img● Packaged update.zip file
  • 18. The Path to SURFDROID Compile CM7 Main guide is here● CyanogenMod Wiki http://wiki.cyanogenmod.com/wiki/Viewsonic_G_Tablet:_Compile_CyanogenMod_%28Linux%29
  • 19. The Path to SURFDROID The Next Stage... So What Do We Need ?● Kernel – Prebuilt or Compiled● A supported CM7 device● Device dependant proprietary binary files● Working boot.img and system.img● Packaged Update.zip file
  • 20. The Path to SURFDROID Copy Proprietary Binary Blobs● Download CM7 source● Start ADB server as root● Connect tablet via USB● Navigate to smb_a1002 directory● Run ./extract-files.sh● Files are copied into the vendor directory and makefiles built
  • 21. The Path to SURFDROID The Next Stage... So What Do We Need ?● Kernel – Prebuilt or Compiled● A supported CM7 device● Device dependant proprietary binary files● Working boot.img and system.img● Packaged update.zip file
  • 22. The Path to SURFDROID Compile CM7 stages● install ADB via Android SDK● Create directory and pull down CM7 repo● Get proprietary blobs● Download rom manager● Install kernel in source tree● Source build/envsetup.sh● Brunch – choose option 36
  • 23. The Path to SURFDROID
  • 24. The Path to SURFDROID Building & Installing the update.zip file● Copy the boot.img and system.img to nvflash directory.● Use the mkupdatezip.sh script to create update.zip● Copy update.zip to device internal or external sd card. Flash via recovery mode
  • 25. The Path to SURFDROID Flashing the rom with NVflash● Copy the boot.img and system.img to nvflash directory.● Use NVFLASH utility in forced recovery mode to reflash entire device.
  • 26. The Path to SURFDROID Android Build Versions● Build 1 – CM7 V.2.3.4 -broken wifi & rotation● Build 2 – CM7 V.2.3.4 - wifi ok , rotation still broken● Build 3-9 – CM7 V2.3.5 - libstagefrighthw.so included – all build ok but boot loop on tablet at netrunner or mediaservice start● Build 10 - CM7 V.2.3.5 – libstagefrighthw.so working – wifi,video,hdmi playback, rotation and working flash● Build 11 – Build 10 plus custom splash screen● Build 12 (in progress) – Build 11 plus titanium backup preinstalled
  • 27. The Path to SURFDROID Common Rom Builders Tasks● Fixing the broken WIFI / Bluetooth● Add Additional Apps● Custom Splash Screen● Custom Boot Animation● Android Market
  • 28. The Path to SURFDROID Fixing the broken WIFI● Recompile Kernel module bcm4329.ko against kernel in source tree● Use compatible bcm4329.ko with associated files
  • 29. The Path to SURFDROID Add Additional Applications● Put Additional apks in out directory● Start brunch then crtl c● Make snod● Copy system.img
  • 30. The Path to SURFDROID Custom Splash Screen● Create your image at correct resolution- 1024 x600 in raw format● Unpack Boot.img● Convert image to rgb255 using to565● ./to565 -rle < splash.raw > initlogo.rle● Put initlogon.rle in ramdisk root directory● Repack boot.img
  • 31. The Path to SURFDROID Custom Boot Animation● Create your images at correct resolution- 1024 x600 in raw format● Replace bootanimation.zip in source
  • 32. The Path to SURFDROID Android Market● Modified Notion Hacks – Root and Market Access script● Apply as update.zip in recovery mode
  • 33. The Path to SURFDROID Last Things to Do● Test it with some apps notably flash● Release it !!!!!!!!!!!! Thanx to all at tabletroms.com including Blazingwolf, RaYmAn,Thinkdevoid in the irc for their help