B4A Library ProBundle

wonder

Expert
Licensed User
Longtime User
Thank you!
I'm looking forward into it!
 

Luis Felipe

Member
Licensed User
Longtime User
A new version of ProBundle is available for download.

- I fixed the password bug in ArchiverPlusUnRar.
- I added the ReadArrayFromAssets function to FastIO.

Hello Informatix. Where is it downloadable ? Are you going to send a new email with a link to the people who bought it ?
Thanx and great job !
 

Informatix

Expert
Licensed User
Longtime User
I'm really proud of my new solution to secure your data. I can't wait to share with you my SecureVault generator. The code works fine. I have to write the guide now...
I tried to hack an APK secured by this new solution and didn't succeed. I embedded everything in the C code of the generated library (data and cryptography functions) so it's extremely opaque. The protection won't last long on a subverted system (where the security libraries have been cracked) but it's the common fate of all protections and that does not mean that the app can easily be cracked (forcing an APK to reveal its secrets on a modified system and modifying an APK to allow its use on all systems are two different things).
 

Informatix

Expert
Licensed User
Longtime User
There's a new version of ProBundle and ProtectMyApp available for download. I had interesting readings these past days about cracking an Android app. It seems that a .so library is a frontier beyond which only go experienced hackers, so I added a native library to F5Steg.
My guide to create a Secure Vault library and its C+Java generator are also in the new release.

Changelog:
- I edited or added paragraphs in the ProtectMyApp guide between p.13 and p.20 (nothing was removed, just rewritten or extended);
- I moved some functions of the F5Steg library into a native library to increase the opacity of the code and the difficulty to change it;
- The F5Steg library uses now a more complex algorithm to encrypt data, with a random salt;
- I added a guide explaining how to create your own library in C and Java to store sensitive data, with all the necessary code to generate the library.
 

aidymp

Well-Known Member
Licensed User
Longtime User
I am still experiencing problems with ArchiverPlusZip 1.1, In version 1.0 my app works great! using 1.1 my progress fails to update using the same method?

however in 1.0 im trying to zip a folder! the folder is in the Android folder (is that the root of my problem?) The most popular error I see is


This is a result of this command:
B4X:
Arc.AddFolderToZip(MyPath , ArchiveFolder & "pack.zip" , "pack")

I have stripped your demos down to the minimum and I also get random crashes and exits. I can see my paths are correct as I get the first few filenames.

If I try 1.1 its the same, but my unzip routine does not work. I have played with this on and off for the past 4 days. I really want to use this lib!

Any clues?

I am going to try moving the folder and zipping from a different location.

Points I have noted, the demos originally your example took under 1 minute to run - last attempt un modified took about 10 mins!

Im not saying the lib is broke! its may be a problem at my side, as I said im sure the demos run pretty fast when I first tried it!

Im on Windows 10, using 2 real Android devices. I cannot upload my project, as its a) an embarrassment to programmers! lol and b) Im hoping once it works (IF it ever does) it will make a bit of revenue!

So any tips please? This may have no bearing at all but Im going to format the PC, And Android devices as All seem to be acting strange, B4A gives little or no logging info, and I get errors on compiling, saying files are missing or unable to be written too.

Thanks

Aidy
 

Informatix

Expert
Licensed User
Longtime User
Without code, I cannot help.

I probably zipped or unzipped hundreds of files during my tests, on different devices, so I'm quite sure that the library works fine. The problem is probably due to your code or the lack of free space on your device.
 

aidymp

Well-Known Member
Licensed User
Longtime User
Without code, I cannot help.

I probably zipped or unzipped hundreds of files during my tests, on different devices, so I'm quite sure that the library works fine. The problem is probably due to your code or the lack of free space on your device.

Yes I understand, I will format my devices, and look again If I cannot solve can I email my project to you?

Thanks

Aidy
 

aidymp

