[Q] How to make my own script run at boot time in android-x86 - General Questions and Answers

Hi,
I developed a script init.myown.rc, How to make it run along with init.rc? What are the files I need to modify (like AndroidBoard.mk etc)?
I want to run this after init.rc, so my changes should also reflect in the android image.
Thanks,
Ravi

Hi Ravi,
I would like to do the same. Did you figure that out? Any help would be appreciated.
Thanks,
Krishnan.

a little bit late, but this may help someone that has the same question:
http://android.stackexchange.com/questions/6558/how-can-i-run-a-script-on-boot

Related

Any guides on how to create/compile custom roms?

I am a linux user...
Anyone can share the howto or if there are any guides?
+1 bumping this thread
Second that...
http://www.koushikdutta.com/2009/08/build-configuration-for-t-mobile.html#links
He seems to have a script to compile the Kernel...
I don't know to what extent this would help us but it is a start. I dont quite know how the apps are installed on a new ROM....
It would be nice if someone can explain what is needed and what is optional in the kernel and some of the mods that other people are doing and how they integrate in the OS.
I see a lot of improvements in the new ROM's but no how-to on doing it your self. I thought that was the point of having open source OS.
I would quite like this as well =o)
Have made a bit of a start by following this:
http://source.android.com/download
Shows you how to get all the code and do a build.
I believe the next thing would be to pick the required files from the output folder of the build, dump the boot.img and replace the kernel with 32B or 32A one, add the Magic model config file (to ramdisk) and recreate the boot.img
Replace/Add any modules required like maybe wifi or bluetooth, then need to change the build.prop file and put it all in to update.zip and sign the file.
Haven't had time to test this out but seems kind of logical...maybe?
Hello!
I'm following the android.com tutorial, but I want to ask: how can I download the donut branch? There's no mention in the entire site about it... Also, the cyanomod's multitouch and so on, where does it come from? Is it made by himself or it's somewhere in the net?
Thanks
Learn how to use GIT to get the donut branch from here: http://android.git.kernel.org/
Proble is that it doesn't specify the donut project path
Is there a command to list all project paths? I can't seem to find it
L10nH34Rt said:
Proble is that it doesn't specify the donut project path
Is there a command to list all project paths? I can't seem to find it
Click to expand...
Click to collapse
Code:
git branch -a
in any local git directory
Ok, then so far I've downloaded the donut branch, and compiled too. What now?
1. how to create a ROM from the made files?
2. how to compile the kernel / how to replace the one created with the make command with the one I'm running on?
3. is there any option I can configure to fit my phone? (HTC Magic 32A)
4. how can I root my ROM?
thanks
there is this guide that i have found:
http://www.koushikdutta.com/2009/08/build-configuration-for-t-mobile.html
'make' finished with success but i can't find how to transform it into 'update.zip' file...
anyone?
It says that in the link you have posted yourself.

Project: apk2

