Download file from root Android device Windows
Download file from Android device using Android Studio
stackoverflow.com/questions/34603355/android-device-monitor-data-folder-is-empty- android.com/studio Start Android Studio
- Root device by Your Android model. This example is for 4.4 kingoapp.com/root-tutorials/how-to-root-android-4.4.htm
- Open command prompt console: Start -> Command prompt
- Write path to ADB plus command, and set chmod for every folder on path to apliccations database, for example: (user is Your name|nick!!!! shell@Kraft-A6000:/ is Your device, this is Lenovo A6000, may be different!!!!)
- Every dot is one line in Command prompt console!!!!! Dont write (press Enter) or (Enter). Dont brake line between root@Kraft-A6000:/ # and (Enter)!
C:\Users\user>c:\Users\user\AppData\Local\Android\sdk\platform-tools\adb shell (press Enter)
shell@Kraft-A6000:/ $
shell@Kraft-A6000:/ $ su (Enter)
root@Kraft-A6000:/ #
root@Kraft-A6000:/ # su -c "chmod 777 /data" (Enter)
root@Kraft-A6000:/ # su -c "chmod 777 /data/data" (Enter)
root@Kraft-A6000:/ # su -c "chmod 777 /data/data/com.your_package" (Enter)
root@Kraft-A6000:/ # su -c "chmod 777 /data/data/com.your_package/databases" (Enter)
root@Kraft-A6000:/ # su -c "chmod 777 /data/data/com.your_package/databases/database_name.db" (Enter)
- Open Android Studio -> Tools -> Android -> Android Device Monitor (meybe some message box, minimalize all windows to find message box - close message box )
- Pull data from Explorer
Date: 13.07.2020 - 08:23
396LW NO topic_id
AD
Další témata ....(Topics)
Solution:
public void alertMy(String sTitle, String sMessage){
AlertDialog.Builder builder = new AlertDialog.Builder(Test.this); // activity
builder.setTitle(sTitle)
.setMessage(sMessage)
.setCancelable(false)
.setNegativeButton("Close",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
}
// file name MyFirstClass.java
import java.util.*;
import java.lang.Math;
import java.io.*;
import javax.swing.*;
public class MyFirstClass{ // start of program
public static void main(String[] args) { // basic function main
// variables and calculation
int a=2;
int b=3;
int c=Integer.parseInt(JOptionPane.showInputDialog(" Put number: ", "1"));
System.out.println("Number is: "+c);
System.out.println(a+" * "+b+" = "+(a*b));
System.out.println("a^3 "+Math.pow(a,b));
//array
int[] array_my=new int[10];
array_my[0]=3;
array_my[1]=5;
System.out.println("Number of elements "+array_my.length+" 1 + 2 element of array "+(array_my[0]+array_my[1]));
//strings
String txt="Quick red fox";
String txt2=JOptionPane.showInputDialog("Write text: ", "word");
System.out.println("Text is: "+txt2);
String[] count_of_word=txt.split(" ");
System.out.println("Length: "+txt.length()+" Count of words "+count_of_word.length);
System.out.println(txt +" -> "+txt.replace("red","brown"));
System.out.println("First 5 chars of string is: "+ txt.substring(0,5));
//for a if
for(int i=0; i<10;i++){
if(i==3)System.out.println("i equal "+i);
}
// file
try {
File soubor=new File("some_file.txt");
if(!soubor.exists()){
System.out.println("File dont exist");
}
else { // utf-8 encoding
BufferedReader in1 = new BufferedReader(new InputStreamReader(new FileInputStream(soubor),"UTF-8"));
BufferedWriter out1 = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("zapis.txt"),"UTF-8"));
String str;
while ((str = in1.readLine())!=null){
System.out.println(str);
out1.write(str+"
");
}
in1.close();
out1.close();
}
} catch(IOException e){System.out.println("Error " + e);}
// dir
File pathName = new File("some_dir");
String[] fileNames = pathName.list();
if(pathName.exists())
System.out.println("Name of first file in "some_dir": "+fileNames[0]);
else System.out.println("dir not exist");
//function
int nResult = calculateMyFc(3,5);
System.out.println("Result of function: "+nResult);
} // end of function main
// new function , you can add to end MyFc = my function
public static int calculateMyFc(int a, int b){
return (a+b);
}
} // end of class of program
- create div with class with name e.g. circle
- create in styleSheet.css class circle
html code
<div class="circle" id="">3</div>
css code
.circle {
border-radius: 50%;
width: 50px;
height: 50px;
background: yellow;
position: absolute;
display: block;
border: 6px solid blue;
font-size: 50px;
text-align: center;
}
3
1.) Try delete some apps from Android emulator (can from Eclipse DDMS perspective
- File Explorer tab - data/apps folder path )
2.) Try resize emulator internal storage or SD card storage to hight size
3.)Try add to AndroidManifest.xml android:installLocation="preferExternal"
4.) Try resize particion from Eclipse
Preferences,
select Android- Launch
Add "-partition-size 1024" into "Default emulator option” field.
Click "Apply” and use your emulator as usual
- File Explorer tab - data/apps folder path )
2.) Try resize emulator internal storage or SD card storage to hight size
3.)Try add to AndroidManifest.xml android:installLocation="preferExternal"
<manifest xmlns:android="//schemas.android.com/apk/res/android"
package="com.myweb.mypackage"
android:installLocation="preferExternal"
4.) Try resize particion from Eclipse
Preferences,
select Android- Launch
Add "-partition-size 1024" into "Default emulator option” field.
Click "Apply” and use your emulator as usual
Codec, compress(), CompressFormat, quality, decodeByteArray(), Android example source code with image.
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new SampleView(this));
}
private static Bitmap codec(Bitmap src, Bitmap.CompressFormat format,
int quality) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
src.compress(format, quality, os);
byte[] array = os.toByteArray();
return BitmapFactory.decodeByteArray(array, 0, array.length);
}
private static class SampleView extends View {
// CONSTRUCTOR
public SampleView(Context context) {
super(context);
setFocusable(true);
}
@Override
protected void onDraw(Canvas canvas) {
Paint paint = new Paint();
canvas.drawColor(Color.GRAY);
// you need to insert some image flower_blue into res/drawable folder
Bitmap b = BitmapFactory.decodeResource(getResources(), R.drawable.flower_blue);
// Best of quality is 80 and more, 3 is very low quality of image
Bitmap bJPGcompress = codec(b, Bitmap.CompressFormat.JPEG, 3);
// get dimension of bitmap getHeight() getWidth()
int h = b.getHeight();
canvas.drawBitmap(b, 10,10, paint);
canvas.drawBitmap(bJPGcompress, 10,10 + h + 10, paint);
}
}
}
Editace: 13.7.2020 - 09:22
Počet článků v kategorii: 396
Url:download-file-from-root-android-device-windows