Comments (15)
Tried to fix the compatibility problem with "backported" commons-compress's 7zip to use FileChannel
only, which should be adequate for our purposes (as of f002016).
Though displays are incorrect, at least such modified code can run fine on Android emulator running 4.4 (API 19).
Will continue work on as time allows.
from amazefilemanager.
Not enough time, will see.
from amazefilemanager.
It can be done with commons-compress...
from amazefilemanager.
@wb9688 What do you mean?
from amazefilemanager.
Commons compress is already implemented... Adding 7z to the decompression is not that difficult, see CompressedHelper.
from amazefilemanager.
To add support for 7zip you must create the Decompressor and Extractor and then add the constructors to getCompressorInstance() and getExtractorInstance() respectively (for that you will need to create the isSevenZip() function in CompressedHelper). Then recompile and run.
from amazefilemanager.
@EmmanuelMess maybe you can implement it? It's difficult for someone without the knowledge of java programming.
from amazefilemanager.
https://github.com/apache/commons-compress
from amazefilemanager.
Hello,
How do you add common compress to amaze or the android system ?
Thanks.
Best regards
B.
from amazefilemanager.
Hello Emmanuel,
Thanks for your job ! That's so great.
So I have to enter all theses commands in adb shell, isn't it ?
Thanks.
Cheers
B.
Edit : I've just try : your script it don't work this way, maybe I have to edit some stuff into it ? ty
barabbas@PepperChuwi:~$ adb shell
adb server is out of date. killing...
* daemon started successfully *
shell@HWPLK:/ $ package com.amaze.filemanager.filesystem.compressed;
/system/bin/sh: package: not found
127|shell@HWPLK:/ $
*
* @author Emmanuel
* on 23/11/2017, at 17:46.
*/
public class CompressedHelper {
public static final String fileExtensionZip = "zip", fileExtensinJar = "127|shell@HWPLK:/ $ import android.content.Context;
/system/bin/sh: import: not found
127|shell@HWPLK:/ $
ilesystem.compressed.extractcontents.helpers.GzipExtractor; <
[...]
from amazefilemanager.
I don't kwow why that make you mad ?! That was constructive & polite, it don't need to be moderated (just answer "I can't give you info" or anything else). Don't care about me I'll never ask you anything... Bye
from amazefilemanager.
@B4rabbas This is a 7z issue in a file manager, your deleted comment wasn't constructive, it was just asking for tutorials, this is not the place.
from amazefilemanager.
If I compile an apk with the compress-commons code and share it there I think it's a good request if the issue is fixed at the end...
However you can moderate this message too when you read it. I'll just read the few info I found here and try to make it with theses in completion of info mined on others forums
Of course it's not emotional reaction/ego trip, if I find a method to compile it I'll share it to, with your help or not (I understand you have a life like anybody else).
from amazefilemanager.
A little update about the situation.
For processing 7zip files, commons-compress seems to be the obvious choice, since we had been using it and if you don't want to mess with yet another external library.
I did wrote some POC on my own feature branch (which is a greedy one, I was trying to solve #138 and bring #1222 back), but end up crashing my Oneplus 2 running Slim7 (7.1.2)
2019-03-01 22:42:01.092 32484-32601/? E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.amaze.filemanager.debug, PID: 32484
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:325)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.NoSuchMethodError: No virtual method toPath()Ljava/nio/file/Path; in class Ljava/io/File; or its super classes (declaration of 'java.io.File' appears in /system/framework/core-oj.jar)
at org.apache.commons.compress.archivers.sevenz.SevenZFile.<init>(SevenZFile.java:108)
at org.apache.commons.compress.archivers.sevenz.SevenZFile.<init>(SevenZFile.java:262)
at com.amaze.filemanager.asynchronous.asynctasks.compress.SevenZipHelperTask.addElements(SevenZipHelperTask.java:30)
at com.amaze.filemanager.asynchronous.asynctasks.compress.CompressedHelperTask.doInBackground(CompressedHelperTask.java:48)
at com.amaze.filemanager.asynchronous.asynctasks.compress.CompressedHelperTask.doInBackground(CompressedHelperTask.java:33)
at android.os.AsyncTask$2.call(AsyncTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
And it turned out, java.io.File.toPath()
is only available from Android 8.0 onwards.
Choices ahead:
- Make 7z support only available > Android 8.0, but let's face it, many of us still have Kitkats and Lollipops
- Or some refactoring that can try to dodge
java.io.File.toPath()
? - Use other library if available... but read this SO entry too
Either way, feel free to contribute if you like, either fork my branch or roll your own PR.
from amazefilemanager.
@TranceLove great! Really appreciate you finding time to work on it. I'll also check your code and see if I can be of any help.
from amazefilemanager.
Related Issues (20)
- `IndexOutOfBoundsException` on `NetCopyConnectionInfo.#init`
- `CoderMalfunctionError` on `PWD#execute`
- NPE on `ServiceWatcherUtil#runService`
- App crashes when inactive on background, after screen locking HOT 1
- "Open With" menuitem does not work in Trash Bin HOT 1
- `CoderMalfunctionError` on `CharsetEncoder#encode` HOT 1
- Wrap Filenames
- Fail to build Amaze
- Crash reported by RJ HOT 1
- Cannot start FTP service from tile
- Crash reported by None HOT 1
- Crash reported by Lowerclasswarfare HOT 1
- `NoClassDefFoundError` on `LoadFilesListTask#listSmb` HOT 1
- Improve the List View for TalkBack Users
- Crash reported by hayrett HOT 1
- NPE on `MainFragment#computeScroll` HOT 1
- Crash Log HOT 1
- SFTP over OpenSSH server doesn't work HOT 16
- android folder on sd card HOT 1
- Crash reported by furryhacker69 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazefilemanager.