Benjamin-Loison / android

0 stars 0 forks source link

Access Android APIs #30

Open Benjamin-Loison opened 3 weeks ago

Benjamin-Loison commented 3 weeks ago

Termux does not seem to allow it, at least without programming.

Would help Benjamin-Loison/android_packages_apps_Aperture/issues/7.

Benjamin-Loison commented 2 weeks ago

https://developer.android.com/reference/android/hardware/camera2/package-summary

https://github.com/termux/termux-api-package/blob/e62bdadea3f26b60430bb85248f300fee68ecdcc/scripts/termux-camera-info.in

https://github.com/termux/termux-api/blob/cff225e41e963267a8e5fdd59a83b5fe224dcb5d/app/src/main/java/com/termux/api/apis/CameraInfoAPI.java

https://raccoon.onyxbits.de/blog/run-java-app-android/#it-works-but-how-do-i-get-a-context

https://developer.android.com/codelabs/build-your-first-android-app

Without using Android studio preferably.

https://developer.android.com/build/building-cmdline

https://www.hanshq.net/command-line-android.html

https://github.com/bentxt/hello-android-cli

PLATFORM=/usr/lib/android-sdk/platforms/android-33
BUILD_TOOLS=/usr/lib/android-sdk/build-tools/30.0.3
Hello.unsigned.apk
Hello.aligned.apk

both trigger:

adb: failed to install Hello.unsigned.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl327627774.tmp/base.apk: Attempt to get length of null array]

only Hello.apk is adb installed correctly.

Note that adb install overwrites already installed app.

Even if the app is running in the foreground, adb install stops current app and starting it again starts the new version.

Note that my Fairphone 4 has Android 14, hence Android SDK 34, according to Wikipedia.

See Robust_image_source_identification_on_modern_smartphones/src/commit/aca86e33448b21ff1923c7ea05801da5a56b15ed/datasets/android.