Need help with adding two android projects into one project - Java for Android App Development

Hi I have 2 android projects in eclipse a subnet calculator and a data tester The problem is that they are in two different projects! I want to add the data tester one into the subnet calculator! The question is how do I do this?
I have tried almost everything I can think of!!
Please help!!
Thanks in advance!!
Rapsong11

That can be done only manually afaik. From where you want to move from one project to another you'll have manually create intents of fragment calls or whatever is needed. Copy-paste the needed classes to newly created packages etc, update your manifest, copy-paste layoutfiles etc etc. I know, quite some work but there is no automated process for this.

Zatta said:
That can be done only manually afaik. From where you want to move from one project to another you'll have manually create intents of fragment calls or whatever is needed. Copy-paste the needed classes to newly created packages etc, update your manifest, copy-paste layoutfiles etc etc. I know, quite some work but there is no automated process for this.
Click to expand...
Click to collapse
Thanks for the reply!! would you mind showing me how to do this? via team viewer?
please let me know
Rapsong11

rapsong11 said:
Thanks for the reply!! would you mind showing me how to do this? via team viewer?
please let me know
Rapsong11
Click to expand...
Click to collapse
He means copy the src of project1 to src of project2
res/ of project1 to res of project2
Donot overwrite
For files with same name copy the contents manually
Sent from my GT-S5302 using Tapatalk 2

rapsong11 said:
Thanks for the reply!! would you mind showing me how to do this? via team viewer?
please let me know
Rapsong11
Click to expand...
Click to collapse
I'm not in the situation I can do it. But also I don't want to do it and you shouldn't want to do that either.

I got everything over no errors and when you are at the main menu I have two buttons one that says subnet calculator and one that says network tester when you click the network tester button it works when you click the subnet calculator button the app crashes what am I doing wrong please let me know
Sent from my Nexus 4 using xda app-developers app

Nevermind I figured it out
Sent from my Nexus 4 using xda app-developers app

The best way to do this is to use maven projects instead standard android projects. Both projects can be children projects of superpom (maven parent project). Search for maven-android-plugins for more details.
Cheers
Sent from my SK17i using xda app-developers app

Related

Update.zip signing

Dear Members, first of all hello to all..
I'm trying to create a update.zip file that removes the default applications that samsung puts on Samsung S and installs one or two more.
But I'm having a problem with the signing of update.zip
I have the struture:
system\app\xpto.apk
META-INF\com\google\android\update-script
and now I know I have to sign it but I dont seem to find a working tutorial, I've read some with signapk.jar and others without it...
Can someone plz point me in the right direction so that I can accomplish it?
Thanks
brusilva said:
Dear Members, first of all hello to all..
I'm trying to create a update.zip file that removes the default applications that samsung puts on Samsung S and installs one or two more.
But I'm having a problem with the signing of update.zip
I have the struture:
system\app\xpto.apk
META-INF\com\google\android\update-script
and now I know I have to sign it but I dont seem to find a working tutorial, I've read some with signapk.jar and others without it...
Can someone plz point me in the right direction so that I can accomplish it?
Thanks
Click to expand...
Click to collapse
If ur on a windows machine. refer to my signature.
yep im on windows .. will check the thread tnks m8
http://forum.xda-developers.com/showthread.php?t=717437
Sign your own .
jje
brusilva said:
yep im on windows .. will check the thread tnks m8
Click to expand...
Click to collapse
There is an app in the market by stericson called 'Signapktic' that allow you to sign your zip file via the phone too. Require root though..
Sent from my GT-I9000 using XDA App
You don't need to sign zips for uae with cwm
None of trickys roms are signed and they work/install fine
Sent from my GT-I9000 using XDA Premium App

[Q] How to compile github java source?

