View Single Post
Old 01-28-2012, 12:11 AM   #15
figonet
Junior Member
figonet began at the beginning.
 
Posts: 5
Karma: 12
Join Date: Jan 2012
Device: PRS T1
Quote:
Originally Posted by j0534ng31 View Post
This requires only a terminal application (so, a rooted T1)
/system/bin/chgboot recovery && reboot


$(busybox which chgboot) recovery && reboot



I think I understand you...

You mean that you want a 'new package', almost like 'SD rescue', but only to enter in recovery mode? It can be done...

I'll try it this weekend!

in th restore-rescue.zip, there is file called the update.img, it's /etc/rc.d/rcS file is shell script that process micro sd recovery, you can modify it and recreate update.img,only to enter in recovery mode, then use usb serial log into system.

it 's my exprience,I found this method and recovered a bricked t1.

there are three points for those who want to use this method:

1. modify rcS ,insmd kernel modules for usb serial

PHP Code:
/sbin/insmod /lib/modules/2.6.35.3/kernel/drivers/usb/gadget/arcotg_udc.ko
/sbin/insmod /lib/modules/2.6.35.3/kernel/drivers/usb/gadget/g_serial.ko use_acm=1

sleep 3
while [ ];
do
        /
sbin/getty -L 9600 ttyGS0 vt102
done 
2. add ttyACM0 in /etc/securtty, then root can log into system by use serial

3. modify root password,add this code in rcS file.

PHP Code:
cat > /tmp/shadow << EOF
root
::14975:0:99999:7:::
bin:*:11851:0:99999:7:::
daemon:*:11851:0:99999:7:::
adm:*:11851:0:99999:7:::
lp:*:11851:0:99999:7:::
sync:*:11851:0:99999:7:::
shutdown:*:11851:0:99999:7:::
halt:*:11851:0:99999:7:::
mail:*:11851:0:99999:7:::
news:*:11851:0:99999:7:::
uucp:*:11851:0:99999:7:::
operator:*:11851:0:99999:7:::
games:*:11851:0:99999:7:::
gopher:*:11851:0:99999:7:::
ftp:*:11851:0:99999:7:::
nobody:*:11851:0:99999:7:::
sshd:!!:11851:0:99999:7:::
mailnull:!!:11851:0:99999:7:::
xfs:!!:11851:0:99999:7:::
ntp:!!:11851:0:99999:7:::
rpc:!!:11851:0:99999:7:::
gdm:!!:11851:0:99999:7:::
rpcuser:!!:11851:0:99999:7:::
nfsnobody:!!:11851:0:99999:7:::
nscd:!!:11851:0:99999:7:::
ident:!!:11851:0:99999:7:::
radvd:!!:11851:0:99999:7:::
postgres:!!:11851:0:99999:7:::
apache:!!:11851:0:99999:7:::
squid:!!:11851:0:99999:7:::
named:!!:11851:0:99999:7:::
pcap:!!:11851:0:99999:7:::
amanda:!!:11851:0:99999:7:::
junkbust:!!:11851:0:99999:7:::
mailman:!!:11851:0:99999:7:::
mysql:!!:11851:0:99999:7:::
ldap:!!:11851:0:99999:7:::
pvm:!!:11851:0:99999:7:::
user:$1$pJefShJL$CoX8T20vn1g.ug0jZIczM.:11851:0:99999:7:::
messagebus:!:15:0:99999:7:::
haldaemon:!:15:0:99999:7:::
EOF

chmod 
+rwx /tmp/shadow
mount 
--bind /tmp/shadow /etc/shadow 

Last edited by figonet; 01-28-2012 at 12:15 AM.
figonet is offline   Reply With Quote