Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@akylas/nativescript-android-runtime
Advanced tools
Contains the source code for the NativeScript's Android Runtime. NativeScript is a framework which enables developers to write truly native mobile applications for Android and iOS using JavaScript and CSS. Each mobile platform has its own ecosystem and offers completely different development tools and language(s) - Java for Android and Objective C (Swift) for iOS. In order to translate JavaScript code to the corresponding native APIs some kind of proxy mechanism is needed. This is exactly what the "Runtime" parts of NativeScript are responsible for. The Android Runtime may be thought of as "The Bridge" between the JavaScript and Android worlds. A NativeScript application for Android is a standard native package (apk) which besides the JavaScript files embed the runtime as well.
Several Wiki pages describe some internal topics about the runtime here
The repo is structured in the following projects (ordered by dependencies):
extend
routine.The NativeScript Android Runtime architecture can be summarized in the following diagram.
For more details on how it works, read the documentation.
Following are the minimal prerequisites to build the runtime package.
git clone --recurse-submodules git@github.com:NativeScript/android-runtime.git
Note: You might need to run the Android Studio from the command line in order to preserve the environment variables. This is in case you get errors like "missing npm" if starting the studio the usual way.
Install dependencies from NPM:
cd test-app/build-tools/jsparser
npm install
Set environment variables:
JAVA_HOME
such that $JAVA_HOME/bin/java
points to your Java executableANDROID_HOME
pointing to where you have installed the Android SDKANDROID_NDK_HOME
pointing to the version of the Android NDK needed for this version of NativeScriptRun command
Windows:
gradlew
Mac/Linux:
./gradlew
The build process includes building of the runtime package (both optimized and with unstripped v8 symbol table), as well as all supplementary tools used for the android builds: metadata-generator, binding-generator, metadata-generator, static-binding-generator
The result of the build will be in the dist folder.
Note:
To cut the build time in half and package only the optimized (stripped) version of the runtime package comment out 'tasks.generateRuntimeAar.execute()' in the build.gradle script.
Go to subfolder test-app after you built the runtime.
Start an emulator or connect a device.
Note: Keep in mind the device or emulator needs to have an sdcard mounted.
Run command
gradlew runtests
cd test-app
npm install
npx ns debug android --start
(If you instead have the nativescript
NPM module installed globally,
you can omit the npm install
and the npx
prefix.)
devtools://devtools/bundled/inspector.html?ws=localhost:40000
.
Open this URL in Chrome or Chromium.We love PRs! Check out the contributing guidelines. If you want to contribute, but you are not sure where to start - look for issues labeled help wanted
.
Please, use github issues strictly for reporting bugs or requesting features. For general questions and support, check out Stack Overflow or ask our experts in NativeScript community Slack channel.
FAQs
NativeScript for Android using v8
The npm package @akylas/nativescript-android-runtime receives a total of 24 weekly downloads. As such, @akylas/nativescript-android-runtime popularity was classified as not popular.
We found that @akylas/nativescript-android-runtime demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.