Cannot run app when put the apk in Root folder (/system/app) in Android device

Hi,

My app must be put in the /system/app rooted Android device.

But after I run the app, it crashes.

If the app is normal install to the android device, it will not crash.

Is there any library for Corona missing ?

Should any library for Corona put in /system folder or /lib ?

Build: CoronaEnterprise.2014.2189

I must put the app in /system/app and run. Thanks.

Here is the error message:

[lua]

05-30 16:20:22.360: W/dalvikvm(1925): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/ansca/corona/JavaToNativeShim;
05-30 16:20:22.360: W/dalvikvm(1925): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/ansca/corona/CoronaEnvironment;
05-30 16:20:22.370: D/AndroidRuntime(1925): Shutting down VM
05-30 16:20:22.370: W/dalvikvm(1925): threadid=1: thread exiting with uncaught exception (group=0x41fb6ba8)
05-30 16:20:22.390: E/AndroidRuntime(1925): FATAL EXCEPTION: main
05-30 16:20:22.390: E/AndroidRuntime(1925): Process: com.estech.DicteeKid, PID: 1925
05-30 16:20:22.390: E/AndroidRuntime(1925): java.lang.UnsatisfiedLinkError: Couldn’t load lua from loader dalvik.system.PathClassLoader[DexPathList[[zip file “/system/app/DicteeKid.apk”],nativeLibraryDirectories=[/system/lib]]]: findLibrary returned null
05-30 16:20:22.390: E/AndroidRuntime(1925):     at java.lang.Runtime.loadLibrary(Runtime.java:358)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at java.lang.System.loadLibrary(System.java:526)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at com.ansca.corona.JavaToNativeShim.<clinit>(JavaToNativeShim.java:118)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at com.ansca.corona.CoronaEnvironment.setLuaErrorHandler(CoronaEnvironment.java:379)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at com.ansca.corona.CoronaEnvironment.<clinit>(CoronaEnvironment.java:41)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at com.estech.DicteeKid.CoronaApplication.onCreate(CoronaApplication.java:55)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at android.app.ActivityThread.access$1500(ActivityThread.java:135)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at android.os.Handler.dispatchMessage(Handler.java:102)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at android.os.Looper.loop(Looper.java:136)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at android.app.ActivityThread.main(ActivityThread.java:5017)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at java.lang.reflect.Method.invokeNative(Native Method)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at java.lang.reflect.Method.invoke(Method.java:515)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
05-30 16:20:22.390: E/AndroidRuntime(1925):     at dalvik.system.NativeStart.main(Native Method)

[/lua]

AndroidManifest.xml

[lua]

<?xml version=“1.0” encoding=“utf-8”?>
<manifest xmlns:android=“http://schemas.android.com/apk/res/android
          package=“com.estech.DicteeKid”
          android:versionCode=“1”
          android:versionName=“1.0”
          android:installLocation=“auto”>
    <!–
     Set the minimum and target Android API levels here to inform the app store what OS versions this app supports.
     Set the “minSdkVersion” to at least API level 8 (aka: Android 2.2 “Froyo”) which is the minimum Corona supports.
     Set the “targetSdkVersion” to the API level that you compile with. Set to a high level to avoid compatibility mode.
     -->
    <uses-sdk android:minSdkVersion=“8” android:targetSdkVersion=“16”/>
    
    <!-- Informs the app store that this app requires OpenGL ES 2.0 as a minimum. Required by Corona. -->
    <uses-feature android:glEsVersion=“0x00020000”/>
    
    <!-- Informs the app store what features are required or are optional for this app. -->
    <!-- Setting the telephony feature to not required allows this app to be installed by devices that are not phones. -->
    <uses-feature android:name=“android.hardware.telephony” android:required=“false”/>
    
    <!–
     Provides information about this app.
     The “name” attribute should be set to the name of the class that extends/inherits from the Application class.
     The “label” attribute sets the name of the application as how it is shown to the end-user.
     -->
    <application android:name=“CoronaApplication”
                 android:label=“DicteeKid”
                 android:hardwareAccelerated=“true”
                 android:icon="@drawable/icon"
                 android:debuggable=“true”>
        
        <!-- The main Corona activity that runs the Corona project. -->
        <activity android:name=“com.ansca.corona.CoronaActivity”
                  android:screenOrientation=“landscape”
                  android:configChanges=“keyboardHidden|orientation|screenSize”
                  android:label=“DicteeKid”
                  android:launchMode=“singleTask”
                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
            <intent-filter>
                <action android:name=“android.intent.action.MAIN” />
                <category android:name=“android.intent.category.LAUNCHER” />
            </intent-filter>
        </activity>
        
        <!-- Other Corona activities that can be launched by the main Corona activity. -->
