nvllsvm / freecyngn

A small tool to remove proprietary parts from CyanogenMod 13
Do What The F*ck You Want To Public License
126 stars 10 forks source link

Error 255 #19

Open jeremy447 opened 8 years ago

jeremy447 commented 8 years ago

I downloaded "freecyngn-flashable-cm1011.zip" that I tried to flash after I installed CM11 but I have an "error 255".

What does this error mean ?

Thanks !

jeremy447 commented 8 years ago

I didn't found anything meaningful for this error 255 unfortunately. Maybe we need to make a full wipe before flashing the ROM and using Freecyngn ?

walrus543 commented 8 years ago

Can you post a log? Is your recovery up to date?

jeremy447 commented 8 years ago

Can you post a log?

Yes of course but what log can I post ?

Is your recovery up to date?

Yes, it's TWRP 3.0.2 (http://forum.xda-developers.com/showthread.php?t=2278483)

walrus543 commented 8 years ago

The log of your recovery, the full error message.

jeremy447 commented 8 years ago

Here it is : http://pastebin.com/pSr2mDV4

walrus543 commented 8 years ago

Your device has a x86 architecture and that's the problem I think.

jeremy447 commented 8 years ago

You are right it's a x86. I will be glad if @mar-v-in can give his thought too.

mar-v-in commented 8 years ago

Yes, the zip file published by me is arm only. You need the updater-binary (e.g. from the cm zip) for x86 and place it into the zip in META-INF/com/google/android

jeremy447 commented 8 years ago

I did it and now I have error 7 :(

http://pastebin.com/mnqyKhnf

walrus543 commented 8 years ago

set_perm: chown of /system/freecyngn/zip to 0 0 failed: No such file or directory set_perm: chmod of /system/freecyngn/zip to 755 failed: No such file or directory script aborted: set_perm: some changes failed set_perm: some changes failed

Try removing /system/freecyngn/zip in the updater-script. Re-sign the zip and try again.

jeremy447 commented 8 years ago

The error 7 is gone but the log show some problem :

Installing zip file '/sdcard/Download/freecyngn-flashable-cm1011.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
Mounting /system...
about to run program [/sbin/busybox] with 3 args
about to run program [/sbin/busybox] with 3 args
Mounting /data...
mount: mounting /dev/block/mmcblk0p17 on /data failed: Device or resource busy
run_program: child exited with status 255
about to run program [/sbin/busybox] with 3 args
Extracting package...
minzip: Extracted file "/system/freecyngn/20-freecyngn.sh"
minzip: Extracted file "/system/freecyngn/baksmali-dvk.jar"
minzip: Extracted file "/system/freecyngn/busybox"
minzip: Extracted file "/system/freecyngn/freecyngn.sh"
minzip: Extracted file "/system/freecyngn/noAnalytics-dvk.jar"
minzip: Extracted file "/system/freecyngn/smali-dvk.jar"
about to run program [/system/freecyngn/freecyngn.sh] with 1 args
Cleaning up [this will take a while] ...
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "rm"...
page record for 0xb75ed01c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "mkdir"...
page record for 0xb756201c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "mkdir"...
page record for 0xb75f301c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "mkdir"...
page record for 0xb757301c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "ash"...
page record for 0xb758a01c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "ash"...
page record for 0xb75c101c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "ash"...
page record for 0xb763901c was not found (block_size=16)
Aborted
Aborted
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "rm"...
page record for 0xb757501c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "cp"...
page record for 0xb75c301c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "rm"...
page record for 0xb762401c was not found (block_size=16)
Aborted
/system/freecyngn/freecyngn.sh: cd: line 70: can't cd to /tmp/freecyngn/Settings
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "rm"...
page record for 0xb756f01c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "rm"...
page record for 0xb75fa01c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "rm"...
page record for 0xb764301c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "cp"...
page record for 0xb75a401c was not found (block_size=16)
CANNOT LINK EXECUTABLE: cannot locate symbol "stdin" referenced by "chmod"...
page record for 0xb75b301c was not found (block_size=16)

http://pastebin.com/RDb7jrzB

Do you know why "/system/freecyngn/zip" is missing ?

Thanks !

walrus543 commented 8 years ago

No idea. I monitor this project for a potential CM13 package but I never flashed it for CM11 or CM12. I didn't check mar-v-in's files so it would be better to wait for his help or to start from scratch by creating your own removal script. That's what I do to remove most of bloats. Good luck!

jeremy447 commented 8 years ago

Thank you, I hope @mar-v-in can give me a little help to make it work ;)

mar-v-in commented 8 years ago

@Paviluf It seems your recovery is not compatible with your ROM. freecyngn must be able to use parts of the ROM from recovery (most importantly the dalvik vm to run smal/baksmali which are java tools). As the recovery is not able to execute any program from /system (dynamic linking fails), freecyngn can not run. I have no idea why ROM and recovery are incompatible. Maybe you should try some "cyanogen" recovery (never used it but it might be better in compatibility with cm)

jeremy447 commented 8 years ago

