[Q] Modify java source from apk and Recompiling - Java for Android App Development

Goodmorning,
i want to modify and implementing some function in an android application starting from the apk installation file.
On the web there are different programs for example Apktool but it let modify only image or xml file... if you want to modify the source code of the activity you have to know smali.
An interesting program is dex2jar with jd-gui you can see the java source decompiling the .dex file. The problem is that i can't rebuilt the java into dex.
Sorry for my english.
Please help me is very important for me.
Thanks.

Hm well if you have working java code and the manifest and ressources etc, why not start a new project in android studio/eclipse and build a new apk?
---------------------------------
Phone : Nexus 4
OS :
- KitKat 4.4.4 stock
- Xposed: 58(app_process); 54(bridge)
- SU: SuperSU
- no custom recovery
---------------------------------
4d 61 73 72 65 70 75 73 20 66 74 77
Gesendet von Tapatalk

lorenzo0x123 said:
Goodmorning,
i want to modify and implementing some function in an android application starting from the apk installation file.
On the web there are different programs for example Apktool but it let modify only image or xml file... if you want to modify the source code of the activity you have to know smali.
An interesting program is dex2jar with jd-gui you can see the java source decompiling the .dex file. The problem is that i can't rebuilt the java into dex.
Sorry for my english.
Please help me is very important for me.
Thanks.
Click to expand...
Click to collapse
The code produced by dex2jar will not work - the tool doesn't produce recompile-able code and is generally used for reference only.
Sent from my HTC One using Tapatalk

Related

Question for developers

I want to learn how to develop small apps for the pocket pc platform.
What language should I learn. What software do u use?
Visual Basic? c++ ? I am kinda stuck.
Can someone point me in the right direction... also where can I find good documentation on developing for this platform?
Thanks
visual studio .net 2003 let you make applications for the xda in c++, c# and basic
embedded visual studio let you make applications for the xda in c++ using mfc and win32
you can also use powerbuilder i think it's called
and gc as in the gnu compiler
which language you want to use is up to you really
Hi,
i just decompressed a .cab file found in my MDA compact extended rom:
Default_PhonePad_ITA_RC10.CAB
i found a lot of files....
0CeSetup.001
0CeSetup.999
IN05D9~1.020
IN71C6~1.016
etc..
etc...
the question is easy...
how can i open these files? What kind of language are those files programmed with?
thanks in advance
how can i open these files? What kind of language are those files programmed with?
Click to expand...
Click to collapse
they would be Binary files as in already compiled files you it matter not which language they are written in as when they are compiled they are nothing but 0's and 1's
how you open them really depend on what you mean by opening them
if you mean that you want to run the application then you should not extract the files just doubleclick on the cab file and it autoinstall
if you mean how you edit cab files then there are many cab file editors
try doing a search in the forum or on google
if you mean that you want to decompile them back to code then i'm sure there are tools for that too but code which have already been compiled and then taken back to code looks very very bad
and you need to really understand win32 sdk to understand much of whats going on
decompilers should be able to decompile to what ever langauge they support no matter which language the program originaly was written in
Additional Programs
For Cabs: use the WinCE CAB Manager, download here: sorry forgot the link, just search here.
For ms_.nbf: use the windows mobile 2003 ROM Editor, download here: http://forum.xda-developers.com/download.php?id=3208
Rudegar said:
visual studio .net 2003 let you make applications for the xda in c++, c# and basic
embedded visual studio let you make applications for the xda in c++ using mfc and win32
you can also use powerbuilder i think it's called
and gc as in the gnu compiler
which language you want to use is up to you really
Click to expand...
Click to collapse
Incorrect. Visual Studio.net 2003 lets you make c# questions for PocketPC, but nothing else. For C++ you needed embeddded visual studio.
Visual Studio.Net 2005 does add everything, but thats in beta.
btf
they would be Binary files as in already compiled files you it matter not which language they are written in as when they are compiled they are nothing but 0's and 1's
Click to expand...
Click to collapse
ok, got it
if you mean that you want to decompile them back to code then i'm sure there are tools for that too but code which have already been compiled and then taken back to code looks very very bad
and you need to really understand win32 sdk to understand much of whats going on
decompilers should be able to decompile to what ever langauge they support no matter which language the program originaly was written in
Click to expand...
Click to collapse
yes, i meant this. Decompiling the cab file to read the code.
I thought there was a compiler for each language, that's why i was asking.
If somebody could suggest a free good decompiler....
well a cab file is not a program is more like a zip file
use the cab thingy mentioned and get the dll and exe files out of the cab file
here is what you would look for if the programs like most games is in pure ARM code
http://www.google.dk/search?q=arm+decompiler&btnG=Søg&hl=da
maybe this would help if you are trying to access .net
http://www.programmersheaven.com/search/download.asp?FileID=38892
how you go about it when you know something about the arm asm and maybe want to write your own decompiler
http://list.cs.brown.edu/pipermail/plt-scheme/2004-August/006284.html
maybe this
http://compilers.iecc.com/comparch/article/01-09-046
or if you feel luckey
http://www.google.dk/search?hl=da&q=pocketpc+decompiler&btnG=Søg&meta=
cab
my apology...cab is not a program...

min SDK/NDK version ?

Can somebody help me understand why ther min SDK version in the AndroidManifest.xml and default.properties?
using the android examples: hello-jni, san-angeles
I used the default NDK make APP=<app> syntax
and 'ant debug' to build the apk(s);
I found:
fopen() in hello-jni.c will only work with android-3
san-angeles requires android-4 or android-5
and multi touch MotionEvent is only available with android-5
The biggie is simply adding fopen to hello-jni and it runs fine.
change android-3 to android-4 in the manifest and default.properties
rerun android.bat update project
and it fails.
Please help guide me in getting fopen for write to work in min-sdk-android-5
fopen() for read works so far although I am experiencing intermittent results with reading from a file.
Thanks
Write_external_storage
sorry, found the answer here
http://developer.android.com/sdk/android-1.6.html#api-changes
sorry for the spam

