[help] android 11 AOSP : install modified gboard.apk [apktool] [root] - Android Q&A, Help & Troubleshooting

hello, and thanks for helping me.
i have a redmi k20 pro with evolutionX on android 11, rooted with magisk 21.1
i modified the gboard.apk with apktool, recompiled sucessfully.
the problem is i can't manage to install, it, for multiple reasons :
(i added extractNativeLibs="true" to androidmanifest because without it apktool would compile, dunno if it could be problem)
first i tried to uninstall the origin gboard on my device (i got another keyboard installed don't worry)
so
Bash:
pm uninstall com.google.android.inputmethod.latin
Success
but then when i try to install adb install gboard.apk :
Code:
Performing Streamed Install
adb: failed to install gboard.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed collecting certificates for /data/app/vmdl430916923.tmp/base.apk: Failed to collect certificates from /data/app/vmdl430916923.tmp/base.apk: Attempt to get length of null array]
so the apk need to be signed even if i uninstalled the previous app ? i tried to disable signature verification with lucky patcher (see below) and smali pather (doesn't boot)
i tried to sign the apk, with those steps :
Code:
keytool -genkey -v -keystore debug.keystore -alias android -keyalg RSA -keysize 2048 -validity 20000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore debug.keystore gboard.apk android
zipalign -v 4 gboard.apk gboard-aligned.apk
but then installing with adb install gboard-aligned.apk give :
Code:
adb: failed to install gboard-aligned.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Scanning Failed.: No signature found in package of version 2 or newer for package com.google.android.inputmethod.latin]
with lucky patcher i could only select "disable signature verification in the package manager" and other 2 which are "signature verification : always true" and "disable apk signature verification" are not available to select. so with only "disable signature verification in the package manager" i could install my signerd gboard.apk, but when opening the app it instant crash with this log : https://del.dog/yrfafulyle.txt tldr : APK is signed by unrecognized certificates
so it doesn't work without disabling signature verification.
you can find the 2 apk (just recompiled and the one signed) here : https://github.com/mirsella/gboard-colemak-dhm/releases/tag/v1
tl:dr : could install my self signed gboard.apk only with lucky patcher disabling the signature verification (not entirely ?) but when launching the app it instant crash with this log https://del.dog/yrfafulyle.txt.
i just thought about it, maybe gboard as a built in signature verification ? it check itself and exit if the signature is wrong ?
thanks you a lot.

Related

[Q] Android Proguard ERROR: Unknown verificatification type[10]

