Build Your First CM11 Theme (or APP!!!)
- SETTING UP THE BUILD ENVIRONMENT -
WINDOWS INSTRUCTIONS
- SETTING UP THE BUILD ENVIRONMENT -
WINDOWS INSTRUCTIONS
1) Download, Install and set up the Java JDK
- Download and install the JDK (32 or 64bit)
http://www.oracle.com/technetwork/ja...s-1880260.html

- Navigate to
System Properties --> Advanced system settings --> Evironmental variables
and create a new variable called "JAVA_HOME" where we'll add JDK path:

2) Set up Eclipse
- Download Eclipse ADT and Extract to C:\
http://developer.android.com/sdk/index.html
LINUX INSTRUCTIONS
1) Set up the Java JDK
- Open the terminal
- Install the OpenJDK
Code:
sudo apt-get install openjdk-7-jre
Code:
java -version

2) Set up the SDK
- Download the Standalone SDK Package
DOWNLOAD: http://dl.google.com/android/android....0.2-linux.tgz
- Install the SDK Package
Let's create a folder in your Home called "development" (You can call it also pincopallino, gino, pippo, Giovanni, Lemonpie, Material, Mathias Duarte... if You want lol)
Code:
mkdir ~/development
Code:
cd ~/Downloads
Code:
tar -zxvf android-sdk_r23.0.2-linux.tgz
Code:
mv android-sdk-linux ~/development/
LINUX & WINDOWS INSTRUCTIONS
3) Setup ADB/FASTBOOT in Linux and Update Developers Tools in Linux&Windows
- Linux [You can do this step after Eclipse installation also (like in Windows), it's the same]
Open up the Android SDK by running this command:
Code:
cd ~/development/android-sdk-linux/tools
Code:
./android
Open Eclipse ADT and Navigate to/Open
Window --> Android SDK Manager
At this point the SDK should come up

and you will need to download all the tools and all the extras files already selected by default.
1. Be sure to select at least Android 4.4.2 (API 19)!!!!!!!, so select them and install'em all \m/ \m/.
2. !!!! Avoid Android L (API 20, L preview) & Android 4.4W (API 20) installation. You don't need it for now! (but, if You want to start developing apps for Android L then install them :P)
Accept all licenses and click OK to all the prompts during installation ;)
- Setting up ADB&FASTBOOT in Linux
When it finishes downloading everything you have to run this commands in terminal to return to Your Home folder:
Code:
cd
(You can also use gedit if in Ubuntu, leafpad if in Lubuntu, etc etc)
Code:
sudo nano .bashrc
Code:
#Android PATHS
export PATH=$PATH:~/development/android-sdk-linux/tools
export PATH=$PATH:~/development/android-sdk-linux/platform-tools
Then Run:
Code:
source ./.bashrc
Code:
fastboot
Quote:
fastboot usage: fastboot [ <option> ] <command> commands: update <filename> reflash device from update.zip flashall ... |
4) Set up Eclipse IDE in Linux
- Dowload latest Eclipse IDE (I prefer the classical one instead of Google's one)
http://www.eclipse.org/downloads/?os...ease=undefined
- Install Eclipse
cd to downloads folder
Code:
cd ~/Downloads
Code:
tar -zxvf eclipse-standard-luna-R-linux-gtk.tar.gz
Code:
sudo mv eclipse /opt
Code:
sudo ln -s /opt/eclipse/eclipse /usr/bin/eclipse
Code:
wget https://www.dropbox.com/s/0quwnjekpz3bxh3/eclipse.desktop
Code:
sudo mv eclipse.desktop /usr/share/applications/eclipse.desktop
- Now You can run Eclipse and choose the location of our workspace (we can leave the default and tickmark «use this as the default and do not ask again»)
NOTE: YOu can also use directly Eclipse ADT + sdk instead of classical Eclipse IDE.
http://developer.android.com/sdk/index.html
5) Set up ADT Plugin
FOLLOW THIS:
http://developer.android.com/sdk/ins...lling-adt.html
6) Android Studio
http://developer.android.com/sdk/installing/studio.html
- Linux
Code:
cd ~/Downloads
Code:
tar -zxvf android-studio-bundle-135.1245622-linux.tgz
mv android-studio ~/development/
Code:
./studio.sh
http://forum.xda-developers.com/show....php?t=2780923
7) APKTOOL (in case You need it)
WINDOWS INSTRUCTIONS
- Download Apktool from here and extract where You want:
http://forum.xda-developers.com/show...9&postcount=90
LINUX INSTRUCTIONS
- Download it running this in a terminal:
Code:
wget https://www.dropbox.com/s/6s9bxszxjl7wclz/apktool.tar.gz
Code:
tar -zxvf apktool.tar.gz
Code:
cd apktool
Code:
sudo chown -R yourusername aapt apktool apktool.jar
- Make them exec
Code:
sudo chmod +x aapt apktool apktool.jar
Code:
sudo cp aapt apktool apktool.jar /usr/local/bin
Code:
apktool
Quote:
enricod@enricod-Aspire-5920G:~/Scrivania/apktool$ apktool Apktool v1.5.2 - a tool for reengineering Android apk files Copyright 2010 Ryszard Wiśniewski <brut.alll@gmail.com> with smali v1.4.1, and baksmali v1.4.1 Updated by @iBotPeaches <connor.tumbleson@gmail.com> Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) |
- You can now delete the package and the extracted folder
- Little guide on how to use apktool
http://forum.xda-developers.com/show...7&postcount=57