[Q] troubles with apktool - Android Q&A, Help & Troubleshooting

hello there, i'm trying to add translations to MiuiExpress APK (http://xitong.xiaomi.com/index) decompile and recompile went well, but when i launch the APK on my phone it crash with the following fc log :
HTML:
{"platform":"4.4.2","exception_class":"java.lang.RuntimeException","error_type":"fc","build_version":"9a658b46e5","imei":"","package_name":"com.miui.miuilite","device":"Nexus 4","stack_track":"java.lang.RuntimeException: Unable to create service com.xiaomi.mms.transaction.SmsService: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.app.Application.getPackageName()' on a null object reference
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2602)
at android.app.ActivityThread.access$1800(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1288)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5081)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)\nCaused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.app.Application.getPackageName()' on a null object reference
at com.xiaomi.mms.transaction.SmsService.onCreate(SmsService.java:36)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2592)
... 8 more\n","app_version":"1.0.1","network":"Orange F","exception_source_method":"android.app.ActivityThread.handleCreateService"}, processName is com.miui.miuilite
any idea what is the problem ? thanks you much
PS: even if i don't touch the APK after recompiling it i got the same error on my phone i use apktool 2.0.0 BETA 9

Related

Cannot sign any apk in Ubuntu..

Hey guys, i just installed Ubuntu in a VirtualBox, everything is great but i cannot figure out why i can't sign any apks.. here is the error that is generated.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/crypto/EncryptedPrivateKeyInfo
at com.android.signapk.SignApk.decryptPrivateKey(SignApk.java:124)
at com.android.signapk.SignApk.readPrivateKey(SignApk.java:154)
at com.android.signapk.SignApk.main(SignApk.java:436)
Caused by: java.lang.ClassNotFoundException: javax.crypto.EncryptedPrivateKeyInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 3 more
I have java version 1.7.0_21 installed.

