Subject: bug#65207: 30.0; More instructions for how to build Android emacs, are needed

From: Po Lu <[email-masked]>
Date: Thu, 10 Aug 2023 22:59:17 +0800

Johan Widén <[email-masked]> writes:

> Note: This is a request for an enhancement of the emacs version 30
> documentation. I am writing this submission in emacs 29.1, so the
> current environment details are irrelevant. 
>
> I needed to build and run the Android emacs APK, to try and track
> down a bug. As I am a novice regarding building Android apps,
> finding out how to do this required considerable effort. I therefore
> suggest that information similar to what I include below, is added as
> an appendix to java/INSTALL. 
>
> First I suggest that the emacs repo top level README or INSTALL
> should include a reference to java/INSTALL. Perhaps something like
> this: 
>
> * For instructions on how to build Android emacs, see .
>  /java/INSTALL.

Eli already did this, I think.

> Here is now my build and run instructions: 
>
> I am using Ubuntu, so these instructions are Ubuntu specific, but
> should be easily adaptable to other linux based distributions. Note
> that Android Studio, Android SDK, Android NDK can be downloaded
> from the software provider, if they are not available in your linux
> distributions package manager. 
>
> I first installed Android Studio. It is available in the Ubuntu snap
> store: 
>
> * sudo snap install android-studio
>
> I then ran Android Studio to set it up, and also tried to build a sample
> project. I believe that at this point $HOME/Android with important
> subdirectory $HOME/Android/Sdk/build-tools/33.0.1 was added to
> my $HOME directory. See below why this was important. 
> [Further instructions elided.]

While I don't oppose explaining the process in more detail, we should
not recommend using Android Studio, as it is proprietary software.

Google's binaries for the Android SDK and NDK are themselves free
software built directly from public source code.  We should instead
describe how they can be obtained or built individually, without using
Android Studio or the Sdkmanager.  (The Sdkmanager demands users sign a
scareware EULA before downloading anything, even free software that is
available separately.)

My understanding is that for Debian and Trisquel users, it is merely a
matter of installing a few packages from their default package
repositories, whereas the process for other GNU/Linux distribution is
more involved.

TIA.