[ADDON] Dual Recovery (xRecovery + CWM recovery on your Phone) - Sony Ericsson XPERIA X10 Mini

The thread it's open to discussions. Thanks for your help puppet13th / doixanh
Tested on Stock / CM6 / CM7
This is it!
Code:
#!/system/bin/busybox sh
#
# Unified Chargemon / DualRecovery By D4rKn3sSyS
# Idea from FroyoBread DualRecovery
# corrected by DooMLoRD ;)
#
# keychecks
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
keypressed=`cat /dev/keycheck`
if [ "$keypressed" != "${keypressed/ž/}" ] # If the key that you pressed contain character "ž" (on mini pro back button give this character), then boot to recovery
then
echo "recovery" > /data/local/tmp/bootrecovery
else
if [ "$keypressed" != "${keypressed/f/}" ] # Else, If the key that you pressed contain character "f" (on mini pro home button give this character), then boot to xrecovery
then
echo "xrecovery" > /data/local/tmp/bootrecovery
fi
fi
# DualRecovery
if [ -s /data/local/tmp/bootrecovery ] # check if key was pressed
then
boot=`cat /data/local/tmp/bootrecovery`
rm -f /data/local/tmp/bootrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
if [ "$boot" != "" ] #this is unnecesary, but just to be sure, can be removed
then
tar -xf /system/bin/"$boot".tar
fi
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# offline charging
/system/bin/charger
# CM & Stock compatibility
if [ -f /system/etc/CHANGELOG-CM.txt ]; then
# for cyanogenmod
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
else
#for stock
# Continue booting
exit
fi
Yes, that simply, back key to open CWM Recovery, home key to open xRecovery.
Install through CWM Recovery ( no xRecovery )
NOTE: If you install this, reboot into recovery will not work, the new way it's this:
Code:
#Boot Into Recovery
echo "recovery" > /data/local/tmp/bootrecovery
reboot
Code:
#Boot into xRecovery
echo "xrecovery" > /data/local/tmp/bootrecovery
reboot
Cheers, d4.

Updated Code, im still getting problems with touchscreen events on startup, but now works manually (echo xrecovery/recovery > /data/local/tmp/bootrecovery)

I guess you can try event2, event3.... There may be different event mapping name.

doixanh said:
I guess you can try event2, event3.... There may be different event mapping name.
Click to expand...
Click to collapse
I thought that too, but when you do
Code:
cat /dev/input/event2
With the phone booted, if you touch the screen, you get output, (like when you do with event0 and press a key), I think ill try different approach, wish me luck
EDIT: See this
Code:
B ž 1 ž
That mean 1 press of back button, but this
Code:
6W ž sÁ ž «7 ž ž
Means 2 press.
Now you know my approach

There is 5 input devices,check this out :
Code:
/sys/devices/virtual/input/
For x8
/dev/input/event1 = key input
/dev/input/event0 = touch screen input
i have attach input from x8 check it.
here my chargemon code for universal dual mode recovery plus cwm multiboot :
Code:
#!/system/xbin/sh
/system/bin/charger
keyrecovery=/system/fx8-rec.tar
tsrecovery=/system/cwm-rec.tar
cat /dev/input/event1 > /dev/keycheck&
cat /dev/input/event0 > /dev/tscheck&
sleep 3
kill -9 $!
###keyrecovery script
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf $keyrecovery
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
###TS recovery script
if [ -s /dev/tscheck -o -f /data/local/tmp/cwmrecovery ]
then
rm -f /data/local/tmp/cwmrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf $tsrecovery
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
### nobodyAtall - Multiboot hack
if [ -h /system/bin/multiboot_default ]
then
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
echo "Multiboot on" >> /data/multiboot.log
mkdir -p /sdcard
/system/bin/fsck_msdos -y /dev/block/mmcblk0p1
if [ $? -ne 0 ]
then
/system/bin/fsck_msdos -y /dev/block/mmcblk0p1
fi
mount -t vfat -o rw,noatime,nodiratime /dev/block/mmcblk0p1 /sdcard
if [ $? -eq 0 ] && [ -f /system/bin/multiboot_default/system.img ] && [ -f /system/bin/multiboot_default/data.img ] && [ -f /system/bin/multiboot_default/cache.img ]
then
echo "Good to multiboot" >> /data/multiboot.log
losetup /dev/block/loop1 /system/bin/multiboot_default/system.img
losetup /dev/block/loop2 /system/bin/multiboot_default/data.img
losetup /dev/block/loop3 /system/bin/multiboot_default/cache.img
if [ -f /system/bin/e2fsck ]
then
/system/bin/e2fsck -y /dev/block/loop1
/system/bin/e2fsck -y /dev/block/loop2
/system/bin/e2fsck -y /dev/block/loop3
fi
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount -l /dev/block/mtdblock3
umount -l /dev/block/mtdblock1
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /system
if [ -f /system/bin/ramdisk.tar ]
then
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Reboot Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
umount -l /system
umount -l /cache
umount -l /data
sleep 1
rmdir /system /data /cache /mnt
mkdir -p /minicm/system /minicm/data /minicm/cache
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /minicm/system
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop2 /minicm/data
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop3 /minicm/cache
sleep 1
chroot /minicm /init
else
umount -l /system
umount -l /cache
umount -l /data
sleep 1
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /system
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop2 /data
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop3 /cache
sleep 1
/system/bin/qmuxd &
sleep 1
exit
fi
fi
fi
echo "Multiboot off" >> /data/multiboot.log
###Custom ROM Script
if [ -f /system/bin/ramdisk.tar ]
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
cp -f /minicm/system/bin/build.prop /minicm/system/
chroot /minicm /init
it's based on doixanh modification