I am trying to build an apk file for release. My application lib contains a jar (probably obfuscated) from a third party vendor of one of my company's hard-wares. When I build the apk in debug mode it is successful, but when I try to do it in release mode using "ant release" it throws the following error.
Code:
BUILD FAILED
C:\adt-bundle-windows-x86_64\sdk\tools\ant\build.xml:868: Can't read [D:\Workspace\MyProject\libs\ThirdPartyJarV3.1.jar] (Can't process class [g.class] (Unknown verification type [10] in stack map frame))
I have successfully built apks in release mode for other projects (which doesn't have this jar file.)
It seems to be an issue around proguard not being able to read this class in the jar. I have looked through ProGuard's trouble shooting manual and also on google and found no help with this particular error:
Code:
(Unknown verification type [10] in stack map frame)
I also updated proguard from V4.7 to 4.10, but it still encounters the same error.
To my little mind it seems to be a problem with the jar itself and if so how do I fix it? Any help would be appreciated. TIA!
[P.S: I'm new to android]

[Ruby] Installing gems on android.

Hello friends!
I am using Termux in order to run ruby.
I installed ruby successfully with "apt" command, and it functions fine.
Current ruby version:
Code:
$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [arm-linux-androideabi]
The problem is, I can't really install gems. I tried to install bettercap for the experiment, but it failed. This is what I get:
Code:
$ gem install bettercap
Fetching: colorize-0.8.1.gem (100%)
Successfully installed colorize-0.8.1
Fetching: network_interface-0.0.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing bettercap:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1/ext/network_interface_ext
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20161129-14856-1cclchu.rb extconf.rb
mkmf.rb can't find header files for ruby at /data/data/com.termux/files/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/gem_make.out
I found some instructions if I ran "gem help install" but I couldn't really understand what to do in order to fix that.
Can anyone help me to solve this? BTW I have a rooted device so I can use "su" and "sudo" and all that stuff...
Thanks for people who answer~
FurySh0ck said:
Code:
mkmf.rb can't find header files for ruby at /data/data/com.termux/files/usr/lib/ruby/include/ruby.h
Click to expand...
Click to collapse
You can install ruby.h with:
Code:
apt install ruby-dev
.
fornwall said:
You can install ruby.h with: .
Click to expand...
Click to collapse
I installed ruby-dev but it still won't work. It tells me it saved a log file which contains the explanation to the failure. I'll post the whole code, but please pay attention to the last part of it:
Code:
apt install bettercap
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package bettercap
$ gem install bettercap
Building native extensions. This could take a while...
ERROR: Error installing bettercap:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1/ext/network_interface_ext
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20161206-31345-1xerjr9.rb extconf.rb
[*] Running checks for netifaces code...
[*] Warning : this platform as not been tested
checking for getifaddrs()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME)
/data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:765:in `try_func'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:1051:in `block in have_func'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:1050:in `have_func'
from extconf.rb:43:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/gem_make.out
Any solutions in mind?
BTW Thanks for your time, I appreciate anyone who tries to help.

[APKMULTITOOL] Error when signing (sign apk with android market 13 & 7 zip, sign, in)

[APKMULTITOOL] Error when signing (sign apk with android market 13 & 7 zip, sign, in)
Hello folks, I have stumbled upon a small problem using APKMultiTool ...
When I try to sign my apk (It's a unity apk meaning I only edited 1 of the dll files.) It fails.
The error it gives me, even in log (26) is useless.
Code:
--------------------------------------------------------------------------
|26-07-2018 -- 13:55:05,73|
--------------------------------------------------------------------------
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
Press any key to continue . . .
I do have the environment path for system, directed to my JDK java path.
The APKMultiTool is opened with Administrator and it's at root(c:\APKMultiTool) <
Heres the code it gives me at the end of option 7: (zip, sign & install)
Code:
Compressing res\layout\com_facebook_placepickerfragment_list_row.xml
Compressing res\layout\com_facebook_search_bar_layout.xml
Compressing res\layout\com_facebook_tooltip_bubble.xml
Compressing res\layout\com_facebook_usersettingsfragment.xml
Everything is Ok
Signing Apk
Usage: signapk [-w] publickey.x509[.pem] privatekey.pk8 input.jar output.jar
"An Error Occurred, Please Check The Log (option 26)"
The error afterwards in the log file and when using 26, is still the same.
Now I'm going to just try to sign the unsigned apk. First the one that was just zipped.
I do this with option 13: Sign apk with android market
Code:
Please make your decision:13
*Notice this option requires you to have the Java JDK installed before this option will function*
*Notice you need to go into your Environment Variables and set the path to your JAVA_HOME*
*For example define it as C:\Program Files\Java\jdk1.6.0_43 as a system variables slot not the User Variables*
Press any key to continue . . .
Signing Apk
Only one alias can be specified
Please type jarsigner -help for usage
"An Error Occurred, Please Check The Log (option 26)"
I am unable to type jarsigner -help, in CMD it does not exist as a command, and in APKMT it closes the prompt. The log file and 26 gives me the same error text so far, meaning it was not even updated.
(Note: I open ALL prompts as Administator, also APKMT)
I am at a complete loss...
Would be really grateful for input :3 thanks a lot.
-EDIT-
Am unable to install unsigned apk on rooted bluestacks 3n device. :3
... I found out that if I used the new tool
https://forum.xda-developers.com/an...tool-apk-easy-tool-v1-02-windows-gui-t3333960
APK Easy Tool, everything became more organized and much easier to work with. I got it working and are happy to say that my first mod was succesful, yay.
Happy modding everyone
For reference, the apk I modded was Galactic Rush for Android

Python Script for Copy and Reinstall all Third Party apps from Device

i have created python script for copy all third party apps installed in your device and copy all the apps in your pc.
NON-ROOT script.
script uses adb shell commands for copy and reinstall apps in your device so no need of root access.
for now i only manage to test it on X00TD(Android 9.0) for now. Update me for other device/android versions.
Steps for backup apps :-
1) Download python 3 from python.org and install it in your pc.
2) Download python script files from the link below.
3) Run "windows-backup.py" if you are on Windows OS, else "linux-backup.py" for linux based OS.
Steps for reinstall apps:-
*first 2 steps are same
3) Run "install-apps.py" for install apps OS dosent effect on this script.
YouTube :- www . youtube . com / watch?v=EEoPo7Hqt3k
File Download link :- bit.ly / 2Lhqe0T (remove spaces).

			
				
I'm getting error.
Zenfone max pro m1
Android: 8.1 (stock, No root, bootloader unlocked, TWRP recovery)
PC: Windows 8.1
USB debugging enabled, USB mounted as storage
ERROR msg in screenshot
foxonfox said:
I'm getting error.
Zenfone max pro m1
Android: 8.1 (stock, No root, bootloader unlocked, TWRP recovery)
PC: Windows 8.1
USB debugging enabled, USB mounted as storage
ERROR msg in screenshot
Click to expand...
Click to collapse
Install adb in your pc first
Can you tell me why I'm getting this error?
[email protected]:~/Documents/App backup-restore$ python3 linux-backup.py
Folder Created
Fetching Packages list from device
error: no devices/emulators found
Packages are fethced
Copying Started
Total 1 Apps
b'
1 : .apk
/bin/sh: 1: Syntax error: Unterminated quoted string
Traceback (most recent call last):
File "linux-backup.py", line 47, in <module>
os.rename("base.apk",name)
FileNotFoundError: [Errno 2] No such file or directory: 'base.apk' -> '.apk'
[email protected]:~/Documents/App backup-restore$
What's wrong or what am i doing wrong?
OS 9 MSM Extended with MicroG installed (No Google)
EDIT:
got it after enabling USB DeBugging

App installation issue

Hello, I have earlier installed Google Indic Keyboard app in My Phone Iqoo z3, But after some update it automatically disappeared. I tried to install it from Play Store but installation always failed. Then I Tried Downloading and Install with apk file. That also did not work.
Then I tried to install with ADB tools. There also I Have got error. The app is very important for me,
Code:
PS C:\Users\mkj\Downloads\platform-tools_r31.0.3-windows\platform-tools> adb install hindi.apk
2470 KB/s (35316074 bytes in 13.957s)
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1755875328.tmp/base.apk (at Binary XML file line #33): com.google.android.apps.inputmethod.hindi.HindiInputMethodService: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
I am not much familiar with android Errors. can some one tell me whats wrong With it??
My device is Iqoo Z3

Categories

Resources