首页 » Andorid » 安卓例子 » 正文

自治的智能手机应用程序

Self-compiling Android application (Experimental)

_Disclaimer: only works on Android 4.3r3.1 with Galaxy Nexus. Or Cyanogenmod 12.1 of android 5.1.1, comfirmed on Nexus 5,6 and 10 devices.

Autonomous smartphone apps: self-compilation, mutation, and viral spreading

Mutate an Android app at the source code level.

Abstract from the scientific paper: We present the first smart phone tool that is capable of self-compilation, mutation and viral spreading. Our autonomous app does not require a host computer to alter its functionality, change its appearance and lacks the normal necessity of a central app store to spread among hosts. We pioneered survival skills for mobile software in order to overcome disrupted Internet access due to natural disasters and human made interference, like Internet kill switches or censored networks. Internet kill switches have proven to be an effective tool to eradicate open Internet access and all forms of digital communication within an hour on a country-wide basis. We present the first operational tool that is capable of surviving such digital eradication.

{Part of Tribler: 82 contributing developers so far, 1.7 unique users installs to date}

Dependencies:

JAVA

platform -> android-18.jar compiler -> ecj-4.5.jar dexer -> SDKbuild-tools23.0.0libdx.jar apk build -> sdklib-24.3.4.jar signer -> zipsigner-lib-1.17.jar zipsigner-lib-optional-1.17.jar zipio-lib-1.8.jar kellinwood-loggin-lib-1.1.jar sc-core-1.52.0.0.jar sc-prov-1.52.0.0.jar sc-pkix-1.52.0.0.jar sc-pg-1.52.0.0.jar

NATIVE

aapt -> Platform_Framework_Basetoolsaapt aidl -> Platform_Framework_Basetoolsaidl androidfw -> Platform_Framework_Baseincludeandroidfw

zipalign -> Platform_Buildtoolszipalign host -> Platform_Buildlibhost

libpng -> Platform_External_Libpng expat -> Platform_External_Expat zlib -> Platform_External_Zlib

libcutils -> Platform_System_Corelibcutils cutils -> Platform_System_Coreincludecutils

liblog -> Platform_System_Coreliblog log -> Platform_System_Coreincludelog

libutils -> Platform_System_Corelibutils utils -> Platform_System_Coreincludeutils

log.h -> Platform_System_Coreincludeandroid

asset_manager.h -> Platform_Framework_Nativeincludeandroid looper.h -> Platform_Framework_Nativeincludeandroid

zopfli -> zopflisrc

ld -> Tool_Chain_Utilsbinutils-2.25ld

STABLE APIs (at least api level 9)

https://developer.android.com/ndk/guides/stable_apis.html#a18

LOCAL_LDLIBS := -llog (liblog)

LOCAL_LDLIBS := -lz (zlib)

LOCAL_LDLIBS += -landroid (o.a. looper.h)

LOCAL_LDLIBS := -ldl (dynamic linker)

Screenshots

Howto mutate an Android app at the source code level.

Simple proof-of-principle user interface. Both the app name and the icon are changed in real-time in the source code shipped inside the app. By selecting "install" an .apk is created of itself using self-compilation. screenshot_2015-09-18-16-47-38

Changing icon and app name: screenshot_2015-09-18-16-48-30

First self compile step, process resources screenshot_2015-09-18-16-48-49

Compile source:
screenshot_2015-09-18-16-49-29

Integrate dependencies:
screenshot_2015-09-18-16-49-34

(this takes a while)
screenshot_2015-09-18-16-50-09

Package app:
screenshot_2015-09-18-16-55-49

Prepare installation step:
screenshot_2015-09-18-17-12-52

The magic happens. Without any user intervention it asks for a freshly compiled clone of itself to be installed.: screenshot_2015-09-18-17-13-11

User selected "install"
screenshot_2015-09-18-17-13-20

Install completed
screenshot_2015-09-18-17-17-40

Finally open the self-compiled clone of itself. screenshot_2015-09-18-17-17-55

下载 (0)

发表评论