Android code obfuscating
-
Since android code is visible for attackers, I want to change the name of variables and functions I know there are some tools for android obfuscation but I want to add more security I think I should have an excel file with 2 columns (1 - unique old names 2 - unique new names) Then utilizing a tool replace the old names with the new ones Any suggestion?
-
Since android code is visible for attackers, I want to change the name of variables and functions I know there are some tools for android obfuscation but I want to add more security I think I should have an excel file with 2 columns (1 - unique old names 2 - unique new names) Then utilizing a tool replace the old names with the new ones Any suggestion?
Replacing meaningful names by something else makes code not more secure. It makes it just a little bit harder to reproduce what the code is doing. Recommended read: Security through obscurity - Wikipedia[^] and other sources about that term. If you really want to do it: Because source code files are text files, it is a job for simple search & replace which can be automated using regular expressions iterating over the values of an input file (CSV would be better / simpler to use than Excel) and a list of source files. With Linux I would use a shell script for all the stuff except the replace which can be done with sed.
-
Replacing meaningful names by something else makes code not more secure. It makes it just a little bit harder to reproduce what the code is doing. Recommended read: Security through obscurity - Wikipedia[^] and other sources about that term. If you really want to do it: Because source code files are text files, it is a job for simple search & replace which can be automated using regular expressions iterating over the values of an input file (CSV would be better / simpler to use than Excel) and a list of source files. With Linux I would use a shell script for all the stuff except the replace which can be done with sed.
Thanks I read the article I found this link too which is in fact what I were looking for: Find and Replace Multiple Text with .CSV File Upload - Tools - Joydeep Deb[^] But search in multiple file is not supported there I think there should be a tool to do this I have to find it
-
Since android code is visible for attackers, I want to change the name of variables and functions I know there are some tools for android obfuscation but I want to add more security I think I should have an excel file with 2 columns (1 - unique old names 2 - unique new names) Then utilizing a tool replace the old names with the new ones Any suggestion?
AndroidVH wrote:
Then utilizing a tool replace the old names with the new ones
Android Studio already does this: Refactor --> Rename
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Thanks I read the article I found this link too which is in fact what I were looking for: Find and Replace Multiple Text with .CSV File Upload - Tools - Joydeep Deb[^] But search in multiple file is not supported there I think there should be a tool to do this I have to find it
The tools are provided by the console (PowerShell with Windows, bash with Linux). They are able to iterate over files in a directory (with an optional search mask and optionally including sub directories). You can even read column separated text files there line by line and use that data to perform the replacement (executing sed with Linux or again PowerShell commands with Windows).
-
Thanks I read the article I found this link too which is in fact what I were looking for: Find and Replace Multiple Text with .CSV File Upload - Tools - Joydeep Deb[^] But search in multiple file is not supported there I think there should be a tool to do this I have to find it