Question

I have a very basic question with respect to app development. I have no experience in app development, but, I need to reverse engineer android apps. When I reverse engineer (decompile using apktool or androguard) apps, I am seeing that every app has a package (folder structure) that begins with "com". Does every app have this com folder (I guess eclipse creates this folder, inside which the developers code). Is this assumption valid for all apps?

Was it helpful?

Solution 2

No, it's not. You can choose what to use as namespace. Many developers uses "com" for commercial applications and "org" for free ones but it's entirely up to you.

OTHER TIPS

No its not necessary to have com folder.

The com folder is because of package name.

If you take any package, lets say - com.sudosaints.android

So in this case src code directory structure will be - src -> com -> sudosaints -> android.

In case of in.sudosaints.android, directory structure will be - src->in->sudosaints->android

So assumption of com folder is not valid for all apps.

I am not 100% sure whether or not this can be overridden, but it is based on the package name of the application. The recommended way, which as far as I have seen, all developers do follow create a package called com.yourcompany.yourappname.

In this example the source code would be found in: com.yourcompany.yourappname/src.

Hope this helps.

General convention for naming packages is based on domain owned by author of the program.

For example, if your company has webpage

www.mycompany.com

their programs will generaly have package structure starting with

com.mycompany.nameofproject

So thats why most packages start with com, because most companies have webpage ending with .com.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top