Help Modding Framework - Google Pixel Questions & Answers

I have been wanting to mod some of the framework code on my Pixel XL to change some behaviors of my System, but I am not sure what to do exactly. When I try to extract odex files backsmali throws an ArrayOutOfBounds exception.
Here is what I did:
I downloaded backsmali 2.2.2 from here.
Ran `mkdir /sdcard/framework/ && cp /system/framework/* /sdcard/framework` as root on my phone.
Ran `adb pull /sdcard/framework` on my computer.
Ran `java -Xms1g -jar baksmali-2.2.2.jar x -d framework/arm64 framework/oat/arm64/services.odex -o services`
When using `less` to view the contents of the odex file it appears to be an ELF, is this normal for odex?
Phone software:
Android 8.1.0
Kernel 3.18.70-g520f6eb
Build OPM1.171019.012
Security patch January 5, 2018
Magisk v15.2
Edit:
Stack trace:
Code:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1889914952
at org.jf.dexlib2.dexbacked.BaseDexBuffer.readSmallUint(BaseDexBuffer.java:53)
at org.jf.dexlib2.dexbacked.OatFile$DexEntryIterator.next(OatFile.java:579)
at org.jf.dexlib2.dexbacked.OatFile$DexEntryIterator.next(OatFile.java:570)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at org.jf.util.AbstractForwardSequentialList$1.next(AbstractForwardSequentialList.java:91)
at java.util.AbstractSequentialList.get(AbstractSequentialList.java:88)
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:129)
at org.jf.baksmali.DexInputCommand.loadDexFile(DexInputCommand.java:144)
at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:161)
at org.jf.baksmali.Main.main(Main.java:102)
SHA512 hashes:
Code:
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/am.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/android.hidl.base-V1.0-java.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/android.hidl.manager-V1.0-java.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/android.test.mock.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/android.test.runner.jar
955480e9f99d8524975038753a090669eb928fa209b371e4dcbae22f3866431323d95e81a2ebe862fdc8bae9b43ac60dc67c74b11eb7d85c02ddfcd61ec1c274 framework/apache-xml.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/appwidget.jar
sha512sum: framework/arm: Is a directory
sha512sum: framework/arm64: Is a directory
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/bmgr.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/bouncycastle.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/bu.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.android.future.usb.accessory.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.android.ims.rcsmanager.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.android.location.provider.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.android.mediadrm.signer.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.android.media.remotedisplay.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.android.nfc_extras.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.google.android.camera.experimental2016.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.google.android.dialer.support.jar
650a1df9569c0ad2449a462a4967abda84dbb31a4eb94a8a79431a9a362608c0c4cb54d1b77ea0eed2d2f82c605c7f3ebf150c1d38da64159d98777e29ab5626 framework/com.google.android.maps.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.google.android.media.effects.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/com.google.vr.platform.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/conscrypt.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/content.jar
53d361f35953db7e414ce6115b91380788f8236816e722d51c1f1dafff5f0c2a32e6c87ba268298cfb522264a262f89ec9cd388708fe9d68c5a5687a17f6aef9 framework/core-libart.jar
197dcf115c82b1dcec72d6256a4ec667668aee06a5a9aa433f6514b89b704cf49d2f3f3beb728a25730b27b682ce938966c2a352ab9481a8db71c21545f4fb87 framework/core-oj.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/dpm.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/ethernet-service.jar
d36887847d069342fd8541b1f650843d2f05f774225edd2ddf01b39a7b30c788f3c47d864dc22ff14fcbaa6d7219ac410c968222d202dd57fec7b9803dd49d94 framework/ext.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/framework.jar
085085b2928148471bd70a400735e824c4f35b825cddbf8dbcce58b82a62dd3290bff6b33e48ef82bf6df366b868c27d403608cba9a85bd4ead5c894c2eae62a framework/framework-res.apk
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/hid.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/ime.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/ims-common.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/input.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/javax.obex.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/legacy-test.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/locksettings.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/media_cmd.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/monkey.jar
sha512sum: framework/oat: Is a directory
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/okhttp.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/org.apache.http.legacy.boot.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/pm.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/requestsync.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/services.jar
447463a1c9607706397882549ab7da07df249f96b3fbb95b2fb21889d7ca14f1cc90b22399e755bb1b70bac3e5322aeb9d4555da829023d6f96d75ff44281c5a framework/services.jar.prof
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/sm.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/svc.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/telecom.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/telephony-common.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/uiautomator.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/VerizonUnifiedSettings.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/voip-common.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/vr.jar
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/wifi-service.jar
bf9faef19fc1ff4b943466516692cc5faeaf3401729b1985792f764320e2748ed32e0fa0e0a715229b4d3423f5325bc22d3cf223524f447ef02195b679c00bcd framework/wifi-service.jar.prof
86d743c9591d9c6f7ef6d4a40b3af2bd1364ac9a9cd288a1161dab29cf08a694815cc8dde814983f3df1a0897501d65d37225a81c232d497398942df7a81e422 framework/wm.jar

