diff --git a/README.md b/README.md index 27f522cc..34a330ab 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ A android app that take down the headace of remember passwords. It is open sourc 2. Download the apk for your phone. If Don't know the architecture of phone then download apk file that has universal in its name. 3. Install the apk and you are ready to use the app. +it was short and sweet description, for more detailed description vist the file [docs/installing.md](docs/installing.md) + ## Building The App 1. Clone the repository on your machine. @@ -29,7 +31,13 @@ A android app that take down the headace of remember passwords. It is open sourc 3. Follow the general step and build the app. -4. For code documention and support docs, check the `docs/` folder in our repository. You can even seek help on your [telegram community](https://t.me/passwordmanagercommunity) +4. For code documention and support docs, check the `docs/` folder in our repository. + +it was short and sweet description, for more detailed description vist the file [docs/building.md](docs/building.md) + +## Support Docs + +you can checkout support docs provided in [docs/](docs/) Or You can even seek help on our [telegram community](https://t.me/passwordmanagercommunity) ## Contribution Are Appicated!!! diff --git a/app/build.gradle b/app/build.gradle index 0af18c34..506ff222 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,6 +14,21 @@ android { versionName "0.1.0-Alpha" } + flavorDimensions "default" + + productFlavors { + dev { + dimension "default" + applicationIdSuffix ".dev" + versionNameSuffix "-Dev" + manifestPlaceholders = [appIcon: "@mipmap/dev_ic_launcher", appLabel: "Devpasscode"] // the name come from a parent project name "PassCodes" + } + prod { + dimension "default" + manifestPlaceholders = [appIcon: "@mipmap/ic_launcher", appLabel: "@string/app_name"] + } + } + signingConfigs { release { def keystorePropertiesFile = rootProject.file("keystore.properties") @@ -51,7 +66,8 @@ android { if (rootProject.file("keystore.properties").exists()) { signingConfig signingConfigs.release } - minifyEnabled false + + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 59174c8f..4bc04022 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -19,8 +19,8 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/dev_ic_launcher_background.xml b/app/src/main/res/drawable/dev_ic_launcher_background.xml new file mode 100644 index 00000000..07d5da9c --- /dev/null +++ b/app/src/main/res/drawable/dev_ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/dev_ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/dev_ic_launcher.xml new file mode 100644 index 00000000..9c155d17 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/dev_ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/dev_ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/dev_ic_launcher_round.xml new file mode 100644 index 00000000..9c155d17 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/dev_ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/mipmap-hdpi/dev_ic_launcher.webp b/app/src/main/res/mipmap-hdpi/dev_ic_launcher.webp new file mode 100644 index 00000000..c209e78e Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/dev_ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/dev_ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/dev_ic_launcher_round.webp new file mode 100644 index 00000000..b2dfe3d1 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/dev_ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/dev_ic_launcher.webp b/app/src/main/res/mipmap-mdpi/dev_ic_launcher.webp new file mode 100644 index 00000000..4f0f1d64 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/dev_ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/dev_ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/dev_ic_launcher_round.webp new file mode 100644 index 00000000..62b611da Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/dev_ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/dev_ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/dev_ic_launcher.webp new file mode 100644 index 00000000..948a3070 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/dev_ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/dev_ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/dev_ic_launcher_round.webp new file mode 100644 index 00000000..1b9a6956 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/dev_ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/dev_ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/dev_ic_launcher.webp new file mode 100644 index 00000000..28d4b77f Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/dev_ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/dev_ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/dev_ic_launcher_round.webp new file mode 100644 index 00000000..9287f508 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/dev_ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/dev_ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/dev_ic_launcher.webp new file mode 100644 index 00000000..aa7d6427 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/dev_ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/dev_ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/dev_ic_launcher_round.webp new file mode 100644 index 00000000..9126ae37 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/dev_ic_launcher_round.webp differ diff --git a/docs/building.md b/docs/building.md new file mode 100644 index 00000000..e0e73bc8 --- /dev/null +++ b/docs/building.md @@ -0,0 +1,61 @@ +# Detail Guide On Building Project + +Here, you will get the details about how to build the app (in recommended way). + +Note: This doc file assume that, you are build the project without android studio and with the 'scripts/installondevice.bat' script provided. + +## Prerequisites + +You will need `gradle` and `adb` accessible from commandline so, that script can do its job. + +something like this... +``` +PS C:\Users\HP> gradle help + +> Task :help + +Welcome to Gradle 8.9. + +Directory 'C:\Users\HP' does not contain a Gradle build. + +.... + +BUILD SUCCESSFUL in 1s +1 actionable task: 1 executed + +PS C:\Users\HP> adb help +Android Debug Bridge version 1.0.41 +Version 35.0.2-12147458 +Installed as C:...\cmdline-tools\lib\platform-tools\adb.exe + +.... +``` + +## Preparing For A Build. + +Here, are the things you required, first you will need a `keystore.properties` & `passwordmanager.jks` in project root. So, that the script can be able to sign the apk file when generated. second thing you might need is a mobile device with use debugging connect to your machine because script install the app dirctly using `adb`. + +### Template For keystore.properties + +``` +keyAlias=passwordmanager +keyPassword= +storeFile=./../passwordmanager.jks +storePassword= +``` + +**Fill the keyPassword and storePassword** and you are good to go. + +## Finial Run Script For Building + +you can build the app for production and dev version. + +Dev Builds +```bat +installondevice.bat +``` + +Production Builds +``` +installondevice.bat prod +``` diff --git a/docs/installing.md b/docs/installing.md new file mode 100644 index 00000000..ea8c00a3 --- /dev/null +++ b/docs/installing.md @@ -0,0 +1,109 @@ +# Detail Guide On Installion + +This file give you a deep guide on installion & updation process. we hope that you have already readed the step written in readme but, aren;t satisfied with that and need more info and guide on installion and updation. + +## Installion Process + +For inital installion of app, you follow step given below it work in most sinerio. + +1. Checking whether the app can run on your device or not. + + - go to your setting app and check whether you are on android 8+ or not? + + - if no, then sorry app is not comatible with your device. + + - if yes, then mostly you are good to go but, officially we only support device between android 8 to 13. for more high android version app can be runned but we don;t officially support it. + +2. After completing first step, Picking the version of app to install. + + - Go to our [github repository release page](https://github.com/JeelDobariya38/password-manager/releases). There you will fing a list of release avaiable. + + - pick up any one of the release you like. (we recommend you pick a good release [how can you find a good release](#Guide-to-find-a-best-release)?) + + - after pick up a release, you can read the changelog to know what change (optional step) + + +3. Downloading apk files + - after pick up a release, you can scroll to the assets and download the apk that better fits your phone cpu architecture. + + - if you don;t know cpu architecture. just download the apk file that has universal in its name. + +4. Installing apk files. + - install the apk file. the apk file will be downloaded in your browser (probably like chrome, firefox or edge). + + - open the app. + +if any problem occur while performing the above 4 step. report your problem using github issues after checking other support docs avaiable in github repositoy "docs/" folder. + +## Updation Process + +As you are reading this part, we hope that you have password-manager app installed on your phone and now, you want update it. + +you can follow the below step. they work for most senerios. + +> [!IMPORTANT] +> updating from one version to another might result into data loss though it occur very rarely. but, it good to take a data backup. +> occur mostly when you update from one major version to another major version meaning from 1.x.x to 2.x.x. + +1. Checking Whether The Update Exist Or Not + - compare your current app version (you can find it in app info in setting app) with lastest app update. + + - check whether a update exist or not? + + - if no, then you can;t update but, can surely enquire about the next update using github issues. + + - if yes, check how big the update is and how it affect your expirence as user? + + - to find the update impact you can check what the difference between your version and new version you updating to. + + - eg, if you update from 1.x.x to 2.x.x the the change will be big. if you update from 1.x.0 to 1.x.2 then change might be not visible even. + +2. Downloaded the updated apk files. + - it is same as you did earlier while installing the app. + + - goto release page and download the asset from select release. refer intallion guide above if needed. + +3. Update the app. + - if, you updating to a new major meaning from 1.x.x to 2.x.x then, don;t forget to backup your data. + + - now install the new apk file it will ask you to upgrade instead of install. + + - open the app and enjoy your updated expirence. + +4. Restore the backup if need. + - if, needed restore the files/data back. or even revert to prevoius release if, problem occurs. + + - we admire the contribution even in form of your exprience with app. meaning, report your data erase problem it help us make better exprience & fix bug that might be missed by us. + +## Guide to find a best release + +To find a best release you should have knowledge of password-manager versioning system and type of releases we release. + +### release types + +On our github release page you will find majorly `5 (3+2)` type of release. Where each type of release label tell you something about release. +Each release on github may have a label but, some even lack them completely. These label tends to tell more about release, so they are IMPORTANT to consider. + +Three type that are there in app itself, you find them in release title on github: +(this tags/labels can;t change after initial release of that version is done). + + - Alpha: special design for development purpose, not intented to use by end users, they comes with bugs and venurablitity. + - Beta: release that can be used by mass audience, can contain minior bugs. + - Stable: are likey to be more stable then others release type, contain nearly zero bugs as they are well tested. + +Two type are specific to github release. they are label on release itself: +(this tags can label can change with time as they are dynamic and are not tied to app itself. meaning they are no hard coded anywhere) + + - Pre Release: this release are not so good to install or to stick with. they are generally like `marked as deperacted` or more like `yanked release` + - Latest: this release label make a release as the best up to date release to install. + +> [!NOTE] +> this label or flag changes with time. mean a app after it release can marked later as pre-release as there are lots of bug found or as latest release as it all good after test in production enviroment. + +So, here is a list in order where starting type are best and ending types are worse. + + - STABLE (the best) > LATEST > BETA > ALPHA > PRE-RELEASE > RELEASE-WITH-NO-FLAGS (the worst) + + +> [!NOTE] +> Some release can even have two flag at a time. for example, stable and pre-release. I such case consider the github base label in this case pre-release. as they are dynamic and provide the latest infomation from us (developer part). diff --git a/installondevice.bat b/installondevice.bat index 418147d0..637b619f 100644 --- a/installondevice.bat +++ b/installondevice.bat @@ -1,10 +1,20 @@ @REM Build & install on Android phone @REM Force continuation after Gradle command by capturing the output -call gradle build -if ERRORLEVEL 1 ( - echo Gradle build failed! Check build_output.txt for details. - exit /b 1 +if "%~1"=="prod" ( + echo building a production build + call gradlew clean assembleProdRelease + if ERRORLEVEL 1 ( + echo Gradle build failed! Check build_output.txt for details. + exit /b 1 + ) +) else ( + echo building a development build + call gradlew assembleDevDebug + if ERRORLEVEL 1 ( + echo Gradle build failed! Check build_output.txt for details. + exit /b 1 + ) ) @REM Start ADB server @@ -23,7 +33,21 @@ if ERRORLEVEL 1 ( ) @REM Install the APK on the connected device -adb install ./app/build/outputs/apk/release/app-universal-release.apk +if "%~1"=="prod" ( + echo Installing a production apk + adb install ./app/build/outputs/apk/prod/release/app-prod-universal-release.apk + if ERRORLEVEL 1 ( + echo Gradle build failed! Check build_output.txt for details. + exit /b 1 + ) +) else ( + echo Installing a dev apk + adb install ./app/build/outputs/apk/dev/debug/app-dev-universal-debug.apk + if ERRORLEVEL 1 ( + echo Gradle build failed! Check build_output.txt for details. + exit /b 1 + ) +) if ERRORLEVEL 1 ( echo APK installation failed! Exiting... adb kill-server