[Android Software/Hacking General [Developers Only]] Deckoz2302:
Im L18's counter part...anyway I rewrote the entire script everything works however I cant figure out how to set permissions in the modsettings.xml file im pretty sure 0, 0 is the wrong uid and switch however I have no idea how to find what they should be

Its at the very end separate but this is the line

set_perm(0, 0, 0777,"/de.robv.android.xposed.mods.appsettings/shared_prefs/ModSettings.xml");

Here is the entire script

ui_print("**************************************");
ui_print(" Trans-Nebula Tab");
ui_print("**************************************");
unmount("/system");
if
file_getprop("/tmp/aroma/wipe.prop","selected.1") == "1"
then
ui_print("Wipe Processes");
ui_print("==========================");
ui_print(" - Formatting Cache and Dalvik...");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/dalvik/dalvik-cache");
ui_print(" - Formatting Data...");
delete_recursive("/system");
package_extract_file("setup/wipe/wipe.sh", "/tmp/wipe.sh");
package_extract_file("setup/wipe/bash", "/tmp/bash");
set_perm(0, 0, 0777, "/tmp/wipe.sh");
set_perm(0, 0, 0777, "/tmp/bash");
run_program("/tmp/wipe.sh");
delete_recursive("/preload");
endif;
if
file_getprop("/tmp/aroma/wipe.prop","selected.1") == "2"
then
ui_print("Wipe Processes");
ui_print("==========================");
ui_print(" - Formatting Cache and Dalvik...");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/dalvik/dalvik-cache");
endif;
package_extract_dir("setup/utils", "/tmp");
set_perm_recursive(0, 0, 0755, 0755, "/tmp");
ui_print(" - Formatting System partition...");
format("ext4", "EMMC", "/dev/block/mmcblk0p13");
run_program("/tmp/mkfs.ext4", "-O", "^ext_attr,^has_journal,^huge_file", "-L", "SYSTEM", "-b", "4096", "-m", "0", "-F", "/dev/block/mmcblk0p13");
run_program("/tmp/tune2fs.ext4", "-c", "1", "-m", "0", "-o", "journal_data_writeback", "/dev/block/mmcblk0p13");
mount("ext4", "EMMC", "/dev/block/mmcblk0p13", "/system");
set_progress(0.1);
mount("ext4", "EMMC", "/dev/block/mmcblk0p12", "/cache");
mount("ext4", "EMMC", "/dev/block/mmcblk0p16", "/data");
delete_recursive("/cache/dalvik-cache");
delete_recursive("/data/dalvik-cache");
ui_print(" ");

set_progress(0.2);
ui_print("Preparing for flash");
ui_print("==========================");
ui_print(" - Cleaning processes...");
delete_recursive("/cache/dalvik-cache");
delete_recursive("/data/dalvik-cache");
delete_recursive("/system");
delete_recursive("/data/anr");
delete_recursive("/data/lost+found");
delete_recursive("/data/app-cache");
delete_recursive("/data/boot-cache");
delete_recursive("/data/tombstones");
delete_recursive("/data/local/tmp");
delete_recursive("/data/wimax/log");
delete_recursive("/data/dontpanic");
delete("/data/anr/traces.txt");
delete_recursive("/data/data/com.android.vending/cache/webviewCache");
delete_recursive("/data/data/com.android.vending/cache");
delete_recursive("/data/com.google.android.apps.maps/cache");
delete("/data/com.google.android.apps.maps/databases/webviewCache.db");
delete_recursive("/data/com.google.android.location/files");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/system/usagestats");
delete_recursive("/data/system/throttle");
delete_recursive("/data/system/dropbox");
delete_recursive("/data/system/appusagestats");
delete_recursive("/data/media/LazyList");
delete_recursive("/data/media/LOST.DIR");
delete_recursive("/data/media/dontpanic");
delete_recursive("/data/anr");
set_progress(0.3);
ui_print(" ");

set_progress(0.4);
ui_print("Installing system");
ui_print("==========================");
ui_print(" - Writing /system");
package_extract_dir("system", "/system");
set_perm(0, 0, 04755, "/system/bin/screenshot");
set_progress(0.5);
ui_print(" - Writing /data");
package_extract_dir("data", "/data");
set_progress(0.6);
ui_print(" - Creating Symlinks...");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
symlink("/system/bin/mksh", "/system/bin/sh");
symlink("/system/fonts/Roboto-Regular.ttf","/system/fonts/DroidSans.ttf");
symlink("/system/fonts/Roboto-Bold.ttf","/system/fonts/DroidSans-Bold.ttf");

