MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 31 as of 2019-10-04 20:36:50
  • Java
  • Android

Android

  • Get Android Studio Bundle https://dl.google.com/dl/android/studio/install/1.2.2.0/android-studio-bundle-141.1980579-windows.exe

  • Install with Next, Next .....
  • UI Theme Darcula

Linux download https://dl.google.com/dl/android/studio/ide-zips/3.5.1.0/android-studio-ide-191.5900203-linux.tar.gz

cp android-studio-ide-191.5900203-linux.tar.gz /opt/
cd /opt/
tar xvzf android-studio-ide-191.5900203-linux.tar.gz 
chgrp users android-studio/ -R
/opt/android-studio/bin/studio.sh
###
Preparing "Install Android SDK Tools (revision: 26.1.1)".
Downloading https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
"Install Android SDK Tools (revision: 26.1.1)" ready.
Installing Android SDK Tools in /home/vitor/Android/Sdk/tools
"Install Android SDK Tools (revision: 26.1.1)" complete.
"Install Android SDK Tools (revision: 26.1.1)" finished.
Preparing "Install SDK Patch Applier v4 (revision: 1)".
Downloading https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip
"Install SDK Patch Applier v4 (revision: 1)" ready.
Installing SDK Patch Applier v4 in /home/vitor/Android/Sdk/patcher/v4
"Install SDK Patch Applier v4 (revision: 1)" complete.
"Install SDK Patch Applier v4 (revision: 1)" finished.
Preparing "Install Android Emulator (revision: 29.2.1)".
Downloading https://dl.google.com/android/repository/emulator-linux-5889189.zip
"Install Android Emulator (revision: 29.2.1)" ready.
Installing Android Emulator in /home/vitor/Android/Sdk/emulator
"Install Android Emulator (revision: 29.2.1)" complete.
"Install Android Emulator (revision: 29.2.1)" finished.
Preparing "Install Android SDK Platform-Tools (revision: 29.0.4)".
Downloading https://dl.google.com/android/repository/platform-tools_r29.0.4-linux.zip
"Install Android SDK Platform-Tools (revision: 29.0.4)" ready.
Installing Android SDK Platform-Tools in /home/vitor/Android/Sdk/platform-tools
"Install Android SDK Platform-Tools (revision: 29.0.4)" complete.
"Install Android SDK Platform-Tools (revision: 29.0.4)" finished.
Preparing "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)".
Downloading https://dl.google.com/android/repository/build-tools_r29.0.2-linux.zip
"Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" ready.
Installing Android SDK Build-Tools 29.0.2 in /home/vitor/Android/Sdk/build-tools/29.0.2
"Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" complete.
"Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" finished.
Preparing "Install Android SDK Platform 29 (revision: 3)".
Downloading https://dl.google.com/android/repository/platform-29_r03.zip
"Install Android SDK Platform 29 (revision: 3)" ready.
Installing Android SDK Platform 29 in /home/vitor/Android/Sdk/platforms/android-29
"Install Android SDK Platform 29 (revision: 3)" complete.
"Install Android SDK Platform 29 (revision: 3)" finished.
Preparing "Install Sources for Android 29 (revision: 1)".
Downloading https://dl.google.com/android/repository/sources-29_r01.zip
"Install Sources for Android 29 (revision: 1)" ready.
Installing Sources for Android 29 in /home/vitor/Android/Sdk/sources/android-29
"Install Sources for Android 29 (revision: 1)" complete.
"Install Sources for Android 29 (revision: 1)" finished.
Parsing /home/vitor/Android/Sdk/build-tools/29.0.2/package.xml
Parsing /home/vitor/Android/Sdk/emulator/package.xml
Parsing /home/vitor/Android/Sdk/patcher/v4/package.xml
Parsing /home/vitor/Android/Sdk/platform-tools/package.xml
Parsing /home/vitor/Android/Sdk/platforms/android-29/package.xml
Parsing /home/vitor/Android/Sdk/sources/android-29/package.xml
Parsing /home/vitor/Android/Sdk/tools/package.xml
Android SDK is up to date.
  • https://developer.android.com/studio/releases/gradle-plugin

  • https://services.gradle.org/distributions/

Android SDK linux command line tools

  • cd /opt
  • wget https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz

  • tar xvzf android-sdk_r24.4.1-linux.tgz
  • cd android-sdk-linux/tools
  • ./android list sdk

   1- Android SDK Tools, revision 25.1.7
   2- Android SDK Platform-tools, revision 24.0.2
   3- Android SDK Build-tools, revision 24.0.2
  13- SDK Platform Android 4.1.2, API 16, revision 5
  • ./android update sdk --no-ui --filter 1,2,3,13
  • cd ..
  • cd tools
  • ./android create project --target android-16 --name AndroidProj --path ~/tmp/androidProj/ --activity MyProject --package androidproj.test --gradle --gradle-version 1.1.0

  • 1.1.0 is the gradle plugin version
  • cd ~/tmp/androidProj

Project structure

