From c1542f3336e6f7207552bbce71c206055387032e Mon Sep 17 00:00:00 2001 From: JustAnyone Date: Mon, 23 Feb 2026 11:32:28 +0200 Subject: [PATCH] Add android-apkeditor-bin --- android-apkeditor-bin/.SRCINFO | 18 ++++++++ android-apkeditor-bin/.gitignore | 5 +++ android-apkeditor-bin/PKGBUILD | 30 +++++++++++++ android-apkeditor-bin/apkeditor | 77 ++++++++++++++++++++++++++++++++ 4 files changed, 130 insertions(+) create mode 100644 android-apkeditor-bin/.SRCINFO create mode 100644 android-apkeditor-bin/.gitignore create mode 100644 android-apkeditor-bin/PKGBUILD create mode 100644 android-apkeditor-bin/apkeditor diff --git a/android-apkeditor-bin/.SRCINFO b/android-apkeditor-bin/.SRCINFO new file mode 100644 index 0000000..7329469 --- /dev/null +++ b/android-apkeditor-bin/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = android-apkeditor-bin + pkgdesc = A powerful Android APK resources editor + pkgver = 1.4.7 + pkgrel = 1 + url = https://github.com/REAndroid/APKEditor + arch = any + license = Apache-2.0 + depends = java-runtime>=8 + provides = android-apkeditor + conflicts = android-apkeditor + conflicts = android-apkeditor-git + noextract = APKEditor-1.4.7.jar + source = https://github.com/REAndroid/APKEditor/releases/download/V1.4.7/APKEditor-1.4.7.jar + source = apkeditor + sha256sums = bec1dd156850df8392c9a45a735b86ae71bc913325ee029ffbb4080a8b41ca1c + sha256sums = fe9190ee1f89414afa2ec1629023a4b802ad73acac1ff65b859c128c95895f3b + +pkgname = android-apkeditor-bin diff --git a/android-apkeditor-bin/.gitignore b/android-apkeditor-bin/.gitignore new file mode 100644 index 0000000..d2db360 --- /dev/null +++ b/android-apkeditor-bin/.gitignore @@ -0,0 +1,5 @@ +/* +!/.gitignore +!/.SRCINFO +!/PKGBUILD +!/apkeditor diff --git a/android-apkeditor-bin/PKGBUILD b/android-apkeditor-bin/PKGBUILD new file mode 100644 index 0000000..a3afbb3 --- /dev/null +++ b/android-apkeditor-bin/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Dominykas Svetikas +# Based on PKGBUILD for android-apktool-bin +_pkgname=android-apkeditor +pkgname=${_pkgname}-bin +pkgdesc="A powerful Android APK resources editor" +pkgver=1.4.7 +pkgrel=1 +arch=(any) +url="https://github.com/REAndroid/APKEditor" +license=("Apache-2.0") +depends=("java-runtime>=8") +provides=("${_pkgname}") +conflicts=("${_pkgname}" "${_pkgname}-git") +source=( + "https://github.com/REAndroid/APKEditor/releases/download/V${pkgver}/APKEditor-${pkgver}.jar" + "apkeditor" +) +sha256sums=( + 'bec1dd156850df8392c9a45a735b86ae71bc913325ee029ffbb4080a8b41ca1c' + 'fe9190ee1f89414afa2ec1629023a4b802ad73acac1ff65b859c128c95895f3b' +) +noextract=("APKEditor-${pkgver}.jar") + +package() { + # copy the main .jar file + install -Dm644 "APKEditor-${pkgver}.jar" "${pkgdir}/usr/share/java/${_pkgname}/apkeditor.jar" + + # copy the executable script + install -Dm755 apkeditor "${pkgdir}/usr/bin/apkeditor" +} diff --git a/android-apkeditor-bin/apkeditor b/android-apkeditor-bin/apkeditor new file mode 100644 index 0000000..d506428 --- /dev/null +++ b/android-apkeditor-bin/apkeditor @@ -0,0 +1,77 @@ +#!/bin/bash +# +# Copyright (C) 2007 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script is a wrapper for smali.jar, so you can simply call "smali", +# instead of java -jar smali.jar. It is heavily based on the "dx" script +# from the Android SDK + +# Set up prog to be the path of this script, including following symlinks, +# and set up progdir to be the fully-qualified pathname of its directory. +prog="$0" +while [ -h "${prog}" ]; do + newProg=`/bin/ls -ld "${prog}"` + echo ${newProg} + + + newProg=`expr "${newProg}" : ".* -> \(.*\)$"` + if expr "x${newProg}" : 'x/' >/dev/null; then + prog="${newProg}" + else + progdir=`dirname "${prog}"` + prog="${progdir}/${newProg}" + fi +done +oldwd=`pwd` +progdir=`dirname "${prog}"` +cd "${progdir}" +progdir=`pwd` +prog="${progdir}"/`basename "${prog}"` +cd "${oldwd}" + + +jarfile=apkeditor.jar +libdir="/usr/share/java/android-apkeditor" +if [ ! -r "$libdir/$jarfile" ] +then + echo `basename "$prog"`": can't find $jarfile" + exit 1 +fi + +javaOpts="" + +# If you want DX to have more memory when executing, uncomment the following +# line and adjust the value accordingly. Use "java -X" for a list of options +# you can pass here. +# +javaOpts="-Xmx256M" + +# Alternatively, this will extract any parameter "-Jxxx" from the command line +# and pass them to Java (instead of to dx). This makes it possible for you to +# add a command-line parameter such as "-JXmx256M" in your ant scripts, for +# example. +while expr "x$1" : 'x-J' >/dev/null; do + opt=`expr "$1" : '-J\(.*\)'` + javaOpts="${javaOpts} -${opt}" + shift +done + +if [ "$OSTYPE" = "cygwin" ] ; then + jarpath=`cygpath -w "$libdir/$jarfile"` +else + jarpath="$libdir/$jarfile" +fi + +exec java $javaOpts -jar "$jarpath" "$@"