hi folks!
i'm not a developer but sometimes i do some scripting.Now i'm working on a project that called "APK2",and i think that could be useful!
Some months ago, I thought "why don't create a package manager and a package system to install real linux packages, and not just apps? I may want to install some command-line tools to run with terminal emulator" then I wrote this script, named apk2.sh, that installs some particular packages (I wrote another script to easily create this type of packages): he simply does the apt-like un-tar in /, but it installs a config directory too, to remove the installed packages.
It supports the preinst, postinst, prerm, postrm scripts too.
Tell me if it could be interesting, and I'll put it here.
If so, I need testers
If not, simply tell me, and I give up.
so could you be able to run like air crack through debian with this or?
olvap377 said:
so could you be able to run like air crack through debian with this or?
Click to expand...
Click to collapse
I could be able to run it on Android if someone can port all the libs to armv5e
I know, you have to do the porting in order to run it, but for example if there is the package for debian armv5 I think it should work if you take all the deps from the repo (may need some repacking, just to remove the CONTROL folder, and maybe to add the file needed to uninstall and various preinst, postinst etc. ).
And you don't need to run a debian or an ubuntu on Android, that's not really fast.
What do you think?
i think that this sounds really good and if it worked fully it would be a major addition to android development im hoping youll continue with this
olvap377 said:
i think that this sounds really good and if it worked fully it would be a major addition to android development im hoping youll continue with this
Click to expand...
Click to collapse
Thank you!
Any tester? I attach the scripts to now how apk2 works, just run it without any parameter, and it will show you
The other script it's simple to use, you just have to run it once to create in your home the basilar directory tree, you have to complete it and put the files in it, then you just have to put your preinst-postinst-prerm-postrm scripts in the ~/yourpackage/system/etc/apk2 directory, if you have some.
Then run the script again, insert the same package name, and here we are! The package is build! It's in the packagename directory in your home, in .apk2 and in .tar.gz, if you have to edit something do it on the tar.gz, and then change the extension in .apk2
PS: rename the files *.sh.txt into *.sh, because this forum doesn't allow .sh attachments...
xela92 said:
Thank you!
Any tester? I attach the scripts to now how apk2 works, just run it without any parameter, and it will show you
The other script it's simple to use, you just have to run it once to create in your home the basilar directory tree, you have to complete it and put the files in it, then you just have to put your preinst-postinst-prerm-postrm scripts in the ~/yourpackage/system/etc/apk2 directory, if you have some.
Then run the script again, insert the same package name, and here we are! The package is build! It's in the packagename directory in your home, in .apk2 and in .tar.gz, if you have to edit something do it on the tar.gz, and then change the extension in .apk2
PS: rename the files *.sh.txt into *.sh, because this forum doesn't allow .sh attachments...
Click to expand...
Click to collapse
in non-linux speak (layman's terms), what could i do with this...my interest is peaked
what are some "real linux packages" that one might want
tnpapadakos said:
in non-linux speak (layman's terms), what could i do with this...my interest is peaked
what are some "real linux packages" that one might want
Click to expand...
Click to collapse
i.e., the one olvap377 mentioned: air crack (I think it's possible).
or, we can run every app that does not need X server.
I created some demo packages (containing 2 scripts), one is SwapTools, and lets you enable/disable swap with 2 simple cmds (swap-enable and swap-disable); at the first run it collects some info, like the swappiness and the swap partition, then it saves the conf in a file (using swap-disable with --remove-conf will remove the conf file).
Another one I created is remount: you can remount your /system partition rw or ro just by typing on a terminal emulator
Code:
remount rw
or
Code:
remount ro
But you can try to use other appz compiled for armv5 processors, like all the debian apps, except for the one with GUI (we run on framebuffer, no X server :/ )
PS: I attach the pkgs, I added the .zip extension, just rename it in pkgname.apk2
Honest question: Why reinvent the wheel? Other embedded Linux projects have used ipkg to good effect, or its close relative opkg (refs from same link) which is used by Openmoko. A port of this to Android systems which have uClibc should be nearly trivial.
xela92 said:
i.e., the one olvap377 mentioned: air crack (I think it's possible).
or, we can run every app that does not need X server.
I created some demo packages (containing 2 scripts), one is SwapTools, and lets you enable/disable swap with 2 simple cmds (swap-enable and swap-disable); at the first run it collects some info, like the swappiness and the swap partition, then it saves the conf in a file (using swap-disable with --remove-conf will remove the conf file).
Another one I created is remount: you can remount your /system partition rw or ro just by typing on a terminal emulator
Code:
remount rw
or
Code:
remount ro
But you can try to use other appz compiled for armv5 processors, like all the debian apps, except for the one with GUI (we run on framebuffer, no X server :/ )
PS: I attach the pkgs, I added the .zip extension, just rename it in pkgname.apk2
Click to expand...
Click to collapse
thanks dude
olearyp said:
Honest question: Why reinvent the wheel? Other embedded Linux projects have used ipkg to good effect, or its close relative opkg (refs from same link) which is used by Openmoko. A port of this to Android systems which have uClibc should be nearly trivial.
Click to expand...
Click to collapse
I have also an Openmoko phone
I know very well ipkg/opkg, it could be interesting a porting, but I thought it was better to create a little lighter script to do it, because 1. a script that uses sh is usable in every system, you can either to install armv5e pkgs, or any armv* pkg, you have just to change some little things; 2. I don't know how to port, and I'm not able to do programming.
If you are interested and know how to do a porting, it could be very useful, because opkg has really lots of functions...
I just did what I could
xela92 said:
I have also an Openmoko phone
I know very well ipkg/opkg, it could be interesting a porting, but I thought it was better to create a little lighter script to do it, because 1. a script that uses sh is usable in every system, you can either to install armv5e pkgs, or any armv* pkg, you have just to change some little things; 2. I don't know how to port, and I'm not able to do programming.
If you are interested and know how to do a porting, it could be very useful, because opkg has really lots of functions...
I just did what I could
Click to expand...
Click to collapse
Ahh, okay, I see what you mean. Fair enough; I haven't seen your work so far, I was just concerned you were doing unneeded work. 'Course sometimes it's good to do that for the learning experience.
I don't have a full build setup for Android, so I can't recompile (I do have a full build setup for building Optware packages, but that's not quite the same), but I believe most custom ROMs ship uClibc. I'm not familiar enough with uClibc to know if you need to build against an exact version, though you could copy opkg from your Openmoko phone for the heck of it and see if it runs
olearyp said:
Ahh, okay, I see what you mean. Fair enough; I haven't seen your work so far, I was just concerned you were doing unneeded work. 'Course sometimes it's good to do that for the learning experience.
I don't have a full build setup for Android, so I can't recompile (I do have a full build setup for building Optware packages, but that's not quite the same), but I believe most custom ROMs ship uClibc. I'm not familiar enough with uClibc to know if you need to build against an exact version, though you could copy opkg from your Openmoko phone for the heck of it and see if it runs
Click to expand...
Click to collapse
Ya mean, copy the binary??? If so, it won't work of course, because the architecture of the openmoko processor is armv4t, it wouldn't see my binary
Nethertheless, if someone is interested
PS: please, could someone test my scripts? Thank you dudes
xela92 said:
Ya mean, copy the binary??? If so, it won't work of course, because the architecture of the openmoko processor is armv4t, it wouldn't see my binary
Nethertheless, if someone is interested
PS: please, could someone test my scripts? Thank you dudes
Click to expand...
Click to collapse
Heh, oh, older ARM core. Not paying attention. I will now stop hijacking your thread
olearyp said:
Heh, oh, older ARM core. Not paying attention. I will now stop hijacking your thread
Click to expand...
Click to collapse
No problem, man
No testers?
Please give me a feedback. If u want, I can make some apk2 by debs for armv5... Then I accept hints like "howto manage dependencies", 'cause I've no ideas...
"Tester"
xela92 said:
Please give me a feedback. If u want, I can make some apk2 by debs for armv5... Then I accept hints like "howto manage dependencies", 'cause I've no ideas...
Click to expand...
Click to collapse
Hi I have and HTC Hero from Sprint, I'm not a linux power user but I spent lots of time in my computer running Ubuntu just for 2 big reasons 1 freeware and 2 it has the best an simplest packet manager... I love deb files that installs like any .exe win programs I love that! I'm son not a coder and have little to no skills under Linux shell I use my sudo nautilus commands and so because I need it but I hate to untar or tar gz crap... for me that it old and useless some linux power user may get offended by that comment but hi times changes we love GUI... if you manage to post prints screens or a word open office or PDF documentation dummy proof I'm very up to be a Happy tester... the other thing I'm a Digital Graphic Designer if you need some design for a GUI and can try to help you in making and eye candy app...
Here it the way I will love to see grow this project... finding a way to installed it as an apk file like others in the android market so users can install the app easy then...in top of that a simple GUI to browse to the SD card in order to get the apk2 file... you where talking about not being able to run programs that has GUI that it is sad but still interesting but a lot of work to do without a good community because that means that all GUI may need to be re-design to the different resolution on the phones and be touch friendly...
I'm not sure if I'm helping at all but I love the big picture behind your project...
I'm porting opkg on Android, but i'm can't tell that's a trivial task )))
i also wrote simple howto "building and porting linux apps for android from scratch", but on russian. If needed i can do some translating and put here too.
Also may be we can open project for buildroot-like framework for android and opkg's repository. In my how-to i'm use crosstool-ng + gcc + uClibc.
XVilka said:
I'm porting opkg on Android, but i'm can't tell that's a trivial task )))
i also wrote simple howto "building and porting linux apps for android from scratch", but on russian. If needed i can do some translating and put here too.
Also may be we can open project for buildroot-like framework for android and opkg's repository. In my how-to i'm use crosstool-ng + gcc + uClibc.
Click to expand...
Click to collapse
Wow! Please do some translating!
But, when you finish the porting, how will you manage to port the packages?
Will you use the debian pkgs changing the extension? Would it work?
Thanks a lot!
No, we want to create only android repository of packages, based on opkg (ipkg)
for arm, mips and others platfofms.

[Q] Htc Hd2

I am trying to install rafdroid and the instructions say to " First of all modify the config.txt file in your build folder, with wince=1 or you will be stuck at bootscreen."
I really don't know how to modify it so could anybody help with this?? Maybe some steps on what to download & how to modify it would be helpful. Any help will be appreciated. Help ASAP if able. Thanks.
I've used rafdroid sd builds looong time ago... but i remember that if you use to start android from winmo you must create a text file (withe Notepad), write "wince=1" and save it in to the android folder in the sd-card otherwise it will work only with MAGLDR.

PC script to auto remove apk's

Hey everyone!
On the rom I currently use there are about 20 apk's I have no need for. What I do is download the rom, and individually delete the apk's before flashing the rom. The thing is I flash quite often (cheeky, I know ) and this is getting quite frustrating.
Ideally I want a script that does this all for me. I found one but it seems be for running on the phone, after the apk's have been installed. Does anyone know how I can create a script for the PC that does this before I even install the rom?
Thank you for any suggestions.
Oh and here's the thread I found that looked relevant...
http://forum.xda-developers.com/showthread.php?t=674357
edcoppen said:
Hey everyone!
On the rom I currently use there are about 20 apk's I have no need for. What I do is download the rom, and individually delete the apk's before flashing the rom. The thing is I flash quite often (cheeky, I know ) and this is getting quite frustrating.
Ideally I want a script that does this all for me. I found one but it seems be for running on the phone, after the apk's have been installed. Does anyone know how I can create a script for the PC that does this before I even install the rom?
Thank you for any suggestions.
Oh and here's the thread I found that looked relevant...
http://forum.xda-developers.com/showthread.php?t=674357
Click to expand...
Click to collapse
Over what OS?
If in Windows (or any M$ OS, incl. DOS) you can make a batch file.
My file is adjunted as example (modify as you like, put in the root dir -obviously to the unzipped ROM- and run. Rezip and maybe re-sign)
salu2
Thank you. This is exactly the kind of thing I am after. If I had of been born just a few years earlier I would probably know all about batch scripts. Fortunately, I just missed the DOS days!
Anyway, I puzzled out / looked up the commands in the script you posted. Based on that I extracted the rom, then placed the batch file within it, so that the cd (current directory) command runs correctly.
Unfortunately this mucks up the signing on the rom. Do you re-sign your CM7 roms every time you do this or is there an easier way?
Edit: My PC is Win 7, 64bit, soon to be Win 8 Consumer Preview.
Edit: The roms do not need resigning.
I don't re-sign the ROM, simply flash again over Clockworkmod Recovery.. and work.
But, you can:
1) sign using Auto-Sign....
2) Click [Thanks]...
Salu2
__________________________________________________________________
I know, I know.... my english is ****ty... but my spanish is much better... ;-)
Big thank you. That's solved that one nicely for me!
You're welcome.
Updated zip in my first Post.
Salu2
Hey again. I was hoping to build on the script you kindly provided. At the moment I am using various alpha roms where the exact apk's present changes fairly often. It would be great if I could see the outcome of each action. This way I would know if the apk has had it's name changed or been removed. How would I enable this?

[Q] Help with flashable system update.

I've read, I've tried using other ROMs scripts, I've googled. I still don't understand. I set up the kitchen, tried that way. Fail. All I want is the D80020y system folder I have made into a flashable zip. Don't need kernel, just want to update the system. I don't get when, or even how, or why to symlink. When to Loki? Can someone competent enough help me out? Thank you.

Categories

Resources