Any keys can trigger /dev/input/event1 including power key

puppet13th said:
Any keys can trigger /dev/input/event1 including power key
Click to expand...
Click to collapse
Yes, i know, on mimmi it's event0, and touchscreen it's event2, but I have tried a script that redirects all the output of cat /dev/input/event2 to a file, and seems like dont catch any touchscreen output. That's why im trying a different approach.

D4rKn3sSyS said:
Yes, i know, on mimmi it's event0, and touchscreen it's event2, but I have tried a script that redirects all the output of cat /dev/input/event2 to a file, and seems like dont catch any touchscreen output. That's why im trying a different approach.
Click to expand...
Click to collapse
check input.rar for x8
/sys/devices/virtual/input/input3/name :
Code:
qwerty
maybe x10 mini pro hardware qwerty keyboard can be used to trigger the recovery

puppet13th said:
check input.rar for x8
/sys/devices/virtual/input/input3/name :
Code:
qwerty
maybe x10 mini pro hardware qwerty keyboard can be used to trigger the recovery
Click to expand...
Click to collapse
Our input4 it's qwerty, i'll try with it, also, this is weird
Code:
# cd /sys/devices/virtual/input/
cd /sys/devices/virtual/input/
# ls
ls
input0 input1 input4 input5
No input2 or input3
but
Code:
# cd /dev/input/
cd /dev/input/
# ls
ls
event0 event1 event2 event3 event4

on x8 :
Code:
/ # ls -l /dev/input/
ls -l /dev/input/
crw-rw---- 1 0 1004 13, 64 Jul 24 14:23 event0
crw-rw---- 1 0 1004 13, 65 Jul 24 14:23 event1
crw-rw---- 1 0 1004 13, 66 Jul 24 14:23 event2
crw-rw---- 1 0 1004 13, 67 Jul 24 14:24 event3
crw-rw---- 1 0 1004 13, 68 Jul 24 14:24 event4
/ # ls -l /sys/devices/virtual/input/
ls -l /sys/devices/virtual/input/
drwxr-xr-x 6 0 0 0 Jul 24 17:02 input0
drwxr-xr-x 6 0 0 0 Jul 24 17:02 input1
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input2
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input3
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input4
/ #
input3 and input4 on x8 :
Code:
/ # cat /sys/devices/virtual/input/input3/name
cat /sys/devices/virtual/input/input3/name
qwerty
/ # cat /sys/devices/virtual/input/input4/name
cat /sys/devices/virtual/input/input4/name
systemconnector
/ #
input0 for touch screen
input1 for keys
input2 for compass
check /sys/devices/virtual/input/input4/name and /sys/devices/virtual/input/input5/name

puppet13th said:
on x8 :
Code:
/ # ls -l /dev/input/
ls -l /dev/input/
crw-rw---- 1 0 1004 13, 64 Jul 24 14:23 event0
crw-rw---- 1 0 1004 13, 65 Jul 24 14:23 event1
crw-rw---- 1 0 1004 13, 66 Jul 24 14:23 event2
crw-rw---- 1 0 1004 13, 67 Jul 24 14:24 event3
crw-rw---- 1 0 1004 13, 68 Jul 24 14:24 event4
/ # ls -l /sys/devices/virtual/input/
ls -l /sys/devices/virtual/input/
drwxr-xr-x 6 0 0 0 Jul 24 17:02 input0
drwxr-xr-x 6 0 0 0 Jul 24 17:02 input1
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input2
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input3
drwxr-xr-x 6 0 0 0 Jul 24 16:49 input4
/ #
input3 and input4 on x8 :
Code:
/ # cat /sys/devices/virtual/input/input3/name
cat /sys/devices/virtual/input/input3/name
qwerty
/ # cat /sys/devices/virtual/input/input4/name
cat /sys/devices/virtual/input/input4/name
systemconnector
/ #
input0 for touch screen
input1 for keys
input2 for compass
check /sys/devices/virtual/input/input4/name and /sys/devices/virtual/input/input5/name
Click to expand...
Click to collapse
Got it working! in a kindly dirty way, back button, Recovery, middle button, xRecovery
EDIT: Need to fix a bit, now allways boot on recovery's XD

