libaums
libaums copied to clipboard
SFF-8070i support?
(Could not create a pull request) Is there any plans to ads the support of SFF-8070i?
Hey there,
nope not planned so far. Helpt is greatly appreciated.
@magnusja
I am trying to start adding the support of subclass 5 devices, but I am kinda stuck with this issue on project building:
https://stackoverflow.com/questions/54854195/gradle-program-type-already-present#
The thing is ... I am using Android OS for development and the only way to see the debug output is through a file redirection of all calls of a methods of class Log. So I wrote my own Log class which dumps everything into files. I imported it both in libaums and in app projects. The problem is that I cannot build app project now because of the error (see link). Can you help me out to resolve this issue so I am going to be able to start working on 8070i support?
Hey @reardenlife
I have no idea what is going on. Did you try android.enableD8 = false like suggested here: https://github.com/firebase/FirebaseUI-Android/issues/1230
Other than that, you probably wanna share some code as I do not fully understand what you did with the Log class.
@magnusja,
The IGLogger is uploaded. So then I tried to include that class instead of android.utils.Log. And because of that I ran into the aforementioned problem.
I will try what you proposed a little bit later on. Have to run. Thanks for the help!
@magnusja,
Tried the android.enableD8 = false option you mentioned. The gradle (v5.1.1) says the option is deprecated.
Also uploaded libaums that I modified with IGLogger and which fails to build. I am kinda stuck here. Not sure what to attempt.
Deprecated only means it will be removed, but if it works with that option it can give us a hint what might be the problem.
Your repo looks good to me, but you are using a very old version of libaums. why is that?
Ok the problem is that you have the com.ilogger.Log class twice in your code, once in the libaums module and once in the app module. Then the compiler obviously does not know which one to take. Remove the class in the app module as the app module has a dependency on the libaums module anyways.
And please use a recent version of libaums (ie. checkout master or develop).
@magnusja
"Remove the class in the app module as the app module has a dependency on the libaums module anyways."
I.e. to comment out import com.iglogger.Log in the app project? If I will do so, the project not going to be compiled because of multiple "cannot find symbol" errors..
", but you are using a very old version of libaums. why is that?"
That is unclear. I pulled it out somehow. Aha. Apparently from here: https://github.com/norani/libaums-develop
Edit: Also tried to remove Log.class file from the project app, and left the import com.iglogger.Log untouched, but the error is the same.
@magnusja
"Remove the class in the app module as the app module has a dependency on the libaums module anyways."
I.e. to comment out
import com.iglogger.Login the app project? If I will do so, the project not going to be compiled because of multiple "cannot find symbol" errors..
No. You have the actual implementation twice, remove that class. See https://github.com/reardenlife/libaums/tree/master/libaums/src/main/java/com/iglogger and here https://github.com/reardenlife/libaums/tree/master/app/src/main/java/com/iglogger
Remove the latter one completely and do a clean build and as I said update libaums, the version you are using uses very old build tools.
", but you are using a very old version of libaums. why is that?"
That is unclear. I pulled it out somehow. Aha. Apparently from here: https://github.com/norani/libaums-develop
Well that is not even my repo ¯_(ツ)_/¯
@magnusja
So I pulled your repo. And just tried to build it w/o any modifications. And I failed to do so. Here is debug log of a build:
https://github.com/reardenlife/magnusja-libaums/blob/master/debug.log
I think that was the reason why I rejected your repo in the first place. I will look into it soon.
Thanks for the help.
Well with the latest Android Studio it builds. What did you say you are using again? You are developing on an Android Tablet or sth?
https://github.com/arturdm/jacoco-android-gradle-plugin/issues/54
maybe disable jacoco, it is not very important for you for now.
"You are developing on an Android Tablet or sth?"
Well, I am using a smartphone with a SSH connection to Cent OS7 Linux. There I am building everything and downloading apk to install and run the software. That is the only option I have right now. :)
My gradle version is 5.1.1. But anyways I think your project has some dependencies on a lower gradle version.
@magnusja
Build seems to be completed successfully, although some tests failed (as can be seen in the latest log).
Okay. Now I just have to insert my logging module.
Hey, I have a question.
I am not sure, but these tmp_blockdevice* files:
https://ibb.co/Bw1dSgt https://ibb.co/JHtB4zP
They were created on the test stage on the project building?
Edit: Yes. They were. I wonder why.
libaums/src/main/java/com/github/mjdev/libaums/driver/file/FileBlockDeviceDriver.java:41: File tempFile = File.createTempFile("blockdevice", "bin");
libaums/src/test/java/com/github/mjdev/libaums/fs/fat32/Fat32FileSystemProducer.java:41: File tempFile = File.createTempFile("blockdevice", ".bin");
libaums/src/test/java/com/github/mjdev/libaums/fs/fat32/Fat32FileSystemProducer.java:77: File tempFile = File.createTempFile("tmp_blockdevice", ".bin");
[root@v48807 libaums]#
They kinda ate up all the disk space on my VPS. That is why I noticed them.
I patched the files:
grep -rn -e android\.util\.Log --include=*.java | cut -d: -f1 | xargs -I{} sed -i s:android.util.Log:com.iglogger.Log:g {}
and copied the iglogger to the appropriate place. Now I just have to figure out why test stage clogs up the disk space.
https://github.com/magnusja/libaums/pull/173
and https://github.com/magnusja/libaums/pull/174 for the temp files
Hm. I patched the files (see the script above or libaums-patch.sh), added the iglogger into the appropriate location of libaums project ( magnusja-libaums /libaums/src/main/java/com/iglogger ) and modified device_filter.xml (see commit https://github.com/reardenlife/magnusja-libaums/commit/a48e9be7603bde2b64bdbf53438c6133e39fad93 ) so it accepts subclass 5 devices. So I compiled the app, ran it, seen the splash dialog from Android to ask the permission to access the device, ... The problem is ... I see nothing in the log.txt file that suppose to be in the root directory. This is really strange, because I successfully fused iglogger's smali file with another app and it worked correctly.
@magnusja, any ideas what went wrong? :)
https://github.com/reardenlife/magnusja-libaums
No not really. Did it also ask for permission to write on external/internal storage? Maybe you do not see the exception https://github.com/reardenlife/magnusja-libaums/blob/master/libaums/src/main/java/com/iglogger/Log.java#L896
@magnusja ,
:) Yes, I forgot about all these permissions. So I enabled it through the app properties in OS and it worked out - finally I can see the debug output, so I can take off from that point.
Thanks for your help!
@reardenlife What is SFF-8070i support going on?