Android Question PROTECT FILES .BAL

pcicom

Member
Licensed User
Longtime User
cheers

Someone knows a method of protecting .bal files

That is to say

When we compile and generate the .APK, anyone can rename it to .ZIP and get all the resources used in the APP.
And you can see the .bal files and anyone could edit them and try to CLONE our APP.


The idea is

* That you can ENCRYPT files .BAL
* When our APP is executed, it will be in charge of DE-ENCRYPTING it in execution and showing it

The PURPOSE is to AVOID that they can EDIT and KNOW the DESIGN of the .bal file

AND / OR if they know of any other method of protection,


THANK YOU..
 

Martin Larsen

Active Member
Licensed User
Longtime User
I didn't know this. You are right that this is a potential problem, but it is not that different from standard layouts which you can also easily extract with apktool:
B4X:
apktool d myapp.apk

But maybe Erel could do something like when obfuscating code?
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
Well to me it's not so much a problem as the person is only getting access to your layout. Of course he can use it to create an app which looks exactly like yours but the logic and functionality will differ.

If something like protecting .Bal files come, I will jump on it, until then....
 
Upvote 0

Toky Olivier

Active Member
Licensed User
Longtime User
May be if there is some Sub like Activity.LoadLayoutFromJSON or Activity.LoadLayoutFromString, we can save the layout as String Variable in the code and load it dynamically as there is a tool to convert BAL file to JSON. What I don't know is how to run Designer Scripts.
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
the layout can be cloned quite easily just by looking on your app and building a similar layout.
We all are forgetting what Erel already emphasized, see above.

No matter what you do, one can see the layout finally.

Regards,

Anand
 
Upvote 0

pcicom

Member
Licensed User
Longtime User
There is nothing really that can be obfuscated. Unlike code, the layout can be cloned quite easily just by looking on your app and building a similar layout.

Tanks. Erel.

Yes the layout can be cloned quite easily just by looking on your app and building a similar layout.

But.

The idea is that it is not easy for them, copying a file does not imply any effort for them.

You could put a parameter in the compilation that asks for a key to record the encrypted .bal ...

In such a way that they are loaded with that key ..


EXAMPLE
B4X:
Activity.LoadLayoutProtect ("lyMAIN", "mykeyUUID")

or It would be more comfortable for developers, if we could encrypt them ourselves and load them from a file.

B4X:
Activity.LoadLayoutFromFile ("lyMAIN.protect", "mykeyUUID")



TANKS..
 
Upvote 0
Top