How to add Root, SuperSU and Busybox to ROM? - Samsung Galaxy Nexus

Awsome, Just built my first Rom and works good. BUT... I can't seem to figure out how to add root, superSu, and busybox, add the right permissions, symlinks etc to to the Rom BEFORE Flashing. I know these are the things that are needed, but do not want to use a kitchen such as dsixda's.

jzero88 said:
Awsome, Just built my first Rom and works good. BUT... I can't seem to figure out how to add root, superSu, and busybox, add the right permissions, symlinks etc. I know these are the things that are needed, but do not want to use a kitchen such as dsixda's.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1392310

acloh0411 said:
http://forum.xda-developers.com/showthread.php?t=1392310
Click to expand...
Click to collapse
Thanks, but I am looking to Root, ad superSU and Busybox to the Rom BEFORE flashing.

Old and dead thread
Yet another abandoned, dead thread. Never finished. Anyone have answers? I would like to busybox and add supersu to my rom as well :crying:

You have to pace the files in the right directories in your ROM & then set the correct permissions & install busybox.
Code:
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
set_perm(0, 0, 04755, "/system/xbin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");

Fallon9111 said:
Yet another abandoned, dead thread. Never finished. Anyone have answers? I would like to busybox and add supersu to my rom as well :crying:
Click to expand...
Click to collapse
dont necro bump.
you need to override android build system for PRODUCT_COPY_FILES to work again.
busybox is easy, no need to use binaries here. git clone cyanogenmod's project and build.
sent from my i9250

Where do i get the latest busybox binares?

albinoman887 said:
Where do i get the latest busybox binares?
Click to expand...
Click to collapse
i think your talking about this: http://www.mediafire.com/download/gyd9b6j556vhkv6/busybox-1.17.2.zip

Related

[Q]Stock EC05 Kernel

How could I retrieve the stock kernel for EC05? I want to try the new genocide kernel but would like to have the stock kernel incase I were to run into issues. Thanks for the help!
Sent from my SPH-D700 using XDA Premium App
i have an update zip for the stock kernel ill upload a link to you
klownin816 said:
How could I retrieve the stock kernel for EC05? I want to try the new genocide kernel but would like to have the stock kernel incase I were to run into issues. Thanks for the help!
Sent from my SPH-D700 using XDA Premium App
Click to expand...
Click to collapse
Here's the zip you can flash in cwm to get the stock kernel back
http://www.multiupload.com/A6H83AC2EJ
But just in case you wanted to know how to get it yourself..
Code:
adb shell
su
dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096
exit
that zImage is your kernel, you need to put that in a zip with redbend_ua and your update-script, this is what i use
Code:
assert(getprop("ro.product.device") == "SPH-D700" ||
getprop("ro.build.product") == "SPH-D700");
ui_print("Your screen will flash while updating.");
sleep(2);
ui_print("");
ui_print("Flashing kernel image.");
assert(delete("/sbin/reboot"),
package_extract_file("redbend_ua", "/tmp/redbend_ua"),
package_extract_file("zImage", "/tmp/zImage"));
set_perm(0, 0, 0755, "/tmp/redbend_ua");
assert(run_program("/tmp/redbend_ua", "restore", "/tmp/zImage", "/dev/block/bml7"));
sleep(0.75);
ui_print("");
ui_print("Finished.");
You can open the zip up and look yourself at the files if you want more info..
Hey thank you so much! I needed the file, but I definitely wanted to know how to do this for future reference. You're the man!

[MOD]iPhone-Sounds [v1.1]