ui_print(" - Installing busybox");
ui_print("Setting");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
ui_print("running BusyBox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");

set_progress(0.7);
ui_print(" - Setting permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(1000, 1000, 0755, "/system/bin/sysro");
set_perm(1000, 1000, 0755, "/system/bin/sysrw");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 2000, 0755, "/system/vendor");
set_perm(0, 2000, 0755, "/system/vendor/etc");
set_perm(0, 2000, 0755, "/system/vendor/etc/nxp");
set_perm(0, 2000, 0755, "/system/vendor/etc/nxp/BargeIn");
set_perm(0, 2000, 0755, "/system/vendor/etc/nxp/mVoIP");
set_perm(0, 2000, 0755, "/system/vendor/etc/nxp/mVoIPSec");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/pittpatt");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N/full_model.bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
ui_print(" ");

set_progress(0.8);
ui_print("Installing Selections...");
ui_print("==========================");
package_extract_dir("setup/rehpyc", "/tmp");
set_perm(0, 0, 0755, "/tmp/rehpyc.sh");
set_perm(0, 0, 0755, "/tmp/zip");
ui_print(" * Framework Opacity...");
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.1") == "1"
then
ui_print(" - 100% Trans Nebula Style");
package_extract_dir("setup/transfm/100", "/tmp/framework-res/");
endif;
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.1") == "2"
then
ui_print(" - 75%");
package_extract_dir("setup/transfm/75", "/tmp/framework-res/");
endif;
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.1") == "3"
then
ui_print(" - 50% Fencehopper!");
package_extract_dir("setup/transfm/50", "/tmp/framework-res/");
endif;
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.1") == "4"
then
ui_print(" - 25%");
package_extract_dir("setup/transfm/25", "/tmp/framework-res/");
endif;
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.1") == "5"
then
ui_print(" -0% Stock");
package_extract_dir("setup/transfm/0", "/tmp/framework-res/");
endif;
run_program("/tmp/rehpyc.sh", "build_framework");
delete_recursive("/tmp/framework-res");

ui_print(" * Keyboard Type");
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.2") == "1"
then
ui_print(" - Auto-correct");
package_extract_dir("setup/kb/ac", "/tmp/samsungime/");
endif;
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.2") == "2"
then
ui_print(" - No auto-correct");
package_extract_dir("setup/kb/noac", "/tmp/samsungime/");
endif;
run_program("/tmp/rehpyc.sh", "build_keyboard");
delete_recursive("/tmp/samsungime");

ui_print(" * Keyboard Theme");
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.3") == "1"
then
ui_print(" - Trans-Nebula");
package_extract_dir("setup/kbth/nebula", "/tmp/SamsungIME/");
endif;
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.3") == "2"
then
ui_print(" - Blackout");
package_extract_dir("setup/kbth/blackout", "/tmp/SamsungIME/");
endif;
if
file_getprop("/tmp/aroma-data/trans.prop", "selected.3") == "3"
then
ui_print(" - Stock");
package_extract_dir("setup/kbth/stock", "/tmp/SamsungIME/");
endif;
run_program("/tmp/rehpyc.sh", "build_keyboard");
delete_recursive("/tmp/samsungime");

set_progress(0.9);

ui_print(" * Launcher");
if
file_getprop("/tmp/aroma-data/app.prop","selected.1") == "1"
then
ui_print(" - TouchWiz 4x5");
package_extract_dir("setup/launcher/scrol", "/system");
endif;
if
file_getprop("/tmp/aroma-data/app.prop","selected.1") == "2"
then
ui_print(" - TouchWiz 4x5 scroll");
package_extract_dir("setup/launcher/non", "/system");
endif;
if
file_getprop("/tmp/aroma-data/app.prop","selected.1") == "3"
then
ui_print(" - Apex Launcher");
package_extract_dir("setup/launcher/apex", "/data");
package_extract_dir("setup/launcher/scrol", "/system");
endif;
if
file_getprop("/tmp/aroma-data/app.prop","selected.1") == "4"
then
ui_print(" - Nova Launcher");
package_extract_dir("setup/launcher/nova", "/data");
package_extract_dir("setup/launcher/scrol", "/system");
endif;

ui_print(" * MMS App...");
if
file_getprop("/tmp/aroma-data/app.prop","selected.2") == "1"
then
ui_print(" - Touchwiz MMS");
package_extract_dir("setup/mms/tw", "/system");
endif;
if
file_getprop("/tmp/aroma-data/app.prop","selected.2") == "2"
then
ui_print(" - AOSP MMS");
package_extract_dir("setup/mms/aosp", "/system");
endif;

ui_print(" * Kernel Option's...");
if
file_getprop("/tmp/aroma-data/kernel.prop","selected.1") == "1"
then
ui_print(" - Stock Kernel");
package_extract_dir("setup/kernel/stock/system", "/system");
assert(package_extract_file("setup/kernel/stock/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p8"),
delete("/tmp/boot.img"));
endif;
if
file_getprop("/tmp/aroma-data/kernel.prop","selected.1") == "2"
then
ui_print(" - Peanut Butter & Jelly Kernel");
package_extract_dir("setup/kernel/pbj/system", "/system");
assert(package_extract_file("setup/kernel/pbj/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p8"),
delete("/tmp/boot.img"));
endif;
if
file_getprop("/tmp/aroma-data/kernel.prop","selected.1") == "3"
then
ui_print(" - Perseus 36.3 Jb Kernel");
package_extract_dir("setup/kernel/perseus/system", "/system");
assert(package_extract_file("setup/kernel/perseus/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p8"),
delete("/tmp/boot.img"));
endif;
if
file_getprop("/tmp/aroma-data/kernel.prop","selected.1") == "4"
then
ui_print(" - Sabre 32.2 Jb Kernel");
package_extract_dir("setup/kernel/sabre/system", "/system");
assert(package_extract_file("setup/kernel/sabre/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p8"),
delete("/tmp/boot.img"));
endif;
if
file_getprop("/tmp/aroma-data/kernel.prop","selected.1") == "5"
then
ui_print(" - Faux 007 Kernel");
package_extract_dir("setup/kernel/faux/system", "/system");
assert(package_extract_file("setup/kernel/faux/boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p8"),
delete("/tmp/boot.img"));
endif;
ui_print(" ");

ui_print("Settings Fix...");
ui_print("==========================");
ui_print(" - Writing fix");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/efs");
package_extract_dir("efs", "/efs");
unmount("/efs");
ui_print(" ");

set_progress(0.8);
ui_print("SNote Installation...");
ui_print("==========================");
ui_print(" - Writing Preload Partition");
run_program("/sbin/busybox", "mount", "/preload");
package_extract_dir("preload", "/preload");
set_perm(0, 0, 0644, "system/app/QuickSnote_Tablet.apk");
set_perm(0, 0, 0644, "system/app/sCloudSyncSNote.apk");
set_perm(0, 0, 0644, "system/app/Snote_wxga.apk");
set_perm(0, 0, 0644, "system/app/Snote_wxga_Provider.apk");
set_perm(0, 0, 0644, "preload/symlink/system/app/ResourceManager.apk");
set_perm(0, 0, 0644, "system/app/IdeaSketch.apk");
set_perm(0, 0, 0644, "system/lib/libsnote_T0.so");
set_perm(0, 0, 0644, "system/lib/libSamsungAnimationUX.so");
set_perm(0, 0, 0644, "system/lib/libCrumpledPaper.so");
set_perm(0, 0, 0644, "system/lib/libMyScriptEngine.so");
set_perm(0, 0, 0644, "system/lib/libMyScriptEquation.so");
set_perm(0, 0, 0644, "system/lib/libMyScriptHWR.so");
set_perm(0, 0, 0644, "system/lib/libMyScriptShape.so");
set_perm(0, 0, 0644, "system/lib/libMyScriptSolver.so");
set_perm(0, 0, 0644, "system/lib/libVoHR.so");
set_perm(0, 0, 0644, "system/lib/libderaser.so");
set_perm(0, 0, 0644, "system/lib/libloadStylusCore.so");
set_perm(0, 0, 0644, "system/lib/libImageFilterLibs.so");
set_perm(0, 0, 0755, "system/VODB");
run_program("/sbin/busybox", "umount", "/preload");
ui_print(" ");

ui_print("SoundMOD Installation...");
ui_print("==========================");
ui_print(" - Adding hooks to build.prop");
ui_print("Adding lines to build.prop");
package_extract_file("infinity.sh", "/tmp/infinity.sh");
set_perm(0, 0, 0777, "/tmp/infinity.sh");
run_program("/tmp/infinity.sh");
delete("/tmp/infinity.sh");
ui_print(" ");

ui_print("Internal storage");
ui_print("==========================");
ui_print (" - Copying Wallpapers");
package_extract_dir("sdcard", "/sdcard");
ui_print(" ");

set_perm(0, 0, 0777,"/de.robv.android.xposed.mods.appsettings/shared_prefs/ModSettings.xml");
unmount("/system");
unmount("/data");
unmount("/cache");
ui_print(" ");
set_progress(1.00);
ui_print("Buy me...something");
ui_print("like skittles...I wanna taste the rainbow too");