<!–
        <activity android:name=“com.ansca.corona.CameraActivity”
                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                  android:configChanges=“keyboardHidden|orientation|screenSize”
                  android:screenOrientation=“landscape” />
        <activity android:name=“com.ansca.corona.VideoActivity”
                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                  android:configChanges=“keyboardHidden|orientation|screenSize” />
        <activity android:name=“com.ansca.corona.purchasing.StoreActivity”
                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                  android:configChanges=“keyboardHidden|screenSize|orientation” />
–>
        <!-- Corona content provider required by the video player and mail app to access this app’s local files. -->
        <provider android:name=“com.ansca.corona.storage.FileContentProvider”
                  android:authorities=“com.estech.DicteeKid.files”
                  android:exported=“true” />
        
        <!-- Corona service used to perform background operations such as managing notifications. -->
        <service android:name=“com.ansca.corona.CoronaService” />

        <!–
         Receiver which automatically starts this application after the Android device starts up.
         This is needed to show this application’s active status bar notifications and reschedule pending
         notifications after the device boots up, because they will only be shown if the app is running.
         This receiver only works if the “android.permission.RECEIVE_BOOT_COMPLETED” permission has been set.
        -->
        <receiver android:name=“com.ansca.corona.SystemStartupBroadcastReceiver”>
            <intent-filter>
                <action android:name=“android.intent.action.BOOT_COMPLETED” />
            </intent-filter>
        </receiver>

        <!-- Handles local/scheduled notification events. -->
        <receiver android:name=“com.ansca.corona.notifications.AlarmManagerBroadcastReceiver” />
        <receiver android:name=“com.ansca.corona.notifications.StatusBarBroadcastReceiver” />

        <!-- Listens for Google Cloud Messaging push notifications and registration messages. -->
        <receiver android:name=“com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver”
                  android:permission=“com.google.android.c2dm.permission.SEND” >
            <intent-filter>
                <action android:name=“com.google.android.c2dm.intent.RECEIVE” />
                <action android:name=“com.google.android.c2dm.intent.REGISTRATION” />
                <category android:name=“com.estech.DicteeKid” />
            </intent-filter>
        </receiver>

        <!-- Listens for Google Play/Marketplace in-app purchase responses and notifications. -->
        <receiver android:name=“com.ansca.corona.purchasing.GoogleStoreBroadcastReceiver”>
            <intent-filter>
                <action android:name=“com.android.vending.billing.IN_APP_NOTIFY” />
                <action android:name=“com.android.vending.billing.RESPONSE_CODE” />
                <action android:name=“com.android.vending.billing.PURCHASE_STATE_CHANGED” />
            </intent-filter>
        </receiver>
        
        <!-- Required by the Facebook library. -->
        <!-- Uncomment the below if your app uses this library. -->
<!–
        <activity android:name=“com.facebook.LoginActivity”
                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                  android:configChanges=“keyboardHidden|screenSize|orientation”/>
        <activity android:name=“com.ansca.corona.facebook.FacebookFragmentActivity”
                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                  android:configChanges=“keyboardHidden|screenSize|orientation”/>
–>

    </application>
</manifest>
 

[/lua]

Thanks.

Sam

Any news ?

There are several *.so in CoronaEnterprise/Corona/android/lib/Corona/libs/armeabi-v7a/*.so

libads.so
libalmixer.so
libanalytics.so
libcorona.so
libCoronaProvider.gameNetwork.corona.so
libgameNetwork.so
libjnlua5.1.so
liblicensing.so
liblua.so
libmpg123.so
libopenal.so
libplugins.so
libsdl.so
libvorbisidec.so

Should I copy them to Android /system/lib so that the app can run normally ?

Thanks.

Any news ?

There are several *.so in CoronaEnterprise/Corona/android/lib/Corona/libs/armeabi-v7a/*.so

libads.so
libalmixer.so
libanalytics.so
libcorona.so
libCoronaProvider.gameNetwork.corona.so
libgameNetwork.so
libjnlua5.1.so
liblicensing.so
liblua.so
libmpg123.so
libopenal.so
libplugins.so
libsdl.so
libvorbisidec.so

Should I copy them to Android /system/lib so that the app can run normally ?

Thanks.