Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Emacs - App not installed" error on Pixel 7a Android 13 #2

Open
ParetoOptimalDev opened this issue Jun 2, 2023 · 5 comments
Open

Comments

@ParetoOptimalDev
Copy link

ParetoOptimalDev commented Jun 2, 2023

I had the emacs from fdroid installed successfully, but trying to use this one from the releases page.

Here is the related logcat output:

06-02 10:18:54.859  1283  1423 E PackageManager: ERROR: could not load root hash from incremental install
06-02 10:18:54.859  1283  1423 E PackageManager: Required verifier is null
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl: Exception reading file:///data/app/vmdl774461631.tmp
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl: com.android.server.pm.PackageManagerException: Targeting R+ (version 30 and above) requires the resources.arsc of installed APKs to be stored uncompressed and aligned on a 4-byte boundary
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at com.android.server.pm.parsing.PackageParser2.parsePackage(PackageParser2.java:172)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at com.android.server.pm.parsing.PackageParser2.parsePackage(PackageParser2.java:150)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at com.android.server.integrity.AppIntegrityManagerServiceImpl.getPackageArchiveInfo(AppIntegrityManagerServiceImpl.java:624)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at com.android.server.integrity.AppIntegrityManagerServiceImpl.handleIntegrityVerification(AppIntegrityManagerServiceImpl.java:300)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at com.android.server.integrity.AppIntegrityManagerServiceImpl.-$$Nest$mhandleIntegrityVerification(Unknown Source:0)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at com.android.server.integrity.AppIntegrityManagerServiceImpl$1.lambda$onReceive$0(AppIntegrityManagerServiceImpl.java:183)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at com.android.server.integrity.AppIntegrityManagerServiceImpl$1.$r8$lambda$D-6BanMaetK6OzqqHwb9xKEKfbs(Unknown Source:0)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at com.android.server.integrity.AppIntegrityManagerServiceImpl$1$$ExternalSyntheticLambda0.run(Unknown Source:4)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at android.os.Handler.handleCallback(Handler.java:942)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at android.os.Handler.dispatchMessage(Handler.java:99)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at android.os.Looper.loopOnce(Looper.java:201)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at android.os.Looper.loop(Looper.java:288)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl:        at android.os.HandlerThread.run(HandlerThread.java:67)
06-02 10:18:54.872  1283  1596 W AppIntegrityManagerServiceImpl: Cannot parse package org.gnu.emacs

If I get time I'll try following the instructions to do it myself from your blog post. I'm assuming things will work with the same version that worked for me from fdroid.

@marek-g
Copy link
Owner

marek-g commented Jun 3, 2023 via email

@marek-g
Copy link
Owner

marek-g commented Jun 3, 2023

Apktool I'm using is probably up to date (2.7.0).

I uploaded newer build from today (2023-06-03) with targetSdkVersion set to 29. You can try it.

Please make sure that you have enabled installing APKs from unknown sources in developer's mode and that you have uninstalled all the previous versions of Emacs and Termux. It won't install even if you have only Termux app installed signed with different certificate.

If that desn't work, you can try to modify other builds - there are a few of them: https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/ (this source is better than F-Droid as version on F-Droid has no built-in SSL support and it's old one). I'm using emacs-30.0.50-21-arm64-v8a.apk, but maybe another one better fits your CPU arch.

@gnusenpai
Copy link

gnusenpai commented Jun 12, 2023

I was able to install modified Emacs APKs on Android 13 if I signed them with apksigner (instead of jarsigner).
I'm able to see files in /data/data/com.termux from Emacs, but I can't execute any binaries for some reason...

UPDATE: I needed to enable Security > Enable native code debugging to fix not being able to execute things.

@gnusenpai
Copy link

gnusenpai commented Jul 17, 2023

Resigned Termux and shared user modified Emacs builds are now available from upstream at: https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/termux/

I've confirmed they work on Android 13.

@marek-g
Copy link
Owner

marek-g commented Jul 18, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants