Cordova android platform configuration Category : Cordova Tutorials | Updated at : 2019-02-15 01:32:44

ANDROID
--------------download android sdk

wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz

tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools

install all sdk packages
 

./android update sdk --no-ui

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

gksu gedit /etc/bash.bashrc ---File to set path (ALL user)
Or
Ctrl + H -> show hidden files
Ctrl + L -> see URL
bash.bashrc also available in HOME folder

export PATH=${PATH}:$HOME/sdk/android-sdk-linux/platform-tools:$HOME/sdk/android-sdk-linux/tools:$HOME/sdk/android-sdk-linux/build-tools/22.0.1/

Or

export ANDROID_HOME=$HOME/android-sdk-linux
export PATH=${PATH}:$HOME/android-sdk-linux/platform-tools:$HOME/android-sdk-linux/tools

//download and extract android studio
 

export PATH=${PATH}:$HOME/android-studio/gradle/gradle-4.6/bin

-----------

sudo apt install adb && android-tools-adb

# adb

sudo apt-get install libc6:i386 libstdc++6:i386


# aapt error
 

sudo apt-get install zlib1g:i386

#Unable to recreate missing debug keystore?
#------------------------------------------------------------
#Check permission for .android folder
#--------------------------------------------
Check permission
> cd ~
> ls -la
...cut...
drwxr-xr-x    7 root  root      238 Mar 31 14:00 .android

...cut...
#APPLY PERMISSION
#---------------------------------
> sudo chown -R kavin .android

#After Permission Applied
#---------------------------------
> ls -la
...cut...
drwxr-xr-x    7 kavin  kavin      238 Mar 31 14:00 .android
...cut...
--------------------------------------------------------------------------------------


---
TO RUN APP DIRECTLY INTO DEVICES

-Connect device in USB - dev options - usb debugging ON

Test device is connected

adb devices
adb devices -l

Cordova run android - install app in PHONE


----on hold----
Adb connect using wifi
/home/kavin/android-sdk-linux/platform-tools
adb tcpip 5555
adb connect ip_address of mobile

--