Hey guys, i downloaded Gallery2.apk Source code from CM github.
How can i compile this myself and make changes to it? I already imported it into my Eclipse environment but it generates a million errors..
Thanks guys.
elesbb said:
Hey guys, i downloaded Gallery2.apk Source code from CM github.
How can i compile this myself and make changes to it? I already imported it into my Eclipse environment but it generates a million errors..
Thanks guys.
Click to expand...
Click to collapse
those system apps use lots of hidden API which is not available in android SDK (security reason i guess)..
maybe this blog can help u out http://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/
Maybe you will need to add some external libraries like the supportv4 library.
dcsms said:
those system apps use lots of hidden API which is not available in android SDK (security reason i guess)..
maybe this blog can help u out http://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/
Click to expand...
Click to collapse
Hmmm thanks for the link. I looked at it real quickly this morning and it may be what I need. once I get home I'll post the errors I'm getting.
But they mostly pertain to that link where some imported things cannot be found.
Sent from my SGH-T999 using Tapatalk 2
elesbb said:
Hmmm thanks for the link. I looked at it real quickly this morning and it may be what I need. once I get home I'll post the errors I'm getting.
But they mostly pertain to that link where some imported things cannot be found.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
u must follow all those 5 step to make all hidden API available in eclipse ... i've try it....
i can compile SystemUI with eclipse throught those guide...
dcsms said:
u must follow all those 5 step to make all hidden API available in eclipse ... i've try it....
i can compile SystemUI with eclipse throught those guide...
Click to expand...
Click to collapse
Thanks man!
I was able to use smali to do what I wanted and theo0so was able to help me sign it with CM keys to allow it to run
But there were a lot more things I wanted to mess around with, so when I get a day off I will follow all steps Thanks again!
Sent from my ASUS Transformer Pad TF300T using Tapatalk 2

Help needed in creating a simple build. prop editor

Hello guys
I was thinking to create a simple build.prop editor. someone can help me where should I start. it's a simple project so I want to work myself to get some experience in android app development. As I know I have to provide root permission in android manifest. Xml but how the activity can read build.prop file
Thank you
Sent from my GT-I9100 using Tapatalk 2
Deleted
Root commands need to be executed the command line way.
You can get the content of a file using
Code:
cat <filepath>
For executing these commands I recommend using the RootTools library.
First of all get basic Linux command line knowledge.
nikwen said:
Root commands need to be executed the command line way.
You can get the content of a file using
Code:
cat <filepath>
For executing these commands I recommend using the RootTools library.
First of all get basic Linux command line knowledge.
Click to expand...
Click to collapse
So it means I should use Ubuntu
Sent from my GT-I9100 using Tapatalk 2
saif kazi said:
So it means I should use Ubuntu
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
No, it does not mean that.
If you want to do anything which needs SU permission, you need to do it without the Android API. You run a command on the built-in command line on your phone from your app. Now in Java you are able to read the output of the command and parse it to get the required information.
There is no other way of doing it because Android was not designed to be rooted.
saif kazi said:
Hello guys
I was thinking to create a simple build.prop editor. someone can help me where should I start. it's a simple project so I want to work myself to get some experience in android app development. As I know I have to provide root permission in android manifest. Xml but how the activity can read build.prop file
Thank you
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
I used this repo as a base for mine, see if it can be any use to you and try altering it as much as you can so you can see what your able todo
https://github.com/nathanpc/Build.prop-Editor
Nx Biotic said:
I used this repo as a base for mine, see if it can be any use to you and try altering it as much as you can so you can see what your able todo
https://github.com/nathanpc/Build.prop-Editor
Click to expand...
Click to collapse
Looks like he has already forked it.
https://github.com/saifkazi/Build.prop-Editor
If you want to release your version, have a look at the original license: https://github.com/nathanpc/Build.prop-Editor/blob/master/LICENSE
Nx Biotic said:
I used this repo as a base for mine, see if it can be any use to you and try altering it as much as you can so you can see what your able todo
https://github.com/nathanpc/Build.prop-Editor
Click to expand...
Click to collapse
Haha, I was about to suggest my project when I saw the Google Alerts email, but looks like you already did.
Thanks very much!
nathanpc said:
Haha, I was about to suggest my project when I saw the Google Alerts email, but looks like you already did.
Thanks very much!
Click to expand...
Click to collapse
No problem man!

AndroidManifest.xml problem

