Dear Jiang Bian,

Do you resolve this problem?

I had get some error from use RecoverySystem.rebootWipeUserData(context).

The error is

12-04 02:53:09.202 W/ActivityManager(  149): Permission Denial: not allowed 
to send broadcast android.intent.action.MASTER_CLEAR_NOTIFICATION from 
pid=843, uid=10027 
12-04 02:53:09.203 W/System.err(  843): java.lang.SecurityException: 
Permission Denial: not allowed to send broadcast 
android.intent.action.MASTER_CLEAR_NOTIFICATION from pid=843, uid=10027 
12-04 02:53:09.205 W/System.err(  843):     at 
android.os.Parcel.readException(Parcel.java:1327) 
12-04 02:53:09.205 W/System.err(  843):     at 
android.os.Parcel.readException(Parcel.java:1281) 
12-04 02:53:09.206 W/System.err(  843):     at 
android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:1838)
 

12-04 02:53:09.206 W/System.err(  843):     at 
android.app.ContextImpl.sendOrderedBroadcast(ContextImpl.java:967) 
12-04 02:53:09.206 W/System.err(  843):     at 
android.content.ContextWrapper.sendOrderedBroadcast(ContextWrapper.java:313) 

12-04 02:53:09.206 W/System.err(  843):     at 
android.os.RecoverySystem.rebootWipeUserData(RecoverySystem.java:345) 
12-04 02:53:09.207 W/System.err(  843):     at 
com.gemtek.downloader.Downloader$4.handleMessage(Downloader.java:455) 
12-04 02:53:09.207 W/System.err(  843):     at 
android.os.Handler.dispatchMessage(Handler.java:99) 
12-04 02:53:09.207 W/System.err(  843):     at 
android.os.Looper.loop(Looper.java:137) 
12-04 02:53:09.207 W/System.err(  843):     at 
android.app.ActivityThread.main(ActivityThread.java:4424) 
12-04 02:53:09.207 W/System.err(  843):     at 
java.lang.reflect.Method.invokeNative(Native Method) 
12-04 02:53:09.208 W/System.err(  843):     at 
java.lang.reflect.Method.invoke(Method.java:511) 
12-04 02:53:09.208 W/System.err(  843):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:788) 

12-04 02:53:09.208 W/System.err(  843):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 
12-04 02:53:09.209 W/System.err(  843):     at 
dalvik.system.NativeStart.main(Native Method) 
12-04 02:53:09.217 W/InputManagerService(  149): Window already focused, 
ignoring focus gain of: 
com.android.internal.view.IInputMethodClient$Stub$Proxy@412244e8 

Can you give me some suggestion?

bor...@gmail.com於 2012年4月15日星期日UTC+8上午1時16分22秒寫道:
>
> Hi Gugs:
>     I try to use RecoverySystem.installPackage method to update system, 
> but got a error message "/cache/recovery/command (Permission denied)".
>
> permissions:
>     <uses-permission 
> android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
>     <uses-permission android:name="android.permission.REBOOT" />
>
> Simple APK Code:
>     public void romUpdate(Context context) {
>
>         File SDCardRoot = Environment.getExternalStorageDirectory();
>
>         File packageFile = new File("/sdcard/update.zip");
>
>         try {
>             RecoverySystem.installPackage(context, packageFile);
>         } catch (IOException e) {
>             Log.v(TAG, e.getMessage());
>             e.printStackTrace();
>         }
>     }
>
> Error Message:
> W/RecoverySystem( 7845): !!! REBOOTING TO INSTALL /mnt/sdcard/update.zip 
> !!!
> V/RomUpdateActivity( 7845): /cache/recovery/command (Permission denied)
> W/System.err( 7845): java.io.FileNotFoundException: 
> /cache/recovery/command (Permission denied)
> W/System.err( 7845): at 
> org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
> W/System.err( 7845): at 
> dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:239)
> W/System.err( 7845): at 
> java.io.FileOutputStream.<init>(FileOutputStream.java:101)
> W/System.err( 7845): at 
> java.io.FileOutputStream.<init>(FileOutputStream.java:77)
> W/System.err( 7845): at java.io.FileWriter.<init>(FileWriter.java:42)
> W/System.err( 7845): at 
> android.os.RecoverySystem.bootCommand(RecoverySystem.java:394)
> W/System.err( 7845): at 
> android.os.RecoverySystem.installPackage(RecoverySystem.java:326)
> W/System.err( 7845): at 
> com.kvbian.romupdate.RomUpdateActivity.romUpdate(RomUpdateActivity.java:64)
> W/System.err( 7845): at 
> com.kvbian.romupdate.RomUpdateActivity.onCreate(RomUpdateActivity.java:48)
> W/System.err( 7845): at 
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1050)
> W/System.err( 7845): at 
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1782)
> W/System.err( 7845): at 
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
> W/System.err( 7845): at 
> android.app.ActivityThread.access$500(ActivityThread.java:122)
> W/System.err( 7845): at 
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1027)
> W/System.err( 7845): at 
> android.os.Handler.dispatchMessage(Handler.java:99)
> W/System.err( 7845): at android.os.Looper.loop(Looper.java:132)
> W/System.err( 7845): at 
> android.app.ActivityThread.main(ActivityThread.java:4126)
> W/System.err( 7845): at java.lang.reflect.Method.invokeNative(Native 
> Method)
> W/System.err( 7845): at java.lang.reflect.Method.invoke(Method.java:491)
> W/System.err( 7845): at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
> W/System.err( 7845): at 
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
> W/System.err( 7845): at dalvik.system.NativeStart.main(Native Method)
> D/WindowManager(  287): addWindowToListInOrder() : current 
> mSkipWidgetFocus='true'
>
>
> Thanks
>
> -- 
> Jiang Bian
> http://www.wifihack.net/
> http://golang-china.org/
>
> 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to