How to navigate a library in Native Code in intellij? - intellij-idea

I am basically running a java library 'Z3' that invokes some native functions, I believe they are written in c++.
I can use the library and subsequently the native function just fine, but I just want to sometimes navigate into the source of the native code. That is during debugging, I want to trace execution happening inside the Jar files but I cannot navigate to the disassembly of the native code.
In summary, it looks like the native library is there, otherwise the execution won't be happening but I am unable to navigate to its code. I am using intellij ULTIMATE 2017.2.
Thanks!

The functionality you're looking for does not exist. As of version 2018.3, IntelliJ IDEA has no support for working with native code in any way.

Related

how do you get java or kotlin source from a react native apps?

Can we extract source code from an apk that built with react-native framework?. i've tried using dex2jar and apktools and cant seem to find anything related to source code
Nothing would prevent Apktool or dex2jar from working on a React Native application. What you are seeing is the majority of React Native application logic lives in compiled Javascript files and the native layer itself (libraries).
So I would put things into 4 buckets
Native Modules (Android - Java/Kotlin, iOS - ObjC/Swift)
RN Bridge (Java/C++)
JS (Virtual Machine - JavascriptCore / Hermes)
JS (Business logic)
The code written in Javascript is interpreted by either the runtime of JSC/Hermes in the VM. This is passed through an intermediate bridge layer of either Java/C++ to the low native portion of the phone. Hence giving the name of React Native.
So if you are decoding an application looking for source code - you'll stumble upon the java code of the bridge and any package that has an intermediate dependency in Java and not the true source code of the application you are probably looking for.
The business logic would more than likely be in a index.android.bundle file somewhere and that will be quite ugly visually as its minified. You'll need a JS beautifier to get anywhere with this path.

Native UI Components that has jni library

I found an amazing library to display panoramic images and it has incredible features but it is written in native Java code. So I tried to make it as a UI component in react native by building the bridge between them. After a lot of time of learning and trying, I'm stuck on this:
The panoramaGL library uses JNI library so when I test it on its own it works just fine, BUT it doesn't work on react native because of the JNI library.
Please do me a favor and give me just the tip of the solution
the problem was ... i've changed the package name while building the bridge between react native and the panoramaGL library so the solution is to change the package name to the old package name of panoramaGL and it works like a charm :)

How to make a library to work in React Native environement?

I'm new in React Native, please bear with me. I have a library, which works fine in NodeJS and in browser. I would like to make it usable in React Native too.
I created an example project, imported the library but it threw an exception - Unable to resolve module `http`. If I try to import the browser version, document is not available.
Since then I'm scratching my head - how am I supposed to make my library to work in React Native if neither the core NodeJS modules, nor document are available?
React Native does not have access to Node.js modules such as http, so any code that relies on that functionality is not going to work. You will have to remove or replace it. As for document, window and other DOM-specific APIs, RN does not use a DOM at all, instead it uses its own rendering mechanism that is coupled to the native APIs. You will also have to remove all those calls and replace them with React Native-compatible ones.

how add Android project as library or add arr in android moudle project

I need to use a third-party SDK which must be added as aar or android project library.
I tried to unzip the aar and copy the /lib and /res files to my titanium android module project, but it didn't work.
the error looks like this:
The developer of the SDK tell me check out a link which is FATAL EXCEPTION: java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$layout
I don't know how to solve it, hope someone could help me, thanks
Because Titanium is a Javascript cross platform tool to build native apps, you will need to write a wrapper to get a native functionality to work.
You can check out the documentation how to this on the Appcelerator website.
Unfortunately you can't just drop in a native component.

Android code using Titanium

How can I access the Android Java code, created by the Titanium as a result of the Titanium development?
You don't have such a possibility since all the javascript code in Titanium is interpreted by a JavaScript engine internally and .class files are generated.
Follow this link for further explanation.
If you are referring to the interpretation of your javascript code, then you can't. Everything is turned into symbols for Titanium to interpret, but you can find this at your /build folder
Titanium use javascript code, Modules let you write code in a platform's native language (Java for Android), Titanium can use java native code in module and java code run in v8 。