[Q] No implementation found for native ResampleInputStream;.fir21:([BI[BII)V

I built my AOSP JB for a tablet, including all necessary customizations (project details discussed over here: https://groups.google.com/forum/#!forum/renesas-emev-osp).
I'm now in the clean-up stage, with a list of "minor" issues being debugged and hopefully removed. One of these is the use of Google Voice Search, which fails with this message:
Unfortunately, Voice Search has stopped
I've attached the complete logcat at http://pastebin.com/K1ces0Ai. Latest lines are those from the failure above.
I think these are the critical ones:
W/dalvikvm( 1130): No implementation found for native Lcom/google/android/voicesearch/endpointer/ResampleInputStream;.fir21[BI[BII)V
W/dalvikvm( 1130): threadid=16: thread exiting with uncaught exception (group=0x40a46300)
E/AndroidRuntime( 1130): FATAL EXCEPTION: Thread-122
E/AndroidRuntime( 1130): java.lang.UnsatisfiedLinkError: Native method not found: com.google.android.voicesearch.endpointer.ResampleInputStream.fir21[BI[BII)V
E/AndroidRuntime( 1130): at com.google.android.voicesearch.endpointer.ResampleInputStream.fir21(Native Method)
I found this in JB source code:
./frameworks/base/media/jni/android_media_ResampleInputStream.cpp
where fir21 is implemented, but it looks like it hasn't been compiled, or not correctly compiled. Could it be?
I looked at http://developer.android.com/training/articles/perf-jni.html#faq_ULE too, but it's been of little help.
Enabling debug logs I can see the library being loaded and methods registered:
I/MediaPlayerJNI( 72): JNI_OnLoad registering functions...
I/ResampleInputStream( 72): android/media/ResampleInputStream JNI registering
So I don't understand why, when java requires "fir21" from ResampleInputStream JNI, it can't find it. Naming should be correct, I guess... (this is all OOB AOSP code).
Any suggestions a bout how to debug this?
Thanks in advance!

Holobackup - open *.ab file - AES Problem

I did an backup with the latest Version of Holobackup, know I need some files out of the back.
I started to work with abe.jar to open the backup file
Code:
c:\test>java -jar c:/test/abe.jar unpack c:/test/backup.ab c:/test/backup.tar test
Strong AES encryption disabled
Magic: ANDROID BACKUP
Version: 1
Compressed: 1
Algorithm: AES-256
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: java.security.InvalidKeyException: Illegal key size
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:320)
at org.nick.abe.Main.main(Main.java:58)
... 5 more
Caused by: java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1024)
at javax.crypto.Cipher.implInit(Cipher.java:790)
at javax.crypto.Cipher.chooseProvider(Cipher.java:849)
at javax.crypto.Cipher.init(Cipher.java:1348)
at javax.crypto.Cipher.init(Cipher.java:1282)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:244)
... 6 more
The password is right ... so what did I do wrong?

[Q] Error when packing CrimeCity with abe.jar

I did a full backup using adb of my device before I began flashing ROMs this weekend, and now I am at a point where I want to reinstall some applications. I am trying to restore Crimecity, but I am receiving an error when I try to pack the game. I'm fairly new at all of this, so I don't even know where to begin to troubleshoot. Any help would be appreciated!
Blev:Android ablevins$ java -jar abe.jar pack crimecity.tar crimecity.ab crimecity
Strong AES encryption allowed
key bytes: 46F0C66079B12475BFECB838B003A3A98277AF856FF5D5E0F7E5A2325FE0D65B
salt bytes: 6EB663AED5E069DA4AE5B0174AE9B87FBDCDAB83357204503B8C2595A93EF6C81292FAA3F4751B13B32839CAD9D7BA8DCC57951B684C06C17C4CC3517B8654AF
MK as string: [F??`y?$u???8????w??o??????2_??[]
Key format: RAW
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NoSuchMethodError: java.util.zip.DeflaterOutputStream.<init>(Ljava/io/OutputStream;Ljava/util/zip/Deflater;Z)V
at org.nick.abe.AndroidBackup.packTar(AndroidBackup.java:390)
at org.nick.abe.Main.main(Main.java:67)
... 5 more
Blev:Android ablevins$ java -jar abe.jar pack crimecity.tar crimecity.ab
Strong AES encryption allowed
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NoSuchMethodError: java.util.zip.DeflaterOutputStream.<init>(Ljava/io/OutputStream;Ljava/util/zip/Deflater;Z)V
at org.nick.abe.AndroidBackup.packTar(AndroidBackup.java:390)
at org.nick.abe.Main.main(Main.java:67)
... 5 more
Blev:Android ablevins$

[Xposed][MODULE][4.0+] XInternalSD [v4.8] Exception on Redmi Note S1

Here is log. OS: MIUI 8.
Any fix or work around I can try? Appreciate in advance.
---
Loading Xposed v54 (for Zygote)...
Running ROM 'KTU84P' with fingerprint 'Xiaomi/gucci/gucci:4.4.4/KTU84P/6.12.22:user/release-keys'
Loading modules from /data/app/com.pyler.xinternalsd-1.apk
Loading class com.pyler.xinternalsd.XInternalSD
java.lang.IllegalStateException: Unable to get package info for com.miui.securitycenter.dynamic; is package not installed?
at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:368)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:321)
at de.robv.android.xposed.XposedBridge$3.afterHookedMethod(XposedBridge.java:249)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:645)
at android.app.LoadedApk.<init>(Native Method)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.app.ContextCompat.createLoadedApk(ContextCompat.java:58)
at android.app.ContextCompat.createApplicationContext(ContextCompat.java:27)
at com.miui.securitycenter.dynamic.ApkLoader.getDynamicContext(ApkLoader.java:164)
at com.miui.securitycenter.dynamic.DynamicServiceManager.createOrUpdateManagerWT(DynamicServiceManager.java:145)
at com.miui.securitycenter.dynamic.DynamicServiceManager.connectWT(DynamicServiceManager.java:127)
at com.miui.securitycenter.dynamic.DynamicServiceManager.access$400(DynamicServiceManager.java:20)
at com.miui.securitycenter.dynamic.DynamicServiceManager$DynamicWorkHandler.handleMessage(DynamicServiceManager.java:193)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
It has nothing with this module.

Categories

Resources