Open muzzol opened 4 years ago
This command doesn't require root, but it will clear all application data, including your "sign in". It means that you'll have to sign in each time again. Even if we implement "signing in" in the script, too much "sign in" requests are not good – I'm pretty sure Instagram will block them for your IP.
Why do you want to clear cache by the way?
Hi, I maked this function to clean instagram cache every new session or after crash, this function remove the cache dir from instagram:
def clear_instagram_cache(device_id):
print("[I] Clear Instagram cache")
os.popen("adb" + ("" if device_id is None else " -s " + device_id) +
" shell 'rm -rf /data/data/com.instagram.android/cache/*' ")
random_sleep(3)
@muzzol @guztavoalves is it for memory economy on a device?
This command doesn't require root, but it will clear all application data, including your "sign in". It means that you'll have to sign in each time again. Even if we implement "signing in" in the script, too much "sign in" requests are not good – I'm pretty sure Instagram will block them for your IP.
Why do you want to clear cache by the way?
sorry for the late response, I was busy.
I'm confused because when you get blocks the app says:
"Seems that action is blocked. Consider reinstalling Instagram app and be more careful"
reinstalling and clearing all cache/data is mostly the same, and some users report that clearing cache helps with blocks/softbans (there's a lot of comments about that in telegram group), so if this is not the case, just ignore this feature request. but it would be nice to clarify it, because I assumed it was a common thing to do when you get blocked. I'm using emulation by the way, not sure if that's relevant info.
Yes, that might be a good feature, but what about signing in? You have to sign in again each time you clear cache, don't you?
@alexal1 Using the function above is not necessary sign in again, because this function remove the cache dir of the IG, this action have same effect of the android system > 'clear cache'
This function help devices with low memory, to not freeze Android after many sessions
EN
This function help devices with low memory, to not freeze Android after many sessions
so you do it for performance reasons?
we need to clarify it because I see some people doing it to solve "action blocked" problem. (there's tons of vídeos explaining that on yt)
@alexal1 can you explain why do you suggest to reinstall the app when a block is detected?
@muzzol ok, I'll test this code and add it to the script if everything's ok. Thank you!
I think what makes the user login again is when clearing data, not cache. But I think this might slow down the runs since, i.e. the users' profile pictures would be erased and every time the bot goes back to a list of users to interact it will have to load them all again.
What about detecting when IG shows "action blocked" and only in that case we would clear the cache?
About clearing the cache, I use it only for performance reasons on devices with low memory, as I already had problems with Android crashes.
And about IG blocks, it depends on the type of block you received, I know two types, soft ban and shadow ban.
Soft ban, wait a few hours and try again or log out of the account and log in again, this type of ban is only applied in the session that originated SPAM. In some cases, even when starting a new session on the IG, the soft ban remains.
Shadow ban, this is more complicated, as it is applied to the user's account and remains active for about 7 days, no matter if you log out and log in again or change devices, the shadowban remains, as it is done in the user's account.
Important: Whenever we receive a type of ban, the IG places our account under a bot detection system, so for approximately 48 hours our actions will be 'watched' and we can receive more blocks. The interaction limits per day also decrease. You may be asked to reset your account password.
It would be good to create a routine to deal with the soft ban:
The Loop:
Shadow Ban:
Soft Ban:
@guztavoalves , do you have the hierarchy dump for those ban messages? If yes, could you please share it? It would help developing the detect_block().
this is a feature request to add an option to clear cache and data when starting the app. something like --clear-cache
I've digged a little bit and is as simple as executing this two commands:
maybe with a sleep between them. I think they don't need root acces, but I'm not sure. maybe a prior check to see if device is rooted or not could be usefull too with something like
thanks for your time