android - Cannot resolve symbol 'CommandCapture' -
i'm trying create root app , found out roottools
.
https://github.com/stericson/roottools/releases
i went ahead , downloaded roottools.jar
i followed guide import roottools.jar
in project, choose file menu > project structure (there's bug in 0.4.4 , menu item won't have title @ all; still works)
modules > choose module > dependencies > + button > file dependency > choose library file picker. file needs somewhere beneath root directory of projet; libs directory fine.
i put
commandcapture command = new commandcapture(0, "cp -f " + sourcelocation + " " + targetlocation); roottools.getshell(true).add(command);
inside code, issue commandcapture highlighted in red , issue saying symbol not resolved
this whole code far.
package dgameman1.com.emojiupdaterroot; import android.support.v7.app.appcompatactivity; import android.os.bundle; import android.view.view; import android.widget.button; import android.widget.spinner; import com.stericson.roottools.roottools; import java.io.ioexception; public class mainactivity extends appcompatactivity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); // final spinner emojispinner = (spinner) findviewbyid(r.id.emojispinner); final button updateemojibutton = (button) findviewbyid(r.id.updateemojibutton); updateemojibutton.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { try { commandcapture command = new commandcapture(0, "cp -f " + sourcelocation + " " + targetlocation); roottools.getshell(true).add(command); } catch (ioexception e) { } } }); } }
the library went through massive code re organization , while cleaner means few things have changed. instance, library' kernel found under rootshell
, meaning newly renamed command
class belongs com.stericson.rootshell.execution
Comments
Post a Comment