How do you change Superuser to SuperSU in the update.zip for rooting the Xperia J??
Since i found out that SuperSU > Superuser I've been trying to replace the app in the updater-script so that when i root my phone by flashing through cwm the superuser app is SuperSU instead of Superuser.
Simply changing the app in /system/app from Superuser to SuperSU and changing the updater-script
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
to
set_perm(0, 0, 0644, "/system/app/SuperSU.apk");
would result in an error.
Related
I was wondering how to use the init.d folder to run scripts during boot.
I have
# enable init.d support
service run_parts /system/xbin/run-parts /system/etc/init.d
oneshot
In my init.rc file but I do not have the init.d folder in /system/ect/
I have been trying to figure this out for about three days now. It might not even be possible but im sure someone knows better than me. Any help would be greatly appreciated!
Sent from my SCH-I500 using Tapatalk
You have to create the folder /init.d in /system/etc/init.d if it is not present.
Then, in updater-script you have to set the correct permissions to the init.d folder,
Updater script:
Code:
set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
e334 said:
You have to create the folder /init.d in /system/etc/init.d if it is not present.
Then, in updater-script you have to set the correct permissions to the init.d folder,
Updater script:
Code:
set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
Click to expand...
Click to collapse
How do I use the updater script and will any script I put into init.d be run at boot or do the scripts have to be named a certain way?
Sent from my SCH-I500 using Tapatalk
Since you are using the busybox run-parts method in init.rc, you have to add the files 00banner 99complete (pull from another working rom). Any other script you add has to start with a number greater than 00 and smaller than 99. For example: 04modules
The scripts execute from the smallest number to the greatest.
You can find the updater-script in the unzipped rom you are modifying, under the directory META-INF/com/google/android/
Do u know of any roms that have the other two files I can grab and ounce I do will I need to modify them any?
Sent from my SCH-I500 using Tapatalk
Most roms, such as cyanogenmod 6 series, should have them.
Thank you very much! I will give it a try
Sent from my SCH-I500 using Tapatalk
Thanks e334 that worked perfectly! You don't know how much I appreciate the help. Thanks again.
Sent from my SCH-I500 using Tapatalk
csanmba said:
How do I use the updater script and will any script I put into init.d be run at boot or do the scripts have to be named a certain way?
Sent from my SCH-I500 using Tapatalk
Click to expand...
Click to collapse
For init.rc
# Execute files in /etc/init.d before booting
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
class late_start
user root
group root
I've been looking around, and I can't really find anything on how to do this on a Transformer TF101(C10). Most of what I've read either uses outdated commands in the terminal that don't work anymore, or are just flashing a default recovery using an app. As the one that Gnufabio's recovery installer app flashes is very outdated and barely works, I'd like to flash something more recent, specifically CWM Touch Recovery. I have the recovery.img downloaded, but how would I go about flashing this?
If you really want to flash the recovery.img, use Wolf's method 3 or if you're already rooted, use RecoveryInstaller, flash cwm. Use the cwm to flash Roach's touch version. FYI touch version only read from internal sd.
Also on post 218 in the RecoveryInstaller thread is a modify version that flash Rouge XM recovery.
Here is the link of Rogue in case you need it.
http://forum.xda-developers.com/showthread.php?t=1446019&page=18
For learning purposes, if you still want to go about flashing manually, take a look at the update script (used from extracted RougeXM recovery) that CWM reads and uses to flash recovery.zips.
Code:
ui_print("[AnyKernel Updater by Koush]");
ui_print("Rogue XM Recovery 1.3.0 (CWM-based Recovery v5.0.2.7)");
ui_print("Built for the Asus Transformer TF101");
set_progress(1.000000);
ui_print(" ");
ui_print("Extracting dd...");
package_extract_dir("recovery", "/tmp");
set_perm(0, 0, 0777, "/tmp/dd");
ui_print(" ");
ui_print("Extracting new recovery blob...");
package_extract_file("recoveryblob", "/tmp/recoveryblob");
ui_print(" ");
ui_print("Flashing new recovery blob...");
run_program("/sbin/busybox", "dd", "if=/tmp/recoveryblob", "of=/dev/block/mmcblk0p4");
ui_print(" ");
ui_print("Cleaning up...");
delete("/tmp/recoveryblob");
If you look you see the commands:
dd if=/your/blob/here of=/dev/block/mmcblk0p4
So place the extracted recoveryblob on your tf, boot it up and using an onboard terminal app or adb shell run these commands (needs root and busybox):
adb shell (only if running off computer with adb)
su (gives a pound sign, approve root access when it asks you.)
dd if=/your/blob/here of=/dev/block/mmcblk0p4 (your/blob/here is the path on the storage of the recoveryblob you placed on the tf)
reboot.
You should get the asus logo with a blue line that fills up, then it reboots again, and you have new recovery!
EDIT: also, you want the recoveryblob file extracted from touch recovery's zip. it just says recoveryblob with no extension. Download, extract, extract, put on tf, run commands. Easy
Thing O Doom said:
For learning purposes, if you still want to go about flashing manually, take a look at the update script (used from extracted RougeXM recovery) that CWM reads and uses to flash recovery.zips.
Code:
ui_print("[AnyKernel Updater by Koush]");
ui_print("Rogue XM Recovery 1.3.0 (CWM-based Recovery v5.0.2.7)");
ui_print("Built for the Asus Transformer TF101");
set_progress(1.000000);
ui_print(" ");
ui_print("Extracting dd...");
package_extract_dir("recovery", "/tmp");
set_perm(0, 0, 0777, "/tmp/dd");
ui_print(" ");
ui_print("Extracting new recovery blob...");
package_extract_file("recoveryblob", "/tmp/recoveryblob");
ui_print(" ");
ui_print("Flashing new recovery blob...");
run_program("/sbin/busybox", "dd", "if=/tmp/recoveryblob", "of=/dev/block/mmcblk0p4");
ui_print(" ");
ui_print("Cleaning up...");
delete("/tmp/recoveryblob");
If you look you see the commands:
dd if=/your/blob/here of=/dev/block/mmcblk0p4
So place the extracted recoveryblob on your tf, boot it up and using an onboard terminal app or adb shell run these commands (needs root and busybox):
adb shell (only if running off computer with adb)
su (gives a pound sign, approve root access when it asks you.)
dd if=/your/blob/here of=/dev/block/mmcblk0p4 (your/blob/here is the path on the storage of the recoveryblob you placed on the tf)
reboot.
You should get the asus logo with a blue line that fills up, then it reboots again, and you have new recovery!
EDIT: also, you want the recoveryblob file extracted from touch recovery's zip. it just says recoveryblob with no extension. Download, extract, extract, put on tf, run commands. Easy
Click to expand...
Click to collapse
This is probably the most helpful response I've ever gotten. Problem is though, that the touch recovery doesn't come in a zip. It's just a .img file. Is that the blob, just rename that to recoveryblob?
alunral said:
This is probably the most helpful response I've ever gotten. Problem is though, that the touch recovery doesn't come in a zip. It's just a .img file. Is that the blob, just rename that to recoveryblob?
Click to expand...
Click to collapse
Have you looked at Roach's thread?
http://forum.xda-developers.com/showthread.php?t=1213723
and now the new Team Rouge Touch
http://forum.xda-developers.com/showthread.php?t=1446019
both have CWM flashable zip.
Yeah, look in those linked threads for a CWM flashable zip to use, and either flash that or use the method I wrote above to extract and flash. I highly recommend RougeXM touch (second link)
Thanks!
Thing O Doom said:
For learning purposes, if you still want to go about flashing manually, take a look at the update script (used from extracted RougeXM recovery) that CWM reads and uses to flash recovery.zips.
If you look you see the commands:
dd if=/your/blob/here of=/dev/block/mmcblk0p4
So place the extracted recoveryblob on your tf, boot it up and using an onboard terminal app or adb shell run these commands (needs root and busybox):
adb shell (only if running off computer with adb)
su (gives a pound sign, approve root access when it asks you.)
dd if=/your/blob/here of=/dev/block/mmcblk0p4 (your/blob/here is the path on the storage of the recoveryblob you placed on the tf)
reboot.
You should get the asus logo with a blue line that fills up, then it reboots again, and you have new recovery!
EDIT: also, you want the recoveryblob file extracted from touch recovery's zip. it just says recoveryblob with no extension. Download, extract, extract, put on tf, run commands. Easy
Click to expand...
Click to collapse
I am going to have to do this..as I have just had to get a B80 version ands it got the Chinese HC rom on.. I have rooted it so now I have to push a recovery to it.
will have a play.. wish me luck..
Edit: Fantastic..worked like a charm.. shifted rogue's CWM 5.0.2.7 in and booted in to like a charm.. using on board terminal commands. now I can drop the US versions of ICS onto it and start having some fun..
Glad to hear, it's good to understand the mystery behind "install zip from..."
Hello everybody
Well, I'm creating a Custom ROM, but when I'm getting in Setting>Security, setting stop immediatly...
I've read that I should wrote in a terminal : su; mount -o rw,remount /system ; cd /vendor/firmware/keymaster; chmod 0644 * ...
But can I fix it with the updater script ? I try : set_perm_recursive(0, 2000, 0644, 0644, "/system/vendor/firmware/keymaster"); but it didn't work... why ? There is other solution ? Thanks
Hi there,
Please read this thread: Aroma, Edify, updater script Question and Answer thread
Also you can review some of the guides started in this forum and ask if you have more about right there:
xda-developers -> Chef Central -> Android
Good luck
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
I'm sorry if this has been asked already but I can't find it anywhere:
I have two su.d scripts that I always was putting in /system/su.d after every rom update. But ever since I switched to SuperSU 2.76 Systemless those scripts don't work. I do use an app from Chainfire called LiveBoot that uses su.d and I noticed ever since I switched to systemless root that su.d is no longer in /system/su.d: it's in /su/su.d.
Here's my edify script for one of the flashable zips:
Code:
ui_print(" Flashing Balanced Kernel Settings ");
ui_print(" ");
show_progress(0.99, 30);
run_program("/sbin/busybox", "mount", "/su");
package_extract_dir("su", "/su");
set_perm(0, 0, 0700, "/su/su.d/ZZZ-Elite-Kernel-Settings");
show_progress(1.0, 1);
unmount("/su");
ui_print("----------------------------------------------");
ui_print("| Done!!! |");
ui_print("----------------------------------------------");
ui_print(" ");
What I've noticed is that after I flash both zips and go to the file manager in TWRP that the files are there in /su/su.d. But after it's done booting and I go look in that folder with a file explorer, they're gone. Any idea why these disappear? It seems I have to flash these on every boot. That's obviously ridiculous. I must be doing something wrong and I figure that it's related to my ignorance about systemless SuperSU.
A permissions thing maybe, this happens with me if I transfer files in TWRP then booting the device. I can`t find them in any file explorer.
It's late though, but for the guidance of other noobs like me. /su/su.d/ can't be flashed in recovery because this isn't available. For system-less roots, binaries/libraries required to start supersu daemon and to manage root permissions, don't reside in /system/bin but in /data/su.img while (at least) two files reside in boot.img i.e. boot.img/ramdisk/init.supersu.rc and boot.img/ramdisk/sbin/.*daemonsu*.sh. When ROM boots, init.supersu.rc mounts /data/su.img on /su directory and calls /sbin/*daemonsu*.sh for initial setup which starts /su/bin/daemonsu and other se-linux related stuff and then executes any scripts found in /su/su.d/ and /system/su.d.
You can find this:
Code:
mido:/ # mount | grep loop
/dev/block/loop0 on /su type ext4 (rw,seclabel,noatime,data=ordered)
So, the init.d scripts placed in /su/su.d actually reside in /data/su.img which isn't mounted in recovery mode and anything flashed to /su/su.d goes to volatile rootfs which is gone on reboot. Either mount su.img in recovery, or place this script while ROM is running or instead flash to /system/su.d which is permanent filesystem unlike rootfs (which lives in RAM). And finally don't forget to set permissions to 0700 as advised here. Another thing, mostly init.d scripts don't work with .sh extension. Avoid this too.