{"id":528,"date":"2015-04-17T14:36:03","date_gmt":"2015-04-17T13:36:03","guid":{"rendered":"http:\/\/www.ree7.fr\/blog\/?p=528"},"modified":"2022-08-08T06:47:40","modified_gmt":"2022-08-08T05:47:40","slug":"compile-android-kitkat-on-ubuntu-14-04","status":"publish","type":"post","link":"http:\/\/www.ree7.fr\/blog\/2015\/04\/compile-android-kitkat-on-ubuntu-14-04\/","title":{"rendered":"Compile Android Kitkat on Ubuntu 14.04"},"content":{"rendered":"<img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/img.phonandroid.com\/2014\/07\/android-4.4-r%C3%A9partition.jpg\" alt=\"Android Kitkat logo\" width=\"600\" height=\"400\" \/>\n<p>Latetly I have been trying to compile Android 4.4 Kitkat from the sources on a raw Ubuntu Trusty Tahr (14.04 LTS).<br \/>\nSure everyone is looking on Lollipop and its successors these days, but yet a lot of boards do not provide for support for it yet so this might be interesting for someone.<\/p>\n<p>Kitkat was built with toolchains older than the current Ubuntu LTS, so if you religiously follow the instructions you can find on <a href=\"https:\/\/source.android.com\/source\/initializing.html\">source.android.com<\/a> or XDA-University, you might encounter some problems. Here is a step by step guide to create your build environment.<\/p>\n<p>Consider it a replacement for the official page named :<\/p>\n<h2>Initializing a Build Environment<\/h2>\n<h3 id=\"setting-up-a-linux-build-environment\">Setting up a Linux build environment<\/h3>\n<h4>Installing the JDK<\/h4>\n<p>Gingerbread through Kitkat requires Java 6 to compile. Not only they require Java 6 but they require the JVM from Oracle, and not openjdk.<\/p>\n<p>There\u2019s a Launchpad PPA (Personal Package Archive) maintained by webupd8.org, a popular Ubuntu Linux blog, which provides the most recent installers to automatically download and install Oracle Java JDK6\/7\/8\/9 from oracle website.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">sudo add-apt-repository ppa:webupd8team\/java\r\nsudo apt-get update\r\nsudo apt-get install oracle-java6-installer\r\nsudo apt-get install oracle-java6-set-default<\/pre>\n<p>You can check you&rsquo;re running the correct Java version by running<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">java -version<\/pre>\n<h4>Installing required packages (Ubuntu 14.04)<\/h4>\n<p>You will need a 64-bit version of Ubuntu.<\/p>\n<p>Here are the necessary package from Google, minus zlib1g-dev:i386 that is not found in the repo.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">sudo apt-get install bison g++-multilib git gperf libxml2-utils make zip<\/pre>\n<p>Then you will miss these packages (I found out when trying to build), flex is used during the build process, and lib32z1 provides libz.so.1 that&rsquo;s missing because we could not install zlib1g-dev:i386<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">sudo apt-get install flex lib32z1<\/pre>\n<p>Then you&rsquo;re all set and can continue through the next step : <a href=\"https:\/\/source.android.com\/source\/downloading.html\">Downloading the Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Latetly I have been trying to compile Android 4.4 Kitkat from the sources on a raw Ubuntu Trusty Tahr (14.04 LTS). Sure everyone is looking on Lollipop and its successors these days, but yet a lot of boards do not provide for support for it yet so this might be interesting for someone. Kitkat was [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[34],"tags":[88,91,89,90,92],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p19lzH-8w","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/posts\/528"}],"collection":[{"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/comments?post=528"}],"version-history":[{"count":1,"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/posts\/528\/revisions"}],"predecessor-version":[{"id":579,"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/posts\/528\/revisions\/579"}],"wp:attachment":[{"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/media?parent=528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/categories?post=528"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ree7.fr\/blog\/wp-json\/wp\/v2\/tags?post=528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}