Androguide.fr said:
THIS IS A WORK IN PROGRESS, CURRENTLY AT A VERY EARLY STAGE OF DEVELOPMENT​
What is Flash Gordon ?
In laymen's words, Flash Gordon is an apk which allows you to flash any flashable zip (except for Roms) without having a recovery installed.
You just point it to the zip you want to flash, (be it a kernel, a mod, a gapps package, a modem, a RIL, a recovery...) and it will interpret the updater-script of this package and install its content just like a recovery would.
How does it work ?
Here is what happens step by step :
You tap the "select a zip" button, select the built-in file explorer to select the zip you want to flash
Flash Gordon will first extract this zip, depending on its size it can take a little time
When you press the "Flash Now" button, Flash Gordon will locate the updater-script and start translating it into shell code, line by line
It will output the resulting translated bash script on your sdcard and execute it, thus installing the zip's content
The app creates a notification, just tap on it to reboot
In order to achieve those last 2 steps, I'm writing a full Edify to Bash parser and translator.
Here is the list of all the Edify commands this parser can currently process and what their respective bash translation is (in green), using examples:
(more will be added over time, this is really just a draft)
By no means am I a bash expert, so if you have suggestions for better bash equivalents of any edify commands please post them
Code:
package_extract_file("path/to/source/file.txt", "/path/to/destination/file.txt");
[COLOR="DarkGreen"]busybox cp -fp /path/to/source/file.txt /path/to/destination/file.txt[/COLOR]
package_extract_dir("/source/folder", "/destination/folder");
[COLOR="DarkGreen"]busybox cp -rfp /source/folder/* /destination/folder[/COLOR]
set_perm(0, 2000, 0755, "/file/or/folder");
[COLOR="DarkGreen"]chown 0:2000 /file/or/folder
chmod 0755 /file/or/folder[/COLOR]
set_perm_recursive(0, 2000, 0644, 0755, "/path/to/set/permissions/recursively");
[COLOR="DarkGreen"]chown -R 0:2000 /path/to/set/permissions/recursively
chmod 0644 /path/to/set/permissions/recursively
chmod -R 0755 /path/to/set/permissions/recursively
[/COLOR]
delete("file/to/delete");
[COLOR="DarkGreen"]busybox rm -f /file/to/delete[/COLOR]
run_program("/script/to/run.sh");
[COLOR="DarkGreen"]sh /script/to/run.sh[/COLOR]
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/system");
[COLOR="DarkGreen"]busybox mount -o rw,remount -t auto /system [I](will soon change to -t mmcblk0p9 or whichever mount point is in the updater-script)[/I][/COLOR]
unmount("/system");
[COLOR="DarkGreen"]busybox mount -o remount,ro /system[/COLOR]
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
"/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
"/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
"/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
"/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
"/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
"/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
"/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
"/as/many/lines/as/you/want");
[COLOR="DarkGreen"]ln -s busybox /system/xbin/[ /system/xbin/[[
/system/xbin/adjtimex /system/xbin/arp /system/xbin/ash
/system/xbin/awk /system/xbin/base64 /system/xbin/basename
/system/xbin/bbconfig /system/xbin/blkid /system/xbin/blockdev
/system/xbin/brctl /system/xbin/bunzip2 /system/xbin/bzcat
/system/xbin/bzip2 /system/xbin/cal /system/xbin/cat
/system/xbin/catv /system/xbin/chattr /system/xbin/chgrp
/system/xbin/chmod /system/xbin/chown /system/xbin/chroot
/system/xbin/clear /system/xbin/cmp /system/xbin/comm
/as/many/lines/as/you/want
(not sure about this one, please correct me if I'm wrong, I could change to [I]ln -s argument/number/1 argument/number/2[/I] as many times as required if needed)[/COLOR]
write_raw_image("/tmp/boot.img", "mmcblk0p5");
[COLOR="DarkGreen"]dd if=/tmp/boot.img of=/dev/block/mmcblk0p5[/COLOR]
This is just a proof of concept for the moment, I'm aiming at adding all the possible Edify commands, and maybe doing it backwards (Bash2Edify) in the future, too.
Screenshots
This is from the apk I use for debugging, so the UI is pretty barebones atm, it will quickly evolve to something more fancy and featureful
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Contribute
Flash Gordon is fully Open-Source, and contributions are more than welcome!
You can check-out the full source code on my github at : https://github.com/Androguide/FlashGordon
This app depends on the following Open-Source libraries :
My fork of the CardsUI library by [URL="https://plus.google.com/101314917101345770417/posts"]Nadav Fima[/URL]
aFileChooser by Paul Burke
Frequently Asked Questions
Q: Why can't I flash a Rom with Flash Gordon ?
A: Because when some system files are replaced while the device is running, it causes it to crash and will stop in the middle of the installation, resulting in a bootloop.
Q: Where can I see the bash script translation of the package I selected ?
A: After tapping the Flash Now button, head to /sdcard/RecoveryEmulator/tmp/flash_gordon.sh
The full translation is also output to the logcat while flashing.
Q: I select a flashable zip but it tells me it is not valid or that it's not a zip package, why ?
A: Make sure that there is no whitespace in the name of the zip package you're trying to flash, otherwise it won't be recognized.
If your package has no whitespace but the app still gives this error, try to shorten its name.
Q: Which versions of Android are supported ?
A: From Froyo (2.2) up to the latest JellyBean (4.2.2)
Q: Why is this app useful?
A: Some people might not be able to install a custom recovery on their device, either because there is no custom recovery for this model, or maybe their bootloader is locked. Flash Gordon allows them to flash packages even then.
Or maybe you're simply lazy and you don't want to have to reboot to recovery to flash that new kernel or that new cool flashable mod ? Then Flash Gordon is for you too.
Or maybe just for the heck of it ?^^
Requirements
All you need is a rooted Android device with a proper busybox installed. Required applets include :
mount
sed
unzip
rm
cp
Changelog
To Do List
Using a private version of busybox to remove having busybox installed/installing new applets as a requirement for the user
Implementing an equivalent of nandroid backups (zipping the content of the defined partition(s) and generating an updater-script to allow the user to restore the backup either through recovery or through Flash Gordon
Translating ui_print(); to echo in bash and make the "Flashing" ProgressDialog's message display the content of those ui_print();
Disclaimer
If you're going to test this app, make sure you have a nandroid backup handy as it is very far from stable.
I won't be held responsible for any damage done to anything whatsoever. You use this tool at your own risk.
Download
A preview/pre-alpha/proof-of-concept/work-in-progress/whatever-but-stable apk is attached to this post.
Again, make sure to have a nandroid backup before flashing anything through Flash Gordon for the moment.
u
If you like this project, please press the "Tip us?" button so that more people can know about it.
Click to expand...
Click to collapse
I am just sharing the work of the awesome dev nd i dont take any credit
Related
Has anyone managed to get Debian running on the Hero (as per the instructions in the Dream forum?)
P
I tried but I'm stuck because ext2.ko needs to be compiled for the Hero (managed to boot debian IN recovery mode with the custom image but not under the stock hero cupcake) and I haven't really had the time to look how to do that.
Also, I had hard time installing debian because of weird sh behaviour (looks like it's also cupcake's fault) and needed to modify the install script so it uses busybox tools.
I was getting a fail on the 'modprobe ext2', because of the lack of kernel modules.
Chmod 4755 on the sdcard also fails because of the way it's mounted, you need to run the installer from somewhere else instead.
P
su <installer.sh does work, but sometimes chmod just says "Operation not permitted" and mount fails when using the stock utils on my phone, using busybox seems ok, and I belive that I'm rooted correctly, so I don't know why some chmod fail.
Can ext2.ko be compiled alone or does someone need to rebuild a brand new kernel for the hero ?
ext2, ext3 & other are compiled into the current hero kernel.
Have you tried to compile a kernel from the magic 32a sources that htc released? maybe it boots on hero too (i'll try today, if i have time)?
What does modprobe actually do?
I guess it's important, because when I try and start debian, it all dies horribly and reboots the device.
Not had time or inclination to really investigate yet!
P
modprobe is a wrapper that calls insmod and rmmod(-r option).
modprobe loads a kernel module into the kernel using insmod
In this case, ext2 seems to be needed in order to mount debian.img (looks like it fails there, even if ext2 is compiled into the kernel). No idea about what makes mount fail, but I know that it works in recovery and doesn't in android
If you want to reseach a little about debian on the Hero, I suggest stripping out the reboot line in bootdeb, you will save a lot of time.
No, I didn't try to compile anything for the Hero personally, basically beacuse I have no clue about how to do so (yet)
OK so the normal mount command won't mount debian.img, but 'busybox mount' will.
Woohoo, success!
My doing 'rm /system/bin/mount' this makes 'bootdeb' use the busybox mount instead, and hey presto!
P
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I'll build debian support into the next custom ROM...
P
Here is my installer.sh btw... I copied the debian.img to /sdcard/debian/debian.img but everything else to a new directory called /data/debian. This allows chmod 4755 on the installer.sh file.
I used the 2.1 zip from here.
P
Code:
su <./fsrw
modprobe ext2
clear
rm -f /data/local/bin/fsrw
rm -f /data/local/bin/bootdeb
rm -f /data/local/bin/unionfs
rm -f /data/local/bin/installer.sh
rm -f /data/local/bin/mountonly
mkdir /data/local/mnt
clear
cp -f fsrw /system/bin
cp -f bootdeb /system/bin
cp -f unionfs /system/bin
cp -f installer.sh /system/bin
cp -f mountonly /system/bin
cd /sdcard/debian
chmod 777 *
cd /system/bin/
chmod 4777 *
cd /
clear
echo " "
echo "VERSION 2.1"
echo "Custom Debian Bootloader is now installed! Quick huh?"
echo "This process does NO damage to your Android underlying OS!"
echo " "
echo "Courtesy of http://www.androidfanatic.com"
echo "Installer by Mark Walker (ghostwalker)"
echo " "
echo "To enter the Debian Linux console just type 'bootdeb'"
echo "PS: Be sure to run /scripts/onetime.sh as root from the shell after your FIRST 'boot'."
P
modaco said:
Here is my installer.sh btw... I copied the debian.img to /sdcard/debian/debian.img but everything else to a new directory called /data/debian. This allows chmod 4755 on the installer.sh file.
I used the 2.1 zip from here.
P
Code:
...
[b]
cd /system/bin/
chmod 4777 *
[/b]
...
P
Click to expand...
Click to collapse
suid for all /system/bin/ ????
That's from the standard provided installer.sh script.
I don't see any issue or danger with that tho? If you prefer you could do just do the files individually.
P
well... with
Code:
cd /system/bin/
chmod 4777 *
every executable on /system/bin will be executed with the permissions of the executable's owner, and everyone have rwx access to every single binary in /system/bin
What exactly can you do with Debian?
You sohuld be able to do anything on your phone you can do with a full debian distro.
Shame there's no hero with a hardware keyboard tho!
P
modaco said:
You sohuld be able to do anything on your phone you can do with a full debian distro.
Shame there's no hero with a hardware keyboard tho!
P
Click to expand...
Click to collapse
Yeah I figured that out lol, but what can you do with a debian distro?
Still fails here, no idea about what to do.
# busybox mount -o loop,noatime /sdcard/debian/debian.img /data/local/mnt
mount: mounting /sdcard/debian/debian.img on /data/local/mnt failed: No such file or directory
/sdcard/debian/debian.img and /data/local/mnt both exist, and this line works in recovery
Any idea ?
EDIT : Fixed it !
In bootdeb, I needed to replace "mknod /dev/loop2 b 7 0" with "mknod /dev/loop0 b 7 0"
Maybe I'll rebuild a debian zip ready for the hero with a proper install script, or even as an update.zip when I'll look into android customisation
BTW (offtopic) : I'm also really intrested in a stock android (like Cyanogen roms for the G1) with mods for the Hero (with Flac patches for example), and maybe donut ! I'll be glad to help if you need.
EDIT 2 : Also, I don't really like how the script is done. In a world of android multitasting, we only can run one debian shell at the time ?
My idea is easy to do (I think) :
- Don't make bootdeb run chroot directly
- Make a debshell script that will launch a debian shell
- Make a debshutdown script that shuts down debian and doesn't reboot the phone if you throw it arguments.
OR : Make a big debian script that parses the command line and do what the 3 different scripts do, and do like the classic bootdeb if no argument is providen
I hope I explained what I think well
I DIDN'T need to do that, how weird!
P
Why Debian?
Why would we wan't to run Debian(=linux) when we have android(=linux)??
I'm also a bit worried about the permissions in /system/bin.. This means that everyone can make changes to every binary that Android has..
Virusses are not yet in the open, but you really make it very easy to exploit your phone (imagine a virus which acts as a dialer!!)
Well what do you do when you're bored and need some distraction .....Modify the stock kernel and include SU!
If you just search on the internet and especially on XDA than you find out that this is not so difficult.
The only purpose of this modified kernel is install SU and thus get ROOT
Why superuser and busybox are not installed by default is simple: it takes only 1 minute to download it from the market...
So here I give you the stock kernel + su/Root for XXJVQ/ XXJVR
installation:
1. Flash the tar file with Odin
2. Download superuser from the market and install it
3. Download Busybox installer from the market and install it
Credits to Supercurio, Hardcore, Liliniser for the tools and sources
Tutorial is Linux based!!!
So if i can do it than you can do it also!! All you have to do is read and follow post 2
Update 01/08/11 Added XXJVT
Update 01/08/11 Added Working XXJVR
Update 06/07/11 Howto add init.d support to the kernel (post 3)
Tutorial
1. Download and install the needed tools
2. extract de stock kernel to a temporary directory
3. modify the init.rc script to include your su install script.
4. add in the tmp folder busybox and su
5. add in the sbin directory your install script.
6. Recompile the kernel
7. Tar de kernel
8. Flash the kernel with heimdall or Odin
1. Download and install the needed tools
* Cross compiler: http://www.codesourcery.com/sgpp/li...eabi/arm-2009q3-67-arm-none-linux-gnueabi.bin and install it to /opt/toolchains/arm-2009q3/
* Kernel repacker made by Liliniser / dkcldark : Download from supercurio's github. with (if installed) git clone git://github.com/project-voodoo/kernel_repack_utils or goto the website https://github.com/project-voodoo/kernel_repack_utils and click on download.
* Download busybox,su and the install script from this post, and extract the files.
2. extract de stock kernel to a temporary directory
Copy the original zImage to de directory where you extracted the kernel repacker
Rename it to zImage.org
create a temp directory in the kernel repacker directory
Open a linux shell and go to kernel repacker directory
./extracter.sh -s zImage.org -d temp (hit enter)
3. modify the init.rc script to include your su install script.
Go to the temp directory and edit init.rc with your favourite editor and put this on a new line at the end off the file.
service install_su /sbin/install_su.sh
user root
oneshot
Save the file and exit
4. add in the tmp folder busybox and su
copy busybox and su to the tmp folder in your extracted kernel folder
make sure they are markt als executable.
5. add in the sbin directory your install script.
copy install_su.sh to the sbin folder in your extracted kernel folder
6. Recompile the kernel
Open a linux shell and go to kernel repacker directory
./repacker.sh -s zImage.org -d zImage -r temp -c gzip
congratulations you must cooked your first modified kernel
7. Tar de kernel
tar -H ustar -c zImage >code.tar
8. Flash the kernel with heimdall or Odin
Howto add init.d support to the stock kernel
Whell this is easy to implement
1. Open a linux shell and goto to the extracted kernel directory. (read post 2 howto do that)
add the following lines to the init.rc file
Code:
service initd_support /sbin/initd_support.sh
user root
oneshot
Save the file and exit
2. Create a new file in the sbin directory called initd_support.sh and add the following code
Code:
#!/tmp/busybox sh
if cd /system/etc/init.d >/dev/null 2>&1 ; then
for file in S* ; do
if ! ls "$file" >/dev/null 2>&1 ; then continue ; fi
/system/bin/sh "$file"
done
fi
Save the file and make it executable
3. repack the kernel (see post 2 for the howto)
4. on your device mount system Read/Writable and create the directory /system/etc/init.d
5. Copy your init scripts to /system/etc/init.d/
Make sure the name starts with a S, and set the permissions to 777
Example step 5/6
Code:
adb push Stweakscript /sdcard/
adb shell
su
/tmp/busybox mount -o remount,rw /system
/tmp/busybox mkdir /system/etc/init.d
/tmp/busybox cp /sdcard/Stweakscript /system/etc/init.d/Stweakscript
/tmp/busybox/chmod 777 /system/etc/init.d/Stweakscripts
7. flash the kernel
I'm sorry in advance.
But WTF?
vladoots said:
I'm sorry in advance.
But WTF?
Click to expand...
Click to collapse
If you only want to root your rom don't wait for devs to do it but do it your self
lownoise said:
If you only want to root your rom don't wait for devs to do it but do it your self
Click to expand...
Click to collapse
Yes, and for learning purposes. Thanks for the tips, I was sitting down to do this on another phone the other day actually... it's good to see your ideas, I was getting pretty frustrated with the limited Android init environment (the toolbox commands are so limited!).
Thanks for this nice tutorial.Worked great!
Great! Now we have good rooting kernel.
If I want root - I want root, not tweaks and other "shiny" things.
Cfroot breaks BT in some cases, Fuguroot breaks Kies connection.
Kernel which don't add Superuser.apk as a system application is the best choice - we don't have to delete other system files and there are updates of this app, so why should we have older version on /system and new on /data as an update?
Can I do "adb root" on this kernel ?
Sure Just install superuser and busybox from the market
Wooow! These are the sort of tutorials I miss here sooo much. It's a developer forum, but what we are getting here mainly are ready-products (roms, modded kernels). And why not to do it yourself. But sometimes googling for the information is not so easy, because applies to different conditions(devices, phone models, soft versions). There are many people who would spend their time learning how to compile a kernel or edit framework files. But there are so few tuts on this here... I miss tuts that tell how to do things step-by-step, without any specific linux/java knowledge.
sebarkh said:
Wooow! These are the sort of tutorials I miss here sooo much. It's a developer forum, but what we are getting here mainly are ready-products (roms, modded kernels). And why not to do it yourself. But sometimes googling for the information is not so easy, because applies to different conditions(devices, phone models, soft versions). There are many people who would spend their time learning how to compile a kernel or edit framework files. But there are so few tuts on this here... I miss tuts that tell how to do things step-by-step, without any specific linux/java knowledge.
Click to expand...
Click to collapse
And therefore I did it. Share the knowlegde and safe this forum
Why doesn't XDA have more stuff like this?
Thanks OP!
Yes, I must thank you too.
Now I understand... Sorry for my initial confusion!
I've problem:
after applying script:
line 47: ./out/project/original.cpio -> no such files or directory
Any idea ?
Where is original.cpio files ?
Screen of error:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
tq man...!!
man this is amazing, I was looking for something simple like this for months. It's right, should be more posts like these in xda
+1
Thank you very much for this, lownoise
We need more topics like that, since I am interested to learn myself...
Members posting tutorials like that are always appreciated, I cannot thank you enough.
Do you know how to replace the recovery 3e with 2e additionally?
It would be great to know since I want to have it CWM compatible (flash unsigned update.zip)
AFAIK recovery is a part of the kernel....
It would be great if you could point me to the right direction.
Others probably would like to know that as well.
Thanks again.
dago said:
I've problem:
after applying script:
line 47: ./out/project/original.cpio -> no such files or directory
Any idea ?
Where is original.cpio files ?
Screen of error:
Click to expand...
Click to collapse
Which kernel did you try to modify
lownoise said:
2. extract de stock kernel to a temporary directory
Copy the original zImage to de directory where you extracted the kernel repacker
Rename it to zImage.org
create a temp directory in the kernel repacker directory
Open a linux shell and go to kernel repacker directory
./extracter.sh -s zImage.org -d temp (hit enter)
Click to expand...
Click to collapse
Two noob questions:
1. from where to copy zImage file? Where can I find zImage file?
2. How to open linux shell? Should I install linux shell application on my PC and run it or?
Sorry for such questions but I want to try.
Thanks.
[ info ]
i am attaching a easy to run package which contains the files required for full functionality of executing startup scripts (init.d scripts)...
basically this will allow the user to execute custom shell scripts, placed in /system/etc/init.d/ folder and they will be executed on each boot!
i dont have this device yet!!
thanks to Jozinek for testing this on his phone!
[ requirements ]
stock rooted ROM
windows PC with adb drivers installed
[ how to install ]
download the provided zip package
save it on c:\
extract the contents of the package
connect phone with usb debugging active to PC via ADB
execute "runme.bat"
follow onscreen instructions & enjoy!
incase some issue is there post the output/log of script
[ additional info ]
i have added the following things in the package:
corrected /system/bin/sysint file
run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
correct /system/etc/install-recovery.sh file (this file gets executed by default on stock kernel too!)
test/example script /system/etc/init.d/99test
to check if this is working the test script (99test) will create a temporary file /data/local/tmp/init.d_log_test.txt on each boot
[ donations/device fund ]
i dont yet have this device but i plan to buy it.... if u guys want to donate to me to get this device OR if u feel that this work has helped u OR u think that the work i put into making this is worthy of donations, then click on the following link for buying me some coffee/beer/etc
i am currently channeling all my donations to get this phone asap and to avoid selling my ARC!!!
PAYPAL DONATION LINK
[ download link ]
generic-init.d-support-v01.zip
MD5HASH: 2eda273af4b91c34f868807820cceaee
let me know how it goes!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
ENJOY!
Nice work, this will enable the Speedy v7 int.d hacks, can you incorporate this in the above? As an addon perhaps.
Done, $50 "AU" dollars coming your way mate.
-smc
somemadcaaant said:
Nice work, this will enable the Speedy v7 int.d hacks, can you incorporate this in the above? As an addon perhaps.
Done, $50 "AU" dollars coming your way mate.
-smc
Click to expand...
Click to collapse
this init.d support can be used to execute ANY shell script/program at startup... u are free to choose the ones u want...
if anyone needs help on how to push the scripts onto device let me know... but script specific info i dont have, u will need to ask the developer of those scripts..
I used this script to move dalvik cache to /cache folder:
Code:
#!/system/bin/sh
#
# relocate dalvik-cache to /cache/dalvik-cache
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# create symlink
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
After reboot i saw folder /cache-dalvid in both folders /data and /cache, is it normal?
Thank!
I found that for devices rooted with locked bootloader
Line 21 of runme.bat need to change from
HTML:
@files\adb shell "su -c 'busybox mount -t ext4 -o rw,remount /system /system'"
to
HTML:
@files\adb shell "su -c 'busybox mount -o remount,rw /system'"
This is all great, exactly what I was looking for! But what about if the ROM already has a custom kernel that makes use of /etc/init.d? Do the /etc/init.d scripts get executed twice?
EDIT: in my phone this solution can't work. In the init.rc file the following lines are commented out
Code:
#service flash_recovery /system/etc/install-recovery.sh
# oneshot
Thanks, it's working but I have a question, how we can include this in a rom?
Please respond, I would appreciate that
DooMLoRD said:
run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
Click to expand...
Click to collapse
That means I don't need run-parts if I've busybox installed?
1-Tell me please if I understand: I've done everything the post says Doomlord ([ADDON] [Xperia S] Generic startup /init.d scripts support for Stock ROM / Kernel) my question is this, after this I can already install scripts from cwm?
2-I try installing ''NullVoid'' tweaK by cmw and apparently well was installed. (I say apparently because i do not know if it is working)
3-Another thing about Tweaks: These have to be installed every time the phone restarts? This tweaks are compatible with the stock ics rom? (With the Doomloard Method ?
DooMLoRD said:
........
[ additional info ]
i have added the following things in the package:
corrected /system/bin/sysint file
run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
correct /system/etc/install-recovery.sh file (this file gets executed by default on stock kernel too!)
test/example script /system/etc/init.d/99test
to check if this is working the test script (99test) will create a temporary file /data/local/tmp/init.d_log_test.txt on each boot
..........
Click to expand...
Click to collapse
So the "install-recovery.sh" file is executed by system by default and does not need to be executed manually from terminal or what else?
And about the file...that is not a one-run file...right? It is executed at every phone boot...right??
Thank you.
Sent from my GT-I9000 using xda app-developers app
AW: [ADDON][Xperia S] Generic startup/init.d scripts support for Stock ROM/Kernel
Sorry leaving footprint, to see this again after im home.
Gesendet von meinem LT26i mit Tapatalk 2
Hello,
Is this package valid for deodexed rom?
I'm on stock .55, bootloader locked.
Currently the folder /system/etc/init.d doesn't exists
Thank you
marvasten said:
Hello,
Is this package valid for deodexed rom?
I'm on stock .55, bootloader locked.
Currently the folder /system/etc/init.d doesn't exists
Thank you
Click to expand...
Click to collapse
it doesnt matter which ROM you are on... this should work on any ROM as long as the kernel ramdisk executes install-recovery.sh service...
dont worry it creates all required folders/files
Hi Everyone
I am creating this thread because most of the people still asking how to move the apps 2 sd on ICS, as the app2sd dt is not working.
So here is a step by step guide to do it.
1st you need any root explorer.
I am using the File Manager (because the Root Explorer is getting FCs on ICS)
Here is the link to the File Manager
https://play.google.com/store/apps/details?id=com.rhmsoft.fm&feature=search_result
Load the File Manager
Go to setting and Tick the root explorer and Mount System Folders.
(Allow the Super User Permission)
Then download this file
http://forum.xda-developers.com/attachment.php?attachmentid=890365&d=1328558597
Unzip it and paste it in the sdcard.
Now open the File Manager
Copy The "S2E" from the sdcard\ICS_simple2ext\system\app
and paste it to the system\app (presented in the root folder)
Similarly copy the "20userinit" file from the sdcard\ICS_simple2ext\system\etc\init.d
And paste it to the system\etc\init.d (presented in the root folder)
It will ask to replace the file, so Just Replace it
Now open the S2E from the app drawer and configure the following :
- Menu->Settings: Check "Extended partiton info", "Mount as ext4" and "Set read buffer"
-Reboot your phone
-Start S2E again : Check "Applications" , "Private apps"
-Reboot your phone
Note: If you like you can also check the "Dalvik Cache" and the "Download cache"
You will get around 170 mb internal memory free out of 178 mb.
Special Thanks to:
Maclaw and His Team for Providing us the ICS
Works perfectly, this is the right method. Tested and used on v6 and v7 too.
followed the guide exactly. move the file to the specific location. after i restarted my phone there was no s2e app installed. tried opening it manually from system/app but i got this error : There is a problem parsing the package . the script is there, the 20userinit file, i tried using a2sd DT GUI but it says there is a problem with the script
But... this forum is not the place for guides
Sent from my hexacore rooted toaster with xdatoast premium
Maybe not, but looking after all these morons spamming CM9 dev thread, it could be sticky here, as an exception.
Work great..thanks bro.
Sent from my GT-S5660 using Tapatalk
This is not CWM update package?
donlecho said:
This is not CWM update package?
Click to expand...
Click to collapse
it is, but originally for another phone I think, but I saw the script and you should be able to install it in recovery, just make a backup, and mount system before flashing, the script doesn't do this.
voetbalremco said:
it is, but originally for another phone I think, but I saw the script and you should be able to install it in recovery, just make a backup, and mount system before flashing, the script doesn't do this.
Click to expand...
Click to collapse
But I think the system partition is mounted. See this.
updater-script file from meta inf
Code:
ui_print("Custom update script for");
ui_print("Sandvold's ICS for bravo");
ui_print("Packed by tlex");
ui_print("http://e-tel.eu");
ui_print(" ");
ui_print("Mounting system");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Deleting old files");
ui_print(" ");
delete("/system/etc/init.d/10apps2sd");
ui_print("Extracting new files");
package_extract_dir("system", "/system");
ui_print("Setting permissions");
set_perm(0, 0, 0644, "/system/app/s2e.apk");
set_perm(0, 0, 0755, "/system/etc/init.d/20userinit");
ui_print("Unmounting system");
run_program("/sbin/busybox", "umount", "/system");
ui_print(" ");
ui_print("All done!");
In line 7 is command to mount system.
donlecho said:
This is not CWM update package?
Click to expand...
Click to collapse
I was unable to install it in the clock recovery mode.
Thats Why I found the alternate solution, and posted it.
Its working without any issues
donlecho said:
But I think the system partition is mounted. See this.
updater-script file from meta inf
Code:
ui_print("Custom update script for");
ui_print("Sandvold's ICS for bravo");
ui_print("Packed by tlex");
ui_print("http://e-tel.eu");
ui_print(" ");
ui_print("Mounting system");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Deleting old files");
ui_print(" ");
delete("/system/etc/init.d/10apps2sd");
ui_print("Extracting new files");
package_extract_dir("system", "/system");
ui_print("Setting permissions");
set_perm(0, 0, 0644, "/system/app/s2e.apk");
set_perm(0, 0, 0755, "/system/etc/init.d/20userinit");
ui_print("Unmounting system");
run_program("/sbin/busybox", "umount", "/system");
ui_print(" ");
ui_print("All done!");
In line 7 is command to mount system.
Click to expand...
Click to collapse
lol didnt saw it
Sent from my GT-S5660 using xda premium
Nice guide.
However I simply tried with sucess this app2sd app: https://play.google.com/store/apps/details?id=com.a0soft.gphone.app2sd&hl=en
lemene said:
Nice guide.
However I simply tried with sucess this app2sd app: https://play.google.com/store/apps/details?id=com.a0soft.gphone.app2sd&hl=en
Click to expand...
Click to collapse
U are not able to move the system apps through thie link you have posted.
It just moves the installed apps to sd. So thats why you will not be able to get the maximum possible free space on the internal storage.
The App 2 SD is just a simple functioning app, not an app that makes the internal memory free
Ah, I see.
Thanks, indeed there's a lot of apps that will not move.
I'll follow the guide then.
---------- Post added at 08:27 PM ---------- Previous post was at 07:57 PM ----------
And worked great! Was able to free 130 MB!
btw reboot does not install se2 so I install it manually.
Also my root explorer works ok with gio's ICS.
thanks works!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I am going to do this on my gio right now. But i just installed beta 8 and have to restore from Titanium backup. It installs them to phone, but if i move to SD does the WHOLE thing go or does it leave a bit? Also isnt i risky to put system apps on SD or would things like gmail, mail etc be okay? Im a noob to A2sd sorry
I Think a2sd dt not working because space in system is very low used by CM9 rom...i try to delete some apps in /system/app/ and then install a2sd script n work fine...
There, I just made a working update zip.
http://www.mediafire.com/?mjr9pbnu9zt1trw
AlwaysDroid said:
I am going to do this on my gio right now. But i just installed beta 8 and have to restore from Titanium backup. It installs them to phone, but if i move to SD does the WHOLE thing go or does it leave a bit? Also isnt i risky to put system apps on SD or would things like gmail, mail etc be okay? Im a noob to A2sd sorry
Click to expand...
Click to collapse
No problem you can move every thing to sd-ext.
Just don't worry about that.
waqasleo17 said:
No problem you can move every thing to sd-ext.
Just don't worry about that.
Click to expand...
Click to collapse
Okay thanks! What would you reccomend as a good partition size? i have 2gb left on my 4gb card.
Disclaimer: Flashing is fun, but get irritating when softbrick, bootlooooooooop etc happens. Nandroid back up and use tb101 themer! [im not selling it enough, this will save u from dead end troubleshooting. I didnt flash YOUR phone but i will help in anyway i can if you run into trouble.
IC.JeLLY_oNGB.BeAN.S [WIP]
[Based off EG04]
[screens]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What is it? It is a starter pack. [all other releases will be in form of starter and update packs]
Deodexed and zip-aligned
ALL TB101 mods (-TW4-Havent played with that one yet)
ICS Boot Ani & Sounds [working on boot/bootsound, had this trouble w/ec07]
My ICS/JB Theme [Latest Release [00] (still beta, havent heard back from yall)]
-No xml mods yet, ie. Horizontals and text colors [see Patch]
Gps.config mod
DeBloated_Pro (cleaned most that i was i aware i could, so if anything is gone u want, they are in deodex.zip)
SuperSU [must install after 00]
BusyBox (update if you need to)
More to come....
ICS SOFTKEYS?
In the past with my themes the initial rom flash doesnt boot softkey mods correctly so... YOU will need to patch them. [For Alphas]
Download the attached zip and [unzip&] put in TB101 themer with other softkey imgs, then pull your frameworks in and mod.
MAKE A ZIP WITH YOUR OG FRAMEWORKS WITH DEFAULTS AS MODS [flash if bootloop]
How to install? [updated:10.25]
Download 00&SuperSU [attachment] and put on sdcard root
BACKUP [nandroid via cwm, contacts, sms, apks via TiBU etc]
Flash [install] 00.zip in CWM
Wipe Cache/Dalvik
Reboot (Should boot now )
-if bootloop Flash SuperSU.zip
Reboot
Reboot
Enjoy!
Initial Alpha_00 Release: Here [10.24.12] [will WIPE DATA] [updated:10.25]
-should boot now
Patch_00: Here [must have 00_release installed, you will need to patch this framework again for ics keys etc]
+XMLs now editted
+ICS Tasker skin [hold home]
+ICS 5 bar network pngs now
+build.prop tweaks
Patch_00 Screens
My Goal:
I wish this to be a starter rom for all to own. So input is needed and support will be in form of patch [you can also patch and post] until all system are go. This forum has been best supported over my 3 devices, let learn and continue.
Thank YOU!
credits:
trailblazer101 (everything as always)
dsixda (rom kitchen, updaterscript)
Vertemus (og Domination themer)
and YOU!
As well as credit given in theme thread.
...
DEODEXed ROM [will WIPE DATA, back up nandroid, flash, restore data]
[CWM]: here (thank the poster too!)
debloated
rooted (superuser)
busybox
stock zImage (placeholder)
OG STOCK DEODEX FILES: Here
(just put into cwm zip to add or drag into Trailblazer101s framework maker)
Working on a ROM myself... Will be my first ever.
added oneclick method to deodex ROOTED, BUSYBOX, EG04 STOCK ROM.
Any idea why when I mount cache.rfs in MagicISO there is no recovery folder?
jaizero said:
Any idea why when I mount cache.rfs in MagicISO there is no recovery folder?
Click to expand...
Click to collapse
What are u trying todo?
Extract csc?
Sent from my SPH-M580BST using Tapatalk 2
im in irc
What is the name of the room in IRC? Yup trying to extract the recovery folder.
ciscogee said:
MANUAL or ONECLICK!!! added [10.17.2012]
Requirements:
Rooted device (google "Super One Click" and then when rooted, dl latest SU or superSU)
Busybox installed (via market after root)
ADB installed and working properly (added to path is optimal) ADB added to zip (for one click method)
Flashed and working EG04 rom
EG04_STOCK_DEODEX.zip
and just enough adb knowlege to follow directions
ONECLICK
Download zip, follow README.txt (windows only atm)
MANUAL
Step 1:
Download EG04_STOCK_DEODEX.zip, Unzip and place folders done_app and done_frameworks on root of sdcard.
Step 2:
Open cmd prompt (in sdk/platform-tools/ or any folder if in path)
and copy and past each cmd line. (if any errors occcur, post them).
Code:
$ adb shell
$ su
[you may need to accept permissions by superuser on phone, if 1st time shelling)
# stop
# mount -o rw,remount /system/ /system/
# cp /sdcard/done_app/* /system/app/
# rm /system/app/*.odex
# cp /sdcard/done_frame/* /system/framework/
# rm /system/framework/*.odex
# mount -o ro,remount /system/ /system/
# reboot
[$ & # are showing you root access]
BAM! deodexed!,
use titanium back up to delete bloat you do not want.
Im working on a rom after homework.
Yay we're active again!
Click to expand...
Click to collapse
Nevermind Got it working.
The one click isn't working for me.
The cp command isn't found
Confused
Im a little confused about how to flash this as its different from when I was flashing on ec09. So if someone could provide me detailed steps that would be great
---------- Post added at 02:39 AM ---------- Previous post was at 02:15 AM ----------
Ok so I understand what to do and I rooted successfully. However when I try to update my su binary it fails every time and I cant figure out what to do to get it to become successful so for now I unrooted.
Who here was wanting a way to get the call screen in the ticker working on different launchers? Well, I just figured it out Go to my new thread in theming for new info heh
lets stay on topic!!!!!
jus bs-ing yas!
since we are off topic, when decompiling your modded apks, am i using stock or your modded frameworks to install?
Jaggar345 said:
Im a little confused about how to flash this as its different from when I was flashing on ec09. So if someone could provide me detailed steps that would be great
---------- Post added at 02:39 AM ---------- Previous post was at 02:15 AM ----------
Ok so I understand what to do and I rooted successfully. However when I try to update my su binary it fails every time and I cant figure out what to do to get it to become successful so for now I unrooted.
Click to expand...
Click to collapse
I dont recommend flashing things just to flash them because they are there. Thats how phones get bricked. Read some tutorials on ADB and the Android SDK before diving into code etc... Just my .02
cwm up
lost it if someone has it can u upload, if not ill make another soon.
New rom added
xml patch up...
anyone using these?
Just getting ready to flash cwm and get started, just want to make sure I've got the order right... Flash 00.zip then the patch, both in cwm. Then if I want ics softkeys download the zip and use tb themer to mod framework, make zip and flash from cwm... Right? Maybe... I have yet to use TB's themer.
Sent from my SCH-I400 using xda app-developers app
roaddog665 said:
Just getting ready to flash cwm and get started, just want to make sure I've got the order right... Flash 00.zip then the patch, both in cwm. Then if I want ics softkeys download the zip and use tb themer to mod framework, make zip and flash from cwm... Right? Maybe... I have yet to use TB's themer.
Sent from my SCH-I400 using xda app-developers app
Click to expand...
Click to collapse
Back up you stuff first. Nand and apks etc
Flash rom_00.zip then supersu.zip.
(I don't have too much time to script, I'm way behind in classes due to gb fun) then patch_00.zip
Clear caches
Reboot.
Then when boots legit restore your data nand and apks etc.
And yes for ics keys use tb themer, it will do it for you, just add the png folder in themer dirs
Sent from my SPH-M580BST using Tapatalk 2
Having technical difficulties at the moment, can't get into download mode... Trying another comp now.
Oops... Operator error... Flash after supper.
Sent from my SCH-I400 using xda app-developers app
any idea why it would be stuck at the installing update step? I can't get by that