gudenau said:
I have been wanting to mod some of the framework code on my Pixel XL to change some behaviors of my System, but I am not sure what to do exactly. When I try to extract odex files backsmali throws an ArrayOutOfBounds exception.
Click to expand...
Click to collapse
Baksmali has not been updated to work with 8.1 yet

Tulsadiver said:
Baksmali has not been updated to work with 8.1 yet
Click to expand...
Click to collapse
That's the only issue?

gudenau said:
That's the only issue?
Click to expand...
Click to collapse
That plus vdex is used now instead of odex.

Tulsadiver said:
That plus vdex is used now instead of odex.
Click to expand...
Click to collapse
I thought those where just something like a signature, saying the odex files where valid.

gudenau said:
I thought those where just something like a signature, saying the odex files where valid.
Click to expand...
Click to collapse
I believe starting with 8.1, odex is not being used anymore at least with system files like systemuigoogle.apk.

Tulsadiver said:
I believe starting with 8.1, odex is not being used anymore at least with system files like systemuigoogle.apk.
Click to expand...
Click to collapse
Where could I find more info about the various files that are used in the frameworks directory?

It's been quite a while, any ideas?
Bumping instead of a new thread. Just this once.

Related

[SCRIPT/HOW-TO] Sign files with a right-click (Ubuntu)

1. Download testsign.jar
2. Create the following script in your Nautilus script directory and name it sign :
Code:
#!/bin/sh
# Update the Loc var to where YOU stored the testsign.jar file !
Loc=/home/ra/android-sdk-linux_x86-1.5_r2/tools/SignApp/
for arg
do
java -classpath "$Loc"testsign.jar testsign "$arg" "$arg"-signed
gdialog --title "signapk" --msgbox ""$arg"-signed created" 200 200
done
3. Right-click the file you want to sign, navigate to script and select sign ^^
Important :
The Nautilus script directory is probably ~.gnome2/nautilus-scripts (Prior to Nautilus release 1.0.5, the scripts directory was ~/Nautilus/scripts).
Make sure that you chmod u+x both script and testsign.jar !
Don't forget to update the Loc var in the script !
Amon_RA said:
1. Download testsign.jar
2. Create the following script in your Nautilus script directory and name it sign :
Code:
#!/bin/sh
# Update the Loc var to where YOU stored the testsign.jar file !
Loc=/home/ra/android-sdk-linux_x86-1.5_r2/tools/SignApp/
for arg
do
java -classpath "$Loc"testsign.jar testsign "$arg" "$arg"-signed.zip
gdialog --title "signapk" --msgbox ""$arg"-signed.zip created" 200 200
done
3. Right-click the file you want to sign, navigate to script and select sign ^^
Important :
The Nautilus script directory is probably ~.gnome2/nautilus-scripts (Prior to Nautilus release 1.0.5, the scripts directory was ~/Nautilus/scripts).
Make sure that you chmod u+x both script and testsign.jar !
Don't forget to update the Loc var in the script !
Click to expand...
Click to collapse
Nice, I miss this feature coming from Windows didn't know how to do it haha Thanks
Amon_RA said:
1. Download testsign.jar
2. Create the following script in your Nautilus script directory and name it sign :
Code:
#!/bin/sh
# Update the Loc var to where YOU stored the testsign.jar file !
Loc=/home/ra/android-sdk-linux_x86-1.5_r2/tools/SignApp/
for arg
do
java -classpath "$Loc"testsign.jar testsign "$arg" "$arg"-signed.zip
gdialog --title "signapk" --msgbox ""$arg"-signed.zip created" 200 200
done
3. Right-click the file you want to sign, navigate to script and select sign ^^
Important :
The Nautilus script directory is probably ~.gnome2/nautilus-scripts (Prior to Nautilus release 1.0.5, the scripts directory was ~/Nautilus/scripts).
Make sure that you chmod u+x both script and testsign.jar !
Don't forget to update the Loc var in the script !
Click to expand...
Click to collapse
thanks just finished setting it up
Updated the script so it's just adding signed in front of the file.
Great!
Added a link to the top of my how-to.
"-signed.zip" be added to the end. I get this after the script is executed with the script:
signed-/home/stephane/Desktop/udpate.zip created
Click to expand...
Click to collapse
thanks, my debian box is happy
okay, renaming the archive and removing the zip extension and using the original script seems to work.
I thought I had set this all up correctly, but when I right click on a zip and choose "Sign" I get a popup about encryption keys :-S
No encryption keys were found with which to perform the operation you requested. The program Passwords and Encryption Keys will now be started so that you may either create a key or import one.
Click to expand...
Click to collapse
I'm really not sure what I did wrong.
I pasted testsing.jar in /home/adrian/android
then made the script - sudo gedit /home/adrian/.gnome2/nautilus-scripts/sign
Code:
#!/bin/sh
# Update the Loc var to where YOU stored the testsign.jar file !
Loc=/home/adrian/android/
for arg
do
java -classpath "$Loc"testsign.jar testsign "$arg" signed-"$arg"
gdialog --title "signapk" --msgbox "signed-"$arg" created" 200 200
done
and finally chmodded the jar and script
Code:
cd /home/adrian/android/
chmod u+x testsign.jar
cd /home/adrian/.gnome2/nautilus-scripts/
chmod u+x sign
Any help is appreciated, I feel like such a n00b right now :-/
Bump
I assume I'm doing something wrong, as I've tried the same thing on my netbook and the exact same thing happens.
AdrianK said:
I thought I had set this all up correctly, but when I right click on a zip and choose "Sign" I get a popup about encryption keys :-S
I'm really not sure what I did wrong.
I pasted testsing.jar in /home/adrian/android
then made the script - sudo gedit /home/adrian/.gnome2/nautilus-scripts/sign
Code:
#!/bin/sh
# Update the Loc var to where YOU stored the testsign.jar file !
Loc=/home/adrian/android/
for arg
do
java -classpath "$Loc"testsign.jar testsign "$arg" signed-"$arg"
gdialog --title "signapk" --msgbox "signed-"$arg" created" 200 200
done
and finally chmodded the jar and script
Code:
cd /home/adrian/android/
chmod u+x testsign.jar
cd /home/adrian/.gnome2/nautilus-scripts/
chmod u+x sign
Any help is appreciated, I feel like such a n00b right now :-/
Click to expand...
Click to collapse
It looks like you're selecting the Sign option that does gpg/pgp signing. There should be a "Scripts" submenu when you right click and then your script name should be listed under that.
alcahuete said:
It looks like you're selecting the Sign option that does gpg/pgp signing. There should be a "Scripts" submenu when you right click and then your script name should be listed under that.
Click to expand...
Click to collapse
I feel like such a n00b, I just saw saw sign and assumed it was the correct option ;-) Where do the signed files actaully end up? They don't appear in the original directory :-S
okay, renaming the archive and removing the zip extension and using the original script seems to work.
Click to expand...
Click to collapse
This doesn't change anything for me :-S
Does this also work for Apk's?
I'm having the same problem as Adrian.
I followed the directions to the letter and I get the scripts submenu with the sign option.
after I select "sign" I get the "signapk" message that says "signed! /home/greg/desktop/hero.zip created. OK
But when I check my archive there is nothing in the META-INF file (except the com directory).
PS. I'm a Linux noob too.
alritewhadeva said:
Nice, I miss this feature coming from Windows didn't know how to do it haha Thanks
Click to expand...
Click to collapse
You could actually do something like this in Windows; you could write a batch (cmd) file and modify the registry for shell open commands. It might take a little more effort and use components of Windows most users wouldn't touch with a 10 foot pole, but it works pretty well. I "wrote" a pdf creation system based on ghostscript and used a similar technique.
Changed the first post a bit, check if it's working now for you.
Amon_RA said:
Changed the first post a bit, check if it's working now for you.
Click to expand...
Click to collapse
I somehow managed to get it to work by creating a folder called "signing" in my androidsdk directory. For some reason it won't work from the Desktop.
Amon_RA said:
1. Download testsign.jar
2. Create the following script in your Nautilus script directory and name it sign :
Code:
#!/bin/sh
# Update the Loc var to where YOU stored the testsign.jar file !
Loc=/home/ra/android-sdk-linux_x86-1.5_r2/tools/SignApp/
for arg
do
java -classpath "$Loc"testsign.jar testsign "$arg" "$arg"-signed
gdialog --title "signapk" --msgbox ""$arg"-signed created" 200 200
done
3. Right-click the file you want to sign, navigate to script and select sign ^^
Important :
The Nautilus script directory is probably ~.gnome2/nautilus-scripts (Prior to Nautilus release 1.0.5, the scripts directory was ~/Nautilus/scripts).
Make sure that you chmod u+x both script and testsign.jar !
Don't forget to update the Loc var in the script !
Click to expand...
Click to collapse
Thank you so much for this! I wasn't sure how to do it, couldn't find an answer, then you pop up! Thank you for your hard work.
Much obliged, RA.
~~~~~~~~~~
Great work! It works on Gentoo/Sabayon with nautilus installed under e17.

[SCRIPT/HOW-TO] Sign files with a right-click (Ubuntu)

1. Download testsign.jar
2. Create the following script in your Nautilus script directory and name it sign :
Code:
#!/bin/sh
# Update the Loc var to where YOU stored the testsign.jar file !
Loc=/home/ra/android-sdk-linux_x86-1.5_r2/tools/SignApp/
for arg
do
java -classpath "$Loc"testsign.jar testsign "$arg" signed-"$arg"
gdialog --title "signapk" --msgbox "signed-"$arg" created" 200 200
done
3. Right-click the file you want to sign, navigate to script and select sign ^^
Important :
The Nautilus script directory is probably ~.gnome2/nautilus-scripts (Prior to Nautilus release 1.0.5, the scripts directory was ~/Nautilus/scripts).
Make sure that you chmod u+x both script and testsign.jar !
Don't forget to update the Loc var in the script !
Great! This was really handy
Thanks Amon_RA
thx, nice solution.
Thanks for this Amon_RA, if it's not already in the Wiki can we add it there please otherwise this post will get lost
Hi Amon_Ra, is there a way to do this on windows???
Yes
WWW.modmygphone.com/forums/archive/index.php/t-10591.html

[ Huawei - How to ctivate clone app function]

Hi!
I find out how to activate the cloning app function [ app twin future] ( on my P8 Lite ALE EMUI 4.0.3 )!
What i have done?
Add this line, if your phone doesn't have it, to build.prop or local.prop in prop folder in your cust:
Code:
ro.config.hw_support_clone_app=true
Now, i pick from Mate 8 the file hw_clone_app_list.xml and paste in my xml folder on cust and give 644 permissions! ( /cust/hw/eu/xml - This path can be diferent from phone to phone, you must find out your cust path ). Then reboot! If doens´t show the option in setting below app option do backup and then a factory reset.
How to find your cust path?
Do this, use adb and write/copy and paste this code:
Code:
adb shell getprop ro.hw.custPath
then you will get your cust path.
My, for example, is /cust/hw/eu, inside eu i have the xml folder that i need to paste the file hw_clone_app_list.xml and the prop folder where is local.prop.
This is the composition from the hw_clone_app_list.xml file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- DTS2016080802881 shiyuanchang/00271386 20160822 created -->
<AppClone>
<package name="com.whatsapp"/>
<package name="com.facebook.katana"/>
<package name="com.facebook.orca"/>
</AppClone>
But you can add more app by adding is package name like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- DTS2016080802881 shiyuanchang/00271386 20160822 created -->
<AppClone>
<package name="com.whatsapp"/>
<package name="com.facebook.katana"/>
<package name="com.facebook.orca"/>
<package name="com.android.chrome"/>
<package name="mega.privacy.android.app"/>
</AppClone>
I add Chrome and Mega app to clone list! Can be add twitter or any other app that you need, only need to know is package name!
If you try and works comment your Huawei model!
Enjoy it!
.
persona78 said:
Hi!
I find out how to activate the cloning app function [ app twin future] ( on my P8 Lite ALE EMUI 4.0.3 )!
What i have done?
Add this line, if your phone doesn't have it, to build.prop or local.prop in prop folder in your cust:
Code:
ro.config.hw_support_clone_app=true
Now, i pick from Mate 8 the file hw_clone_app_list.xml and paste in my xml folder on cust and give 644 permissions! ( /cust/hw/eu/xml - This path can be diferent from phone to phone, you must find out your cust path ). Then reboot! If doens´t show the option in setting below app option do backup and then a factory reset.
How to find your cust path?
Do this, use adb and write/copy and paste this code:
Code:
adb shell getprop ro.hw.custPath
then you will get your cust path.
My, for example, is /cust/hw/eu, inside eu i have the xml folder that i need to paste the file hw_clone_app_list.xml and the prop folder where is local.prop.
This is the composition from the hw_clone_app_list.xml file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- DTS2016080802881 shiyuanchang/00271386 20160822 created -->
<AppClone>
<package name="com.whatsapp"/>
<package name="com.facebook.katana"/>
<package name="com.facebook.orca"/>
</AppClone>
But you can add more app by adding is package name like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- DTS2016080802881 shiyuanchang/00271386 20160822 created -->
<AppClone>
<package name="com.whatsapp"/>
<package name="com.facebook.katana"/>
<package name="com.facebook.orca"/>
<package name="com.android.chrome"/>
<package name="mega.privacy.android.app"/>
</AppClone>
I add Chrome and Mega app to clone list! Can be add twitter or any other app that you need, only need to know is package name!
If you try and works comment your Huawei model!
Enjoy it!
.
Click to expand...
Click to collapse
P8lite is perfect.
Wysłane z mojego ALE-L21 przy użyciu Tapatalka
Works on Mate 9
the method I was previously using, stopped working with EMUI 5.0.1 but this method works. Thanks!!
persona78 said:
Hi!
I find out how to activate the cloning app function [ app twin future] ( on my P8 Lite ALE EMUI 4.0.3 )!
What i have done?
Add this line, if your phone doesn't have it, to build.prop or local.prop in prop folder in your cust:
Code:
ro.config.hw_support_clone_app=true
Now, i pick from Mate 8 the file hw_clone_app_list.xml and paste in my xml folder on cust and give 644 permissions! ( /cust/hw/eu/xml - This path can be diferent from phone to phone, you must find out your cust path ). Then reboot! If doens´t show the option in setting below app option do backup and then a factory reset.
How to find your cust path?
Do this, use adb and write/copy and paste this code:
Code:
adb shell getprop ro.hw.custPath
then you will get your cust path.
My, for example, is /cust/hw/eu, inside eu i have the xml folder that i need to paste the file hw_clone_app_list.xml and the prop folder where is local.prop.
This is the composition from the hw_clone_app_list.xml file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- DTS2016080802881 shiyuanchang/00271386 20160822 created -->
<AppClone>
<package name="com.whatsapp"/>
<package name="com.facebook.katana"/>
<package name="com.facebook.orca"/>
</AppClone>
But you can add more app by adding is package name like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- DTS2016080802881 shiyuanchang/00271386 20160822 created -->
<AppClone>
<package name="com.whatsapp"/>
<package name="com.facebook.katana"/>
<package name="com.facebook.orca"/>
<package name="com.android.chrome"/>
<package name="mega.privacy.android.app"/>
</AppClone>
I add Chrome and Mega app to clone list! Can be add twitter or any other app that you need, only need to know is package name!
If you try and works comment your Huawei model!
Enjoy it!
.
Click to expand...
Click to collapse
I can't find hw_clone_app_list.xml in cust/all/eu and cust/all/eu/prop.
Do you mean that i should paste the hw_clone_app_list.xml to the two folders above?
---------- Post added at 01:53 PM ---------- Previous post was at 01:51 PM ----------
I can't find hw_clone_app_list.xml in cust/all/eu and cust/all/eu/prop.
Do you mean that i should paste the hw_clone_app_list.xml to the two folders above?
---------- Post added at 01:54 PM ---------- Previous post was at 01:53 PM ----------
I can't find hw_clone_app_list.xml in cust/all/eu and cust/all/eu/prop.
Do you mean that i should paste the hw_clone_app_list.xml to the two folders above?
you can create a zip file to flash by TWRP in emui 4 with this clone mod?

Can't install a modified app using ADB "A problem occured during package analyze"

Can't install a modified app using ADB "A problem occured during package analyze"
Hello,
I have modify an app (actually a simple .txt file) and I package it again.
Then I move the base.apk in the original folder in /data/app/app_folder and when I hit base.apk, an error message appears :
"A problem occured during package analyze"
Have you got any idea where I am wrong ?
Thanks
probably corrupted signature - Did you re-sign it?
DSA said:
probably corrupted signature - Did you re-sign it?
Click to expand...
Click to collapse
In the installation folder there was : "lib" folder, "oat" foolder and the base.apk
I only modified the base.apk using an extractor like 7-zip and pack it again after in .apk
How do I sign it again ?
Error log:
"C:\Program Files (x86)\Minimal ADB and Fastboot>adb install D:\app\com.toyquest.Cayla.fr-1\base.apk
Failed to install D:\app\com.toyquest.Cayla.fr-1\base.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl1492354494.tmp/base.apk: AndroidManifest.xml]"
I sign it using :
keytool -genkey -v -keystore my-release-key.keystore -alias CAYLA -keyalg RSA -keysize 2048 -validity 10000
sudo jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore base.apk CAYLA
sudo jarsigner -verify -verbose -certs base.apk
Right method ?
Session 'app': Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION
Retry
i cant install , if i do push abb can i ?
The error reported has NOTHING to do with APK's signature:
Error log:
"C:\Program Files (x86)\Minimal ADB and Fastboot>adb install D:\app\com.toyquest.Cayla.fr-1\base.apk
Failed to install D:\app\com.toyquest.Cayla.fr-1\base.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl1492354494.tmp/base.apk: AndroidManifest.xml]"
Click to expand...
Click to collapse
APK's AndroidManifest.xml is the culprit! Wondering why you don't carefully read error messages?
it's just that you removed or modify some line in xml file which is causing problem. just search for it alternatively if you want to change image file you can swamp it with another file with same name. hope it helped

