-
Notifications
You must be signed in to change notification settings - Fork 31
Update termux.md #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,34 +2,143 @@ | |
# Use GramAddict without pc | ||
|
||
|
||
## Step 1: Download and Install Termux | ||
## 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/) | ||
or | ||
[Official PlayStore](https://play.google.com/store/apps/details?id=com.termux) | ||
|
||
After installation you can skip to __step 2__. | ||
|
||
## 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 | ||
|
||
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 | ||
MelleNi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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 python 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 | ||
|
||
pkg install scipy | ||
|
||
export 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 | ||
``` | ||
|
||
If you want telegram reports, you should follow this extra step: | ||
``` | ||
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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's cool but we already have the config-example is we There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't have the config-example folder, after following the old installation instructions |
||
|
||
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 # if you're using telegram reports | ||
|
||
# etc | ||
``` | ||
|
||
## Step 5: Run | ||
|
||
``` | ||
# enable wake lock to make sure your device does not go into deep sleep | ||
|
||
termux-wake-lock | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be nice to have the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree, but requires root, would be nicer if someone found a way to do this without root on all devices There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am pretty sure you can just use termux:boot instead and let it run adb tcpip port There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That'd be kind of weird though, no? Since what is it going to adb? When I run The whole issue is that without root, you cannot open a static port (which makes sense). There is an open port for pairing + a pairing code, which are randomised every time they are requested, so you cannot use these on boot (unless you could somehow access this info automatically with a script). I've been trying to find a workaround, but I haven't found one so far. The closest thing to a solution for an unrooted phone seems to be installing TWRP and changing system files in recovery mode, but at that point you've already unlocked your bootloader, and you might as well tell people to just root their phones. So that's not a solution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are supposed to be connected to localhost already, not sure if that works via usb adb only? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How would you already be connected to localhost? The static port part refers to the wireless pairing not having a static port. If it had a static port + pairing code, this would be 3 lines of code with Termux:boot. I don't know about other brands, but on samsung unlocking bootloader trips knox and voids warranty, which is irreversible. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well that is the part I was trying to figure. |
||
python -m uiautomator2 init | ||
|
||
python run.py | ||
``` | ||
|
||
## How can I access termux files? | ||
Read that article | ||
|
@@ -50,6 +159,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 | ||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but is should be reinstalled at some point
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the pointless bash does it, I never reinstalled it manually