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)

smoone 2013-05-13 08:45

[Help!] Get back to factory sys-ui...
 
Hi, how the title suggest I want to revert to original sys-ui.

I have installed INCEPTION and various add-ons, like MT-Toggles, but when I tried to install apps (also from the store) the device gave me an error.
I have tried to:
1. use the restore functions integrated;
2. reinstall the software from the Nokia suite in order to return to stock conditions but the usb connection seem to "jump" when the installation start (after a regular download);
3. uninstall from application manager inception and all signs of the hack but It isn't possible.
all was useless.:D

I would have thought to flash the phone but Navifirm doesn't works, and I'm not able to find a firmware from a valid source.

CAN YOU HELP ME?

Thanks in advance :)

(I apologize for any grammatical errors but my English is not very good)

juiceme 2013-05-13 09:22

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

Originally Posted by smoone (Post 1343168)
I would have thought to flash the phone but Navifirm doesn't works, and I'm not able to find a firmware from a valid source.

Navifirm works. Tell me your variant and I'll give you the download link.

rainisto 2013-05-13 09:43

Re: [Help!] Get back to factory sys-ui...
 
You can also edit refhash list and fix incepted lines back to com.nokia.maemo origin and resign the refhashlist, after that you can just apt-get --reinstall install the original packages over the incepted ones.

smoone 2013-05-13 09:55

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

Originally Posted by rainisto (Post 1343181)
You can also edit refhash list and fix incepted lines back to com.nokia.maemo origin and resign the refhashlist, after that you can just apt-get --reinstall install the original packages over the incepted ones.

Sorry, but I don't understand...:o Can you explain better the passage I need to reinstall the original sys-ui...
Thanks

Schturman 2013-05-13 10:03

Re: [Help!] Get back to factory sys-ui...
 
More simple way if inception installed, as root:
Code:

apt-get install --reinstall -d -y system-ui
and
Code:

/usr/sbin/incept /var/cache/apt/archives/system-ui*

smoone 2013-05-13 10:14

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

Originally Posted by Schturman (Post 1343186)
More simple way if inception installed, as root:
Code:

apt-get install --reinstall -d -y system-ui
and
Code:

/usr/sbin/incept /var/cache/apt/archives/system-ui*

Thank you! I have applied your way and I have solved simply! :D

smoone 2013-05-13 10:35

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

Originally Posted by Schturman (Post 1343186)
More simple way if inception installed, as root:
Code:

apt-get install --reinstall -d -y system-ui
and
Code:

/usr/sbin/incept /var/cache/apt/archives/system-ui*

Oh my GOD!
I have a problem, a serious problem, after unistalling components like INCEPTION and others add-ons, I reboot.
The problem is that:
the phone starts, but as soon as the word "nokia" should disappear, giving way to the "circle of loading" home screen restarts.

Have I to flash?

Other solution?

Hurrian 2013-05-13 11:00

Re: [Help!] Get back to factory sys-ui...
 
If you think you can repair your system manually, flash ubiboot-02, and then telnet into your N9.

You can now mount and chroot back into Harmattan to try to fix what's probably broken.

rainisto 2013-05-13 11:05

Re: [Help!] Get back to factory sys-ui...
 
Schturman 'solution' was ofcourse NOT a real solution, it still used incepted origin which means that application manager stays as broken as always.

You need to use adriane or opensh will all capas to resign the refhashlist if you want to cleanly uninstall incepted packages and inception itself too.

rainisto 2013-05-13 11:17

Re: [Help!] Get back to factory sys-ui...
 
And ofcourse here is the instructions how to do that cleanly, maybe too late for you, but for next people in troubles. This example assumes that you have incepted opensh with all capas.

# devel-su
# opensh
# 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
# /usr/sbin/validator-init; aegis-loader 2>/dev/null ;echo 1 > /sys/kernel/security/validator/flush
# apt-get install -y --reinstall system-ui
# /sbin/reboot

AND BIG DISCLAIMER IN HERE, YOU WILL MALF YOUR DEVICE, IF YOU DONT KNOW WHAT YOU ARE DOING. :)

After boot all the incepted packages have turned into normal nokia packages and you can apt-get original nokia packages over them just fine.

This also fixes inception, that in the future it will incept packages as com.nokia.maemo instead of buggy com.nokia.maemo/local


Same thing as ariadne script (devel-su; ariadne sh -c "sh /path/to/script"):
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
/usr/sbin/validator-init; aegis-loader 2>/dev/null ;echo 1 > /sys/kernel/security/validator/flush
apt-get install -y --reinstall system-ui
reboot


Schturman 2013-05-13 11:40

Re: [Help!] Get back to factory sys-ui...
 
Yep, rainisto right, i answered only how to restore original sys-ui..
Also you can try R&D mode, if you phone can loads, you can try manually restore what cause reboot loop or do what rainisto write.

