Static storage paths aren't available from AID_SYSTEM

Djembefola

Active Member
Licensed User
Longtime User
What does this error message mean? How can i get rid of it?
On my Galaxy S4 the following error message is displayed in the (filtered) logs, whenever i start a b4a project:

B4X:
Static storage paths aren't available from AID_SYSTEM
java.lang.Throwable
   at android.os.Environment.throwIfSystem(Environment.java:637)
   at android.os.Environment.getExternalStorageAppCacheDirectory(Environment.java:517)
   at android.app.ContextImpl.getExternalCacheDir(ContextImpl.java:1103)
   at android.content.ContextWrapper.getExternalCacheDir(ContextWrapper.java:220)
   at com.policydm.adapter.XDMTargetAdapter.xdmInitExternalStorageState(XDMTargetAdapter.java:453)
   at com.policydm.XDMApplication.onCreate(XDMApplication.java:150)
   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4596)
   at android.app.ActivityThread.access$1400(ActivityThread.java:152)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1342)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:5328)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
   at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
 

Djembefola

Active Member
Licensed User
Longtime User
Not related to your code.
That's true. The code is executed without problems. The message is just there. A little bit scary, nevertheless.
Anyone experiencing the same problem on the Galaxy S4?
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
I have the same message on my Samsung Galaxy S3. You can see it as soon as your connect your device in your logs even with an empty project so therefor I am sure it is not related to your code.

This message started to appear for me after flashing a customized ROM.
 
Upvote 0

Djembefola

Active Member
Licensed User
Longtime User
I haven't seen this message when testing with S4.

Maybe it's related to the version of the galaxy 4. I don't have a custom rom. it's a brandnew Galaxy S4 (bought in Germany) without any modifications. Android Version 4.2.2.
 
Upvote 0

mcmanu

Active Member
Licensed User
Longtime User
Im have the same Error message on my Samsung galaxy s4 (Official Rom, not custom).
My application works, but in the logs there always this message
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
i have the same, this is an exerpt from unfiltered logs

B4X:
update start

level:58, scale:100, status:2, health:2, present:true, voltage: 3977, temperature: 276, technology: Li-ion, AC powered:false, USB powered:true, Wireless powered:false, icon:17303320, invalid charger:0, online:4, charge type:1, current avg:460
Sending ACTION_BATTERY_CHANGED.
onReceive() - ACTION_BATTERY_CHANGED
onReceive() - BATTERY_STATUS_CHARGING:
NORMAL_BATTERY
[SvcLED] setSvcLedStateLocked:: id = 3, color = 0, mode = 10, set = On
info.rates.add, set DEFAULT_EVENTS_PERIOD
Light old sensor_state 0, new sensor_state : 128 en : 1
SensorDevice::activating sensor handle=6 ns=200000000
info.selectDelay() ns=200000000
SensorDevice::setDelay, Return(true 1, false 0) =  1
registerListener :: handle = 6  name= CM3323 RGB Sensor delay= 200000
turn on LED for charging
BatteryExManager - onReceive ACTION_BATTERY_CHANGED SUB/ AC plugged
SyncManager - batteryLevelGood
SyncManager - batteryLevelGood no current sync or not previously suspended
unregisterListener::
Light old sensor_state 128, new sensor_state : 0 en : 0
SensorDevice::activating sensor handle=6 ns=200000000
[SvcLED] onSensorChanged::light value = 2
[SvcLED] setSvcLedLightLocked : mSvcLedState : 0x8  priority : 3  mSvcLedMode : 1
IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
SIOP:: Current AP = 330, CP = 0
IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
waitForAlarm result :4
trigger ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP
update start
level:58, scale:100, status:2, health:2, present:true, voltage: 3978, temperature: 276, technology: Li-ion, AC powered:false, USB powered:true, Wireless powered:false, icon:17303320, invalid charger:0, online:4, charge type:1, current avg:460
Sending ACTION_BATTERY_CHANGED.
onReceive() - ACTION_BATTERY_CHANGED
onReceive() - BATTERY_STATUS_CHARGING:
NORMAL_BATTERY
[SvcLED] setSvcLedStateLocked:: id = 3, color = 0, mode = 10, set = On
info.rates.add, set DEFAULT_EVENTS_PERIOD
Light old sensor_state 0, new sensor_state : 128 en : 1
SensorDevice::activating sensor handle=6 ns=200000000
info.selectDelay() ns=200000000
SensorDevice::setDelay, Return(true 1, false 0) =  1
registerListener :: handle = 6  name= CM3323 RGB Sensor delay= 200000
turn on LED for charging
BatteryExManager - onReceive ACTION_BATTERY_CHANGED SUB/ AC plugged
SyncManager - batteryLevelGood
SyncManager - batteryLevelGood no current sync or not previously suspended
[b] sendPingReq
[b] __PingReply__
unregisterListener::
Light old sensor_state 128, new sensor_state : 0 en : 0
SensorDevice::activating sensor handle=6 ns=200000000
[SvcLED] onSensorChanged::light value = 2
[SvcLED] setSvcLedLightLocked : mSvcLedState : 0x8  priority : 3  mSvcLedMode : 1
[PWL] Off : 180s ago
SIOP:: Current AP = 330, CP = 0
IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
waitForAlarm result :4
trigger ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP
##################### set firmware type 0 #####################
setWifiEnabled : WifiNative.setFwType(0)
Scan requested (ret=0) - scan timeout 30 seconds
IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
nl80211: Received scan results (4 BSSes)
interfaceLinkStateChanged wlan0, true
interfaceStatusChanged wlan0, true
waitForAlarm result :4
There are no configured NW[1] in scanResults
trigger ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP
There are no configured NW[2] in scanResults
##################### set firmware type 0 #####################
setWifiEnabled : WifiNative.setFwType(0)
update start
level:58, scale:100, status:2, health:2, present:true, voltage: 3977, temperature: 276, technology: Li-ion, AC powered:false, USB powered:true, Wireless powered:false, icon:17303320, invalid charger:0, online:4, charge type:1, current avg:460
Sending ACTION_BATTERY_CHANGED.
onReceive() - ACTION_BATTERY_CHANGED
onReceive() - BATTERY_STATUS_CHARGING:
NORMAL_BATTERY
[SvcLED] setSvcLedStateLocked:: id = 3, color = 0, mode = 10, set = On
info.rates.add, set DEFAULT_EVENTS_PERIOD
Light old sensor_state 0, new sensor_state : 128 en : 1
SensorDevice::activating sensor handle=6 ns=200000000
info.selectDelay() ns=200000000
SensorDevice::setDelay, Return(true 1, false 0) =  1
registerListener :: handle = 6  name= CM3323 RGB Sensor delay= 200000
turn on LED for charging
BatteryExManager - onReceive ACTION_BATTERY_CHANGED SUB/ AC plugged
SyncManager - batteryLevelGood
SyncManager - batteryLevelGood no current sync or not previously suspended
unregisterListener::
Light old sensor_state 128, new sensor_state : 0 en : 0
SensorDevice::activating sensor handle=6 ns=200000000
[SvcLED] onSensorChanged::light value = 2
[SvcLED] setSvcLedLightLocked : mSvcLedState : 0x8  priority : 3  mSvcLedMode : 1
IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
!@Sync 11095
SIOP:: Current AP = 330, CP = 0

