Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
218fadb6a4 | ||
|
|
89e3711977 | ||
|
|
73c746fe2b |
@@ -1,3 +1,13 @@
|
|||||||
|
# What's the difference from this fork ?
|
||||||
|
|
||||||
|
I added some small code lines to enable this script for beeing used with "MULTIPLE ANDROID USERS IN WAYDROID"
|
||||||
|
|
||||||
|
--> It won't work with only a single user created (maybe fixing that in the future..)
|
||||||
|
--> You need to create at least "two users" in Waydroid to be able to get the IDs for Android verifications
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Waydroid Extras Script
|
# Waydroid Extras Script
|
||||||
|
|
||||||
Script to add GApps and other stuff to Waydroid!
|
Script to add GApps and other stuff to Waydroid!
|
||||||
|
|||||||
+42
-12
@@ -1,21 +1,51 @@
|
|||||||
from tools import container
|
from tools import container
|
||||||
from tools.helper import shell
|
from tools.helper import shell
|
||||||
from tools.logger import Logger
|
from tools.logger import Logger
|
||||||
|
import re
|
||||||
|
|
||||||
class AndroidId:
|
class AndroidId:
|
||||||
def get_id(self):
|
def get_id(self):
|
||||||
if container.is_running():
|
if not container.is_running():
|
||||||
try:
|
|
||||||
queryout = shell(
|
|
||||||
arg="sqlite3 /data/data/com.google.android.gsf/databases/gservices.db \"select * from main where name = 'android_id';\"",
|
|
||||||
env="ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n"
|
|
||||||
)
|
|
||||||
except:
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
Logger.error("Please make sure Waydroid is running and Gapps has been installed!")
|
Logger.error("Please make sure Waydroid is running and Gapps has been installed!")
|
||||||
return
|
return
|
||||||
print(queryout.replace("android_id|", "").strip())
|
|
||||||
|
try:
|
||||||
|
# Get list of user IDs and their names using 'pm list users'
|
||||||
|
users_raw = shell(
|
||||||
|
arg="pm list users",
|
||||||
|
env="ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n"
|
||||||
|
)
|
||||||
|
user_map = {}
|
||||||
|
for line in users_raw.strip().splitlines():
|
||||||
|
match = re.search(r'UserInfo\{(\d+):([^:}]+)', line)
|
||||||
|
if match:
|
||||||
|
user_id, username = match.groups()
|
||||||
|
user_map[user_id] = username
|
||||||
|
except Exception as e:
|
||||||
|
Logger.error(f"Failed to parse user list: {e}")
|
||||||
|
return
|
||||||
|
|
||||||
|
print("------------------------------------------------------------------------")
|
||||||
|
print(f"{'Username':<20} | {'User ID':^10} | {'GSF Android ID'}")
|
||||||
|
print("------------------------------------------------------------------------")
|
||||||
|
|
||||||
|
for user_id, username in user_map.items():
|
||||||
|
try:
|
||||||
|
db_path = f"/data/user/{user_id}/com.google.android.gsf/databases/gservices.db"
|
||||||
|
query = f"sqlite3 {db_path} \"select value from main where name = 'android_id';\""
|
||||||
|
gsf_id = shell(
|
||||||
|
arg=query,
|
||||||
|
env="ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n"
|
||||||
|
).strip()
|
||||||
|
|
||||||
|
if gsf_id:
|
||||||
|
print(f"{username:<20} | {user_id:^10} | {gsf_id}")
|
||||||
|
else:
|
||||||
|
print(f"{username:<20} | {user_id:^10} | (not found)")
|
||||||
|
except:
|
||||||
|
print(f"{username:<20} | {user_id:^10} | (query error)")
|
||||||
|
|
||||||
|
print("------------------------------------------------------------------------")
|
||||||
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 the ID(s) shown above.")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user