Tag: rooted device

无法在扎根的Android手机上运行“adb root”

adb root我的设备后,我需要运行adb root然后adb shell以便我可以访问我的应用程序数据库。 当试图运行adb root我一直得到“adbd无法在生产版本中作为root运行”。 为什么是这样? 唯一的其他select是使用Android模拟器进行testing,但是我们都知道模拟器是多么糟糕(不是真正的可行的开发解决scheme)。

从无根设备的资产文件夹复制数据库

我正试图从资产文件夹复制到设备的数据库。 此代码在Emulator和根设备上工作正常。 我只是想知道它是否在无根设备上产生任何问题,或者它会起作用。 private void StoreDatabase() { File DbFile = new File( "data/data/packagename/DBname.sqlite"); if (DbFile.exists()) { System.out.println("file already exist ,No need to Create"); } else { try { DbFile.createNewFile(); System.out.println("File Created successfully"); InputStream is = this.getAssets().open("DBname.sqlite"); FileOutputStream fos = new FileOutputStream(DbFile); byte[] buffer = new byte[1024]; int length = 0; while ((length = is.read(buffer)) > […]