SpazeDog / mounts2sd

Android SD-Ext Script+App
GNU General Public License v3.0
78 stars 27 forks source link

S-On recovery fallback handler failing with "signature verification failed" #18

Open dfxx opened 11 years ago

dfxx commented 11 years ago

I have a LG P506 (Optimus Thrive) with a CM10.1 ROM installed from here: http://forum.xda-developers.com/showthread.php?t=1811325

When m2sd starts posts "There is no startup script present on your device. Go to application settings and install it." When I go into settings and click the Install Startup Script I get the following: "Your device is S-On protected which means that the application cannot write to the system partition from within Android. Do you want to launch the recovery fallback handler?"

Clicking "Okay" copies files into /data/local/ and reboots into CWM recovery and attempts to install the zip. It fails with "signature verification failed."

"Show log" from CWM recovery shows the following:

Finding update package... I:Update location: /data/local/fallback.zip Opening update package... I:1 key(s) loaded from /res/keys Verifying update package... I:verify_file returned 1 E:signature verification failed Installation aborted.

I went to look for a /res/keys file and while there is a /res directory there is no keys file. I can disable the key check, but I can't get back to the zip in /data/local/ after I disable the key check...

Any suggestions?

dfxx commented 11 years ago

So, just went ahead to check if S-On is operating, remounted /system as rw, placed a new file in /system with "touch /system/newfile". I then rebooted the phone and went and checked if my new file was still in /system, and it was.

This appears to be a case of mistaken identity, where my phone is recognized as a phone with S-On, when it really doesn't have it enabled. This seems to jive, as every discussion of S-On talks about it as if it were HTC only.

dbergloev commented 11 years ago

Yes that is strange. However, don't try to launch the zip from data. Just relaunch it from the app. It does not mater whether I have a key file in the zip or not, the verification will fail regardless, so it must be turned off in the recovery.

About your S-On problem, it could be a problem with your SuperUser binary or some other protection problem on your device. Using root in ADB and in an App is not the same, as ADB has outer root (It has init permissions) while apps get root from within sub-processes.

dfxx commented 11 years ago

Yeah, I'm going to ignore the key issue. Relaunching from the app fails every time with the same error.

My testing, when I placed the file in /system, was from within the terminal emulator app, not using adb. I had to get root through the standard SuperUser app , in fact version 3.2. I'm gonna start digging around in the code, can you point me in the general direction of the S-On detection code?

Thanks,

Jared On Oct 12, 2013 2:17 AM, "Daniel Bergløv" notifications@github.com wrote:

Yes that is strange. However, don't try to launch the zip from data. Just relaunch it from the app. It does not mater whether I have a key file in the zip or not, the verification will fail regardless, so it must be.

About your S-On problem, it could be a problem with your SuperUser binary. Using root in ADB and in an App is not the same, as ADB has outer root (It has init permissions) while apps get root from within sub-processes.

— Reply to this email directly or view it on GitHubhttps://github.com/SpazeDog/mounts2sd/issues/18#issuecomment-26193417 .

dbergloev commented 11 years ago

I can give you the exact line: Preferences.java:250

podarok commented 10 years ago

The same to HTC legend on 4.2.1 manual fallback.zip installation via recovery - do nothing

XWR commented 10 years ago

Much the same issue with an LG Optimus One p500, s-on, CM10.2, kernel 3.0.8-perf+chocolate. After clicking okay in the app to fallback, but when the phone reboots, in recovery I get the message "E:failed to open /data/local/fallback.zip (no such file or directory)" and then "E:signature verification failed." I checked /data/local and the fallback.zip file is there.

dbergloev commented 10 years ago

You need to disable verification check in the recovery

acaciosc commented 8 years ago

dk-zero-cool is right. Just disable the key verification through "toggle signature verification", in "advanced".