Giter Club home page Giter Club logo

android_device_lenovo_b8000's Introduction

Lenovo Yoga 10" (b8000) Tablet

EXPERIMENTAL AND NOT YET WORKING!
USE AT YOUR OWN RISK!

Device Info

mkdir recovery
cp Yoga_tablet_10_A422_000_040_131023_WW_WIFI/target_bin/target_bin/recovery.img .
unpackbootimg -i recovery.img
mkdir ramdisk
cd ramdisk
mv ../recovery.img-ramdisk.gz ../recovery.img-ramdisk-raw.gz
dd bs=512 skip=1 if=../recovery.img-ramdisk-raw.gz of=../recovery.img-ramdisk.gz
gunzip -c ../recovery.img-ramdisk.gz | cpio -i

References

Notes

  1. Apparently using "the latest" version of any 3rd party tool in the build process is a bad thing.
    ex: Using Ubuntu 13.x w/ OpenJDK7
    You are asking for trouble if you use versions of the tools that are not mentioned!

Setup (work in progress...)

  1. Install 64-bit Ubuntu 12.04 on a VM (4GB RAM, 64GB Disk)
    http://wiki.cyanogenmod.org/w/Doc:_using_virtual_machines#Install_VirtualBox
  2. Download and Install VirtualBox + Extensions: https://www.virtualbox.org/wiki/Downloads
  3. Download the Ubuntu 12.04 64-bit: http://releases.ubuntu.com/precise/ubuntu-12.04.3-desktop-amd64.iso
  4. Create and Install Ubuntu (recommend 2 CPU, 4GB RAM, 100GB Disk, 32MB Video)
  5. Install VirtualBox Guest Additions on VM
  6. Follow http://source.android.com/source/initializing.html#installing-the-jdk
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
  1. Follow http://source.android.com/source/initializing.html#installing-required-packages-ubuntu-1204
  2. Follow anything else that is relevant in http://source.android.com/source/initializing.html
  3. Install the necessary build tools:
sudo apt-get install git gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
sudo apt-get install android-tools-adb android-tools-fastboot
  1. Set up Git/GitHub:
  2. Set up GitHub SSH keys: https://help.github.com/articles/generating-ssh-keys
ssh-keygen -t rsa -C "[email protected]"
cd ~/.ssh
ssh-add id_rsa
sudo apt-get install xclip
xclip -sel clip < ~/.ssh/id_rsa.pub
1. GitHub->SSH Keys->Add->Paste
1. Test that everything is set up:
ssh -T [email protected]
  1. git config --global user.email "[email protected]"
  2. git config --global user.name "paulpv"
  3. Get the all important "repo" tool:
mkdir -p ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
  1. gedit ~/.bashrc &
export USE_CCACHE=1
export PS1="[\t] \u@\h> "
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
export PATH=$PATH:$JAVA_HOME/bin
export PATH=$HOME/bin:$PATH
export PATH=$PATH:$HOME/android/system/out/host/linux-x86/bin
  1. Close the current Terminal and open a new Terminal
  2. Get the source code:
mkdir -p ~/android/system
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
repo sync -j4
  1. Wait several hours!
  2. Prepare the build environment
cd ~/android/system/vendor/cm
./get-prebuilts
cd ~/android/system/
make -j4 otatools
  1. Wait several hours!
  2. Get/Create android_device_lenovo_b8000 repo:
  • Creator: Customize mkvendor.sh for MediaTek CPU
    1. gedit build/tools/device/mkvendor.sh
    2. Change:
BOOTIMAGE=$3
   -to-
BOOTIMAGE=$3
SKIP=$4
  Change:
pushd ramdisk > /dev/null
gunzip -c ../$BOOTIMAGEFILE-ramdisk.gz | cpio -i
   -to-
pushd ramdisk > /dev/null
if [ ! -z "$SKIP" ]
then
  # Definitely discard the first $SKIP bytes
  mv ../$BOOTIMAGEFILE-ramdisk.gz ../$BOOTIMAGEFILE-ramdisk-raw.gz
  dd bs=$SKIP skip=1 if=../$BOOTIMAGEFILE-ramdisk-raw.gz of=../$BOOTIMAGEFILE-ramdisk.gz
fi
gunzip -c ../$BOOTIMAGEFILE-ramdisk.gz | cpio -i
  1. adb pull /system/build.prop
ro.product.manufacturer=LENOVO
ro.product.device=B8000
ro.product.board=blade10_row_wifi
  1. build/tools/device/mkvendor.sh lenovo b8000 recovery.img 512
  • Contributor: Create a local manifest for the unofficial b8000 code
    1. gedit ~/android/system/.repo/local_manifests/lenovo_b8000.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
    <project path="device/lenovo/b8000" name="TeamYogaBlade/android_device_lenovo_b8000" remote="github" revision="master"/>
    <project path="kernel/lenovo/b8000" name="TeamYogaBlade/android_kernel_lenovo_b8000" remote="github" revision="master"/>
    <project path="kernel/lenovo/b8000/kernel_source" name="TeamYogaBlade/lenovo_b6000-8000_kernel_source" remote="github" revision="master"/>
</manifest>
  1. Set up your CM device:
. build/envsetup.sh
lunch
  1. Select "device_b8000"
  2. Build a recovery image
make recoveryimage

Progress:

  • I am having a hard time compiling the following kernel elements:
    1. mediatek/custom/out/lenovo89_tb_x10_jb2/kernel/usb/
/bin/sh: 1: [: mediatek/custom/out/lenovo89_tb_x10_jb2/kernel/usb/: unexpected operator
  1. net/netfilter/xt_mark.o
CC      net/netfilter/xt_mark.o
net/netfilter/xt_mark.c:16:37: fatal error: linux/netfilter/xt_mark.h: No such file or directory
compilation terminated.
make[2]: *** [net/netfilter/xt_mark.o] Error 1
 Fixed by commenting out (for now)
  1. net/netfilter/xt_connmark.o
CC      net/netfilter/xt_connmark.o
net/netfilter/xt_connmark.c:29:41: fatal error: linux/netfilter/xt_connmark.h: No such file or directory
compilation terminated.
make[2]: *** [net/netfilter/xt_connmark.o] Error 1
 Fixed by commenting out (for now)
  1. net/netfilter/xt_HL.o
make[2]: *** No rule to make target `net/netfilter/xt_HL.o', needed by `net/netfilter/built-in.o'.  Stop.
 Fixed by commenting out (for now)

Other References:

TODO

  1. Determine if we need an android_vendor_lenovo_b8000 repo; if so then create it
  2. Set up the b8000 version of http://wiki.cyanogenmod.org/w/Template:Device_build
    http://wiki.cyanogenmod.org/w/Documentation#Using_the_Device_Template
  3. Set up a local manifest to pull from GitHub: http://wiki.cyanogenmod.org/w/Local_manifest

android_device_lenovo_b8000's People

Contributors

paulpv avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.