Hey guys. I am creating a mod for the i9001. It's called iPhone sounds. I making this mod because I like the iPhone lock sounds, Ringtones, shutter sounds, etc.
This is just my first mod so please dont blame me if you don't like it.
Please don't blame me if you dont like the iPhone sounds.
Download Link 1.1:
http://sourceforge.net/projects/iphonesounds/files/iPhone-Sounds.zip/download
Changelog 1.0.0:
First Version! Only Lock sounds yet.
1.1
Added Camera shutter sounds and Charger Connecter sound.
INSTALLATION:
Download the .zip to your Galaxy s plus.
reboot in CWM/Feamod recovery by holding the power button and the volume up button. Choose install zip from sdcard and choose the .zip
When its done just reboot. Enjoy!
thanks to crybert for creating the update-script
287 downloads
Use this to mount /system:
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
Rest of the script seems ok but I think you should also set permissions using this:
Code:
set_perm_recursive(0, 0, 0755, 0644, "/system/media/audio/ui");
Try this if the update-binary only needs 3 arguments for mounting the partition /dev/block/mmcblk0p15 as EXT4 under system:
Code:
mount("ext4", "/dev/block/mmcblk0p15", "/system");
If the binary needs 4 arguements look one post above.
For unmounting system use this:
Code:
unmount("/system");
Code:
ui_print("iPhone-Sounds by FlorisNL");
show_progress(1.000000, 0);
mount("ext4", "/dev/block/mmcblk0p15", "/system");
set_progress(0.400000);
Please dont blame me if you dont like the iPhone sounds...
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.800000);
unmount("/system");
set_progress(0.900000);
ui_print("Installed Iphone-Sounds. Enjoy.");
set_progress(1.000000);
and 'Please dont blame me if you dont like the iPhone sounds...' has to be inside ui_print
sakindia123 said:
and 'Please dont blame me if you dont like the iPhone sounds...' has to be inside ui_print
Click to expand...
Click to collapse
No, I deleted it..
Sent from my GT-I9001 using XDA App
Nevermind
Neverminddddddd
Good work! It would be nice to see more sounds added
I dont like iphone very much, but is really nice to have more sounds on our GS.
Good work,thanks for sharing
Sent from my GT-I9000 using XDA App
Hello,Is it possible to install in mo0nrom deodex?Thank you
Hi, this mod works on sgs which have 4.0.4 ? Thx
Thanks for sharing! !Support you,i like it
v 1.2???
i heard something about v.1.2. it is that true?
oh,thanks!
faust.deaconu said:
i heard something about v.1.2. it is that true?
Click to expand...
Click to collapse
Yep. I already included it in LionROM. I will upload it in this topic soon. It includes notification sounds, ringtones and tap sounds.
Sent from my GT-I9001 using xda premium
Good day sir! can i flash this over ICS roms of i9003?
Thank You! Cheers
FlorisNL said:
Yep. I already included it in LionROM. I will upload it in this topic soon. It includes notification sounds, ringtones and tap sounds.
Sent from my GT-I9001 using xda premium
Click to expand...
Click to collapse
So when is that going to be?
Sent from my GT-I9001
Can I flash this over I9000 cm9 nightly?
thanks for sharing, but i don't like iPhone at all, SGS3 sounds are better for me. thanks anyway
Sent from my GT-I9000 using XDA
I love Facebook notification sounds, keyboard clicking etc.
Sent from my GT-I9000 using XDA

[Q] Is there a flashable android 2.3.5 stock for my gio?

