[G1 Q&A, Help & Troubleshooting] tolemac:
Thanks other time IConrad01, I have tried your command.

1) I have created an Android application called TestBackup that try to write a simple file on startup in this path: /system/bin/hello.txt

2) I have ran the application in my device and I get a normal exception:

(new File("/system/bin/hello.txt")).createNewFile();

java.io.IOException: Parent directory of file is not writable: /system/bin/hello.txt

3) I have opened an "adb shell" shell and I have ran this commands:

# busybox mount -o rw,remount /system
busybox mount -o rw,remount /system
# su -c 'am start -a android.intent.action.MAIN -n org.jros.TestBackup/org.jros.TestBackup.Test'
su -c 'am start -a android.intent.action.MAIN -n org.jros.TestBackup/org.jros.TestBackup.Test'
Starting: Intent { act=android.intent.action.MAIN cmp=org.jros.TestBackup/.Test }
# busybox mount -o ro,remount /system
busybox mount -o ro,remount /system

The application started but don´t have root permissions (I think), this is the LogCat from "am start":

11-05 13:21:32.082: DEBUG/su(1175): 0:0 /system/bin/sh executing 0:0 am start -a android.intent.action.MAIN -n org.jros.TestBackup/org.jros.TestBackup.Test
11-05 13:21:32.462: DEBUG/AndroidRuntime(1176): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
11-05 13:21:32.462: DEBUG/AndroidRuntime(1176): CheckJNI is OFF
11-05 13:21:32.642: DEBUG/AndroidRuntime(1176): --- registering native functions ---
11-05 13:21:32.672: INFO/jdwp(1176): received file descriptor 30 from ADB
11-05 13:21:32.842: INFO/BluetoothOppService.cpp(1176): register_android_server_BluetoothOppService
11-05 13:21:32.872: DEBUG/ddm-heap(1176): Got feature list request
11-05 13:21:33.202: INFO/ActivityManager(129): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=org.jros.TestBackup/.Test }
11-05 13:21:33.232: DEBUG/AndroidRuntime(1176): Shutting down VM
11-05 13:21:33.242: DEBUG/dalvikvm(1176): DestroyJavaVM waiting for non-daemon threads to exit
11-05 13:21:33.242: DEBUG/dalvikvm(1176): DestroyJavaVM shutting VM down
11-05 13:21:33.242: DEBUG/dalvikvm(1176): HeapWorker thread shutting down
11-05 13:21:33.242: DEBUG/dalvikvm(1176): HeapWorker thread has shut down
11-05 13:21:33.242: DEBUG/jdwp(1176): JDWP shutting down net...
11-05 13:21:33.242: DEBUG/jdwp(1176): +++ peer disconnected
11-05 13:21:33.242: INFO/dalvikvm(1176): Debugger has detached; object registry had 1 entries
11-05 13:21:33.262: DEBUG/dalvikvm(1176): VM cleaning up
11-05 13:21:33.272: ERROR/AndroidRuntime(1176): ERROR: thread attach failed
11-05 13:21:33.302: INFO/ActivityManager(129): Process com.android.vending (pid 1046) has died.
11-05 13:21:33.332: ERROR/Error Test SU(1072): Parent directory of file is not writable: /system/bin/hola.txt
11-05 13:21:33.332: WARN/System.err(1072): java.io.IOException: Parent directory of file is not writable: /system/bin/hola.txt
11-05 13:21:33.342: WARN/System.err(1072): at java.io.File.createNewFile(File.java:1208)
11-05 13:21:33.342: WARN/System.err(1072): at org.jros.TestBackup.Test.TestSU(Test.java:32)
11-05 13:21:33.342: WARN/System.err(1072): at org.jros.TestBackup.Test.onCreate(Test.java:24)
11-05 13:21:33.352: WARN/System.err(1072): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
11-05 13:21:33.352: WARN/System.err(1072): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
11-05 13:21:33.352: WARN/System.err(1072): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
11-05 13:21:33.352: WARN/System.err(1072): at android.app.ActivityThread.access$2100(ActivityThread.java:116)
11-05 13:21:33.352: WARN/System.err(1072): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
11-05 13:21:33.362: WARN/System.err(1072): at android.os.Handler.dispatchMessage(Handler.java:99)
11-05 13:21:33.362: WARN/System.err(1072): at android.os.Looper.loop(Looper.java:123)
11-05 13:21:33.362: WARN/System.err(1072): at android.app.ActivityThread.main(ActivityThread.java:4203)
11-05 13:21:33.362: WARN/System.err(1072): at java.lang.reflect.Method.invokeNative(Native Method)
11-05 13:21:33.362: WARN/System.err(1072): at java.lang.reflect.Method.invoke(Method.java:521)
11-05 13:21:33.362: WARN/System.err(1072): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
11-05 13:21:33.372: WARN/System.err(1072): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
11-05 13:21:33.372: WARN/System.err(1072): at dalvik.system.NativeStart.main(Native Method)
11-05 13:21:33.372: DEBUG/dalvikvm(1176): LinearAlloc 0x0 used 685236 of 4194304 (16%)
11-05 13:21:33.442: INFO/ActivityManager(129): Displayed activity org.jros.TestBackup/.Test: 218 ms (total 218 ms)

Perhaps is impossible to start an application with root permissions.

I don´t now.

And you?

what are you think about?

Thanks in advance.