Hi to all! I'm writing here now because i have a problem with a launcher that i would to replace with the stock... Let me explain.
I'm editing a ROM and i would to replace the twlauncher with MX Home so i have delete tw from system/app and i have insert here the new launcher. And here the problem. At first boot after the flash of the ROM it has a force close! How can I fix?
Thx
many applications do this "trick" if put in system/app... I am also looking for a solution but I think it's necessary to recompile the app for it to work on our Galaxy S.
However I'm interested too
sgsever said:
Hi to all! I'm writing here now because i have a problem with a launcher that i would to replace with the stock... Let me explain.
I'm editing a ROM and i would to replace the twlauncher with MX Home so i have delete tw from system/app and i have insert here the new launcher. And here the problem. At first boot after the flash of the ROM it has a force close! How can I fix?
Thx
Click to expand...
Click to collapse
Instead of just guessing what the problem might be, look at the logs. It may help you more.
And where is the log? Because when I boot up the phone is stuck at the force close because the "stock launcher" don't work... Help me
Can you get a shell into the phone using adb shell?
xxbeanxx said:
Can you get a shell into the phone using adb shell?
Click to expand...
Click to collapse
Perhaps yes but I have Linux... But I've come up with an idea. I don't know if it will work. If I boot up the phone, wait the FC and after I will go in recovery and mounting the internal SD i take the log? It is a good idea?
sgsever said:
Perhaps yes but I have Linux... But I've come up with an idea. I don't know if it will work. If I boot up the phone, wait the FC and after I will go in recovery and mounting the internal SD i take the log? It is a good idea?
Click to expand...
Click to collapse
The log file is not stored on the internal SD. Also I don't think it persists a reboot (I may be wrong about this).
What does having Linux have to do with anything? There is a Linux SDK available from Google.
xxbeanxx said:
The log file is not stored on the internal SD. Also I don't think it persists a reboot (I may be wrong about this).
What does having Linux have to do with anything? There is a Linux SDK available from Google.
Click to expand...
Click to collapse
Perhaps I have the log:
Code:
W/dalvikvm( 8000): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/neomtel/mxhome/SmaxInterface;
D/AndroidRuntime( 8000): Shutting down VM
W/dalvikvm( 8000): threadid=1: thread exiting with uncaught exception (group=0x40015578)
E/AndroidRuntime( 8000): FATAL EXCEPTION: main
E/AndroidRuntime( 8000): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 8000): at com.neomtel.mxhome.SmaxView.init(SmaxView.java:169)
E/AndroidRuntime( 8000): at com.neomtel.mxhome.SmaxView.<init>(SmaxView.java:88)
E/AndroidRuntime( 8000): at com.neomtel.mxhome.Launcher.setupViews(Launcher.java:1559)
E/AndroidRuntime( 8000): at com.neomtel.mxhome.Launcher.onCreate(Launcher.java:379)
E/AndroidRuntime( 8000): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 8000): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
E/AndroidRuntime( 8000): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
E/AndroidRuntime( 8000): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 8000): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
E/AndroidRuntime( 8000): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 8000): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 8000): at android.app.ActivityThread.main(ActivityThread.java:3687)
E/AndroidRuntime( 8000): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 8000): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 8000): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
E/AndroidRuntime( 8000): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
E/AndroidRuntime( 8000): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 8000): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load SmaxEngine: findLibrary returned null
E/AndroidRuntime( 8000): at java.lang.Runtime.loadLibrary(Runtime.java:429)
E/AndroidRuntime( 8000): at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime( 8000): at com.neomtel.mxhome.SmaxInterface.<clinit>(SmaxInterface.java:99)
E/AndroidRuntime( 8000): ... 17 more
W/ActivityManager( 2736): Force finishing activity com.neomtel.mxhome/.Launcher
E/ ( 2736): Dumpstate > /data/log/dumpstate_app_error
I/dumpstate( 8009): begin
D/PowerManagerService( 2736): onSensorChanged: light value: 1000
W/ActivityManager( 2736): Activity pause timeout for HistoryRecord{40882a00 com.neomtel.mxhome/.Launcher}
W/su ( 8027): request rejected (0->0 /system/bin/sh)
W/PowerManagerService( 2736): Timer 0x7->0x3|0x0
I/PowerManagerService( 2736): Ulight 7->3|0
D/LightsService( 2736): BUTTON : 0
D/VoldCmdListener( 85): asec list
I/dumpstate( 8009): done
D/UsbStorageActivity( 4556): onResume !!!
Let me know... and thx for your patience!
I believe the error stems from the incompatibility between the launcher and the framework...
And nobody know how to fix this?
sgsever said:
And nobody know how to fix this?
Click to expand...
Click to collapse
I don't have a solution but here's what I would try.. Without having the app you are talking about to look at I'm only guessing from the log.
A Java UnsatisfiedLinkError occurs when the VM is trying to load a libary that isn't available. It would seem that perhaps the apk contains some libraries that get extracted by the Android installer when you first install the app.
Try using a tool like 'apktool' to decode the apk into a format that you can actually look at, then see if there are such libraries inside. If so you would want to extract these and put them somewhere that Dalvik can read them, for instance /system/lib.
I may be way off the mark here, like I said this is just a guess. Maybe later if I get some time I'll grab the apk and try to do exactly what you're doing. I'll post back if I do.
Okay so I downloaded the launcher and had a look in the apk using root explorer and sure enough, found lib/armeabi/libSmaxEngine.so.
Try extracting that file and putting it in /system/lib. Root explorer gives me the option to extract the file, and I tried it on an xml file and got back a readable file, so that may be the easiest option for you. I think apktool would do it too but it's been a while since I used that.
If that doesn't work I'm sure there is a way to do it. I've never had this problem before so it's new to me.
Okay so I copied the apk to /system/app and copied the extracted .so to /system/lib (extracted it with root explorer).
I then uninstalled the downloaded version of mxhome and rebooted. It worked fine. No FCs.
Looks like that's your solution.
Hi
I'm posting this question here because I'm not allowed to post to the development thread (yet)
I installed the last version of VengeaneNote2 (RC Build 1.0 - MIUI 2.9.14) but after I changed the screen resolution to 240dpi, I started getting this exception when opening the dialer:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.contacts/com.android.contacts.activities.TwelveKeyDialer}: android.view.InflateException: Binary XML file line #174: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2070)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2095)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1198)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4758)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #174: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:258)
at android.app.Activity.setContentView(Activity.java:1873)
at com.android.contacts.activities.TwelveKeyDialer.onCreate(TwelveKeyDialer.java:528)
at android.app.Activity.performCreate(Activity.java:5014)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2034)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
... 26 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/dialer_buttons.9.png from drawable resource ID #0x7f020046
at android.content.res.Resources.loadDrawable(Resources.java:1944)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:3339)
at android.view.View.<init>(View.java:3275)
... 29 more
Caused by: java.io.FileNotFoundException: res/drawable-hdpi/dialer_buttons.9.png
at android.content.res.AssetManager.openNonAssetNative(Native Method)
at android.content.res.AssetManager.openNonAsset(AssetManager.java:413)
at android.content.res.Resources.loadDrawable(Resources.java:1936)
... 32 more
I did it many times (full wipe and format /system between each), but still having the same problem.
This only new in this version. I was able to switch to 240dpi in all previous versions without problem.
Any help on this?
Thanks
update
yelkarama said:
Hi
I'm posting this question here because I'm not allowed to post to the development thread (yet)
I installed the last version of VengeaneNote2 (RC Build 1.0 - MIUI 2.9.14) but after I changed the screen resolution to 240dpi, I started getting this exception when opening the dialer:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.contacts/com.android.contacts.activities.TwelveKeyDialer}: android.view.InflateException: Binary XML file line #174: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2070)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2095)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1198)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4758)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #174: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:258)
at android.app.Activity.setContentView(Activity.java:1873)
at com.android.contacts.activities.TwelveKeyDialer.onCreate(TwelveKeyDialer.java:528)
at android.app.Activity.performCreate(Activity.java:5014)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2034)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
... 26 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/dialer_buttons.9.png from drawable resource ID #0x7f020046
at android.content.res.Resources.loadDrawable(Resources.java:1944)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:3339)
at android.view.View.<init>(View.java:3275)
... 29 more
Caused by: java.io.FileNotFoundException: res/drawable-hdpi/dialer_buttons.9.png
at android.content.res.AssetManager.openNonAssetNative(Native Method)
at android.content.res.AssetManager.openNonAsset(AssetManager.java:413)
at android.content.res.Resources.loadDrawable(Resources.java:1936)
... 32 more
I did it many times (full wipe and format /system between each), but still having the same problem.
This only new in this version. I was able to switch to 240dpi in all previous versions without problem.
Any help on this?
Thanks
Click to expand...
Click to collapse
I changed the dpi to 280 and it's working!
update 2
yelkarama said:
Hi
I'm posting this question here because I'm not allowed to post to the development thread (yet)
I installed the last version of VengeaneNote2 (RC Build 1.0 - MIUI 2.9.14) but after I changed the screen resolution to 240dpi, I started getting this exception when opening the dialer:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.contacts/com.android.contacts.activities.TwelveKeyDialer}: android.view.InflateException: Binary XML file line #174: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2070)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2095)
at android.app.ActivityThread.access$600(ActivityThread.java:133)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1198)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4758)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #174: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:258)
at android.app.Activity.setContentView(Activity.java:1873)
at com.android.contacts.activities.TwelveKeyDialer.onCreate(TwelveKeyDialer.java:528)
at android.app.Activity.performCreate(Activity.java:5014)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2034)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
... 26 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/dialer_buttons.9.png from drawable resource ID #0x7f020046
at android.content.res.Resources.loadDrawable(Resources.java:1944)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:3339)
at android.view.View.<init>(View.java:3275)
... 29 more
Caused by: java.io.FileNotFoundException: res/drawable-hdpi/dialer_buttons.9.png
at android.content.res.AssetManager.openNonAssetNative(Native Method)
at android.content.res.AssetManager.openNonAsset(AssetManager.java:413)
at android.content.res.Resources.loadDrawable(Resources.java:1936)
... 32 more
I did it many times (full wipe and format /system between each), but still having the same problem.
This only new in this version. I was able to switch to 240dpi in all previous versions without problem.
Any help on this?
Thanks
Click to expand...
Click to collapse
So I tried many resolutions. Each time I modify the line ro.sf.lcd_density= in /system/build.prop and I reboot.
Conclusion: The phone dialer works correctly for resolution more than 270. if I go beyondm it start FCing with the excption above.
Hey Guys,
I am helping a friend of mine out with her watch. She is having an issue in which each time she opens the camera on her watch she gets a force close. I forgot my watch at home and can't look. I was wondering if someone would be willing to check their system folder for me and see if there is an FactoryCamera_FB.odex file? The FactoryCamera_FB.apk seems to be the only one without a matching odex file. In general, she is getting the following errors.
10-21 13:29:55.755 D/IS_FW_DEBUG( 1448): [TS:00000250 ms][F:00000000][SMIA_StreamOn]===========================================
10-21 13:29:55.755 D/IS_FW_DEBUG( 1448): [TS:00000252 ms][F:00000000][ISP_ENTRY]ApplyM2MData
10-21 13:29:55.755 D/IS_FW_DEBUG( 1448): [TS:00000252 ms][F:00000000][ISP_ENTRY] [M2M] No data or invalid data !!
10-21 13:29:55.760 W/dalvikvm( 2989): threadid=12: thread exiting with uncaught exception (group=0x419d0930)
10-21 13:29:55.765 E/AndroidRuntime( 2989): FATAL EXCEPTION: startPreviewThread
10-21 13:29:55.765 E/AndroidRuntime( 2989): java.lang.RuntimeException: startPreview failed
10-21 13:29:55.765 E/AndroidRuntime( 2989): at com.sec.android.seccamera.SecCamera.startPreview(Native Method)
10-21 13:29:55.765 E/AndroidRuntime( 2989): at com.sec.android.app.camera.CommonEngine$1.run(CommonEngine.java:746)
10-21 13:29:55.765 E/AndroidRuntime( 2989): at java.lang.Thread.run(Thread.java:856)
10-21 13:29:55.775 W/ActivityManager( 1781): Process com.sec.android.app.camera has crashed too many times: killing!
10-21 13:29:55.780 W/LicenseLogService( 1781): log() is called by non admin
10-21 13:29:55.810 W/ContextImpl( 1781): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1337 com.android.server.am.ActivityStack.startPausingLocked:1412 com.android.server.am.ActivityStack.finishActivityLocked:5894 com.android.server.am.ActivityStack.finishActivityLocked:5808 com.android.server.am.ActivityManagerService.handleAppCrashLocked:9497
10-21 13:29:56.120 E/android.os.Debug( 1781): [email protected] > dumpstate -k -t -z -d -o /data/log/dumpstate_app_error
Additionally, I see up the log a bit where it appears to be setting properties and is setting orientation to 0 and two inprintable hex characters (Screenshot attached). Does anyone have any ideas what could be causing this? I have also attached the full log dump.
Thanks in advance for any help!
Is it rooted?
Sent from my SM-N9005 using Tapatalk
download firmware and flash with odin
galaxy note 3
I'm the developer of an app that loads a native library (.so). I'm getting a large number of error reports where loading a native library seems to be failing and the stack trace contains references to Xposed. Any ideas what might be going on here and how to fix it?
Stack trace:
java.lang.RuntimeException: exception during library load
at co.kr36.krypton.activity.Main.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5451)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
at android.app.ActivityThread.access$900(ActivityThread.java:169)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5476)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
at dalvik.system.NativeStart.main(Native Method)
Caused by: org.chromium.base.library_loader.ProcessInitException
at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(Unknown Source)
at org.chromium.base.library_loader.LibraryLoader.ensureInitialized(Unknown Source)
at org.chromium.base.library_loader.LibraryLoader.ensureInitialized(Unknown Source)
... 16 more
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load seaturtle from loader dalvik.system.PathClassLoader[dexPath=/data/app/co.kr36.krypton.x-1.apk,libraryPath=/data/app-lib/co.kr36.krypton.x-1]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:358)
at java.lang.System.loadLibrary(System.java:526)
... 19 more
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load seaturtle from loader dalvik.system.PathClassLoader[dexPath=/data/app/co.kr36.krypton.x-1.apk,libraryPath=/data/app-lib/co.kr36.krypton.x-1]: findLibrary returned null
Click to expand...
Click to collapse
Looks like you need to double check the path for the .so file. According to android, it is returning null when it tries to load the library path. Not exactly sure where is .so binary is, assets? So I can't really specify where the file is exactly. Also, double check read/write permissions.
As for xposed causing it, I highly doubt it.
The lines referencing xposed in the logcat is because xposed is able to hook into the method that you are calling. It doesn't do anything unless there is a module installed that uses a hook to that method. printStackTrace will show everywhere the method is referenced/called. So that is why you see the xposed line in the logcat.
Hello,
I'm currently trying to run apktool using dalvikvm in the customize.sh script:
Bash:
apktool_d() {
#ANDROID_DATA=$TMPDIR_JCD ANDROID_ROOT=/system LD_LIBRARY_PATH=/system/lib dalvikvm -Xbootclasspath:/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/apache-xml.jar -classpath $BIN/apktool_*-dexed.jar brut.apktool.Main d --frame-path $TMPDIR_JCD/framework --no-src -o $TMPDIR_JCD/resout $1
dalvikvm -classpath $BIN/apktool_*-dexed.jar brut.apktool.Main d --no-src -o $TMPDIR_JCD/resout $1
test $? != 0 && abort "Decoding APK resources failed. Aborting..."
}
I've tried to port that code from an outdated template: https://github.com/djb77/magisk-module-template-apkpatcher
When using the commented out method the command aborts with "Decoding APK resources failed" and logcat *:E is telling me the following:
Code:
04-17 21:11:53.649 11641 11641 E dalvikvm: Could not create image space with image file '/system/framework/boot.art'. Attempting to fall back to imageless running. Error was: Unexpected component count in /system/framework/arm/boot.art, received 11, expected non-zero and <= 3
04-17 21:11:53.677 11641 11641 E dalvikvm: Could not initialize without image: Boot classpath is empty.
When trying the second approach without -Xbootclasspath and so on I'm getting a NullPointerException directly in the magisk log (saved file):
Code:
I: Using Apktool 2.3.4 on Bluetooth.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
Exception in thread "main" java.lang.ExceptionInInitializerError
at brut.util.OSDetection.isMacOSX(OSDetection.java:28)
at brut.androlib.res.AndrolibResources.getFrameworkDir(AndrolibResources.java:913)
at brut.androlib.res.AndrolibResources.getFrameworkApk(AndrolibResources.java:754)
at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:116)
at brut.androlib.res.data.ResTable.getPackage(ResTable.java:84)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:67)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:63)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:39)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:385)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.parseManifest(XmlPullStreamDecoder.java:97)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:65)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:155)
at brut.androlib.res.AndrolibResources.decodeManifestWithResources(AndrolibResources.java:204)
at brut.androlib.Androlib.decodeManifestWithResources(Androlib.java:136)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:122)
at brut.apktool.Main.cmdDecode(Main.java:164)
at brut.apktool.Main.main(Main.java:73)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
at brut.util.OSDetection.<clinit>(OSDetection.java:21)
... 20 more
Decoding APK resources failed. Aborting...
! Installation failed
After some research I tried to find out if the customize.sh is running as root because some posts telling that setting LD_LIBRARY_PATH setting as root fixed those "Could not create image space" dalvikvm errors but can't find any info about that. see https://github.com/termux/termux-packages/issues/900#issuecomment-322207233
I'm out of ideas and happy for any help.
Thanks in advance
Danny.