parent
0d7681bccb
commit
ca932b90e1
@ -1,18 +1,23 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from tools import container
|
||||||
from tools.helper import run
|
from tools.helper import run
|
||||||
from tools.logger import Logger
|
from tools.logger import Logger
|
||||||
|
|
||||||
|
|
||||||
class Android_id:
|
class Android_id:
|
||||||
def get_id(self):
|
def get_id(self):
|
||||||
if not os.path.isfile("/var/lib/waydroid/data/data/com.google.android.gsf/databases/gservices.db"):
|
|
||||||
|
if container.is_running():
|
||||||
|
queryout = run([
|
||||||
|
'waydroid','shell',
|
||||||
|
'sqlite3',
|
||||||
|
'/data/data/com.google.android.gsf/databases/gservices.db',
|
||||||
|
"select * from main where name = \"android_id\";"
|
||||||
|
])
|
||||||
|
else:
|
||||||
Logger.error("Cannot access gservices.db, make sure gapps is installed and waydroid was started at least once after installation and make sure waydroid is running !")
|
Logger.error("Cannot access gservices.db, make sure gapps is installed and waydroid was started at least once after installation and make sure waydroid is running !")
|
||||||
sys.exit(1)
|
return
|
||||||
sqs = """
|
|
||||||
SELECT * FROM main WHERE name='android_id'
|
|
||||||
"""
|
|
||||||
queryout = run(["sqlite3", "/var/lib/waydroid/data/data/com.google.android.gsf/databases/gservices.db", sqs.strip()])
|
|
||||||
print(queryout.stdout.decode().replace("android_id|", "").strip())
|
print(queryout.stdout.decode().replace("android_id|", "").strip())
|
||||||
print(" ^----- Open https://google.com/android/uncertified/?pli=1")
|
print(" ^----- Open https://google.com/android/uncertified/?pli=1")
|
||||||
print(" Login with your google id then submit the form with id shown above")
|
print(" Login with your google id then submit the form with id shown above")
|
||||||
|
Loading…
Reference in New Issue