From b6a9fbfa103cd662633ad8d736a842e5d2643e24 Mon Sep 17 00:00:00 2001 From: MelleNi Date: Mon, 31 Jan 2022 12:02:03 +0000 Subject: [PATCH 1/5] Update termux.md updated so that telegram-reports will actually work --- termux.md | 130 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 113 insertions(+), 17 deletions(-) diff --git a/termux.md b/termux.md index e4ffbf7..5b24462 100644 --- a/termux.md +++ b/termux.md @@ -2,34 +2,126 @@ # Use GramAddict without pc -## Step 1: Download and Install Termux +## Step 1a: If you don't have Termux installed + +You can download Termux from f-droid or the Google Play store. Get the f-droid version, since the Play store version does not support some features. [Apk from f-droid](https://f-droid.org/it/packages/com.termux/) -or -[Official PlayStore](https://play.google.com/store/apps/details?id=com.termux) + +## Step 1b: If you have Termux installed + +To get this to work, we need to delete all pip packages and python + +``` +# Remove all python packages + +pip freeze > unins && pip uninstall -y -r unins && rm unins + +# Find the path of the cache for pip... + +pip cache dir + +# ... and clean it + +rm -rf /data/data/com.termux/files/home/.cache/pip + +# Delete python completely + +apt remove --purge python +``` + ## Step 2: Install required packages - pkg upgrade -y - curl -LO https://its-pointless.github.io/setup-pointless-repo.sh - bash setup-pointless-repo.sh - pkg install android-tools python build-essential cmake libjpeg-turbo libpng libxml2 libxslt freetype git -y - pip install wheel +``` +pkg upgrade -y +pkg install build-essential clang make pkg-config +curl -LO https://its-pointless.github.io/setup-pointless-repo.sh +bash setup-pointless-repo.sh +pkg install android-tools cmake libcompiler-rt pytz cython setuptools libjpeg-turbo libpng libxml2 libxslt freetype git libtiff -y + +# install numpy and scipy with pkg NOT with pip + +pkg install numpy + +pkg install scipy + +xport CFLAGS=" -Wno-deprecated-declarations -Wno-unreachable-code" + +export LDFLAGS=" -lm -lcompiler_rt" + +# install Pandas, this can take hours, depends on your device (I don't recommend doing this over ssh) + +pip install pandas +``` ## Step 3: Install GramAddict +Termux puts all your files in an emulated folder structure, which can be annoying. You can install GramAddict onto a normal folder: + +``` +# give Termux permission to access your device's storage + +termux-setup-storage + +# cd into the non-emulated /sdcard/ folder + +cd /sdcard +``` + This procedure is slow, use -vvv in pip if you want to see if everything installing alright - - git clone https://github.com/gramaddict/bot.git gramaddict - cd gramaddict - pip install -r requirements.txt -You can also install GramAddict using pip, but in that case you won't have the config-example folder ready to go. +``` +# download and install GramAddict + +git clone https://github.com/gramaddict/bot.git gramaddict + +cd gramaddict + +# I don't recommend doing this over ssh + +pip install -r requirements.txt + +pip install GramAddict[telegram-reports] +``` -## Step 4: Run - - python -m uiautomator2 init - python run.py +## Step 4: Config + +``` +# make accounts folder and folder for your account + +mkdir accounts + +mkdir accounts/[your-account-name] + +# download the config examples and put them in the correct folder + +wget -O - https://github.com/GramAddict/bot/archive/master.tar.gz | tar -xz --strip=2 "bot-master/config-examples" + +mv -v config-examples/* accounts/[your-account-name] + +# edit the files using nano + +nano accounts/[your-account-name]/config.yml + +nano accounts/[your-account-name]/filters.yml + +nano accounts/[your-account-name]/telegram.yml + +# etc +``` + +## Step 5: Run + +``` +# enable wake lock to make sure your device does not go into deep sleep + +termux-wake-lock + +python -m uiautomator2 init + +python run.py +``` ## How can I access termux files? Read that article @@ -50,6 +142,10 @@ Then you can edit and view GramAddict files. * now you should be able to see your device ID in `adb devices` * when I start the bot it looks like it freezes after opening IG and termux shell has been closed * edit your `accounts/yourusername/config.yml` file and set `close-apps: false` +* I am connected, it says my device is not connected when I run GramAddict + * `adb devices` + * check the ID of your device, it might have changed to `emulator-5554` + * update the device ID in the config file From 03aa1a176de41fd3ef86b659253c12e4b4d65ee5 Mon Sep 17 00:00:00 2001 From: MelleNi Date: Mon, 31 Jan 2022 21:05:49 +0000 Subject: [PATCH 2/5] Update termux.md made some changes --- termux.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/termux.md b/termux.md index 5b24462..d0fa83e 100644 --- a/termux.md +++ b/termux.md @@ -2,15 +2,20 @@ # Use GramAddict without pc -## Step 1a: If you don't have Termux installed +## Step 0: If you don't have Termux installed You can download Termux from f-droid or the Google Play store. Get the f-droid version, since the Play store version does not support some features. [Apk from f-droid](https://f-droid.org/it/packages/com.termux/) -## Step 1b: If you have Termux installed +After installation you can skip to __step 2__. -To get this to work, we need to delete all pip packages and python +## Step 1: Only if you already have Termux installed + +_Skip this step if you just installed Termux_ + +Some packages cause things to clash and not install properly, so let's clean up our Termux. +Delete all pip packages and python: ``` # Remove all python packages @@ -39,7 +44,11 @@ pkg install build-essential clang make pkg-config curl -LO https://its-pointless.github.io/setup-pointless-repo.sh bash setup-pointless-repo.sh pkg install android-tools cmake libcompiler-rt pytz cython setuptools libjpeg-turbo libpng libxml2 libxslt freetype git libtiff -y +``` + +If you want telegram reports, you should follow these extra steps +``` # install numpy and scipy with pkg NOT with pip pkg install numpy @@ -53,6 +62,7 @@ export LDFLAGS=" -lm -lcompiler_rt" # install Pandas, this can take hours, depends on your device (I don't recommend doing this over ssh) pip install pandas + ``` ## Step 3: Install GramAddict @@ -81,7 +91,10 @@ cd gramaddict # I don't recommend doing this over ssh pip install -r requirements.txt +``` +If you want telegram reports, you should follow this extra step: +``` pip install GramAddict[telegram-reports] ``` @@ -106,7 +119,7 @@ nano accounts/[your-account-name]/config.yml nano accounts/[your-account-name]/filters.yml -nano accounts/[your-account-name]/telegram.yml +nano accounts/[your-account-name]/telegram.yml # if you're using telegram reports # etc ``` From bfcc6b578d2a947a58364ffd802d3a01caaffd04 Mon Sep 17 00:00:00 2001 From: MelleNi Date: Tue, 1 Feb 2022 10:58:58 +0000 Subject: [PATCH 3/5] Update termux.md --- termux.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/termux.md b/termux.md index d0fa83e..a9f3975 100644 --- a/termux.md +++ b/termux.md @@ -43,12 +43,16 @@ pkg upgrade -y pkg install build-essential clang make pkg-config curl -LO https://its-pointless.github.io/setup-pointless-repo.sh bash setup-pointless-repo.sh -pkg install android-tools cmake libcompiler-rt pytz cython setuptools libjpeg-turbo libpng libxml2 libxslt freetype git libtiff -y +pkg install android-tools cmake libcompiler-rt libjpeg-turbo libpng libxml2 libxslt freetype git libtiff -y ``` If you want telegram reports, you should follow these extra steps ``` +pip install pytz cython + +pip install setuptools --upgrade + # install numpy and scipy with pkg NOT with pip pkg install numpy From a327539fe17eee57f8284f1a3875868f2901c0c1 Mon Sep 17 00:00:00 2001 From: MelleNi Date: Tue, 1 Feb 2022 15:26:04 +0000 Subject: [PATCH 4/5] Update termux.md --- termux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termux.md b/termux.md index a9f3975..dc8a9e9 100644 --- a/termux.md +++ b/termux.md @@ -59,7 +59,7 @@ pkg install numpy pkg install scipy -xport CFLAGS=" -Wno-deprecated-declarations -Wno-unreachable-code" +export CFLAGS=" -Wno-deprecated-declarations -Wno-unreachable-code" export LDFLAGS=" -lm -lcompiler_rt" From b4b2814fdfcf1d5c2548f844e10ab30ceaa16bcc Mon Sep 17 00:00:00 2001 From: MelleNi Date: Wed, 2 Feb 2022 12:01:10 +0000 Subject: [PATCH 5/5] Update termux.md --- termux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termux.md b/termux.md index dc8a9e9..44caf31 100644 --- a/termux.md +++ b/termux.md @@ -43,7 +43,7 @@ pkg upgrade -y pkg install build-essential clang make pkg-config curl -LO https://its-pointless.github.io/setup-pointless-repo.sh bash setup-pointless-repo.sh -pkg install android-tools cmake libcompiler-rt libjpeg-turbo libpng libxml2 libxslt freetype git libtiff -y +pkg install android-tools python cmake libcompiler-rt libjpeg-turbo libpng libxml2 libxslt freetype git libtiff -y ``` If you want telegram reports, you should follow these extra steps