[PORT]touchwiz for htc one - One (M7) Q&A, Help & Troubleshooting

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.

Related

Help with AvaBox

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.

ROM debugging.

Ok. I have put up this thread because I need help with the ROM, I am making.
I posted on other threads to get my answers but all i'm getting is irrelevant information.
I need real help and on topic answers.
I am creating a ROM through Dsixda Kitchen
This is what I've tried so Far
1) After doing all mods, I try to build ROM from working folder.
2) Go to Interactive Mod, convert the update-script to updater script. Sign the ROM.
3) And try to flash it through CWM after wiping data and cache.
4) But i get Error, Status 7. Mount expects 4 args got 3.
I tried getting emmc-update binary and renaming it to update-binary and replace it with Meta-inf\com\google\android\update-binary.
After trying to flash again it gets through cwm but stays stuck at the splash screen.
I tried something else.
1) Don't convert the updater-script to update script at the start.
2) Do mods, and build rom
3) Flash with CWM. No errors.
4) Stuck at splash screen.
Can someone please help me? What am i doing wrong. I know how to mod system, and the apks but no knowledge about Meta-INF. So, i'm a total noob at updater script, update-binary and so on.
I tried something again. Without changing base rom alot. I just changed boot animation. And I get Error Status 7 in CWM.
Please Help. Quick.
Use the update script from some other rom!!
Don't be a noob. Be a newbie..!!
Details here.
Try ketut's script.
side_effect said:
Try ketut's script.
Click to expand...
Click to collapse
I read that in one of Prawesome's threads too. But I can't seem to find his script. Could you please direct me to that script. Its really urgent.
masterex567 said:
I read that in one of Prawesome's threads too. But I can't seem to find his script. Could you please direct me to that script. Its really urgent.
Click to expand...
Click to collapse
BlackHawk rom by ketut.Updater script given in 3rd or 4th post.
Prawesome said:
BlackHawk rom by ketut.Updater script given in 3rd or 4th post.
Click to expand...
Click to collapse
Thanks.
I used it succesfully, but now I have a new problem. I flashed it wiping everything but now it's stuck at the Android Logo Screen.
HERE IS LOGCAT: http://pastebin.com/S94vZX3G
I guess this is the main problem:
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.splitThemePackageLjava/lang/String;Ljava/lang/String;[Ljava/lang/StringI
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.detachThemePathLjava/lang/String;I)Z
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.attachThemePathLjava/lang/StringI
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.getBasePackageCount)I
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.getBasePackageNameI)Ljava/lang/String;
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.getBasePackageIdI)I
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.addRedirectionsNativeI)V
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.clearRedirectionsNative)V
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.generateStyleRedirectionsIII)Z
E/JNIHelp ( 5625): RegisterNatives failed for 'android/content/res/AssetManager'
E/AndroidRuntime( 5625): Unable to register all android natives
I/ServiceManager( 108): service 'media.player' died
I/ServiceManager( 108): service 'media.audio_policy' died
I/ServiceManager( 108): service 'media.audio_flinger' died
I/ServiceManager( 108): service 'media.camera' died
Help me outt pleaase.
masterex567 said:
Thanks.
I used it succesfully, but now I have a new problem. I flashed it wiping everything but now it's stuck at the Android Logo Screen.
HERE IS LOGCAT: http://pastebin.com/S94vZX3G
I guess this is the main problem:
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.splitThemePackageLjava/lang/String;Ljava/lang/String;[Ljava/lang/StringI
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.detachThemePathLjava/lang/String;I)Z
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.attachThemePathLjava/lang/StringI
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.getBasePackageCount)I
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.getBasePackageNameI)Ljava/lang/String;
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.getBasePackageIdI)I
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.addRedirectionsNativeI)V
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.clearRedirectionsNative)V
W/dalvikvm( 5625): ERROR: Unable to find decl for native Landroid/content/res/AssetManager;.generateStyleRedirectionsIII)Z
E/JNIHelp ( 5625): RegisterNatives failed for 'android/content/res/AssetManager'
E/AndroidRuntime( 5625): Unable to register all android natives
I/ServiceManager( 108): service 'media.player' died
I/ServiceManager( 108): service 'media.audio_policy' died
I/ServiceManager( 108): service 'media.audio_flinger' died
I/ServiceManager( 108): service 'media.camera' died
Help me outt pleaase.
Click to expand...
Click to collapse
What all things did you edit?
Prawesome said:
What all things did you edit?
Click to expand...
Click to collapse
I didn't complete it thoroughly. I wanted to test it when I was halfway done. Anyways:
EDIT: Simplified.
1) Changed Kernel
2) Modded Framework-res.apk and SystemUI.apk
2) Changed Boot Animation
3) Updated Apps
4) Added Tweaks
5) Modified Some Apps
7) Changed System Sounds
11) Added Extra Apps.
14) Tweaked init.d
15) Build.prop tweaked
16) Modded Lockscreen
I'm sure that's it if i haven't forgotten something.

[Q] Logcat error.

Can anyone help me with this logcat error.
W/dalvikvm( 1249): ERROR: Unable to find decl for native Landroid/view/Surface;.screenshotII)Landroid/graphics/Bitmap;
E/JNIHelp ( 1249): RegisterNatives failed for 'android/view/Surface'
Never mind, above error was being caused by Precise Volume Control mod by nabil danial. But now, another issue, Boot Animation is rebooting forever.
Thanks.

[GUIDE] How to read logcat messages [USER-FRIENDLY]

Hi all !
Here's my guide to read logcat. The post will be updated regularly when needed.
1.) How to logcat
Assuming you already have adb :
Code:
adb logcat
To logcat and save logcat to a file :
Code:
adb logcat>file_name.txt
2.) How to read it ?
Reading logcat is easy, easier than creating a flashable stock ROM. On logcat, you'll encounter following messages :
I/ : Information about what process is doing.
W/ : Warning, mostly displays something wrong, but not as fatal as E/ .
D/ : Debugging, same as I/ but can be crucial or fatal.
E/ : Error, crucial system error. Can be a cause of a problem.
V/ : Verbose-able / output. Mostly common message like I/ or D/ .
Example of the messages :
Code:
I/dalvikvm : Means dalvik-vm is showing an information
W/vold : Means on vold process, something is wrong.
D/dalvikvm : Means dalvik-vm is doing a debug-able actions.
E/dalvikvm : Means a fatal dalvik-vm or dalvik-vm crashed.
V/java : Java is doing something
While reading logcat, you must use your common sense. I/ sometimes can be a fatal error, so you must read it carefully.
3.) Fatal system errors
Another advantages of logcat if you're a ROM themer / porter is you can read where's system error is located.
The most common system errors are :
Code:
E/dalvikvm : The common cause of a bootloop
E/JNIHelp : Another common cause of bootloop
F/libc : Mostly SIGSEGV error, cause bootloop
Examples of errors :
Code:
E/dalvikvm( 908): ERROR: couldn't find native method : Means dalvikvm couldn't find correct method for following actions.
E/JNIHelp ( 908): RegisterNatives failed for 'android/net/wifi/WifiNative', aborting : Means JNIHelp can't register native method
F/libc ( 908): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 908 (zygote) : Caused by E/JNIHelp
Guide will be updated soon when I find something interesting.
Great thread bro,here so many peeps they need to understand it,thumps up.
GREEEETZ FROM TEAM-OPTIMA!!!

How to call apktool (dalvikvm) in a magisk module?

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.

Categories

Resources