Ok thank you very much for the info. I will see with @HazouPH the maintainer of the ROM and the Recovery for my phone. If I have news I will share them here.

HazouPH commented 8 years ago

Looks like some permission problem. Haven't updated the sepolicy in a while. Could it be that? What does a kernel log say?

jeremy447 commented 8 years ago

What does a kernel log say?

How I can do that ?

HazouPH commented 8 years ago

From PC with adb. "adb shell dmesg > kernellog" or "adb shell cat /proc/kmsg > kernellog" <- Stop this one by pressing "ctrl + c" after a few seconds

jeremy447 commented 8 years ago

Do you mean while I'm in the recovery to flash freecyngn ?

HazouPH commented 8 years ago

Ye, at the moment u are flashing it ;)

The Dmesg can be after it. The cat /proc/kmsg needs to be running while flashing the file

2016-04-14 16:04 GMT+02:00 Paviluf notifications@github.com:

Do you mean while I'm in the recovery to flash freecyngn ?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/mar-v-in/freecyngn/issues/19#issuecomment-209958960

jeremy447 commented 8 years ago

I hope that worked :

https://pastee.org/f37qx

HazouPH commented 8 years ago

As I suspected. SEPolicy denials all over the place. Will have a look at them and update the recovery

2016-04-14 16:18 GMT+02:00 Paviluf notifications@github.com:

I hope that worked :

https://pastee.org/f37qx

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/mar-v-in/freecyngn/issues/19#issuecomment-209966127

jeremy447 commented 8 years ago

Thanks again Hazou !

By the way @mar-v-in, about the "/system/freecyngn/zip" that is missing, it seems to be related to this issue https://github.com/mar-v-in/freecyngn/issues/2. Is it ok to simply remove that line from the updater-script or there is a better workaround or, better, a proper fix ?

mar-v-in commented 8 years ago

this is indeed related to #2. You can safely remove the line from updater-script, but you still need to have a zip executable in your ROM, which some custom ROMs do not have included. As suggested in #2, you can compile the tool for your ROM or maybe someone else already did.

jeremy447 commented 8 years ago

Ok thanks !

jeremy447 commented 8 years ago

Just to let you know, and maybe help other people with the same problem, Hazou said me that the zip executable is included in the ROM but the script don't have access to it because of the permissions problem from the recovery ;)

HazouPH commented 8 years ago

Ok, checked some more stuff. Selinux is in permissive mode, so can' t be that. What I did found out is if I change this line: export LD_LIBRARY_PATH=/vendor/lib:/system/lib:/lib:/sbin to export LD_LIBRARY_PATH=/sbin:/vendor/lib:/system/lib:/lib or ' export LD_LIBRARY_PATH=.:sbin:/vendor/lib:/system/lib:/lib' (to get inline with TWRP) it works

jeremy447 commented 8 years ago

I tried both change, in freecyngn.sh, but I have error 7 due to the zip problem.

If I remove the line "/system/freecyngn/zip" in the updater-script and try again with the line export LD_LIBRARY_PATH=.:sbin:/vendor/lib:/system/lib:/lib I get this :

https://pastee.org/8y38x

It don't seems to work well ?

mimi89999 commented 8 years ago

You need to get the update-binary from a x86 CM .zip... You need to make the new zip file with the -0 option to have a 0 compression level... I would say: unzip freecyngn.zip replace the update-binary zip -r addon.d META-INF freecyngn-x86.zip -0 Flash the freecyngn-x86.zip on your device.

HazouPH commented 8 years ago

And, if the busybox is actively used, u need to replace the (arm)busybox with a x86 one.

mimi89999 commented 8 years ago

Or you can:

  1. Boot into recovery
  2. Wipe/format system partition
  3. Flash CM
  4. Boot the device normaly
  5. Using root mode in CM file browser place the 20-freecyngn.sh in /system/addon.d
  6. Reflash CM without wiping system
  7. Boot normaly
  8. Check if the apps mentionned in 20-freecyngn.sh were removed from your device.

At any point, you SHOULDN'T wipe data.

jeremy447 commented 8 years ago

I did that :

The apps seems to be deleted but there is still some errors and I still need to remove the zip thing : https://pastee.org/98qss

jeremy447 commented 8 years ago

Ok, checked some more stuff. Selinux is in permissive mode, so can' t be that.

@HazouPH so you don't need to update the recovery ?

HazouPH commented 8 years ago

No, it is not needed.

The zip executable in the rom is part of busybox. So I will need to compile is as a separate Zip executable to get it working without any modifications.

On Tue, Apr 19, 2016 at 9:13 AM -0700, "Paviluf" notifications@github.com wrote:

Ok, checked some more stuff. Selinux is in permissive mode, so can' t be that.

@HazouPH so you don't need to update the recovery ?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

jeremy447 commented 8 years ago

No, it is not needed.

Great

The zip executable in the rom is part of busybox. So I will need to compile is as a separate Zip executable to get it working without any modifications.

Ok thank you @HazouPH !