Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Welcome to Jericho!
- In the game Detroit: Become Human, deviant androids are androids that have decided to break free from their programming and live a life of their own. Jericho is a safe haven for deviant androids to live.
- Similarly, in the television world, many content creators have decided to break free from or have never been part of corporate media. Many of them rely on donations from viewers in order to be able to do so. Unfortunately, only a small percentage of viewers actually donate to content creators. This script is codenamed Jericho since it is intended to be shared with viewers who want to support content creators. They can then make a profit mining Swagbucks and share that profit with their favorite content creators.
- Before you start: The mining pools impose IP limits so multiple setups on the same IP address will not work. They also only allow mining from some countries including the US. The script will require some modifications to work with your device. Expect about $17/month of profit as of December 2018. That's not much until many viewers do it and the donations add up! The profit will continue to slowly go down as difficulty increases. The more miners online, the faster the difficulty will rise. *Therefore, please only share this script with people you trust to give back to community!*
- As for who to support, I strongly recommend supporting Fran Blanche and/or Naomi Wu because they're currently in most need of support. I suggest giving at least 80% of the profit since the setup is very energy efficient and less than 5% is sufficient to cover electricity expenses. It would probably work best using yourself as an exchange service - e.g. use a credit card to give to the creators and exchange the mined Swagbucks for gift cards you can use to offset the cost.
- Fran Blanche:
- https://www.youtube.com/user/ContourCorsets/videos
- https://www.patreon.com/frantone
- Naomi Wu:
- https://www.youtube.com/channel/UCh_ugKacslKhsGGdXP0cRRA/videos
- https://www.subscribestar.com/naomi-wu
- https://www.sther.co/naomiwu
- https://en.tipeee.com/naomiwu
- Please note that they are not officially involved with this script so do not contact them regarding it - this script was shared out of my interest to support independent television!
- Requirements:
- * Raspberry Pi or other low power Linux computer
- * dedicated phone or tablet running at least Android 5, rooted
- * old pair of headphones, 3.5mm plug/cable, or hardware modification to mute device
- * Python 2.7 (this script is old and is not guaranteed to work on Python 3)
- * adb
- * AdAway
- * Swagbucks mining apps - Swagbucks Watch, EntertainNow, Indymusic.tv, Lifestylz.tv, MovieCli.ps, Sportly.tv, Swagbucks
- Set up a Swagbucks account if you don't already have one. Don't bother with buying Swagbucks or taking the surveys - it's far more profitable to mine!
- Install the mining apps and AdAway. (Do not run AdAway yet.) I suggest using Apkpure (https://apkpure.com/) either on the device or downloading the APKs on your PC and then using adb to install them onto the device. Afterwards, disable the browsers and Play store on the device, disable the lockscreen, mute the device, and enable adb if it isn't already. Also enable displaying touch coordinates to make it easy to edit the adb tap commands.
- Open one mining app, log it in, and add favorites (except for the Swagbucks app) - see the following as a guideline for the shortest videos which maximise profits:
- https://www.reddit.com/r/SwagBucks/comments/91jzyd/what_are_the_current_shortest_videos_for_each/
- Manually run the app to test it. Take note of the menu coordinates since those will be needed later. It's OK if it gets stuck on an ad - that will be solved in the next step. Exit the app and move on to the next one. Repeat until every app has been set up.
- Close all apps and open Adaway. Select just the topmost entry in the list (https://adaway.org/hosts.txt), go into the user lists, and add the following to the blacklist:
- * ads.tremorhub.com
- * ads30.adcolony.com
- * config.tremorhub.com
- * device-api.urbanairship.com
- * e.crashlytics.com
- * events3.adcolony.com
- * i.yimg.com
- * mediate-android-b74.hyprmx.com
- * remote-data.urbanairship.com
- * rm4.adtilt.com
- * syn.entertainmentcrave.com
- * wd.adcolony.com
- Now apply the changes and close AdAway.
- Place shortcuts of each app on the home screen. Note their coordinates in order to edit the tap commands used to automatically start them. Have the Swagbucks app run last since it is slower than the others.
- Set the Raspberry Pi to Pacific time zone if it isn't already. Install adb on the Raspberry Pi if it isn't already and run adb devices with the device connected to verify it can be seen. The device may ask whether or not to allow adb access, in which case select the option to remember and press yes.
- Now just run this script and with luck, it will automatically start mining every day. Some debugging is likely to be necessary for it to run flawlessly.
- Copyright (C) 2016-2019 Mike Lu
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
- """
- import subprocess
- from time import sleep
- from time import time
- from time import localtime
- ip="0123456789ABCDEF" # IP address or serial number of device
- def connect(ip):
- if "." in ip:
- subprocess.check_output(["adb","connect",ip])
- else:
- subprocess.check_output(["adb","-s",ip,"shell","echo ok"])
- def startminer(ip,menu="input tap 36 380"):
- if menu is not None:
- subprocess.check_output(["adb","-s",ip,"shell","input tap 33 88"])
- sleep(3)
- subprocess.check_output(["adb","-s",ip,"shell",menu])
- sleep(3)
- subprocess.check_output(["adb","-s",ip,"shell","input tap 36 250"])
- else:
- subprocess.check_output(["adb","-s",ip,"shell","input tap 200 400"])
- sleep(15)
- def closeall(ip): # stop all apps
- subprocess.check_output(["adb","-s",ip,"shell","input keyevent 3"])
- subprocess.check_output(["adb","-s",ip,"shell","am force-stop com.sportly.views"])
- subprocess.check_output(["adb","-s",ip,"shell","am force-stop com.movieclips.views"])
- subprocess.check_output(["adb","-s",ip,"shell","am force-stop com.lifestylztv.views"])
- subprocess.check_output(["adb","-s",ip,"shell","am force-stop com.entertainnowmobile.views"])
- subprocess.check_output(["adb","-s",ip,"shell","am force-stop com.indymusictv.views"])
- subprocess.check_output(["adb","-s",ip,"shell","am force-stop com.prodege.swagbucksmobile"])
- subprocess.check_output(["adb","-s",ip,"shell","am force-stop com.swagbuckstvmobile.views"])
- subprocess.check_output(["adb","-s",ip,"shell","input keyevent 3"])
- sleep(1)
- def checkminer(ip,timeout_i=45,restart="input tap 800 380",menu="input tap 36 380",lp=False):
- proc=None
- errorcount=0
- timeout=timeout_i
- res=""
- while True:
- try:
- connect(ip)
- sleep(1)
- subprocess.check_output(["adb","-s",ip,"logcat","-c"])
- proc=subprocess.Popen(["adb","-s",ip,"logcat"],stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
- lastupdate=time()
- if "- waiting for device -" in proc.stdout.readline():
- errorcount=0
- raise IOError
- while (time()-lastupdate)<5:
- proc.stdout.readline()
- lastupdate=time()
- stuckcount=0
- while True:
- line=proc.stdout.readline()
- if ": AH vidur 0" in line or "returning error: 0x80001001" in line or "GraphicBufferAllocator: Failed to allocate" in line:
- subprocess.check_output(["adb","-s",ip,"reboot"])
- errorcount=0
- sleep(120)
- connect(ip)
- startminer(ip,menu)
- raise IOError
- elif "AH " in line or "OkHttp" in line:
- print(line.strip())
- lastupdate=time()
- timeout=timeout_i
- if "sb_today" in line:
- res=line.strip()
- if "was_in_bonus" in line:
- stuckcount=0
- errorcount=0
- if "win/at limit" in line or '"to_win":0,"current_count":0,"bonus":false' in line:
- print("limit reached")
- proc.terminate()
- return res
- elif "Player" in line and "NuPlayer" not in line or "OMX" in line or "Ads" in line:
- #print(line)
- stuckcount=0
- timeout=timeout_i
- if (time()-lastupdate)>15:
- print("Last update "+str(time()-lastupdate)+" seconds ago")
- lastupdate=time()
- elif (time()-lastupdate)>timeout:
- print("Appears to be stuck, trying to unstick")
- stuckcount=stuckcount+1
- timeout=timeout_i/2
- subprocess.check_output(["adb","-s",ip,"shell","input tap 1400 21"])
- subprocess.check_output(["adb","-s",ip,"shell","input tap 800 21"])
- if stuckcount==2:
- if errorcount>12:
- return "Error"
- subprocess.check_output(["adb","-s",ip,"shell","input keyevent 4"])
- sleep(5)
- startminer(ip,menu)
- errorcount=errorcount+1
- elif stuckcount==3:
- if errorcount>12:
- return "Error"
- closeall(ip)
- subprocess.check_output(["adb","-s",ip,"shell",restart])
- sleep(25)
- startminer(ip,menu)
- errorcount=errorcount+1
- elif stuckcount>3:
- if errorcount>12:
- return "Error"
- raise IOError
- lastupdate=time()
- elif lp:
- ctime=localtime()
- if (ctime.tm_hour==23) and ctime.tm_min>=59: # exit low priority app to allow more profitable app to run
- proc.terminate()
- return ""
- except IOError:
- try:
- errorcount=errorcount+1
- if "." in ip:
- subprocess.check_output(["adb","disconnect",ip])
- else:
- subprocess.check_output(["adb","-s",ip,"shell","echo ok"])
- except:
- pass
- except:
- pass
- proc.terminate()
- sleep(10)
- print("Welcome to Jericho!")
- results=["","","","","","",""]
- while True:
- try:
- connect(ip)
- sleep(1)
- closeall(ip)
- subprocess.check_output(["adb","-s",ip,"shell","input tap 800 380"]) # start app
- sleep(25)
- startminer(ip)
- starttime=time()
- results[0]=checkminer(ip,45,"input tap 800 380") # also give coordinates here for automatically restarting app
- subprocess.check_output(["adb","connect",ip])
- sleep(1)
- closeall(ip)
- subprocess.check_output(["adb","-s",ip,"shell","input tap 800 150"]) # start app
- sleep(25)
- startminer(ip)
- results[1]=checkminer(ip,45,"input tap 800 150")
- subprocess.check_output(["adb","connect",ip])
- sleep(1)
- closeall(ip)
- subprocess.check_output(["adb","-s",ip,"shell","input tap 660 150"]) # start app
- sleep(25)
- startminer(ip)
- results[2]=checkminer(ip,45,"input tap 660 150")
- subprocess.check_output(["adb","connect",ip])
- sleep(1)
- closeall(ip)
- subprocess.check_output(["adb","-s",ip,"shell","input tap 520 150"]) # start app
- sleep(25)
- startminer(ip)
- results[3]=checkminer(ip,45,"input tap 520 150")
- subprocess.check_output(["adb","connect",ip])
- sleep(1)
- closeall(ip)
- subprocess.check_output(["adb","-s",ip,"shell","input tap 370 150"]) # start app
- sleep(25)
- startminer(ip)
- results[4]=checkminer(ip,45,"input tap 370 150")
- subprocess.check_output(["adb","connect",ip])
- sleep(1)
- closeall(ip)
- subprocess.check_output(["adb","-s",ip,"shell","input tap 240 150"]) # start app
- sleep(25)
- startminer(ip)
- results[5]=checkminer(ip,45,"input tap 240 150")
- subprocess.check_output(["adb","connect",ip])
- sleep(1)
- closeall(ip)
- if (time()-starttime)>60000: # if previous apps have run for a long time, give them a rerun before moving on
- continue
- subprocess.check_output(["adb","-s",ip,"shell","input tap 800 600"]) # start Swagbucks
- sleep(25)
- startminer(ip,menu=None)
- results[6]=checkminer(ip,120,"input tap 800 600",menu=None,lp=True)
- connect(ip)
- sleep(1)
- closeall(ip)
- for result in results: # print summary
- print(result)
- while True: # wait for next day
- ctime=localtime()
- if (ctime.tm_hour==23) and ctime.tm_min==59:
- break
- if (ctime.tm_hour==0) and ctime.tm_min<=5:
- break
- sleep(10)
- for i in range(3):
- subprocess.check_output(["adb","-s",ip,"shell","input keyevent 3"]) # wake up device
- except:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement