├── Archive
├── amd64
│ ├── git_amd64_gzip
│ └── git_amd64_zip
├── arm
│ ├── git_arm_gzip
│ └── git_arm_zip
├── arm64
│ ├── git_arm64_gzip
│ └── git_arm64_zip
├── i386
│ ├── git_i386_gzip
│ └── git_i386_zip
├── mips64el
│ ├── git_mips64el_gzip
│ └── git_mips64el_zip
└── mipsel
│ ├── git_mipsel_gzip
│ └── git_mipsel_zip
├── AxGit
├── .gitignore
├── .idea
│ ├── codeStyles
│ │ └── Project.xml
│ ├── gradle.xml
│ ├── misc.xml
│ └── runConfigurations.xml
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ ├── release
│ │ ├── app-release.apk
│ │ └── output.json
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── exa
│ │ │ └── free
│ │ │ └── ag
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── ic_launcher-web.png
│ │ ├── java
│ │ │ └── exa
│ │ │ │ └── free
│ │ │ │ ├── ag
│ │ │ │ ├── About.java
│ │ │ │ ├── AboutGit.java
│ │ │ │ ├── ApplicationAdapterListItem.java
│ │ │ │ ├── MainUI.java
│ │ │ │ ├── Method1.java
│ │ │ │ ├── Method2.java
│ │ │ │ ├── Settings.java
│ │ │ │ └── TerminalChooserAdapter.java
│ │ │ │ ├── interfaces
│ │ │ │ └── AppSelector.java
│ │ │ │ ├── security
│ │ │ │ └── PermissionVerifier.java
│ │ │ │ └── update
│ │ │ │ └── UpdateReceiver.java
│ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ ├── ic_about.png
│ │ │ ├── ic_method1.png
│ │ │ ├── ic_method2.png
│ │ │ ├── ic_settings.png
│ │ │ └── ic_support.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── ic_about.png
│ │ │ ├── ic_method1.png
│ │ │ ├── ic_method2.png
│ │ │ ├── ic_settings.png
│ │ │ └── ic_support.png
│ │ │ ├── drawable-v21
│ │ │ ├── ic_menu_camera.xml
│ │ │ ├── ic_menu_gallery.xml
│ │ │ ├── ic_menu_manage.xml
│ │ │ ├── ic_menu_send.xml
│ │ │ ├── ic_menu_share.xml
│ │ │ └── ic_menu_slideshow.xml
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable-xhdpi
│ │ │ ├── ic_about.png
│ │ │ ├── ic_method1.png
│ │ │ ├── ic_method2.png
│ │ │ ├── ic_settings.png
│ │ │ └── ic_support.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── ic_about.png
│ │ │ ├── ic_method1.png
│ │ │ ├── ic_method2.png
│ │ │ ├── ic_settings.png
│ │ │ └── ic_support.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── ic_method1.png
│ │ │ ├── ic_method2.png
│ │ │ ├── ic_settings.png
│ │ │ └── ic_support.png
│ │ │ ├── drawable
│ │ │ ├── ic_launcher_background.xml
│ │ │ └── side_nav_bar.xml
│ │ │ ├── layout-sw600dp
│ │ │ ├── about.xml
│ │ │ ├── about_git.xml
│ │ │ ├── method1.xml
│ │ │ ├── notify1.xml
│ │ │ └── progress_bar.xml
│ │ │ ├── layout-sw720dp
│ │ │ ├── about.xml
│ │ │ ├── about_git.xml
│ │ │ ├── method1.xml
│ │ │ ├── notify1.xml
│ │ │ └── progress_bar.xml
│ │ │ ├── layout
│ │ │ ├── about.xml
│ │ │ ├── about_git.xml
│ │ │ ├── app_bar.xml
│ │ │ ├── app_list.xml
│ │ │ ├── fragment_holder.xml
│ │ │ ├── main_ui.xml
│ │ │ ├── method1.xml
│ │ │ ├── method2.xml
│ │ │ ├── notify1.xml
│ │ │ ├── notify2.xml
│ │ │ ├── progress_bar.xml
│ │ │ └── settings.xml
│ │ │ ├── menu
│ │ │ └── main_ui_drawer.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── values-v21
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── exa
│ │ └── free
│ │ └── ag
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── LICENSE
└── README.md
/Archive/amd64/git_amd64_gzip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/amd64/git_amd64_gzip
--------------------------------------------------------------------------------
/Archive/amd64/git_amd64_zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/amd64/git_amd64_zip
--------------------------------------------------------------------------------
/Archive/arm/git_arm_gzip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/arm/git_arm_gzip
--------------------------------------------------------------------------------
/Archive/arm/git_arm_zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/arm/git_arm_zip
--------------------------------------------------------------------------------
/Archive/arm64/git_arm64_gzip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/arm64/git_arm64_gzip
--------------------------------------------------------------------------------
/Archive/arm64/git_arm64_zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/arm64/git_arm64_zip
--------------------------------------------------------------------------------
/Archive/i386/git_i386_gzip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/i386/git_i386_gzip
--------------------------------------------------------------------------------
/Archive/i386/git_i386_zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/i386/git_i386_zip
--------------------------------------------------------------------------------
/Archive/mips64el/git_mips64el_gzip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/mips64el/git_mips64el_gzip
--------------------------------------------------------------------------------
/Archive/mips64el/git_mips64el_zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/mips64el/git_mips64el_zip
--------------------------------------------------------------------------------
/Archive/mipsel/git_mipsel_gzip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/mipsel/git_mipsel_gzip
--------------------------------------------------------------------------------
/Archive/mipsel/git_mipsel_zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/Archive/mipsel/git_mipsel_zip
--------------------------------------------------------------------------------
/AxGit/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches/build_file_checksums.ser
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | .DS_Store
9 | /build
10 | /captures
11 | .externalNativeBuild
12 |
--------------------------------------------------------------------------------
/AxGit/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/AxGit/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
--------------------------------------------------------------------------------
/AxGit/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/AxGit/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/AxGit/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/AxGit/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 26
5 | defaultConfig {
6 | applicationId "exa.free.ag"
7 | minSdkVersion 14
8 | targetSdkVersion 26
9 | versionCode 112
10 | versionName "1.12"
11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(dir: 'libs', include: ['*.jar'])
23 | implementation 'com.android.support:appcompat-v7:26.1.0'
24 | implementation 'com.android.support:design:26.1.0'
25 | implementation 'com.android.support:cardview-v7:26.1.0'
26 | implementation 'com.google.android.gms:play-services-ads:17.1.2'
27 | testImplementation 'junit:junit:4.12'
28 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
29 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
30 | }
31 |
--------------------------------------------------------------------------------
/AxGit/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/AxGit/app/release/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/release/app-release.apk
--------------------------------------------------------------------------------
/AxGit/app/release/output.json:
--------------------------------------------------------------------------------
1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":112,"versionName":"1.12","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
--------------------------------------------------------------------------------
/AxGit/app/src/androidTest/java/exa/free/ag/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("exa.free.ag", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
8 |
9 |
16 |
19 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/ag/About.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import android.app.Fragment;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 |
9 | public class About extends Fragment {
10 |
11 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
12 | getActivity().setTitle(R.string.about);
13 | return inflater.inflate(R.layout.about, container, false);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/ag/AboutGit.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import android.app.Fragment;
4 | import android.content.Intent;
5 | import android.net.Uri;
6 | import android.os.Build;
7 | import android.os.Bundle;
8 | import android.view.LayoutInflater;
9 | import android.view.View;
10 | import android.view.ViewGroup;
11 | import android.widget.Button;
12 |
13 | public class AboutGit extends Fragment {
14 |
15 | Button button;
16 |
17 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
18 |
19 | getActivity().setTitle(R.string.about_git);
20 |
21 | View view = inflater.inflate(R.layout.about_git, container, false);
22 |
23 | button = view.findViewById(R.id.button);
24 |
25 | button.setOnClickListener(new View.OnClickListener() {
26 | @Override
27 | public void onClick(View view) {
28 | Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/EXALAB/AxGit"));
29 | if(Build.VERSION.SDK_INT >= 21){
30 | intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_NEW_DOCUMENT | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
31 | }else{
32 | intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
33 | }
34 | startActivity(intent);
35 | }
36 | });
37 |
38 | return view;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/ag/ApplicationAdapterListItem.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import android.graphics.drawable.Drawable;
4 |
5 | public class ApplicationAdapterListItem {
6 |
7 | private String name;
8 | private String packageName;
9 | private Drawable icon;
10 |
11 | public ApplicationAdapterListItem(String name, String packageName, Drawable icon) {
12 | this.packageName = packageName;
13 | this.name = name;
14 | this.icon = icon;
15 | }
16 | public String getPackageName(){
17 | return packageName;
18 | }
19 | public String getName() {
20 | return name;
21 | }
22 | public Drawable getIcon() {
23 | return icon;
24 | }
25 | }
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/ag/MainUI.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import android.app.AlertDialog;
4 | import android.app.Fragment;
5 | import android.app.FragmentTransaction;
6 | import android.content.ActivityNotFoundException;
7 | import android.content.Context;
8 | import android.content.DialogInterface;
9 | import android.content.Intent;
10 | import android.content.pm.PackageManager;
11 | import android.net.Uri;
12 | import android.os.Build;
13 | import android.os.Bundle;
14 | import android.support.annotation.NonNull;
15 | import android.view.KeyEvent;
16 | import android.support.design.widget.NavigationView;
17 | import android.support.v4.view.GravityCompat;
18 | import android.support.v4.widget.DrawerLayout;
19 | import android.support.v7.app.ActionBarDrawerToggle;
20 | import android.support.v7.app.AppCompatActivity;
21 | import android.support.v7.widget.Toolbar;
22 | import android.view.LayoutInflater;
23 | import android.view.MenuItem;
24 | import android.view.View;
25 | import android.view.ViewGroup;
26 | import android.widget.TextView;
27 | import android.widget.Toast;
28 |
29 | import com.google.android.gms.ads.AdListener;
30 | import com.google.android.gms.ads.AdRequest;
31 | import com.google.android.gms.ads.AdView;
32 | import com.google.android.gms.ads.MobileAds;
33 |
34 | public class MainUI extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
35 |
36 | Context context;
37 | private long lastPressedTime;
38 | private static final int PERIOD = 3000;
39 | NavigationView navigationView;
40 | AdView mAdView;
41 |
42 | @Override
43 | protected void onCreate(Bundle savedInstanceState) {
44 | super.onCreate(savedInstanceState);
45 | setContentView(R.layout.main_ui);
46 |
47 | context = getApplicationContext();
48 |
49 | MobileAds.initialize(this);
50 |
51 | mAdView = findViewById(R.id.adView);
52 |
53 | if(!donationInstalled()){
54 | mAdView.loadAd(new AdRequest.Builder().build());
55 | }
56 |
57 | Toolbar toolbar = findViewById(R.id.toolbar);
58 |
59 | setSupportActionBar(toolbar);
60 |
61 | DrawerLayout drawer = findViewById(R.id.drawer_layout);
62 | ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
63 | this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
64 | drawer.addDrawerListener(toggle);
65 | toggle.syncState();
66 |
67 | navigationView = findViewById(R.id.nav_view);
68 | navigationView.setNavigationItemSelectedListener(this);
69 |
70 | mAdView.setAdListener(new AdListener() {
71 | @Override
72 | public void onAdClosed() {
73 | mAdView.loadAd(new AdRequest.Builder().build());
74 | }
75 | });
76 |
77 | if(savedInstanceState == null){
78 | MenuItem selected = navigationView.getMenu().findItem(R.id.method1);
79 | selected.setCheckable(true);
80 | selected.setChecked(true);
81 | newFragment(0);
82 | }
83 | }
84 | @Override
85 | public boolean onKeyDown(int keyCode, KeyEvent event){
86 |
87 | DrawerLayout drawer = findViewById(R.id.drawer_layout);
88 |
89 | if(event.getKeyCode() == KeyEvent.KEYCODE_BACK){
90 | if(drawer.isDrawerOpen(GravityCompat.START)){
91 | switch(event.getAction()){
92 | case KeyEvent.ACTION_DOWN:
93 | if(event.getDownTime() - lastPressedTime < PERIOD){
94 | finish();
95 | }else{
96 | Toast.makeText(context, R.string.press_again_to_exit, Toast.LENGTH_SHORT).show();
97 | lastPressedTime = event.getEventTime();
98 | }
99 | return true;
100 | }
101 | }else if(!drawer.isDrawerOpen(GravityCompat.START)){
102 | drawer.openDrawer(GravityCompat.START);
103 | }
104 | }
105 | return false;
106 | }
107 | @SuppressWarnings("StatementWithEmptyBody")
108 | @Override
109 | public boolean onNavigationItemSelected(@NonNull MenuItem item) {
110 | int id = item.getItemId();
111 |
112 | if (id == R.id.method1) {
113 | MenuItem selected = navigationView.getMenu().findItem(R.id.method1);
114 | selected.setCheckable(true);
115 | selected.setChecked(true);
116 | newFragment(0);
117 | }else if(id == R.id.method2){
118 | MenuItem selected = navigationView.getMenu().findItem(R.id.method2);
119 | selected.setCheckable(true);
120 | selected.setChecked(true);
121 | newFragment(1);
122 | }else if(id == R.id.support){
123 | notifyUserForSupport();
124 | }else if(id == R.id.settings){
125 | MenuItem selected = navigationView.getMenu().findItem(R.id.settings);
126 | selected.setCheckable(true);
127 | selected.setChecked(true);
128 | newFragment(2);
129 | }else if(id == R.id.about){
130 | MenuItem selected = navigationView.getMenu().findItem(R.id.about);
131 | selected.setCheckable(true);
132 | selected.setChecked(true);
133 | newFragment(3);
134 | }else if(id == R.id.about_busybox){
135 | MenuItem selected = navigationView.getMenu().findItem(R.id.about_busybox);
136 | selected.setCheckable(true);
137 | selected.setChecked(true);
138 | newFragment(4);
139 | }
140 |
141 | DrawerLayout drawer = findViewById(R.id.drawer_layout);
142 | drawer.closeDrawer(GravityCompat.START);
143 | return true;
144 | }
145 | protected void newFragment(int position){
146 |
147 | Fragment fragment;
148 | FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
149 |
150 | switch(position){
151 |
152 | case 0:
153 | fragment = new Method1();
154 | fragmentTransaction.replace(R.id.fragmentHolder, fragment);
155 | fragmentTransaction.addToBackStack(null);
156 | fragmentTransaction.commit();
157 | break;
158 |
159 | case 1:
160 | fragment = new Method2();
161 | fragmentTransaction.replace(R.id.fragmentHolder, fragment);
162 | fragmentTransaction.addToBackStack(null);
163 | fragmentTransaction.commit();
164 | break;
165 |
166 | case 2:
167 | fragment = new Settings();
168 | fragmentTransaction.replace(R.id.fragmentHolder, fragment);
169 | fragmentTransaction.addToBackStack(null);
170 | fragmentTransaction.commit();
171 | break;
172 |
173 | case 3:
174 | fragment = new About();
175 | fragmentTransaction.replace(R.id.fragmentHolder, fragment);
176 | fragmentTransaction.addToBackStack(null);
177 | fragmentTransaction.commit();
178 | break;
179 |
180 | case 4:
181 | fragment = new AboutGit();
182 | fragmentTransaction.replace(R.id.fragmentHolder, fragment);
183 | fragmentTransaction.addToBackStack(null);
184 | fragmentTransaction.commit();
185 | break;
186 | }
187 | }
188 | public void notifyUserForSupport(){
189 | final ViewGroup nullParent = null;
190 | AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
191 | LayoutInflater layoutInflater = LayoutInflater.from(this);
192 | View view = layoutInflater.inflate(R.layout.notify1, nullParent);
193 | TextView textView = view.findViewById(R.id.textView);
194 |
195 | alertDialog.setView(view);
196 | alertDialog.setCancelable(false);
197 | alertDialog.setPositiveButton("DONATE", new DialogInterface.OnClickListener() {
198 | public void onClick(DialogInterface dialog, int which) {
199 | Uri uri = Uri.parse("market://details?id=exa.ag.d");
200 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
201 | if(Build.VERSION.SDK_INT >= 21){
202 | intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_NEW_DOCUMENT | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
203 | }
204 | try{
205 | startActivity(intent);
206 | }catch(ActivityNotFoundException e){
207 | startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=exa.ag.d")));
208 | }
209 | dialog.dismiss();
210 | }
211 | });
212 | alertDialog.setNegativeButton("NO", new DialogInterface.OnClickListener() {
213 | public void onClick(DialogInterface dialog, int which) {
214 | dialog.dismiss();
215 | }
216 | });
217 | alertDialog.setNeutralButton(R.string.no, new DialogInterface.OnClickListener() {
218 | public void onClick(DialogInterface dialog, int which) {
219 | dialog.dismiss();
220 | }
221 | });
222 | alertDialog.show();
223 | textView.setText("Thanks for using this app, do you want to support the developers?\n\nYou can choose to purchase a Donation Package on Play Store which remove the ads forever.");
224 | }
225 | private boolean donationInstalled() {
226 | PackageManager packageManager = context.getPackageManager();
227 | return packageManager.checkSignatures(context.getPackageName(), "exa.ag.d") == PackageManager.SIGNATURE_MATCH;
228 | }
229 | }
230 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/ag/Method1.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import android.app.AlertDialog;
4 | import android.app.Fragment;
5 | import android.app.ProgressDialog;
6 | import android.content.ActivityNotFoundException;
7 | import android.content.ClipData;
8 | import android.content.ClipboardManager;
9 | import android.content.Context;
10 | import android.content.DialogInterface;
11 | import android.content.Intent;
12 | import android.content.SharedPreferences;
13 | import android.content.pm.PackageManager;
14 | import android.net.Uri;
15 | import android.os.AsyncTask;
16 | import android.os.Build;
17 | import android.os.Bundle;
18 | import android.os.PowerManager;
19 | import android.support.v4.app.ActivityCompat;
20 | import android.util.Log;
21 | import android.view.LayoutInflater;
22 | import android.view.View;
23 | import android.view.ViewGroup;
24 | import android.widget.Button;
25 | import android.widget.TextView;
26 | import android.widget.Toast;
27 |
28 | import com.google.android.gms.ads.AdListener;
29 | import com.google.android.gms.ads.AdRequest;
30 | import com.google.android.gms.ads.InterstitialAd;
31 |
32 | import java.io.BufferedInputStream;
33 | import java.io.DataOutputStream;
34 | import java.io.File;
35 | import java.io.FileInputStream;
36 | import java.io.FileNotFoundException;
37 | import java.io.FileOutputStream;
38 | import java.io.IOException;
39 | import java.io.InputStream;
40 | import java.io.OutputStream;
41 | import java.net.HttpURLConnection;
42 | import java.net.URL;
43 | import java.util.zip.ZipEntry;
44 | import java.util.zip.ZipFile;
45 | import java.util.zip.ZipInputStream;
46 |
47 | import exa.free.security.PermissionVerifier;
48 |
49 | public class Method1 extends Fragment {
50 |
51 | Context context;
52 | DownloadTask downloadTask;
53 | Extract extract;
54 | PermissionVerifier permissionVerifier;
55 | SharedPreferences sharedPreferences;
56 | SharedPreferences.Editor editor;
57 | Button button;
58 | Button button2;
59 | Button button3;
60 | TextView textView2;
61 | ProgressDialog mProgressDialog;
62 | ProgressDialog mProgressDialog2;
63 | InterstitialAd mInterstitialAd;
64 | int version;
65 | String s;
66 |
67 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
68 |
69 | View view = inflater.inflate(R.layout.method1, container, false);
70 |
71 | context = getActivity().getApplicationContext();
72 |
73 | permissionVerifier = new PermissionVerifier(context);
74 |
75 | sharedPreferences = context.getSharedPreferences("GlobalPreferences", 0);
76 |
77 | editor = sharedPreferences.edit();
78 |
79 | version = sharedPreferences.getInt("Version", 0);
80 |
81 | button = view.findViewById(R.id.button);
82 | button2 = view.findViewById(R.id.button2);
83 | button3 = view.findViewById(R.id.button3);
84 | textView2 = view.findViewById(R.id.textView2);
85 |
86 | mProgressDialog = new ProgressDialog(getActivity());
87 | mProgressDialog.setMessage("Connecting...");
88 | mProgressDialog.setIndeterminate(true);
89 | mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
90 | mProgressDialog.setCancelable(false);
91 |
92 | mProgressDialog2 = new ProgressDialog(getActivity());
93 | mProgressDialog2.setMessage("Extracting...");
94 | mProgressDialog2.setIndeterminate(true);
95 | mProgressDialog2.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
96 | mProgressDialog2.setCancelable(false);
97 |
98 | if(Build.VERSION.SDK_INT >= 21){
99 | s = Build.SUPPORTED_ABIS[0];
100 | }else{
101 | s = Build.CPU_ABI;
102 | }
103 |
104 | mInterstitialAd = new InterstitialAd(context);
105 | mInterstitialAd.setAdUnitId("ca-app-pub-5748356089815497/2595876004");
106 | mInterstitialAd.loadAd(new AdRequest.Builder().build());
107 |
108 | textView2.setText("Step 2 : Copy the command to clipboard :\n\n" + "export PATH=$PATH:" + context.getFilesDir());
109 |
110 | int i = Integer.valueOf(getString(R.string.version));
111 |
112 | if(version == 0){
113 | button.setText("Install");
114 | }else if(version == i){
115 | button.setText("Reinstall");
116 | Toast.makeText(context, "Git Installed. Version : " + getString(R.string.version_string), Toast.LENGTH_LONG).show();
117 | }else if(version < i){
118 | button.setText("Update");
119 | Toast.makeText(context, "Git Installed. Version : " + getString(R.string.version_string) + " , Update available", Toast.LENGTH_LONG).show();
120 | }
121 |
122 | button.setOnClickListener(new View.OnClickListener() {
123 | @Override
124 | public void onClick(View view) {
125 | if(!donationInstalled() && mInterstitialAd != null && mInterstitialAd.isLoaded()){
126 | mInterstitialAd.show();
127 | }else{
128 | downloadTask = new DownloadTask(context);
129 | extract = new Extract(context);
130 | if(s.equals("arm64-v8a")){
131 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/arm64/git_arm64_zip");
132 | }else if (s.contains("arm")){
133 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/arm/git_arm_zip");
134 | }else if(s.equals("x86")){
135 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/i386/git_i386_zip");
136 | }else if(s.equals("x86_64")){
137 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/amd64/git_amd64_zip");
138 | }else if(s.equals("mips")){
139 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/mipsel/git_mipsel_zip");
140 | }else if(s.equals("mips64")){
141 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/mips64el/git_mips64el_zip");
142 | }else{
143 | Toast.makeText(context, "Sorry, your device is not supported !", Toast.LENGTH_LONG).show();
144 | }
145 | }
146 | }
147 | });
148 |
149 | button2.setOnClickListener(new View.OnClickListener() {
150 | @Override
151 | public void onClick(View view) {
152 | ClipboardManager clipboard = (ClipboardManager)context.getSystemService(Context.CLIPBOARD_SERVICE);
153 | ClipData clip = ClipData.newPlainText("Command", "export PATH=$PATH:" + context.getFilesDir());
154 | clipboard.setPrimaryClip(clip);
155 | }
156 | });
157 |
158 | button3.setOnClickListener(new View.OnClickListener() {
159 | @Override
160 | public void onClick(View view) {
161 | Intent intent = context.getPackageManager().getLaunchIntentForPackage("jackpal.androidterm");
162 | if(isPackageInstalled("jackpal.androidterm", context.getPackageManager())){
163 | startActivity(intent);
164 | }else{
165 | notifyUserForInstallTerminal();
166 | }
167 | }
168 | });
169 |
170 | if(!permissionVerifier.verifyApplication().equals("PASSED")){
171 | Toast.makeText(context, "Please download genuine version from play store", Toast.LENGTH_LONG).show();
172 | ActivityCompat.finishAffinity(getActivity());
173 | }
174 |
175 | mProgressDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
176 | @Override
177 | public void onCancel(DialogInterface dialog) {
178 | downloadTask.cancel(true);
179 | }
180 | });
181 | mProgressDialog2.setOnCancelListener(new DialogInterface.OnCancelListener() {
182 | @Override
183 | public void onCancel(DialogInterface dialog) {
184 | extract.cancel(true);
185 | }
186 | });
187 |
188 | mInterstitialAd.setAdListener(new AdListener() {
189 | @Override
190 | public void onAdClosed() {
191 | mInterstitialAd.loadAd(new AdRequest.Builder().build());
192 | downloadTask = new DownloadTask(context);
193 | extract = new Extract(context);
194 | if(s.equals("arm64-v8a")){
195 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/arm64/git_arm64_zip");
196 | }else if (s.contains("arm")){
197 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/arm/git_arm_zip");
198 | }else if(s.equals("x86")){
199 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/i386/git_i386_zip");
200 | }else if(s.equals("x86_64")){
201 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/amd64/git_amd64_zip");
202 | }else if(s.equals("mips")){
203 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/mipsel/git_mipsel_zip");
204 | }else if(s.equals("mips64")){
205 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/mips64el/git_mips64el_zip");
206 | }else{
207 | Toast.makeText(context, "Sorry, your device is not supported !", Toast.LENGTH_LONG).show();
208 | }
209 | }
210 | });
211 |
212 | return view;
213 | }
214 | private class DownloadTask extends AsyncTask {
215 |
216 | private Context context;
217 | private PowerManager.WakeLock mWakeLock;
218 |
219 | public DownloadTask(Context context) {
220 | this.context = context;
221 | }
222 |
223 | @Override
224 | protected void onPreExecute() {
225 | super.onPreExecute();
226 | // take CPU lock to prevent CPU from going off if the user
227 | // presses the power button during download
228 | PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
229 | mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
230 | getClass().getName());
231 | mWakeLock.acquire();
232 | mProgressDialog.show();
233 | }
234 |
235 | @Override
236 | protected void onProgressUpdate(Integer... progress) {
237 | super.onProgressUpdate(progress);
238 | // if we get here, length is known, now set indeterminate to false
239 | mProgressDialog.setMessage("Downloading...");
240 | mProgressDialog.setIndeterminate(false);
241 | mProgressDialog.setMax(100);
242 | mProgressDialog.setProgress(progress[0]);
243 | }
244 |
245 | @Override
246 | protected String doInBackground(String... sUrl) {
247 | DeleteGit();
248 | InputStream input = null;
249 | OutputStream output = null;
250 | HttpURLConnection connection = null;
251 | try {
252 | URL url = new URL(sUrl[0]);
253 | connection = (HttpURLConnection) url.openConnection();
254 | connection.connect();
255 |
256 | // expect HTTP 200 OK, so we don't mistakenly save error report
257 | // instead of the file
258 | if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
259 | return "Server returned HTTP " + connection.getResponseCode()
260 | + " " + connection.getResponseMessage();
261 | }
262 | // this will be useful to display download percentage
263 | // might be -1: server did not report the length
264 | int fileLength = connection.getContentLength();
265 |
266 | // download the file
267 | input = connection.getInputStream();
268 | output = new FileOutputStream(context.getFilesDir() + "/git.zip");
269 |
270 | byte data[] = new byte[4096];
271 | long total = 0;
272 | int count;
273 | while ((count = input.read(data)) != -1) {
274 | // allow canceling with back button
275 | if (isCancelled()) {
276 | input.close();
277 | return null;
278 | }
279 | total += count;
280 | // publishing the progress....
281 | if (fileLength > 0) // only if total length is known
282 | publishProgress((int) (total * 100 / fileLength));
283 | output.write(data, 0, count);
284 | }
285 | } catch (Exception e) {
286 | return e.toString();
287 | } finally {
288 | try {
289 | if (output != null)
290 | output.close();
291 | if (input != null)
292 | input.close();
293 | } catch (IOException ignored) {
294 | }
295 |
296 | if (connection != null)
297 | connection.disconnect();
298 | }
299 | return null;
300 | }
301 |
302 | @Override
303 | protected void onPostExecute(String result) {
304 | mWakeLock.release();
305 | if(Method1.this.isVisible()){
306 | mProgressDialog.dismiss();
307 | }
308 | if (result != null) {
309 | Toast.makeText(context, "Download error: " + result, Toast.LENGTH_LONG).show();
310 | }else {
311 | Toast.makeText(context, "Download Completed !", Toast.LENGTH_SHORT).show();
312 | editor.putInt("Version", Integer.valueOf(getString(R.string.version)));
313 | editor.apply();
314 | if(button.getText().toString().equalsIgnoreCase("INSTALL")){
315 | button.setText("REINSTALL");
316 | notifyUserForInstall();
317 | }else if(button.getText().toString().equalsIgnoreCase("UPDATE")){
318 | button.setText("REINSTALL");
319 | notifyUserForUpdate();
320 | }else if(button.getText().toString().equalsIgnoreCase("REINSTALL")){
321 | notifyUserForReinstall();
322 | }
323 | new Extract(context).execute();
324 | }
325 | }
326 | }
327 | private class Extract extends AsyncTask {
328 |
329 | private Context context;
330 | private PowerManager.WakeLock mWakeLock;
331 | private int i = 0;
332 |
333 | public Extract(Context context) {
334 | this.context = context;
335 | }
336 |
337 | @Override
338 | protected void onPreExecute() {
339 | PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
340 | mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
341 | getClass().getName());
342 | mWakeLock.acquire();
343 | mProgressDialog2.show();
344 | try {
345 | ZipFile zip = new ZipFile(context.getFilesDir() + "/git.zip");
346 | mProgressDialog2.setMax(zip.size());
347 | }catch(Exception e){
348 | Log.e("error", "Failed to read file");
349 | }
350 | }
351 | @Override
352 | protected void onProgressUpdate(Integer... progress) {
353 | super.onProgressUpdate(progress);
354 | // if we get here, length is known, now set indeterminate to false
355 | mProgressDialog2.setIndeterminate(false);
356 | mProgressDialog2.setProgress(progress[0]);
357 | }
358 |
359 | @Override
360 | protected Void doInBackground(Integer... param) {
361 | // UNZIP YOUR FILE HERE
362 | try {
363 | ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(context.getFilesDir() + "/git.zip")));
364 | ZipEntry ze;
365 | int count;
366 | byte[] buffer = new byte[8192];
367 | while ((ze = zis.getNextEntry()) != null) {
368 | File file = new File(context.getFilesDir(), ze.getName());
369 | File dir = ze.isDirectory() ? file : file.getParentFile();
370 | if (!dir.isDirectory() && !dir.mkdirs()) {
371 | throw new FileNotFoundException("Failed to ensure directory: " + dir.getAbsolutePath());
372 | }
373 | if (ze.isDirectory())
374 | continue;
375 | FileOutputStream fout = new FileOutputStream(file);
376 | try {
377 | while ((count = zis.read(buffer)) != -1) {
378 | i++;
379 | publishProgress(i);
380 | fout.write(buffer, 0, count);
381 | }
382 | } finally {
383 | fout.close();
384 | }
385 | }
386 | zis.close();
387 | }catch (Exception e){
388 | Log.e("Error", "Error while extracting.");
389 | }
390 | return null;
391 | }
392 |
393 | @Override
394 | protected void onPostExecute(Void result) {
395 | mWakeLock.release();
396 | if(Method1.this.isVisible()){
397 | mProgressDialog2.dismiss();
398 | }
399 | }
400 | }
401 | private void DeleteGit() {
402 | try {
403 | DataOutputStream os = new DataOutputStream(Runtime.getRuntime().exec("sh").getOutputStream());
404 | os.writeBytes("rm -rf " + context.getFilesDir() + "/*");
405 | os.writeBytes("exit\n");
406 | os.flush();
407 | } catch (IOException e2) {
408 | Log.e("error", "DeleteGit failed to execute");
409 | }
410 | }
411 | public void notifyUserForInstall(){
412 | final ViewGroup nullParent = null;
413 | AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());
414 | LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
415 | View view = layoutInflater.inflate(R.layout.notify1, nullParent);
416 | TextView textView = view.findViewById(R.id.textView);
417 |
418 | alertDialog.setView(view);
419 | alertDialog.setCancelable(false);
420 | alertDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
421 | public void onClick(DialogInterface dialog, int which) {
422 | dialog.dismiss();
423 | }
424 | });
425 | alertDialog.show();
426 | textView.setText("Git Installed\n\n" + "Version : " + getString(R.string.version_string));
427 | }
428 | public void notifyUserForUpdate(){
429 | final ViewGroup nullParent = null;
430 | AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());
431 | LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
432 | View view = layoutInflater.inflate(R.layout.notify1, nullParent);
433 | TextView textView = view.findViewById(R.id.textView);
434 |
435 | alertDialog.setView(view);
436 | alertDialog.setCancelable(false);
437 | alertDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
438 | public void onClick(DialogInterface dialog, int which) {
439 | dialog.dismiss();
440 | }
441 | });
442 | alertDialog.show();
443 | textView.setText("Git Updated\n\n" + "Version : " + getString(R.string.version_string));
444 | }
445 | public void notifyUserForReinstall(){
446 | final ViewGroup nullParent = null;
447 | AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());
448 | LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
449 | View view = layoutInflater.inflate(R.layout.notify1, nullParent);
450 | TextView textView = view.findViewById(R.id.textView);
451 |
452 | alertDialog.setView(view);
453 | alertDialog.setCancelable(false);
454 | alertDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
455 | public void onClick(DialogInterface dialog, int which) {
456 | dialog.dismiss();
457 | }
458 | });
459 | alertDialog.show();
460 | textView.setText("Git Reinstalled\n\n" + "Version : " + getString(R.string.version_string));
461 | }
462 | public void notifyUserForInstallTerminal(){
463 | final ViewGroup nullParent = null;
464 | AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());
465 | LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
466 | View view = layoutInflater.inflate(R.layout.notify1, nullParent);
467 | TextView textView = view.findViewById(R.id.textView);
468 |
469 | alertDialog.setView(view);
470 | alertDialog.setCancelable(false);
471 | alertDialog.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
472 | public void onClick(DialogInterface dialog, int which) {
473 | Uri uri = Uri.parse("market://details?id=jackpal.androidterm");
474 | Intent intent = new Intent(Intent.ACTION_VIEW, uri);
475 | if(Build.VERSION.SDK_INT >= 21){
476 | intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_NEW_DOCUMENT | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
477 | }else{
478 | intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
479 | }
480 | try{
481 | startActivity(intent);
482 | }catch(ActivityNotFoundException e){
483 | startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=jackpal.androidterm")));
484 | }
485 | dialog.dismiss();
486 | }
487 | });
488 | alertDialog.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
489 | public void onClick(DialogInterface dialog, int which) {
490 | dialog.dismiss();
491 | }
492 | });
493 | alertDialog.show();
494 | textView.setText("Terminal Emulator for Android is not installed, do you want to install it now ?");
495 | }
496 | private boolean isPackageInstalled(String packagename, PackageManager packageManager) {
497 | try {
498 | packageManager.getPackageInfo(packagename, 0);
499 | return true;
500 | } catch (PackageManager.NameNotFoundException e) {
501 | return false;
502 | }
503 | }
504 | private boolean donationInstalled() {
505 | PackageManager packageManager = context.getPackageManager();
506 | return packageManager.checkSignatures(context.getPackageName(), "exa.ag.d") == PackageManager.SIGNATURE_MATCH;
507 | }
508 | }
509 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/ag/Method2.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import android.app.AlertDialog;
4 | import android.app.Fragment;
5 | import android.app.ProgressDialog;
6 | import android.content.ClipData;
7 | import android.content.ClipboardManager;
8 | import android.content.Context;
9 | import android.content.Intent;
10 | import android.content.SharedPreferences;
11 | import android.content.pm.ApplicationInfo;
12 | import android.content.pm.PackageInfo;
13 | import android.content.pm.PackageItemInfo;
14 | import android.content.pm.PackageManager;
15 | import android.content.pm.ResolveInfo;
16 | import android.graphics.drawable.Drawable;
17 | import android.os.AsyncTask;
18 | import android.os.Build;
19 | import android.os.Bundle;
20 | import android.os.PowerManager;
21 | import android.util.Log;
22 | import android.view.LayoutInflater;
23 | import android.view.View;
24 | import android.view.ViewGroup;
25 | import android.widget.Button;
26 | import android.widget.ListView;
27 | import android.widget.TextView;
28 | import android.widget.Toast;
29 |
30 | import com.google.android.gms.ads.AdListener;
31 | import com.google.android.gms.ads.AdRequest;
32 | import com.google.android.gms.ads.InterstitialAd;
33 |
34 | import java.io.BufferedInputStream;
35 | import java.io.DataOutputStream;
36 | import java.io.File;
37 | import java.io.FileInputStream;
38 | import java.io.FileNotFoundException;
39 | import java.io.FileOutputStream;
40 | import java.io.IOException;
41 | import java.io.InputStream;
42 | import java.io.OutputStream;
43 | import java.net.HttpURLConnection;
44 | import java.net.URL;
45 | import java.util.ArrayList;
46 | import java.util.Collections;
47 | import java.util.Comparator;
48 | import java.util.List;
49 | import java.util.zip.ZipEntry;
50 | import java.util.zip.ZipFile;
51 | import java.util.zip.ZipInputStream;
52 |
53 | import exa.free.interfaces.AppSelector;
54 |
55 | public class Method2 extends Fragment implements AppSelector {
56 |
57 | Context context;
58 | List applicationAdapterListItems;
59 | TerminalChooserAdapter terminalChooserAdapter;
60 | DownloadTask downloadTask;
61 | SharedPreferences sharedPreferences;
62 | ListView listView;
63 | AlertDialog.Builder alertDialog;
64 | AlertDialog alert;
65 | Button button;
66 | Button button2;
67 | Button button3;
68 | Button button4;
69 | Button button5;
70 | TextView textView3;
71 | TextView textView5;
72 | ProgressDialog mProgressDialog;
73 | ProgressDialog mProgressDialog2;
74 | InterstitialAd mInterstitialAd;
75 | String s;
76 | String s2;
77 |
78 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
79 |
80 | View view = inflater.inflate(R.layout.method2, container, false);
81 |
82 | context = getActivity().getApplicationContext();
83 |
84 | sharedPreferences = context.getSharedPreferences("GlobalPreferences", 0);
85 | s = sharedPreferences.getString("ChoosenTerminal", "None");
86 |
87 | button = view.findViewById(R.id.button);
88 | button2 = view.findViewById(R.id.button2);
89 | button3 = view.findViewById(R.id.button3);
90 | button4 = view.findViewById(R.id.button4);
91 | button5 = view.findViewById(R.id.button5);
92 | textView3 = view.findViewById(R.id.textView3);
93 | textView5 = view.findViewById(R.id.textView5);
94 |
95 | mProgressDialog = new ProgressDialog(getActivity());
96 | mProgressDialog.setMessage("Connecting...");
97 | mProgressDialog.setIndeterminate(true);
98 | mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
99 | mProgressDialog.setCancelable(false);
100 |
101 | mProgressDialog2 = new ProgressDialog(getActivity());
102 | mProgressDialog2.setMessage("Extracting...");
103 | mProgressDialog2.setIndeterminate(true);
104 | mProgressDialog2.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
105 | mProgressDialog2.setCancelable(false);
106 |
107 | mInterstitialAd = new InterstitialAd(context);
108 | mInterstitialAd.setAdUnitId("ca-app-pub-5748356089815497/1385797738");
109 | mInterstitialAd.loadAd(new AdRequest.Builder().build());
110 |
111 | if(Build.VERSION.SDK_INT >= 21){
112 | s2 = Build.SUPPORTED_ABIS[0];
113 | }else{
114 | s2 = Build.CPU_ABI;
115 | }
116 |
117 | if(s.equals("None")){
118 | textView3.setText("Step 3 : Please Choose a Terminal Emulator App first");
119 | textView5.setText("Step 5 : Please Choose a Terminal Emulator App first");
120 | button3.setEnabled(false);
121 | button5.setEnabled(false);
122 | }else{
123 | if(s2.equals("arm64-v8a")){
124 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
125 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data" + s);
126 | }else if (s2.contains("arm")){
127 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
128 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
129 | }else if(s2.equals("x86")){
130 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
131 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
132 | }else if(s2.equals("x86_64")){
133 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
134 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
135 | }else if(s2.equals("mips")){
136 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
137 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
138 | }else if(s2.equals("mips64")){
139 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && chmod 755 *");
140 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
141 | }
142 | }
143 |
144 | button.setOnClickListener(new View.OnClickListener() {
145 | @Override
146 | public void onClick(View v) {
147 | downloadTask = new DownloadTask(context);
148 | if(s2.equals("arm64-v8a")){
149 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/arm64/git_arm64_zip");
150 | }else if (s2.contains("arm")){
151 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/arm/git_arm_zip");
152 | }else if(s2.equals("x86")){
153 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/i386/git_i386_zip");
154 | }else if(s2.equals("x86_64")){
155 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/amd64/git_amd64_zip");
156 | }else if(s2.equals("mips")){
157 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/mipsel/git_mipsel_zip");
158 | }else if(s2.equals("mips64")){
159 | downloadTask.execute("https://raw.githubusercontent.com/EXALAB/AxGit/master/Archive/mips64el/git_mips64el_zip");
160 | }else{
161 | Toast.makeText(context, "Sorry, your device is not supported !", Toast.LENGTH_LONG).show();
162 | }
163 | }
164 | });
165 | button2.setOnClickListener(new View.OnClickListener() {
166 | @Override
167 | public void onClick(View v) {
168 | showAppsDialog();
169 | }
170 | });
171 | button3.setOnClickListener(new View.OnClickListener() {
172 | @Override
173 | public void onClick(View v) {
174 | ClipboardManager clipboard = (ClipboardManager)context.getSystemService(Context.CLIPBOARD_SERVICE);
175 | if(!donationInstalled() && mInterstitialAd != null && mInterstitialAd.isLoaded()){
176 | mInterstitialAd.show();
177 | }else{
178 | if(s2.equals("arm64-v8a")){
179 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && chmod 755 *");
180 | clipboard.setPrimaryClip(clip);
181 | }else if (s2.contains("arm")){
182 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && chmod 755 *");
183 | clipboard.setPrimaryClip(clip);
184 | }else if(s2.equals("x86")){
185 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && chmod 755 *");
186 | clipboard.setPrimaryClip(clip);
187 | }else if(s2.equals("x86_64")){
188 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && chmod 755 *");
189 | clipboard.setPrimaryClip(clip);
190 | }else if(s2.equals("mips")){
191 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && chmod 755 *");
192 | clipboard.setPrimaryClip(clip);
193 | }else if(s2.equals("mips64")){
194 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && chmod 755 *");
195 | clipboard.setPrimaryClip(clip);
196 | }
197 | }
198 | }
199 | });
200 | button4.setOnClickListener(new View.OnClickListener() {
201 | @Override
202 | public void onClick(View v) {
203 | s = sharedPreferences.getString("ChoosenTerminal", "None");
204 | Intent intent = context.getPackageManager().getLaunchIntentForPackage(s);
205 | if(isPackageInstalled(s, context.getPackageManager())){
206 | startActivity(intent);
207 | }else{
208 | Toast.makeText(context, "Oops, looks like the application has been uninstalled or hidden, please reinstall/enable it, or choose another Terminal Emulator App", Toast.LENGTH_LONG).show();
209 | }
210 | }
211 | });
212 | button5.setOnClickListener(new View.OnClickListener() {
213 | @Override
214 | public void onClick(View v) {
215 | ClipboardManager clipboard = (ClipboardManager)context.getSystemService(Context.CLIPBOARD_SERVICE);
216 | if(s2.equals("arm64-v8a")){
217 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s);
218 | clipboard.setPrimaryClip(clip);
219 | }else if (s2.contains("arm")){
220 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s);
221 | clipboard.setPrimaryClip(clip);
222 | }else if(s2.equals("x86")){
223 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s);
224 | clipboard.setPrimaryClip(clip);
225 | }else if(s2.equals("x86_64")){
226 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s);
227 | clipboard.setPrimaryClip(clip);
228 | }else if(s2.equals("mips")){
229 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s);
230 | clipboard.setPrimaryClip(clip);
231 | }else if(s2.equals("mips64")){
232 | ClipData clip = ClipData.newPlainText("Command", "cd /data/data/" + s);
233 | clipboard.setPrimaryClip(clip);
234 | }
235 | }
236 | });
237 |
238 | mInterstitialAd.setAdListener(new AdListener() {
239 | @Override
240 | public void onAdClosed() {
241 | mInterstitialAd.loadAd(new AdRequest.Builder().build());
242 | }
243 | });
244 |
245 | return view;
246 | }
247 | @Override
248 | public void selectApp(final String packageName){
249 | SharedPreferences.Editor editor = sharedPreferences.edit();
250 | editor.putString("ChoosenTerminal", packageName);
251 | editor.apply();
252 | s = sharedPreferences.getString("ChoosenTerminal", "None");
253 | if(s2.equals("arm64-v8a")){
254 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
255 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data" + s);
256 | }else if (s2.contains("arm")){
257 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
258 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
259 | }else if(s2.equals("x86")){
260 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
261 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
262 | }else if(s2.equals("x86_64")){
263 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
264 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
265 | }else if(s2.equals("mips")){
266 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && && chmod 755 *");
267 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
268 | }else if(s2.equals("mips64")){
269 | textView3.setText("Step 3 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s + " && mv " + context.getExternalFilesDir(null) + "/* " + "/data/data/" + s + " && chmod 755 *");
270 | textView5.setText("Step 5 : Copy the command to clipboard :\n\n" + "cd /data/data/" + s);
271 | }
272 | button3.setEnabled(true);
273 | button5.setEnabled(true);
274 | alert.dismiss();
275 | }
276 | @Override
277 | public void removeApp(String packageName){
278 | }
279 | @Override
280 | public boolean isSelected(String packageName){
281 | return false;
282 | }
283 | public void showAppsDialog(){
284 | final ViewGroup nullParent = null;
285 | alertDialog = new AlertDialog.Builder(getActivity());
286 | alert = alertDialog.create();
287 | LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
288 | View view = layoutInflater.inflate(R.layout.notify2, nullParent);
289 | listView = view.findViewById(R.id.listView);
290 |
291 | alert.setView(view);
292 | alert.show();
293 | new InitializeApps().execute();
294 | }
295 | private class DownloadTask extends AsyncTask {
296 |
297 | private Context context;
298 | private PowerManager.WakeLock mWakeLock;
299 |
300 | public DownloadTask(Context context) {
301 | this.context = context;
302 | }
303 |
304 | @Override
305 | protected void onPreExecute() {
306 | super.onPreExecute();
307 | // take CPU lock to prevent CPU from going off if the user
308 | // presses the power button during download
309 | PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
310 | mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
311 | getClass().getName());
312 | mWakeLock.acquire();
313 | mProgressDialog.show();
314 | }
315 |
316 | @Override
317 | protected void onProgressUpdate(Integer... progress) {
318 | super.onProgressUpdate(progress);
319 | // if we get here, length is known, now set indeterminate to false
320 | mProgressDialog.setMessage("Downloading...");
321 | mProgressDialog.setIndeterminate(false);
322 | mProgressDialog.setMax(100);
323 | mProgressDialog.setProgress(progress[0]);
324 | }
325 |
326 | @Override
327 | protected String doInBackground(String... sUrl) {
328 | InputStream input = null;
329 | OutputStream output = null;
330 | HttpURLConnection connection = null;
331 | try {
332 | URL url = new URL(sUrl[0]);
333 | connection = (HttpURLConnection) url.openConnection();
334 | connection.connect();
335 |
336 | // expect HTTP 200 OK, so we don't mistakenly save error report
337 | // instead of the file
338 | if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
339 | return "Server returned HTTP " + connection.getResponseCode()
340 | + " " + connection.getResponseMessage();
341 | }
342 | // this will be useful to display download percentage
343 | // might be -1: server did not report the length
344 | int fileLength = connection.getContentLength();
345 |
346 | // download the file
347 | input = connection.getInputStream();
348 | output = new FileOutputStream( context.getExternalFilesDir(null) + "/git.zip");
349 |
350 | byte data[] = new byte[4096];
351 | long total = 0;
352 | int count;
353 | while ((count = input.read(data)) != -1) {
354 | // allow canceling with back button
355 | if (isCancelled()) {
356 | input.close();
357 | return null;
358 | }
359 | total += count;
360 | // publishing the progress....
361 | if (fileLength > 0) // only if total length is known
362 | publishProgress((int) (total * 100 / fileLength));
363 | output.write(data, 0, count);
364 | }
365 | } catch (Exception e) {
366 | return e.toString();
367 | } finally {
368 | try {
369 | if (output != null)
370 | output.close();
371 | if (input != null)
372 | input.close();
373 | } catch (IOException ignored) {
374 | }
375 |
376 | if (connection != null)
377 | connection.disconnect();
378 | }
379 | return null;
380 | }
381 |
382 | @Override
383 | protected void onPostExecute(String result) {
384 | mWakeLock.release();
385 | if(Method2.this.isVisible()){
386 | mProgressDialog.dismiss();
387 | }
388 | if (result != null) {
389 | Toast.makeText(context, "Download error: " + result, Toast.LENGTH_LONG).show();
390 | }else {
391 | Toast.makeText(context, "Download Completed !", Toast.LENGTH_SHORT).show();
392 | new Extract(context).execute();
393 | }
394 | }
395 | }
396 | private class Extract extends AsyncTask {
397 |
398 | private Context context;
399 | private PowerManager.WakeLock mWakeLock;
400 | private int i = 0;
401 |
402 | public Extract(Context context) {
403 | this.context = context;
404 | }
405 |
406 | @Override
407 | protected void onPreExecute() {
408 | PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
409 | mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
410 | getClass().getName());
411 | mWakeLock.acquire();
412 | mProgressDialog2.show();
413 | try {
414 | ZipFile zip = new ZipFile(context.getExternalFilesDir(null) + "/git.zip");
415 | mProgressDialog2.setMax(zip.size());
416 | }catch(Exception e){
417 | Log.e("error", "Failed to read file");
418 | }
419 | }
420 | @Override
421 | protected void onProgressUpdate(Integer... progress) {
422 | super.onProgressUpdate(progress);
423 | // if we get here, length is known, now set indeterminate to false
424 | mProgressDialog2.setIndeterminate(false);
425 | mProgressDialog2.setProgress(progress[0]);
426 | }
427 |
428 | @Override
429 | protected Void doInBackground(Integer... param) {
430 | // UNZIP YOUR FILE HERE
431 | try {
432 | ZipInputStream zis = new ZipInputStream(new BufferedInputStream(new FileInputStream(context.getExternalFilesDir(null) + "/git.zip")));
433 | ZipEntry ze;
434 | int count;
435 | byte[] buffer = new byte[8192];
436 | while ((ze = zis.getNextEntry()) != null) {
437 | File file = new File(context.getExternalFilesDir(null), ze.getName());
438 | File dir = ze.isDirectory() ? file : file.getParentFile();
439 | if (!dir.isDirectory() && !dir.mkdirs()) {
440 | throw new FileNotFoundException("Failed to ensure directory: " + dir.getAbsolutePath());
441 | }
442 | if (ze.isDirectory())
443 | continue;
444 | FileOutputStream fout = new FileOutputStream(file);
445 | try {
446 | while ((count = zis.read(buffer)) != -1) {
447 | i++;
448 | publishProgress(i);
449 | fout.write(buffer, 0, count);
450 | }
451 | } finally {
452 | fout.close();
453 | }
454 | }
455 | zis.close();
456 | DeleteGit();
457 | }catch (Exception e){
458 | Log.e("Error", "Error while extracting.");
459 | }
460 | return null;
461 | }
462 |
463 | @Override
464 | protected void onPostExecute(Void result) {
465 | mWakeLock.release();
466 | if(Method2.this.isVisible()){
467 | mProgressDialog2.dismiss();
468 | }
469 | }
470 | }
471 | private class InitializeApps extends AsyncTask {
472 | final ViewGroup nullParent = null;
473 | private AlertDialog.Builder builder;
474 | private AlertDialog alertDialog;
475 | private ProgressDialog dialog;
476 | private boolean shouldShowSystemApps;
477 |
478 | private InitializeApps() {
479 | this.builder = null;
480 | this.alertDialog = null;
481 | this.dialog = null;
482 | }
483 |
484 | protected void onPreExecute() {
485 | if(Build.VERSION.SDK_INT >= 26){
486 | this.builder = new AlertDialog.Builder(getActivity());
487 | this.alertDialog = builder.create();
488 | LayoutInflater layoutInflater = LayoutInflater.from(getActivity());
489 | View view = layoutInflater.inflate(R.layout.progress_bar, nullParent);
490 | this.alertDialog.setView(view);
491 | this.alertDialog.setCancelable(false);
492 | this.alertDialog.show();
493 | TextView textView = view.findViewById(R.id.textView);
494 | textView.setText("Working");
495 | shouldShowSystemApps = sharedPreferences.getBoolean("ShouldShowSystemApps", false);
496 | }else{
497 | this.dialog = new ProgressDialog(getActivity());
498 | this.dialog.setMessage("Working");
499 | this.dialog.setIndeterminate(true);
500 | this.dialog.setCancelable(false);
501 | this.dialog.show();
502 | }
503 | }
504 | protected Void doInBackground(Void... params) {
505 | if(shouldShowSystemApps){
506 | List applicationAdapterListItems = getAllApps();
507 | terminalChooserAdapter = new TerminalChooserAdapter(context, Method2.this, applicationAdapterListItems);
508 | }else{
509 | List applicationAdapterListItems = getUserApps();
510 | terminalChooserAdapter = new TerminalChooserAdapter(context, Method2.this, applicationAdapterListItems);
511 | }
512 | return null;
513 | }
514 | protected void onPostExecute(Void result) {
515 | if(Method2.this.isVisible()){
516 | if(Build.VERSION.SDK_INT >= 26){
517 | this.alertDialog.dismiss();
518 | }else{
519 | this.dialog.dismiss();
520 | }
521 | listView.setAdapter(terminalChooserAdapter);
522 | }
523 | }
524 | }
525 | private List getUserApps(){
526 | applicationAdapterListItems = new ArrayList<>();
527 | List packageInfos = context.getPackageManager().getInstalledPackages(0);
528 | final PackageItemInfo.DisplayNameComparator comparator = new PackageItemInfo.DisplayNameComparator(context.getPackageManager());
529 | Collections.sort(packageInfos, new Comparator() {
530 | @Override
531 | public int compare(PackageInfo one, PackageInfo two) {
532 | return comparator.compare(one.applicationInfo, two.applicationInfo);
533 | }
534 | });
535 | for(int i = 0; i < packageInfos.size(); i++){
536 | PackageInfo packageInfo = packageInfos.get(i);
537 | if(!isSystemPackage(packageInfo)){
538 | if(isApplicationExistOnLauncher(packageInfo.applicationInfo.packageName)){
539 | String appName = packageInfo.applicationInfo.loadLabel(context.getPackageManager()).toString();
540 | String packageName = packageInfo.applicationInfo.packageName;
541 | Drawable icon = packageInfo.applicationInfo.loadIcon(context.getPackageManager());
542 | applicationAdapterListItems.add(new ApplicationAdapterListItem(appName, packageName, icon));
543 | }
544 | }
545 | }
546 | return applicationAdapterListItems;
547 | }
548 | private List getAllApps(){
549 | applicationAdapterListItems = new ArrayList<>();
550 | List packageInfos = context.getPackageManager().getInstalledPackages(0);
551 | final PackageItemInfo.DisplayNameComparator comparator = new PackageItemInfo.DisplayNameComparator(context.getPackageManager());
552 | Collections.sort(packageInfos, new Comparator() {
553 | @Override
554 | public int compare(PackageInfo one, PackageInfo two) {
555 | return comparator.compare(one.applicationInfo, two.applicationInfo);
556 | }
557 | });
558 | for(int i = 0; i < packageInfos.size(); i++){
559 | PackageInfo packageInfo = packageInfos.get(i);
560 | if(isApplicationExistOnLauncher(packageInfo.applicationInfo.packageName)){
561 | String appName = packageInfo.applicationInfo.loadLabel(context.getPackageManager()).toString();
562 | String packageName = packageInfo.applicationInfo.packageName;
563 | Drawable icon = packageInfo.applicationInfo.loadIcon(context.getPackageManager());
564 | applicationAdapterListItems.add(new ApplicationAdapterListItem(appName, packageName, icon));
565 | }
566 | }
567 | return applicationAdapterListItems;
568 | }
569 | private boolean isSystemPackage(PackageInfo packageInfo) {
570 | return (packageInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
571 | }
572 | private boolean isApplicationExistOnLauncher(String packageName) {
573 | Intent intent = new Intent(Intent.ACTION_MAIN);
574 | intent.addCategory(Intent.CATEGORY_LAUNCHER);
575 | List resolveInfos = context.getPackageManager().queryIntentActivities(intent, 0);
576 | for (ResolveInfo resolveInfo : resolveInfos) {
577 | if(packageName.equals(resolveInfo.activityInfo.packageName)){
578 | return true;
579 | }
580 | }
581 | return false;
582 | }
583 | private void DeleteGit() {
584 | File file = new File(context.getExternalFilesDir(null) + "/git.zip");
585 | if(file.exists() && file.isFile()){
586 | file.delete();
587 | }
588 | }
589 | private boolean isPackageInstalled(String packagename, PackageManager packageManager) {
590 | try {
591 | packageManager.getPackageInfo(packagename, 0);
592 | return true;
593 | } catch (PackageManager.NameNotFoundException e) {
594 | return false;
595 | }
596 | }
597 | private boolean donationInstalled() {
598 | PackageManager packageManager = context.getPackageManager();
599 | return packageManager.checkSignatures(context.getPackageName(), "exa.ag.d") == PackageManager.SIGNATURE_MATCH;
600 | }
601 | }
602 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/ag/Settings.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import android.app.Fragment;
4 | import android.content.Context;
5 | import android.content.SharedPreferences;
6 | import android.os.Bundle;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.CheckBox;
11 | import android.widget.CompoundButton;
12 |
13 | public class Settings extends Fragment {
14 |
15 | Context context;
16 | SharedPreferences sharedPreferences;
17 | CheckBox checkBox;
18 | boolean shouldShowSystemApps;
19 |
20 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
21 |
22 | View view = inflater.inflate(R.layout.settings, container, false);
23 |
24 | context = getActivity().getApplicationContext();
25 | checkBox = view.findViewById(R.id.checkBox);
26 |
27 | sharedPreferences = context.getSharedPreferences("GlobalPreferences", 0);
28 | shouldShowSystemApps = sharedPreferences.getBoolean("ShouldShowSystemApps", false);
29 |
30 | if(shouldShowSystemApps){
31 | checkBox.setChecked(true);
32 | }else{
33 | checkBox.setChecked(false);
34 | }
35 |
36 | checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
37 | @Override
38 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
39 | if(isChecked){
40 | SharedPreferences.Editor editor = sharedPreferences.edit();
41 | editor.putBoolean("ShouldShowSystemApps", true);
42 | editor.apply();
43 | }else{
44 | SharedPreferences.Editor editor = sharedPreferences.edit();
45 | editor.putBoolean("ShouldShowSystemApps", false);
46 | editor.apply();
47 | }
48 | }
49 | });
50 | return view;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/ag/TerminalChooserAdapter.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.BaseAdapter;
9 | import android.widget.Button;
10 | import android.widget.ImageView;
11 | import android.widget.TextView;
12 |
13 | import java.util.List;
14 |
15 | import exa.free.interfaces.AppSelector;
16 |
17 | class TerminalChooserAdapter extends BaseAdapter{
18 |
19 | private List applicationAdapterListItems;
20 | private AppSelector appSelector;
21 |
22 | TerminalChooserAdapter(Context context, AppSelector appSelector, List applicationAdapterListItems) {
23 | this.appSelector = appSelector;
24 | this.applicationAdapterListItems = applicationAdapterListItems;
25 | }
26 |
27 | @Override
28 | public int getCount() {
29 | return applicationAdapterListItems.size();
30 | }
31 |
32 | @Override
33 | public Object getItem(int position) {
34 | return position;
35 | }
36 |
37 | @Override
38 | public long getItemId(int position) {
39 | return position;
40 | }
41 |
42 | @Override
43 | public View getView(final int position, View convertView, ViewGroup parent) {
44 |
45 | final ViewHolder listViewHolder;
46 | if (convertView == null) {
47 | listViewHolder = new ViewHolder();
48 | convertView = LayoutInflater.from(parent.getContext()).inflate(R.layout.app_list, parent, false);
49 | } else {
50 | listViewHolder = (ViewHolder) convertView.getTag();
51 | }
52 | listViewHolder.textView = convertView.findViewById(R.id.textView);
53 | listViewHolder.textView2 = convertView.findViewById(R.id.textView2);
54 | listViewHolder.imageView = convertView.findViewById(R.id.imageView);
55 | listViewHolder.button = convertView.findViewById(R.id.button);
56 | convertView.setTag(listViewHolder);
57 |
58 | listViewHolder.button.setOnClickListener(new View.OnClickListener() {
59 | @Override
60 | public void onClick(View v) {
61 | appSelector.selectApp(applicationAdapterListItems.get(position).getPackageName());
62 | notifyDataSetChanged();
63 | }
64 | });
65 |
66 | listViewHolder.textView.setText(applicationAdapterListItems.get(position).getName());
67 | listViewHolder.textView2.setText(applicationAdapterListItems.get(position).getPackageName());
68 | listViewHolder.imageView.setImageDrawable(applicationAdapterListItems.get(position).getIcon());
69 |
70 | return convertView;
71 | }
72 | private static class ViewHolder {
73 | private TextView textView;
74 | private TextView textView2;
75 | private ImageView imageView;
76 | private Button button;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/interfaces/AppSelector.java:
--------------------------------------------------------------------------------
1 | package exa.free.interfaces;
2 |
3 | public interface AppSelector {
4 | void selectApp(String packageName);
5 | void removeApp(String packageName);
6 | boolean isSelected(String packageName);
7 | }
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/security/PermissionVerifier.java:
--------------------------------------------------------------------------------
1 | package exa.free.security;
2 |
3 | import android.Manifest;
4 | import android.content.Context;
5 | import android.content.pm.PackageManager;
6 | import android.support.v4.content.ContextCompat;
7 |
8 | public class PermissionVerifier {
9 |
10 | private static final String[] PERMISSIONS = new String[]{
11 | Manifest.permission.INTERNET,
12 | Manifest.permission.ACCESS_NETWORK_STATE
13 | };
14 |
15 | private Context mContext;
16 |
17 | public PermissionVerifier(Context context) {
18 | mContext = context.getApplicationContext();
19 | }
20 |
21 | public String verifyApplication(){
22 |
23 | if(lacksPermissions(PERMISSIONS)){
24 | return "APPLICATION_MODIFIED";
25 | }else{
26 | return "PASSED";
27 | }
28 | }
29 | private boolean lacksPermissions(String... permissions) {
30 | for (String permission : permissions) {
31 | if(lacksPermission(permission)){
32 | return true;
33 | }
34 | }
35 | return false;
36 | }
37 | private boolean lacksPermission(String permission) {
38 | return ContextCompat.checkSelfPermission(mContext, permission) ==
39 | PackageManager.PERMISSION_DENIED;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/java/exa/free/update/UpdateReceiver.java:
--------------------------------------------------------------------------------
1 | package exa.free.update;
2 |
3 | import android.app.Notification;
4 | import android.app.NotificationManager;
5 | import android.app.PendingIntent;
6 | import android.content.BroadcastReceiver;
7 | import android.content.Context;
8 | import android.content.Intent;
9 | import android.os.Build;
10 | import android.support.v4.app.NotificationCompat;
11 |
12 | import exa.free.ag.MainUI;
13 | import exa.free.ag.R;
14 |
15 | public class UpdateReceiver extends BroadcastReceiver {
16 |
17 | @Override
18 | public void onReceive(Context context, Intent intent){
19 |
20 | int i = context.getSharedPreferences("GlobalPreferences", 0).getInt("Version", 0);
21 | int i2 = Integer.valueOf(context.getString(R.string.version));
22 |
23 | if(i != 0 && i < i2){
24 |
25 | if(Build.VERSION.SDK_INT >= 16){
26 | Intent mIntent = new Intent(context, MainUI.class);
27 |
28 | PendingIntent pendingIntent = PendingIntent.getActivity(context, 1232129, mIntent, PendingIntent.FLAG_UPDATE_CURRENT);
29 |
30 | Notification.Builder builder = new Notification.Builder(context)
31 | .setSmallIcon(R.mipmap.ic_launcher)
32 | .setContentTitle("New Busybox Binary Available")
33 | .setContentText("Tap here to update")
34 | .setContentIntent(pendingIntent)
35 | .setAutoCancel(true);
36 |
37 | builder.build().flags |= Notification.FLAG_AUTO_CANCEL;
38 |
39 | NotificationManager notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
40 |
41 | notificationManager.notify(1282129, builder.build());
42 | }else{
43 | Intent mIntent = new Intent(context, MainUI.class);
44 |
45 | PendingIntent pendingIntent = PendingIntent.getActivity(context, 1232129, mIntent, PendingIntent.FLAG_UPDATE_CURRENT);
46 |
47 | NotificationCompat.Builder builder = new NotificationCompat.Builder(context)
48 | .setSmallIcon(R.mipmap.ic_launcher)
49 | .setContentTitle("New Busybox Binary Available")
50 | .setContentText("Tap here to update")
51 | .setContentIntent(pendingIntent)
52 | .setAutoCancel(true);
53 |
54 | builder.build().flags |= Notification.FLAG_AUTO_CANCEL;
55 |
56 | NotificationManager notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
57 |
58 | notificationManager.notify(1282129, builder.build());
59 | }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-hdpi/ic_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-hdpi/ic_about.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-hdpi/ic_method1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-hdpi/ic_method1.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-hdpi/ic_method2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-hdpi/ic_method2.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-hdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-hdpi/ic_settings.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-hdpi/ic_support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-hdpi/ic_support.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-mdpi/ic_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-mdpi/ic_about.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-mdpi/ic_method1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-mdpi/ic_method1.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-mdpi/ic_method2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-mdpi/ic_method2.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-mdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-mdpi/ic_settings.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-mdpi/ic_support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-mdpi/ic_support.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-v21/ic_menu_camera.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-v21/ic_menu_gallery.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-v21/ic_menu_manage.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-v21/ic_menu_send.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-v21/ic_menu_share.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-v21/ic_menu_slideshow.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xhdpi/ic_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xhdpi/ic_about.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xhdpi/ic_method1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xhdpi/ic_method1.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xhdpi/ic_method2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xhdpi/ic_method2.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xhdpi/ic_settings.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xhdpi/ic_support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xhdpi/ic_support.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xxhdpi/ic_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xxhdpi/ic_about.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xxhdpi/ic_method1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xxhdpi/ic_method1.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xxhdpi/ic_method2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xxhdpi/ic_method2.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xxhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xxhdpi/ic_settings.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xxhdpi/ic_support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xxhdpi/ic_support.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xxxhdpi/ic_method1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xxxhdpi/ic_method1.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xxxhdpi/ic_method2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xxxhdpi/ic_method2.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xxxhdpi/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xxxhdpi/ic_settings.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable-xxxhdpi/ic_support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/drawable-xxxhdpi/ic_support.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/drawable/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
3 |
9 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw600dp/about.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
27 |
28 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw600dp/about_git.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
23 |
24 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw600dp/method1.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
16 |
17 |
26 |
27 |
36 |
37 |
47 |
48 |
58 |
59 |
69 |
70 |
78 |
79 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw600dp/notify1.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw600dp/progress_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
23 |
24 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw720dp/about.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
27 |
28 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw720dp/about_git.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
23 |
24 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw720dp/method1.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
16 |
17 |
26 |
27 |
36 |
37 |
47 |
48 |
58 |
59 |
69 |
70 |
78 |
79 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw720dp/notify1.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout-sw720dp/progress_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
23 |
24 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/about.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
20 |
21 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/about_git.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
16 |
17 |
29 |
30 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/app_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/app_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
24 |
25 |
41 |
42 |
58 |
59 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/fragment_holder.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/main_ui.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
24 |
25 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/method1.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
14 |
15 |
23 |
24 |
31 |
32 |
40 |
41 |
50 |
51 |
60 |
61 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/method2.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
14 |
15 |
23 |
24 |
31 |
32 |
41 |
42 |
51 |
52 |
60 |
61 |
70 |
71 |
80 |
81 |
90 |
91 |
99 |
100 |
109 |
110 |
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/notify1.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/notify2.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/progress_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
23 |
24 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/layout/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/menu/main_ui_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
42 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 8dp
6 | 176dp
7 | 16dp
8 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AxGit
3 | 2201
4 | 2.20.1
5 | Open navigation drawer
6 | Close navigation drawer
7 | Method 1
8 | Method 2
9 | About
10 | Others
11 | About Git
12 | Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.\n\nGit is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers around the net.\n\n\n\nTo be clear, we EXA LAB are not author of Git, we only compile the binary statically with cross compiler without any modification to source.\n\nYou can find the component, and the source code of this app by clicking the button below, clicking the button will open a url in the browser which will be redirect to your requested content.
13 | Please press again to exit application
14 | Yes
15 | No
16 | OK
17 | Support
18 | Git Version : 2.20.1\n\nAxGit is an app designed to bring git access to Android devices.\n\nThanks for using this apps.\n\n\nRegards, EXA Lab
19 | Note: Please scroll down to see all steps if your device screen is small.\n\nMethod 1 is recommended because not only easy to update, also make all terminal accessible to Git. But if method 1 is not working, please try using method 2 instead.\n\nStep 1 : Click on the button to install Git
20 | Step 2 : Copy the command to clipboard : \n\nexport PATH=/data/data/exa.free.ag/files/:$PATH
21 | Launch terminal, paste and enter the command and you can run Git command. You must paste and enter the command every time you restart the terminal.
22 | Note: Please scroll down to see all steps if your device screen is small.\n\nStep 1 : Click on the button to Download Git
23 | Step 2 : Please choose a Terminal Emulator App.
24 | Step 4: Launch terminal, paste and enter the command to install Git. You can then run Git with ./git command, you could also run ls to see all available git command.\n\nIMPORTANT: You must paste and enter the command IN STEP 5 next time after you restart the terminal.
25 | Installing
26 | Updating
27 | Reinstalling
28 | Settings
29 |
30 |
--------------------------------------------------------------------------------
/AxGit/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/AxGit/app/src/test/java/exa/free/ag/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package exa.free.ag;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/AxGit/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.2.0'
11 |
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/AxGit/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 |
15 |
--------------------------------------------------------------------------------
/AxGit/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EXALAB/AxGit/857e1af23c4281a80e1eae11e778ee6d272a3441/AxGit/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/AxGit/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/AxGit/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/AxGit/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/AxGit/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This is repo for the main application. If you are looking for the component used in this app, please visit [git-static](https://github.com/EXALAB/git-static) and [git-lfs-static](https://github.com/EXALAB/git-static)
2 |
3 | # AxGit
4 | Most complete Git CLI client for Android, including [Git LFS (Large File System)](https://git-lfs.github.com) Support
5 |
6 |
7 |
8 | Or
9 |
10 | [
](https://github.com/EXALAB/AxGit/releases/latest)
11 |
12 | if you don't have access to Play Store.
13 |
14 |
15 |
16 | ## How it works
17 |
18 | We compile the git and git-lfs binary statically using chroot environment in qemu, which allow it to run on Android without compatibility issue, for more details about how it compiled, please visit [git-static](https://github.com/EXALAB/git-static) and [git-lfs-static](https://github.com/EXALAB/git-static).
19 |
20 |
21 | ## Features:
22 |
23 | Include all Git CLI Feature, such as:
24 |
25 | clone
26 | commit
27 | checkout
28 | push
29 | merge
30 | branch
31 | add
32 | apply
33 | annotate
34 | submodule
35 | svn
36 | and too much to specify here...
37 |
38 | Git LFS (Large File System) Support, a feature allow to upload file up to 100mb to your repo, this feature does not available for mips devices due to a bug.
39 |
40 |
41 | Note :
42 |
43 | 1. This app required a Terminal Emulator to work, it could be install on Play Store.
44 |
45 | 2. Supported architecture: All Android device architecture
46 |
47 | 3. LFS (Large File System) not working on mips device.
48 |
49 | 4. For any suggestion or issue, please open an issue on Github, or email us.
50 |
51 |
52 | ## Special Thanks
53 |
54 | [QEMU](https://www.qemu.org)
55 |
--------------------------------------------------------------------------------