diff options
author | root | 2021-07-08 14:32:16 +0200 |
---|---|---|
committer | root | 2021-07-08 14:32:16 +0200 |
commit | 9f6c28d938519b72f6a5a270287dd707ab9c6695 (patch) | |
tree | 11015b36e7ffcb713485538104ef1a5021eb60ac | |
download | aur-9f6c28d938519b72f6a5a270287dd707ab9c6695.tar.gz |
Initial Commit.
-rw-r--r-- | .SRCINFO | 43 | ||||
-rw-r--r-- | PKGBUILD | 167 | ||||
-rw-r--r-- | init-magisk.sh | 14 | ||||
-rw-r--r-- | magisk-init-rc.patch | 16 | ||||
-rw-r--r-- | media_codecs.xml | 89 | ||||
-rw-r--r-- | media_codecs_google_audio.xml | 97 | ||||
-rw-r--r-- | media_codecs_google_telephony.xml | 25 | ||||
-rw-r--r-- | media_codecs_google_video.xml | 122 |
8 files changed, 573 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1ae980a7bd60 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,43 @@ +pkgbase = anbox-image-houdini-magisk-xposed + pkgdesc = Android image for running in Anbox, with Houdini, Xposed Framework and Magisk (Bootless) + pkgver = 2018.07.19 + pkgrel = 1 + url = https://anbox.io + arch = x86_64 + license = custom + makedepends = curl + makedepends = lzip + makedepends = squashfs-tools + makedepends = unzip + optdepends = anbox: To make use of the image. + provides = anbox-image=2018.07.19 + conflicts = anbox-image + noextract = XposedInstaller_3.1.5.apk + source = https://build.anbox.io/android-images/2018/07/19/android_amd64.img + source = https://github.com/redchenjs/aur-packages/releases/download/anbox-image/houdini_y.sfs + source = https://github.com/redchenjs/aur-packages/releases/download/anbox-image/houdini_z.sfs + source = https://github.com/topjohnwu/Magisk/releases/download/v20.4/Magisk-v20.4.zip + source = https://github.com/youling257/XposedTools/files/1931996/xposed-x86_64.zip + source = XposedInstaller_3.1.5.apk::http://web.archive.org/web/20190807034045if_/https://dl.xda-developers.com/4/3/9/3/0/8/2/XposedInstaller_3.1.5.apk?key=vp4YYV_q9R9UXFJdEqPa6w&ts=1565149304 + source = magisk-init-rc.patch + source = init-magisk.sh + source = https://xnopyt.info/busybox + source = media_codecs.xml + source = media_codecs_google_video.xml + source = media_codecs_google_audio.xml + source = media_codecs_google_telephony.xml + md5sums = 26874452a6521ec2e37400670d438e33 + md5sums = 7ebf618b1af94a02322d9f2d2610090b + md5sums = 5ca37e1629edb7d13b18751b72dc98ad + md5sums = 9503fc692e03d60cb8897ff2753c193f + md5sums = 86ffee229b724a8019cc78c5e221c24f + md5sums = 315362d994986e6584203fca282f4472 + md5sums = 52959db8bc730ee3b7ab2cff7d41b299 + md5sums = 4720f9c1a7df7cf05cbbeecdd43797e4 + md5sums = bc3143a5e334402261bf0c703db5deac + md5sums = a638728bc2413d908f5eb44a9f09e947 + md5sums = 599598e70060eb74c119cf7dac0ce466 + md5sums = 43193761081a04ca18a28d4a6e039950 + md5sums = 91f5f3e5c31f8e221ae8f318527dcb83 + +pkgname = anbox-image-houdini-magisk-xposed diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..36c66ef6ece8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,167 @@ +# Maintainer: Dreieck +# Contributor: Xnopyt <billy@xnopyt.info> +# Contributor: Jack Chen <redchenjs at live dot com> +# Contributor: Mark Wagie <mark dot wagie at tutanota dot com> +# Contributor: Robosky <fangyuhao0612 at gmail dot com> + +pkgname=anbox-image-houdini-magisk-xposed +pkgver=2018.07.19 +pkgrel=1 +pkgdesc="Android image for running in Anbox, with Houdini, Xposed Framework and Magisk (Bootless)" +arch=('x86_64') +url="https://anbox.io" +license=('custom') +makedepends=('curl' 'lzip' 'squashfs-tools' 'unzip') +optdepends=('anbox: To make use of the image.') +provides=("anbox-image=${pkgver}") +conflicts=('anbox-image') + +source=( + "https://build.anbox.io/android-images/${pkgver//./\/}/android_amd64.img" + "https://github.com/redchenjs/aur-packages/releases/download/anbox-image/houdini_y.sfs" + "https://github.com/redchenjs/aur-packages/releases/download/anbox-image/houdini_z.sfs" + "https://github.com/topjohnwu/Magisk/releases/download/v20.4/Magisk-v20.4.zip" + "https://github.com/youling257/XposedTools/files/1931996/xposed-x86_64.zip" + "XposedInstaller_3.1.5.apk::http://web.archive.org/web/20190807034045if_/https://dl.xda-developers.com/4/3/9/3/0/8/2/XposedInstaller_3.1.5.apk?key=vp4YYV_q9R9UXFJdEqPa6w&ts=1565149304" + "magisk-init-rc.patch" + "init-magisk.sh" + "https://xnopyt.info/busybox" + "media_codecs.xml" + "media_codecs_google_video.xml" + "media_codecs_google_audio.xml" + "media_codecs_google_telephony.xml" +) + +noextract=('XposedInstaller_3.1.5.apk') + +md5sums=( + '26874452a6521ec2e37400670d438e33' + '7ebf618b1af94a02322d9f2d2610090b' + '5ca37e1629edb7d13b18751b72dc98ad' + '9503fc692e03d60cb8897ff2753c193f' + '86ffee229b724a8019cc78c5e221c24f' + '315362d994986e6584203fca282f4472' + '52959db8bc730ee3b7ab2cff7d41b299' + '4720f9c1a7df7cf05cbbeecdd43797e4' + 'bc3143a5e334402261bf0c703db5deac' + 'a638728bc2413d908f5eb44a9f09e947' + '599598e70060eb74c119cf7dac0ce466' + '43193761081a04ca18a28d4a6e039950' + '91f5f3e5c31f8e221ae8f318527dcb83' +) + +build () { + cd "$srcdir" + + # unpack anbox image + mkdir -p squashfs-root + rm -rf ./squashfs-root/* + unsquashfs -f -d ./squashfs-root ./android_amd64.img + + # load houdini_y + mkdir -p houdini_y + rm -rf ./houdini_y/* + unsquashfs -f -d ./houdini_y ./houdini_y.sfs + + mkdir -p ./squashfs-root/system/lib/arm + cp -r ./houdini_y/* ./squashfs-root/system/lib/arm + mv ./squashfs-root/system/lib/arm/libhoudini.so ./squashfs-root/system/lib/libhoudini.so + + # load houdini_z + mkdir -p houdini_z + rm -rf ./houdini_z/* + unsquashfs -f -d ./houdini_z ./houdini_z.sfs + + mkdir -p ./squashfs-root/system/lib64/arm64 + cp -r ./houdini_z/* ./squashfs-root/system/lib64/arm64 + mv ./squashfs-root/system/lib64/arm64/libhoudini.so ./squashfs-root/system/lib64/libhoudini.so + + # add houdini parser + mkdir -p ./squashfs-root/system/etc/binfmt_misc + echo ':arm_exe:M::\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28::/system/lib/arm/houdini:P' >> ./squashfs-root/system/etc/binfmt_misc/arm_exe + echo ':arm_dyn:M::\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x28::/system/lib/arm/houdini:P' >> ./squashfs-root/system/etc/binfmt_misc/arm_dyn + echo ':arm64_exe:M::\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7::/system/lib64/arm64/houdini64:P' >> ./squashfs-root/system/etc/binfmt_misc/arm64_exe + echo ':arm64_dyn:M::\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\xb7::/system/lib64/arm64/houdini64:P' >> ./squashfs-root/system/etc/binfmt_misc/arm64_dyn + + # add features + sed -i '/<\/permissions>/d' ./squashfs-root/system/etc/permissions/anbox.xml + sed -i '/<unavailable-feature name=\"android.hardware.wifi\" \/>/d' ./squashfs-root/system/etc/permissions/anbox.xml + sed -i '/<unavailable-feature name=\"android.hardware.bluetooth\" \/>/d' ./squashfs-root/system/etc/permissions/anbox.xml + + echo ' <feature name="android.hardware.touchscreen" /> + <feature name="android.hardware.audio.output" /> + <feature name="android.hardware.camera" /> + <feature name="android.hardware.camera.any" /> + <feature name="android.hardware.location" /> + <feature name="android.hardware.location.gps" /> + <feature name="android.hardware.location.network" /> + <feature name="android.hardware.microphone" /> + <feature name="android.hardware.screen.portrait" /> + <feature name="android.hardware.screen.landscape" /> + <feature name="android.hardware.wifi" /> + <feature name="android.hardware.bluetooth" />' >> ./squashfs-root/system/etc/permissions/anbox.xml + echo '</permissions>' >> ./squashfs-root/system/etc/permissions/anbox.xml + + # set processors + sed -i '/^ro.product.cpu.abilist=x86_64,x86/ s/$/,arm64-v8a,armeabi-v7a,armeabi/' ./squashfs-root/system/build.prop + sed -i '/^ro.product.cpu.abilist32=x86/ s/$/,armeabi-v7a,armeabi/' ./squashfs-root/system/build.prop + sed -i '/^ro.product.cpu.abilist64=x86_64/ s/$/,arm64-v8a/' ./squashfs-root/system/build.prop + + # enable nativebridge + echo 'persist.sys.nativebridge=1' >> ./squashfs-root/system/build.prop + sed -i 's/ro.dalvik.vm.native.bridge=0/ro.dalvik.vm.native.bridge=libhoudini.so/' ./squashfs-root/default.prop + + # enable opengles + echo 'ro.opengles.version=131072' >> ./squashfs-root/system/build.prop + + # install media codecs + cp media_codec*.xml ./squashfs-root/system/etc/ + + # install xposed + install -Dm 644 ./xposed.prop ./squashfs-root/system/xposed.prop + install -Dm 644 ./framework/XposedBridge.jar ./squashfs-root/system/framework/XposedBridge.jar + install -Dm 755 ./bin/app_process32_xposed ./squashfs-root/system/bin/app_process32 + install -Dm 755 ./bin/dex2oat ./squashfs-root/system/bin/dex2oat + install -Dm 755 ./bin/oatdump ./squashfs-root/system/bin/oatdump + install -Dm 755 ./bin/patchoat ./squashfs-root/system/bin/patchoat + install -Dm 644 ./lib/libart.so ./squashfs-root/system/lib/libart.so + install -Dm 644 ./lib/libart-compiler.so ./squashfs-root/system/lib/libart-compiler.so + install -Dm 644 ./lib/libsigchain.so ./squashfs-root/system/lib/libsigchain.so + install -Dm 644 ./lib/libxposed_art.so ./squashfs-root/system/lib/libxposed_art.so + install -Dm 755 ./bin/app_process64_xposed ./squashfs-root/system/bin/app_process64 + install -Dm 644 ./lib64/libart.so ./squashfs-root/system/lib64/libart.so + install -Dm 644 ./lib64/libart-compiler.so ./squashfs-root/system/lib64/libart-compiler.so + install -Dm 644 ./lib64/libart-disassembler.so ./squashfs-root/system/lib64/libart-disassembler.so + install -Dm 644 ./lib64/libsigchain.so ./squashfs-root/system/lib64/libsigchain.so + install -Dm 644 ./lib64/libxposed_art.so ./squashfs-root/system/lib64/libxposed_art.so + + mkdir -p ./squashfs-root/system/app/XposedInstaller + chmod 755 ./squashfs-root/system/app/XposedInstaller + install -Dm 644 XposedInstaller_3.1.5.apk ./squashfs-root/system/app/XposedInstaller/XposedInstaller.apk + + # install magisk + rm -f ./squashfs-root/system/bin/su + rm -f ./squashfs-root/system/xbin/su + rm -f ./squashfs-root/system/sbin/su + + install -Dm 755 ./init-magisk.sh ./squashfs-root/system/bin/init-magisk.sh + install -Dm 755 ./x86/magiskinit64 ./squashfs-root/sbin/magiskinit + install -Dm 755 ./busybox ./squashfs-root/busybox + install -Dm 755 ./common/util_functions.sh ./squashfs-root/util_functions.sh + install -Dm 755 ./common/boot_patch.sh ./squashfs-root/boot_patch.sh + install -Dm 755 ./common/addon.d.sh ./squashfs-root/addon.d.sh + cd "$srcdir"/squashfs-root/sbin + ln -s magiskinit magisk + ln -s magiskinit magiskpolicy + cd "$srcdir" + patch --forward --strip=1 --input="${srcdir}/magisk-init-rc.patch" +} + +package() { + cd "$srcdir" + + # repack image + mksquashfs ./squashfs-root ./android.img -noappend -b 131072 -comp xz -Xbcj x86 + + install -Dm 644 ./android.img "$pkgdir/var/lib/anbox/android.img" +} diff --git a/init-magisk.sh b/init-magisk.sh new file mode 100644 index 000000000000..e25ed2269fe9 --- /dev/null +++ b/init-magisk.sh @@ -0,0 +1,14 @@ +#!/system/bin/sh + +mkdir -p /data/adb/magisk +cp /busybox /data/adb/magisk/busybox +cp /util_functions.sh /data/adb/magisk/util_functions.sh +cp /boot_patch.sh /data/adb/magisk/boot_patch.sh +cp /addon.d.sh /data/adb/magisk/addon.d.sh +magisk -c >&2 +ln -sf /data /sbin/.magisk/mirror/data +ln -sf /vendor /sbin/.magisk/mirror/vendor +magisk --post-fs-data +sleep 1 +magisk --service +magisk --boot-complete
\ No newline at end of file diff --git a/magisk-init-rc.patch b/magisk-init-rc.patch new file mode 100644 index 000000000000..d812afb1c8ec --- /dev/null +++ b/magisk-init-rc.patch @@ -0,0 +1,16 @@ +--- a/squashfs-root/init.rc ++++ b/squashfs-root/init.rc +@@ -668,3 +668,12 @@ + service flash_recovery /system/bin/install-recovery.sh + class main + oneshot ++ ++on property:dev.bootcomplete=1 ++ start magisk ++ ++service magisk /system/bin/init-magisk.sh ++ class main ++ user root ++ group root ++ oneshot +\ No newline at end of file diff --git a/media_codecs.xml b/media_codecs.xml new file mode 100644 index 000000000000..0b18417396c3 --- /dev/null +++ b/media_codecs.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- Copyright (C) 2012 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. +--> + +<!-- +<!DOCTYPE MediaCodecs [ +<!ELEMENT Include EMPTY> +<!ATTLIST Include href CDATA #REQUIRED> +<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*> +<!ELEMENT Decoders (MediaCodec|Include)*> +<!ELEMENT Encoders (MediaCodec|Include)*> +<!ELEMENT MediaCodec (Type|Quirk|Include)*> +<!ATTLIST MediaCodec name CDATA #REQUIRED> +<!ATTLIST MediaCodec type CDATA> +<!ELEMENT Type EMPTY> +<!ATTLIST Type name CDATA #REQUIRED> +<!ELEMENT Quirk EMPTY> +<!ATTLIST Quirk name CDATA #REQUIRED> +]> + +There's a simple and a complex syntax to declare the availability of a +media codec: + +A codec that properly follows the OpenMax spec and therefore doesn't have any +quirks and that only supports a single content type can be declared like so: + + <MediaCodec name="OMX.foo.bar" type="something/interesting" /> + +If a codec has quirks OR supports multiple content types, the following syntax +can be used: + + <MediaCodec name="OMX.foo.bar" > + <Type name="something/interesting" /> + <Type name="something/else" /> + ... + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Quirk name="output-buffers-are-unreadable" /> + </MediaCodec> + +Only the three quirks included above are recognized at this point: + +"requires-allocate-on-input-ports" + must be advertised if the component does not properly support specification + of input buffers using the OMX_UseBuffer(...) API but instead requires + OMX_AllocateBuffer to be used. + +"requires-allocate-on-output-ports" + must be advertised if the component does not properly support specification + of output buffers using the OMX_UseBuffer(...) API but instead requires + OMX_AllocateBuffer to be used. + +"output-buffers-are-unreadable" + must be advertised if the emitted output buffers of a decoder component + are not readable, i.e. use a custom format even though abusing one of + the official OMX colorspace constants. + Clients of such decoders will not be able to access the decoded data, + naturally making the component much less useful. The only use for + a component with this quirk is to render the output to the screen. + Audio decoders MUST NOT advertise this quirk. + Video decoders that advertise this quirk must be accompanied by a + corresponding color space converter for thumbnail extraction, + matching surfaceflinger support that can render the custom format to + a texture and possibly other code, so just DON'T USE THIS QUIRK. + +--> + +<MediaCodecs> + <Settings> + <Setting name="supports-multiple-secure-codecs" value="true" /> + <Setting name="supports-secure-with-non-secure-codec" value="true" /> + <Setting name="max-video-encoder-input-buffers" value="9" /> + </Settings> + <Include href="media_codecs_google_video.xml" /> + <Include href="media_codecs_google_audio.xml" /> + <Include href="media_codecs_google_telephony.xml" /> +</MediaCodecs> diff --git a/media_codecs_google_audio.xml b/media_codecs_google_audio.xml new file mode 100644 index 000000000000..632088ae7e5b --- /dev/null +++ b/media_codecs_google_audio.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- Copyright (C) 2014 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. +--> + +<Included> + <Decoders> + <MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg"> + <Limit name="channel-count" max="2" /> + <Limit name="sample-rate" ranges="8000,11025,12000,16000,22050,24000,32000,44100,48000" /> + <Limit name="bitrate" range="8000-320000" /> + </MediaCodec> + <MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp"> + <Limit name="channel-count" max="1" /> + <Limit name="sample-rate" ranges="8000" /> + <Limit name="bitrate" range="4750-12200" /> + </MediaCodec> + <MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb"> + <Limit name="channel-count" max="1" /> + <Limit name="sample-rate" ranges="16000" /> + <Limit name="bitrate" range="6600-23850" /> + </MediaCodec> + <MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm"> + <Limit name="channel-count" max="8" /> + <Limit name="sample-rate" ranges="7350,8000,11025,12000,16000,22050,24000,32000,44100,48000" /> + <Limit name="bitrate" range="8000-960000" /> + </MediaCodec> + <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw"> + <Limit name="channel-count" max="1" /> + <Limit name="sample-rate" ranges="8000-48000" /> + <Limit name="bitrate" range="64000" /> + </MediaCodec> + <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw"> + <Limit name="channel-count" max="1" /> + <Limit name="sample-rate" ranges="8000-48000" /> + <Limit name="bitrate" range="64000" /> + </MediaCodec> + <MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis"> + <Limit name="channel-count" max="8" /> + <Limit name="sample-rate" ranges="8000-96000" /> + <Limit name="bitrate" range="32000-500000" /> + </MediaCodec> + <MediaCodec name="OMX.google.opus.decoder" type="audio/opus"> + <Limit name="channel-count" max="8" /> + <Limit name="sample-rate" ranges="48000" /> + <Limit name="bitrate" range="6000-510000" /> + </MediaCodec> + <MediaCodec name="OMX.google.raw.decoder" type="audio/raw"> + <Limit name="channel-count" max="8" /> + <Limit name="sample-rate" ranges="8000-96000" /> + <Limit name="bitrate" range="1-10000000" /> + </MediaCodec> + <MediaCodec name="OMX.google.flac.decoder" type="audio/flac"> + <Limit name="channel-count" max="8" /> + <Limit name="sample-rate" ranges="1-655350" /> + <Limit name="bitrate" range="1-21000000" /> + </MediaCodec> + </Decoders> + <Encoders> + <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm"> + <Limit name="channel-count" max="6" /> + <Limit name="sample-rate" ranges="8000,11025,12000,16000,22050,24000,32000,44100,48000" /> + <!-- also may support 64000, 88200 and 96000 Hz --> + <Limit name="bitrate" range="8000-960000" /> + </MediaCodec> + <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp"> + <Limit name="channel-count" max="1" /> + <Limit name="sample-rate" ranges="8000" /> + <Limit name="bitrate" range="4750-12200" /> + <Feature name="bitrate-modes" value="CBR" /> + </MediaCodec> + <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb"> + <Limit name="channel-count" max="1" /> + <Limit name="sample-rate" ranges="16000" /> + <Limit name="bitrate" range="6600-23850" /> + <Feature name="bitrate-modes" value="CBR" /> + </MediaCodec> + <MediaCodec name="OMX.google.flac.encoder" type="audio/flac"> + <Limit name="channel-count" max="2" /> + <Limit name="sample-rate" ranges="1-655350" /> + <Limit name="bitrate" range="1-21000000" /> + <Limit name="complexity" range="0-8" default="5" /> + <Feature name="bitrate-modes" value="CQ" /> + </MediaCodec> + </Encoders> +</Included> diff --git a/media_codecs_google_telephony.xml b/media_codecs_google_telephony.xml new file mode 100644 index 000000000000..5ad90d9ab369 --- /dev/null +++ b/media_codecs_google_telephony.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- Copyright (C) 2014 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. +--> + +<Included> + <Decoders> + <MediaCodec name="OMX.google.gsm.decoder" type="audio/gsm"> + <Limit name="channel-count" max="1" /> + <Limit name="sample-rate" ranges="8000" /> + <Limit name="bitrate" range="13000" /> + </MediaCodec> + </Decoders> +</Included> diff --git a/media_codecs_google_video.xml b/media_codecs_google_video.xml new file mode 100644 index 000000000000..829f403af0aa --- /dev/null +++ b/media_codecs_google_video.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- Copyright (C) 2014 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. +--> + +<Included> + <Decoders> + <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es"> + <!-- profiles and levels: ProfileSimple : Level3 --> + <Limit name="size" min="2x2" max="352x288" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" range="12-11880" /> + <Limit name="bitrate" range="1-384000" /> + <Feature name="adaptive-playback" /> + </MediaCodec> + <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp"> + <!-- profiles and levels: ProfileBaseline : Level30, ProfileBaseline : Level45 + ProfileISWV2 : Level30, ProfileISWV2 : Level45 --> + <Limit name="size" min="2x2" max="352x288" /> + <Limit name="alignment" value="2x2" /> + <Limit name="bitrate" range="1-384000" /> + <Feature name="adaptive-playback" /> + </MediaCodec> + <MediaCodec name="OMX.google.h264.decoder" type="video/avc"> + <!-- profiles and levels: ProfileHigh : Level52 --> + <Limit name="size" min="2x2" max="4080x4080" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="block-count" range="1-32768" /> <!-- max 4096x2048 equivalent --> + <Limit name="blocks-per-second" range="1-1966080" /> + <Limit name="bitrate" range="1-48000000" /> + <Feature name="adaptive-playback" /> + </MediaCodec> + <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc"> + <!-- profiles and levels: ProfileMain : MainTierLevel51 --> + <Limit name="size" min="2x2" max="4096x4096" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="8x8" /> + <Limit name="block-count" range="1-196608" /> <!-- max 4096x3072 --> + <Limit name="blocks-per-second" range="1-2000000" /> + <Limit name="bitrate" range="1-10000000" /> + <Feature name="adaptive-playback" /> + </MediaCodec> + <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8"> + <Limit name="size" min="2x2" max="2048x2048" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="block-count" range="1-16384" /> + <Limit name="blocks-per-second" range="1-1000000" /> + <Limit name="bitrate" range="1-40000000" /> + <Feature name="adaptive-playback" /> + </MediaCodec> + <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9"> + <Limit name="size" min="2x2" max="2048x2048" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="block-count" range="1-16384" /> + <Limit name="blocks-per-second" range="1-500000" /> + <Limit name="bitrate" range="1-40000000" /> + <Feature name="adaptive-playback" /> + </MediaCodec> + </Decoders> + + <Encoders> + <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp"> + <!-- profiles and levels: ProfileBaseline : Level45 --> + <Limit name="size" min="176x144" max="176x144" /> + <Limit name="alignment" value="16x16" /> + <Limit name="bitrate" range="1-128000" /> + </MediaCodec> + <MediaCodec name="OMX.google.h264.encoder" type="video/avc"> + <!-- profiles and levels: ProfileBaseline : Level41 --> + <Limit name="size" min="16x16" max="2048x2048" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="block-count" range="1-8192" /> <!-- max 2048x1024 --> + <Limit name="blocks-per-second" range="1-245760" /> + <Limit name="bitrate" range="1-12000000" /> + <Feature name="intra-refresh" /> + </MediaCodec> + <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es"> + <!-- profiles and levels: ProfileCore : Level2 --> + <Limit name="size" min="16x16" max="176x144" /> + <Limit name="alignment" value="16x16" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" range="12-1485" /> + <Limit name="bitrate" range="1-64000" /> + </MediaCodec> + <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8"> + <!-- profiles and levels: ProfileMain : Level_Version0-3 --> + <Limit name="size" min="2x2" max="2048x2048" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <!-- 2016 devices can encode at about 10fps at this block count --> + <Limit name="block-count" range="1-16384" /> + <Limit name="bitrate" range="1-40000000" /> + <Feature name="bitrate-modes" value="VBR,CBR" /> + </MediaCodec> + <MediaCodec name="OMX.google.vp9.encoder" type="video/x-vnd.on2.vp9"> + <!-- profiles and levels: ProfileMain : Level_Version0-3 --> + <Limit name="size" min="2x2" max="2048x2048" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <!-- 2016 devices can encode at about 8fps at this block count --> + <Limit name="block-count" range="1-3600" /> <!-- max 1280x720 --> + <Limit name="bitrate" range="1-40000000" /> + <Feature name="bitrate-modes" value="VBR,CBR" /> + </MediaCodec> + </Encoders> +</Included> |