do you mean middle button = home button ?
any luck with qwerty keyboard ?
if it's using keys value for the trigger,it's awesome.

puppet13th said:
do you mean middle button = home button ?
any luck with qwerty keyboard ?
if it's using keys value for the trigger,it's awesome.
Click to expand...
Click to collapse
Yes middle button it's home button, and left... left, im using a dirty way to identify what's the key pressed, so if you press left it goes to CWM Recovery, and if you press home, it just go to xRecovery
I had no luck with qwerty. but this works, only a issue, allways boot on recovery, but i know how to fix it

D4rKn3sSyS said:
Yes middle button it's home button, and left... left, im using a dirty way to identify what's the key pressed, so if you press left it goes to CWM Recovery, and if you press home, it just go to xRecovery
I had no luck with qwerty. but this works
Click to expand...
Click to collapse
That's is nice.i'll try it with x8.you know that any keys or touch screen on boot will trigger the recovery.if we specificate a key to trigger the recovery,we could prevent any accidental recovery trigger.

Done, fixed, but need X10 mini pro testers, maybe each device have different keys.
Last code working on 1st post
happy testing !
Added explanation of code to first post, so can be ported to other devices easily

i can't boot in any recovery.
pressing left button it boot system, pressing midlle (home) button stuck in sony ericsson logo and pressing back button (right) stuck in sony ericsson logo.
from system (power button) reboot into recovery phone reboot and skip booting in recovery it just go in system.
edit: looks like i lost recovery i can't get it:/ i hope that reflash rom ower it will fix that

Eyama said:
i can't boot in any recovery.
pressing left button it boot system, pressing midlle (home) button stuck in sony ericsson logo and pressing back button (right) stuck in sony ericsson logo.
from system (power button) reboot into recovery phone reboot and skip booting in recovery it just go in system.
Click to expand...
Click to collapse
Great :S that means we cannot use this system. Can you try pressing only Once?, and when Sony Ericsson logo appears, btw it take Longer that normal
EDIT: Of course, zip file it's wrong, lemme fix it
EDIT2: Fixed, try now

D4rKn3sSyS said:
Great :S that means we cannot use this system. Can you try pressing only Once?, and when Sony Ericsson logo appears, btw it take Longer that normal
EDIT: Of course, zip file it's wrong, lemme fix it
EDIT2: Fixed, try now
Click to expand...
Click to collapse
well i can't i dont have revovery any more:/ will it work if i putt manualy in system/bin ?

Eyama said:
well i can't i dont have revovery any more:/ will it work if i putt manualy in system/bin ?
Click to expand...
Click to collapse
Well yes, you can use adb too , in fact only thing you have to do now it's to change permissions to xRecovery.tar inside /system/bin to 755
or
xxx
x x
x x
EDIT: Also if recovery dont works, use terminal emulator for running this
Code:
echo "recovery" > /data/local/tmp/bootrecovery
reboot

well great news it is working midle button xRecovery (it come fast no need to pressing long time), back (left) button CWM recovery (it takes a litle bit but no long it is quite fast) so great work D4 your the man

Related

[DEV] Universal Chargemon

