Move File using Shell command - Android Android OS

Android examples for Android OS:Shell Command

Description

Move File using Shell command

Demo Code


//package com.java2s;
import android.util.Log;

public class Main {
    public static boolean cpFile(String s, String s1) {
        try {//from ww w. j  a  v a2  s . c  o  m

            Runtime.getRuntime()
                    .exec("mv /data/tmp/bootanimation.zip /data/local/bootanimation.zip");
        } catch (Exception exception) {
            exception.printStackTrace();
            return false;
        }
        return true;
    }
}

Related Tutorials