[guardian-dev] android-ffmpeg-java: FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
Hans-Christoph Steiner
hans at guardianproject.info
Mon Jul 22 22:56:01 EDT 2013
On 07/22/2013 10:41 PM, Nathan of Guardian wrote:
> On 07/22/2013 09:05 PM, Hans-Christoph Steiner wrote:
>> For future reference, this should be ported to use the 'assets' folder, then
>> you don't have to use the .mp3 trick.
>
> Actually the assets and res/raw limitation for 1MB on some systems are
> the same I believe.
>
> The reason we do the .mp3 trick at all, is more related to a bug in
> older versions of Android that wouldn't allow assets and res/raw larger
> 1MB to be compressed and uncompressed.
>
> For newer devices, they should both not have the 1MB limit.
I don't think that the assets/ folder has had a 1MB limit for a while. GPG
includes multiple files that are bigger than 1MB, including the gpg2 command,
which is 3MB. GPG, MeshTether, and LilDebi are minimum android-8/2.2.
> Otherwise, the real trick I want to move to is putting binaries in
> libs/armeabi named with .so (so "libs/armeabi/ffmpeg.so") and letting
> Android unpack them automatically!
>
> You can then set: chmod 700 on libs/armeabi/ffmpeg.so and execute it in
> place.
That's an interesting idea. I think Android will automatically set the
execute permissions on the libs it installs. And also, on newer versions of
Android, it unpacks the .so files into /data/lib, which even the app itself
cannot modify, only root. I'll bet that'll work for android-ffmpeg.
Unfortunately, it won't for GPG, MeshTether, and LilDebi since they have more
elaborate layout needs.
.hc
--
PGP fingerprint: 5E61 C878 0F86 295C E17D 8677 9F0F E587 374B BE81
More information about the Guardian-dev
mailing list