Schturman 2013-06-19 19:15

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

Originally Posted by rainisto (Post 1343201)
And ofcourse here is the instructions how to do that cleanly, maybe too late for you, but for next people in troubles. This example assumes that you have incepted opensh with all capas.

# devel-su
# opensh
# perl -pi -w -e 's#com.nokia.maemo/local#com.nokia.maemo#smg' /var/lib/aegis/refhashlist
# accli -c tcb-sign -F /var/lib/aegis/refhashlist -i /var/lib/aegis/refhashlist
# /usr/sbin/validator-init; aegis-loader;echo 1 > /sys/kernel/security/validator/flush
# reboot

AND BIG DISCLAIMER IN HERE, YOU WILL BRICK YOUR DEVICE, IF YOU DONT KNOW WHAT YOU ARE DOING. :)

After boot all the incepted packages have turned into normal nokia packages and you can apt-get original nokia packages over them just fine.

Hi reinisto
I always get "malfunction" when I run this...
I created script:
Code:

#!/bin/sh

perl -pi -w -e 's#com.nokia.maemo/local#com.nokia.maemo#smg' /var/lib/aegis/refhashlist
accli -c tcb-sign -F /var/lib/aegis/refhashlist -i /var/lib/aegis/refhashlist
/usr/sbin/validator-init; aegis-loader;echo 1 > /sys/kernel/security/validator/flush

and I run it via ariadne (not opensh):
Code:

ariadne sh -c "sh /path/to/script"
It ask pass and work without errors, I also checked refhashlist file and it changed from "com.nokia.maemo/local" to "com.nokia.maemo". But when I reboot my phone I always get MALF message...
I already flashed my phone 4 times after some different tests :D
Why ? Any ideas ?

rainisto 2013-06-19 20:00

Re: [Help!] Get back to factory sys-ui...
 
sounds wierd, most common error is that people forget to run reboot command immediately after flush. If you happen to run or cat any file before reboot that was edited triggers automaticly malf flag.

But lets see I'll do some experiments with one of my extra n9's and get back to you if there would happen to be errors in script (although it has worked for me every time (but I'm using opensh with all capas)), your script is missing "reboot" line atleast. Are you sure that your next command after the flush was "reboot", ie you didnt try cat refhashlist before rebooting?

Second option is just to run "reboot" command right after the accli signature command. As that validator-init line is just fancy thing for one of my other hacks which actually might even be needed in this case.

Schturman 2013-06-19 20:15

Re: [Help!] Get back to factory sys-ui...
 
Ahhh dmn.. My bad... I did not think that it is important... Sorry :(
I not used cat, I just opened refhashlist file via WinSCP, checked it and rebooted via N9Refresh button from N9QT.
Going to try again, I will add "/sbin/reboot" to the script :)
Report later.
Thanks

Schturman 2013-06-19 20:55

Re: [Help!] Get back to factory sys-ui...
 
Ok, instead using "/sbin/reboot" I added:
Code:

qdbus --system com.nokia.dsme /com/nokia/dsme/request com.nokia.dsme.request.req_reboot
for reboot without asking pass...
But again MALF... :( Also it took so long time, something like 5-7 minutes to finish process and start reboot. Why ?
I going to try again with "/sbin/reboot"...

Schturman 2013-06-19 21:37

Re: [Help!] Get back to factory sys-ui...
 
Hmmmm... Also with "/sbin/reboot" I got MALF :D Going to sleep....

Schturman 2013-06-19 22:06

Re: [Help!] Get back to factory sys-ui...
 
You mean to change where it have thus:
Code:

Object: SRC::com.nokia.maemo/local
Request

also without word /local ?
And what about file "domains" it also have:
Code:

  <domain>
    <name>com.nokia.maemo/local</name>
    <key>LOCAL::tcb</key>
    <trust-level>10000</trust-level>
    <certified/>
  </domain>

What you think ?

Ps. Also what you think if running "refhashlist.pl" can help here?

Schturman 2013-06-20 06:08

Re: [Help!] Get back to factory sys-ui...
 
I added this to the script, but MALF again after reboot :D
Code:

perl -pi -w -e 's#com.nokia.maemo/local#com.nokia.maemo#smg' /var/lib/aegis/restok/restok.conf

rainisto 2013-06-20 07:34

Re: [Help!] Get back to factory sys-ui...
 
I fixed the script on my original post. Sorry for the troubles, I've always used com.nokia.maemo opensh and havent used inception.

But anyways, now script should not malf, and it changes everything as com.nokia.maemo. It even fixes inception, that if you incept packages after that they appear as com.nokia.maemo like they should have always been in the perfect world.

Schturman 2013-06-20 07:55

Re: [Help!] Get back to factory sys-ui...
 
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 ?

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:25.

vBulletin® Version 3.8.8