[Android General] chiragkrishna:
CURRENT STATUS:

can compile android kernel successfully, right now cant compile complete rom.

Edition: Windows 10

Version: 1607

OS Build: 14393.222

===========================================

REQUIREMENTS

===========================================​

1) Windows 10 64-Bit with Anniversary Update

===========================================

Setting up ubuntu bash on windows 10

===========================================​

1) open the Settings --> Update & Security --> For Developers--> enable Developer Mode

2) search for “Turn Windows Features On or Off” in cortana & hit enter

3) Enable the “Windows Subsystem for Linux (Beta)” option in the list and click “OK.” & restart your system

4) search for “bash” in cortana & hit enter

5) type "y" & hit enter

6) download of ubuntu for windows 10 will start. It will take some time depending on your internet speed. You’ll be asked to create a user account and password for use in the Bash environment. restart your system

7) search for “Bash on Ubuntu on Windows” in cortana & hit enter

8) congratulations you have successfully installed bash on windows 10

9) OPTIONAL

add bash to context menu (developer is Manouchehri)

install this reg entry,... Accept the warnings and import it.

===========================================

Setting up a Linux build environment

===========================================​

1) open “Bash on Ubuntu on Windows”

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install default-jdk
sudo apt-get install android-tools-adb android-tools-fastboot

sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip python-networkx

===========================================

How To's

===========================================​

warning 1: do not edit your linux files i.e. "C:\Users<username>\AppData\Local\lxss" in windows,... it will make the files useless in bash...

never add files or edit files of linux subsystem from windows

,....

Solution:

copy the files out of linux sub system i.e. "lxss", edit them, then use bash to move the files back to "lxss"

---------------------------------------------------------------------

warning 2: Do not mnt and download android source,... download the source in linux subsystem (inside lxss) only...

---------------------------------------------------------------------

Problem:

where are my ubuntu files

Solution:

All your bash files are located in "C:\Users<username>\AppData\Local\lxss\rootfs". your home directory is located in "C:\Users<username>\AppData\Local\lxss\home"

---------------------------------------------------------------------

Problem:

sudo: unable to resolve host

Solution:

delete hosts file of ubuntu, it will auto generate the next time you open “Bash on Ubuntu on Windows" (C:\Users\<username>\AppData\Local\lxss\rootfs\etc\hosts)

---------------------------------------------------------------------

Problem:

Java 8 doesn't install or work

Solution:

know bug. use the following code. it will install java 7

sudo apt-get install default-jdk

---------------------------------------------------------------------

Problem:

how to access windows files in bash

Solution:

for example you want to navigate to downloads "C:\Users\<username>\Downloads"

cd /mnt/c/Users/<username>/Downloads

---------------------------------------------------------------------

Problem:

repo not found or needs to be installed even after it was successful installed

Solution:

use the following command

nano ~/.bashrc

add this at the end

PATH=~/bin:$PATH

press Ctrl+o & Ctrl+x

---------------------------------------------------------------------

Problem:

can't mount my drive

Solution:

: In order for a drive to show up under /mnt/ it must meet the following criteria:

1. The drive must be a fixed drive

2. The drive must be formatted to NTFS

---------------------------------------------------------------------

=======================================

*****still experimenting with bash, still have a few problems to successfully compile the rom,... will update if i find something