So i have some problems, I'm developing a small app which u can see in my singature, in newer versions I added one more activity, that is actually page for FAQ, and code working as it should but AndroidManifest.xml gives me a problem...
I added a new activity to AndroidManifest.xml and added root permisions but when i save and export app, AndroidManifest.xml goes back to "stock" unchanged file and when i run my app and try to go to that new activity it gives me force close normally because there is no second activity in AndroidManifest.xml
so what to do? I'm shure there is someone who knows what is problem
btw im using Eclipse + Android SDK without any other stuffs
Post your manifest that you are trying to save and then the log cat when it errors out.
Do you modify the manifest of the right project?
If you do, try cleaning the project or deleting the project from the workspace and adding it again.
zalez said:
Post your manifest that you are trying to save and then the log cat when it errors out.
Click to expand...
Click to collapse
But there is no error, everything is normal
nikwen said:
Do you modify the manifest of the right project?
If you do, try cleaning the project or deleting the project from the workspace and adding it again.
Click to expand...
Click to collapse
Yes, I'm modifying manifest of right project, will try that
Sent from my GT-I9100 using xda premium
By any chance, are you uninstalling before adding the new APK via Eclipse? I ran into issues with some files if I didn't do an uninstall first...
@buildakicker, i don't understand you... did you meant am i uniinstalled app from my phone before testing it? if that is question then no, i didn't do that, and that is not problem...
Problem was in eclipse, i just did what @nikwen said and app working perfectly
I was speaking of uninstalling the app off the device and then re-installing it fresh... Glad you got it figured out!
Sejk97 said:
@buildakicker, i don't understand you... did you meant am i uniinstalled app from my phone before testing it? if that is question then no, i didn't do that, and that is not problem...
Problem vas in eclipse, i just did what @nikwen said and app working perfectly
Click to expand...
Click to collapse
Still don't understand you xD
Sorry but English is not my native language
Sent from my GT-I9100 using xda premium
Sejk97 said:
Problem vas in eclipse, i just did what @nikwen said and app working perfectly
Click to expand...
Click to collapse
Great. :good:

apk reverse engineering

Hello and congratulations for the forum.
I'm trying to recognize malware starting from static code android in particular in permissions.
When I try to decompile apps like WhatsApp unfortunately many strings are obscured, particularly getSystemService method arguments.
How can I do to make them readable?
thanks for your attention
How do you decompile?
Sent from my GT-S5360 using xda app-developers app
I use dex2jar to get source java code
It's illegal to do so
I am a researcher
How antivirus are developed without knowing virus signature?
We call it "Ethical hacking". Eg: SQL injection technique to assess security vulnerabilities of web app.
Sent from my GT-S5360 using xda app-developers app
there is not a way to decrypt string value in the source code please? Yes, this is for ethical hacking, of course
I want to catch whatsapp notification to analyze the text of the message in real time, for insert a routine I want to catch this event and I want decompile code
Franceso thought you would that little thanks button for supporting your views
Sent from my GT-S5360 using xda app-developers app
sure,
you can help me please?
This should be your answer:
dsgwords.blogspot.com/2013/03/android-runtime-class-loading.html?m=1#!/2013/03/android-runtime-class-loading.html
Also try decrypting input.jar in andriod services framework path
Sent from my GT-S5360 using xda app-developers app
practically to get the file. dex should I do
/ dx - dex - output = output.jar input.jar
and then use dex2jar and decompiler?
this way I can see all encrypted strings of WhatsApp?
Many thanks
This is what I wanted to do:
decompile WhatsApp
find the code snippet to send notification
before sending the notification to send the contents of the message to my program
and then send the notification normally
Do you think it possible?
When decompilo WhatsApp many strings are encoded in copdice source, this is my problem.
This in an example:
String[] arrayOfString = new String[2];
char[] arrayOfChar1 = "3&j&>;, =?&-` 3+z=><f]\027\003\027\[email protected]\013\036\034".toCharArray();
many many thanks
Good question. I have not tried decompile procedure. I wil refer my friend.
I suggest one thing. You compile a java piece of string code. Also a string array. Decompile and see. Then make apk. Decompile and see. You get difference then we see if we can apply any charcode standards like ascii.
Sent from my GT-S5360 using xda app-developers app
Please try below post friend
Did you try this:
http://androidorigin.blogspot.in/2011/02/dex-format-to-jar-format.html
Open Source
http://code.google.com/p/dex2jar/
http://code.google.com/p/smali/
and an example
http://code.google.com/p/smali/source/browse/examples/HelloWorld/HelloWorld.smali
Also I found string encrypters being used in java programs to defeat decompile or disassemble. Need to find out if whatsapp use any such algorithm like SHA. I leave it to you just research some more.
When I get time I will try for myself and let you know. Have official work thanks buddy.
(Mods please let me know instructions on posting outside urls or the rules pertaining to it.)
PS: Remember to use same java compiler version that used to compile whatsapp. After you get jar, you can check which version created edit.
To know go to:
jar file > Open with Winzip or WinRar (Any archiver Winrar preferred. Do not double click it will execute) -> META-INF directory -> MANIFEST.MF
You should see something like this
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_08-b03 (Sun Microsystems Inc.)
Hope that helps.
Use dex2jar to convert the APK into a standard JAR file and then JD-GUI to view the source code. However if the application was compiled with proguard obfuscation then you will have a very hard time to understand the code.

Categories

Resources