Post Reply 
 
Thread Rating:
  • 2 Votes - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Compile Android version with Cygwin [Faq]
11-07-2012, 09:24 PM (This post was last modified: 11-10-2012 10:51 AM by MaXiMu.)
Post: #1
How Compile Android version with Cygwin [Faq]
requirements
Cygwin
Android SDK For windows
NDK For windows
JDK x86 for windows
WinAnt Install

1. Cygwin
- Need to install devel packages
- Optional I recomended install one editor package Unix style -> nano or vim
- Wait Download and install packages Depend you conexion and PC.

[Image: 262wa5w.jpg]
[Image: 119tpn6.jpg]
[Image: fctwd1.jpg]
[Image: f9gx91.jpg]
[Image: 2mq4tmp.jpg]
[Image: opzgnp.jpg]
[Image: 2094wts.jpg]

2 . path environment variables SDK/NDK
-Once SDK and NDK downloaded and unzipped and installed JDK/Winant.
-You need path variables SDK/NDK on cygwin
- Doble click Cygwin terminal
- edit .bashrc_profile in terminal

Code:
nano .bashrc_profile

Add you path folder for Android-sdk/tools / Android-sdk/platforms-tools and android-ndk -> /cygdrive/letter partition/Folder/

Code:
export PATH=${PATH}:/cygdrive/c/Android/android-sdk/platform-tools
export PATH=${PATH}:/cygdrive/c/android-ndk-r8b
export PATH=${PATH}:/cygdrive/c/Android/android-sdk/tools

And update path

Code:
source .bash_profile

Now download source Github in terminal

Code:
git clone https://github.com/hrydgard/ppsspp.git

Download submodule Native

Code:
cd ppsspp
git submodule init
git submodule update

Now edit in cd ppsspp/android

Code:
nano project.properties

Code:
target=android-16
android.library.reference.1=../native/android

And
Code:
nano ab.sh

Code:
NDK_MODULE_PATH=..:../native/ext ndk-build -j 3

Now need create build.xml for ant

NOTE : You need download first API 16

In the cygwin you write

Code:
android.bat

Wait load android SDK Manager -> select Android 4.1.2 (API 16) and install.

[Image: 2znvp6f.jpg]

Code:
cd
android.bat update project --target android-16 --path ppsspp/android
android.bat update project --target android-16 --path ppsspp/native/android

Now go to ppsspp/android

Code:
cd ppsspp/android
sh ab.sh

Note : Wait Several minutes for compile libnativeaudio.so and ppssppjni.so

If Correct See who are two files .so in the folder libs/armeabi-v7a

Finally ant debug

Code:
Ant debug

If you've gotten this far without error and you make the apk in / bin is that you've accomplished correctly.
Find all posts by this user
Quote this message in a reply
11-07-2012, 10:58 PM
Post: #2
RE: How Compile Android version with Cygwin [Faq]
I find it much easier to just use the Android NDK, "ab.cmd" and Eclipse to then build and start the Android APK, but sure Smile
Find all posts by this user
Quote this message in a reply
11-08-2012, 02:15 PM
Post: #3
RE: How Compile Android version with Cygwin [Faq]
I have this error in cygwin

Code:
Marc@Marco ~
$ git clone https://github.com/hrydgard/ppsspp.git
Cloning into 'ppsspp'...
error: error setting certificate verify locations:
  CAfile: /usr/ssl/certs/ca-bundle.crt
  CApath: none while accessing https://github.com/hrydgard/ppsspp.git/info/refs
fatal: HTTP request failed
How to resolve it?
Find all posts by this user
Quote this message in a reply
11-08-2012, 02:59 PM (This post was last modified: 11-08-2012 03:05 PM by MaXiMu.)
Post: #4
RE: How Compile Android version with Cygwin [Faq]
Quote:
error: error setting certificate verify locations:
CAfile: /usr/ssl/certs/ca-bundle.crt
CApath: none while accessing https://github.com/hrydgard/ppsspp.git/info/refs
fatal: HTTP request failed
CAfile: /usr/ssl/certs/ca-bundle.crt

You try should fix with git config --system http.sslcainfo \\bin\\curl-ca-bundle.crt

But If not work possible missing curl-ca-bundle.crt package re-install cygwin and research ca-certificate package

No idea for this error I don't install this package in my pc.
Find all posts by this user
Quote this message in a reply
11-08-2012, 03:50 PM
Post: #5
RE: How Compile Android version with Cygwin [Faq]
(11-08-2012 02:59 PM)MaXiMu Wrote:  
Quote:
error: error setting certificate verify locations:
CAfile: /usr/ssl/certs/ca-bundle.crt
CApath: none while accessing https://github.com/hrydgard/ppsspp.git/info/refs
fatal: HTTP request failed
CAfile: /usr/ssl/certs/ca-bundle.crt

You try should fix with git config --system http.sslcainfo \\bin\\curl-ca-bundle.crt

But If not work possible missing curl-ca-bundle.crt package re-install cygwin and research ca-certificate package

No idea for this error I don't install this package in my pc.
Hi,
downloading ca-certificate helped. Now I'm at
Quote:Now need create build.xml for ant

