├── settings.gradle
├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── ic_grarak.jpg
│ │ │ │ ├── ic_ikar0s.png
│ │ │ │ ├── ic_mikesew.jpg
│ │ │ │ ├── ic_osm0sis.png
│ │ │ │ ├── ic_tom4tot.png
│ │ │ │ ├── ic_andrey167.png
│ │ │ │ ├── ic_dangles3.png
│ │ │ │ ├── ic_jason5545.jpg
│ │ │ │ ├── ic_lennoard.webp
│ │ │ │ ├── ic_topjohnwu.png
│ │ │ │ ├── ic_donation_app.png
│ │ │ │ ├── ic_fiestalake.webp
│ │ │ │ ├── ic_tsiflimagas.png
│ │ │ │ ├── ic_flash.xml
│ │ │ │ ├── ic_back.xml
│ │ │ │ ├── ic_img.xml
│ │ │ │ ├── ic_info.xml
│ │ │ │ ├── ic_backup.xml
│ │ │ │ ├── ic_dots.xml
│ │ │ │ ├── ic_save.xml
│ │ │ │ ├── ic_eye.xml
│ │ │ │ ├── ic_support.xml
│ │ │ │ ├── ic_settings.xml
│ │ │ │ ├── ic_share.xml
│ │ │ │ ├── ic_donate.xml
│ │ │ │ ├── ic_contributors.xml
│ │ │ │ ├── ic_coffee.xml
│ │ │ │ ├── ic_github.xml
│ │ │ │ └── ic_dinner.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── values
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── layout
│ │ │ │ ├── fragment_credits.xml
│ │ │ │ ├── progress_view_layout.xml
│ │ │ │ ├── recycle_view_flasher.xml
│ │ │ │ ├── recycle_view_backup.xml
│ │ │ │ ├── activity_credits.xml
│ │ │ │ ├── recycle_view_donate.xml
│ │ │ │ ├── recycle_view_credits.xml
│ │ │ │ ├── recycle_view_about.xml
│ │ │ │ ├── fragment_about.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── fragment_backup.xml
│ │ │ │ ├── activity_billing.xml
│ │ │ │ ├── activity_noroot.xml
│ │ │ │ ├── activity_logview.xml
│ │ │ │ ├── activity_changelog.xml
│ │ │ │ └── activity_flashing.xml
│ │ │ ├── values-it
│ │ │ │ └── strings.xml
│ │ │ ├── values-fr
│ │ │ │ └── strings.xml
│ │ │ ├── values-zh-rCN
│ │ │ │ └── strings.xml
│ │ │ ├── values-ru
│ │ │ │ └── strings.xml
│ │ │ ├── values-ko
│ │ │ │ └── strings.xml
│ │ │ ├── values-am
│ │ │ │ └── strings.xml
│ │ │ ├── values-el
│ │ │ │ └── strings.xml
│ │ │ └── values-zh-rTW
│ │ │ │ └── strings.xml
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── smartpack
│ │ │ │ └── smartflasher
│ │ │ │ ├── activities
│ │ │ │ ├── NoRootActivity.java
│ │ │ │ ├── CreditsActivity.java
│ │ │ │ ├── LogViewActivity.java
│ │ │ │ ├── ChangeLogActivity.java
│ │ │ │ ├── FlashingActivity.java
│ │ │ │ └── UpdateChannelActivity.java
│ │ │ │ ├── utils
│ │ │ │ ├── RecycleViewItem.java
│ │ │ │ ├── PagerAdapter.java
│ │ │ │ ├── KernelUpdater.java
│ │ │ │ ├── Backup.java
│ │ │ │ └── Flasher.java
│ │ │ │ └── fragments
│ │ │ │ ├── CreditsFragment.java
│ │ │ │ └── AboutFragment.java
│ │ └── assets
│ │ │ └── version.json
│ ├── play
│ │ ├── AndroidManifest.xml
│ │ ├── res
│ │ │ ├── values-zh-rCN
│ │ │ │ └── strings.xml
│ │ │ ├── values-zh-rTW
│ │ │ │ └── strings.xml
│ │ │ ├── values-fr
│ │ │ │ └── strings.xml
│ │ │ ├── values-it
│ │ │ │ └── strings.xml
│ │ │ ├── values-ru
│ │ │ │ └── strings.xml
│ │ │ ├── values
│ │ │ │ └── strings.xml
│ │ │ ├── values-am
│ │ │ │ └── strings.xml
│ │ │ ├── drawable
│ │ │ │ └── ic_app_store.xml
│ │ │ ├── values-ko
│ │ │ │ └── strings.xml
│ │ │ ├── values-pt-rBR
│ │ │ │ └── strings.xml
│ │ │ └── values-el
│ │ │ │ └── strings.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── smartpack
│ │ │ └── smartflasher
│ │ │ └── utils
│ │ │ └── Flavour.java
│ └── fdroid
│ │ ├── res
│ │ ├── values-fr
│ │ │ └── strings.xml
│ │ ├── values-it
│ │ │ └── strings.xml
│ │ ├── values-ru
│ │ │ └── strings.xml
│ │ ├── values-am
│ │ │ └── strings.xml
│ │ ├── values-ko
│ │ │ └── strings.xml
│ │ ├── values
│ │ │ └── strings.xml
│ │ ├── values-pt-rBR
│ │ │ └── strings.xml
│ │ └── values-el
│ │ │ └── strings.xml
│ │ └── java
│ │ └── com
│ │ └── smartpack
│ │ └── smartflasher
│ │ └── utils
│ │ └── Flavour.java
├── proguard-rules.pro
└── build.gradle
├── .gitignore
├── fastlane
└── metadata
│ └── android
│ └── en-US
│ ├── short_description.txt
│ ├── images
│ ├── icon.png
│ └── phoneScreenshots
│ │ ├── 1.png
│ │ ├── 2.png
│ │ ├── 3.png
│ │ ├── 4.png
│ │ ├── 5.png
│ │ ├── 6.png
│ │ └── 7.png
│ ├── changelogs
│ └── 45.txt
│ └── full_description.txt
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .github
└── FUNDING.yml
├── gradle.properties
├── gradlew.bat
├── README.md
└── gradlew
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name = "Smart Flasher"
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /release
3 | /src/main/gen
4 | /play
5 | *.jks
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | *.properties
4 | .DS_Store
5 | /build
6 | /captures
7 | .idea
8 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | A simple tool to make flashing recovery zips much easier!
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_grarak.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_grarak.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_ikar0s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_ikar0s.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_mikesew.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_mikesew.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_osm0sis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_osm0sis.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_tom4tot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_tom4tot.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_andrey167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_andrey167.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dangles3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_dangles3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_jason5545.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_jason5545.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_lennoard.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_lennoard.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_topjohnwu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_topjohnwu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_donation_app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_donation_app.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_fiestalake.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_fiestalake.webp
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_tsiflimagas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/drawable/ic_tsiflimagas.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/fastlane/metadata/android/en-US/images/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/45.txt:
--------------------------------------------------------------------------------
1 | * Final update + depreciation notice.
2 | * Updated Portuguese (Brazilian) translations.
3 | * Miscellaneous changes.
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SmartPack/SmartFlasher/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/7.png
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #000000
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #000000
4 | #4285f4
5 | #FFFFFF
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Apr 17 08:52:20 CEST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
7 |
--------------------------------------------------------------------------------
/app/src/play/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/play/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Play 商店
5 | 訪問 Play 商店中的 Smart Flasher 页面
6 |
--------------------------------------------------------------------------------
/app/src/play/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Play 商店
5 | 造訪 Play 商店中的 Smart Flasher 頁面
6 |
--------------------------------------------------------------------------------
/app/src/fdroid/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | F-Droid
5 | Visiter la page Smart Flasher sur le F-Droid
6 |
--------------------------------------------------------------------------------
/app/src/fdroid/res/values-it/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | F-Droid
5 | Visita la pagina Smart Flasher sul F-Droid
6 |
7 |
--------------------------------------------------------------------------------
/app/src/play/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | PlayStore
5 | Visiter la page Smart Flasher sur le PlayStore
6 |
--------------------------------------------------------------------------------
/app/src/play/res/values-it/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Play Store
5 | Visita la pagina Smart Flasher sul PlayStore
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_flash.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_back.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/fdroid/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Посетить страницу Smart Flasher в F-Droid
5 | Загрузите смарт-флешер %s из F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_img.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_info.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/play/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Посетить страницу Smart Flasher в PlayStore
5 | Загрузите смарт-флешер %s из PlayStore: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_backup.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/fdroid/res/values-am/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ስማርት ፍላሸርን አግኝ %s ከ F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
5 | የከርነል ማሳደጊያ ቻናሉን ለማዋቀር በቀላሉ \'%s\' በ ስማርት ፍላሸር -> የማሳደጊያ ቻናል Url.\n\nስማርት ፍላሸርን F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dots.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_save.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/fdroid/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Smart Flasher %s은(는) 아래에서 다운받을 수 있습니다 F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
5 | 이 업데이트 채널을 구성하려면, \'%s\' 을(를) Smart Flasher에 입력하고 -> 채널 URL을 업데이트하세요.\n\nSmart Flasher을 아래에서 다운받으세요 F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_eye.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_credits.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_support.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/app/src/fdroid/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | F-Droid
4 | Visit Smart Flasher page on F-Droid
5 | Get Smart Flasher %s from F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
6 | To configure this update channel, simply input \'%s\' on SmartFlasher -> Update Channel Url.\n\nGet Smart Flasher from F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
7 |
--------------------------------------------------------------------------------
/app/src/play/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | PlayStore
4 | Visit Smart Flasher page on PlayStore
5 | Get Smart Flasher %s from PlayStore: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
6 | To configure this update channel, simply input \'%s\' on SmartFlasher -> Update Channel Url.\n\nGet Smart Flasher from PlayStore: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
7 |
--------------------------------------------------------------------------------
/app/src/play/res/values-am/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ፕሌይስቶር
5 | የስማርት ፍላሸርን የጎግል ፕሌይስቶር ገፅ ይጎብኙ።
6 | ስማርት ፍላሸርን አግኝ %s ከ ፕሌይስቶር: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
7 | የከርነል ማሳደጊያ ቻናሉን ለማዋቀር በቀላሉ \'%s\' በ ስማርት ፍላሸር -> የማሳደጊያ ቻናል Url.\n\nስማርት ፍላሸርን ከ ፕሌይስቶር: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_settings.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/play/res/drawable/ic_app_store.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/play/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 플레이 스토어
5 | 플레이 스토어에 있는 Smart Flasher 페이지를 방문하세요.
6 | Smart Flasher %s은(는) 아래에서 다운받을 수 있습니다 플레이 스토어: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
7 | 이 업데이트 채널을 구성하려면, \'%s\' 을(를) Smart Flasher에 입력하고 -> 채널 URL을 업데이트하세요.\n\nSmart Flasher을 아래에서 다운받으세요 플레이 스토어: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
8 |
--------------------------------------------------------------------------------
/app/src/fdroid/res/values-pt-rBR/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | F-Droid
5 | Visite a página do Smart Flasher na F-Droid
6 | Baixe o Smart Flasher %s na F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
7 | Para configurar esse canal de atualização, basta digitar \'%s\' em SmartFlasher ->URL do Canal de Atualizações.\n\nBaixe o Smart Flasher na F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
8 |
9 |
--------------------------------------------------------------------------------
/app/src/fdroid/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | F-Droid
5 | Επισκεφθείτε τη σελίδα του Smart Flasher στο F-Droid
6 | Αποκτήστε το Smart Flasher %s από F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
7 | Για να ρυθμίσετε αυτό το κανάλι ενημέρωσης, απλώς εισάγετε \'%s\' στο SmartFlasher -> Κανάλι Ενημέρωσης Url.\n\nΑποκτήστε το Smart Flasher από F-Droid: https://f-droid.org/packages/com.smartpack.smartflasher/
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_share.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/play/res/values-pt-rBR/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | PlayStore
5 | Visite a página do Smart Flasher na PlayStore
6 | Baixe o Smart Flasher %s na PlayStore: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
7 | Para configurar esse canal de atualização, basta digitar \'%s\' em SmartFlasher ->URL do Canal de Atualizações.\n\nBaixe o Smart Flasher na PlayStore: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
8 |
9 |
--------------------------------------------------------------------------------
/app/src/play/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | PlayStore
5 | Επισκεφθείτε τη σελίδα του Smart Flasher στο PlayStore
6 | Αποκτήστε το Smart Flasher %s από PlayStore: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
7 | Για να ρυθμίσετε αυτό το κανάλι ενημέρωσης, απλώς εισάγετε \'%s\' στο SmartFlasher -> Κανάλι Ενημέρωσης Url.\n\nΑποκτήστε το Smart Flasher από PlayStore: https://play.google.com/store/apps/details?id=com.smartpack.smartflasher
8 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: ['https://www.paypal.me/menacherry', 'https://play.google.com/store/apps/details?id=com.smartpack.donate']
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_donate.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_contributors.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/progress_view_layout.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
14 |
15 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/recycle_view_flasher.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
17 |
18 |
25 |
--------------------------------------------------------------------------------
/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=-Xmx2048m
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 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/full_description.txt:
--------------------------------------------------------------------------------
1 | Smart Flasher is a simple tool mainly aimed to make flashing recovery zips much easier.
2 | Important Notice: The development of this project is abandoned.
3 |
4 | WARNING: I Am NOT Responsible for any Damages on Your Device!
5 |
6 | This app requires ROOT Access.
7 |
8 | Features
9 |
10 | Smart Flasher is a simple and very basic app, with a elegant dark/light UI (depends on system theme), which can do the following things
11 | * Flashing recovery zip files (such as a custom kernel, a magisk module, etc.) while running Android OS, without rebooting into custom recovery.
12 | * Show a recovery-like flashing log in real-time.
13 | * Download and auto-flash various custom kernels directly from app (Documentation).
14 | * Help kernel developers to create own up-date channel within the app.
15 | * Back-up boot/recovery partitions on a supported device.
16 | * Flash a boot/recovery partition '.img' on a supported device.
17 | * Do basic tasks such as Turning off & Rebooting (Normal, Recovery & Boot-loader) your device.
18 | * A lot more.
--------------------------------------------------------------------------------
/app/src/main/res/layout/recycle_view_backup.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
16 |
17 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_credits.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
21 |
22 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/recycle_view_donate.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
14 |
15 |
21 |
22 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
9 |
10 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/res/values-it/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Info
5 | Annulla
6 | Change-logs
7 | Visualizza Change-logs
8 | Crediti
9 | Nota bene: Per motivi di sicurezza, i file di dimensioni superiori a 100 non possono essere flashati.
10 | Flasher
11 | Clicca il pulsante per selezionare e flashare il file zip senza riavviare nella modalità recovery. Le modifiche verranno applicate dopo il riavvio.
12 | Flashando
13 | Kernel
14 | OK
15 | Permesso per scrivere sull\'archivio negato!
16 | Donation App
17 | Riavvia
18 | Riavvia in Bootloader
19 | Riavvia in Recovery
20 | Codice Sorgente
21 | Visualizza codice sorgente su GitHub
22 | Supporto
23 | Visita la pagina di supporto su xda-developers.com
24 | Sei sicuro?
25 | Versionw
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | À propos
5 | Annuler
6 | Nouveautés
7 | Afficher les nouveautés
8 | Crédits
9 | Notez que pour des raisons de sécurité, les fichiers de plus de 100 Mo ne pourront être flashés.
10 | Flasher
11 | Cliquer sur le bouton Flash pour sélectionner et flasher un fichier ZIP, pouvant être flashé dans un recovery, sans redémarrer dans le recovery.
12 | Flash en cours
13 | Kernel
14 | OK
15 | Accès au stockage de l\'appareil refusé !
16 | Donation App
17 | Redémarrer
18 | Redémarrer dans le Bootloader
19 | Redémarrer dans le Recovery
20 | Code source
21 | Voir le code source sur GitHub
22 | Assistance
23 | Visiter la page d\'assistance sur xda-developers.com
24 | Êtes-vous sûr ?
25 | Version
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/recycle_view_credits.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
15 |
16 |
25 |
26 |
33 |
34 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/recycle_view_about.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
16 |
17 |
26 |
27 |
34 |
35 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
18 |
19 |
23 |
24 |
35 |
36 |
37 |
41 |
42 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 |
5 | signingConfigs {
6 | release {
7 | storeFile file("sp.jks")
8 | storePassword "smartpack"
9 | keyAlias "sp_key1"
10 | keyPassword "smartpack"
11 | }
12 | }
13 |
14 | compileSdkVersion 30
15 | buildToolsVersion "30.0.3"
16 |
17 | defaultConfig {
18 | applicationId "com.smartpack.smartflasher"
19 | minSdkVersion 23
20 | targetSdkVersion 30
21 | versionCode 45
22 | versionName "v5.4"
23 | vectorDrawables.useSupportLibrary = true
24 | archivesBaseName = "$applicationId-v$versionName"
25 | signingConfig signingConfigs.release
26 | testFunctionalTest = false
27 | testHandleProfiling = false
28 | }
29 |
30 | buildTypes {
31 | release {
32 | signingConfig signingConfigs.release
33 | minifyEnabled true
34 | shrinkResources true
35 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
36 | }
37 | }
38 |
39 | flavorDimensions "release"
40 | productFlavors {
41 | play {
42 | dimension "release"
43 | }
44 | fdroid {
45 | dimension "release"
46 | }
47 | }
48 |
49 | lintOptions {
50 | abortOnError false
51 | }
52 | compileOptions {
53 | sourceCompatibility JavaVersion.VERSION_1_8
54 | targetCompatibility JavaVersion.VERSION_1_8
55 | }
56 | }
57 |
58 | repositories {
59 | maven { url "https://jitpack.io" }
60 | }
61 |
62 | dependencies {
63 | playImplementation 'com.android.billingclient:billing:4.0.0'
64 | implementation 'com.github.sunilpaulmathew:RootFilePicker:v0.5'
65 | implementation "com.github.topjohnwu.libsu:core:3.1.2"
66 | implementation 'com.google.android.material:material:1.4.0-rc01'
67 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_coffee.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/fdroid/java/com/smartpack/smartflasher/utils/Flavour.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021-2022 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.utils;
22 |
23 | import android.annotation.SuppressLint;
24 | import android.app.Activity;
25 | import android.content.Context;
26 |
27 | import com.smartpack.smartflasher.R;
28 |
29 | import java.util.ArrayList;
30 |
31 | /*
32 | * Created by sunilpaulmathew on January 21, 2021
33 | */
34 | public class Flavour {
35 |
36 | public static void showDonateOption(Activity activity) {
37 | Utils.launchUrl("https://smartpack.github.io/donation/", activity);
38 | }
39 |
40 | @SuppressLint("UseCompatLoadingForDrawables")
41 | public static void launchAppStore(ArrayList mData, Context context) {
42 | mData.add(new RecycleViewItem(context.getString(R.string.app_store), context.getString(R.string.app_store_summary),
43 | context.getResources().getDrawable(R.drawable.ic_app_store), "https://f-droid.org/packages/com.smartpack.smartflasher/"));
44 | }
45 |
46 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/activities/NoRootActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.activities;
22 |
23 | import android.os.Bundle;
24 |
25 | import androidx.annotation.Nullable;
26 | import androidx.appcompat.app.AppCompatActivity;
27 | import androidx.appcompat.widget.AppCompatImageButton;
28 |
29 | import com.google.android.material.textview.MaterialTextView;
30 | import com.smartpack.smartflasher.R;
31 |
32 | /*
33 | * Created by sunilpaulmathew on September 16, 2020
34 | */
35 |
36 | public class NoRootActivity extends AppCompatActivity {
37 |
38 | @Override
39 | protected void onCreate(@Nullable Bundle savedInstanceState) {
40 | super.onCreate(savedInstanceState);
41 | setContentView(R.layout.activity_noroot);
42 |
43 | AppCompatImageButton mBack = findViewById(R.id.back_button);
44 | MaterialTextView mCancel = findViewById(R.id.cancel_button);
45 | mBack.setOnClickListener(v -> onBackPressed());
46 | mCancel.setOnClickListener(v -> super.onBackPressed());
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/utils/RecycleViewItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.utils;
22 |
23 | import android.graphics.drawable.Drawable;
24 |
25 | import java.io.Serializable;
26 |
27 | /*
28 | * Created by sunilpaulmathew on November 21, 2018
29 | */
30 |
31 | public class RecycleViewItem implements Serializable {
32 |
33 | private final Drawable mIcon;
34 | private final String mDescription;
35 | private final String mTitle;
36 | private final String mURL;
37 |
38 | public RecycleViewItem(String title, String description, Drawable icon, String url) {
39 | this.mTitle = title;
40 | this.mDescription = description;
41 | this.mIcon = icon;
42 | this.mURL = url;
43 | }
44 |
45 | public String getTitle() {
46 | return mTitle;
47 | }
48 |
49 | public String getDescription() {
50 | return mDescription;
51 | }
52 |
53 | public Drawable getIcon() {
54 | return mIcon;
55 | }
56 |
57 | public String getURL() {
58 | return mURL;
59 | }
60 | }
--------------------------------------------------------------------------------
/app/src/play/java/com/smartpack/smartflasher/utils/Flavour.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021-2022 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.utils;
22 |
23 | import android.annotation.SuppressLint;
24 | import android.app.Activity;
25 | import android.content.Context;
26 | import android.content.Intent;
27 |
28 | import com.smartpack.smartflasher.R;
29 | import com.smartpack.smartflasher.activities.BillingActivity;
30 |
31 | import java.util.ArrayList;
32 |
33 | /*
34 | * Created by sunilpaulmathew on January 21, 2021
35 | */
36 | public class Flavour {
37 |
38 | public static void showDonateOption(Activity activity) {
39 | Intent donations = new Intent(activity, BillingActivity.class);
40 | activity.startActivity(donations);
41 | }
42 |
43 | @SuppressLint("UseCompatLoadingForDrawables")
44 | public static void launchAppStore(ArrayList mData, Context context) {
45 | mData.add(new RecycleViewItem(context.getString(R.string.app_store), context.getString(R.string.app_store_summary),
46 | context.getResources().getDrawable(R.drawable.ic_app_store), "https://play.google.com/store/apps/details?id=com.smartpack.smartflasher"));
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
16 |
17 |
27 |
28 |
36 |
37 |
38 |
41 |
42 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/activities/CreditsActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.activities;
22 |
23 | import android.os.Bundle;
24 |
25 | import androidx.appcompat.app.AppCompatActivity;
26 | import androidx.viewpager.widget.ViewPager;
27 |
28 | import com.google.android.material.tabs.TabLayout;
29 | import com.smartpack.smartflasher.R;
30 | import com.smartpack.smartflasher.fragments.CreditsFragment;
31 | import com.smartpack.smartflasher.utils.PagerAdapter;
32 |
33 | /*
34 | * Created by sunilpaulmathew on November 21, 2020
35 | */
36 |
37 | public class CreditsActivity extends AppCompatActivity {
38 |
39 | @Override
40 | protected void onCreate(Bundle savedInstanceState) {
41 | super.onCreate(savedInstanceState);
42 | setContentView(R.layout.activity_credits);
43 |
44 | TabLayout mTabLayout = findViewById(R.id.tab_layout);
45 | ViewPager mViewPager = findViewById(R.id.view_pager);
46 |
47 | PagerAdapter adapter = new PagerAdapter(getSupportFragmentManager());
48 | adapter.AddFragment(new CreditsFragment(), getString(R.string.credits_summary));
49 |
50 | mViewPager.setAdapter(adapter);
51 | mTabLayout.setupWithViewPager(mViewPager);
52 | }
53 |
54 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/utils/PagerAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.utils;
22 |
23 | import androidx.annotation.NonNull;
24 | import androidx.fragment.app.Fragment;
25 | import androidx.fragment.app.FragmentManager;
26 | import androidx.fragment.app.FragmentPagerAdapter;
27 |
28 | import java.util.ArrayList;
29 | import java.util.List;
30 |
31 | /*
32 | * Created by sunilpaulmathew on December 13, 2018
33 | */
34 |
35 | public class PagerAdapter extends FragmentPagerAdapter {
36 |
37 | private final List fragmentList = new ArrayList<>();
38 | private final List fragmentListTitles = new ArrayList<>();
39 |
40 | public PagerAdapter(FragmentManager fm) {
41 | super(fm);
42 | }
43 |
44 | @NonNull
45 | @Override
46 | public Fragment getItem(int position) {
47 | return fragmentList.get(position);
48 | }
49 |
50 | @Override
51 | public int getCount() {
52 | return fragmentListTitles.size();
53 | }
54 |
55 | @Override
56 | public CharSequence getPageTitle(int position) {
57 | return fragmentListTitles.get(position);
58 | }
59 | public void AddFragment(Fragment fragment, String title) {
60 | fragmentList.add(fragment);
61 | fragmentListTitles.add(title);
62 | }
63 |
64 | }
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | A/B分区
5 | 您不再需要它了,因为复原映像是内建在A / B分区中的。
6 | 关于
7 | %s已经存在!
8 | 备份
9 | 此页面上列出了已备份分区的详细信息。
10 | 将设备的%s备份到
11 | Boot 映像
12 | Boot 分区
13 | 无法识别 Boot 分区
14 | 取消
15 | 变更日志查看变更日志
16 | 致谢名单
17 | 删除
18 | %s的大小大于100 MB。\n\n请注意:出于安全原因,超过100 MB的复原文件将不允许刷入。
19 | 刷入器
20 | 单击刷入按钮选择并刷入可用于恢复模式的 zip 文件, 而无需重新启动到第三方恢复模式。变更将在重新启动后套用。
21 | 刷入
22 | \n\n警告: 刷入错误的「.img」 文件可能会损坏您的设备。请小心。\n
23 | 刷入
24 | 內核
25 | 名称为空!
26 | 请检查您的互联网连接!
27 | 好
28 | 不允许写入储存空间!
29 | 购买应用程序
30 | 重启
31 | 重启至 Bootloader
32 | 重启至 Recovery
33 | 复原映像
34 | 复原分区
35 | 无法取得复原分区信息
36 | 重新启动
37 | 复原
38 | 原始码
39 | 在GitHub上查看原始码
40 | 支持
41 | 訪問 xda-developers.com 的支持页面
42 | 你确定吗?
43 | 版本
44 | 请选择扩展名为%s的文件。
45 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_github.xml:
--------------------------------------------------------------------------------
1 |
4 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/activities/LogViewActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.activities;
22 |
23 | import android.annotation.SuppressLint;
24 | import android.os.Bundle;
25 |
26 | import androidx.annotation.Nullable;
27 | import androidx.appcompat.app.AppCompatActivity;
28 | import androidx.appcompat.widget.AppCompatImageButton;
29 |
30 | import com.google.android.material.textview.MaterialTextView;
31 | import com.smartpack.smartflasher.R;
32 | import com.smartpack.smartflasher.utils.Flasher;
33 | import com.smartpack.smartflasher.utils.Utils;
34 |
35 | import java.io.File;
36 |
37 | /*
38 | * Created by sunilpaulmathew on November 21, 2020
39 | */
40 |
41 | public class LogViewActivity extends AppCompatActivity {
42 |
43 | @SuppressLint("SetTextI18n")
44 | @Override
45 | protected void onCreate(@Nullable Bundle savedInstanceState) {
46 | super.onCreate(savedInstanceState);
47 | setContentView(R.layout.activity_logview);
48 |
49 | AppCompatImageButton mBack = findViewById(R.id.back);
50 | AppCompatImageButton mSave = findViewById(R.id.save);
51 | MaterialTextView mLogView = findViewById(R.id.flasher_log);
52 | MaterialTextView mCancel = findViewById(R.id.cancel_button);
53 | mLogView.setText(Flasher.mFlashingResult.toString());
54 | mBack.setOnClickListener(v -> onBackPressed());
55 | mSave.setOnClickListener(v -> {
56 | Utils.create(Flasher.mFlashingResult.toString(), new File(Utils.getStorageDir(this), "/flasher_log-" +
57 | Flasher.mZipName.replace(".zip", "")).getAbsolutePath());
58 | Utils.snackbar(mSave, getString(R.string.save_log_message, new File(Utils.getStorageDir(this), "/flasher_log-" +
59 | Flasher.mZipName.replace(".zip", "")).getAbsolutePath()));
60 | });
61 | mCancel.setOnClickListener(v -> onBackPressed());
62 | }
63 |
64 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/activities/ChangeLogActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.activities;
22 |
23 | import android.annotation.SuppressLint;
24 | import android.os.Bundle;
25 |
26 | import androidx.annotation.Nullable;
27 | import androidx.appcompat.app.AppCompatActivity;
28 | import androidx.appcompat.widget.AppCompatImageButton;
29 |
30 | import com.google.android.material.textview.MaterialTextView;
31 | import com.smartpack.smartflasher.BuildConfig;
32 | import com.smartpack.smartflasher.R;
33 | import com.smartpack.smartflasher.utils.Utils;
34 |
35 | import org.json.JSONException;
36 | import org.json.JSONObject;
37 |
38 | import java.util.Objects;
39 |
40 | /*
41 | * Created by sunilpaulmathew on November 21, 2020
42 | */
43 |
44 | public class ChangeLogActivity extends AppCompatActivity {
45 |
46 | @SuppressLint("SetTextI18n")
47 | @Override
48 | protected void onCreate(@Nullable Bundle savedInstanceState) {
49 | super.onCreate(savedInstanceState);
50 | setContentView(R.layout.activity_changelog);
51 |
52 | AppCompatImageButton mBack = findViewById(R.id.back);
53 | MaterialTextView mChangeLog = findViewById(R.id.change_log);
54 | MaterialTextView mTitle = findViewById(R.id.app_title);
55 | MaterialTextView mCancel = findViewById(R.id.cancel_button);
56 | mTitle.setText(getString(R.string.app_name) + " " + BuildConfig.VERSION_NAME);
57 | String change_log = null;
58 | try {
59 | change_log = new JSONObject(Objects.requireNonNull(Utils.readAssetFile(
60 | this, "version.json"))).getString("fullChanges");
61 | } catch (JSONException ignored) {
62 | }
63 | mChangeLog.setText(change_log);
64 | mCancel.setOnClickListener(v -> {
65 | onBackPressed();
66 | });
67 | mBack.setOnClickListener(v -> {
68 | onBackPressed();
69 | });
70 | }
71 |
72 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_backup.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
22 |
23 |
27 |
28 |
29 |
39 |
40 |
45 |
46 |
55 |
56 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_billing.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
20 |
21 |
25 |
26 |
35 |
36 |
48 |
49 |
50 |
60 |
61 |
62 |
67 |
68 |
69 |
80 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | A/B Partition
5 | Вам это больше не нужно, поскольку образ для восстановления встроен в раздел A/B.
6 | О приложении
7 | %s уже существует!
8 | Резервное копирование
9 | Резервное копирование%s вашего устройства в
10 | Детали уже зарезервированных разделов перечислены на этой странице.
11 | Boot IMG
12 | Раздел Boot
13 | Не удалось получить идентификатор раздела Boot
14 | Отмена
15 | История измененийПосмотреть историю изменений
16 | Кредиты
17 | Удалить
18 | Обратите внимание: по соображениям безопасности файлы восстановления размером более 100 МБ не могут быть прошиты
19 | Прошивальшик
20 | Нажмите кнопку прошивки, чтобы выбрать и прошить файл восстановления ZIP без перезагрузки в пользовательское восстановление. Изменения вступят в силу после перезагрузки.
21 | Прошивка в процессе
22 | \n\nПредупреждение: перепрошивка неправильного файла \'img\' может привести к поломке вашего устройства. Пожалуйста, будьте осторожны.\n
23 | Flash
24 | Ядро
25 | Имя пусто!
26 | Пожалуйста, проверьте ваше интернет-соединение!
27 | Нет корневого доступа
28 | Ок
29 | Отказано в разрешении на запись в память устройства!
30 | Приложение для пожертвований
31 | Перезагрузить
32 | Перезагрузить в загрузчик
33 | Настоятельно рекомендуется перезагрузить устройство после прошивки.
34 | Перезагрузить в рекавери
35 | Recovery IMG
36 | Раздел восстановления
37 | Не удалось получить удостоверение раздела восстановления
38 | Rebooting
39 | Восстановить
40 | Поделиться приложением
41 | Исходный код
42 | Посмотреть исзодный код на GitHub
43 | Поддержка
44 | Посетить страницу поддержки на xda-developers.com
45 | Вы уверены?
46 | Проверить обновления
47 | Версия
48 | Пожалуйста, выберите файл с расширением %s
49 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_dinner.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_noroot.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
19 |
20 |
29 |
30 |
42 |
43 |
44 |
49 |
50 |
55 |
56 |
65 |
66 |
74 |
75 |
76 |
77 |
78 |
89 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_logview.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
25 |
26 |
38 |
39 |
48 |
49 |
50 |
57 |
58 |
63 |
64 |
69 |
70 |
79 |
80 |
81 |
82 |
83 |
95 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_changelog.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
25 |
26 |
36 |
37 |
38 |
45 |
46 |
52 |
53 |
62 |
63 |
68 |
69 |
74 |
75 |
78 |
79 |
88 |
89 |
90 |
91 |
92 |
93 |
105 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Smart Flasher
2 |
3 | [](https://play.google.com/store/apps/details?id=com.smartpack.smartflasher)
4 | 
5 | 
6 |
7 | 
8 |
9 | ### Smart Flasher is a simple tool mainly aimed to make flashing recovery zips much easier.
10 | _Important Notice: The development of this project is abandoned._
11 |
12 | ## Download
13 | [
](https://play.google.com/store/apps/details?id=com.smartpack.smartflasher)
16 | [
](https://f-droid.org/packages/com.smartpack.smartflasher)
19 |
20 | ## Requirements
21 | 1. ROOT Access
22 | 2. BusyBox
23 |
24 | ## Features
25 | Smart Flasher is a simple and very basic app, without a settings menu, which can do the following things
26 | * Flashing recovery zip files (such as a custom Kernel, a Magisk module, etc.) while running Android OS, even without rebooting into custom recovery.
27 | * Download and auto-flash various custom kernels directly from app ([Documentation](https://smartpack.github.io/kerneldownloads/)).
28 | * Back-up 'boot' & 'recovery' partition on a supported device.
29 | * Flash a 'boot' partition '.img' or 'recovery' partition '.img' on a supported device.
30 | * Doing tasks such as
31 | * Display last flash log after successful recovery flashing
32 | * Display Kernel version
33 | * Turn off your device
34 | * Reboot (Normal, Recovery & Boot-loader) your device
35 |
36 | ## Donations
37 | If you like to appreciate my work, please consider donating to me (either via [PayPal](https://www.paypal.me/menacherry/), or [Ko-fi](https://ko-fi.com/sunilpaulmathew/), or by purchasing the [SmartPack Donation Package](https://play.google.com/store/apps/details?id=com.smartpack.donate) from playstore) as it is helpful to continue my projects more active, although it is not at all necessary.
38 |
39 | [
](https://www.paypal.me/menacherry/)
42 | [
](https://play.google.com/store/apps/details?id=com.smartpack.donate)
45 | [
](https://ko-fi.com/sunilpaulmathew/)
48 |
49 | ## Credits
50 | * [Grarak](https://github.com/Grarak/), Kernel Adiutor, from where I took a lot of code
51 | * [topjohnwu](https://github.com/topjohnwu/), libsu
52 | * [osm0sis](https://github.com/osm0sis/), for helping me with Auto-Flashing
53 | * [Lennoard](https://github.com/Lennoard/), Code contributions
54 | * [Toxinpiper](https://t.me/toxinpiper), App Icon
55 | * [jason5545](https://github.com/jason5545/), Chinese (Simplified & Traditional) Translations
56 | * [Andrey](https://github.com/andrey167/), Russian Translations
57 | * [tom4tot](https://github.com/tom4tot/), French Translations
58 | * [DanGLES3](https://github.com/DanGLES3/), [Lennoard](https://github.com/Lennoard/) & Andreaugustoqueiroz999, Portuguese (Brazilian) Translations
59 | * [IKAR0S](https://github.com/IKAR0S/), Italian Translations
60 | * [Mikesew1320](https://github.com/Mikesew1320), Amharic Translations
61 | * [tsiflimagas](https://github.com/tsiflimagas), Greek Translations
62 | * [SmgKhOaRn](https://github.com/SmgKhOaRn), Korean Translations
63 |
64 | ## Report a bug or request a feature
65 |
66 | You can report a bug or request a feature by [opening an issue](https://github.com/SmartPack/SmartFlasher/issues/new).
67 |
68 | ## License
69 |
70 | Copyright (C) 2021-2022 sunilpaulmathew
71 |
72 | Smart Flasher is a free softwares: you can redistribute it and/or
73 | modify it under the terms of the GNU General Public License as published
74 | by the Free Software Foundation, either version 3 of the License, or (at
75 | your option) any later version.
76 |
77 | Smart Flasher is distributed in the hope that it will be useful, but
78 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
79 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
80 | for more details.
81 |
82 | You should have received a copy of the GNU General Public License along
83 | with Smart Flasher. If not, see .
--------------------------------------------------------------------------------
/app/src/main/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | A/B 파티션
5 | 리커버리 이미지가 A/B 파티션에 빌트인되어 있으므로 필요하지 않습니다.
6 | 정보
7 | 업데이트 정보를 불러오는 중
8 | %s은(는) 이미 존재합니다!
9 | 백업
10 | 당신의 기기의 %s을(를) 백업하는 중
11 | 이미 백업된 파티션들의 상세정보는 이 페이지에 나열되어 있습니다.
12 | 부트 IMG
13 | 부트 파티션
14 | 부트 파티션을 확인하는데 실패했습니다.
15 | 취소
16 | 변경사항
17 | 변경사항 보기
18 | 도움을 주신 분들
19 | 삭제
20 | 기부
21 | 개발자에게 기부합니다.
22 | 개발자를 위한 기부의 링크가 아직 없습니다.
23 | 다운로드
24 | %s은(는) 성공적으로 다운로드를 완료했습니다. 파일을 설치하고 싶으신가요?
25 | 파일을 다운로드를 하는데 실패했거나, 손상된 파일을 받았습니다. !
26 | %s을(를) 받는 중
27 | 주의! ~%s MB의 파일을 선택했습니다. 이 앱을 통해 롬과 같은 큰 파일들을 설치하는 것은 여러분의 기기에 문제를 야기할 수도 있습니다.
28 | 설치 매니저
29 | 설치 버튼을 눌러 리커버리 ZIP 파일을 선택하고 커스텀 리커버리로의 부팅 없이 설치하세요. 변경된 점들은 다시 시작 후에 적용됩니다.
30 | 설치하는 중
31 | \n\n주의: 잘못된 \'img\' 파일을 설치하는 것은 여러분의 기기를 "단단한 벽돌"로 만들어버릴 수 있습니다. 항상 조심하세요.\n
32 | 설치
33 | 최신 커널을 다운받으세요.
34 | 현제 버젼
35 | 최신 버젼
36 | 언어 (%s)
37 | 영어
38 | 시스템 언어
39 | 한국어
40 | 프랑스어
41 | 이탈리아어
42 | 포르투갈어
43 | 중국어
44 | 러시아어
45 | 에티오피아어
46 | 이름이 비었습니다!
47 | 인터넷 연결을 확인해주세요!
48 | 루트 권한이 발견되지 않았습니다!
49 | 확인
50 | 저장공간 쓰기 권한이 거부되었습니다!
51 | 나가려면 뒤로가기를 다시 누르세요
52 | 기부 앱
53 | 다시 시작
54 | 부트로더
55 | 설치 후에 기기를 다시 시작하는 것은 매우 권장됩니다.
56 | 시스템
57 | 고급 다시 시작
58 | 리커버리
59 | 리커버리 IMG
60 | 리커버리 파티션
61 | 리커버리 파티션을 확인하는데 실패했습니다.
62 | 다시 시작하는 중
63 | 제거
64 | 복구
65 | 공유
66 | 앱 공유
67 | 소스 코드
68 | 깃허브에서 소스 코드를 확인하세요.
69 | 지원 받기
70 | 지원 그룹을 방문하세요.
71 | 정말로 진행하시겠어요?
72 | 업데이트 확인
73 | Smart Flasher는 %s의 새로운 버젼을 하루에 한 번씩 확인할 것입니다!
74 | 업데이트 채널 Url
75 | 업데이트 채널 정보를 정리합니다!
76 | 위에 있는 업데이트 채널에 알맞은 json 파일을 추가함으로써, 커널 다운로드, 자동 설치 (모든 기기를 지원하지는 않음) 기능들을 사용할 수 있습니다. 여러분이 좋아하는 커널 개발자에게 이 기능에 대한 지원 추가를 요청해보세요. 다운된 커널은 \'%s\'에 저장될 것입니다.\n\n팁!: franciscofranco의 (\u2665) \'FK-Kernel Manager\'을 위해 제작된 json 파일도 추가할 수 있습니다. 정상적으로 잘 작동될 것입니다.\n\n더 많은 도움이 필요하신가요? 여기를 누르세요!
77 | 잘못된 URL을 입력했습니다! 취소!
78 | 여기에-url을-입력하세요
79 | 버젼
80 | %s 확장이 있는 파일을 선택해주세요.
81 | 예
82 |
--------------------------------------------------------------------------------
/app/src/main/res/values-am/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ኤ/ቢ ፓርትሽን
5 | የስልክዎ ሪከቨሪ ኢሜጅ በ ኤ/ቢ ፓርትሽን ስለተዋቀ ከዚህ በኋላ አያስፈልጎትም።
6 | ስለ እኛ
7 | ስማርት ፍላሸር ማለት በሪከቨሪ ፍላሽ የሚደረጉ ፋይሎችን በቀላሉ ፍላሽ ለማድረግ እንዲረዳዎ ታስቦ የተሰራ መተግበሪያ ነው።
8 | ስለ አዲሱ እትም መረጃ በማግኘት ላይ
9 | %s ቀድሞዉኑም አለ!
10 | መጠባበቂያ
11 | የስልክዎን %s መጠባበቂያ ወደ
12 | ከዚህ ቀደም መጠባበቂያ የተያዘላቸዉ ፖርትሽኖች ዝርዝር መረጃ እዚህ ገፅ ላይ ተዘርዝሯል።
13 | ቡት አይኤምጂ
14 | ቡት ፓርትሽን
15 | የቡት ፓርትሽንን ማንነት ማግኘት አልተቻለም።
16 | ተዉ
17 | የቅርብ ጊዜ ለውጦች
18 | የቅርብ ጊዜ ለውጦችን ልይ
19 | ምስጋና
20 | ሰርዝ
21 | ልገሳ
22 | ለአበልፃጊው ድጋፍ አርግ
23 | ልገሳ መስጫ ሊንክ እስካሁን በአበልፃጊዉ አልተዘጋጀም!
24 | አዉርድ
25 | %s በትክክል ወርዷል። ፍላሽ ማድረግ ይፈልጋሉ?
26 | የማዉረድ ሂደት የተስተጓጎለ ይመስላል ወይም የወረደው ፋይል የተበላሸ ነዉ!
27 | በማዉረድ ላይ %s
28 | ማሳሰቢያ! ፍላሽ ለማድረግ ~%s MB ፋይል መርጠዋል። ይህንን መተግበሪያ ተተቅሞ እንደ ROM ያሉ ትላልቅ ፋይሎችን ፍላሽ ለማድረግ መሞከር ለስልክዎ በጣም አደገኛ ነዉ!
29 | ፍላሸር
30 | ወደ ከስተም ሪከቨሪ መግባት ሳያስፈልግዎ የ ሪከቨሪ ዚፕ መጫን ከፈለጉ እዚህ ጋር ወይም የፍላሽ ምልክቱን ይጫኑ። የተደረጉት ለዉጦች ስልክዎን ዘግተዉ ሲከፍቱ ተግባራዊ ይሆናል።
31 | ፍላሽ በማድረግ ላይ
32 | \n\nማሳሰቢያ: ትክክል ያልሆነ \'img\' ፋይል ፍላሽ ማድረግ ስልክዎን ሊያበላሽ ይችላል።እባክዎን ፍላሽ ከማድረጎ በፊት እርግጠኛ ይሁኑ!\n
33 | ፍላሽ
34 | አዲስ ከርነል አግኝ
35 | ያሁኑ እትም
36 | የመጨረሻ እትምLatest Version
37 | ቋንቋ (%s)
38 | አማርኛ
39 | ነባር
40 | እንግሊዘኛ
41 | ኮርያኛ
42 | ስም አልተገኘም!
43 | እባክዎን የኢንተርኔት አገልግሎት መኖሩን ያረጋግጡ!
44 | ስልክዎ ሩት አልተደረገም!
45 | እሺ
46 | ማከማቻ ላይ የመፃፍ ፍቃድ ተከልክሏል!
47 | ለመዉጣት ከፈለጉ ወደኋላ መመለሻ ቁልፉን ደግመው ይጫኑ!
48 | የግዥ መተግበሪያ
49 | እንደገና አስጀምር
50 | ወደ ቡት ሎደር ግባ
51 | ፍላሽ ካደረጉ በኋላ ስልኮን እንደገና ቢያስጀምሩ ይመከራል።
52 | እንደገና አስጀምር
53 | የዳግም ማስጀመሪያ አማራጮች
54 | ወደ ሪከቨሪ ግባ
55 | ሪከቨሪ አይኤምጂ
56 | ሪከቨሪ ፓርትሽን
57 | የሪከቨሪ ፓርትሽንን ማንነት ማግኘት አልተቻለም!
58 | እንገና በማስጀመር ላይ
59 | አስወግድ
60 | እንደገና መልስ
61 | አጋራ
62 | መተግበሪያዉን አጋራ
63 | መሰረተ-ኮድ
64 | የመተግበሪያዉን መሰረተ-ኮድ ጂትሀብ ላይ ይመልከቱ።
65 | እርዳታ
66 | የቴሌግራም ቤተሰባችንን ይቀላቀሉ።
67 | እርግጠኛ ኖት?
68 | አዲስ የመተግበሪያ እትም ከወጣ አረጋግጥ
69 | ስማርት ፍላሸር በቀን አንዴ አዲስ የ %s እትም መኖሩን ያረጋግጣል!
70 | የከርነል ማደሻ ቻናል ዩአርኤል ለዉጥ!
71 | የከርነል ማሳደጊያ ቻናል መረጃ በማፅዳት ላይ!
72 | ከላይ ያለዉን የከርነል ማሳደጊያ ቻናል ለስልክዎ ተገቢ ከሆነ json ፋይል ጋር ያገኛኙት። ይህን ስርዐት ለስልክዎ ሞዴል ተብሎ የተሰራ ከርነል ካለ፤ያንን ከርነል በራሱ አውርዶ እንዲጭን ለማረግ ሊጠቀሙበት ይችላሉ። እባክዎን እርስዎ የሚወዱትን ከርነል አበልፃጊ ይህን አገልግሎት መጠቀም እንዲችሉ እንዲያደርግ ይጠይቁት።. የወረደዉን ከርነል ማግኘት ከፈለጉ \'%s\' አለ።\n\nጉርሻ! ለ franciscofranco\'s \'FK-Kernel Manager\' የሚጠቀሙበት json ፋይል ካለ መጠቀም ይችላሉ(ትልቅ ❤️ እና ክብር ይገባዋል።)\n\nተጨማሪ እርዳታ ይፈልጋሉ? እዚህ ጋር ይጫኑ!
73 | ያስገቡት ዩአርኤል ትክክል አይደለምY! በማቋረጥ ላይ
74 | የከርነል የማሳደጊያ ቻናል ዩአርኤል ያስገቡ።
75 | እትም
76 | እባክዎን %s ቅጥያ ያለዉ ፋይል ይምረጡ!
77 | አዎ
78 |
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/utils/KernelUpdater.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.utils;
22 |
23 | import android.content.Context;
24 |
25 | import org.json.JSONException;
26 | import org.json.JSONObject;
27 |
28 | import java.io.File;
29 |
30 | /*
31 | * Created by sunilpaulmathew on January 21, 2020
32 | */
33 |
34 | public class KernelUpdater {
35 |
36 | public static void updateChannel(String value, Context context) {
37 | Utils.create(value, updateChannelInfo(context));
38 | }
39 |
40 | public static void updateInfo(String value, Context context) {
41 | Flasher.prepareFolder(Utils.getStorageDir(context).getAbsolutePath());
42 | Utils.download(updateInfo(context), value);
43 | }
44 |
45 | private static String getKernelInfo(Context context) {
46 | try {
47 | JSONObject obj = new JSONObject(Utils.read(updateInfo(context)));
48 | return (obj.getString("kernel"));
49 | } catch (JSONException e) {
50 | return "Unavailable";
51 | }
52 | }
53 |
54 | private static String getSupportInfo(Context context) {
55 | try {
56 | JSONObject obj = new JSONObject(Utils.read(updateInfo(context)));
57 | return (obj.getString("support"));
58 | } catch (JSONException e) {
59 | return "Unavailable";
60 | }
61 | }
62 |
63 | public static String getUpdateChannel(Context context) {
64 | if (Utils.exist(updateChannelInfo(context))) {
65 | return Utils.read(updateChannelInfo(context));
66 | } else {
67 | return "Unavailable";
68 | }
69 | }
70 |
71 | public static String getKernelName(Context context) {
72 | try {
73 | JSONObject obj = new JSONObject(getKernelInfo(context));
74 | return (obj.getString("name"));
75 | } catch (JSONException e) {
76 | return "Unavailable";
77 | }
78 | }
79 |
80 | public static String getLatestVersion(Context context) {
81 | try {
82 | JSONObject obj = new JSONObject(getKernelInfo(context));
83 | return (obj.getString("version"));
84 | } catch (JSONException e) {
85 | return "Unavailable";
86 | }
87 | }
88 |
89 | public static String getUrl(Context context) {
90 | try {
91 | JSONObject obj = new JSONObject(getKernelInfo(context));
92 | return (obj.getString("link"));
93 | } catch (JSONException e) {
94 | return "Unavailable";
95 | }
96 | }
97 |
98 | public static String getChecksum(Context context) {
99 | try {
100 | JSONObject obj = new JSONObject(getKernelInfo(context));
101 | return (obj.getString("sha1"));
102 | } catch (JSONException e) {
103 | return "Unavailable";
104 | }
105 | }
106 |
107 | public static String getChangeLog(Context context) {
108 | try {
109 | JSONObject obj = new JSONObject(getKernelInfo(context));
110 | return (obj.getString("changelog_url"));
111 | } catch (JSONException e) {
112 | return "Unavailable";
113 | }
114 | }
115 |
116 | public static String getSupport(Context context) {
117 | try {
118 | JSONObject obj = new JSONObject(getSupportInfo(context));
119 | return (obj.getString("link"));
120 | } catch (JSONException e) {
121 | return "Unavailable";
122 | }
123 | }
124 |
125 | public static String getDonationLink(Context context) {
126 | try {
127 | JSONObject obj = new JSONObject(getSupportInfo(context));
128 | return (obj.getString("donation"));
129 | } catch (JSONException e) {
130 | return "Unavailable";
131 | }
132 | }
133 |
134 | public static String updateInfo(Context context) {
135 | return context.getFilesDir().getPath() + "/update_info";
136 | }
137 |
138 | public static String updateChannelInfo(Context context) {
139 | return context.getFilesDir().getPath() + "/updatechannel";
140 | }
141 |
142 | public static long lastModified(Context context) {
143 | return new File(updateInfo(context)).lastModified();
144 | }
145 |
146 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/activities/FlashingActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.activities;
22 |
23 | import android.annotation.SuppressLint;
24 | import android.content.Intent;
25 | import android.os.Bundle;
26 | import android.view.KeyEvent;
27 | import android.view.View;
28 | import android.widget.LinearLayout;
29 |
30 | import androidx.annotation.Nullable;
31 | import androidx.appcompat.app.AppCompatActivity;
32 | import androidx.appcompat.widget.AppCompatImageButton;
33 | import androidx.core.widget.NestedScrollView;
34 |
35 | import com.google.android.material.card.MaterialCardView;
36 | import com.google.android.material.textview.MaterialTextView;
37 | import com.smartpack.smartflasher.R;
38 | import com.smartpack.smartflasher.utils.Flasher;
39 | import com.smartpack.smartflasher.utils.Utils;
40 |
41 | import java.io.File;
42 |
43 | /*
44 | * Created by sunilpaulmathew on April 23, 2020
45 | */
46 |
47 | public class FlashingActivity extends AppCompatActivity {
48 |
49 | private AppCompatImageButton mSave;
50 | private LinearLayout mProgressLayout;
51 | private MaterialCardView mCancel;
52 | private MaterialCardView mLog;
53 | private MaterialCardView mReboot;
54 | private MaterialTextView mFlashingOutput;
55 | private MaterialTextView mTitle;
56 | private NestedScrollView mScrollView;
57 |
58 | @SuppressLint("SetTextI18n")
59 | @Override
60 | protected void onCreate(@Nullable Bundle savedInstanceState) {
61 | super.onCreate(savedInstanceState);
62 | setContentView(R.layout.activity_flashing);
63 |
64 | AppCompatImageButton mBack = findViewById(R.id.back);
65 | mSave = findViewById(R.id.save);
66 | mTitle = findViewById(R.id.title);
67 | mFlashingOutput = findViewById(R.id.output);
68 | mCancel = findViewById(R.id.cancel);
69 | mLog = findViewById(R.id.log);
70 | mReboot = findViewById(R.id.reboot);
71 | mProgressLayout = findViewById(R.id.flashing_progress);
72 | mScrollView = findViewById(R.id.scroll_view);
73 | MaterialTextView mProgressText = findViewById(R.id.progress_text);
74 | mProgressText.setText(getString(R.string.flashing) + "...");
75 | refreshStatus();
76 | mBack.setOnClickListener(v -> onBackPressed());
77 | mSave.setOnClickListener(v -> {
78 | Utils.create(Flasher.mFlashingResult.toString(), new File(Utils.getStorageDir(this), "/flasher_log-" +
79 | Flasher.mZipName.replace(".zip", "")).getAbsolutePath());
80 | Utils.snackbar(mSave, getString(R.string.save_log_message, new File(Utils.getStorageDir(this), "/flasher_log-" +
81 | Flasher.mZipName.replace(".zip", "")).getAbsolutePath()));
82 | });
83 | mCancel.setOnClickListener(v -> finish());
84 | mLog.setOnClickListener(v -> {
85 | Intent viewLog = new Intent(this, LogViewActivity.class);
86 | startActivity(viewLog);
87 | finish();
88 | });
89 | mReboot.setOnClickListener(v -> {
90 | Utils.reboot("", mProgressLayout, mProgressText, this);
91 | finish();
92 | });
93 | }
94 |
95 | public void refreshStatus() {
96 | new Thread() {
97 | @SuppressLint("SetTextI18n")
98 | @Override
99 | public void run() {
100 | try {
101 | while (!isInterrupted()) {
102 | Thread.sleep(100);
103 | runOnUiThread(() -> {
104 | if (Flasher.mFlashing) {
105 | mScrollView.fullScroll(NestedScrollView.FOCUS_DOWN);
106 | } else {
107 | mProgressLayout.setVisibility(View.GONE);
108 | mSave.setVisibility(Flasher.getOutput().endsWith("\nsuccess") ? View.VISIBLE : View.GONE);
109 | mReboot.setVisibility(Flasher.getOutput().endsWith("\nsuccess") ? View.VISIBLE : View.GONE);
110 | mCancel.setVisibility(View.VISIBLE);
111 | mLog.setVisibility(View.VISIBLE);
112 | }
113 | mTitle.setText(Flasher.mFlashing ? getString(R.string.flashing) + "..." : Flasher.getOutput().endsWith("\nsuccess") ?
114 | getString(R.string.flashing_finished) : getString(R.string.flashing_failed));
115 | mFlashingOutput.setText(!Flasher.getOutput().isEmpty() ? Flasher.getOutput()
116 | .replace("\nsuccess","") : Flasher.mFlashing ? "" : Flasher.mFlashingResult);
117 | });
118 | }
119 | } catch (InterruptedException ignored) {
120 | }
121 | }
122 | }.start();
123 | }
124 |
125 | @Override
126 | public boolean onKeyDown(int keyCode, KeyEvent event) {
127 | return true;
128 | }
129 |
130 | @Override
131 | public void onBackPressed() {
132 | if (Flasher.mFlashing) return;
133 | super.onBackPressed();
134 | }
135 |
136 | }
--------------------------------------------------------------------------------
/app/src/main/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Διαμέρισμα A/B
5 | Δεν το χρειάζεστε πλέον καθώς το recovery image είναι ενσωματωμένο με το διαμέρισμα A/B.
6 | Σχετικά με
7 | Απόκτηση πληροφοριών ενημέρωσης
8 | %s υπάρχει ήδη!
9 | Αντίγραφο
10 | Δημιουργία αντιγράφου %s της συσκευής σας στο
11 | Οι λεπτομέρειες των ήδη αντιγεγραμμένων διαμερισμάτων είναι καταγεγραμμένες σε αυτήν τη σελίδα.
12 | Boot IMG
13 | Διαμέρισμα Boot
14 | Αποτυχία απόκτησης ταυτότητας διαμερίσματος Boot
15 | Ακύρωση
16 | Λίστα αλλαγών
17 | Δείτε τη λίστα αλλαγών
18 | Ευχαριστίες
19 | Διαγραφή
20 | Δωρεές
21 | Κάντε δωρεά στον προγραμματιστή
22 | Ο σύνδεσμος δωρεάς δεν παρέχεται ακόμη από τον προγραμματιστή!
23 | Λήψη
24 | %s κατέβηκε επιτυχώς. Θέλετε να το εγκαταστήσετε;
25 | Φαίνεται πως η λήψη απέτυχε, ή ένα αλλοιωμένο αρχείο έχει ληφθεί!
26 | Λήψη %s
27 | Προειδοποίηση! Έχετε επιλέξει ένα αρχείο μεγέθους ~%s MB για εγκατάσταση. Η εγκατάσταση μεγαλύτερων αρχείων, όπως ROM\'s, χρησιμοποιώντας αυτήν την εφαρμογή ίσως να είναι επικίνδυνο για τη συσκευή σας.
28 | Εργαλείο εγκατάστασης
29 | Πατήστε το κουμπί flash για να επιλέξετε και να εγκαταστήσετε ένα recovery ZIP αρχείο χωρίς να επανεκκινήσετε στο custom recovery. Οι αλλαγές θα εφαρμοστούν μετά την επανεκκίνηση.
30 | Εγκατάσταση
31 | \n\nΠροειδοποίηση: Η εγκατάσταση ενός λάθος \'img\' αρχείου πιθανώς να προκαλέσει brick στη συσκευή σας. Παρακαλώ να είστε προσεκτικοί.\n
32 | Εγκατάσταση
33 | Αποκτήστε το τελευταίο Kernel
34 | Τρέχουσα έκδοση
35 | Τελευταία έκδοση
36 | Γλώσσα (%s)
37 | Ελληνικά
38 | Αγγλικά
39 | Προεπιλογή
40 | Κορεάτικα
41 | Το όνομα είναι κενό!
42 | Παρακαλώ ελέγξτε τη σύνδεση δικτύου σας!
43 | Απουσία Root
44 | OK
45 | Απορρίφθηκε η άδεια πρόσβασης στον αποθηκευτικό χώρο!
46 | Πατήστε πίσω ξανά για να βγείτε
47 | Εφαρμογή δωρεάς
48 | Επανεκκίνηση
49 | Επανεκκίνηση στο Bootloader
50 | Συνιστάται ιδιαιτέρως να επανεκκίνησετε τη συσκευή σας μετα την εγκατάσταση.
51 | Απλή επανεκκίνηση
52 | Επιλογές επανεκκίνησης
53 | Επανεκκίνηση στο Recovery
54 | Recovery IMG
55 | Διαμέρισμα Recovery
56 | Αποτυχία απόκτησης ταυτότητας διαμερίσματος Recovery
57 | Επανεκκίνηση
58 | Αφαίρεση
59 | Επαναφορά
60 | Κοινοποίηση
61 | Κοινοποιήστε την εφαρμογή
62 | Πηγαίος Κώδικας
63 | Δείτε τον πηγαίο κώδικα στο GitHub
64 | Υποστήριξη
65 | Επισκεφθείτε την ομάδα υποστήριξης
66 | Είστε σίγουρος;
67 | Έλεγχος για ενημέρωση
68 | Το Smart Flasher θα ελέγχει για νέα έκδοση %s μία φορά τη μέρα!
69 | Κανάλι ενημέρωσης Url
70 | Καθαρισμός πληροφοριών καναλιού ενημέρωσης!
71 | Συνδέοντας το παραπάνω κανάλι ενημέρωσης με ένα κατάλληλο αρχείο json για τη συσκευή σας, μπορείτε στην ουσία να προσθέσετε λήψης kernel, και αυτόματης εγκατάστασης (όχι για όλες τις συσκευές) υποστήριξη σε κάθε Kernel\'s διαθέσιμα για τη συσκευή σας. Παρακαλώ ζητήστε απο τον αγαπημένο σας προγραμματιστή kernel να προσθέσει υποστήριξη για αυτό το χαρακτηριστικό. Το κατεβασμένο kernel θα είναι διαθέσιμο στο \'%s\'.\n\nΈξυπνες συμβουλές! Μπορείτε να εισάγετε ένα αρχείο json δημιουργημένο για το \'FK-Kernel Manager\' του franciscofranco (τεράστιος \υ2665 & σεβασμός σε αυτόν) και απλώς θα λειτουργήσει.\n\nΧρειάζεστε περισσότερη βοήθεια; Πατήστε εδώ!
72 | Έχετε εισαγάγει ένα μη έγκυρο Url! Διακοπή.
73 | Εισάγετε-το url-του καναλιού-ενημέρωσης-εδώ
74 | Έκδοση
75 | Παρακαλώ επιλέξτε κάποιο αρχείο με %s προέκταση.
76 | Ναι
77 |
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/utils/Backup.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.utils;
22 |
23 | import android.content.Context;
24 |
25 | import java.io.File;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 |
29 | /*
30 | * Created by sunilpaulmathew on November 29, 2018
31 | */
32 |
33 | public class Backup {
34 |
35 | public static String mBootPartitionInfo = null;
36 | public static String mRecoveryPartitionInfo = null;
37 |
38 | public static boolean hasBootPartitionInfo() {
39 | return mBootPartitionInfo != null && mBootPartitionInfo.contains("boot");
40 | }
41 |
42 | public static boolean hasRecoveryPartitionInfo() {
43 | return mRecoveryPartitionInfo != null && mRecoveryPartitionInfo.contains("recovery");
44 | }
45 |
46 | public static void prepareFolder(String path) {
47 | File file = new File(path);
48 | if (file.exists() && file.isFile()) {
49 | file.delete();
50 | }
51 | file.mkdirs();
52 | }
53 |
54 | public static List backupItems(Context context) {
55 | if (!Utils.exist(new File(Utils.getStorageDir(context), "backup").getAbsolutePath())) {
56 | prepareFolder(new File(Utils.getStorageDir(context), "backup").getAbsolutePath());
57 | }
58 | List list = new ArrayList<>();
59 | String files = Utils.runAndGetOutput("ls '" + new File(Utils.getStorageDir(context), "backup").getAbsolutePath() + "/'");
60 | if (!files.isEmpty()) {
61 | // Make sure the files exists
62 | for (String file : files.split("\\r?\\n")) {
63 | if (file != null && !file.isEmpty() && Utils.exist(new File(Utils.getStorageDir(context), "backup/" + file).getAbsolutePath())) {
64 | list.add(file);
65 | }
66 | }
67 | }
68 | return list;
69 | }
70 |
71 | public static List getData(Context context) {
72 | List mData = new ArrayList<>();
73 | if (Utils.exist(new File(Utils.getStorageDir(context), "backup").getAbsolutePath())) {
74 | for (final String backupItem : backupItems(context)) {
75 | File mBackup = new File(Utils.getStorageDir(context), "backup/" + backupItem);
76 | if (mBackup.getName().endsWith(".img")) {
77 | mData.add(mBackup.getAbsolutePath());
78 | }
79 | }
80 | }
81 | return mData;
82 | }
83 |
84 | public static void backupBootPartition(String name, Context context) {
85 | prepareFolder(new File(Utils.getStorageDir(context), "backup").getAbsolutePath());
86 | String bootPartition = new File(Utils.getStorageDir(context), "backup/" + name).getAbsolutePath();
87 | String command = "dd if=" + findBootPartition() + " of=" + bootPartition;
88 | Utils.runCommand(command);
89 | }
90 |
91 | public static void backupRecoveryPartition(String name, Context context) {
92 | prepareFolder(new File(Utils.getStorageDir(context), "backup").getAbsolutePath());
93 | String recoveryPartition = new File(Utils.getStorageDir(context), "backup/" + name).getAbsolutePath();
94 | String command = "dd if=" + findRecoveryPartition() + " of=" + recoveryPartition;
95 | Utils.runCommand(command);
96 | }
97 |
98 | public static void flashBootPartition(File file) {
99 | String command = "dd if='" + file.toString() + "' of=" + findBootPartition();
100 | Utils.runCommand(command);
101 | }
102 |
103 | public static void flashRecoveryPartition(File file) {
104 | String command = "dd if='" + file.toString() + "' of=" + findRecoveryPartition();
105 | Utils.runCommand(command);
106 | }
107 |
108 | public static String findBootPartition() {
109 | /*
110 | * Inspired from the "find_block()" function on Magisk by topjohnwu @ xda-developers.com
111 | * Ref: https://github.com/topjohnwu/Magisk/blob/074b1f8c61e0cd03aea152346ad233d2278354f4/scripts/util_functions.sh#L146
112 | */
113 | if (!hasBootPartitionInfo()) {
114 | mBootPartitionInfo = Utils.runAndGetOutput("find /dev/block/ -type l -iname boot$(getprop ro.boot.slot_suffix)") + " Created by Smart Flasher";
115 | } else {
116 | try {
117 | return mBootPartitionInfo.split("\\r?\\n")[0];
118 | } catch (StringIndexOutOfBoundsException | NullPointerException ignored) {
119 | }
120 | }
121 | return null;
122 | }
123 |
124 | public static String findRecoveryPartition() {
125 | if (!isABDevice() && !hasRecoveryPartitionInfo()) {
126 | mRecoveryPartitionInfo = Utils.runAndGetOutput("find /dev/block/ -type l -iname recovery") + " Created by Smart Flasher";
127 | } else {
128 | try {
129 | return mRecoveryPartitionInfo.split("\\r?\\n")[0];
130 | } catch (StringIndexOutOfBoundsException | NullPointerException ignored) {}
131 | }
132 | return null;
133 | }
134 |
135 | public static boolean isABDevice() {
136 | return mBootPartitionInfo.contains("boot_a") || mBootPartitionInfo.contains("boot_b");
137 | }
138 |
139 | public static String getPath(Context context) {
140 | File file = new File(Utils.getStorageDir(context), "backup");
141 | if (file.exists() && file.isFile()) {
142 | file.delete();
143 | }
144 | file.mkdirs();
145 | return file.toString();
146 | }
147 |
148 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/utils/Flasher.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.utils;
22 |
23 | import android.content.Context;
24 |
25 | import java.io.File;
26 | import java.util.ArrayList;
27 | import java.util.List;
28 |
29 | /*
30 | * Created by sunilpaulmathew on November 29, 2018
31 | */
32 |
33 | public class Flasher {
34 |
35 | public static String mZipName;
36 |
37 | public static StringBuilder mFlashingResult = null;
38 |
39 | public static List mFlashingOutput;
40 |
41 | public static boolean mFlashing, mMagiskModule = false, mWritableRoot = true;
42 |
43 | public static void prepareFolder(String path) {
44 | File file = new File(path);
45 | if (file.exists() && file.isFile()) {
46 | file.delete();
47 | }
48 | file.mkdirs();
49 | }
50 |
51 | private static boolean isWritableRoot() {
52 | return !Utils.mount("rw", "/").contains("' is read-only");
53 | }
54 |
55 | public static long fileSize(File file) {
56 | return file.length();
57 | }
58 |
59 | public static String getOutput() {
60 | List mData = new ArrayList<>();
61 | for (String line : Flasher.mFlashingOutput.toString().substring(1, Flasher.mFlashingOutput.toString().length()-1).replace(", ","\n").replace("ui_print","").split("\\r?\\n")) {
62 | if (!line.startsWith("progress")) {
63 | mData.add(line);
64 | }
65 | }
66 | return mData.toString().substring(1, mData.toString().length()-1).replace(", ","\n").replaceAll("(?m)^[ \t]*\r?\n", "");
67 | }
68 |
69 | public static void manualFlash(Context context) {
70 | /*
71 | * Flashing recovery zip without rebooting to custom recovery (Credits to osm0sis @ xda-developers.com)
72 | * Also include code from https://github.com/topjohnwu/Magisk/
73 | * Ref: https://github.com/topjohnwu/Magisk/blob/a848f10bba4f840248ecf314f7c9d55511d05a0f/app/src/main/java/com/topjohnwu/magisk/core/tasks/FlashZip.kt#L47
74 | */
75 | String mScriptPath = new File(Utils.getStorageDir(context), "flash/META-INF/com/google/android/update-binary").getAbsolutePath(),
76 | FLASH_FOLDER = new File(Utils.getStorageDir(context), "flash").getAbsolutePath(),
77 | CLEANING_COMMAND = "rm -r '" + FLASH_FOLDER + "'",
78 | mZipPath = context.getCacheDir() + "/flash.zip";
79 | String flashingCommand = "BOOTMODE=true sh " + mScriptPath + " dummy 1 " + mZipPath + " && echo success";;
80 | if (Utils.exist(FLASH_FOLDER)) {
81 | Utils.runCommand(CLEANING_COMMAND);
82 | } else {
83 | prepareFolder(FLASH_FOLDER);
84 | }
85 | mFlashingResult.append("** Extracting ").append(mZipName).append(" into working folder: ");
86 | Utils.runAndGetError(Utils.magiskBusyBox() + " unzip " + mZipPath + " -d '" + FLASH_FOLDER + "'");
87 | if (Utils.exist(mScriptPath)) {
88 | mFlashingResult.append(" Done *\n\n");
89 | mFlashingResult.append("** Checking recovery zip file: ");
90 | if (Utils.read(mScriptPath.replace("update-binary","updater-script")).equals("#MAGISK")) {
91 | mFlashingResult.append(" Magisk Module *\n\n");
92 | mMagiskModule = true;
93 | } else if (Utils.exist(new File(Utils.getStorageDir(context), "/flash/anykernel.sh").getAbsolutePath())) {
94 | mFlashingResult.append(" AnyKernel *\n\n");
95 | } else {
96 | mFlashingResult.append(" Unknown *\n\n");
97 | }
98 | mFlashingResult.append("** Preparing a recovery-like environment for flashing...\n\n");
99 | Utils.runCommand("cd '" + FLASH_FOLDER + "'");
100 | if (!mMagiskModule) {
101 | mFlashingResult.append("** Mounting Root filesystem: ");
102 | if (!isWritableRoot()) {
103 | mWritableRoot = false;
104 | mFlashingResult.append("Failed *\nPlease Note: Flashing may not work properly on this device!\n\n");
105 | } else {
106 | mFlashingResult.append("Done *\n\n");
107 | mFlashingResult.append(Utils.runAndGetError(Utils.isMagiskBinaryExist("mkdir") ? Utils.magiskBusyBox() + " mkdir /tmp" : "mkdir /tmp")).append(" \n");
108 | mFlashingResult.append(Utils.runAndGetError(Utils.isMagiskBinaryExist("mke2fs") ? Utils.magiskBusyBox() + " mke2fs -F tmp.ext4 500000" : "mke2fs -F tmp.ext4 500000")).append(" \n");
109 | mFlashingResult.append(Utils.runAndGetError(Utils.isMagiskBinaryExist("mount") ? Utils.magiskBusyBox() + " mount -o loop tmp.ext4 /tmp/" : "mount -o loop tmp.ext4 /tmp/")).append(" \n\n");
110 | }
111 | }
112 | mFlashingResult.append("** Flashing ").append(mZipName).append(" ...\n\n");
113 | Utils.runAndGetLiveOutput(flashingCommand, mFlashingOutput);
114 | mFlashingResult.append(mFlashingOutput.isEmpty() ? "Unfortunately, flashing " + mZipName + " failed due to some unknown reasons!" : getOutput().replace("\nsuccess",""));
115 | } else {
116 | mFlashingResult.append(" Failed *\n\n");
117 | mFlashingResult.append("** Flashing Failed *");
118 | }
119 | Utils.runCommand(CLEANING_COMMAND);
120 | Utils.delete(context.getCacheDir() + "/flash.zip");
121 | if (!mMagiskModule && mWritableRoot) {
122 | mFlashingResult.append("\n\n** Unmount Root filesystem: ");
123 | mFlashingResult.append(Utils.mount("ro", "/"));
124 | mFlashingResult.append(" Done *");
125 | }
126 | if (mMagiskModule) {
127 | mMagiskModule = false;
128 | }
129 | }
130 |
131 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_flashing.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
18 |
19 |
27 |
28 |
39 |
40 |
50 |
51 |
52 |
58 |
59 |
65 |
66 |
67 |
68 |
75 |
76 |
84 |
85 |
94 |
95 |
96 |
105 |
106 |
115 |
116 |
117 |
125 |
126 |
135 |
136 |
137 |
138 |
146 |
147 |
153 |
154 |
163 |
164 |
165 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | "A/B分割區"
5 | "您不再需要它了,因為復原映像是內建在A / B分割區中的。"
6 | "關於"
7 | "智慧閃光燈 - 一個簡單的應用程式,使閃爍恢復拉鍊容易得多!"
8 | "獲取更新資訊"
9 | "在此處添加!"
10 | "%s已經存在!"
11 | "備份"
12 | "將裝置的%s備份到"
13 | "此頁面上列出了已備份分割區的詳細資訊。"
14 | "未能連接到谷歌播放計費用戶端!"
15 | "Boot 映像"
16 | "Boot 分割區"
17 | "無法識別 Boot 分割區"
18 | "取消"
19 | "變更日誌"
20 | "檢視變更日誌"
21 | "全部清除"
22 | "所有的欄位都是空的!中止。"
23 | "新增到此頁面的所有內容都將被清除!"
24 | "致謝名單"
25 | "給貢獻者的致謝名單"
26 | "刪除"
27 | "忽略"
28 | "文檔"
29 | "捐款"
30 | "捐贈連結"
31 | "捐款支援發展"
32 | "捐贈給開發人員"
33 | "捐贈連結尚未由開發人員提供!"
34 | "下載"
35 | "%s 已成功下載。你想閃一下嗎?"
36 | "下載似乎失敗,或者下載了損壞的檔!"
37 | "下載連結"
38 | "下載百分比"
39 | "%s的大小大於100 MB。請注意:出於安全原因,超過100 MB的復原檔案將不允許刷入。"
40 | "刷入器"
41 | "快閃記憶體日誌"
42 | "按一下刷入按鈕選擇並刷入可用於復原模式的 zip 檔案, 而無需重新開機到第三方復原模式。變更將在重新開機後套用。"
43 | "刷入"
44 | "閃爍失敗"
45 | "閃爍完成"
46 | "\n\n警告: 刷入錯誤的「.img」 檔案可能會損壞您的裝置。請小心。"
47 | "刷入"
48 | "閃光%s?"
49 | "完整日誌"
50 | "獲取最新內核"
51 | "核心"
52 | "最新版本"
53 | "內核名稱"
54 | "內核版本"
55 | "語言 (%s)"
56 | "預設"
57 | "阿姆哈裡奇"
58 | "法語"
59 | "希臘語"
60 | "英語"
61 | "義大利語"
62 | "朝鮮語"
63 | "葡萄牙文"
64 | "俄語"
65 | "中文"
66 | "名稱為空!"
67 | "請檢查您的網際網路連線!"
68 | "無根"
69 | "為什麼會發生這個問題 ?\n\n您的設備要麼未紮根,要麼您的智慧閃光燈的根許可權被拒絕!\n\n為什麼需要根許可 ?\n\n為了快閃記憶體恢復拉鍊文件或備份分區圖像,智慧快閃記憶體器需要達到一些頂級系統分區,如果沒有根是不可能的!\n\n我如何根我的設備 >?\n\n一個簡單的谷歌搜索將有助於找到許多指南,以實現根在您的設備上。請看一看!\n\n支援設備是否安全 ?\n\n生根會帶來一些安全風險,但通常是安全的!"
70 | "好"
71 | "不允許寫入儲存空間!"
72 | "再次向後按以退出"
73 | "購買應用程式"
74 | "重啟"
75 | "重啟至 Bootloader"
76 | "強烈建議在閃爍後重新啟動設備。"
77 | "正常重新啟動"
78 | "重新啟動選項"
79 | "重啟至 Recovery"
80 | "復原映像"
81 | "復原分割區"
82 | "無法取得復原分割區資訊"
83 | "重新啟動"
84 | "刪除"
85 | "復原"
86 | "快閃記憶體紀錄檔匯出為%s!"
87 | "安全哈希演算法"
88 | "共用"
89 | "共用應用程式"
90 | "原始碼"
91 | "在GitHub上檢視原始碼"
92 | "支援"
93 | "捐贈確認 – +2665"
94 | "支持發展"
95 | "如果您喜歡欣賞開發人員提供此工具完全免費的努力,請考慮通過點擊下面提供的選項之一發送小額捐贈!"
96 | "請給我買頓晚餐"
97 | "支援組"
98 | "支援組連結尚未由開發人員提供!"
99 | "給我買頓飯"
100 | "給我買杯咖啡"
101 | "您以前已經支援過這個項目的開發!"
102 | "非常感謝您的支援 -u2665 \n這將激勵我很多繼續我的專案更積極!"
103 | "請再次嘗試購買!"
104 | "造訪 xda-developers.com 的支援頁面"
105 | "你確定嗎?"
106 | "檢查更新"
107 | "智慧閃光燈將檢查一個新的版本的%s 一天一次!"
108 | "更新通道網址"
109 | "創建更新通道"
110 | "一些強制性的欄位是空的!中止。"
111 | "恭喜!更新通道以%s 成功建立。請將其託管在某處,並與用戶共用直接下載連結。"
112 | "您所做的更改將丟失!"
113 | "清潔更新通道資訊!"
114 | "通過將上述更新通道與設備的正確 json 檔連接起來,您基本上可以將內核下載和自動快閃記憶體(並非適用於所有設備)支援添加到任何適用於您的設備的內核。請要求您最喜愛的內核開發人員為此功能添加支援。下載的內核將以\"%s\"提供。\n\n技巧!您可以匯入為弗朗西斯科弗蘭科(巨大的-u2665 – 尊重他)\"FK-內核管理器\"創建的json檔,它只會工作。\n\n需要更多説明?單擊點功能表!"
115 | "您已輸入無效網址!中止。"
116 | "Kernel 名稱、Kernel 版本 下載連結是單擊創建按鈕之前要填寫的必填欄位。\n\n變更日誌可以作為格式良好的文本提供,也可以作為指向在線頁面的連結提供。\n\n安全哈希演算法(sha1>)是可選的,但強烈建議確保下載的內核的真實性。"
117 | "輸入-更新-通道-網址-此處"
118 | "版本"
119 | "請選擇副檔名為%s的檔案。"
120 | "是的"
121 |
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/fragments/CreditsFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.fragments;
22 |
23 | import android.annotation.SuppressLint;
24 | import android.os.Bundle;
25 | import android.view.LayoutInflater;
26 | import android.view.View;
27 | import android.view.ViewGroup;
28 |
29 | import androidx.annotation.NonNull;
30 | import androidx.annotation.Nullable;
31 | import androidx.appcompat.widget.AppCompatImageView;
32 | import androidx.fragment.app.Fragment;
33 | import androidx.recyclerview.widget.GridLayoutManager;
34 | import androidx.recyclerview.widget.RecyclerView;
35 |
36 | import com.google.android.material.textview.MaterialTextView;
37 | import com.smartpack.smartflasher.R;
38 | import com.smartpack.smartflasher.utils.RecycleViewItem;
39 | import com.smartpack.smartflasher.utils.Utils;
40 |
41 | import java.util.ArrayList;
42 |
43 | /*
44 | * Created by sunilpaulmathew on November 21, 2020
45 | */
46 |
47 | public class CreditsFragment extends Fragment {
48 |
49 | private final ArrayList mData = new ArrayList<>();
50 |
51 | @SuppressLint("UseCompatLoadingForDrawables")
52 | @Nullable
53 | @Override
54 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
55 | View mRootView = inflater.inflate(R.layout.fragment_credits, container, false);
56 |
57 | mData.clear();
58 | mData.add(new RecycleViewItem("Kernel Adiutor", "Grarak", getResources().getDrawable(R.drawable.ic_grarak), "https://github.com/Grarak"));
59 | mData.add(new RecycleViewItem("libsu", "topjohnwu", getResources().getDrawable(R.drawable.ic_topjohnwu),"https://github.com/topjohnwu"));
60 | mData.add(new RecycleViewItem("Auto Flashing","osm0sis", getResources().getDrawable(R.drawable.ic_osm0sis),"https://github.com/osm0sis"));
61 | mData.add(new RecycleViewItem("Code contributions","Lennoard", getResources().getDrawable(R.drawable.ic_lennoard),"https://github.com/Lennoard"));
62 | mData.add(new RecycleViewItem("App Icon","Toxinpiper", getResources().getDrawable(R.mipmap.ic_launcher_round),"https://t.me/toxinpiper"));
63 | mData.add(new RecycleViewItem("Russian Translations","andrey167", getResources().getDrawable(R.drawable.ic_andrey167),"https://github.com/andrey167"));
64 | mData.add(new RecycleViewItem("Chinese (rCN & rTW) Translations","jason5545", getResources().getDrawable(R.drawable.ic_jason5545),"https://github.com/jason5545"));
65 | mData.add(new RecycleViewItem("Portuguese (rBr) Translations","DanGLES3 & Andreaugustoqueiroz999", getResources().getDrawable(R.drawable.ic_dangles3),"https://github.com/DanGLES3"));
66 | mData.add(new RecycleViewItem("French Translations","tom4tot", getResources().getDrawable(R.drawable.ic_tom4tot),"https://github.com/tom4tot"));
67 | mData.add(new RecycleViewItem("Italian Translations","IKAR0S", getResources().getDrawable(R.drawable.ic_ikar0s),"https://github.com/IKAR0S"));
68 | mData.add(new RecycleViewItem("Korean Translations","FiestaLake", getResources().getDrawable(R.drawable.ic_fiestalake),"https://github.com/FiestaLake"));
69 | mData.add(new RecycleViewItem("Amharic Translations","Mikesew1320", getResources().getDrawable(R.drawable.ic_mikesew),"https://github.com/Mikesew1320"));
70 | mData.add(new RecycleViewItem("Greek Translations","tsiflimagas", getResources().getDrawable(R.drawable.ic_tsiflimagas),"https://github.com/tsiflimagas"));
71 |
72 | RecyclerView mRecyclerView = mRootView.findViewById(R.id.recycler_view);
73 | mRecyclerView.setLayoutManager(new GridLayoutManager(requireActivity(), Utils.getSpanCount(requireActivity())));
74 | RecycleViewAdapter mRecycleViewAdapter = new RecycleViewAdapter(mData);
75 | mRecyclerView.setAdapter(mRecycleViewAdapter);
76 |
77 | mRecycleViewAdapter.setOnItemClickListener((position, v) -> {
78 | Utils.launchUrl(mData.get(position).getURL(), requireActivity());
79 | });
80 |
81 | return mRootView;
82 | }
83 |
84 | private static class RecycleViewAdapter extends RecyclerView.Adapter {
85 |
86 | private final ArrayList data;
87 |
88 | private static RecycleViewAdapter.ClickListener clickListener;
89 |
90 | public RecycleViewAdapter(ArrayList data) {
91 | this.data = data;
92 | }
93 |
94 | @NonNull
95 | @Override
96 | public RecycleViewAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
97 | View rowItem = LayoutInflater.from(parent.getContext()).inflate(R.layout.recycle_view_credits, parent, false);
98 | return new RecycleViewAdapter.ViewHolder(rowItem);
99 | }
100 |
101 | @Override
102 | public void onBindViewHolder(@NonNull RecycleViewAdapter.ViewHolder holder, int position) {
103 | try {
104 | holder.mTitle.setText(this.data.get(position).getTitle());
105 | if (Utils.isDarkTheme(holder.mTitle.getContext())) {
106 | holder.mTitle.setTextColor(Utils.getThemeAccentColor(holder.mTitle.getContext()));
107 | }
108 | holder.mDescription.setText(this.data.get(position).getDescription());
109 | holder.mIcon.setImageDrawable(this.data.get(position).getIcon());
110 | } catch (ArrayIndexOutOfBoundsException ignored) {
111 | }
112 | }
113 |
114 | @Override
115 | public int getItemCount() {
116 | return this.data.size();
117 | }
118 |
119 | public static class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
120 | private final AppCompatImageView mIcon;
121 | private final MaterialTextView mTitle;
122 | private final MaterialTextView mDescription;
123 |
124 | public ViewHolder(View view) {
125 | super(view);
126 | view.setOnClickListener(this);
127 | this.mIcon = view.findViewById(R.id.icon);
128 | this.mTitle = view.findViewById(R.id.title);
129 | this.mDescription = view.findViewById(R.id.description);
130 | }
131 | @Override
132 | public void onClick(View view) {
133 | clickListener.onItemClick(getAdapterPosition(), view);
134 | }
135 | }
136 |
137 | public void setOnItemClickListener(ClickListener clickListener) {
138 | RecycleViewAdapter.clickListener = clickListener;
139 | }
140 |
141 | public interface ClickListener {
142 | void onItemClick(int position, View v);
143 | }
144 | }
145 |
146 | }
--------------------------------------------------------------------------------
/app/src/main/assets/version.json:
--------------------------------------------------------------------------------
1 | {
2 | "fullChanges": "v5.4\n - Final update + depreciation notice.\n - Updated Portuguese (Brazilian) translations.\n - Miscellaneous changes.\n\nv5.3\n - Implement own file picker to handle zip/img file picking tasks.\n - Updated gradle plugin and build tools.\n - Now targeting latest Android SDK.\n - Miscellaneous changes.\n\nv5.2\n - Set target SDK to 29 to fix issues on Android 11.\n - Updated Chinese traditional translations.\n - Added links to POEditor translation page.\n - Updated build tools.\n - Miscellaneous changes.\n\nv5.1\n - Largely improved auto-flashing.\n - Flasher will now catch live output.\n - Fixed crashing on some devices.\n - Miscellaneous changes.\n\nv5.0\n - Re-built from (nearly) scratch. Brand NEw app UI. App is now completely Ad-free.\n - Miscellaneous changes.\n\nv4.8\n - Introduced new page to explain no root status.\n - Miscellaneous changes.\n\nv4.7\n - Overall improvements on App UI.\n - Cleaned up a lot of unnecessary code.\n - Moved TabLayout to top.\n - Settings menu is now accessible from every page.\n - Added Brand New change log and licence views.\n - Miscellaneous changes.\n\nv4.6\n - Improved app layout.\n - Updated Ad view to avoid interfering with other contents.\n - Miscellaneous changes.\n\nv4.5\n - Improved file picking.\n - Improved flexibility of update channel.\n - Miscellaneous changes.\n\nv4.4\n - Update libsu to v3.0.2.\n - Updated Portuguese (Brazilian) translations (Credits: @Lennoard).\n - Updated gradle build tools.\n - Miscellaneous changes.\n\nv4.3\n - Fixed layout issues on create update channel.\n - Re-arranged update channel popup menu items.\n - Miscellaneous changes.\n\nv4.2\n - Added option to create update channel within app.\n - Updated build tools to latest.\n - Fixed a small issue in flashing.\n - Miscellaneous changes.\n\nv4.1\n - Improved Root handling.\n - Removed interstitial ads from app.\n - Show flashing failed status if flashing output is empty.\n - Moved menu items into the top part of about page.\n - Miscellaneous changes.\n\nv4.0\n - Main: Migrated to libsu (Credits: @Lennoard).\n - Flasher: Added Brand New Flashing view.\n - Flasher: Largely improved flashing process (include fixes for syntax error).\n - Updated gradle build tools.\n - Miscellaneous changes.\n\nv3.9\n - Updated flasher to use Magisk BusyBox.\n - Updated portuguese brazilian translations (Credits: @Lennoard).\n - Updated gradle build tools.\n - Miscellaneous changes.\n\nv3.8\n - Moved remove and share update channel options to popup menu.\n - Updated gradle build tools.\n - Added Greek translations (credits: @tsiflimagas).\n - Miscellaneous changes.\n\nv3.7\n - Update to work Kernel Downloader without curl/wget.\n - Fixed creating app folder on Android 10.\n - Added option to switch app language.\n - Added Amharic translations (Credits: @Mikesew1320).\n - Improved Korean translations (Credits: @SmgKhOaRn).\n - Miscellaneous changes.\n\nv3.6\n - Main: Added Korean translations (Credits: @SmgKhOaRn).\n - Kernel Downloader: Update to use wget, if curl unavailable.\n - gradle: Updated build tools & dependencies.\n - Miscellaneous changes.\n\nv3.5\n - Main: Exit app only after pressing back button twice (prevent accidental closing).\n - Main: Fixed rebooting from app on most cases.\n - Misc: Improved no-root message.\n - gradle: Updated build tools.\n - Miscellaneous changes.\n\nv3.4\n - Main: Improved App UI.\n - res: Brand new icons by Toxinpiper.\n - Main: Improved coding quality and cleaned un-resourced resources.\n - build: gradle: Updated dependencies.\n - Misc: Ads: Replaced Banner with a event based Interstitial Ad.\n - Miscellaneous changes.\n\nv3.3\n - Main: Disabled Ads by default.\n - Misc: Clean un-used resources.\n - Miscellaneous changes.\n\nv3.2\n - Main: Various improvements on UI.\n - Miscellaneous changes.\n\nv3.1\n - Flasher and Backup: Fixed some critical bugs in file selection.\n - Miscellaneous changes.\n\nv3.0\n - Flasher and Backup: Updated to work with Document Uri.\n - Backup: Workaround to avoid crashing on some devices.\n - About: Add option to disable Ads.\n - Miscellaneous changes.\n\nv2.9\n - Main: Added a simple banner Ad view at the bottom.\n - Main: Overall improvements and optimizations.\n - Miscellaneous changes.\n\nv2.8\n - Flasher: Manual Flashing: Improve flashing.\n - Flasher and Backup: Support more file manager.\n - Misc: Added option to share error log if created.\n - Miscellaneous changes.\n\nv2.7\n - Kernel Updater: Properly acquire update Auto update check.\n - Misc: Updated reboot options to use svc power reboot if available.\n - Flasher: removed wipe options and simplified reboot menu.\n - Kernel Updater: Added option to remove and share channel.\n - Miscellaneous changes.\n\nv2.6\n - Flasher: Implemented FK model kernel update feature.\n - Backup: Simplified backup menu.\n - res: Updated app icon.\n - Miscellaneous changes.\n\nv2.5\n - Main: Switch to dark theme with an option to change to light in about page.\n - Miscellaneous changes.\n\nv2.4\n - Flasher: Workaround to use Magisk BusyBox.\n - Main: Moved data folder to /sdcard/Smart_Flasher.\n - Flasher & Backup: Fixed picking files from sdcard root.\n - Updated Russian translations.\n - Miscellaneous changes.\n\nv2.3\n - Flasher: Manual Flash: Directly catch and show the flashing output.\n - Flasher: Manual Flash: Removed file size limit with a warning toast message.\n - Backup: Workaround to avoid failing if user input a space in name.\n - Main: Implement update notification for non-google play devices.\n - Main: Make about section more captive.\n - Miscellaneous changes.\n\nv2.2\n - Main: Prevent app launching on un-rooted devices.\n - Main: Fixed crashes due to no storage write access.\n - About: Add option to share app.\n - Translations: Import Chinese Simplified (credits: jason5545).\n - Translations: Update Chinese Traditional (credits: jason5545).\n - res: Adaptive icons.\n - Miscellaneous changes.\n\nv2.1\n - Main: Changed app into tab layout (tabs at bottom).\n - Moved partition related features into new page.\n - Flasher/Backup: Improved reboot option after flashing with possibility to view flasher log.\n\nv2.0\n - Flasher: Added ability to back-up/flash recovery partition/img.\n - Flasher: Display partition information on the main screen.\n - App theme: Improved a bit more.\n - Translations: Updated Portuguese (Brazilian) (Credits: @DanGLES3).\n\nv1.9\n - Main: Overall updates according to material style guidelines.\n - Flasher: Improved flashing and added an alert dialogue to prevent using DocumentsUI.\n - Flasher: Maintain flashing history.\n - build: update gradle build tools.\n\nv1.8\n - Flasher: Flash ZIP & IMG: Implemented ability to restart device after successful flashing.\n - Flasher: Make it little more better and added a detailed warning.\n\nv1.7\n - gradle: Updated SDK to 29 (Android Q).\n - gradle: Updated build tools and dependencies.\n - Flasher: Updated Reboot & ShutDown.\n - About: Integrate License view with the main *SP* icon.\n - Miscellaneous changes.\n\nv1.6\n - Flasher: Flash Zip: Updated file Size check.\n - About: Check for network availability.\n - About: Updated License and Change-log View.\n - Translations: Updated Chinese (Traditional) translations.\n - Miscellaneous improvements and fixes, please visit my GitHub page for more information.\n\nv1.5\n - Flasher: Add option to Backup & Flash boot partition on supported devices.\n - Translations: Update Portuguese (Brazilian) & Chinese (Traditional) translations.\n - Miscellaneous changes, please visit my GitHub page for more information.\n\nv1.4\n - Flasher: Import Italian translations.\n - Flasher: Introduced an additional file extension check to avoid failure on certain cases.\n\nv1.3\n - Flasher: Import Portuguese (Brazilian) translations.\n - Flasher: Updates to work with some file managers.\n - Flasher: Update permission handling.\n\nv1.2\n - Flasher: Updated permission request.\n - Flasher: Added an option to view last flasher log.\n - Misc changes, please check my GitHub page.\n\nv1.1\n - Flasher: Updated to work with external file manager, instead of the in-built file picker.\n - Flasher: Simplified entire processing.\n - Main: Slightly update color and bottom navbar appearance.\n - About: link to XDA support page.\n - Translations: Import French translations.\n - Misc: Cleaned a bunch of unnecessary resources.\n\nv1.0\n - The very first public release of Smart Flasher, a simple app aimed to make flashing recovery zips much easier.",
3 | "inherit": true
4 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/fragments/AboutFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.fragments;
22 |
23 | import android.annotation.SuppressLint;
24 | import android.content.Intent;
25 | import android.graphics.Color;
26 | import android.net.Uri;
27 | import android.os.Bundle;
28 | import android.provider.Settings;
29 | import android.view.LayoutInflater;
30 | import android.view.View;
31 | import android.view.ViewGroup;
32 |
33 | import androidx.annotation.NonNull;
34 | import androidx.annotation.Nullable;
35 | import androidx.appcompat.widget.AppCompatImageButton;
36 | import androidx.fragment.app.Fragment;
37 | import androidx.recyclerview.widget.GridLayoutManager;
38 | import androidx.recyclerview.widget.RecyclerView;
39 |
40 | import com.google.android.material.textview.MaterialTextView;
41 | import com.smartpack.smartflasher.BuildConfig;
42 | import com.smartpack.smartflasher.R;
43 | import com.smartpack.smartflasher.activities.ChangeLogActivity;
44 | import com.smartpack.smartflasher.activities.CreditsActivity;
45 | import com.smartpack.smartflasher.utils.Flavour;
46 | import com.smartpack.smartflasher.utils.RecycleViewItem;
47 | import com.smartpack.smartflasher.utils.Utils;
48 |
49 | import java.util.ArrayList;
50 |
51 | /*
52 | * Created by sunilpaulmathew on November 19, 2020
53 | */
54 |
55 | public class AboutFragment extends Fragment {
56 |
57 | private final ArrayList mData = new ArrayList<>();
58 |
59 | @SuppressLint("UseCompatLoadingForDrawables")
60 | @Nullable
61 | @Override
62 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
63 | View mRootView = inflater.inflate(R.layout.fragment_about, container, false);
64 |
65 | mData.clear();
66 | mData.add(new RecycleViewItem(getString(R.string.version), BuildConfig.VERSION_NAME, getResources().getDrawable(R.drawable.ic_info), null));
67 | mData.add(new RecycleViewItem(getString(R.string.change_logs), getString(R.string.change_logs_summary), getResources().getDrawable(R.drawable.ic_eye), null));
68 | mData.add(new RecycleViewItem(getString(R.string.support), getString(R.string.support_summary), getResources().getDrawable(R.drawable.ic_support), "https://t.me/smartpack_kmanager"));
69 | mData.add(new RecycleViewItem(getString(R.string.source_code), getString(R.string.source_code_summary), getResources().getDrawable(R.drawable.ic_github), "https://github.com/SmartPack/SmartFlasher"));
70 | Flavour.launchAppStore(mData, requireActivity());
71 | mData.add(new RecycleViewItem(getString(R.string.donations), getString(R.string.donations_message), getResources().getDrawable(R.drawable.ic_donate), null));
72 | mData.add(new RecycleViewItem(getString(R.string.share), getString(R.string.share_app), getResources().getDrawable(R.drawable.ic_share), null));
73 | mData.add(new RecycleViewItem(getString(R.string.credits), getString(R.string.credits_summary), getResources().getDrawable(R.drawable.ic_contributors), null));
74 |
75 | RecyclerView mRecyclerView = mRootView.findViewById(R.id.recycler_view);
76 | mRecyclerView.setLayoutManager(new GridLayoutManager(requireActivity(), Utils.getSpanCount(requireActivity())));
77 | RecycleViewAdapter mRecycleViewAdapter = new RecycleViewAdapter(mData);
78 | mRecyclerView.setAdapter(mRecycleViewAdapter);
79 |
80 | mRecycleViewAdapter.setOnItemClickListener((position, v) -> {
81 | if (mData.get(position).getURL() != null) {
82 | Utils.launchUrl(mData.get(position).getURL(), requireActivity());
83 | } else if (position == 0) {
84 | Intent settings = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
85 | settings.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
86 | Uri uri = Uri.fromParts("package", BuildConfig.APPLICATION_ID, null);
87 | settings.setData(uri);
88 | startActivity(settings);
89 | } else if (position == 1) {
90 | Intent changelog = new Intent(getActivity(), ChangeLogActivity.class);
91 | startActivity(changelog);
92 | } else if (position == 5) {
93 | Flavour.showDonateOption(requireActivity());
94 | } else if (position == 6) {
95 | Intent shareapp = new Intent();
96 | shareapp.setAction(Intent.ACTION_SEND);
97 | shareapp.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));
98 | shareapp.putExtra(Intent.EXTRA_TEXT, getString(R.string.share_app_message, BuildConfig.VERSION_NAME));
99 | shareapp.setType("text/plain");
100 | Intent shareIntent = Intent.createChooser(shareapp, null);
101 | startActivity(shareIntent);
102 | } else {
103 | Intent credits = new Intent(getActivity(), CreditsActivity.class);
104 | startActivity(credits);
105 | }
106 | });
107 |
108 | return mRootView;
109 | }
110 |
111 | private static class RecycleViewAdapter extends RecyclerView.Adapter {
112 |
113 | private final ArrayList data;
114 |
115 | private static RecycleViewAdapter.ClickListener clickListener;
116 |
117 | public RecycleViewAdapter(ArrayList data) {
118 | this.data = data;
119 | }
120 |
121 | @NonNull
122 | @Override
123 | public RecycleViewAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
124 | View rowItem = LayoutInflater.from(parent.getContext()).inflate(R.layout.recycle_view_about, parent, false);
125 | return new RecycleViewAdapter.ViewHolder(rowItem);
126 | }
127 |
128 | @Override
129 | public void onBindViewHolder(@NonNull RecycleViewAdapter.ViewHolder holder, int position) {
130 | try {
131 | holder.mTitle.setText(this.data.get(position).getTitle());
132 | if (Utils.isDarkTheme(holder.mTitle.getContext())) {
133 | holder.mTitle.setTextColor(Utils.getThemeAccentColor(holder.mTitle.getContext()));
134 | }
135 | holder.mDescription.setText(this.data.get(position).getDescription());
136 | holder.mIcon.setImageDrawable(this.data.get(position).getIcon());
137 | if (position != 8 && !this.data.get(position).getTitle().equals("F-Droid")) {
138 | holder.mIcon.setColorFilter(Utils.isDarkTheme(holder.mIcon.getContext()) ? Color.WHITE : Color.BLACK);
139 | }
140 | } catch (ArrayIndexOutOfBoundsException ignored) {
141 | }
142 | }
143 |
144 | @Override
145 | public int getItemCount() {
146 | return this.data.size();
147 | }
148 |
149 | public static class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
150 | private final AppCompatImageButton mIcon;
151 | private final MaterialTextView mTitle;
152 | private final MaterialTextView mDescription;
153 |
154 | public ViewHolder(View view) {
155 | super(view);
156 | view.setOnClickListener(this);
157 | this.mIcon = view.findViewById(R.id.icon);
158 | this.mTitle = view.findViewById(R.id.title);
159 | this.mDescription = view.findViewById(R.id.description);
160 | }
161 | @Override
162 | public void onClick(View view) {
163 | clickListener.onItemClick(getAdapterPosition(), view);
164 | }
165 | }
166 |
167 | public void setOnItemClickListener(ClickListener clickListener) {
168 | RecycleViewAdapter.clickListener = clickListener;
169 | }
170 |
171 | public interface ClickListener {
172 | void onItemClick(int position, View v);
173 | }
174 | }
175 |
176 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/smartpack/smartflasher/activities/UpdateChannelActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 sunilpaulmathew
3 | *
4 | * This file is part of Smart Flasher, which is a simple app aimed to make flashing
5 | * recovery zip files much easier. Significant amount of code for this app has been from
6 | * Kernel Adiutor by Willi Ye .
7 | *
8 | * Smart Flasher is a free software: you can redistribute it and/or modify it under the terms
9 | * of the GNU General Public License as published by the Free Software Foundation, either
10 | * version 3 of the License, or (at your option) any later version.
11 | *
12 | * Smart Flasher is distributed in the hope that it will be useful, but WITHOUT ANY
13 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 | * PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License along with
17 | * Smart Flasher. If not, see .
18 | *
19 | */
20 |
21 | package com.smartpack.smartflasher.activities;
22 |
23 | import android.Manifest;
24 | import android.annotation.SuppressLint;
25 | import android.os.Bundle;
26 |
27 | import androidx.annotation.Nullable;
28 | import androidx.appcompat.app.AppCompatActivity;
29 | import androidx.appcompat.widget.AppCompatEditText;
30 | import androidx.appcompat.widget.AppCompatImageButton;
31 | import androidx.core.app.ActivityCompat;
32 |
33 | import com.google.android.material.card.MaterialCardView;
34 | import com.google.android.material.dialog.MaterialAlertDialogBuilder;
35 | import com.google.android.material.textview.MaterialTextView;
36 | import com.smartpack.smartflasher.R;
37 | import com.smartpack.smartflasher.utils.Flasher;
38 | import com.smartpack.smartflasher.utils.Utils;
39 |
40 | import org.json.JSONException;
41 | import org.json.JSONObject;
42 |
43 | import java.io.File;
44 | import java.util.Objects;
45 |
46 | /*
47 | * Created by sunilpaulmathew on May 30, 2020
48 | */
49 |
50 | public class UpdateChannelActivity extends AppCompatActivity {
51 | private AppCompatEditText mKernelNameHint;
52 | private AppCompatEditText mKernelVersionHint;
53 | private AppCompatEditText mDownloadLinkHint;
54 | private AppCompatEditText mChangelogHint;
55 | private AppCompatEditText mSHA1Hint;
56 | private AppCompatEditText mSupportHint;
57 | private AppCompatEditText mDonationHint;
58 | private MaterialCardView mCardView;
59 |
60 | @Override
61 | protected void onCreate(@Nullable Bundle savedInstanceState) {
62 | super.onCreate(savedInstanceState);
63 | setContentView(R.layout.activity_updatechannel);
64 |
65 | mCardView = findViewById(R.id.updatechannel_card);
66 | AppCompatImageButton mBack = findViewById(R.id.back_button);
67 | mBack.setOnClickListener(v -> onBackPressed());
68 | AppCompatImageButton mSave = findViewById(R.id.save_button);
69 | mSave.setOnClickListener(v -> {
70 | if (Utils.checkWriteStoragePermission(this)) {
71 | if (mKernelNameHint.getText() != null && !mKernelNameHint.getText().toString().equals("")
72 | && mKernelVersionHint.getText() != null && !mKernelVersionHint.getText().toString().equals("")
73 | && mDownloadLinkHint.getText() != null && !mDownloadLinkHint.getText().toString().equals("")) {
74 | saveUpdateChannel();
75 | } else {
76 | Utils.snackbar(mCardView, getString(R.string.update_channel_create_abort));
77 | }
78 | } else {
79 | ActivityCompat.requestPermissions(this, new String[]{
80 | Manifest.permission.WRITE_EXTERNAL_STORAGE},1);
81 | Utils.snackbar(mCardView, getString(R.string.permission_denied_write_storage));
82 | }
83 | });
84 | MaterialTextView mClearAll = findViewById(R.id.clear_all);
85 | mClearAll.setOnClickListener(v -> {
86 | if (isTextEntered()) {
87 | new MaterialAlertDialogBuilder(this)
88 | .setMessage(getString(R.string.clear_all_summary) + " " + getString(R.string.sure_question))
89 | .setNegativeButton(getString(R.string.cancel), (dialog1, id1) -> {
90 | })
91 | .setPositiveButton(getString(R.string.yes), (dialog1, id1) -> {
92 | clearAll();
93 | })
94 | .show();
95 | } else {
96 | Utils.snackbar(mCardView, getString(R.string.clear_all_abort_message));
97 | }
98 | });
99 | mKernelNameHint = findViewById(R.id.kernel_name_hint);
100 | mKernelVersionHint = findViewById(R.id.kernel_version_hint);
101 | mDownloadLinkHint = findViewById(R.id.download_link_hint);
102 | mChangelogHint = findViewById(R.id.changelog_hint);
103 | mSHA1Hint = findViewById(R.id.sha1_hint);
104 | mSupportHint = findViewById(R.id.support_hint);
105 | mDonationHint = findViewById(R.id.donation_link_hint);
106 | }
107 |
108 | private void clearAll() {
109 | mKernelNameHint.setText(null);
110 | mKernelVersionHint.setText(null);
111 | mDownloadLinkHint.setText(null);
112 | mChangelogHint.setText(null);
113 | mSHA1Hint.setText(null);
114 | mSupportHint.setText(null);
115 | mDonationHint.setText(null);
116 | }
117 |
118 | @SuppressLint("StringFormatInvalid")
119 | private void saveUpdateChannel() {
120 | Utils.dialogEditText(Objects.requireNonNull(mKernelNameHint.getText()).toString(),
121 | (dialogInterface, i) -> {
122 | }, text -> {
123 | if (text.isEmpty()) {
124 | Utils.snackbar(mCardView, getString(R.string.name_empty));
125 | return;
126 | }
127 | if (!text.endsWith(".json")) {
128 | text += ".json";
129 | }
130 | if (text.contains(" ")) {
131 | text = text.replace(" ", "_");
132 | }
133 | if (Utils.exist(new File(Utils.getStorageDir(this), text).getAbsolutePath())) {
134 | Utils.snackbar(mCardView, getString(R.string.already_exists, text));
135 | return;
136 | }
137 | try {
138 | JSONObject obj = new JSONObject();
139 | JSONObject kernel = new JSONObject();
140 | kernel.put("name", mKernelNameHint.getText());
141 | kernel.put("version", mKernelVersionHint.getText());
142 | kernel.put("link", mDownloadLinkHint.getText());
143 | kernel.put("changelog_url", mChangelogHint.getText());
144 | kernel.put("sha1", mSHA1Hint.getText());
145 | obj.put("kernel", kernel);
146 | JSONObject support = new JSONObject();
147 | support.put("link", mSupportHint.getText());
148 | support.put("donation", mDonationHint.getText());
149 | obj.put("support", support);
150 | Flasher.prepareFolder(Utils.getStorageDir(this).getAbsolutePath());
151 | Utils.create(obj.toString(), new File(Utils.getStorageDir(this), text).getAbsolutePath());
152 | Utils.snackbar(mCardView, getString(R.string.update_channel_create_success,
153 | new File(Utils.getStorageDir(this), text).getAbsolutePath()));
154 | } catch (JSONException ignored) {
155 | }
156 | }, this).setOnDismissListener(dialogInterface -> {
157 | }).show();
158 | }
159 |
160 | private boolean isTextEntered() {
161 | return mKernelNameHint.getText() != null && !mKernelNameHint.getText().toString().equals("")
162 | || mKernelVersionHint.getText() != null && !mKernelVersionHint.getText().toString().equals("")
163 | || mDownloadLinkHint.getText() != null && !mDownloadLinkHint.getText().toString().equals("")
164 | || mChangelogHint.getText() != null && !mChangelogHint.getText().toString().equals("")
165 | || mSHA1Hint.getText() != null && !mSHA1Hint.getText().toString().equals("")
166 | || mSupportHint.getText() != null && !mSupportHint.getText().toString().equals("")
167 | || mDonationHint.getText() != null && !mDonationHint.getText().toString().equals("");
168 | }
169 |
170 | @Override
171 | public void onBackPressed() {
172 | if (isTextEntered()) {
173 | new MaterialAlertDialogBuilder(this)
174 | .setMessage(getString(R.string.update_channel_create_warning) + " " + getString(R.string.sure_question))
175 | .setNegativeButton(getString(R.string.cancel), (dialog1, id1) -> {
176 | })
177 | .setPositiveButton(getString(R.string.yes), (dialog1, id1) -> {
178 | super.onBackPressed();
179 | })
180 | .show();
181 | } else {
182 | super.onBackPressed();
183 | }
184 | }
185 |
186 | }
--------------------------------------------------------------------------------