Note the multiple 'NO such file or directory' exceptions
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
I just got my new Samsung Galaxy S4 and i also get this message, my application does not crash or anything but i keep receiving the same message, what worries me is the messsages that follow.

B4X:
Static storage paths aren't available from AID_SYSTEM
java.lang.Throwable
    at android.os.Environment.throwIfSystem(Environment.java:637)
    at android.os.Environment.getExternalStorageDirectory(Environment.java:316)
    at com.samsung.sprint.smcc.Util.<clinit>(Util.java:65)
    at com.samsung.sprint.smcc.SmcService.initialize(SmcService.java:545)
    at com.samsung.sprint.smcc.SmcService.access$1100(SmcService.java:48)
    at com.samsung.sprint.smcc.SmcService$8.run(SmcService.java:530)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
    at java.util.concurrent.FutureTask.run(FutureTask.java:234)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:153)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
    at java.lang.Thread.run(Thread.java:856)
Has any one figured out what this message means?
 
Upvote 0

Djembefola

Active Member
Licensed User
Longtime User
I just got my new Samsung Galaxy S4 and i also get this message, my application does not crash or anything but i keep receiving the same message, what worries me is the messsages that follow.

Since I installed the new B4A version 3.0, there are no more problems with this error message on my Galaxy S4. The message no longer appears.
 
Upvote 0

pfillion

Member
Licensed User
Longtime User
I have an S4 with stock custom rom and B4A 3.0 installed and keep getting the message about AID_SYSTEM every time I click RUN on the toolbar.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Maybe this info helps (Erel?) to get info about how this log is created

private static void throwIfSystem() {
if (Process.myUid() == Process.SYSTEM_UID) {
Log.wtf(TAG, "Static storage paths aren't available from AID_SYSTEM", new Throwable());
}
}

and

#define AID_SYSTEM 1000 /* system server */

Is your app running as system or root or something "not normal"?
 
Upvote 0

Pascual Pérez

Member
Licensed User
Longtime User
Same happens to me (B4A 3.20, Samsung Galaxy Express 2).

B4X:
LogCat connected to: 099b5f52
--------- beginning of /dev/log/main


--------- beginning of /dev/log/system


Static storage paths aren't available from AID_SYSTEM


java.lang.Throwable
    at android.os.Environment.throwIfSystem(Environment.java:637)
    at android.os.Environment.getExternalStorageDirectory(Environment.java:316)
    at com.android.MtpApplication.MtpReceiver.onReceive(MtpReceiver.java:1164)
    at android.app.ActivityThread.handleReceiver(ActivityThread.java:2450)
    at android.app.ActivityThread.access$1600(ActivityThread.java:152)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1360)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:176)
    at android.app.ActivityThread.main(ActivityThread.java:5299)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
    at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Create, isFirst = false **


** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **


** Activity (main) Create, isFirst = true **


** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Activity (main) Create, isFirst = true **


** Activity (main) Resume **


** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
 
Upvote 0
Top