Gapps: Not extracting apps into app & priv-app that are needed. #23

Open
opened 2021-12-20 12:05:42 -05:00 by electrikjesus · 5 comments
electrikjesus commented 2021-12-20 12:05:42 -05:00 (Migrated from github.com)

Hello, I am not the best at python, so I am having trouble getting what you started working for Android-x86 builds. So far, here are my changes: https://github.com/electrikjesus/waydroid_script/tree/s-x86

The issue I am having is that some of the apps do not extract to "system/app" and are all added to "system/priv-app" So any assistance you can provide here will help us get things moving forward on Android-x86 & Waydroid

Hello, I am not the best at python, so I am having trouble getting what you started working for Android-x86 builds. So far, here are my changes: https://github.com/electrikjesus/waydroid_script/tree/s-x86 The issue I am having is that some of the apps do not extract to "system/app" and are all added to "system/priv-app" So any assistance you can provide here will help us get things moving forward on Android-x86 & Waydroid
casualsnek commented 2021-12-20 12:40:13 -05:00 (Migrated from github.com)

https://github.com/electrikjesus/waydroid_script/blob/s-x86/waydroid_extras.py#L166
changing:
shutil.copytree(os.path.join(app_src_dir, app), os.path.join(sys_image_mount, "system", "priv-app", app), dirs_exist_ok=True)

to

shutil.copytree(os.path.join(app_src_dir, app), os.path.join(sys_image_mount, "system", "spp", app), dirs_exist_ok=True)

should move apk to the spp directory instead of priv-app directory,
( if i got your question correctly,(English is not my primary language) )

https://github.com/electrikjesus/waydroid_script/blob/s-x86/waydroid_extras.py#L166 changing: ```shutil.copytree(os.path.join(app_src_dir, app), os.path.join(sys_image_mount, "system", "priv-app", app), dirs_exist_ok=True)``` to ``` shutil.copytree(os.path.join(app_src_dir, app), os.path.join(sys_image_mount, "system", "spp", app), dirs_exist_ok=True) ``` should move apk to the spp directory instead of priv-app directory, ( if i got your question correctly,(English is not my primary language) )
electrikjesus commented 2021-12-20 13:21:44 -05:00 (Migrated from github.com)

Kinda, I am trying to figure out a way to get it to detect if the archive has the apk in nodpi/app or nodpi/priv-app, and have it place it in the correct destination from there.

Kinda, I am trying to figure out a way to get it to detect if the archive has the apk in nodpi/app or nodpi/priv-app, and have it place it in the correct destination from there.
electrikjesus commented 2021-12-20 13:22:42 -05:00 (Migrated from github.com)

This could also help the same issue with Magisk wanting to run from app instead of priv-app too

This could also help the same issue with Magisk wanting to run from app instead of priv-app too
casualsnek commented 2021-12-21 07:31:03 -05:00 (Migrated from github.com)

Kinda, I am trying to figure out a way to get it to detect if the archive has the apk in nodpi/app or nodpi/priv-app, and have it place it in the correct destination from there.

https://github.com/electrikjesus/waydroid_script/blob/s-x86/waydroid_extras.py#L163

app_priv = os.listdir(os.path.join(extract_to, "appunpack", app_name, "nodpi"))[0]

After this variable gets assigned you can check if it's equals 'priv-app' or just 'app'.

https://github.com/electrikjesus/waydroid_script/blob/s-x86/waydroid_extras.py#L166

shutil.copytree(os.path.join(app_src_dir, app), os.path.join(sys_image_mount, "system", "priv-app", app), dirs_exist_ok=True)

Just replacing "priv-app" in above line directly to app_priv variable so that it looks like this should work :

shutil.copytree(os.path.join(app_src_dir, app), os.path.join(sys_image_mount, "system", app_priv, app), dirs_exist_ok=True)

( Now i will also modify my script to put the apps in their correct place thanks ! )

> Kinda, I am trying to figure out a way to get it to detect if the archive has the apk in nodpi/app or nodpi/priv-app, and have it place it in the correct destination from there. https://github.com/electrikjesus/waydroid_script/blob/s-x86/waydroid_extras.py#L163 ```app_priv = os.listdir(os.path.join(extract_to, "appunpack", app_name, "nodpi"))[0]``` After this variable gets assigned you can check if it's equals 'priv-app' or just 'app'. https://github.com/electrikjesus/waydroid_script/blob/s-x86/waydroid_extras.py#L166 ```shutil.copytree(os.path.join(app_src_dir, app), os.path.join(sys_image_mount, "system", "priv-app", app), dirs_exist_ok=True)``` Just replacing "priv-app" in above line directly to app_priv variable so that it looks like this should work : ```shutil.copytree(os.path.join(app_src_dir, app), os.path.join(sys_image_mount, "system", app_priv, app), dirs_exist_ok=True)``` ( Now i will also modify my script to put the apps in their correct place thanks ! )
electrikjesus commented 2021-12-22 15:52:46 -05:00 (Migrated from github.com)

That works. Although depending on the gapps package, it does get caught up when it comes across a "common" folder it wasn't expecting.

That works. Although depending on the gapps package, it does get caught up when it comes across a "common" folder it wasn't expecting.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wbruno/waydroid_script#23