[Q]andriod kernel of mega is same like wildfire by proof!!!

http://htc-linux.org/wiki/index.php?title=Mega
i read that the kernel is same wont that help porting andriod with respect to some drivers change!!!
no one answered
the problem is our first developer can't keep the android project...
hi
how can i debug this files and run???
currently I'm trying to cross-compile a most recent wildfire kernel I found on htc server using a configuration I personally made for our mega. The problem is there are many errors in the source code...
re.:
In my opinion we start build android from beginning. My problem is in my OS on my PC. I have Windows XP and building and modifing found only on Linux. I find this page with porting guide. It is step by step How to create boot screen, How to setup Connectivity...
source.android.com/porting/bring_up.html
On this page are programs for debug and download android source code...
Anyone write.
Move to general as not rom development
I'm using linux, this is why I want to try to cross-compile a kernel for our device, like I just said, source code has a large number of errors, I don't know why...
if you are interested, I can share the kernel configuration I made myself...
Now I install Ubuntu 10. It was compilation found in this version of Linux??? Where programs can I download? Now I have Git, Eclipse and Python 2.7. How can I install .tar packs on Ubuntu zito882000?
if you are new as a linux user it's quite difficult to explain, you need gcc plus the same programs a normal user has to compile a kernel.
The difference is in the way of compilation, a parameter that does a compilation for arm architectures....do you have some kernel compilation experience?
re.:
zito882000 said:
if you are new as a linux user it's quite difficult to explain, you need gcc plus the same programs a normal user has to compile a kernel.
The difference is in the way of compilation, a parameter that does a compilation for arm architectures....do you have some kernel compilation experience?
Click to expand...
Click to collapse
windows is gold.
with compilation i haven't any experience. I only begin in programming languages C, C++ and VB. I compile only my apps in visual studio. And i have nice experience with photoshop.
it isn't exactly the same thing, in a kernel you have a large number of drivers to compile, not a only one program...
Here cyberciti.biz/tips/compiling-linux-kernel-26.html you can find a simple guide!
The most important part is the command "make" that need some different parameters to do a cross-compilation for ARM processors ^^
thx
I saw the instructions and understand him. If I somehow help you write to my icq: 484038954 or Skype: vasek-smekal.
So far, thanks
I just bought an HTC Hero with native android.
If you want to try again I share with you my kernel configuration file and a link where you can download the kernel source I used.
(remember to rename "config.txt" in ".config" with the point and without the extension)
KERNEL SOURCE -> http://developer.htc.com/ (must choose "HTC Wildfire - Froyo - 2.6.32 kernel source code")
ARM LINUX GCC -> http://www.handhelds.org/download/projects/toolchain/archive/arm-linux-gcc-3.3.1-030820.tar.bz2

Kernel compilation / Java classes

Hi,
Do you know where I can find java classes (like this one : http://goo.gl/0d0XT ) starting with some kernel sources?
I compile the Android Kernel and then?
I don't know where to look for... need help
Thanks!

Doubts with Using Xamarin to develop Android App

Hi All,
We are developing Android App using C# with Xamarin.
I have task to integrate existing C source with App developed. This done by loading corresponding *.so.
Sorry in advance if these questions are naive....
Questions:
1 > I am using Windows. To generate the *.so what is the suitable IDE? Can the windows be used to generate *.so(static object)?
2> If I were to go with Eclipse , Do I need to install the plugins like SDK ,NDK etc...?
3> Do I need to care for processor architecture's , If need to compile the source?....I mean cross compilation
Thanks
sanddune008 said:
Hi All,
We are developing Android App using C# with Xamarin.
I have task to integrate existing C source with App developed. This done by loading corresponding *.so.
Click to expand...
Click to collapse
I'm not sure if I understand you question but I assume you want to extend an existing app -build in C# using Xamarin- with native android Java?
I'm not sure that's even possible. Xamarin is utilizing mono for android to create android (Linux) executable files. When decompiling my own Xamarin build apk with APK Studio I did see the mono .so libraries, but my own code was compiled. Referenced .Net (Windows!) dll's where added to the apk. I assume the mono libraries deal with how they are used in the compiled C# code.
Since there's no quick conversion I see a few options:
A - Change the Xamarin/C# android project to a library project (dll). Compile it using Xamarin and find out (google) how to utilize this dll using mono for android in your Java development environment (eclipse). There are mono .so files...
B - Convert the Xamarin/C# source to java source code. There are some commercial tools which claim to be able to convert C# to Java. Go java all the way.
C - Stick to Xamarin/C#
I think option A will lead to lots of headache assuming you referenced some .Net assemblies in your C# source. However it might be worth a try. Though keep in mind that if you keep using the Xamarin/C# part, you keep needing the Xamarin license to upgrade/update code in the future.
I would go for either B or C depending on the codebase. If it's a lot of code a Xamarin license renewal might be cheaper then a rewrite (conversion). In my experience code converters are reasonable tools, but I've never saw a one-click conversion happen. There's always extra work to make the converted code even compile.
In conclusion: Mixing Xamarin/C# and native Java code might be technically possible, I would rather make a choice for either one of them.
I can't answer your questions about eclipse and required libraries, but I hope my answer is of some use.
Regards,
Alex

Categories

Resources