Owain suprise !
Code:
#!/system/bin/busybox sh
#
# Universal Chargemon By D4rKn3sSyS
V1=`cat /system/build.prop | grep 'ro.custommodinstalled=1'`
echo "$V1" > /system/rom.bin
if [ -s /system/rom.bin ]; then
#for cyanogenmod
/system/bin/charger
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
else
#for stock
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck ]
then
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
chroot / /init
fi
# Continue booting
exit
fi
But, something it's wrong, please someone help me, it starts and all that things, but then, deletes /data. I dont understand really good this file, so maybe someone can help me end this
Cheers, D4.
Perhaps its this line in the file?
Code:
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
[B] rmdir /system /data /cache /mnt[/B]
ruifung said:
Perhaps its this line in the file?
Code:
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
[B] rmdir /system /data /cache /mnt[/B]
Click to expand...
Click to collapse
That was my first idea but see this
Code:
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
All is moved first to /minicm, and anyway, on original chargemon, that lines are used.
by delete /data do you mean remove the /data folder or deleting everything inside? Cause they aint many refrences to /data in that script...
Edit: you are chrooting to /minicm? since all folders in the rootfs is gone after a reboot, don't you need to create the /data mount point?
D4rKn3sSyS said:
That was my first idea but see this
Code:
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
All is moved first to /minicm, and anyway, on original chargemon, that lines are used.
Click to expand...
Click to collapse
chroot makes /minicm appear as /
that means mount your data to /minicm/data
ruifung said:
by delete /data do you mean remove the /data folder or deleting everything inside? Cause they aint many refrences to /data in that script...
Click to expand...
Click to collapse
That should delete data and everything inside, but you know, it's weird cause with original chargemon nothing happens ...
slade87 said:
chroot makes /minicm appear as /
Click to expand...
Click to collapse
So, what's the problem with that script, it's the rmdir thing?
the rmdir should not effect the /data as the chroot is after the rmdir but all changes to the root filesystem is lost on reboot right? in that case, wouldn't you need to create data under /minicm?
ruifung said:
the rmdir should not effect the /data as the chroot is after the rmdir but all changes to the root filesystem is lost on reboot right? in that case, wouldn't you need to create data under /minicm?
Click to expand...
Click to collapse
in fact rmdir is after chroot, that's why I dont understand, I think it was bad, but it's original CM6 chargemon
Code:
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
i don't know where slade put the xrecovery but in my cm7 rom it is in /recovery
instead of in /system/bin
this way the user can update busybox if slade got it in /recovery an universal chargemon cannot be made!
OR!
he need to move it in CM6 also to /recovery
also why do you want an universal chargemon?
owain94 said:
i don't know where slade put the xrecovery but in my cm7 rom it is in /recovery
instead of in /system/bin
this way the user can update busybox if slade got it in /recovery an universal chargemon cannot be made!
OR!
he need to move it in CM6 also to /recovery
also why do you want an universal chargemon?
Click to expand...
Click to collapse
Universal xRecovery apk installer , and yes, my installer will install it on /system/bin/xrecovery.tar, or maybe we can move it on all roms ?, even on stock
PD: Report on your msn owain!
getting a little confused, the first chroot is "chroot / /init"
followed by "chroot /minicm /init" somewhere in the middle
and finally at the end of the file "chroot / /init"
getting confused, chrooting to /minicm and then chrooting back to /
D4rKn3sSyS said:
Universal xRecovery apk installer , and yes, my installer will install it on /system/bin/xrecovery.tar, or maybe we can move it on all roms ?, even on stock
PD: Report on your msn owain!
Click to expand...
Click to collapse
you only need xrecovery installer on stock??
custom roms got it preinstalled
PD: not at home
owain94 said:
you only need xrecovery installer on stock??
custom roms got it preinstalled
PD: not at home
Click to expand...
Click to collapse
Not my xRecovery skin , anyway, what's wrong ?
BTW: Slade's cm6 recovery its on /system/bin
EDIT: I Think problem it's that chargemon execute first cm chargemon, and then stock... and that ****s the device, so problem should be @ more external if, do you guys see some syntax error ?
you would need to mount rw before you can do this
Code:
echo "$V1" > /system/rom.bin
slade87 said:
you would need to mount rw before you can do this
Code:
echo "$V1" > /system/rom.bin
Click to expand...
Click to collapse
Right, forgot that, allways will use stock chargemon
Edit: Yeah was that, thanks slade, now im gonna test on stock
D4rKn3sSyS said:
Right, forgot that, allways will use stock chargemon
Edit: Yeah was that, thanks slade, now im gonna test on stock
Click to expand...
Click to collapse
also check you if else,
maybe its easier to divide into 4 if statements then use the if-else tree structure
Code:
#!/system/bin/busybox sh
#
# Universal Chargemon By D4rKn3sSyS
V6=`cat /system/build.prop | grep 'ro.build.version.release=2.2.1'`
echo "$V6" > /system/romcm6.bin
V7=`cat /system/build.prop | grep 'ro.build.version.release=2.3.3'`
echo "$V7" > /system/romcm7.bin
if [ -e /data/local/tmp/sdcardOS1 ]
then
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/sdcardos1-ramdisk.tar
# unmounting
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
# mount sd
dosfsck -y /dev/block/mmcblk0p1
sleep 5
mount -t vfat -o rw,noatime,nodiratime /dev/block/mmcblk0p1 /sd
sleep5
# mount ext2 images
losetup /dev/block/loop1 /sd/dualboot/system1.img
sleep 5
losetup /dev/block/loop2 /sd/dualboot/data1.img
sleep 5
losetup /dev/block/loop3 /sd/dualboot/cache1.img
sleep 5
e2fsck -y /dev/block/loop1
e2fsck -y /dev/block/loop2
e2fsck -y /dev/block/loop3
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /system
sleep 5
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop2 /data
sleep 5
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop3 /cache
exit
fi
# chroot
chroot / /init
# skip rest
exit
if [ -s /system/romcm6.bin ]; then
#for cyanogenmod
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
/system/bin/charger
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
exit
if [ -s /system/romcm7.bin ]; then
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
/system/bin/charger
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
exit
else
#for stock
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck ]
then
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
chroot / /init
fi
/system/bin/charger
# Continue booting
exit
fi
debug it first thisis from my mobile phone so im almost sure i did a couple things wrong
slade87 said:
also check you if else,
maybe its easier to divide into 4 if statements then use the if-else tree structure
Click to expand...
Click to collapse
Why 4 if statements ?, only needed 2, 1 for stock, 1 for any Cm, i think three structure it's the best idea
owain94 said:
Code:
#!/system/bin/busybox sh
#
# Universal Chargemon By D4rKn3sSyS
V6=`cat /system/build.prop | grep 'ro.build.version.release=2.2.1'`
echo "$V6" > /system/romcm6.bin
V7=`cat /system/build.prop | grep 'ro.build.version.release=2.3.3'`
echo "$V7" > /system/romcm7.bin
if [ -e /data/local/tmp/sdcardOS1 ]
then
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/sdcardos1-ramdisk.tar
# unmounting
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
# mount sd
dosfsck -y /dev/block/mmcblk0p1
sleep 5
mount -t vfat -o rw,noatime,nodiratime /dev/block/mmcblk0p1 /sd
sleep5
# mount ext2 images
losetup /dev/block/loop1 /sd/dualboot/system1.img
sleep 5
losetup /dev/block/loop2 /sd/dualboot/data1.img
sleep 5
losetup /dev/block/loop3 /sd/dualboot/cache1.img
sleep 5
e2fsck -y /dev/block/loop1
e2fsck -y /dev/block/loop2
e2fsck -y /dev/block/loop3
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /system
sleep 5
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop2 /data
sleep 5
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop3 /cache
exit
fi
# chroot
chroot / /init
# skip rest
exit
if [ -s /system/romcm6.bin ]; then
#for cyanogenmod
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
/system/bin/charger
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
exit
if [ -s /system/romcm7.bin ]; then
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
exit
else
#for stock
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck ]
then
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
chroot / /init
fi
# Continue booting
exit
fi
debug it first thisis from my mobile phone so im almost sure i did a couple things wrong
Click to expand...
Click to collapse
looks good owain, but why are you running fsck? it usually don't mount without force option if fs is corrupt.
D4rKn3sSyS said:
Why 4 if statements ?, only needed 2, 1 for stock, 1 for any Cm, i think three structure it's the best idea
Click to expand...
Click to collapse
sorry my bad