Well-Known Member
Licensed User
Longtime User
I feel like a broken record now lol! Right 48 hours of formatting and trying to get everything back in place, I have managed to get my code back to a working state, after downgrading to windows 7, using api 23, I had to change a lot of stuff and implement the okhttp lib as well as 3 hours trying to work out why my 9 patch images came up with an error (only to find they had been deleted due to the OS reinstall removing the read only flags!

So I run my project, using 1.1 of the ArchiverPlusZip lib! and it fails it starts well (if a little slow) extracting the zip the file names and percent are displayed in the log in real time this is the code I am using.

B4X:
Sub Unzipper
    apm1.BottomText= "Extracting..."
    apm1.Progress=0
    ImageView4.Visible=False
    apm1.Visible =True
    Label4.text = "Extracting Setup!"
    wv1.Visible=False
    ProgressBar1.Progress=0
    Arc.UnZip(File.DirDefaultExternal & "/Download/Settings.zip", File.DirRootExternal & "/Android/data/somelocation/files/.somehiddenfolder/","prog")
End Sub

Sub zipprog
    apm1.Progress = ProgressBar1.Progress
    'DoEvents
End Sub

Sub prog_ZipProgression(Operation As Int, FileName As String, PercentDone As Float)
    Log(FileName & " (" & PercentDone & "%)")
    ProgressBar1.Progress=PercentDone
    Log("Progressbar reads "&ProgressBar1.Progress)
    'apm1.Progress = ProgressBar1.Progress
    'DoEvents
        CallSubDelayed(Me, "zipprog")
End Sub

Using version 1.0 The above code works fine (the progress meter (apm1) updates evenly and extraction is VERY FAST!!!. however in 1.1 the progress meter does not update at all. and the zip extraction just quits at a random percent I have had it quit at 0% 1% 8% 34% 87% etc but I have also had it extract completely after a very long time!

As I said in my earlier post, I have formatted my PC, formatted both my android tablet, and TV-box and the result is the same. I was going to use version 1.0 of the lib and move along with the the other features, but the next feature was a backup routine, and I was hoping to use the lib to zip a folder, however that behaves in the same way in both 1 and 1.1 i.e. it wont zip a folder it starts, and then at a random % just closes my app?

I have now spent far too long on this problem, is there any obvious reason as to why the above code would not work? my device has 5gb free and my tablet has 12gb free.the zip file works fine and has no errors.

Here is the code I use to zip a folder

B4X:
Sub BldImg1_Click
    wv1.Visible=False
    apm1.BottomText="Backing Up."
    apm1.Visible=True
    clv1.Text=""
    ButtonsOFF
    DoEvents
    Dim ArchiveFolder As String = File.DirRootExternal & "/Download/"
    Arc.ZipCompression = True
    Arc.ZipCompressionLevel = 1
    Arc.AddFolderToZip(XBMCPath , ArchiveFolder & "pack.zip" , "pack")
End Sub

Sub pack_ZipProgression(Operation As Int, FileName As String, PercentDone As Float)
    Log(FileName & " (" & PercentDone & "%)")
    ProgressBar1.Progress=PercentDone
    CallSubDelayed(Me, "zipprog")
End Sub
Sub zipprog
     apm1.Progress = ProgressBar1.Progress
    'DoEvents
End Sub

Again this starts to zip, i get no progress update only in the log, then the app quits with no error messages at a random %

Thanks

Aidy
 

Informatix

Expert
Licensed User
Longtime User
To investigate your case, could you send me a sample project by email? I need to be able to run the same code, with the same archive.
 

aidymp

Well-Known Member
Licensed User
Longtime User
To investigate your case, could you send me a sample project by email? I need to be able to run the same code, with the same archive.

Thank you I will zip it and email it later

Thanks Again

Aidy
 

Informatix

Expert
Licensed User
Longtime User
In my Archiver libraries, I decided to raise all events in the same thread as the library, so your code in the event subs is run without delay after the event is raised. The drawback is that any code run outside the main thread of the application has to respect the following rules:
- no call to DoEvents
- no call to MessageBox
- no call to StartActivity
- no direct update of views (e.g. MyLabel.Text = ... is to avoid)
If you want to do the above, place your code in a different sub and call it from the event handler with CallSubDelayed. CallSubDelayed, unlike CallSub, does not run the sub at the time of the call. It places a message in a queue and the code is run only when the message is processed. That happens usually after the event code is run when a DoEvents is called in the main thread.
If you have a doubt on how to proceed, copy what's done in the demo of the libraries.
 

aidymp

Well-Known Member
Licensed User
Longtime User
Hi, I would like to add 3 folders to a zip! Using the ArchiverPlusZip lib

the structure is like so

MAINFOLDER
SUB1
SUB2
SUB3

I would like the zip once opened to only contain the 3 folders SUB1, SUB2, SUB3 I know I can zip the MAINFOLDER and it will include the 3 sub folders! but i dont want the zip to contain that folder, I just want the 3 subfolders, I also know I can add each folder 1 at a time (but havent tested that yet) Is there a simple way to add all 3 in one go?

Thanks

Aidy
 

Informatix

Expert
Licensed User
Longtime User
In the version 1.05 of ProBundle, I added a class to detect blocking of the main thread before the OS throws an ApplicationNotResponding error and I improved the serialization class of DataCollection (I removed the limitations for Maps and SparseArrays, I added functions to compress the byte array, I added the support of user defined types and of a few other objects, I reduced the size of arrays and I improved the conversion speed).

WARNING: byte arrays produced with the former version of the dcCollectionSerializer class are not compatible with this new version. I had to make important changes and it was not possible to keep the previous format.

As the number of donors for this bundle is still low (< 30), I think that's the last update before a while.

Changelog:
- I added the ANRWatchDog class to ErrorDetection to detect ApplicationNotResponding errors before they are thrown by the OS;
- I added a demo project to ErrorDetection;
- I improved the serialization class of DataCollection and added new functions to compress the resulting array of bytes;
- I made an internal change to ArchiverPlusZip (you should not notice any change).
 

Informatix

Expert
Licensed User
Longtime User
Arc.AddFolderToZip(Folder1, Archive, "")
Arc.AddFolderToZip(Folder2, Archive, "")
Arc.AddFolderToZip(Folder3, Archive, "")
 

Informatix

Expert
Licensed User
Longtime User
With the new version of dcCollectionSerializer, it is now possible to compress the byte arrays, so you could save a few kilobytes when generating a C library with SecVaultGenerator. If you want to, replace the two ...ToBytes functions in codGenerator.bas by ...ToCompressedBytes. And, of course, use the corresponding deserialization functions that uncompress the arrays (CompressedBytesTo...) in your code.
 

aidymp

Well-Known Member
Licensed User
Longtime User
Arc.AddFolderToZip(Folder1, Archive, "")
Arc.AddFolderToZip(Folder2, Archive, "")
Arc.AddFolderToZip(Folder3, Archive, "")

All at the same time? I was thinking it may need to be run consecutive. But will give it a go.

Thanks

Aidy
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…