In theory Android apps from F-Droid are free software, but how easy exactly is it to make your own modifications to them?
On Debian, if you want to modify a piece of software, you need to:
apt install build-essential # only first time
apt-get source $package
# modify the sources
dpkg-buildpkackage -us -uc -someotheroptionIforgot
dpkg -i ../$package.deb
On Arch it's very similar.
How do I do this on Android?
@Wolf480pl That debian and Arch process seems very complicated compared to the process in the Lisp world.
When modifying a Lisp program, you open the file in Emacs, make the modification and press C-c C-c.
@loke well ok, if the program is written in python, you just
But you still have to restart the program.
@loke yes, but then at least you it starts from a fresh state which will be consistent with what the new code expects.
For example, if you change some invariant, the state from the old code doesn't satisfy the new invariant, so you need to throw it away anyway.
@Wolf480pl link to the repository, do your modifications in the code, then recompile into an apk then install.
other way around is decompile the APK, do modifications recompile code into APK and then install
@tibike ok, but how do I compile an apk from source?
@tibike like, does F-Droid provide an easy way to install the whole necessary toolchain? on the phone?
@Wolf480pl you might achieve it on the phone but I doubt it.
You need a computer for that with android developer tools.
@Wolf480pl Well, basically not possible unless you install a chroot and install OpenJDK, Maven, Gradle, so on
@Wolf480pl ...which is hilarious because Android uses OpenJDK itself
like, you would expect we would have IDEs by now, since Android has been running in desktops and tablets for a while and phones are capable enough
@espectalll oh, so Android SDK won't run on Android's crippled version of Java? How ironic...
That being said, Gradle takes 100MB, Maven takes 40MB, OpenJDK takes 10MB. How much space does Android SDK take tho?
@Wolf480pl it probably does, it's just that you need to package it all in some APK, aka in a new app
@Wolf480pl also the SDK is like, around a GB or two, without counting the system images
@espectalll can you use the running system in place of a system image?
@Wolf480pl Yes, of course! Just acquire install and/or ADB permissions and you can test your apps within the same system
@espectalll And the final question: are all parts of Android SDK open-source? And if not, do these closed-source parts have a license that forbids me from running them on Android?
Well, it doesn't look like it forbids me form running them on Android, but:
>3.2 You may not use this SDK to develop applications for other platforms (including non-compatible implementations of Android) or to develop another SDK.[...]
>3.4 [...] you may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the SDK or any part of the SDK.
@Wolf480pl notice "as made available under the Android Open Source Project" - which makes you wonder, is there an open source version of the SDK, and this license only applies specifically to Google builds?
@espectalll hmm... so I download LineageOS sources, then build SDK from them, then use that SDK to package that SDK as an apk?
@Wolf480pl ...actually no, I don't know and I'm completely lost, but it must be somewhere around there
@Wolf480pl I can actually see myself setting up a CD server that builds both master and each stable version
It's unlikely I'll have time to go for it any time soon, but I'll keep that link for later.
@Wolf480pl np, it's nice to remember from time to time how much we can stop depending on Google for their own OS
@espectalll also, Android SDK doesn't work on ARM out of the box http://www.timelesssky.com/blog/building-android-sdk-build-tools-aapt-for-debian-arm
@Wolf480pl this may have changed, since Android has very significantly changed its codebase since 2014
Actually the way you described is neither recommended on Debian nor Archlinux.
For KDE for example you have to setup an whole build environment configuring lots of things to make changes to the source code.
The way you described, even if it would be supported, would only work with very small projects.
If the question is meant serious, there is official documentation on how to build software on/for Android. I can link it if you really want to read it
Welcome to your niu world ! We are a cute and loving international community Ｏ(≧▽≦)Ｏ !