NOTE : You need download first API 16

Code:
Write android.bat in cygwin terminal and select to download android 4.1.2

Can you advise what to do in this step cause I'm a bit lost.
Find all posts by this user
Quote this message in a reply
11-08-2012, 04:20 PM (This post was last modified: 11-08-2012 04:21 PM by MaXiMu.)
Post: #6
RE: How Compile Android version with Cygwin [Faq]
Quote:Can you advise what to do in this step cause I'm a bit lost.

In the cygwin you write android.bat

Wait load android SDK Manager -> select Android 4.1.2 (API 16) and install.

[Image: 2znvp6f.jpg]
Find all posts by this user
Quote this message in a reply
11-08-2012, 04:42 PM (This post was last modified: 11-08-2012 04:51 PM by macia10.)
Post: #7
RE: How Compile Android version with Cygwin [Faq]
android.bat does not wrok for me but I've downloaded API16 manually. I can see that android.bat is needed later. Where should it be and how to get it?

EDIT:
and after I did this:
Quote:Add you path folder for Android-sdk/tools / Android-sdk/platforms-tools and android-ndk -> /cygdrive/letter partition/Folder/

Code:
export PATH=${PATH}:/cygdrive/c/Android/android-sdk/platform-tools
export PATH=${PATH}:/cygdrive/c/android-ndk-r8b
export PATH=${PATH}:/cygdrive/c/Android/android-sdk/tools

And update path

Code:
source .bash_profile
should it see ndk-build command? Because it does not... paths are correct as I'm using exactly the same.
Find all posts by this user
Quote this message in a reply
11-08-2012, 07:05 PM
Post: #8
RE: How Compile Android version with Cygwin [Faq]
these path environments is in my case on my pc and I use for example .

/cygdrive/c/Android/android-sdk/platform-tools = C:/Android/android-sdk/platform-tools
/cygdrive/c/android-ndk-r8b = C:/android-ndkr8b
/cygdrive/c/Android/android-sdk/tools = C:/Android/android-sdk/tools
Find all posts by this user
Quote this message in a reply
11-08-2012, 07:32 PM
Post: #9
RE: How Compile Android version with Cygwin [Faq]
(11-08-2012 07:05 PM)MaXiMu Wrote:  these path environments is in my case on my pc and I use for example .

/cygdrive/c/Android/android-sdk/platform-tools = C:/Android/android-sdk/platform-tools
/cygdrive/c/android-ndk-r8b = C:/android-ndkr8b
/cygdrive/c/Android/android-sdk/tools = C:/Android/android-sdk/tools

I have the exactly same one's. Could you tell me more about android.bat file? where it should be and what's the content. Could you maybe PM me with your msn mail or other communicator for faster communication ? Big Grin
Find all posts by this user
Quote this message in a reply
11-08-2012, 08:15 PM
Post: #10
RE: How Compile Android version with Cygwin [Faq]
Android.bat is part By SDK android common used for update and create build.xml for android ant project or access SDK manager in tools folder

[Image: 2q0lqc6.jpg]

In any case if you tell me at what point you lose exactly?.

ndk-build not found by cygwin?, android.bat not work on cygwin?.
Find all posts by this user
Quote this message in a reply
11-08-2012, 10:21 PM
Post: #11
RE: How Compile Android version with Cygwin [Faq]
both actually Smile should android.bat work from any dir? Basically I did everything until android.bat which does not work.
Probably something is wrong here
Quote:Code:
export PATH=${PATH}:/cygdrive/c/Android/android-sdk/platform-tools
export PATH=${PATH}:/cygdrive/c/android-ndk-r8b
export PATH=${PATH}:/cygdrive/c/Android/android-sdk/tools

And update path

Code:
source .bash_profile
When I type just $PATH I get:
Code:
Marc@Marco ~
$ $PATH
-bash: /usr/local/bin:/usr/bin:/cygdrive/c/Program: No such file or directory
Find all posts by this user
Quote this message in a reply
11-09-2012, 12:34 AM (This post was last modified: 11-09-2012 12:35 AM by MaXiMu.)
Post: #12
RE: How Compile Android version with Cygwin [Faq]
Bash_profile

Quote:should android.bat work from any dir?

Yes if path enviroment folder is correct Tongue

Please Upload photo For I see on what folder Android-sdk and ndk thanks.

My Bash_profile

Code:
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

# base-files version 4.1-1

# ~/.bash_profile: executed by bash(1) for login shells.

# The latest version as installed by the Cygwin Setup program can
# always be found at /etc/defaults/etc/skel/.bash_profile

# Modifying /etc/skel/.bash_profile directly will prevent
# setup from updating it.

# The copy in your home directory (~/.bash_profile) is yours, please
# feel free to customise it to create a shell
# environment to your liking.  If you feel a change
# would be benifitial to all, please feel free to send
# a patch to the cygwin mailing list.

# User dependent .bash_profile file

# source the users bashrc if it exists
if [ -f "${HOME}/.bashrc" ] ; then
  source "${HOME}/.bashrc"