[MULTIBOOT] Mini pro All-in-one recovery pack

STILL TESTING!
This is made by nobodyAtall, ported to work on mini pro, and added features
Guys, so this is a new attempt to multiboot. I need testers from all kind of SD's
Features
*Multiboot (More info) - CM6 & CM7 Only (I think, but it's possible...)
*Dual Recovery (More info) - All ROM's
*Data encryption (More info) - CM6 & CM7 Only
How to install
1. Flash .zip for AIO recovery pack (CWM recovery)
2. Go to CWM recovery (back button, middle button (home) it's for xrecovery) and choose Multiboot
3. Select Create boot option from zip
4. Choose any ROM that can be installed with CWM recovery (Needed 400MB on SD for this)
5. Choose Flash Zip to boot option, and flash the correspondent multiboot package (ROM's devs need to provide this)
6. Choose select default boot option, and select your last created
7. Choose boot into selected option, and enjoy!
NOTE: For multiboot with CyaNoComb, you can flash this, till I get our ramdisk good for multiboot. Credits to nAa for the ramdisk.
Cheers, D4.
Dev Info:
Final Chargemon
Code:
#!/system/bin/busybox sh
#
# Unified X10 mini pro multiboot script / dualrecovery
# Devs who worked on this project:
# D4rKn3sSyS, DooMLoRD, nobodyAtall, Owain94, Slade87, puppet13th
#
# keychecks
cat /dev/input/event0 > /dev/keycheck&
sleep 3
kill -9 $!
keypressed=`cat /dev/keycheck`
if [ "$keypressed" != "${keypressed/ž/}" ]
then
echo "recovery" > /data/local/tmp/bootrecovery
else
if [ "$keypressed" != "${keypressed/f/}" ]
then
echo "xrecovery" > /data/local/tmp/bootrecovery
fi
fi
# DualRecovery
if [ -s /data/local/tmp/bootrecovery ]
then
boot=`cat /data/local/tmp/bootrecovery`
rm -f /data/local/tmp/bootrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/"$boot".tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# offline charging
/system/bin/charger
rm -f /data/multiboot.log
# nobodyAtall - Multiboot hack
if [ -h /system/bin/multiboot_default ]
then
echo "Multiboot on" >> /data/multiboot.log
mkdir -p /sdcard
/system/bin/fsck_msdos -y /dev/block/mmcblk0p1
if [ $? -ne 0 ]
then
/system/bin/fsck_msdos -y /dev/block/mmcblk0p1
fi
mount -t vfat -o rw,noatime,nodiratime /dev/block/mmcblk0p1 /sdcard
if [ $? -eq 0 ] && [ -f /system/bin/multiboot_default/system.img ] && [ -f /system/bin/multiboot_default/data.img ] && [ -f /system/bin/multiboot_default/cache.img ]
then
echo "Good to multiboot" >> /data/multiboot.log
losetup /dev/block/loop1 /system/bin/multiboot_default/system.img
losetup /dev/block/loop2 /system/bin/multiboot_default/data.img
losetup /dev/block/loop3 /system/bin/multiboot_default/cache.img
if [ -f /system/bin/e2fsck ]
then
/system/bin/e2fsck -y /dev/block/loop1
/system/bin/e2fsck -y /dev/block/loop2
/system/bin/e2fsck -y /dev/block/loop3
fi
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount -l /dev/block/mtdblock3
umount -l /dev/block/mtdblock1
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /system
if [ -f /system/bin/ramdisk.tar ]
then
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Reboot Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
umount -l /system
umount -l /cache
umount -l /data
sleep 1
rmdir /system /data /cache /mnt
mkdir -p /minicm/system /minicm/data /minicm/cache
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /minicm/system
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop2 /minicm/data
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop3 /minicm/cache
sleep 1
chroot /minicm /init
else
umount -l /system
umount -l /cache
umount -l /data
sleep 1
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /system
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop2 /data
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop3 /cache
sleep 1
/system/bin/qmuxd &
sleep 1
exit
fi
fi
fi
echo "Multiboot off" >> /data/multiboot.log
# CM & Stock compatibility
if [ -f /system/etc/CHANGELOG-CM.txt ]; then
# for cyanogenmod
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
# nobodyAtall - Fix
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
sync
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
# Mount /system to /minicm/system
/sbin/mount_system
sleep 1
chroot /minicm /init
else
#for stock
# Continue booting
exit
fi
Changelog:
29th July 2011
First release, for testing
I will test as soon as I'm home as I'm away now and only have limited net I am ona 4gb card not sure of the class is the only available rom to multiboot cyanocomb so I could have slades cm7 as main and cyanocomb as secondary?
Sent from my U20i using XDA App
First attempt bricked but boot without sd will boot back into main not sure if it is because my SD is only class 2 would that explain being on SE screen for a while?
Sent from my U20i using XDA App
x10man said:
First attempt bricked but boot without sd will boot back into main not sure if it is because my SD is only class 2 would that explain being on SE screen for a while?
Sent from my U20i using XDA App
Click to expand...
Click to collapse
Same what happened to mine but I never took out the sd card to see if it boots back to original state. Im using 4gb class 2.
Sent from my U20i using XDA Premium App
Also when choosing the boot into selected option option my phone. Shuts down then when I boot again it boots my internal cm7 v15
Sent from my U20i using XDA App
Yes, it seems to be incompatible with some SD cards, that's why i need testers
F*ck u man! Ur awesome I still wonder why u didnt get thats recognised developer tag!
how to know class of SD card ?
its not writen any where on card
If you don't know the class it may be class 0 which was before there were classes the default card is class 2 I will try the default card when I'm home and find it
Sent from my U20i using XDA App
galvic said:
F*ck u man! Ur awesome I still wonder why u didnt get thats recognised developer tag!
Click to expand...
Click to collapse
I think I got it galvik show me how later on facebook
kormatoes said:
I think I got it galvik show me how later on facebook
Click to expand...
Click to collapse
Sure but i'm still looking for a class 10 sdcard, u know that my sdcard has 0kb free and lol i'm tired of deleting my music
galvic said:
Sure but i'm still looking for a class 10 sdcard, u know that my sdcard has 0kb free and lol i'm tired of deleting my music
Click to expand...
Click to collapse
I was looking in town today and they all said they did not know what I mean so is there a certin make to look out for
kormatoes said:
I was looking in town today and they all said they did not know what I mean so is there a certin make to look out for
Click to expand...
Click to collapse
If i'm not worng then better the class better will be the result of multiboot!
x10man said:
First attempt bricked but boot without sd will boot back into main not sure if it is because my SD is only class 2 would that explain being on SE screen for a while?
Sent from my U20i using XDA App
Click to expand...
Click to collapse
Booting will take longer on lower SD class, that's the why on SE screen.
tomorow i will test this with sandisk class 4
maybe you could add in first post that is recommended to have minimum 400MB free space on SD card
and great work
So... Let's say I have installed stock in internal, next step is to install CyaNoComb in SD and boot it and afterwards exactly install ramdisk patch? When we boot from SD the Recoverys are booted from SD ROM too and any changes (regarding system and data) affect only SD? I am kinda confused, please heeeeelp!
leajian said:
So... Let's say I have installed stock in internal, next step is to install CyaNoComb in SD and boot it and afterwards exactly install ramdisk patch? When we boot from SD the Recoverys are booted from SD ROM too and any changes (regarding system and data) affect only SD? I am kinda confused, please heeeeelp!
Click to expand...
Click to collapse
No, recovery will keep being main ROM recovery. in fact ROM's on SD, don't need chargemon or recoverys. I think. Anyway I haven't tested this myself, because my SD don't like multiboot.
EDIT: Corrected info, CyaNoComb should multiboot right
Btw, my new SD it's coming soon, so I could test this, and fix isues if exist.
D4rKn3sSyS said:
No, recovery will keep being main ROM recovery. in fact ROM's on SD, don't need chargemon or recoverys. I think. Anyway I haven't tested this myself, because my SD don't like multiboot.
EDIT: Corrected info, CyaNoComb should multiboot right
Btw, my new SD it's coming soon, so I could test this, and fix isues if exist.
Click to expand...
Click to collapse
Lighter rom+better sdclass=perfect multiboot throw some light on how to create multiboot package, i'll try with GingEricsson...

[Q][I9100] logo.jpg protected while mount -o remount,rw /dev/block/stl6 /mnt/.lfs

I am a newbye and don't have right to post into http://forum.xda-developers.com/showthread.php?t=1136699
I want to delete logo.jpg into /dev/block/stl6 and I am unable to delete it...
Here what I did:
Code:
[alpha] adb shell
$ su
# mount -o remount,rw /dev/block/stl6 /mnt/.lfs
# cd /mnt/.lfs
# cp /mnt/sdcard/logo.jpg /mnt/.lfs/logo.jpg
cp: can't create '/mnt/.lfs/logo.jpg': File exists
# cp /mnt/sdcard/logo.jpg /mnt/.lfs/logo0.jpg
# ls -l logo0.jpg
-rwxrwxrwx 1 root root 75573 Jan 1 1970 /mnt/.lfs/logo0.jpg
# cp logo0.jpg logo.jpg
cp: can't create 'logo.jpg': File exists
# cp -f logo0.jpg logo.jpg
cp: can't create 'logo.jpg': File exists
# rm logo.jpg
rm: can't remove 'logo.jpg': Operation not permitted
# rm -f logo.jpg
rm: can't remove 'logo.jpg': Operation not permitted
# cp /mnt/sdcard/logo.jpg /mnt/.lfs/logo1.jpg
# ls -l /mnt/.lfs/logo1.jpg
-rwxrwxrwx 1 root root 75573 Oct 26 22:14 /mnt/.lfs/logo1.jpg
# rm logo1.jpg
rm: can't remove 'logo1.jpg': Operation not permitted
# exit
$ exit
[alpha] echo "what's the **** ?"
what's the **** ?
[alpha] adb shell
$ su
# mount -o remount,rw /dev/block/stl6 /mnt/.lfs
# cd /mnt/.lfs
# chattr -i logo.jpg
chattr: reading flags on logo.jpg: Not a typewriter
# rm logo.jpg
rm: can't remove 'logo.jpg': Operation not permitted
# exit
$ exit
[alpha] echo "what's the **** ???"
what's the **** ???
Any help would be appreciated.
That file system is not well supported as such we don't currently have the ability to replace or modify any existing files. Only create new ones.
If you did the all steps in that thread you would end up with a empty partition so that you can create the logo.jpg. If you want to change the logo later you have to re-flash the empty partition again.
shadowofdarkness said:
That file system is not well supported as such we don't currently have the ability to replace or modify any existing files. Only create new ones.
If you did the all steps in that thread you would end up with a empty partition so that you can create the logo.jpg. If you want to change the logo later you have to re-flash the empty partition again.
Click to expand...
Click to collapse
So strange to read that: now I know and I thank you for information.
I will read the tuto but I think about about some adb commands...
As I found:
- in /init.rc "mount j4fs /dev/block/mmcblk0p4 /mnt/.lfs"
- in /sbin/ "mke2fs mkfifo mkfs.ext2 mknod mkswap mktemp mkyaffs2image "
- in /system/xbin/ "mkdosfs mke2fs mkfifo mkfs.ext2 mkfs.minix mkfs.reiser mkfs.vfat mknod mkpasswd mkswap mktemp"
- /sbin/parted
I wondering if it is possible to :
case A.
- umount /dev/block/mmcblk0p4
- mkfs.ext2 /dev/block/mmcblk0p4
- modify /init.rc to have "mount ext2 /dev/block/mmcblk0p4 /mnt/.lfs" in a way I have to find out : maybe a 'sed -i "s/mount j4fs \/dev\/block\/mmcblk0p4/mount ext2 \/dev\/block\/mmcblk0p4/"' into the image I have to reflash?
- a backup could be 'dd if=/dev/block/stl6 of=/sdcard/param.lfs bs=4096'
- and do what I want without the overwritting problem on /mnt/.lfs?
case B.
- umount /dev/block/mmcblk0p4
- do a "dd if=/dev/null of=/dev/block/mmcblk0p4 bs=4096 count=2048" as param.lfs size is 8388608
- mount j4fs -w /dev/block/mmcblk0p4 /mnt/.lfs
- copy what I backuped with the good logo.jpg
- and have the good logo.jpg on this nasty j4fs filesystem
Maybe a C case could be to use gparted ?
As it is my first step as an android newbye, any advice would be appreciated...

[DEV][PORT] Port CM9 for LockedBootloaders [W.I.P]

Hello guys, im working to boot any CM9 Rom in stock kernel with Bootloader Locked
The Fix, requires a number of changes in the Ramdizk, this Ramdizk is obtained through the kernel, the ramdizk is that the system starts.
This file consists of the following
Ramdizk .... obtained from the kernel
chargemon .... modified to start the ramdizk
charger ... for charging the phone
sh .... responsible for early in the phone
Chargemon
Code:
#!/system/xbin/sh
# Chargemon script for Xperia NEO by Xperiafan
# Boot to CWM
cat /dev/input/event2 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -e /cache/recovery/boot ]
then
rm /cache/recovery/boot
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount eMMCs
umount -l /dev/block/mmcblock0p10
umount -l /dev/block/mmcblock0p11
umount -l /dev/block/mmcblock0p12
# Mount recovery
cd /
rm -r /sbin /sdcard
rm -f etc init* uevent* default*
if [ -f /system/bin/recovery.tar ]
then
tar -xf /system/bin/recovery.tar
fi
# Umount /system
umount -l /dev/block/mmcblk0p10
# chroot
chroot / /init
fi
# Ramdizk
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount eMMCs
umount -l /dev/block/mmcblock0p10
umount -l /dev/block/mmcblock0p11
umount -l /dev/block/mmcblock0p12
# Mount ramdisk
cd /
rm -r /sbin /sdcard
rm -f etc init* uevent* default*
tar -xf /system/bin/ramdisk.tar
# Fix permissions
mount -o remount,rw rootfs /
umount -l /system
umount -l /data
umount -l /cache
umount -l /mnt/sdcard
umount -l /sdcard
rm -r /mnt/sdcard
mkdir /tmp
# chroot
chroot / /init
To use these files, you need to put them in the following path
Ramdizk system/bin
Chargemon system/bin
Charger system/bin
sh system/xbin
I have not got this phone, please appreciate your comments, you need to put these files on those routes the rom, and erase the file boot.img​
Downloads
Ramdizk Beta Here
Chargemon Done Here
Charger Done Here
SH Done Here
We need custom wifi modules, right?
Sent from my MT15i using xda app-developers app
Its nice that we'll be having CyanogenMod for locked bootloaders.
Keep up the good work dev!
Anyone having locked bl
Tried his efforts?
Sent from my MT11i using xda premium
I tried it, but i doesnt boot, just stuck at sony logo... I will try to manually extract the ramdisk from the latest get.cm and it seems we will have aosp roms on locked bootloader
Sent from my MT15i using xda app-developers app
I will try to make a build what at least boots succesfully
Sent from my MT15i using xda app-developers app
it would be nice if anyone try to make this work i realised that we have mtdblocks not mmcblocks ... lets see if i can get it to work
Im work in this.... But first im make a new ramdizk for xperia u and later for neo and others
Sent from my ST25i using xda app-developers app

Tank Fire tv stick 2 : Mount ext4 as sdcard1 without disabling selinux.

Enable init.d, if not already enabled
add the following script in init.d
Code:
#!/system/bin/sh
sleep 25
DRIVE_PATH=$(blkid /dev/block/s* |grep -m 1 "{uuid of ur device}"| grep -oe '[^:]*')
echo "Mounting $DRIVE_PATH to /storage/sdcard1"
su -c mount -t ext4 -o rw,context=u:object_r:fuse:s0,noatime,nodiratime,nosuid,nodev,noauto_da_alloc $DRIVE_PATH /storage/sdcard1;
su -c chown -R 0:1028 /storage/sdcard1;
su -c chmod -R 771 /storage/sdcard1;

Categories

Resources