Uninstall function, microG installation and some hacks #70

Merged
ayasa520 merged 42 commits from main into main 2023-05-28 02:54:02 -04:00
2 changed files with 13 additions and 8 deletions
Showing only changes of commit ca932b90e1 - Show all commits
+11 -6
View File
@@ -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")
+2 -2
View File
@@ -23,8 +23,8 @@ def get_download_dir():
def get_data_dir(): def get_data_dir():
return os.path.join('/', "home", os.environ.get("SUDO_USER", os.environ["USER"]), ".local", "share", "waydroid", "data") return os.path.join('/', "home", os.environ.get("SUDO_USER", os.environ["USER"]), ".local", "share", "waydroid", "data")
def run(args, ignore=""): def run(args, env=None, ignore=""):
result = subprocess.run(args=args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) result = subprocess.run(args=args, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# print(result.stdout.decode()) # print(result.stdout.decode())
if result.stderr: if result.stderr:
error = result.stderr.decode("utf-8") error = result.stderr.decode("utf-8")