Hey, i want to downgrade my phone from cm7 to android 2.3.5 and i wondered, is there is a flashable version of the stock rom because that is a lot easier to use than odin imo.
0nemisis0 said:
Hey, i want to downgrade my phone from cm7 to android 2.3.5 and i wondered, is there is a flashable version of the stock rom because that is a lot easier to use than odin imo.
Click to expand...
Click to collapse
I think it's kind of an dead end for us non developers to convert from EXT4 to RFS (The filesystem stock uses). Guide on how to do it with odin can be found here. Note that u can use Enhanced236. It's based on stock 2.3.6 and uses EXT4 as internal filesystem, the same as CM. Alot of people think it's the most bugfree ROM for GIO. Here is the link to the thread where u can download a flashable .zip based on AROMA Installer :laugh:
Regards
X-Zone
RFS , not RTF
formula01 said:
RFS , not RTF
Click to expand...
Click to collapse
Oh yeah typo. :laugh:
BTW: Use quotes, makes everything much easier.
X-zone said:
I think it's kind of an dead end for us non developers to convert from EXT4 to RFS (The filesystem stock uses). Guide on how to do it with odin can be found here. Note that u can use Enhanced236. It's based on stock 2.3.6 and uses EXT4 as internal filesystem, the same as CM. Alot of people think it's the most bugfree ROM for GIO. Here is the link to the thread where u can download a flashable .zip based on AROMA Installer :laugh:
Regards
X-Zone
Click to expand...
Click to collapse
But can use stock kernel in zip package. Clean 2.3.6 RFS zip package is a good idea but idk how to properly edit update-script file.
WYPIERDAALAAC said:
But can use stock kernel in zip package. Clean 2.3.6 RFS zip package is a good idea but idk how to properly edit update-script file.
Click to expand...
Click to collapse
why do need to edit the script file? if you really want to reflash your phone back to the original use odin and follow this GUIDE but if whant a flashable stock rom download this STOCK ROM this is a 2.3.6 gio stock made by Peteragent5
badagila said:
why do need to edit the script file? if you really want to reflash your phone back to the original use odin and follow this GUIDE but if whant a flashable stock rom download this STOCK ROM this is a 2.3.6 gio stock made by Peteragent5
Click to expand...
Click to collapse
For no format and i do not want i just wrote about good idea. Peteragent5 ROM has custom kernel so its not the same as clean firmware from samsung.
WYPIERDAALAAC said:
For no format and i do not want i just wrote about good idea. Peteragent5 ROM has custom kernel so its not the same as clean firmware from samsung.
Click to expand...
Click to collapse
ahhh you are trying to build your own flashable rom and rdit your own script?
badagila said:
ahhh you are trying to build your own flashable rom and rdit your own script?
Click to expand...
Click to collapse
Not really, I am just a user, time ago I tried to edit script because there are lines for format ext4 and idk how to change it for good working.
now i do not care.
WYPIERDAALAAC said:
Not really, I am just a user, time ago I tried to edit script because there are lines for format ext4 and idk how to change it for good working.
now i do not care.
Click to expand...
Click to collapse
i am not sure but i think all flashable firmwares are using custom kernel
badagila said:
i am not sure but i think all flashable firmwares are using custom kernel
Click to expand...
Click to collapse
and i do not know why, in md5 is boot.img file like in zip package for extract so can use samsung kernel.
WYPIERDAALAAC said:
and i do not know why, in md5 is boot.img file like in zip package for extract so can use samsung kernel.
Click to expand...
Click to collapse
in custom rom and all other flashable rom's kernel is always in boot.img file
badagila said:
in custom rom and all other flashable rom's kernel is always in boot.img file
Click to expand...
Click to collapse
exactly i talk about it man so i think can use it instead phiexz stock kernel.
WYPIERDAALAAC said:
exactly i talk about it man so i think can use it instead phiexz stock kernel.
Click to expand...
Click to collapse
not so sure dude i already try to change the boot.img after cooking but it is still installation aborted but i keep on trying to create a successful flashable rom and if it be done i will create one for you
It's for updater-script for RFS but how to edit updater-script from custom rom based on 2.3.6 (how to replace ext4 commands correctly)?
Code:
unmount("/system");
unmount("/data");
unmount("/cache");
ui_print("- please wait...");
package_extract_dir("tools", "/tmp");
set_perm(0, 0, 0755, "/tmp/rfs.sh");
set_perm(0, 0, 0755, "/tmp/fat.format");
run_program("/tmp/rfs.sh");
ui_print("- done!");
ui_print("- mounting all partitions");
run_program("/sbin/busybox mount", "-t", "rfs", "/dev/block/stl9", "/system");
run_program("/sbin/busybox mount", "-t", "rfs", "/dev/block/stl11", "/data");
run_program("/sbin/busybox mount", "-t", "rfs", "/dev/block/stl10", "/cache");
run_program("/sbin/busybox mount", "-a");
run_program("mount", "-t", "rfs", "/dev/block/stl9", "/system");
run_program("mount", "-t", "rfs", "/dev/block/stl11", "/data");
run_program("mount", "-t", "rfs", "/dev/block/stl10", "/cache");
0nemisis0 said:
Hey, i want to downgrade my phone from cm7 to android 2.3.5 and i wondered, is there is a flashable version of the stock rom because that is a lot easier to use than odin imo.
Click to expand...
Click to collapse
if you really want the original from samsung try this link, it odin flash able md5 file so you will need to know how to flash with odin
Original Stock Rom Samsung Galaxy Gio all Country

