Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aapt in TermuxArch #31

Closed
stephenljk opened this issue Jan 8, 2018 · 5 comments
Closed

aapt in TermuxArch #31

stephenljk opened this issue Jan 8, 2018 · 5 comments
Labels

Comments

@stephenljk
Copy link

Hi there, first of all thank you for such a wonderful port of ArchLinux. I am currently trying to convert cheap affordable tablet into teaching computer for under privilege kids in my neighborhood. I have so far manage to install nodejs as well as postgres database to teach basic HTML scripting, however I am stuck when I tried to use Cordova to build hybrid app.

After installing Cordova, I use the cordova build command, however I can't get it pass the aapt

screen shot 2018-01-08 at 4 42 09 pm

Since the error says it cannot execute aapt, I tried manually running aapt and this is the result:

screen shot 2018-01-08 at 4 44 48 pm

I assumed the aapt is not compiled for my armv7, so I installed aapt in termux, copied it and try running it TermuxArch. aapt is able to execute in termux, but it failed again in TermuxArch:

screen shot 2018-01-08 at 4 48 20 pm

At this point in time I am stuck. Can you shine some light on how to get aapt running in TermuxArch? Thanks.

Regards,

Stephen

@SDRausty
Copy link
Owner

SDRausty commented Jan 9, 2018

You are welcome; and thank you for posting this issue.

aapt is not compiled for my armv7

Correct. The reason behind this issue is that gradle downloads files for the wrong architecture.

installed aapt in termux, copied it and try running it TermuxArch

Both architecture and operating system should match for most packages to work. Especially when these packages contain binary files like aapt.

I am stuck

I appears that everyone on arm devices without the knowhow is stuck. The lucky ones with x86-64 devices are not it seems, and appear to have the green light for gradle builds on device at present. Trying to build https://aur.archlinux.org/packages/android-sdk/ in Arch Linux Termux PRoot on device only confirmed the issue we have encountered. The error message from building android-sdk on device states not available for armv7. There should be a solution https://github.com/sdrausty/buildAPKs/issues/3 for "Gradle Builds..." available for everyone today.

The course to take for arm device users appears to be to build the APK in Arch Linux Termux PRoot using gradle as far as possible. Then:

First; Identify the dependencies after downloading via gradle. Which jar files and similar are needed to create the APK.
Second; Modify https://raw.githubusercontent.com/sdrausty/buildAPKs/master/scripts/build/buildOne.sh the build script to include these dependencies to build directly in Termux on Android, Chromebook and Fire OS.

Run this modified build script from ~/buildAPKs to build and sign the APK. Termux in Termux was successfully created in summer 2017 employing https://github.com/sdrausty/buildAPKs on device with a similar method! Enjoy building your project in Termux on device. Building Android in Termux should be a natural spinoff from this thread.

@stephenljk
Copy link
Author

stephenljk commented Jan 15, 2018 via email

@SDRausty
Copy link
Owner

@stephenljk Thank you for your response. Evidently I did not make myself clear enough. You cannot run most Termux debs in Arch Linux Termux PRoot. Arch Linux uses an emulated kernel. Termux uses the system kernel.

This part is done in Arch Linux Termux PRoot.

First; Identify the dependencies after downloading via gradle. Which jar files and similar are needed to create the APK.

This part is done in straight Termux using buildAPKs.

Second; Modify https://raw.githubusercontent.com/sdrausty/buildAPKs/master/scripts/build/buildOne.sh the build script to include these dependencies to build directly in Termux on Android, Chromebook and Fire OS.

Run a modified buildOne.sh to include the libraries gradle downloaded in the directory with AndroidManifest.xml should produce the desired result in straight Termux.

Use part one in Arch Linux Termux PRoot to get the libraries.
Do part two in straight Termux to include these libraries in the build.

@tomty89
Copy link

tomty89 commented Jan 24, 2018

Arch Linux uses an emulated kernel. Termux uses the system kernel.

Nope, unless by "emulated kernel" you mean proot. You don't even need the kernel because you aren't booting to a system. pacman -Rs linux-aarch64 might be the first thing you want to do, before the very first pacman -Syu.

They do uses different C libraries and so though.

@SDRausty
Copy link
Owner

Issue closed because it does not concern setupTermuxArch itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants