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

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

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

[ADDON] Dual Recovery (xRecovery + CWM recovery on your Phone)

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

remount rw: operation not permitted

Trust me, I read everything...still no idea what could be wrong. Any clues?
$ adb shell
[email protected]:/ $ su -
[email protected]:/ # id
uid=0(root) gid=0(root) groups=1003(graphics),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats) context=kernel
[email protected]:/ # mount | grep system
/dev/block/platform/mtk-msdc.0/by-name/system /system ext4 ro,relatime,data=ordered 0 0
[email protected]:/ # mount -o remount,rw -t ext4 /system
mount: Operation not permitted
# getenforce
Disabled
I have long since ran out of ideas...
me too

Broken cache (17mb or less) fix script (samsung I9000)

Hi all,
I've been looking around to solve my /cache problem of it being only 17MB.
Found a temporary fix but that needed to be implemented or executed every boot up.
And since I am to lazy or stupid to remember that every boot I search for another solution ...
Combined a script from someone else with some stuf I found somewhere else...
Descriptions are in the code....
This code works on my samsung I9000 with Full Advance Rom final 6.0.1:good::good:
Code:
#!/system/bin/sh
# stratosk - 27/07/2011
# Modified by Dutchpatriot 26/06/2017
# Works on Full advance Rom with I9000
# Change params
# Check your partitions name /cache
# Need to be root via ADB or root via device
# with the command : mount
# This fix is only needed when /cache has arround 17mb!!!
# run this command as root in ADB shell as root
# To be able to execute this you need to change file system from read-only to rewritable
# as root exec this command: mount -o rw,remount /system
# Paste this text in a file called cachefix.sh
# command : vi cachefix.sh
# If you like me, and arn't that good with vi
# I will attach a cachefix.sh to this post as
# cachefix.txt rename it to cachefix.sh
# give the cachefix.sh the right permissions
# chmod 777 cachefix.sh
# Run this once!
# sh /LOCATION_OF_SCRIPT/cachefix.sh
# or
# ./LOCATION_OF_SCRIPT/cachefix.sh
#
# when ran once the /data/local
# and all went well has a
# cache.img file
# This is now mounted as /cache
# command to see or verfy: mount
# /cache is now as big as you made it under
# CREATE A FILE 500mb
# Every time you reboot the 99Tcachefix script in /etc/init.d/ will be executed!
#
# adb root
# adb shell
# remount / and /system writable
mount -o rw,remount /
mount -o rw,remount /system
# EDIT the right old cache partitio /dev/block/mtdblock3 to fit yours!!!
# Makes script in /etc/init.d named 99Tcachefix so it will be executed on boot
echo "#!/system/bin/sh \n umount /dev/block/mtdblock3 \n losetup /dev/block/loop7 /data/local/cache.img \n mount -t ext4 /dev/block/loop7 /cache \n chown system.cache /cache \n chmod 770 /cache" >> /system/etc/init.d/99Tcachefix
# assign the right permissions to be executed as root but not edited
#There is a very neat trick in every Linux which will allow you to do so. It is called the SetUI bit.
#Keep in mind that you will need to have the permissions locked down tight in this file for this to be secure.
#Make the file owned by root and group root:
#sudo chown root.root <my script>
#Now set the SetUID bit, make it executable for all and writable only by root:
#sudo chmod 4755 <my script>
# Keep in mind if this script will allow any input or editing of files, this will also be done as root.
# source https://askubuntu.com/questions/167847/how-to-run-bash-script-as-root-with-no-password
# Leave as is!
chown root.root /system/etc/init.d/99Tcachefix
chmod 4755 /system/etc/init.d/99Tcachefix
# Check if dir is there else Create Dir LEAVE AS IS
if [ -d "/data/local" ]; then
echo "directory /data/local already there!"
echo "Showing dir /data/local"
sleep 3
ls "/data/local"
sleep 2
else
# create dir
mkdir /data/local
echo "Directory /data/local created"
fi
# create a file 500mb (change if you like count=XXXXXX)
dd if=/dev/zero of=/data/local/cache.img bs=1024 count=500000
# create ext4 filesystem LEAVE AS IS!!
mke2fs -F -T ext4 /data/local/cache.img
# my cache partition is called /dev/block/mtdblock3 see whats yours is called and
# change this to yours!!!
umount /dev/block/mtdblock3
# mount LEAVE AS IS!!!
losetup /dev/block/loop7 /data/local/cache.img
mount -t ext4 /dev/block/loop7 /cache
chown system.cache /cache
chmod 770 /cache
# Remount / and /system as read-only again
mount -o ro,remount /system
mount -o ro,remount /
sleep 3
echo "Now after reboot this (cache) partition will be back!"
sleep 10
echo "All done, if there where no errors you can now delete cachefix.sh"
echo "If your new /cache partition is mounted with the given size than all is good"
echo "These are the configurations now"
# exec df command to show config now
df
sleep 10
exit
With this your /cache will be changed to whatever values you give in the code...
For safety remove the cachefix.sh afterwards...
Added cachefix.txt, download and rename to cachefix.sh
Greets,
Dutchpatriot