fi

# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
#   PATH="${HOME}/bin:${PATH}"
# fi

# Set MANPATH so it includes users' private man if it exists
# if [ -d "${HOME}/man" ]; then
#   MANPATH="${HOME}/man:${MANPATH}"
# fi

# Set INFOPATH so it includes users' private info if it exists
# if [ -d "${HOME}/info" ]; then
#   INFOPATH="${HOME}/info:${INFOPATH}"
# fi

export PATH=${PATH}:/cygdrive/c/Android/android-sdk/platform-tools
export PATH=${PATH}:/cygdrive/c/android-ndk-r8b
export PATH=${PATH}:/cygdrive/c/Android/android-sdk/tools
Find all posts by this user
Quote this message in a reply
11-10-2012, 10:24 AM (This post was last modified: 11-10-2012 10:37 AM by macia10.)
Post: #13
RE: How Compile Android version with Cygwin [Faq]
(11-09-2012 12:34 AM)MaXiMu Wrote:  Bash_profile

Quote:should android.bat work from any dir?

Yes if path enviroment folder is correct Tongue

Please Upload photo For I see on what folder Android-sdk and ndk thanks.

My Bash_profile

Code:
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

# base-files version 4.1-1

# ~/.bash_profile: executed by bash(1) for login shells.

# The latest version as installed by the Cygwin Setup program can
# always be found at /etc/defaults/etc/skel/.bash_profile

# Modifying /etc/skel/.bash_profile directly will prevent
# setup from updating it.

# The copy in your home directory (~/.bash_profile) is yours, please
# feel free to customise it to create a shell
# environment to your liking.  If you feel a change
# would be benifitial to all, please feel free to send
# a patch to the cygwin mailing list.

# User dependent .bash_profile file

# source the users bashrc if it exists
if [ -f "${HOME}/.bashrc" ] ; then
  source "${HOME}/.bashrc"
fi

# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
#   PATH="${HOME}/bin:${PATH}"
# fi

# Set MANPATH so it includes users' private man if it exists
# if [ -d "${HOME}/man" ]; then
#   MANPATH="${HOME}/man:${MANPATH}"
# fi

# Set INFOPATH so it includes users' private info if it exists
# if [ -d "${HOME}/info" ]; then
#   INFOPATH="${HOME}/info:${INFOPATH}"
# fi

export PATH=${PATH}:/cygdrive/c/Android/android-sdk/platform-tools
export PATH=${PATH}:/cygdrive/c/android-ndk-r8b
export PATH=${PATH}:/cygdrive/c/Android/android-sdk/tools
Hi,
Now I can see the problem

Code:
nano .bashrc_profile

and should be nano .bash_profile
the file name was bad...
But now I have another problem.
Code:
$ android.bat update project --target android-16 ppsspp/android
Error: Argument 'ppsspp/android' is not recognized.

       Usage:
       android [global options] update project [action options]
       Global options:
  -h --help       : Help on a specific command.
  -v --verbose    : Verbose mode, shows errors, warnings and all messages.
     --clear-cache: Clear the SDK Manager repository manifest cache.
  -s --silent     : Silent mode, shows errors only.

                         Action "update project":
  Updates an Android project (must already have an AndroidManifest.xml).
Options:
  -l --library    : Directory of an Android library to add, relative to this
                    project's directory.
  -p --path       : The project's directory. [required]
  -n --name       : Project name.
  -t --target     : Target ID to set for the project.
  -s --subprojects: Also updates any projects in sub-folders, such as test
                    projects.

Ok found the problem. Another line is wrong
it is
Code:
cd
android.bat update project --target android-16 ppsspp/android
android.bat update project --target android-16 ppsspp/native/android

and should be
Code:
cd
android.bat update project --target android-16 --path ppsspp/android
android.bat update project --target android-16 --path ppsspp/native/android
Find all posts by this user
Quote this message in a reply
11-12-2012, 01:59 PM (This post was last modified: 11-12-2012 02:03 PM by acocalypso.)
Post: #14
RE: How Compile Android version with Cygwin [Faq]
]Hello everybody, thanks for this tutorial,

id tried it but i failed at building the xml... here is a screenshot, please tell me whats wrong? i dont know why ive got a permission denied -.-

here is my ab.sh

PHP Code:
NDK_MODULE_PATH=..:../native/ext C:/android/android-ndk-r8b/ndk-build -j 3 

.bash_profile
PHP Code:
# Set INFOPATH so it includes users' private info if it exists
# if [ -d "${HOME}/info" ]; then
#   INFOPATH="${HOME}/info:${INFOPATH}"
# fi

export PATH=${PATH}:C:/android/android-sdk-windows/platform-tools
export PATH
=${PATH}:C:/android/android-ndk-r8b
export PATH
=${PATH}:C:/android/android-sdk-windows/tools 


   
Find all posts by this user
Quote this message in a reply
11-20-2012, 06:11 PM
Post: #15
RE: How Compile Android version with Cygwin [Faq]
ok solved those problems by my self Big Grin

but maybe someone could tell me whats the problem here:


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: