vermut / sailfish-signature-spoofing

This is a compiled set of instructions and tools wrapped in Docker image to fetch, deodex, patch and upload back AlienDalvik files on Sailfish phones
14 stars 12 forks source link

Revert the changes, and apply again #5

Closed krzyklo closed 5 years ago

krzyklo commented 5 years ago

On My Xperia X F5121 I had tried to follow the Sailfish X on F5121 steps, and manually get the signature spoofing work. Completed all the steps, but Signature Spoofing was not working still.

A few days ago I bought XA2 and installed Sailfish X Beta, and did Docker Yeoldegrove (based on Vermut Docker) way of implement Signature Spoofing that worked.

I wanted now to use Vermut Docker script to implement Spoofing on Xperia X (F5121) as well, but I had the following errors in the 3rd phase:

[**] 2. Deodex the files
Please remember to copy your bootclass files to /sailfish/framework!
No apps to deodex in /framework
No apps to deodex in /app
No apps to deodex in /priv-app
find: ‘/sailfish/vendor/app’: No such file or directory
No apps to deodex in /vendor/app
[**] 3. Apply the patch
>>> target directory: /hook
>>> apply patch: services.jar
>>> dexpatcher --api-level 19 --verbose --output /hook/tmp/services.jar/patched-dex /sailfish/framework/services.jar /haystack/patches/sigspoof-hook-4.1-6.0/services.jar.dex
DexPatcher version 1.6.2 by Lanchon (https://dexpatcher.github.io/)
info: read '/sailfish/framework/services.jar'
info: read '/haystack/patches/sigspoof-hook-4.1-6.0/services.jar.dex'
info: type 'com.android.server.pm.PackageManagerService': method '<init>():void': implicit ignore of trivial default constructor
error: type 'com.android.server.pm.GeneratePackageInfoHook': already exists
1 error(s), 0 warning(s)

I wonder, whether you could advice how to resolve this problem, or how to identify what is the root cause

rfvermut commented 5 years ago

It kinda looks like the 5121 is already patched. Can you upload full logs from the script?

krzyklo commented 5 years ago

Dear RFVermut, thank you for quick feedback. Please find below the full output from script.

krzys@kLatitude-E6430:/media/krzys/c959b919-34c0-4a1f-8e76-da927fb5a488/Sailfish_backup$ sudo docker run --rm -ti --env SAILFISH=192.168.2.15 vermut/sailfish-signature-spoofing
[sudo] password for krzys: 
[**] 0. Validate the environment
[**] 1. Fetch files via RSYNC
receiving incremental file list
created directory sailfish
app/
app/AlienNativeBrowser.apk
app/AlienNativeEmail.apk
app/AlienNativeMessages.apk
app/AlienNativePhone.apk
app/AlienNativePlayer.apk
app/Camera2.apk
app/DocumentsUI.apk
app/DownloadProviderUi.apk
app/Fallback.apk
app/Gallery2.apk
app/PackageInstaller.apk
app/TelephonyProvider.apk
app/UserDictionaryProvider.apk
framework/
framework/am.jar
framework/android.policy.jar
framework/android.test.runner.jar
framework/apache-xml.jar
framework/bmgr.jar
framework/bouncycastle.jar
framework/bu.jar
framework/com.android.location.provider.jar
framework/com.android.media.remotedisplay.jar
framework/conscrypt.jar
framework/content.jar
framework/core-junit.jar
framework/core.jar
framework/ext.jar
framework/framework-res.apk
framework/framework.jar
framework/framework2.jar
framework/ime.jar
framework/input.jar
framework/javax.obex.jar
framework/media_cmd.jar
framework/mms-common.jar
framework/monkey.jar
framework/okhttp.jar
framework/pm.jar
framework/requestsync.jar
framework/services.jar
framework/settings.jar
framework/svc.jar
framework/telephony-common.jar
framework/uiautomator.jar
framework/voip-common.jar
framework/webviewchromium.jar
framework/wm.jar
priv-app/
priv-app/AlienFakeHome.apk
priv-app/AlienRemoteKeyboard.apk
priv-app/AlienTeleService.apk
priv-app/CalendarProvider.apk
priv-app/Contacts.apk
priv-app/ContactsProvider.apk
priv-app/DefaultContainerService.apk
priv-app/DownloadProvider.apk
priv-app/ExternalStorageProvider.apk
priv-app/FusedLocation.apk
priv-app/InputDevices.apk
priv-app/MediaProvider.apk
priv-app/SettingsProvider.apk
priv-app/Shell.apk
priv-app/SystemUI.apk

sent 1,226 bytes  received 27,420,311 bytes  6,093,674.89 bytes/sec
total size is 27,409,167  speedup is 1.00
[**] 2. Deodex the files
Please remember to copy your bootclass files to /sailfish/framework!
No apps to deodex in /framework
No apps to deodex in /app
No apps to deodex in /priv-app
find: ‘/sailfish/vendor/app’: No such file or directory
No apps to deodex in /vendor/app
[**] 3. Apply the patch
>>> target directory: /hook
>>> apply patch: services.jar
>>> dexpatcher --api-level 19 --verbose --output /hook/tmp/services.jar/patched-dex /sailfish/framework/services.jar /haystack/patches/sigspoof-hook-4.1-6.0/services.jar.dex
DexPatcher version 1.6.2 by Lanchon (https://dexpatcher.github.io/)
info: read '/sailfish/framework/services.jar'
info: read '/haystack/patches/sigspoof-hook-4.1-6.0/services.jar.dex'
info: type 'com.android.server.pm.PackageManagerService': method '<init>():void': implicit ignore of trivial default constructor
error: type 'com.android.server.pm.GeneratePackageInfoHook': already exists
1 error(s), 0 warning(s)
rfvermut commented 5 years ago

Well I'd say it's already patched.

info: type 'com.android.server.pm.PackageManagerService': method '<init>():void': implicit ignore of trivial default constructor
error: type 'com.android.server.pm.GeneratePackageInfoHook': already exists

You can try to uninstall Android Support from phone, manually delete /opt/alien folder and then try again from the clean slate.

krzyklo commented 5 years ago

The solution was, as per your suggestion: 1) uninstall Android Support from phone 2) Install it again (no need to wipe out /opt/alien). 3) Now Docker vermut/sailfish-signature-spoofing worked

Thank you very much for your kind help!