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.
Related
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,
For the purpose of dualbooting between Ubuntu and Android on a sbkv2 device, I was wondering if it would be safe to overwrite the kernel partition (/dev/mmcblk0p4, apparently?) while booted into either Android or Ubuntu, skipping cwm entirely. This would probably be followed by an immediate reboot in any case.
From dissecting an update.zip it seems like mmcblk0p4 is where the kernel is written to. I'm just not totally sure that the partition numbers don't change for some reason (?) between cwm and android. Is it the right partition? Has anyone tried this?
It's possible to do and not too hard, boot into android. (Cwm just makes it easier on you.)
Here's the flash update-script from Guevor's kernel:
Code:
show_progress(0.100000, 0);
run_program("/sbin/busybox", "mount", "/system");
show_progress(0.300000, 0);
ui_print("Modules...");
delete_recursive("/system/lib/modules");
package_extract_dir("system", "/system");
show_progress(0.200000, 10);
show_progress(0.100000, 0);
unmount("/system");
ui_print("Kernel..");
package_extract_file("kern.blob", "/tmp/kern.blob");
run_program("/sbin/busybox", "dd", "if=/tmp/kern.blob", "of=/dev/block/mmcblk0p4");
delete("/tmp/kern.blob");
Put the modules somewhere on your Tf, and also the 'blob' file (Preferably somewhere easy like /sdcard/)
So take the modules out of /system/lib and put them in /system/lib/modules (Cut and paste with a root explorer)
Then run the dd command to flash the kernel:
dd if=/where/you/put/the/blob/file/on/yourtf of=/dev/block/mmcblk0p4
Note that the blob has no file extension and doesn't need one.
Worked going from Android to Ubuntu, but not in the other direction. I was still able to get into cwm so whatever. Thanks for the advice.
Mmcblk0p4 is the staging partition. If it still works, I suppose it would be possible, but you would need to know what the partition name is. It should be listed in whatever flash.cfg file you used to reformat for ubuntu. Once you know the name, you can use the blob tools to pack up the boot.img(LNX on stock partition tables) and *maybe* flash via staging.
sent while running with scissors
Oh, I should clarify that I didn't repartition for ubuntu. I'm using a loop mounted filesystem on the internal storage.
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
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