Hello,
I've tried many ways to resolve my problem but still no luck, so i decide ask here.
I've created simple updater-scrpt to mount and unmount folder, first command is:
Code:
ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
Then end command is:
Code:
ui_print("Unmounting system...");
run_program("/sbin/busybox", "umount", "/system");
But after i install that script, at the end it does not unmount system, whats wrong with my script?
x-zin-x said:
Hello, I've tried many ways to resolve my problem but still no luck, so i decide ask here...
Click to expand...
Click to collapse
Your best bet is to post this question within one of the following threads that are guides for the Updater-script.
https://forum.xda-developers.com/showthread.php?t=2377695
https://forum.xda-developers.com/showthread.php?t=1931585
https://forum.xda-developers.com/showthread.php?t=3173316
Good Luck!
~~~~~~~~~~~~~~~
I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.
PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
Related
Hoping someone with some scripting experience on the Nexus S can look at this and answer my question. Moving to the Nexus S 4G from the Epic. If I wanted to install apps to /data or copy files to /sdcard during flash the lines below would accomplish this. However, on the Nexus S, it doesn't seem to work. I HAVE searched but can't find the answer. I have noticed that no one seems to incorporate this in any of the updater-scripts I have seen here. I realize the Nexus is different than the Epic by it's very nature but I'm still wondering if this is possible and if so, how? Thanks in advance for your time.
package_extract_dir("data", "/data");
package_extract_dir("sdcard", "/sdcard");
set_perm (1000, 1000, 0771, "/data/app");
Click to expand...
Click to collapse
You need to mount those partitions first
When mounting, use:
data: /dev/block/platform/s3c-sdhci.0/by-name/userdata
Code:
mount("ext3", "EMMC", "/dev/block/platform/s3c-sdhci.0/by-name/userdata", "/data");
sdcard: /dev/block/platform/s3c-sdhci.0/by-name/media
Code:
mount("vfat", "MTD", "/dev/block/platform/s3c-sdhci.0/by-name/media", "/sdcard"); (I think)
dsixda said:
You need to mount those partitions first
When mounting, use:
data: /dev/block/platform/s3c-sdhci.0/by-name/userdata
Code:
mount("ext3", "EMMC", "/dev/block/platform/s3c-sdhci.0/by-name/userdata", "/data");
sdcard: /dev/block/platform/s3c-sdhci.0/by-name/media
Code:
mount("vfat", "MTD", "/dev/block/platform/s3c-sdhci.0/by-name/media", "/sdcard"); (I think)
Click to expand...
Click to collapse
I wanted to take a second and thank you very much. You were right on the money. This is a bit of a change from the Epic for me. I appreciate you taking the time to help me out.
Medic Great to see you over here enjoy your NS4G, your really going to dig this phone.
Hey guys, I am wanting to use a 2.3.6 stock rom with my Cwm but i need to first convert the filesystem from rfs to ext4. How do i do that? Thanks
Sent from my GT-S5670 using XDA App
I am actually wanting the same thing...
Same here, anyone care to share how it can be made ?
not very hard ,just extract initramfs.cpio from the zImage ,add this line
CONFIG_EXT4_FS=y in filesystems,then change Mount points in init.rc of Ramdisk
and then Format All Dev Blocks e.g. System,Data,Cache to ext4 !!
how to extract zimage..............or how to open zzimage ????? plz help
i followed this guide http://forum.xda-developers.com/showthread.php?t=777380
I did from step 4 to 11 smoothly
At step 1 i had a file called zImage( no extension but icon is CPIO)
I change zImage to initramfs.cpio and run this command
Code:
cat initramfs.cpio | cpio -i --no-absolute-filenames
Result
Code:
cpio: Removing leading `/' from member names
dev
cpio: dev/console: Cannot mknod: Operation not permitted
dev/console
root
1 block
and 2 folder
In Dev folder have a file with 0 byte
Dont bash me cause i have just started with ubuntu 2 day
And where can i find how to make pre-install rom with ext4 support?
Im on GT s5670 with stock DXKT4
Priyank Patel said:
how to extract zimage..............or how to open zzimage ????? plz help
Click to expand...
Click to collapse
can anyone tell?
Gendows said:
can anyone tell?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=5447589
Download the attacked file and do step 8 whit your boot.img
@pratyush.creed
u need to do something to the zimage in boot.img ? what if i take zimage and the modules from an ext4 rom (of the same base) and put it in the rfs rom? will it work?
I really need to know how to make a pre-install rom with ext4 support.
Anyone
May I answer a question?
U can open your updater-script from META-INF with notepad++
Write like this For converting your system:
Code:
unmount("/system");
unmount("/cache");
unmount("/data");
ui_print("[ ] Formatting system with ext4");
format("ext4", "EMMC", "/dev/block/stl12");
ui_print("[ ] Formatting cache with ext4");
format("ext4", "EMMC", "/dev/block/stl14");
ui_print("[ ] Formatting data with ext4");
format("ext4", "EMMC", "/dev/block/stl13");
*(ui_print) is command for notes. So, U may not care about it
Thx. I hope it can help ya, guyz!
Delanoister said:
May I answer a question?
U can open your updater-script from META-INF with notepad++
Write like this For converting your system:
Code:
unmount("/system");
unmount("/cache");
unmount("/data");
ui_print("[ ] Formatting system with ext4");
format("ext4", "EMMC", "/dev/block/stl12");
ui_print("[ ] Formatting cache with ext4");
format("ext4", "EMMC", "/dev/block/stl14");
ui_print("[ ] Formatting data with ext4");
format("ext4", "EMMC", "/dev/block/stl13");
*(ui_print) is command for notes. So, U may not care about it
Thx. I hope it can help ya, guyz!
Click to expand...
Click to collapse
Ya u need d lines from script n boot.img of an ext4 rom for not editing zimage
Not exactly what i want. I want to learn how to build kernel support ext4 from stock rom.
When search around i see some way to:
+Unpack boot.img
+Add ext4.ko , jdb2.ko to ramdisk and edit init.rc with new mount point.
+Repack boot.img
I flash new boot.img, phone work fine but i dont know if it supports ext4 ^^
And other guide is compile kernel from source is provided by samsung. Oh god with this way i have to learn java, c @#^%!
Maybe i should go to some class
Anyway thank you very much. Have a good day.
First, Make a new folder.
In that you put a META-INF copied from some Theme.
And, Make the folders where you want your apps and tweaks to be placed.
Like you may want some apps to go to /system/app...So, Create a folder called system and inside that create a folder called App and paste the application there.
Now, Changes in updater script.
On an ext4 system, I did this.
Remvoe eevrything in the updater-script. Delete eveything.
Now, add these lines
Code:
run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/stl9", "/system");
mount("ext4", "system", "/system");
Meaning of the code:
This mounts the system, grants root permission.
Now that system is mounted, We should tell CWM to copy the folder and replace the contents. So, Add these lines:
Code:
package_extract_dir("system", "/system");
Now, Replace the name of the folder you wanna replace and make multiple lines in the same format. (replace in package_extract_dir("yourfoldername","/yourfoldername")
For prinitng the process, add
Code:
ui_print("Installing -NAMEOFYOURROM-PATCH...");
Add this above the extract COMMAND.
Now, Put this into a Zip...Using Win-zip.
When you open the zip you should see META-INF and other folders.
Zip it in that manner.
And, Download Auto-Sign from this place.
Re-name the zip to UPDATE and put it in the autozip folder.
Sign it and you are done!
PRESS THE THANKS...GIVES ME ENCOURAGEMENT. PLEASE.
Thanks a lot ..
was waitting for it ...
but what about symlinking ??
asad007 said:
Thanks a lot ..
was waitting for it ...
but what about symlinking ??
Click to expand...
Click to collapse
Just write:
symlink("<target>", "<based-dir>")
Sent from my GT-S5660 using Tapatalk
If i wanna replace some apps in /system/apps, i add the following code?
run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/stl9", "/system");
mount("ext4", "system", "/system");
package_extract_dir("system", "/system");
Click to expand...
Click to collapse
lomash said:
If i wanna replace some apps in /system/apps, i add the following code?
Click to expand...
Click to collapse
package_extractdir - line and line with mount is enough. You donĀ“t need the line above
you mean this?
mount("ext4", "system", "/system");
package_extract_dir("system", "/system");
Click to expand...
Click to collapse
lomash said:
you mean this?
Click to expand...
Click to collapse
exactly
can we get into fast boot, im stuck at not being able to format my /data parition due to a denied permission on packages.xml. i searched everywhere and one person had this problem but it was on a different device and they fixed it by 'fastboot erase userdata'
help?
No. You cannot fastboot. That seems like a Nexus-only sorta thing. Sadly.
If you are lucky, you have SBKv1 and can use nvflash with your device in APX-mode.
Anyway. You should be able to format /data within CWM. If you get permissions issues there, something is terribly wrong.
Try hooking it up to a pc and connecting via adb.
In that case you should be able to get an adb shell and have the option to clean up manully.
josteink said:
No. You cannot fastboot. That seems like a Nexus-only sorta thing. Sadly.
If you are lucky, you have SBKv1 and can use nvflash with your device in APX-mode.
Anyway. You should be able to format /data within CWM. If you get permissions issues there, something is terribly wrong.
Try hooking it up to a pc and connecting via adb.
In that case you should be able to get an adb shell and have the option to clean up manully.
Click to expand...
Click to collapse
i have SBKv2, and i tried adb in recovery. the file gets permission denied when trying to delete it, and i cant SU in adb, which is weird.
i can get it up and running, but everything acts weird even the launcher, i tried doing a tibackup restore of system too, but everything is jacked, things just work weird, home button doesnt work. only back. quick launch widgets are gone. says apps are installed that are not installed.
i tried thinking of creating a edify script that would kill the data partition with busybox, think that might work?
Code:
assert(getprop("ro.product.device") == "tf101" || getprop("ro.build.product") == "tf101");
show_progress(0.500000, 0);
format("MTD", "userdata");
mount("MTD", "userdata", "/data");
delete_recursive("/data/system");
run_program("/sbin/busybox", "rm", "-rf", "/data/*");
run_program("/sbin/busybox", "umount", "/data");
BlueHarford said:
i have SBKv2, and i tried adb in recovery. the file gets permission denied when trying to delete it, and i cant SU in adb, which is weird.
i can get it up and running, but everything acts weird even the launcher, i tried doing a tibackup restore of system too, but everything is jacked, things just work weird, home button doesnt work. only back. quick launch widgets are gone. says apps are installed that are not installed.
i tried thinking of creating a edify script that would kill the data partition with busybox, think that might work?
Code:
assert(getprop("ro.product.device") == "tf101" || getprop("ro.build.product") == "tf101");
show_progress(0.500000, 0);
format("MTD", "userdata");
mount("MTD", "userdata", "/data");
delete_recursive("/data/system");
run_program("/sbin/busybox", "rm", "-rf", "/data/*");
run_program("/sbin/busybox", "umount", "/data");
Click to expand...
Click to collapse
Tried Adb fRom normal not our CWM? If you haven't tried the latter I would recommend trying that first.
Sent from my Galaxy Nexus using Tapatalk
josteink said:
Tried Adb fRom normal not our CWM? If you haven't tried the latter I would recommend trying that first.
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
you mean boot into the rom and use adb in there?
Tegra chipsets work a little different. I'm not the best tool in the drawer when it comes to development but NVFlash is almost just like fastboot. When in NVFlash move, you do similar commands such as "nvflash command"... syntax aside.
Check out some of the "SUPERWIPE" tools, both NVFLASH and CWM methods. You might be able to deconstruct one into formatting just the partition you need.
BlueHarford said:
you mean boot into the rom and use adb in there?
Click to expand...
Click to collapse
I mean boot into recovery and use adb there,
i am trying to custom some gapps, so i can install some apps i want, what mmcblk0 is used to mount data folder so i can install some data/app apps through updater.script
thank u
Bradl79 said:
i am trying to custom some gapps, so i can install some apps i want, what mmcblk0 is used to mount data folder so i can install some data/app apps through updater.script
thank u
Click to expand...
Click to collapse
You need this:
1. Make sure you have the folder data/app in the root of the zip file with included .apk
2. Make a backup
Add this in the updater-script
3. mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/data", "/data");
4. package_extract_dir("data", "/data");
5. set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
6. unmount("/data");
Save the edited updater-script and put it back in the zip and install it ....make a backup before!!!
Make sure you edited the updater-script correctly!
The 3 lines are sorted by number 3-6.
I hope i helped you
Thank u so much