Related
$ mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/block/mmcblk0p29 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p35 /data ext4 rw,nosuid,nodev,noatime,barrier=1,nodelalloc,da
ta=ordered 0 0
/dev/block/mmcblk0p36 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,nodelalloc,d
ata=ordered 0 0
/dev/block/mmcblk0p30 /devlog ext4 rw,nosuid,nodev,noatime,barrier=1,nodelalloc,
data=ordered 0 0
/dev/block/mmcblk0p17 /vendor/firmware/misc vfat ro,relatime,fmask=0000,dmask=00
00,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=re
mount-ro 0 0
/dev/block/mmcblk0p21 /vendor/firmware/adsp vfat ro,relatime,fmask=0000,dmask=00
00,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=re
mount-ro 0 0
/dev/block/mmcblk0p18 /vendor/firmware/misc_mdm vfat ro,relatime,fmask=0000,dmas
k=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=lower,error
s=remount-ro 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /app-cache tmpfs rw,relatime,size=8192k,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
tmpfs /data/secure/data tmpfs rw,relatime,mode=771,uid=1000,gid=1000 0 0
/data/d /data/d debugfs rw,relatime 0 0
htcfs /data/htcfs fuse.htcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow
_other 0 0
/dev/block/vold/179:37 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,
uid=1000,gid=1015,fmask=0202,dmask=0202,allow_utime=0020,codepage=cp437,iocharse
t=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:37 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0202,dmask=0202,allow_utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/vold/179:65 /mnt/sdcard/ext_sd vfat rw,dirsync,nosuid,nodev,noexec,re
latime,uid=1000,gid=1015,fmask=0202,dmask=0202,allow_utime=0020,codepage=cp437,i
ocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
DxDrmServerIpc /data/DxDrm/fuse fuse.DxDrmServerIpc rw,nosuid,nodev,relatime,use
r_id=0,group_id=0,allow_other 0 0
do you have the partition sizes?
con247 said:
do you have the partition sizes?
Click to expand...
Click to collapse
Phone is out of my hands now. I do not.
That is fine. How did you root it? Zergrush or whatever?
con247 said:
That is fine. How did you root it? Zergrush or whatever?
Click to expand...
Click to collapse
Zerg worked for temp root. Permanent root did not work. Also I'd like to mention that I removed all bloat from /system/app but it ended up coming back after the reboot. The market started to download every application i removed. Sucks.
How would I add these mount points to the Android Kitchen?
xboxexpert said:
Zerg worked for temp root. Permanent root did not work. Also I'd like to mention that I removed all bloat from /system/app but it ended up coming back after the reboot. The market started to download every application i removed. Sucks.
Click to expand...
Click to collapse
It probably has nand lock so the files may have not even been deleted. I am sure we can get around that issue once we have some to play with. I am sure there is an APK or something that checks /system so if we find and remove that we should be OK.
con247 said:
It probably has nand lock so the files may have not even been deleted. I am sure we can get around that issue once we have some to play with.
Click to expand...
Click to collapse
No I mean to add the device to the android kitchen. You need a mount file to get the roms correctly flashable.
sorry, i quoted the wrong thing. I meant to quote the fact that the apps he removed re-appeared after reboot. Sorry that was probably confusing as hell to anyone that read that.
dmeadows013 said:
No I mean to add the device to the android kitchen. You need a mount file to get the roms correctly flashable.
Click to expand...
Click to collapse
do it manually type them in to the updater-script
in other words
Mount Script:
mount("ext4", "EMMC", "/dev/block/mmcblk0p29", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p35", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p36", "/cache");
run_program("/sbin/busybox", "mount", "/sdcard");
Format Script:
format("ext4", "EMMC", "/dev/block/mmcblk0p29", "/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p35", "/data");
format("ext4", "EMMC", "/dev/block/mmcblk0p36", "/cache");
What are the /boot and /sdcard mount points?
You need to add a definition file to the kitchen, look at what's already there for the info you need.
D
/boot emmc /dev/block/mmcblk0p22
/cache ext4 /dev/block/mmcblk0p36
/data ext4 /dev/block/mmcblk0p35
/misc emmc /dev/block/mmcblk0p24
/recovery emmc /dev/block/mmcblk0p23
/sdcard vfat //dev/block/mmcblk0p1 /dev/block/mmcblk0
/system ext4 /dev/block/mmcblk0p29
/sd-ext ext4 //dev/block/mmcblk0p2
// <-- means I want more info..
cat /proc/emmc
at /proc/emmc
dev: size erasesize name
mmcblk0p24: 00fff600 00000200 "misc"
mmcblk0p23: 00fffc00 00000200 "recovery"
mmcblk0p22: 01000000 00000200 "boot"
mmcblk0p29: 4dfffc00 00000200 "system"
mmcblk0p31: 001ffe00 00000200 "local"
mmcblk0p36: 13fffe00 00000200 "cache"
mmcblk0p35: 97fffe00 00000200 "userdata"
mmcblk0p30: 01dba800 00000200 "devlog"
mmcblk0p33: 00040000 00000200 "pdata"
mmcblk0p17: 02800000 00000200 "radio"
mmcblk0p21: 02000000 00000200 "adsp"
mmcblk0p19: 007ffc00 00000200 "radio_config"
mmcblk0p25: 00400000 00000200 "modem_st1"
mmcblk0p26: 00400000 00000200 "modem_st2"
mmcblk0p18: 02800000 00000200 "mdm9k"
mmcblk0p20: 007ffa00 00000200 "mdm9k_config"
mmcblk0p27: 00400000 00000200 "mdm_efs1"
mmcblk0p28: 00400000 00000200 "mdm_efs2"
$
The way XDA handle my post is dumb..
I need the mounts for sd-card and sd-ext
Hello guys,
i want to write a update-script that makes some changes on the phone,
but before i can extract files, set symlinks, etc. i have to mount some partitions.
The format of the partitions is MTD, but i don´t know how to find out which block is for /system, /hidden, /data, etc. and where is the block?
I searched much in the internet, have read the instructions for edify-scripting and so on,
but i´ve never found it for MTD and never found how to find out which block is which partition.
I hope you can help
Every phone is different, so for you to get useful advice you need to state what you are using.
I've always found it very helpful to look at the updater script for custom ROMs since they have mount instructions for /system.
Sent from my HTC Desire S
BillGoss said:
Every phone is different, so for you to get useful advice you need to state what you are using.
I've always found it very helpful to look at the updater script for custom ROMs since they have mount instructions for /system.
Sent from my HTC Desire S
Click to expand...
Click to collapse
I realy have to thank you for your reply
I´m using a Motorola Motoluxe XT615 and the problem is, theres no custom ROM out there.
A friend has developt a awesome JB-Design for it and we know how to mount system, but anything else doesn´t work.
The command we´ve used:
Code:
run_program("/sbin/busybox", "mount", "/system");
Thats the output when i´m in /dev/block and enter command "ls":
Code:
dm-2
dm-1
dm-0
vold
mtdblock11
mtdblock10
mtdblock9
mtdblock8
mtdblock7
mtdblock6
mtdblock5
mtdblock4
mtdblock3
mtdblock2
mtdblock1
mtdblock0
loop7
loop6
loop5
loop4
loop3
loop2
loop1
loop0
mmcblk0p1
platform
mmcblk0
Maybe this is usefull, too. Output of command "cat /proc/mtd":
Code:
dev: size erasesize name
mtd0: 00700000 00020000 "boot"
mtd1: 00300000 00020000 "misc"
mtd2: 00300000 00020000 "misc2"
mtd3: 00200000 00020000 "splash"
mtd4: 00700000 00020000 "recovery"
mtd5: 00d00000 00020000 "ftm"
mtd6: 00d00000 00020000 "hidden"
mtd7: 01500000 00020000 "cda"
mtd8: 00060000 00020000 "dbgmsk"
mtd9: 16300000 00020000 "system"
mtd10: 0a000000 00020000 "cache"
mtd11: 183e0000 00020000 "userdata"
Well, that will work if a ROM with busybox is already installed.
Here's what's in the updater script for the HTC Desire S ROMs:
assert(getprop("ro.product.device") == "saga" || getprop("ro.build.product") == "saga");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system");
...
format("ext4", "EMMC", "/dev/block/mmcblk0p25", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system");
package_extract_dir("system", "/system");
Nope this helps. I think you need to use MTD instead of EMMC. And, obviously mtdblock9 instead of mmcblk0p25.
Sent from my HTC Desire S
BillGoss said:
Well, that will work if a ROM with busybox is already installed.
Here's what's in the updater script for the HTC Desire S ROMs:
assert(getprop("ro.product.device") == "saga" || getprop("ro.build.product") == "saga");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system");
...
format("ext4", "EMMC", "/dev/block/mmcblk0p25", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system");
package_extract_dir("system", "/system");
Nope this helps. I think you need to use MTD instead of EMMC. And, obviously mtdblock9 instead of mmcblk0p25.
Sent from my HTC Desire S
Click to expand...
Click to collapse
Finally i got it, thank you
It wasn´t even that hard. The right command is:
Code:
mount("MTD", "userdata", "/data");
mount("MTD", "system", "/system");
mount("MTD", "hidden", "/hidden");
Thanks for your help
OK, Lets Start
1.(Mounting system)-
______________
[[ mount("yaffs2", "MTD", "system", "/system");]]
[[ run_program("/sbin/busybox", "mount", "/system");]]
_______________
^^^ this 2 command is for mounting system.....
(Discribe)-use any command from this 2 command for mounting system pertition.this give you permission to write and read system pertition.So you must use these command in update script.you can mount anothers folders like data.just write data in stead of system.E.X- [[ mount("yaffs2", "MTD", "data", "/data");]] and no need to mount sdcard...
2.Formating system-
_______________
[[ format("yaffs2", "MTD", "system", "/system");]]
[[ run_program("/sbin/busybox", "format", "/system");]]
_______________
^^^this 2 command is for formating system pertition....
(Discribe)-this 2 command are used in formating system pertition...you can use it in your custom rom's script but in case of flashable patch/upadate zip dont use it.its only for custom ron's script...
3. package extracting -
_______________
[[package_extract_dir("system", "/system");]]
_______________
^^^this command for extracting package...
(Discribe)-this command for extracting files...^^^this command is used for extractimg files in system pertition..you also ectract anothers files in anothers pertition...like by this- [[package_extract_dir("data", "/data");]]your data files are extracted in data pertition... [[package_extract_dir("data", "/data");]] by this your sdcard folder will be extracted in your sdcard...
4.(Smylink)-
_______________
[[symlink("toolbox", "/system/bin/mount");]]
_______________
^^^This command for smylink...
(Discribe)-you can use this command if you want to add some brinay in system/bin folder...
5.setting permissions(folder)-
_______________
[[set_perm_recursive(0, 0, 0755, 0644, "/system]]
_______________
^^^this command for setting permission(folder)
(Discribe)-this is used for set permission of system folder...
6.setting permission(files)-
_______________
[[ set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");]]
_______________
^^^this command for setting permission(files)
(Discribe)-this is used for set permission for defferent files
7.Delect files/folder-
_______________
[[ delete_recursive("/system/appbackup");]]
_______________
^^^this for delecting folder/files...
(Discribe)-this is used for delact adutional files/folders...
8.installing busybox-
_______________
[[ set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
ui_print(" Installing BusyBox ");
sleep(2);
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");]]
_______________
^^^this whole line is for installing busybox
(Discribe)-this is used for installing busybox...for this your busybox must be in system/xbin..
9.For rooting-
_______________
[[ ui_print(" Rooting ");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");]]
_______________
^^^this lines for rooting...
(Discribe)-this is used for auto rooting...for this su file must be in system/xbin
10.unmounting-
_______________
[[ui_print(" Unmount system ");
unmount("/system");]]
[[ run_program("/sbin/busybox", "umount", "/system");]]
_______________
^^^this 2 command for unmounting...
(Discribe)-this is used for unmounting system...you must need to unmount another folders too which you mounted like-[[ unmount("/data");]] and [[unmount("/sdcard");]]
11.Show progress-
_______________
[[ show_progress(0.2, 10);]]
_______________
this for show your ui print times
12.ui_print-
_______________
[[ ui_print(" Starting to install... ");]]
_______________
^^^this is ui print what is showed on cwm....
13.auto reboot-
_______________
[[ui_print(" Auto rebooting ");
sleep(2);
ui_print(" Opening Cayno 'X'... ");
sleep(2);
run_program("/sbin/sleep", "5");
run_program("/sbin/reboot");]]
_______________
^^^this whole line for auto rebooting.
14.installing backup imei and restore imei-
_______________
[[ ui_print(" Backuping your imei ");
sleep(2);
package_extract_file("backup_imei", "/tmp/backup_imei");
set_perm(0, 0, 0777, "/tmp/backup_imei");
run_program("/tmp/backup_imei");]]
_______________
^^^this for backup imei
Discribe)-for this the backup imei files must be in you zip folder with meta_inf, system, another files...
______________
[[ ui_print(" Restoring your imei ");
sleep(2);
package_extract_file("restore_imei", "/tmp/restore_imei");
set_perm(0, 0, 0777, "/tmp/restore_imei");
run_program("/tmp/restore_imei");]]
_______________
^^^this for restoring imei....
(Discribe)- for this the restore imei files must be in you zip folder with meta_inf, system, another files...
15.logo.bin-
_______________
[[ ui_print(" Extracting boot logo ");
sleep(2);
package_extract_file("logo.bin", "/dev/logo");]]
_______________
^^^this for installing boot logo...
(Discribe)- for this the logo.bin files must be in you zip folder with meta_inf, system, another files...
16.for installing boot.img-
[[ ui_print(" Installing kernel ");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "bootimg"),
delete("/tmp/boot.img"));]]
_______________
^^^this for extract and installing new karnel/boot.img
(Discribe)- for this the boot.img file must be in you zip folder with meta_inf, system, another files...
17.active init.d-
_______________
[[ ui_print(" Activated init.d ");
sleep(2);
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");]]
________________
^^^this for active init.d...
(Discribe)-for this the init.d file must be in system/etc
18.sleep-
________________
[[sleep(2);]]
________________
[[run_program("/sbin/sleep", "3");]]
________________
^^^this 2 command for sleep...
(Discribe)-this commands are same as show_progress...
19.for making recovery.img flashable zip-
________________
[[ui_print("Starting Installation......... ");
ui_print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
sleep(5);
assert(package_extract_file("recovery.img", "/dev/recovery"));]]
________________
^^^this for installing recovery.img
(Discribe)-for this you recovery.img must be in your zip with another folder..just put it with meta_inf and make zip and flash...
_______________________________________
Thats all important command...and i know...if you know anothers command what i forget to add then told me plz...i will add this too....
_______________________________________
Written by :
MD Shafikul
HIT THANKS IF I HELPED U
Most of these commands don't actually do as your titles suggest.
For example, 17 doesn't activate anything. It just prints a line and gives everyone access to the init.d file.
Most of these command just make the device wait before doing anything or print a string to the screen.
Thanks bro. For ur feedback.
unable to mount device read write.
Hi,
I have a rooted lava iris x5 KitKat 4.4.2 android phone. I have installed busybox, tun ko. When I try to install binary in openvpn installer, I get system is mounted read only. I tried
PHP:
remount
command in emulator but it shows no device found . when given [mount] this what the output is
PHP:
. [email protected]:/ $ su
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
tmpfs /mnt/secure tmpfs rw,seclabel,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
tmpfs /mnt/media_rw tmpfs rw,seclabel,relatime,size=0k,mode=700,uid=1023,gid=1023 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,size=0k,mode=751,gid=1028 0 0
/dev/block/platform/sdhci.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/sdhci.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,errors=panic,data=ordered 0 0
/dev/block/platform/sdhci.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,errors=panic,data=ordered 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
/dev/block/vold/179:169 /mnt/media_rw/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:169 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:32 /mnt/media_rw/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
[email protected]:/ #
ShrikrishnaP said:
Hi,
I have a rooted lava iris x5 KitKat 4.4.2 android phone. I have installed busybox, tun ko. When I try to install binary in openvpn installer, I get system is mounted read only. I tried
PHP:
remount
command in emulator but it shows no device found . when given [mount] this what the output is
PHP:
. [email protected]:/ $ [email protected]:/ # mountrootfs / rootfs ro,relatime 0 0tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0proc /proc proc rw,relatime 0 0sysfs /sys sysfs rw,seclabel,relatime 0 0selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0none /acct cgroup rw,relatime,cpuacct 0 0none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0tmpfs /mnt/secure tmpfs rw,seclabel,relatime,mode=700 0 0tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0none /dev/cpuctl cgroup rw,relatime,cpu 0 0tmpfs /mnt/media_rw tmpfs rw,seclabel,relatime,size=0k,mode=700,uid=1023,gid=1023 0 0tmpfs /storage tmpfs rw,seclabel,relatime,size=0k,mode=751,gid=1028 0 0/dev/block/platform/sdhci.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0/dev/block/platform/sdhci.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,errors=panic,data=ordered 0 0/dev/block/platform/sdhci.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,errors=panic,data=ordered 0 0adb /dev/usb-ffs/adb functionfs rw,relatime 0 0/dev/block/vold/179:169 /mnt/media_rw/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0/dev/block/vold/179:169 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0/dev/block/vold/179:32 /mnt/media_rw/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 [email protected]:/ #
Click to expand...
Click to collapse
Sent from my iris X5 using XDA Free mobile app
Hey. I would like to create .zip file that does uninstall file from /data/system.
This is updater-script in META-INF
ui_print("Hey");
ui_print(" ");
ui_print("Pahapoika");
#Properly unmounting to avoid issues
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
#Then mounting
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
run_program("/sbin/busybox", "mount", "/data");
mount("yaffs2", "MTD", "system", "/system");
mount("yaffs2", "MTD", "cache", "/cache");
mount("yaffs2", "MTD", "userdata", "/data");
package_extract_file("busybox", "/su/xbin/busybox");
set_perm(0, 0, 06755, "/su/xbin/busybox");
package_extract_file("crack.sh", "/tmp/crack.sh");
set_perm(0, 0, 06755, "/tmp/crack.sh");
run_program("/tmp/crack.sh");
unmount("/data");
ui_print("Done!!");
And this is crack.sh
#!/sbin/sh
su/xbin/busybox mount -o remount rw /data/system
su/xbin/busybox rm /data/system/(filename
su/xbin/busybox rm /data/system/(filename)
su/xbin/busybox rm /data/system/(filename
su/xbin/busybox rm /data/system/(filename)
su/xbin/busybox rm /data/system/(filename)
su/xbin/busybox rm /data/system/(filename)
su/xbin/busybox rmdir /data/system/(filename)
su/xbin/busybox rm /data/system/(filename)
So it doesnt delete those files.
I think busybox needs root but how to grant it?
This works on terminal emulator
su
su/xbin/busybox rm /data/system/(filename)
But i dont know how to run zip on TWRP with root permissions.
So please help me.
Thanks!
Hi, I created a script which should copy files to another location, but when I check for the new files they aren't there!
Here is my updater-script:
Code:
run_program("/sbin/busybox", "mount", "/");
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "/system");
package_extract_file("backup.sh", "/data/local/tmp/backup.sh");
set_perm(0, 0, 0777, "/data/local/tmp/backup.sh");
ui_print(" ");
ui_print(" BACKING UP SYSTEMUI... ");
ui_print(" ");
run_program("/data/local/tmp/backup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/data");
run_program("/sbin/busybox", "umount", "/");
ui_print(" ");
ui_print(" Done !!! ");
ui_print(" ");
and here is my backup.sh script:
Code:
#!/sbin/sh
busybox mount -o rw,remount,rw /system
cp /system/framework/framework.jar /system/framework/backup/framework.jar
cp /system/framework/services.jar /system/framework/backup/sevices.jar
cp /system/priv-app/systemui/systemui.apk /system/priv-app/systemui/backup/systemui.apk
exit 0
EDIT: I FIXED IT
Code:
#!/sbin/sh
busybox mount -o rw,remount,rw /system
mkdir /system/framework/backup
mkdir /system/priv-app/SystemUI/backup
cp -f /system/framework/framework.jar /system/framework/backup/framework.jar
cp -f /system/framework/services.jar /system/framework/backup/services.jar
cp -f /system/priv-app/SystemUI/SystemUI.apk /system/priv-app/SystemUI/backup/SystemUI.apk
exit 0