.
|-- build.gradle
|-- gradle
|   `-- wrapper
|       |-- gradle-wrapper.jar
|       `-- gradle-wrapper.properties
|-- gradlew
|-- gradlew.bat
|-- local.properties
`-- src
    |-- androidTest
    |   `-- java
    |       `-- androidproj
    |           `-- test
    |               `-- MyProjectTest.java
    `-- main
        |-- AndroidManifest.xml
        |-- java
        |   `-- androidproj
        |       `-- test
        |           `-- MyProject.java
        `-- res
            |-- drawable-hdpi
            |   `-- ic_launcher.png
            |-- drawable-ldpi
            |   `-- ic_launcher.png
            |-- drawable-mdpi
            |   `-- ic_launcher.png
            |-- drawable-xhdpi
            |   `-- ic_launcher.png
            |-- layout
            |   `-- main.xml
            `-- values
                `-- strings.xml
  • vi gradle/wrapper/gradle-wrapper.properties # change version from 1.12 to 2.2.1
  • vi build.gradle # comment with // lines with Proguard
  • ./gradlew
  • ./gradlew tasks
  • ./gradlew clean build
  • find . -name "*.apk" # ./build/outputs/apk/androidProj-debug.apk

./build/outputs/apk/androidProj-debug.apk
./build/outputs/apk/androidProj-release-unsigned.apk
./build/outputs/apk/androidProj-debug-unaligned.apk

./src/androidTest/java/androidproj/test/MyProjectTest.java

   1 package androidproj.test;
   2 
   3 import android.test.ActivityInstrumentationTestCase2;
   4 
   5 /**
   6  * This is a simple framework for a test of an Application.  See
   7  * {@link android.test.ApplicationTestCase ApplicationTestCase} for more information on
   8  * how to write and extend Application tests.
   9  * <p/>
  10  * To run this test, you can type:
  11  * adb shell am instrument -w \
  12  * -e class androidproj.test.MyProjectTest \
  13  * androidproj.test.tests/android.test.InstrumentationTestRunner
  14  */
  15 public class MyProjectTest extends ActivityInstrumentationTestCase2<MyProject> {
  16 
  17     public MyProjectTest() {
  18         super("androidproj.test", MyProject.class);
  19     }
  20 
  21 }

./src/main/AndroidManifest.xml

   1 <?xml version="1.0" encoding="utf-8"?>
   2 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
   3       package="androidproj.test"
   4       android:versionCode="1"
   5       android:versionName="1.0">
   6     <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
   7         <activity android:name="MyProject"
   8                   android:label="@string/app_name">
   9             <intent-filter>
  10                 <action android:name="android.intent.action.MAIN" />
  11                 <category android:name="android.intent.category.LAUNCHER" />
  12             </intent-filter>
  13         </activity>
  14     </application>
  15 </manifest>

./src/main/res/layout/main.xml

   1 <?xml version="1.0" encoding="utf-8"?>
   2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   3     android:orientation="vertical"
   4     android:layout_width="fill_parent"
   5     android:layout_height="fill_parent"
   6     >
   7 <TextView
   8     android:layout_width="fill_parent"
   9     android:layout_height="wrap_content"
  10     android:text="Hello World, MyProject"
  11     />
  12 </LinearLayout>

./src/main/res/values/strings.xml

   1 <?xml version="1.0" encoding="utf-8"?>
   2 <resources>
   3     <string name="app_name">MyProject</string>
   4 </resources>

./src/main/java/androidproj/test/MyProject.java

   1 package androidproj.test;
   2 
   3 import android.app.Activity;
   4 import android.os.Bundle;
   5 
   6 public class MyProject extends Activity
   7 {
   8     /** Called when the activity is first created. */
   9     @Override
  10     public void onCreate(Bundle savedInstanceState)
  11     {
  12         super.onCreate(savedInstanceState);
  13         setContentView(R.layout.main);
  14     }
  15 }

./build.gradle

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.0'
    }
}
apply plugin: 'android'

android {
    compileSdkVersion 'android-16'
    buildToolsVersion '24.0.2'

    buildTypes {
        release {
            //runProguard false
            // proguardFile getDefaultProguardFile('proguard-android.txt')
        }
    }
}

./gradle/wrapper/gradle-wrapper.properties

#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip

Vodafone 785 Slackware

  • mtp-detect #after connecting phone on usb

libmtp version: 1.1.11

Listing raw device(s)
Device 0 (VID=1bbb and PID=0168) is a Alcatel 6030a.
   Found 1 device(s):
   Alcatel: 6030a (1bbb:0168) @ bus 1, dev 7
Attempting to connect device(s)
Android device detected, assigning default bug flags
  • cd /tmp
  • wget https://slackbuilds.org/slackbuilds/13.37/multimedia/mtpfs.tar.gz

  • tar xvzf mtpfs.tar.gz
  • cd mtpfs
  • wget http://www.adebenham.com/debian/mtpfs_0.9.orig.tar.gz

  • ./mtpfs.SlackBuild

  • installpkg /tmp/mtpfs-0.9-i486-1_SBo.tgz
  • mtpfs -o allow_other /mnt/tmp/

mtp-folders
Attempting to connect device(s)
Device 0 (VID=1bbb and PID=0167) is a Alcatel/TCT 6010D/TCL S950.
mtp-folders: Successfully connected


mtp-files > /tmp/files.txt
mtp-folders > /tmp/folders.txt
  • Use Dolphin and mtp:/Vodafone 785/Armazenamento do telefone/DCIM/Camera/
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01