Hi,
I donated for the ProBundle some time ago, and I am trying to use the F5Steg in one of my projects. I did email @Informatix a few days ago but got no reply, so hoping someone in the forums can help.
I am wanting to store a string into an image, and then view this string later in my app.
I am aiming to store a string into a image and then have that image in my app, and then receive the string from the image during runtime. At the moment I have a string in my code with a password assigned to it. If someone decompiles my app they will be able to see this password. I am hoping to store this password (string) into a image to make it a little harder for the hacker to view this password (string).
I used the example project (F5Steg) from the ProBundle and put a string (stored 123456789 as the string during my testing) into the image, and then copied that image from my Android device and put it into my main project into the files tab in the B4A IDE.
In my main project, I then used the following code..
This works and it will display the string I stored into the image.
However, in the B4A IDE it shows:
When I view the log unfiltered it shows:
This is when it's running in debug mode (Rapid debugging).
If I run it in release or legacy debug mode it doesn't show the error:
Unexpected event (missing RaiseSynchronousEvents): test_stringextracted
Check the unfiltered logs for the full stack trace.
Looking on the forums, I think this library is missing something..
https://www.b4x.com/android/forum/threads/raisessynchronousevents.33179/
Should the above code be OK to return the string from the image, or am I missing something in my code?
I am wanting to store the string in the image and copy it from the DirAssets directory to the customers device. Otherwise if I stored the string during runtime into the image from the customers device, then if someone decomplied my app they would be able to see the string in my code I am storing. This way it will be a little harder for the hacker/customer to view the string.
I donated for the ProBundle some time ago, and I am trying to use the F5Steg in one of my projects. I did email @Informatix a few days ago but got no reply, so hoping someone in the forums can help.
I am wanting to store a string into an image, and then view this string later in my app.
I am aiming to store a string into a image and then have that image in my app, and then receive the string from the image during runtime. At the moment I have a string in my code with a password assigned to it. If someone decompiles my app they will be able to see this password. I am hoping to store this password (string) into a image to make it a little harder for the hacker to view this password (string).
I used the example project (F5Steg) from the ProBundle and put a string (stored 123456789 as the string during my testing) into the image, and then copied that image from my Android device and put it into my main project into the files tab in the B4A IDE.
In my main project, I then used the following code..
B4X:
Sub Process_Globals
End Sub
Sub Globals
Dim F5S As F5Steg ' F5Steg Lib v1.20
End Sub
Sub Activity_Create(FirstTime As Boolean)
End Sub
Sub Activity_Resume
If Not(File.Exists(File.DirDefaultExternal, "beach.jpg")) Then
File.Copy(File.DirAssets, "beach1.jpg", File.DirInternal, "beach1.jpg")
End If
F5S.ExtractToString(File.Combine(File.DirInternal , "beach1.jpg"),"Test")
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Test_StringExtracted(SecretMessage As String)
Log("SecretMessage = " & SecretMessage)
End Sub
This works and it will display the string I stored into the image.
However, in the B4A IDE it shows:
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Unexpected event (missing RaiseSynchronousEvents): test_stringextracted
Check the unfiltered logs for the full stack trace.
SecretMessage = 1234567890
When I view the log unfiltered it shows:
Do partial code cache collection, code=30KB, data=22KB
After code cache collection, code=19KB, data=16KB
Increasing code cache capacity to 128KB
System.exit called, status: 0
VM exiting with result code 0, cleanup skipped.
Class anywheresoftware.b4a.BA failed lock verification and will run slower.
Common causes for lock verification issues are non-optimized dex code
and incorrect proguard optimizations.
common created.
Starting remote logger. Port: 40854
HWUI GL Pipeline
QUALCOMM build : 8e59954, I0be83d0d26
Build Date : 09/22/17
OpenGL ES Shader Compiler Version: EV031.21.02.00
Local Branch : O17A
Remote Branch :
Remote Branch :
Reconstruct Branch :
Loading /vendor/lib/hw/gralloc.msm8992.so from current namespace instead of sphal namespace.
PFP: 0x00000000, ME: 0x00000000
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
Initialized EGL, version 1.4
Swap behavior 2
*** Debugger waiting for connection (0) ***
Loading /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
Loading /vendor/lib/hw/gralloc.msm8992.so from current namespace instead of sphal namespace.
*** Debugger waiting for connection (1) ***
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
PROVIDER: AndroidNSSP
PROVIDER: AndroidOpenSSL
PROVIDER: CertPathProvider
PROVIDER: AndroidKeyStoreBCWorkaround
PROVIDER: BC
PROVIDER: HarmonyJSSE
PROVIDER: AndroidKeyStore
After accept
Unexpected event (missing RaiseSynchronousEvents): test_stringextracted
Check the unfiltered logs for the full stack trace.
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1348)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:314)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at a.a.a.b.a(SourceFile:199)
at a.a.a.b.<init>(SourceFile:38)
at a.a.a.b.<init>(SourceFile:28)
at b4a.flm.f5steg.F5Steg.ExtractToString(SourceFile:75)
at b4a.example.f5steg2.main._activity_resume(main.java:406)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at b4a.example.f5steg2.main.afterFirstLayout(main.java:110)
at b4a.example.f5steg2.main.access$000(main.java:17)
at b4a.example.f5steg2.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Skipped 67 frames! The application may be doing too much work on its main thread.
Do partial code cache collection, code=26KB, data=22KB
After code cache collection, code=15KB, data=16KB
Increasing code cache capacity to 128KB
SecretMessage = 1234567890
Log reader error: java.io.InterruptedIOException: read interrupted
-1 received
writer error
java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2034)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2068)
at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:387)
at anywheresoftware.b4a.remotelogger.Connector$Writer.run(Connector.java:160)
at java.lang.Thread.run(Thread.java:764)
Starting remote logger. Port: 40854
After accept
This is when it's running in debug mode (Rapid debugging).
If I run it in release or legacy debug mode it doesn't show the error:
Unexpected event (missing RaiseSynchronousEvents): test_stringextracted
Check the unfiltered logs for the full stack trace.
Looking on the forums, I think this library is missing something..
https://www.b4x.com/android/forum/threads/raisessynchronousevents.33179/
Should the above code be OK to return the string from the image, or am I missing something in my code?
I am wanting to store the string in the image and copy it from the DirAssets directory to the customers device. Otherwise if I stored the string during runtime into the image from the customers device, then if someone decomplied my app they would be able to see the string in my code I am storing. This way it will be a little harder for the hacker/customer to view the string.