[SOLVED] [HELP] Can't install bsdiff4 and use .bin Payload Dumper

Yo hello, i installed a custom rom for my motorola one (deen), and i need to root it again with magisk. But the rom has a .bin file instead of normal boot.img stuff. So i got this Payload dumper, but it doesn't want to work. Everytime i try to install the dependencies it says
C:\Users\nego ney\Downloads\payload_dumper-master\payload_dumper-master>python3 -m pip install -r requirements.txt
Requirement already satisfied: protobuf==3.6.0 in c:\users\nego ney\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from -r requirements.txt (line 1)) (3.6.0)
Requirement already satisfied: six==1.11.0 in c:\users\nego ney\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from -r requirements.txt (line 2)) (1.11.0)
Collecting bsdiff4>=1.1.5
Using cached bsdiff4-1.2.1.tar.gz (11 kB)
Requirement already satisfied: setuptools in c:\program files\windowsapps\pythonsoftwarefoundation.python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\site-packages (from protobuf==3.6.0->-r requirements.txt (line 1)) (56.0.0)
Using legacy 'setup.py install' for bsdiff4, since package 'wheel' is not installed.
Installing collected packages: bsdiff4
Running setup.py install for bsdiff4 ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\nego ney\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\nego ney\\AppData\\Local\\Temp\\pip-install-mp5zoj50\\bsdiff4_b64f4fb7c8d44c99a8989c37191075a4\\setup.py'"'"'; __file__='"'"'C:\\Users\\nego ney\\AppData\\Local\\Temp\\pip-install-mp5zoj50\\bsdiff4_b64f4fb7c8d44c99a8989c37191075a4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\nego ney\AppData\Local\Temp\pip-record-tk6s6_pk\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\nego ney\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\bsdiff4'
cwd: C:\Users\nego ney\AppData\Local\Temp\pip-install-mp5zoj50\bsdiff4_b64f4fb7c8d44c99a8989c37191075a4\
Complete output (19 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\bsdiff4
copying bsdiff4\cli.py -> build\lib.win-amd64-3.9\bsdiff4
copying bsdiff4\format.py -> build\lib.win-amd64-3.9\bsdiff4
copying bsdiff4\test_all.py -> build\lib.win-amd64-3.9\bsdiff4
copying bsdiff4\__init__.py -> build\lib.win-amd64-3.9\bsdiff4
running build_ext
building 'bsdiff4.core' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\bsdiff4
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um /Tcbsdiff4/core.c /Fobuild\temp.win-amd64-3.9\Release\bsdiff4/core.obj
core.c
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\include\pyconfig.h(59): fatal error C1083: Nao ‚ poss¡vel abrir arquivo incluir: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\nego ney\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\nego ney\\AppData\\Local\\Temp\\pip-install-mp5zoj50\\bsdiff4_b64f4fb7c8d44c99a8989c37191075a4\\setup.py'"'"'; __file__='"'"'C:\\Users\\nego ney\\AppData\\Local\\Temp\\pip-install-mp5zoj50\\bsdiff4_b64f4fb7c8d44c99a8989c37191075a4\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\nego ney\AppData\Local\Temp\pip-record-tk6s6_pk\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\nego ney\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Include\bsdiff4' Check the logs for full command output
"
"
And i could not find any tutorial solving that, please help me bois
help reeeeeee
please answer me i beg
bump
Solved, i used it on a vm running clean python + vs instalations, sorry for useless thread
iHatePayloadDumper said:
Solved, i used it on a vm running clean python + vs instalations, sorry for useless thread
Click to expand...
Click to collapse
hey, how did u solved that problem? im stuck here too
Larry112 said:
hey, how did u solved that problem? im stuck here too
Click to expand...
Click to collapse
Had the same issue. Downgrading protobuf to 3.19.3 fixed it for me

Categories

Resources