Is there a way to get the source code without the APK file? - apk

I built an app with java Android studio. But my laptop crashes and I lost all data code. The app is still installed and work very well in my cell phone. I haven't been able to locate the APK file in the cell phone.
Is there any way I can recover the app code? How should I proceed?

Recovering source code is partially possible. There are app decompiler available like Jadx which can decompile DEX code to Java code. However the decompilation is not 100% accurate (the decompiled is some times simply wrong) and also can fail for various reasons. A second problem is that the decompiler can not detect which class belongs to a library and which was written by you, so it decompiles everything.
So in the end you can use the decompiled code to extract important parts of your app or use it to remember how you solved a certain problem. So you will have to invest a lot of work to make it an app again, but decompiling the old may save you some hours.
For extracting the APK file(s) that belong to your app. For doing so you can use adb; see How do I get an apk file from an Android device? for details.
Alternatively you can use an app like Amaze which allows to do the same using the built-in "App Manager". It allows to copy the APK file(s) of an app to the sdcard section so that you can simply copy it via USB from a PC.

Related

what is the development tool of this GUI

I have a light/simple app (Winodws GUI), I want to know what is the development tool of this app? most of the app's files are as bellow.
I am newer to app development, I expected to know like "this app is developed by WPF&C#, Electron&Js, Qt&C++" this message. I am not sure if this message could be idenfied from the files shown
btw, there is an .exe with them
It is impossible to say exactly because these libraries are pretty common.
msvcp140 implies that the base is C++ developed with Visual Studio 2015 or later.
d3d* means something there is using Direct3D as well (could be Chromium). EGL/GLES is more graphics stuff, probably used by Chromium.
The presence of Chrome* means it is either using Chromium to display some web content or the entire app is HTML/Javascript based like Electron.
You should inspect the .exe in a hex editor. And a strings tool.
Use something like WinSpy to inspect the main application window. What is the class name?

Find if app was built using Xamarin?

Theres is any way to find out if a given Android or iOS app was built using Xamarin?
yes. The structure of the folder of the application. For Example you can in Android
If you're looking at a "normal" mono droid application (compiled with something like Xamarin) then you'll see some of these structures in the APK/ZIP'
/assemblies/Sikur.Monodroid.dll
/assemblies/Sikur.dll
/assemblies/Xamarin.Android.Support.v13.dll
/assemblies/Xamarin.Android.Support.v4.dll
/assemblies/Xamarin.Android.Support.v7.AppCompat.dll
/assemblies/Xamarin.Android.Support.v7.CardView.dll
/assemblies/Xamarin.Android.Support.v7.RecyclerView.dll
/assemblies/Xamarin.Mobile.dll
/assemblies/mscorlib.dll
/classes.dex
/lib
/lib/armeabi-v7a
/lib/armeabi-v7a/libmonodroid.so
/lib/armeabi-v7a/libmonosgen-2.0.so
File in the assemblies directory will be the Mono/.Net code and can be reversed using those normal tools.
classes.dex is a normal Android Dalvik executable file (dex) which can be reversed using the usual tools (baksmali, IDA Pro, etc) - though it should just be the stub loaded to start the Mono engine.
The files includes in lib/**/*.so are native shared libraries which are compiled into an ELF ARM file. These are normally going to the the monodroid engine (libmonodroid.so) and potentially other plugins that have been used by the developer. These would require ELF ARM capable disassemblers like Hopper, IDA Pro, r2, etc.
In the specific example above, the only non-Xamarin code would be located in Sikur.dll and Sikur.Monodroid.dll.
decompile the apk
https://ibotpeaches.github.io/Apktool/
If have a mono.dll is in xamarin.
you can decompile some .dll in c# watching the code.
and in iOS you can't decompilate. Android apps are compiled to a machine-independent Java bytecode, and it's relatively easy to convert that back into Java. iOS apps are compiled directly to machine code, with an aggressive optimization pass that tends to destroy a lot of the structure of the original code.
That's not to say you can't learn anything useful from a compiled iOS app, though. The class-dump tool can extract the names of Objective-C classes, properties, and methods from a compiled app, which can give you clues to how it's implemented. NibUnlocker can convert compiled Interface Builder UI files back to an editable format. Hopper can not only disassemble machine code to turn it into assembly code, but can further convert it into a more understandable pseudocode. And images, sounds and other resources are usually included unencrypted in an iOS app bundle.
You can try use this apps and watch the difference is anyone that read this answer can try. Let me know what is the difference.

Do I need to program BLEduino (arduino with BLE)?

I am doing an iOS app, and I have bought the BLEduino, which is an arduino with BLE technology built-in. The question is, do I need to program something in BLEduino? Can I just turn it on, so it can be discoverable, and then code in Xcode for my app to connect with BLEduino, and etc?
The BLEduino comes pre-loaded with the library firmware (i.e. that processes all BLE communication), and the sketch for the Console module (which interacts with the library). That is, you don't need to program anything into the BLEduino to get started. Thus, yes, plug it in, and it should be discoverable.
You don't need to program anything on the iOS side either to get started. You can use the BLEduino iOS app. The BLEduino platform (firmware library, sketches, iOS app) supports 12 different modules. Simply upload to the BLEduino the corresponding sketch for whichever module you want to use, and it will work with the provided app.
Additionally, the BLEduino app is completely open sourced. I would suggest you play with that before doing one from scratch. That way you can see how to use the BLEduino iOS SDK.
Lastly, if you definitely want to do something completely from scratch (i.e. without the BLEduino iOS SDK), then simply make sure that your CoreBluetooth code complies with the BLEduino BLE Profile, and packet structure.
Alternatively, you can upload your own BLE profile to the BLEduino. In that case, you define your own UUIDs, Characteristics, and packet structure.
There's additional information on the documentation, and forum.

where do i get .aidl file while working in titanium framework for android?

The aidl tool converts the .aidl file to java interface which helps to make .apk file.
I want to know from where do i get the .aidl file ? Does it come from android Sdk?
This is taken care of for you by the android SDK. You don't ever have to worry about this even when you're developing natively.

Can FDT deal with .fla files or not?

I'm trying to find an all-in-one IDE for flash, one that can deal with various flash related files.
I just read this answer and it recommends fdt, but seems fdt can only deal with scripts but not .fla ones.
Which IDE should I use so that I can use it to develop various files involved in flash developing?
I am fairly certain it can not. Is there any particular reason you need this? Most developers code in external .as files. This way code is in one location and not buried in the timeline. Also the code can be placed in source control.
For an all in one solution, Adobe Flash CS5 is probably your best bet. They have somewhat improved the IDE and added things like autocomplete.
Flash Builder 4 and Adobe Flash CS5 have finally solved this problem - you can now create an FLA in Flash and then use the wizard to easily create a Flash Builder project around the .fla. All of your classes have access to library exports etc, and you can set it up so that when you click to edit a Class file in Flash it automatically opens the file in Flash Builder.
I really like it.

Resources