maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [Help!] Get back to factory sys-ui... (https://talk.maemo.org/showthread.php?t=90086)

rainisto 2013-06-20 08:01

Re: [Help!] Get back to factory sys-ui...
 
Quote:

Originally Posted by Schturman (Post 1353376)
Thank you very much ! I will try it now..
But tell me something for understand:
1. Why you need reinstall system-ui ?
2. Why the flush process take so much time if you touch your phone and you not touch screen, when phone activate screenlock it finish process and go to reboot.
3. why you use "reboot" instead "/sbin/reboot" ? You added it to PATH ?

1. Original post wanted to go back to factory system-ui, thats why I added the step there. And it is needed to fix duplicate entries off from restok.conf.

2. It just enables you to reinstall packages without rebooting.

3. Its in the path by default if you do devel-su; opensh;
But I added the full path to post for people who dont use opensh.

Schturman 2013-06-20 08:07

Re: [Help!] Get back to factory sys-ui...
 
Ahhh... Ok! Thanks. Going to try it, will report after few minutes :)

Schturman 2013-06-20 08:31

Re: [Help!] Get back to factory sys-ui...
 
Ok it not work :D
I'm not used flush line, I added reboot directly after signing. Phone rebooted and suck on the "NOKIA" logo (no MALF screen, but probably it similar :) )
I tried boot up with R&D mode, but it also stuck on nokia logo...

Schturman 2013-06-20 09:27

Re: [Help!] Get back to factory sys-ui...
 
I run it not via ssh, I did it directly from terminal on the phone:
Code:

ariadne sh -c "sh /path/to/script"
What you mean run "sync" command ? Just put "sync" before reboot like this:
Code:

sync
/sbin/reboot

My script looks like this:
Code:

#!/bin/sh

RED='\033[1;31m'
NORMAL='\033[0m'
YELLOW='\033[1;33m'
BLINK='\033[5m'

echo ""
echo -e "${RED}${BLINK} WAIT!${NORMAL}${RED} until it finish process !!!${NORMAL}"
echo -e "${YELLOW}Your phone will reboot automatically!${NORMAL}"
echo ""
read -p "Press Enter to start fixer: " end

perl -pi -w -e 's#21 com.nokia.maemo/local#15 com.nokia.maemo#smg' /var/lib/aegis/refhashlist
perl -pi -w -e 's#com.nokia.maemo/local#com.nokia.maemo#smg' /var/lib/aegis/restok/restok.conf
accli -c tcb-sign -F /var/lib/aegis/refhashlist -i /var/lib/aegis/refhashlist
accli -c tcb-sign -F /var/lib/aegis/restok/restok.conf -i /var/lib/aegis/restok/restok.conf
sync
/sbin/reboot

The phone was connected via ssh, but the command I run from the phone. Maybe I need stop ssh session before signing ?

rainisto 2013-06-20 12:36

Re: [Help!] Get back to factory sys-ui...
 
It works (for me atleast) if you ssh in and use copy paste on commandline with opensh. It might be that all those commands are mandatory and in that order.

Actually I did some more debugging: lines up to apt-get install --reinstall <packagename> are mandatory steps, since installing any package before reboot fixes duplicates (perl hack is doing a bit dirty tricks) out from restok. Sorry that I mentioned it to be optional.
Only the reboot command is optional, but should be runned anyways just to be sure. So if you just want it to be generic inception fixer and not tied to system-ui, you can forexample just reinstall "wget"-package.

I even tested to run the script with ariadne and it worked.

Updated scripts in this post http://talk.maemo.org/showpost.php?p...1&postcount=10

Schturman 2013-06-20 14:34

Re: [Help!] Get back to factory sys-ui...
 
Thanks.... It so weird, why it not work for me... Where I can get opensh to incept it ?

thedead1440 2013-06-20 14:47

Re: [Help!] Get back to factory sys-ui...
 
Quote:

Originally Posted by Schturman (Post 1353474)
Thanks.... It so weird, why it not work for me... Where I can get opensh to incept it ?

http://www.robertocolistete.net/Maem.../inception.zip

Schturman 2013-06-20 14:52

Re: [Help!] Get back to factory sys-ui...
 
Ahhh.. I'm not believe, it boot up now ! Probably the flush line is also important:
Code:

/usr/sbin/validator-init; aegis-loader 2>/dev/null ;echo 1 > /sys/kernel/security/validator/flush
But before reinstalling package i saw this error: Aegis-loader: Processing error and something else... Something about duplicating...
I going to reflash again and I will try from the beginning again...
Thanks

Schturman 2013-06-20 17:39

Re: [Help!] Get back to factory sys-ui...
 
Ok, I did another 3 tests..
1. one with line and without reinstalling something:
Code:

/usr/sbin/validator-init; aegis-loader 2>/dev/null ;echo 1 > /sys/kernel/security/validator/flush
2. One with line and without reinstalling something:
Code:

/usr/sbin/validator-init; aegis-loader 2>/dev/null
3. One with line and reinstalling:
Code:

/usr/sbin/validator-init; aegis-loader 2>/dev/null ;echo 1 > /sys/kernel/security/validator/flush
dpkg -i /opt/N9QTweak/SYS/wget*

Summary:
It can work only in ONE condition, the number 3 when you reinstall something and it not important if it apt-get or dpkg -i. Also before reinstallation start, you will see some errors about Aegis-loader, but it not important.
Now after reboot all work perfectly! You can incept packages and restore original via apt-get. When you incept packages it leave them with origin "com.nokia.maemo" :)
I will add this tweak to N9QT in the next version.

Reinisto, Thank you very much for help and this fix ! :)

PS. Ooh sorry, i don't saw your edited message: http://talk.maemo.org/showpost.php?p...9&postcount=25
but i understanded it via tests :D


All times are GMT. The time now is 10:24.

vBulletin® Version 3.8.8