Titanium JIRA Archive
Appcelerator Community (AC)

[AC-73] Impossible to run app on rooted phone (or ex rooted) compiled with titanium sdk 4.0.0.beta2

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2015-04-18T15:00:12.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsandroid, mobilesdk, root, sdk-4.0.0.beta2
ReporterGiulio De Giorgio
AssigneeRadamantis Torres-Lechuga
Created2015-04-13T12:25:00.000+0000
Updated2015-04-18T15:00:12.000+0000

Description

Running an app compiled with mobile sdk 4.0.0.beta2 throw an alert showing a security violation because the device is rooted and then close. It also log a misleading error on the console:
[ERROR] :  TiAssetHelper: Error while reading asset "Resources/app.js":
[ERROR] :  TiAssetHelper: java.io.FileNotFoundException: Resources/app.js
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.openAsset(Native Method)
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.open(AssetManager.java:313)
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.open(AssetManager.java:287)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:62)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:103)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:151)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:107)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:543)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:144)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:96)
[ERROR] :  TiAssetHelper: 	at android.app.Activity.performCreate(Activity.java:5933)
[ERROR] :  TiAssetHelper: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
[ERROR] :  TiAssetHelper: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
[ERROR] :  TiAssetHelper: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
[ERROR] :  TiAssetHelper: 	at android.app.ActivityThread.access$800(ActivityThread.java:144)
[ERROR] :  TiAssetHelper: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
[ERROR] :  TiAssetHelper: 	at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] :  TiAssetHelper: 	at android.os.Looper.loop(Looper.java:135)
[ERROR] :  TiAssetHelper: 	at android.app.ActivityThread.main(ActivityThread.java:5221)
[ERROR] :  TiAssetHelper: 	at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  TiAssetHelper: 	at java.lang.reflect.Method.invoke(Method.java:372)
[ERROR] :  TiAssetHelper: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
[ERROR] :  TiAssetHelper: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
[ERROR] :  TiAssetHelper: Error while reading asset "Resources/app.js":
[ERROR] :  TiAssetHelper: java.io.FileNotFoundException: Resources/app.js
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.openAsset(Native Method)
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.open(AssetManager.java:313)
[ERROR] :  TiAssetHelper: 	at android.content.res.AssetManager.open(AssetManager.java:287)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:62)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:177)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:299)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:203)
[ERROR] :  TiAssetHelper: 	at android.os.Handler.dispatchMessage(Handler.java:98)
[ERROR] :  TiAssetHelper: 	at android.os.Looper.loop(Looper.java:135)
[ERROR] :  TiAssetHelper: 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
This issue is happening on a rooted nexus 4 and on a non-rooted nexus 7(2012) (that was previously rooted before last os update). The android version is 5.0.1 and 5.0.2

Comments

  1. Ingo Muschenetz 2015-04-18

    Please see CLI-542 on how to disable rooted phone checks.
  2. Ingo Muschenetz 2015-04-18

    This is related to CLI-542. The question is if we should disable this detection by default.

JSON Source