Broken cache (17mb or less) fix script (samsung I9000) - Android Q&A, Help & Troubleshooting

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

Related

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

[Q] Simple File Copy Script

Hello everyone, I'm trying to figure out how to write a script to copy three .mp3 files from three different locations all to /system/media/audio/ringtones. So far, I'm in a bit over my head and I was wondering if anyone here could help me please?
Thanks in advance!
Mac of York said:
Hello everyone, I'm trying to figure out how to write a script to copy three .mp3 files from three different locations all to /system/media/audio/ringtones. So far, I'm in a bit over my head and I was wondering if anyone here could help me please?
Thanks in advance!
Click to expand...
Click to collapse
Well bud, honestly, it's not even worth all the writing it would take to compile a script for such an easy task via and file explorer that supports root functions. Simply copy n paste all into one folder, mount your /system -r/w and then the good ol multi-select button, copy to clipboard, browse up to /system/media/ringtones or /system/audio (whichever your phone model stores your system sounds/ui crap in), then after pasted to destination folder simply remount -r/o, reboot phone, voila!
jtmarich1985 said:
Well bud, honestly, it's not even worth all the writing it would take to compile a script for such an easy task via and file explorer that supports root functions. Simply copy n paste all into one folder, mount your /system -r/w and then the good ol multi-select button, copy to clipboard, browse up to /system/media/ringtones or /system/audio (whichever your phone model stores your system sounds/ui crap in), then after pasted to destination folder simply remount -r/o, reboot phone, voila!
Click to expand...
Click to collapse
Haha, thanks -- that's what I usually do but if it's too complicated it's not worth it.
Open a new text file, and write this:
Code:
#!/system/bin/sh
mount -o rw,remount /system
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
mount -o ro,remount /system
Save it (the extension doesn't matter) and that's it. You can run it using script manager, or the terminal emulator (in this case you need to get root permissions first, using the su command).
Also you can add some messages (to get a nicer script, you know ), this way:
Code:
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Copying files..."
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
echo "All done. Have a nice day =)"
Please be careful while using scripts, otherwise you'll brick some devices :silly:
RoberGalarga said:
Open a new text file, and write this:
Code:
#!/system/bin/sh
mount -o rw,remount /system
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
mount -o ro,remount /system
Save it (the extension doesn't matter) and that's it. You can run it using script manager, or the terminal emulator (in this case you need to get root permissions first, using the su command).
Also you can add some messages (to get a nicer script, you know ), this way:
Code:
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Copying files..."
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
echo "All done. Have a nice day =)"
Please be careful while using scripts, otherwise you'll brick some devices :silly:
Click to expand...
Click to collapse
Awesome, thanks. I'd give you a thanks but I'm all thanked out today.
RoberGalarga said:
Open a new text file, and write this:
Code:
#!/system/bin/sh
mount -o rw,remount /system
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
mount -o ro,remount /system
Save it (the extension doesn't matter) and that's it. You can run it using script manager, or the terminal emulator (in this case you need to get root permissions first, using the su command).
Also you can add some messages (to get a nicer script, you know ), this way:
Code:
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Copying files..."
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
echo "All done. Have a nice day =)"
Please be careful while using scripts, otherwise you'll brick some devices :silly:
Click to expand...
Click to collapse
This is exactly what I wanted and it works beautifully! Thank you so much!
If I put script like thisone (classic copy-paste) in /system/etc/init.d, is it possible to configure that runing on ewery boot? And how?
Thanks.
Haven't tried this yet for fear of bricking, can someone help to see it this will work? I'm just trying to have a script to be placed on the homescreen so I can easily disable/enable the mediascanner/screenshot function. By the way, cp copies files, and cp -r actually moves (cut-paste) files, right?
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Movingfiles..."
cp -r /system/prv-app/MediaProvider.apk /system/prv-app/newfolder/MediaProvider.apk
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Moving files..."
cp -r /system/prv-app/newfolder/MediaProvider.apk /system/prv-app/MediaProvider.apk
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
Is it possible to do the same but with a folder+ content and not just a file?
Best thought to testing scripts, would be to add an android emulator to your computer. The one I use is nox. Its great for testing scripts and a variety of other things as well. Nox is an android based application, made jjust like a phone. All the features and extensions that your normal everyday android has, this emulator has as well.

Huawei T1-701u /system write protection

Hi guys,
I am using a Huawei T1-701u. I can consistently get root using iovyroot. I have added all the firmwares I can find and created a pull request.
There seems to be some sort of protection on the system partition however. This manifests in two ways. Firstly changes to the partition are magically reverted on reboot. Secondly, I sometimes get an error when mounting /system as rw saying it is readonly.
I have some scripts up on GitHub: /chrisfraser/HuaweiRoot (Sorry you have to search. This is my first post). This eventually works, but it is indeterminate. Sometimes it works first time. Other times it can take 20 tries. Below is the important remount code.
Code:
install_perm() {
cat $1 > $2
chown 0.0 $2
chmod 755 $2
}
echo '[*] Starting root install'
mount -o rw,remount /system
setenforce 0
install_perm $BIN/su /system/xbin/su
install_perm $BIN/su /system/xbin/daemonsu
install_perm $BIN/install-recovery.sh /system/etc/install-recovery.sh
ln -s /system/etc/install-recovery.sh /system/bin/install-recovery.sh
mount -o ro,remount /system
sync
echo '[*] Root install complete, rebooting'
sleep 5
reboot
Thanks in advance

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;

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