F2FS Thread. Ask your questions here

Since there is no F2FS support thread, I'll try to help here as much as my knowledge goes (or not).
Thread was opened because our dear friend @bsmitty83 and @aosp managed to do a tremendous non.human work and made possible F2FS tor our beloved GNEX.
Here you'll post some questions and everybody will try to help.
For Windows users, here is the ADB/Fastboot pack:
http://forum.xda-developers.com/showthread.php?t=2588979
Thread under heavy construction
(I'll keep on editing when I arrive home)
First of all, thank you for your availability.
What do you think about grouping the links for kernel and recovery that support f2fs?
I know that many roms will appear, but recovery and kernel are the basis.
Once again, thank you.
Sent from my Galaxy Nexus using XDA Free mobile app
Someone should link and teach the step for f2fs support so normal user can try to create it by themselves :good:
Atento said:
First of all, thank you for your availability.
What do you think about grouping the links for kernel and recovery that support f2fs?
I know that many roms will appear, but recovery and kernel are the basis.
Once again, thank you.
Sent from my Galaxy Nexus using XDA Free mobile app
Click to expand...
Click to collapse
That's a good start. Will start on that base Thank YOU.
xzilem said:
Someone should link and teach the step for f2fs support so normal user can try to create it by themselves :good:
Click to expand...
Click to collapse
What do you mean by "teach the step for f2fs support". If you mean to compile a kernel, there are plenty of where to start on XDA.
If you refer on "how to install the testing F2FS kernel by @bsmitty83 and @aosp", I'll do that over this thread. Just wait for it
Anyone converted their 2012 nexus 7 to f2fs?
[poo]
jhonnyx said:
That's a good start. Will start on that base Thank YOU.
What do you mean by "teach the step for f2fs support". If you mean to compile a kernel, there are plenty of where to start on XDA.
If you refer on "how to install the testing F2FS kernel by @bsmitty83 and @aosp", I'll do that over this thread. Just wait for it
Click to expand...
Click to collapse
I mean teach the step to convert other roms to f2fs. I think there's no need to compile a new one just like f2fs for grouper.
xzilem said:
I mean teach the step to convert other roms to f2fs. I think there's no need to compile a new one just like f2fs for grouper.
Click to expand...
Click to collapse
im pretty sure its something in the updater-script within the rom,you just have to change it from mounti ext4 to mounting to f2fs,someone in the dirtyv thread compared the commotio script and a slimkat one and made a slimkat f2fs,plus you have to use the kernel from the alpha commotio rom as well
pattyboi:) said:
im pretty sure its something in the updater-script within the rom,you just have to change it from mounti ext4 to mounting to f2fs,someone in the dirtyv thread compared the commotio script and a slimkat one and made a slimkat f2fs,plus you have to use the kernel from the alpha commotio rom as well
Click to expand...
Click to collapse
I'll be pumped when someone writes a guide on this. Once I can make PAC f2fs I'll be a happy camper.
Convert to F2FS Steps
@Hetalk and @Punkiderma
Can you guys tell us the steps to convert any rom to F2FS?
xzilem said:
@Hetalk and @Punkiderma
Can you guys tell us the steps to convert any rom to F2FS?
Click to expand...
Click to collapse
Just woke up. I'll try to put up something later today.
Sent from my Galaxy Nexus using XDA Premium 4 mobile app
Hetalk said:
Just woke up. I'll try to put up something later today.
Sent from my Galaxy Nexus using XDA Premium 4 mobile app
Click to expand...
Click to collapse
xzilem said:
@Hetalk and @Punkiderma
Can you guys tell us the steps to convert any rom to F2FS?
Click to expand...
Click to collapse
Same for me, I'll try to write something as soon as I can
Inviato dal mio Galaxy Nexus utilizzando Tapatalk
How I changed paranoid (pa_maguro-4.4-BETA1-20140603) a f2fs compatible ROM.
1) Download latest dirty f2fs compatible kernel zip file. Extract the file "boot.img" to a temporary location
2) Download ROM zip file.
3) Open ROM zip file using 7-zip. Delete "boot.img" and replace with "boot.img" from the dirty kernel (saved in step#1)
4) Open ROM zip and browse to "\META-INF\com\google\android\". Extract "updater-script" to a temporary folder.
5) Open "updater-script" in a text editor. I use notepad++.
6) Replace string
"mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/system");"
by
"run_program("/sbin/busybox", "mount", "/system");"
Again, replace string
"format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "0", "/system");"
by
"run_program("/sbin/mkfs.f2fs", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system");"
7) If you need to mount data partition add string
"run_program("/sbin/busybox", "mount", "/data");"
after strings
"run_program("/sbin/mkfs.f2fs", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system");"
"run_program("/sbin/busybox", "mount", "/system");"
8) Add string
"symlink("../bin/fsck.f2fs", "/system/bin/dump.f2fs");"
after
"package_extract_dir("system", "/system");"
also add string
"symlink("mount.exfat", "/system/bin/fsck.exfat",
"/system/bin/mkfs.exfat");"
after
"symlink("mksh", "/system/bin/sh");"
9) If you loaded data partition in step 7 you'll need to unmount it at the end by adding string
"unmount("/data");"
10) Replace original updater script the edited one in the ROM zip.
11) Done.
12) Seriously. It's done. Go test it out.
Basically, all(hopefully) this does is, it make sure that ROM's updater script formats/mounts partitions are f2fs, rather than ext4.
Again, I'm not a developer and have just a little working knowledge of what these commands might do. Use this at your own risk.
I've attached original and updated scripts that I've used. You can use compare (ctrlD) feature in notepad++ and see difference between them.
Hope this helps. All the best. :good:
To all the developers and smart people out here, please feel free to suggest changes, or let me know when there's a more comprehensive guide out there, so I can remove this and link to the improved post.
P.S. This might look complicated, but just takes about 5 minutes, not including download time.
Hetalk said:
How I changed paranoid (pa_maguro-4.4-BETA1-20140603) a f2fs compatible ROM.
Again, I'm not a developer and have just a little working knowledge of what these commands might do. Use this at your own risk.
I've attached original and updated scripts that I've used. You can use compare (ctrlD) feature in notepad++ and see difference between them.
Hope this helps. All the best. :good:
To all the developers and smart people out here, please feel free to suggest changes, or let me know when there's a more comprehensive guide out there, so I can remove this and link to the improved post.
P.S. This might look complicated, but just takes about 5 minutes, not including download time.
Click to expand...
Click to collapse
Nicely done, i will try it thanks :good:
Add some of this step to the thread maybe? F2FS Convertion by @burstlam
Hetalk said:
Basically, all(hopefully) this does is, it make sure that ROM's updater script formats/mounts partitions are f2fs, rather than ext4.
Click to expand...
Click to collapse
I did exactly the same, however for slim there was no need to add some lines.
Simply, from what I saw, replace every line that has mount or format ext4 with the appropriate line for F2FS:
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/ANYPARTITION");​
get replaced by
run_program("/sbin/busybox", "mount", "/ANYPARTITION");​
and
format("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "0", "/ANYPARTITION");​
get replaced by
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/omap/omap_hsmmc.0/by-name/ANYPARTITION");​
obviously:
1.change ANYPARTITION following the partition wrote in your updater script
2. REPLACE ONLY WHAT IS NECESSARY: I think you should not add MORE format partition lines than the one present before. Just replace what you have. If you followed the steps explained by AOSP inside the DIrtyV thread, you should have already all the partition F2FS formatted.​
A useful thing to do if you have doubts (is what I've done) is to search if the rom you want to convert already has a F2FS version on another device and compare the scripts (without caring about lines that are different because of the different device). For example, I compared Grouper's F2FS slimkat to maguro one, and thanks to this I've understood that mount/format partitions thing.
^^ Lot better.
I'm guessing it wouldn't be too hard if we modified this to work with our phones: http://forum.xda-developers.com/showthread.php?t=2731666
[poo]
poo706 said:
I'm guessing it wouldn't be too hard if we modified this to work with our phones: http://forum.xda-developers.com/showthread.php?t=2731666
[poo]
Click to expand...
Click to collapse
I downloaded looked at the scripts and when I get a chance I'll try to do it for our device. Maybe this weekend.
There is like only 4 lines that need to be changed in omni updater-script. Am i right?
hi guys...one question, is cm11 rom Compatible with F2FS?!! if not how do it myself?
massoudsh said:
hi guys...one question, is cm11 rom Compatible with F2FS?!! if not how do it myself?
Click to expand...
Click to collapse
Read about 5 posts back. Punkiderma and I have outlines steps for paranoid. You can follow them for cm11 as well. Post your results here.

r4 - Custom ROM starter template - Honor 5X KIW-L21 B330

As well as my own MoDaCo Custom ROM for the 5X, I've created a custom ROM starter template for anyone who wants to have a go. It's a bit different.
Basically, this ROM template will let you create your own custom ROM VERY easily. Easier than ever before. All you have to do is...
download my ROM template zip
make the changes to the system of your phone just as you'd like them for your custom ROM
run some commands on your device via ADB
add the 2 resulting files to the template zip
That's it! No messaging around with install scripts, no rebuilding anything complex, just mod - and go!
Preparation
ONLY if you are completing the process for the first time, you need to set up a file on your microSD card - so launch and ADB shell and type the following commands...
Code:
touch /sdcard/exclude
echo app > /sdcard/exclude
echo priv-app >> /sdcard/exclude
echo delapp >> /sdcard/exclude
ROM build
Once you have your system up and running how you want it, and you're ready to distribute it (just the system and cust dirs mind, it won't pull the data dir, so your personal data is safe), reboot to recovery, launch an ADB shell and type the following commands:
Code:
mount /system
tar -X /sdcard/exclude -zcvpf /sdcard/system.therest.tar.gz /system/
tar -zcvpf /sdcard/system.apps.tar.gz /system/app /system/priv-app /system/delapp
mount /cust
tar -zcvpf /sdcard/cust.tar.gz /cust
You'll then end up with 3 new files on your SD card - system.apps.tar.gz (which is apps and priv-apps from system), system.therest.tar.gz (which, as the name suggests, is the rest of the system partition!) and cust.tar.gz with is the cust partition contents.
Update the template zip with these 3 files and that's it. It's ready to distribute for people to flash via TWRP! If you have updated the boot image, you'll need to replace that too, the easiest way is to do a TWRP backup then pull that file from the SD card and drop it into the template zip as boot.img. That's really it!
I hope this inspires a few people to start playing around with custom ROMs for the 5X... more cool things coming soon!
Oh and the all important template file...
DOWNLOAD - customromtemplate-5x-plk21-b330-r4.zip [ROMRAID] MD5: 524ef13ab773859245c2488ab8271bc0
P
Changelog
r4:
Updated to B330
r3:
Updated to format partitions rather than delete
r2:
Updated to include /cust partition support
r1:
Initial release
Thank you for this your work is much appreciated
Thnx a lot...
Sent from my KIW-L21 using Tapatalk
Thankyou, can I use this script for L-22? And will your MoDaCo rom will work with L-22?
I don't think this one will in its entirety, but you can make your own template by pulling the boot image from the TWRP backup and using the commands above to create the files to put in the zip.
P
Sent from my SM-G928F using Tapatalk
paulobrien said:
I don't think this one will in its entirety, but you can make your own template by pulling the boot image from the TWRP backup and using the commands above to create the files to put in the zip.
P
Sent from my SM-G928F using Tapatalk
Click to expand...
Click to collapse
Oh, I see. I will try after my exams. And MoDaCo rom will support all versions or only L-21?
praxant said:
Oh, I see. I will try after my exams. And MoDaCo rom will support all versions or only L-21?
Click to expand...
Click to collapse
L21 is the only model I can test on currently.
P
Sent from my SM-G928F using Tapatalk
Looking forward to rooting and trying your ROM MoDaCo thanks for your efforts
Sent from my KIW-L21 using Tapatalk
paulobrien said:
L21 is the only model I can test on currently.
P
Sent from my SM-G928F using Tapatalk
Click to expand...
Click to collapse
I tested it on my L24-B140 and it worked just fine. Thanks for sharing
I think it's going to be worth integrating /cust into this too, as they are a lot of things pulled from there (such as the build.prop changes). It'll be simple enough though.
re: non KIW-L21 devices, creating a template for other models shouldn't be any issue at all. I'm getting a US spec Honor 5X, so that'll be helpful.
P
paulobrien said:
I think it's going to be worth integrating /cust into this too, as they are a lot of things pulled from there (such as the build.prop changes). It'll be simple enough though.
re: non KIW-L21 devices, creating a template for other models shouldn't be any issue at all. I'm getting a US spec Honor 5X, so that'll be helpful.
P
Click to expand...
Click to collapse
Are you referring to the cust/hw/USA/prop/local.prop
the rest of the stuff in cust seems pretty standard like (media/bootanimation.zip)
Might as well make all of /cust changeable.
P
paulobrien said:
Might as well make all of /cust changeable.
P
Click to expand...
Click to collapse
so just add tar -zcvpf /sdcard/system.apps.tar.gz /system/app /system/priv-app /cust
or does it need it's own line and an updater-script edit to include it
That should probably work. updater-script will need to include mounting /cust too.
P
paulobrien said:
That should probably work. updater-script will need to include mounting /cust too.
P
Click to expand...
Click to collapse
yeah that worked as expected, only question is their any user info stored in /cust that we might not want to share ?
I didn't check every file in their
No, /cust is read only.
P
Sent from my SM-G928F using Tapatalk
paulobrien said:
No, /cust is read only.
P
Sent from my SM-G928F using Tapatalk
Click to expand...
Click to collapse
So just to be sure, if I want to remove facebook and twitter from /cust/preinstalled/public
I would need to add --> run_program("/sbin/busybox", "rm", "-rf", "/cust/*");
to erase the /cust folder first ? the same way /system is erased / formated
Exactly.
P
paulobrien said:
Exactly.
P
Click to expand...
Click to collapse
Alright, here's my updater-script with all the changes
Code:
ui_print("Flashing boot...");
package_extract_file("boot.img", "/tmp/boot.img");
write_raw_image("/tmp/boot.img", "/dev/block/bootdevice/by-name/boot");
delete("/tmp/boot.img");
ui_print("Mounting system...");
mount("ext4","EMMC","/dev/block/bootdevice/by-name/system", "/system");
mount("ext4","EMMC","/dev/block/bootdevice/by-name/cust", "/cust");
ui_print("Erasing system...");
run_program("/sbin/busybox", "rm", "-rf", "/system/*");
run_program("/sbin/busybox", "rm", "-rf", "/cust/*");
ui_print("Extract Apps...");
package_extract_file("system.apps.tar.gz", "/tmp/system.apps.tar.gz");
run_program("/sbin/busybox", "tar", "zxvf", "/tmp/system.apps.tar.gz", "-C", "/");
delete("/tmp/system.apps.tar.gz");
ui_print("Extract System Files...");
package_extract_file("system.therest.tar.gz", "/tmp/system.therest.tar.gz");
run_program("/sbin/busybox", "tar", "zxvf", "/tmp/system.therest.tar.gz", "-C", "/");
delete("/tmp/system.therest.tar.gz");
sync();
unmount("/system");
unmount("/cust");
ui_print("Done Enjoy !!");
set_progress(1.000000);
For completeness here's the boot.img for the KIW-L24 B140 for any USA users who want to join in
https://www.androidfilehost.com/?fid=24438995911973056

Categories

Resources