Android 13 - Can't Preinstall 64-Bit Apps

Which system do you use? Android, Ubuntu, OOWOW or others?

Android 13

Which version of system do you use? Khadas official images, self built images, or others?

Khadas and self-built image

Please describe your issue below:

If you add any 64-bit app to the device/khadas/rk3588/preinstall folder it doesn’t get preinstalled on the first boot.

Only apk files with a lib/
(arm64-v8a & armeabi-v7a) or
(armeabi-v7a) folder gets preinstalled.

Apk files with a lib/
(arm64-v8a) or
(armeabi-v7a, arm64-v8a, x86, x86_64) folders don’t get preinstalled on the first boot.

Some apps with the problem are
'https://github.com/yuliskov/SmartTube/releases/download/21.42/SmartTube_beta_21.42_arm64-v8a.apk

'MiX BETA


Why doesn’t Rockchip’s stock preinstall script work, it works on stock Android 12/13 sdk?
You copy apk’s to
device/khadas/rk3588/kedge2/preinstall_del
It then automatically generates a make file with all the app names and puts the apps in folders with extracted lib files. Folders then get copied to the odm/bundled_uninstall_back-app folder.
You can also use preinstall_del_forever folder then apk files get deleted after they are installed and also not restored after a factory reset. So you have more possibilities and the system partition is not cluttered with apk files increasing booting times.
But these apps don’t get preinstalled on Edge2, not sure why.

@goenjoy

Look who is he ! Mo123 ! Welcome

Hello @mo123

@goenjoy will help you then.

@mo123 I have reproduced the issue you mentioned and will follow up on it.

1 Like

@mo123

device/namtso/rk3588$ git diff auto_generator.py
diff --git a/auto_generator.py b/auto_generator.py
index cff3d6c..a395e80 100644
--- a/auto_generator.py
+++ b/auto_generator.py
@@ -7,7 +7,7 @@ templet = """include $(CLEAR_VARS)
 LOCAL_MODULE := %s
 LOCAL_MODULE_CLASS := APPS
 LOCAL_MODULE_PATH := $(TARGET_OUT)/%s
-LOCAL_SRC_FILES := $(LOCAL_MODULE)$(COMMON_ANDROID_PACKAGE_SUFFIX)
+LOCAL_REPLACE_PREBUILT_APK_INSTALLED := $(LOCAL_PATH)/%s.apk
 LOCAL_CERTIFICATE := PRESIGNED
 LOCAL_DEX_PREOPT := false
 LOCAL_MODULE_TAGS := optional
@@ -38,7 +38,7 @@ def main(argv):
                 p = re.compile(r'\S*(?=.apk\b)')
                 found = p.search(file_name)
                 if found:
-                    makefile.write(templet %(found.group(), argv[1]))
+                    makefile.write(templet %(found.group(), argv[1], found.group()))
                     includefile.write('PRODUCT_PACKAGES += %s\n' %found.group())
         makefile.close()
         includefile.close()

Thanks, will try it.