MOD EDIT: Thread closed since it's a duplicate of this one.
Hi,
I've created an Xposed model with READ_EXTERNAL_STORAGE permissions, but when i'm trying to open FileInputStream from this SDcard location, i'm getting an exception:
I'm using initZygote to hook PackageManagerService.
java.io.FileNotFoundException: /storage/emulated/0/Download.apk: open failed: EACCES (Permission denied)
Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
Any idea how can i fix this?
Thanks,
Related
I tried doing a search to see if anyone had the problem I am currently having, but I could not find anything. So, I thought I would ask the community.
I am trying to deodex an apk. I found AvaBox and tried using it. The program says that it deodexed it, but there is no classes.dex file in the apk. I am getting an error running it though. Here is the error:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: java.lang.RuntimeException: error while dumping fiel
ds
at org.jf.dexlib.Util.Deodexerant.sendMultilineCommand(Deodexerant.java:
241)
at org.jf.dexlib.Util.Deodexerant.access$200(Deodexerant.java:44)
at org.jf.dexlib.Util.Deodexerant$ClassData.loadFields(Deodexerant.java:
521)
at org.jf.dexlib.Util.Deodexerant$ClassData.lookupField(Deodexerant.java
:473)
at org.jf.dexlib.Util.Deodexerant.lookupField(Deodexerant.java:142)
at org.jf.dexlib.Util.DeodexUtil.deodexInstruction(DeodexUtil.java:566)
at org.jf.dexlib.Util.DeodexUtil.deodexerizeCode(DeodexUtil.java:205)
at org.jf.baksmali.Adaptors.MethodDefinition$MethodItemList.generateMeth
odItemList(MethodDefinition.java:183)
at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefini
tion.java:144)
at org.jf.baksmali.Adaptors.MethodDefinition.makeTemplate(MethodDefiniti
on.java:61)
at org.jf.baksmali.Adaptors.ClassDefinition.getDirectMethods(ClassDefini
tion.java:272)
at org.jf.baksmali.Adaptors.ClassDefinition.makeTemplate(ClassDefinition
.java:74)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:112)
at org.jf.baksmali.main.main(main.java:183)
Caused by: java.lang.RuntimeException: error while dumping fields
at org.jf.dexlib.Util.Deodexerant.sendMultilineCommand(Deodexerant.java:
232)
... 13 more
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.jf.dexlib.DexFile$2.placeAt(DexFile.java:733)
at org.jf.dexlib.DexFile.place(DexFile.java:608)
at org.jf.smali.main.main(main.java:177)
Any clues? Thanks in advance for any response and help you might be able to offer.
Hey. I'm trying to port Touchwiz from SGS4 GT-I9505 to HTC One but the phone is not loaded. I was able to get a logcat. And there is an error. Could someone give advice on how to solve these errors
Code:
E/HAL ( 447): load: module=/system/lib/hw/hwcomposer.msm8960.so
E/HAL ( 447): dlopen failed: could not load library "libmedia.so" needed by
"hwcomposer.msm8960.so"; caused by could not load library "libcamera_client.so"
needed by "libmedia.so"; caused by cannot locate symbol "_ZN7android10VectorImp
l19reservedVectorImpl1Ev" referenced by "libcamera_client.so"...
E/SurfaceFlinger( 447): hwcomposer module not found
E/SurfaceFlinger( 447): ERROR: failed to open framebuffer (Operation not permit
ted), aborting
F/libc ( 447): Fatal signal 6 (SIGABRT) at 0x000001bf (code=-6), thread 447
(surfaceflinger)
Sent from my One using XDA Premium 4 mobile app
After a bit of Googling around, I found this
Is the hwcomposer file there in /system/lib/hw? I'm an amateur when it comes to ROM building but I can definitely read a logcat. BTW sorry for the necrobump. Just couldn't help myself.
I am getting the following error when trying to build my first project in Android Studio. All I have done is install Android Studio, the SDKs tools, SDK platform tools, SDK build tools, and APIs 17-22. Then I started a new blank activity with fragment and when I do the first build, I am getting the error. I have not changed any of the code yet.
java.io.IOException: Cannot run program "F:\Development\Users\Robert\AppData\Local\Android\sdk\build-tools\22.0.1\aapt.exe": CreateProcess error=5, Access is denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at com.android.builder.png.AaptProcess$Builder.start(AaptProcess.java:154)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:105)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:204)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: CreateProcess error=5, Access is denied
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 4 more
thanks,
Robert
. .
I guess I have stumped the community.
Installed the latest v86 framework, then the stock camera app force closes.
Find the problem in logcat:
Code:
08-15 15:36:19.656 I/ActivityManager(2429): Start proc 29745:com.lge.camera/u0a22 for activity com.lge.camera/.CameraAppLauncher
08-15 15:36:19.807 E/dex2oat (29758): Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected]@classes.dex: Permission denied
08-15 15:36:19.810 W/art (29745): Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg /system/framework/XposedBridge.jar --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xnorelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/system/priv-app/LGCameraApp/oat/arm/LGCameraApp.odex --oat-file=/data/dalvik-cache/arm/[email protected]@[email protected]@classes.dex) because non-0 exit status
08-15 15:36:19.812 W/art (29745): Falling back to interpreting /system/priv-app/LGCameraApp/oat/arm/LGCameraApp.odex
08-15 15:36:19.813 W/System (29745): ClassLoader referenced unknown path: /system/priv-app/LGCameraApp/lib/arm
The .dex file and the path /system/priv-app/LGCameraApp/lib/arm do exist.
I would like to solve this badly cause it seems like it's one of the apps that optimize everytime the phone bootup!
@rovo89 may help you. You should report bug on Github https://github.com/rovo89/XposedBridge/issues
pyler said:
@rovo89 may help you. You should report bug on Github https://github.com/rovo89/XposedBridge/issues
Click to expand...
Click to collapse
thx plyer for the hint : )
Hi, please let me know if the problem was already fixed. I have the same problem.
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.