Lanchon / haystack

Signature Spoofing Patcher for Android
GNU General Public License v3.0
234 stars 45 forks source link

The settings > developer options > "Allow Signature Spoofing" is not showing #4

Closed aktivkohle closed 7 years ago

aktivkohle commented 7 years ago

Am very impressed by how these scripts run, but it seems that settings.apk is being pulled from one place by the scripts and pushed back to somewhere else, so after reboot, all apps take time to renew themselves, but can't find anything new in settings or developer options. Of course the spoofing detector app is showing red for no spoofing.

The attached file shows the all the commands and their outputs from my terminal window. I tried to put the file manually where it came from but it didn't seem to want to go.

The device is a Sony Ericsson Xperia Mini with Cyanogenmod 10 and Android 4.2. Would be great to get this signature spoofing to work for MicroG, just flashed 10 back onto it for this. The inspiration to install MicroG btw came after @ale-5000-git suggested it here

Any idea how to fix this? haystack_log2.txt

aktivkohle commented 7 years ago

Ok I managed to fix it. Code is below. Had to look on stackoverflow to find out how to copy to and change permissions in the read-only file system.

So yes that worked, thanks very much @Lanchon :)

It worked in that the new option in settings appeared, and once spoofing was enabled (with rather funny warning messages 'allow apps to impersonate other apps') the Signature Spoofing app is showing green.

Unfortunately the original reason I needed it, MicroG network location is not working, but it's not because of the signature spoofing..

adminac@saturn ~/Android/Sdk/platform-tools $ adb shell
shell@android:/ # ls -la /system/app/Settings.apk
-rw-r--r-- root     root      7791189 2008-08-01 14:00 Settings.apk
shell@android:/ # ls -la /system/priv-app/Settings.apk                         
-rw-rw-rw- root     root      7790409 2016-12-25 23:46 Settings.apk

shell@android:/ $ su
shell@android:/ # mount -o rw,remount /system
shell@android:/ # cp /system/priv-app/Settings.apk  /system/app/Settings.apk
shell@android:/ # ls -la /system/app/Settings.apk
-rw-rw-rw- root     root      7790409 2016-12-27 13:37 Settings.apk
shell@android:/ # ls -la /system/priv-app/Settings.apk
-rw-rw-rw- root     root      7790409 2016-12-25 23:46 Settings.apk
shell@android:/ # rm /system/priv-app/Settings.apk
shell@android:/ # chmod 644 /system/app/Settings.apk
shell@android:/ # ls -la /system/app/Settings.apk
-rw-r--r-- root     root      7790409 2016-12-27 13:37 Settings.apk
Lanchon commented 7 years ago

hi,

thanks, i just saw this.

first, you used the wrong api level for patching. you used 23, which is the api level for marshmallow, while you are on jellybean 4.2. BUT... this mistake with these particular values DOES NOT CAUSE AN ISSUE, so you don't need to repatch.

it seems that either one of two things is happening:

it looks like your rom had that folder and it shouldn't. i bet you ran a tool that created this by mistake. that is what got the script to push the apk in the wrong place.

AFAIK, you shouldn't have that folder. everything in it should be dead and unused. you should probably delete it.

finally regarding:

Ok I managed to fix it. Code is below. Had to look on stackoverflow to find out how to copy to and change permissions in the read-only file system.

that's what adb remount is there for, lol!

Lanchon commented 7 years ago

Unfortunately the original reason I needed it, MicroG network location is not working,

it does work. only openbmap does not work. but install apple provider and it works. also install the local wifi based cache for faster results on known locations. and gsm local provider for gsm antenna based location, for coarse location when offline.

fine wifi location of unknown places when offline requires openbmap, and that doesnt currently work. but you can talk to the developer, they are available.

aktivkohle commented 7 years ago

Thanks for the feedback.. I deleted /system/priv-app - no need to cause a situation like in Back to the Future with something on the phone that at that time had not yet been invented ;)

No, network location is sadly still not working for me with this setup in Cyanogenmod 10, neither with apple nor with gsm not with GSMcore 0.2.4 nor with 0.2.4-39, also not as system app. I know what it looks like when it does work, rapidly finding the approximate location, on cyanogenmod 9 on this device I had both the Mozilla and the gsm backends working. Something is just stopping it registering in the system..