hacking a old discontinued android tv box(airtel internet tv, codename: ganesa)

A old thread about the same topic: https://forum.xda-developers.com/android/software-hacking/rooting-set-box-lge-sh960s-airtel-t3826462
So I have temp root using dirty-cow and have tried to edit default.prop to get adb by usb. didnt work, all are mounted read-only. tried remounting, fail, turning off SELinux, fail. heres the shell:
Code:
$ adb shell
[email protected]:/ $ /data/local/tmp/dcow /data/local/tmp/run-as /system/bin/run-a>
dcow /data/local/tmp/run-as /system/bin/run-as
warning: new file size (9804) and destination file size (17920) differ
[*] size 17920
[*] mmap 0xb6d64000
[*] currently 0xb6d64000=464c457f
[*] using /proc/self/mem method
[*] madvise = 0xb6d64000 17920
[*] madvise = 0 17449
[*] /proc/self/mem 10931200 610
[*] exploited 0 0xb6d64000=464c457f
[email protected]:/ $ /system/bin/run-as
uid /system/bin/run-as 2000
uid 0
0 u:r:runas:s0
context 0 u:r:shell:s0
[email protected]:/ # Hehehe
/system/bin/sh: Hehehe: not found
127|[email protected]:/ # which touch
/system/bin/touch
[email protected]:/ # touch Hi.txt
touch: 'Hi.txt': Read-only file system
1|[email protected]:/ # mount -o rw,remount /system
mount: Permission denied
255|[email protected]:/ # ls -ladZ sys
sys/ system/
255|[email protected]:/ # ls -ladZ system
drwxr-xr-x root root u:object_r:system_file:s0 system
[email protected]:/ # setenforce 0
setenforce: Couldn't set enforcing status to '0': Permission denied
1|[email protected]:/ # sestatus
/system/bin/sh: sestatus: not found
127|[email protected]:/ # cat
^C
130|[email protected]:/ #
130|[email protected]:/ #
130|[email protected]:/ #
130|[email protected]:/ #
130|[email protected]:/ #
130|[email protected]:/ # cat /etc/selinux/config
/system/bin/sh: cat: /etc/selinux/config: No such file or directory
1|[email protected]:/ # cd etc
[email protected]:/etc # ls
18p
NOTICE.html.gz
audio_effects.conf
audio_policy.conf
bluetooth
clatd.conf
dhcpcd
event-log-tags
fallback_fonts.xml
fonts.xml
gps.conf
hosts
media_codecs.xml
media_codecs_google_audio.xml
media_codecs_google_tv.xml
media_codecs_google_video.xml
media_codecs_performance.xml
media_profiles.xml
mkshrc
permissions
ppp
preloaded-classes
recovery-resource.dat
security
sysconfig
system_fonts.xml
wifi
[email protected]:/etc # touch lol
touch: 'lol': Read-only file system
1|[email protected]:/etc # mount -o rw,remount /
mount: Permission denied
255|[email protected]:/etc # su mount -o rw,remount /
/system/bin/sh: su: not found
127|[email protected]:/etc # sudo mount -o rw,remount /
/system/bin/sh: sudo: not found
127|[email protected]:/etc #
127|[email protected]:/etc #
so can I know why I am denied even tho I am root? Also can some-one guide me to write a blob extraction script? There is no fastboot.
as its a Android Marshmallow (6.0) device try to dump boot.img and flash modified magisk_patched.img on locked bootloader. Magisk has an option to by-pass dm-verity. this is confirmed method on some Mediatek devices, if you are lucky this will work
Code:
ls -d $(find /dev/block -name by-name)/*
cat /dev/block/.../by-name/boot > /sdcard/boot.img
if that works, adb pull the img, patch with Magisk Manager, make sure you have enabled both checkboxes for preserve encryption + keep AVB/dm-verity, push it back to device and try to flash
Code:
cat /sdcard/magisk_patched.img > /dev/block/.../by-name/boot
however, if the img is flashed and dm-verity is preventing from boot this is a permanently brick
FaIl
aIecxs said:
as its a Android Marshmallow (6.0) device try to dump boot.img and flash modified magisk_patched.img on locked bootloader. Magisk has an option to by-pass dm-verity. this is confirmed method on some Mediatek devices, if you are lucky this will work
Code:
ls -d $(find /dev/block -name by-name)/*
cat /dev/block/.../by-name/boot > /sdcard/boot.img
if that works, adb pull the img, patch with Magisk Manager, make sure you have enabled both checkboxes for preserve encryption + keep AVB/dm-verity, push it back to device and try to flash
Code:
cat /sdcard/magisk_patched.img > /dev/block/.../by-name/boot
however, if the img is flashed and dm-verity is preventing from boot this is a permanently brick
Click to expand...
Click to collapse
I dont have full root i guess: find: /dev/block: Permission denied
check /proc/partitions for two similar partitions with 10 or 16 MB one of these should be boot. try to dump the partition (for example on my device it's mmcblk0p7)
Code:
cat /proc/partitions
cat /dev/block/mmcblk0p7 > /sdcard/mmcblk0p7.img
if that fails try to disable selinux
Code:
echo 0 > /sys/fs/selinux/enforce
or
echo 0 > /data/local/tmp/enforce
mount -o bind /data/local/tmp/enforce /sys/fs/selinux/enforce
chmod 0644 /sys/fs/selinux/enforce
chown 0.0 /sys/fs/selinux/enforce
chcon u:object_r:selinuxfs:s0 /sys/fs/selinux/enforce
Can someone help with steps to root the device and backup current ROM
seniornoob58432 said:
A old thread about the same topic: https://forum.xda-developers.com/android/software-hacking/rooting-set-box-lge-sh960s-airtel-t3826462
So I have temp root using dirty-cow and have tried to edit default.prop to get adb by usb. didnt work, all are mounted read-only. tried remounting, fail, turning off SELinux, fail. heres the shell:
Code:
$ adb shell
[email protected]:/ $ /data/local/tmp/dcow /data/local/tmp/run-as /system/bin/run-a>
dcow /data/local/tmp/run-as /system/bin/run-as
warning: new file size (9804) and destination file size (17920) differ
[*] size 17920
[*] mmap 0xb6d64000
[*] currently 0xb6d64000=464c457f
[*] using /proc/self/mem method
[*] madvise = 0xb6d64000 17920
[*] madvise = 0 17449
[*] /proc/self/mem 10931200 610
[*] exploited 0 0xb6d64000=464c457f
[email protected]:/ $ /system/bin/run-as
uid /system/bin/run-as 2000
uid 0
0 u:r:runas:s0
context 0 u:r:shell:s0
[email protected]:/ # Hehehe
/system/bin/sh: Hehehe: not found
127|[email protected]:/ # which touch
/system/bin/touch
[email protected]:/ # touch Hi.txt
touch: 'Hi.txt': Read-only file system
1|[email protected]:/ # mount -o rw,remount /system
mount: Permission denied
255|[email protected]:/ # ls -ladZ sys
sys/ system/
255|[email protected]:/ # ls -ladZ system
drwxr-xr-x root root u:object_r:system_file:s0 system
[email protected]:/ # setenforce 0
setenforce: Couldn't set enforcing status to '0': Permission denied
1|[email protected]:/ # sestatus
/system/bin/sh: sestatus: not found
127|[email protected]:/ # cat
^C
130|[email protected]:/ #
130|[email protected]:/ #
130|[email protected]:/ #
130|[email protected]:/ #
130|[email protected]:/ #
130|[email protected]:/ # cat /etc/selinux/config
/system/bin/sh: cat: /etc/selinux/config: No such file or directory
1|[email protected]:/ # cd etc
[email protected]:/etc # ls
18p
NOTICE.html.gz
audio_effects.conf
audio_policy.conf
bluetooth
clatd.conf
dhcpcd
event-log-tags
fallback_fonts.xml
fonts.xml
gps.conf
hosts
media_codecs.xml
media_codecs_google_audio.xml
media_codecs_google_tv.xml
media_codecs_google_video.xml
media_codecs_performance.xml
media_profiles.xml
mkshrc
permissions
ppp
preloaded-classes
recovery-resource.dat
security
sysconfig
system_fonts.xml
wifi
[email protected]:/etc # touch lol
touch: 'lol': Read-only file system
1|[email protected]:/etc # mount -o rw,remount /
mount: Permission denied
255|[email protected]:/etc # su mount -o rw,remount /
/system/bin/sh: su: not found
127|[email protected]:/etc # sudo mount -o rw,remount /
/system/bin/sh: sudo: not found
127|[email protected]:/etc #
127|[email protected]:/etc #
so can I know why I am denied even tho I am root? Also can some-one guide me to write a blob extraction script? There is no fastboot.
Click to expand...
Click to collapse
Can you help me the steps you used to root via ditry cow?
aIecxs said:
check /proc/partitions for two similar partitions with 10 or 16 MB one of these should be boot. try to dump the partition (for example on my device it's mmcblk0p7)
Code:
cat /proc/partitions
cat /dev/block/mmcblk0p7 > /sdcard/mmcblk0p7.img
if that fails try to disable selinux
Code:
echo 0 > /sys/fs/selinux/enforce
or
echo 0 > /data/local/tmp/enforce
mount -o bind /data/local/tmp/enforce /sys/fs/selinux/enforce
chmod 0644 /sys/fs/selinux/enforce
chown 0.0 /sys/fs/selinux/enforce
chcon u:object_r:selinuxfs:s0 /sys/fs/selinux/enforce
Click to expand...
Click to collapse
How to disable selinux?

Categories

Resources