Since I have gotten several requests to show people how to set up a dev environment, I thought I would write up a how to guide and just post it in a thread.I have had to set up a new dev environment a few times now, and each time I've had to look the information up piece by piece. All of the guides that I have found are out of date or don't work for what I want to accomplish, which is build a basic environment that I can decompress nandroid backup images in, build kernels, compile images, and just be ready for anything that is thrown my way that needs a Linux based setup to look at or test.
And just because I probably need to put this in here,
********I AM NOT RESPONSIBLE FOR ANY HARM THAT MAY COME TO YOUR COMPUTER, PHONE, OR ANYTHING ELSE THAT YOU MAY USE WHILE READING OR TRYING TO IMPLEMENT ANY OR ALL PARTS OF THIS GUIDE.*********
Guide Tips:
Read everything first. Then go to the websites listed and read it again. This will give you somewhat of an understanding of what you are going to be doing. This is what I use and it works for what I do. I do not use Eclipse, therefore I did not include it in this guide. While reading this guide, Linux and Ubuntu are one in the same so don’t get confused by terminology. Ubuntu is just a flavor of Linux. You may prefer a different flavor and that is fine. While working in Terminal, if I put something in italics, don’t type that part. Italics are meant as an extra bit of info. If the text went to a new line and there is a space before the next line starts, hit enter. If the text went to a new line and there is no space, it’s the same line of code.
Downloads:
Download Ubuntu 10.10 32-bit desktop edition from: http://www.ubuntu.com/desktop/get-ubuntu/download
Download and install VirtualBox from: http://www.virtualbox.org/wiki/Downloads
Install Ubuntu 10.10 on the VirtualBox like this: http://www.psychocats.net/ubuntu/virtualbox
VirtualBox Tips:
Use a 50GB (or bigger) Hard Drive size if you can afford the space.
Pick an easy password and log on automatically. This will make things easier later.
When you get set up, go to System, Settings, Screensaver, and uncheck Activate screensaver when computer is idle, and Lock screen when screensaver is active. It is not necessary on a VirtualBox anyway and will just become an annoyance.
I recommend downloading and installing the VirtualBox Guest Additions for Linux by clicking Devices, Install Guest Additions. This will make things easier if you need to resize your Linux desktop window, or cut and paste text from Windows to Linux.
If you need to move files easily from Windows to Linux, put them on a USB drive in Windows. Then in on the VirtualBox, click Devices, select USB Devices, find the USB drive that you are using and select it. The drive will then be accessible in Linux. To move something back to Windows, just uncheck the drive in the same manner. There is a common share folder you can set up, but I find it more of a hassle than just using a USB drive.
Inside Ubuntu:
Download and save the Android SDK for linux from: http://developer.android.com/sdk/index.html
Download and save unyaffs from: http://code.google.com/p/unyaffs/downloads/list
Go to Applications, Accessories, and Select Terminal
In Terminal type:
Go to Applications, Accessories, and Select Terminal
In Terminal type:
sudo passwd (it will ask you for a new password, just enter the password you used in setup)
(retype the same password)
mkdir ~/android
cd Downloads
sudo mv unyaffs /bin
tar –zxvf android-sdk_r08-linux_86.tgz
mv android-sdk-linux_86 ~/android
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
mkdir ~/bin
curl http://android.git.kernel.org/repo > ~/bin/repo
chmod a+x ~/bin/repo
cd ~/bin
sudo mv repo /bin
cd /bin
chmod 777 unyaffs
cd ~/android/android-sdk-linux_86/tools
. android (notice the period and space before “android”, this is a "run" command, the Android SDK and AVD Manager will open)
Select as many or as few packages from the available packages as you want. You need to have Android SDK Tools, revision 8, which should already be installed, and Android SDK Platform-tools, revision 1 at a minimum. Press Install Selected when you are ready. When finished, close the Manager.
Closing Notes:
At this point you will have the tools to decompress a nandroid backup image and work with those files to create a basic ROM, download repos, download source code from github, and be able to do other things that are used to develop for Android phones. This is by no means all inclusive. It is just a basic setup to get you ready to do some of the things possible. If people find this useful, I may write other guides to explain how to do other things, so give me feedback.
I was going to ask you if you could do a step by step. I jade downloaded all the stuff was having a few issues getting going.
THANKS.
Sent from my SCH-I500 using XDA App
All systems go.. LOL awaiting further instructions.
and again .. Thanks..
Wow, this is great....i will be setting this up as soon as i have a couple of hours to spare.
Thx
Sent from my SCH-I500 using Tapatalk
Some extra info..
Some other nice sites to mention if you're truley interested in getting into building your own ROMs and not just porting (but certainly porting as well) might be:
Samsung Open Source Release Center:
http://opensource.samsung.com/index.jsp
From the Samsung OSRC you can get the source files to compile the Linux kernel for the Samsung Mezmerize. You will have to sign up for an account (free) and the download speeds are throttled but whatever.. it's the source files right from the manufacturer.
After you learn how to compile the kernel from Samsung source, you might take a stab at compiling the Voodoo v5 lagfix kernel for the mezmerize yourself.
Project Voodoo:
http://project-voodoo.org/
Project Voodoo has some very nice documentation and their own IRC channel on freenode #project-voodoo if you have any questions. After you work through compiling a modified kernel, you should be on your way to working on building your own roms and possibly helping with development and porting work for the 2.2 and 2.3 versions of the Android Open Source Project.
Most of these efforts can be found on github using their nice search. Or, look at the 2.1[Alpha] ROM thread for links to the fascinate source:
http://forum.xda-developers.com/showthread.php?t=898231
On that note, GET FAMILIAR USING GIT. You should already have git on your linux distro if you followed the instructions above (or if you've ever issued a sudo apt-get install git command). git has a very nice tutorial and extensive man documentation which can be accessed using:
man 7 gittutorial
Why? Because:
http://android.git.kernel.org/
and:
http://source.android.com/source/git-repo.html
I hope this extra info helps. And for some positive reinforcement.. building a kernel and subsequently rom is not that difficult (assuming you're knowledgeable in Computer Science and have some enthusiasm for a project like this.. for someone without prior knowledge it's a different issue..). But it is a BIG task. With that in mind, it just requires a lot of persistance and A LOT of reading, checking, and double checking. If you're willing to take the time to read others' documentation and build upon what they've done you can do a lot!
Some further reading that may interest you:
What is Android?
http://developer.android.com/guide/basics/what-is-android.html
Dalvik Virtual Machine
http://sites.google.com/site/io/dalvik-vm-internals
http://www.usenix.org/events/vee05/full_papers/p153-yunhe.pdf
Odex? Deodex?
http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/dexopt.html;hb=HEAD
^^great article read it!!
decompiling and recompiling the .odex class
http://code.google.com/p/smali/
Excellent info, thanks for this!
This is good too:
http://www.cmsgs.com/mediawiki/index.php?title=Build_CyanogenMod_for_Samsung_Fascinate
Sweet I'm gonna add this to my Mac and get on the path to actual development, not just flashing stuff. I'm glad to see that virtual box runs on OSX I was just gonna use this as another excuse to add another OS and make my wife even happier... Thanks for all the info guys, and any more guides that you find the time for would be appreciated greatly! I got lots of reading to do now, and now I have something to do besides scrape snow off my car.
droidzach said:
Sweet I'm gonna add this to my Mac and get on the path to actual development, not just flashing stuff. I'm glad to see that virtual box runs on OSX I was just gonna use this as another excuse to add another OS and make my wife even happier... Thanks for all the info guys, and any more guides that you find the time for would be appreciated greatly! I got lots of reading to do now, and now I have something to do besides scrape snow off my car.
Click to expand...
Click to collapse
Feel free to ask us any specific questions you may have. You can find us in #samsung-mesmerize on freenode.net irc.
Bump, this should be stickied.
Scotsman, Are you receiving all of our pm's? I sent a few today, not sure if you've had a chance to read them but someone else thought the same so I wonder if the forum is having issues sending them to you?
bdemartino said:
Bump, this should be stickied.
Scotsman, Are you receiving all of our pm's? I sent a few today, not sure if you've had a chance to read them but someone else thought the same so I wonder if the forum is having issues sending them to you?
Click to expand...
Click to collapse
He probably gets lot's of pm's every day.. I doubt he reads them. He hasn't read mine. Someone might try contacting the XDA admins and getting us a mod here who actually owns a Mesmerize. As far as I understand, TheScotsman is an HTC guy (well at least not Samsung)...
Edit: Not trying to sound hostile, just frank. I also hadn't seen this:
http://forum.xda-developers.com/showpost.php?p=10927527&postcount=6
Perhaps we just need to work with him to revamp the stickies here a bit. I agree we need some solid stickies so users aren't asking the same old over and over again. I'm sure we'll be able to work things out in time.
dcow90 said:
He probably gets lot's of pm's every day.. I doubt he reads them. He hasn't read mine. Someone might try contacting the XDA admins and getting us a mod here who actually owns a Mesmerize. As far as I understand, TheScotsman is an HTC guy (well at least not Samsung)...
Edit: Not trying to sound hostile, just frank. I also hadn't seen this:
http://forum.xda-developers.com/showpost.php?p=10927527&postcount=6
Perhaps we just need to work with him to revamp the stickies here a bit. I agree we need some solid stickies so users aren't asking the same old over and over again. I'm sure we'll be able to work things out in time.
Click to expand...
Click to collapse
Yea, I really don't think he's receiving all the pm's. He was very fast to notice and suggest a separate thread for my newb guide (to be stickied) but I sent a few more pm's requesting a few other threads be done as well but no response. The very odd thing is only my initial response to his pm shows in my "sent" messages, none of the others are so I am wondering if the forum limits the amount a user can send to a mod.
bdemartino said:
Bump, this should be stickied.
Click to expand...
Click to collapse
What he said.
Unbuntu 10.10 32bit vs 64bit
Hi Developers!
I've downloaded Unbuntu 10.10 32bit Desktop and burned the image onto a CD.
Just wondering about the which flavor we should be using for development work.
There is 32bit and 64bit. I know that 32bit has been around for way longer.
But, should we be looking at 64bit for development?
Thanks,
Kevin
For anything past 2.2 you will need 64bit Ubuntu. This is kinda odd but whatever. Definitely go 64bit, none of the 'new' sources will compile without it (= Now, if the dev site would just update their instructions to reflect the latest policies.. .. their primary instructions are still for 32bit and their 64bit instructions are 'experimental' (but they work fine).
dcow90 said:
For anything past 2.2 you will need 64bit Ubuntu. This is kinda odd but whatever. Definitely go 64bit, none of the 'new' sources will compile without it (= Now, if the dev site would just update their instructions to reflect the latest policies.. .. their primary instructions are still for 32bit and their 64bit instructions are 'experimental' (but they work fine).
Click to expand...
Click to collapse
Good to know! Thanks man!
Onebryteday said:
Good to know! Thanks man!
Click to expand...
Click to collapse
I get to this point and get this.
[email protected]:~/Downloads$ tar . android-sdk_r10-linex_x86.tgz
tar: invalid option -- '.'
Try `tar --help' or `tar --usage' for more information.
[email protected]:~/Downloads$
what am i doing wrong thanks for any help or info.
none of this ever works for me
im lucky I get to decompile apk's
oostah said:
I get to this point and get this.
[email protected]:~/Downloads$ tar . android-sdk_r10-linex_x86.tgz
tar: invalid option -- '.'
Try `tar --help' or `tar --usage' for more information.
[email protected]:~/Downloads$
what am i doing wrong thanks for any help or info.
Click to expand...
Click to collapse
Typo . android-sdk_r10-linex_x86.tgz should be
. android-sdk_r10-linux_x86.tgz
Also you cannot type all of the code word for word as some of the files you download have different names or are in different folders than where phidelt originally had them. Just read the filenames and make sure that you have the correct directories where files are located.
Well im done setting up, where do I go from here :/ by the way I "thanked you" XD
Related
OK, here is the latest. This thread topic has changed a lot since I started it so I deleted it all and am cleaning it up.
A few weeks ago I wrote a .sh script that would check a file to find if there was a new version of the JF roms available. Updating is a pain and I wanted to make it easier. Not knowing Java I decided to write a .sh script which worked but was not very easy to use itself. To make it easier I asked for help here in making a frontend Android app to go with it. Since then, [RiS] has written a nice client that not only does what my script did, but does it without needing my script. The whole process is taken care of within the application. This makes it easier to use, faster and able to do a lot more than my script ever. The app is still in beta at this time but is coming along nicely.
The app name is JFupdater and currently it read a text file on my server (http://android-dls.com/up.txt). The info in that file tells the app if there is a new JF Rom available. I update this file whenever JesusFreke releases a new rom. There are fields for US G1, UK G1 and ADP1 which allows roms for all 3 to be tracked and updated. The version, description, md5sum and a list of mirrors to download. The application checks your phone type (or the phone type you select in the settings) and then checks this file to see if a newer version is available. IF there is it will let you know which are ready for download and give you a download button. Once downloaded the file can be applied by rebooting into recovery.
I believe he is working on making the reboot to recovery/apply update more automates so that after download you would be asked if you want to apply it now, and by choosing yes it would reboot and auto install the update like an official OTA would do.
There is currently a service set that allows you to set it to look for an update ever 1 hour, 24 hours or on boot.
The url where this project is located is: jfupdater.googlecode.com
I'm not sure how to run shell commands through an app. If anyone knows how I can definitely write the service to do this.
I know its possible because someone in #android wrote one. Also another thing that might need to be done would be to copy this file to /cache and chmod it (if its on sdcard it cannot be executed). I will try to ask around how to run a shell command for you.
ok, not sure if this helps, but this is from the source of Koush's superuser whitelist (thanks for making that available for us):
String command = String.format("echo \"mount -oremount,rw /dev/block/mtdblock3 /system\" | %s\nexit\n", suCommand);
Process p = Runtime.getRuntime().exec("sh");
OutputStream writer = p.getOutputStream();
writer.write(command.getBytes("ASCII"));
Thread.sleep(500);
and
if (superuser.exists())
{
// return device to original state
Process process = Runtime.getRuntime().exec("superuser");
DataOutputStream os = new DataOutputStream(process.getOutputStream());
os.writeBytes("busybox cp /system/bin/superuser /system/bin/su\n");
os.writeBytes("busybox chown 0:0 /system/bin/su\n");
os.writeBytes("chmod 4755 /system/bin/su\n");
os.writeBytes("rm /system/bin/superuser\n");
os.writeBytes("exit\n");
os.flush();
}
Hopefully the info you need is in this (i dont know java, but that looks like the code to me)
What about "running" the script code directly in the service? I mean, translate the script into java code.
This would remove the need of executing a shell script, and you wouldn't rely on system tools (that may change or crash in future updates / new devices).
Moreovew, it would also allow to add more options (Like check for updates, and when an update is found, ask the user if they want to download it or not. This could be useful if he is on a slow connetion, or it has not an unlimited data plan...)
I can start/work with LPChris on this.
I was just looking at your update.sh script.
Just to clean it up a little, you can use a split function.
myString = jlatest.split("|")
That would split the text at everyone and give you
myString(0) = "version"
mystring(1) = "md5sum"
mystring(2) = "mirror1"
mystring(3) = "mirror2"
etc...
So yeah. I'm glad that you're doing this though.
I'm not any good at java so I can't help sadly enough.
I should start learning though.
I'm also interested in an app the can run scripts (which I can make shortcuts for..)
I'm not an java developer, however I've started writing something that could do that using a code similar to the above.
any other developers that can assist ?
ido said:
I'm also interested in an app the can run scripts (which I can make shortcuts for..)
I'm not an java developer, however I've started writing something that could do that using a code similar to the above.
any other developers that can assist ?
Click to expand...
Click to collapse
I'm actually building out the service now, I'll work on it more after I get home from work tonight. If you're good with building services too, by all means have a crack at it.
this will be awesome. can you make it for uk versions too please
I have started working on this, hopefully will have a working version by tommorow.
Also, we have some bandwidth available at modmygphone.com which we can use for the mirror.
As I said I am a n00b when it comes to .sh scripts, and this is probably my third. If you have a way to make it work better, by all means let me know. As for making a java app that does all of this, if you can do it, great! I do not really care about the script other than the fact that I couldnt do this any other way and didn't want to be begging for a developers help unless I had already done what I could myself.
I have been working on a similar concept myself. I even got the /cache/recovery/command stuff working. Just write the following commands to that file:
Code:
boot-recovery
--update_package=partition:file
Then you can run 'reboot recovery' from the terminal and the phone will automatically reboot into recovery mode and apply the update. It won't go back into user mode on its own though (you have to hold home+back to do so).
I would much prefer this to be a GUI based utility, instead of a shell script that just runs in the background. We could apply ROM updates, themes etc right on the phone by simply giving a URL to the location of the file and have the phone do the rest
Datruesurfer said:
Then you can run 'reboot recovery'
Click to expand...
Click to collapse
Thanks for this, we were looking into how to do this. How did you find that out? I guess the android app that does all this can now force the reboot also
Datruesurfer said:
I have been working on a similar concept myself. I even got the /cache/recovery/command stuff working. Just write the following commands to that file:
Code:
boot-recovery
--update_package=partition:file
Then you can run 'reboot recovery' from the terminal and the phone will automatically reboot into recovery mode and apply the update. It won't go back into user mode on its own though (you have to hold home+back to do so).
I would much prefer this to be a GUI based utility, instead of a shell script that just runs in the background. We could apply ROM updates, themes etc right on the phone by simply giving a URL to the location of the file and have the phone do the rest
Click to expand...
Click to collapse
That's too easy! good find
Any word on the progress?
Darkrift said:
Any word on the progress?
Click to expand...
Click to collapse
LPChris and myself have started a project on google code, we expect to have some working code soon.
Anyone who wants to contribute with ideas, testing, etc.. is welcome!
For some reason my Subclipse isn't playing nice with the Google Code repository right now so I haven't been able to get any of my code up there yet, but hopefully we'll have something going fairly soon. I'm going to rewrite as much of it as I can in Java so that the user can be notified and authorize the download in two separate steps.
[RiS] said:
LPChris and myself have started a project on google code, we expect to have some working code soon.
Anyone who wants to contribute with ideas, testing, etc.. is welcome!
Click to expand...
Click to collapse
Any details for this?
[RiS] said:
LPChris and myself have started a project on google code, we expect to have some working code soon.
Anyone who wants to contribute with ideas, testing, etc.. is welcome!
Click to expand...
Click to collapse
I had actually registered a domain with this type of thing in mind in the past. androidupdatetracker.com. I would be happy to donate it to the cause
Darkrift said:
Any details for this?
Click to expand...
Click to collapse
So far we have an empty Google Code project going. Like I said before, I haven't been able to connect my environment to the google code cvs. I'm hoping to be able to spend some time on it tonight if I can. If anyone else wants to help out here that has some free time then I'm open to it. I've just been busy with work and my GasBot application.
First of all, I hope this is the right place, well a right place, I think this falls under WebOS and Linux subjects.
As per the instructions for building and pushing Open WebOS (seen on webos-ports.org), one needs BitBake. Anyone successfully install BitBake on Ubuntu 12.10? I tried sudo apt-get bitbake, but I get an error saying it was removed from the software repo. Similarly, all the launchpad.net links for it have been removed.
Is BitBake not available for 12.10, would it work if I went down to 12.04? I'd install it manually, I just can't find it.
Anyone?
jimmyco2008 said:
First of all, I hope this is the right place, well a right place, I think this falls under WebOS and Linux subjects.
As per the instructions for building and pushing Open WebOS (seen on webos-ports.org), one needs BitBake. Anyone successfully install BitBake on Ubuntu 12.10? I tried sudo apt-get bitbake, but I get an error saying it was removed from the software repo. Similarly, all the launchpad.net links for it have been removed.
Is BitBake not available for 12.10, would it work if I went down to 12.04? I'd install it manually, I just can't find it.
Anyone?
Click to expand...
Click to collapse
Nevermind, I think I got it...
http://launchpadlibrarian.net/70814496/bitbake_1.12.0-1_all.deb
HOWEVER.
When I try to execute . setup-env in Terminal, I get a TOPDIR not defined error. Sometimes it references a file in a location, saying it doesn't exist. It exists, though...
Thanks.
Okay this is REALLY freakin' irritating!!
I have been itching to cook up my own ROM in the kitchen...BUT I CAN'T EVEN USE IT!
I have tried installing it, multiple times (deleting everything each time to start fresh), and follow all instructions to the "T", and every single time I open Cygwin (after putting in the kitchen and renaming it) and "cd kitchen" enter "./menu", it always comes up saying "Error: The application 'gcc' is not installed - the kitchen will not function properly without it. Ensure you did not miss a step during installation! Refer to the Android Kitchen FAQ...", etc. (I could swear it installed devel > gcc when I installed Cygwin. Even used the Install all option and stuff...)
Checked out the FAQ and everything, but I still can't find it! Everything I try just doesn't work! Can someone please help?? (thank you)
R: [Q] Android Kitchen "gcc not installed" error
Thats weird.....u on ubuntu? As far a s i remember i never had to install gcc it was already there....but i could be wrong.
Uninstall gcc. Go get it from official repo, retry. If it doesn't work this is more of a question for ubuntu forums theyll get anything working on a pc.
Sent from my GT-I9300 using xda app-developers app
Haha, actually I'm using Windows XP Professional. (Though I do have it dual-booted with Zorin OS...)
Yeah and uh...I'm not sure how you would directly uninstall gcc either...
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
R: [Q] Android Kitchen "gcc not installed" error
Wait.....what? Isnt zorin based off ubuntu? Why dont u install android kitchen stuff there?
Sent from my GT-I9300 using xda app-developers app
killbubble said:
Wait.....what? Isnt zorin based off ubuntu? Why dont u install android kitchen stuff there?
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Well, yes. It is.... I just figured it would be a lot more convenient to do everything on Windows instead.
There are times when it seems like things that were designed for Ubuntu don't really seem to work on the zorin distro. In this case, it probably will. I'm not really sure why I can't effectively connect to my phone though when in Zorin...maybe because there is a Kies for linux? I dunno...
I suppose I could try to install it though.
But anyways, more to the point! If cygwin/android kitchen was designed to also work in Windows XP/Vista/7, then why am I getting this error, and how do I fix it?
R: [Q] Android Kitchen "gcc not installed" error
Thats why i use kubuntu. Though i can't answer your question, i do know ubuntu and windows hate each other, getting that stuff to work is gonna probab be a pain.
If zorin has got problems try emulating a small os (so u dont waste too much time) based off linux (lucid puppy linux) and see if that works.
I wouldve thought people would also be modding android stuff directly on windows rather than emulating ubuntu stuff...after all android is open source.
Sent from my GT-I9300 using xda app-developers app
killbubble said:
Thats why i use kubuntu. Though i can't answer your question, i do know ubuntu and windows hate each other, getting that stuff to work is gonna probab be a pain.
If zorin has got problems try emulating a small os (so u dont waste too much time) based off linux (lucid puppy linux) and see if that works.
I wouldve thought people would also be modding android stuff directly on windows rather than emulating ubuntu stuff...after all android is open source.
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Okay. Thanks for your suggestions. I may try and either do it on zorin, or repartition with kubuntu or something.
Too bad I can't do it in Windows...
Yeah, it's dumb that we still can't directly modify Android from Windows and have to use Linux. Well, actually, not as much "dumb" as inconvenient. Linux is free, yet it's different. I think we should be able to do it anywhere due to Android being open source.
Oh well... I don't understand why no-one else is having this problem. They have the guides for it on here (beginner's guides to making ROMs and stuff like that), and it seems as though nobody else has had this problem...or nobody even uses Windows. orz
Hopefully someone else will attempt to answer my question. thanks though. <
R: [Q] Android Kitchen "gcc not installed" error
well many developers are also pc fanatics and experiment new oses and grow to like open soyrce/free ones more than windows. many java devs use linux oses. Thats how devs roll. I use c and i like windows so i do it all in windows, but i know the editor/debugging programs are better on ubuntu than those available for windows....still....windows is...too much to shut down at times...
Sent from my GT-I9300 using xda app-developers app
killbubble said:
well many developers are also pc fanatics and experiment new oses and grow to like open soyrce/free ones more than windows. many java devs use linux oses. Thats how devs roll. I use c and i like windows so i do it all in windows, but i know the editor/debugging programs are better on ubuntu than those available for windows....still....windows is...too much to shut down at times...
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
You're probably right. I'm sure I'll be able to get used to it eventually, when I become a full developer. For now though, it's the learning curve. XD
Haha, yeah. That's good though. Windows is definitely enjoyable. (though I can't say much for W8. Ugh.)
So uh, I guess the Android Kitchen definitely works here in Zorin. Went to the menu without any problems. Funny still how it doesn't work in Windows....
You know, I'd probably have just skipped the whole kitchen thing and gone straight to development from source...but I'm not running on a x64 system, and therefore can't work on ICS and JB. :c
Soon though...very soon I will have all the parts to build my new computer, and not have to use this low-power laptop. >m>
Ascyndaeon said:
Okay this is REALLY freakin' irritating!!
I have been itching to cook up my own ROM in the kitchen...BUT I CAN'T EVEN USE IT!
I have tried installing it, multiple times (deleting everything each time to start fresh), and follow all instructions to the "T", and every single time I open Cygwin (after putting in the kitchen and renaming it) and "cd kitchen" enter "./menu", it always comes up saying "Error: The application 'gcc' is not installed - the kitchen will not function properly without it. Ensure you did not miss a step during installation! Refer to the Android Kitchen FAQ...", etc. (I could swear it installed devel > gcc when I installed Cygwin. Even used the Install all option and stuff...)
Checked out the FAQ and everything, but I still can't find it! Everything I try just doesn't work! Can someone please help?? (thank you)
Click to expand...
Click to collapse
My ERROR like ur ERROR.!
What should I do????
moj.enjoy said:
My ERROR like ur ERROR.!
What should I do????
Click to expand...
Click to collapse
Well, if I could go back in time 3 years I would be able to try and help you...I just tried it on Windows 10 here and everything works.
So, follow the instructions as far as even the cygwin_install.txt they provided. You should make sure you install /just/ the gcc-core and gcc-g++ when it tells you to tick the gcc (do not get the "cygwin gcc", idk if that did it, but just get the normal gcc). Follow all the others as well; far as I could tell the linux-util wasn't actually in utils (core instead I think?) but was already ticked, so don't worry about it unless it isn't.
After everything is done, make sure java is good to go and all, and cd to the kitchen location (just put the files in a new file, C:/kitchen/) and change directory to that. Then do the ./menu and it should work....
Also don't bump super old posts, not good. c: Either way I hope this helps. Real simple.
I really have no use for the kitchen anymore, since my GS3 gets CM nightlies (up to marshmallow? Wat!) and I have a Nexus 5X anyway so it's all gucci. But either way...yeah. It works to my knowledge.
Cheers~
(admin close thread nao? or can I do that...)
Ascyndaeon said:
Well, if I could go back in time 3 years I would be able to try and help you...I just tried it on Windows 10 here and everything works.
So, follow the instructions as far as even the cygwin_install.txt they provided. You should make sure you install /just/ the gcc-core and gcc-g++ when it tells you to tick the gcc (do not get the "cygwin gcc", idk if that did it, but just get the normal gcc). Follow all the others as well; far as I could tell the linux-util wasn't actually in utils (core instead I think?) but was already ticked, so don't worry about it unless it isn't.
After everything is done, make sure java is good to go and all, and cd to the kitchen location (just put the files in a new file, C:/kitchen/) and change directory to that. Then do the ./menu and it should work....
Also don't bump super old posts, not good. c: Either way I hope this helps. Real simple.
I really have no use for the kitchen anymore, since my GS3 gets CM nightlies (up to marshmallow? Wat!) and I have a Nexus 5X anyway so it's all gucci. But either way...yeah. It works to my knowledge.
Cheers~
(admin close thread nao? or can I do that...)
Click to expand...
Click to collapse
before ur comment
I found my answer with try and try..!!:laugh:
just setup cygwin again and saearch(gcc) and enable to install.
next ,another error and ...
THX for ur comment.
by the way how to create custom recovery for galaxy?
I'm glad to hear it's working for you! Hope you have great fun with it like I did. ^-^
And for the custom recovery...I say it's not really worth it unless you're really serious and can code. Not sure myself how one would make such a thing that has that access, you probably should ask somebody who's actually made them. Otherwise I strongly recommend either Team Win Recovery Project or ClockworkMod. (I use ClockworkMod, but most say twrp is better)
^-^
I've noticed a lot of people having issues getting ROMs to boot, Wifi probelms, etc. So I've decided, since I don't have much time to maintain a ROM, I would make a Tips and Tricks thread for users to be able to look at and solve things on their own.
This thread will be a compilation of noob level fixes to harder, more knowledgable fixes.
This will constantly be updated, so if you have anything you would like to add, post it up and i'll add it to the OP.
Redpoint also has an AWESOME resource compilation of anything and everything located in this specific EVITA forum.
That's located HERE
Boot Issues
Shelld causing ROM not to boot
This happens more commonly with MIUI. During the porting process one of the most tricky files needed is the shelld located in /system/xbin.
If your MIUI build or ROM download isn't booting up, and your logcat saying something to the effect of "trying to initialize shell service"... It's a shell problem.
To fix this, you'll need the following:
any form of Android Kitchen, I use dsixda's kitchen found in the main development section of the forums.
a text editor, I use Text Editor that comes with Ubuntu 12.04LTS
Steps:
take the ROM
unpack the boot.img into the kernel and ramdisk with your android kitchen
open the ramdisk folder
open you INIT.RC file in a text editor
at the very bottom insert these lines:
Code:
service shelld /system/xbin/shelld
class main
Click to expand...
Click to collapse
WiFi Issues?
Credit for this one is given to flar2. A lot of users were having trouble with WiFi when running the Sense 5 port by ImagioX1 along with the latest ElementalX kernel.
Two ways to do this. One is from your phone, the other is from your computer.
#1, Phone
What you'll need:
a root file exlplorer
a working HTC OneX(Evita)
ElementalX kernel installed
Steps:
After rom has booted navigate to /system/etc and open init.qcom.post_boot.sh. with a text editor.
Scroll to the very bottom and paste this there.( Make sure it is the last line )
Code:
insmod /system/lib/modules/prima_wlan.ko
Save and exit the file and then do a full reboot. When the phone comes back on wifi should be working.
#2, Computer
What you'll need:
a text editor, I use Text Editor that comes with Ubuntu 12.04LTS
Steps:
navigate to /ROMfolder/system/etc
open, in a text editor, init.qcom.post_boot.sh
at the very bottom, type
Code:
insmod /system/lib/modules/prima_wlan.ko
save, exit, profit.
Click to expand...
Click to collapse
ADB and Fastboot
While gunnyman has a sticky thread for this, I decided I would go ahead and add it in to my thread as well.
This is for any LINUX distro.
if you're running a linux distro and are having trouble getting ADB started, this is what you do to solve this issue...
Download my ADB/Fastboot .zip I have linked HERE
extract to a folder on your desktop
open terminal
cd to that folder you have extracted to binaries to
type:
Code:
sudo adb kill-server
sudo adb start-server
BOTH AS SEPARATE COMMANDS
ADB is now initialized on your linux distro of choice
Click to expand...
Click to collapse
I'll add an apktool guide in a little bit, this one is a tricky tool. I'll also and a smali/baksmali guide for you people who want to, or are in the process of learning how to port.
I'll also make another thread and lock this. This one is not organized one bit and there is a maximum character limit per post... -,-
More to be added, these are the first to come to mind.
This will help a lot of the new people out there just flashing away. Good start, like to see how this evolves.
With regards to linux distros you should be able to install from repos using the package manager which will set up the paths for you as well, eliminating the need to be in a specific folder. Pretty simple too. May be a good idea to just add the distribution specific install from repo commands.
For ubuntu for example:
Sudo apt-get update
Sudo apt-get install android-tools-adb
Sudo apt-get install android-tools-fastboot
Sent from my HTC One X using xda app-developers app
exad said:
With regards to linux distros you should be able to install from repos using the package manager which will set up the paths for you as well, eliminating the need to be in a specific folder. Pretty simple too. May be a good idea to just add the distribution specific install from repo commands.
For ubuntu for example:
Sudo apt-get update
Sudo apt-get install android-tools-adb
Sudo apt-get install android-tools-fastboot
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
Fair enough, I'll add this to the OP in due time. I'm still trying to write up an apktool guide as well as a smali/baksmali guide. The one I wrote up in my How to Port a ROM thread isn't as detailed as it needs to be.
Thanks.
You're taking on too much!! Slow down
Sent from my HTC One X using xda app-developers app
exad said:
You're taking on too much!! Slow down
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
Since I don't have much time to maintain a ROM anymore, I want people to be able to have the resources to do it for themselves.
Myrder said:
Since I don't have much time to maintain a ROM anymore, I want people to be able to have the resources to do it for themselves.
Click to expand...
Click to collapse
Good attitude man. None of the roms we have really were exactly what I was looking for. Viper was very close but there were a few things about it too. I don't mean any disrespect to any dev (now that I'm one I see how hard they worked). Now that I know enough I can get make my own roms and get them just right. Glad to see you helping out.
Sent from my HTC Evita running Sense 5 RX ALPHA
Hello Xda, i own a ZTE midnight and just a few hours ago rooted it and would like to help port CWM to my device, i was looking at this https://www.facebook.com/ClockworkMod/posts/480999728601013 and wanted to start from there but i dont know how to extract the stock recovery, any help? like i said its already rooted and i think that All ZTE devices have unlocked bootloaders so this is possible. yes i have googled it please dont bark at me.
Hi trozzul,
I too want to port it to cwm but am also not able to extract my stock recovery.
Have you tried flashify? There is an option for backup boot.img and recovery.img . I tried it but doesn't seems to work.
It does create a 0 byte file named recovery.img . Maybe it isn't working on my phone.You try it on yours.
Thankx
Yuvraj
Sent from my iris 406Q using XDA Free mobile app
coder32 said:
Hi trozzul,
I too want to port it to cwm but am also not able to extract my stock recovery.
Have you tried flashify? There is an option for backup boot.img and recovery.img . I tried it but doesn't seems to work.
It does create a 0 byte file named recovery.img . Maybe it isn't working on my phone.You try it on yours.
Thankx
Yuvraj
Sent from my iris 406Q using XDA Free mobile app
Click to expand...
Click to collapse
i sorta found out myself with playing around in a terminal emulator. would you happen to know what partition your phone is? BML or MTD? i dont know what todo if your device is BML but if you think its MTD you can try in the terminal emulator app (from play market) type in
Code:
cat /proc/mtd
enter this in and you will see around 20 MTD files. find the MTD file with "Recovery" at the end, type this in for instance (DO NOT use this code, its what my device showed the Recovery MTD for.)
Code:
dd if=/dev/mtd/mtd12 of=/sdcard/recovery.img
and it will push your recovery to your SD card (in .img format), Pretty much say your recovery was MTD9 just put in that code but replace mtd12 with MTD9 mine was about 5MB i didn't know they were that small.
Trozzul said:
Hello Xda, i own a ZTE midnight and just a few hours ago rooted it and would like to help port CWM to my device, i was looking at this https://www.facebook.com/ClockworkMod/posts/480999728601013 and wanted to start from there but i dont know how to extract the stock recovery, any help? like i said its already rooted and i think that All ZTE devices have unlocked bootloaders so this is possible. yes i have googled it please dont bark at me.
Click to expand...
Click to collapse
To extract your stock recovery what you can do is the following to determine which partition is the recovery partition. From terminal emulator or adb shell, go to the /cache/recovery directory and look for a file called log or last_log if you cd into the /cache/recovery directory you can read the log file with the cat command: cat last_log. In the log file you will see a list of the partitions on your device. One of these will be your recovery partition, remember which partition block is your recovery partition and then run the command:
Code:
cat /dev/block/yourrecoveryblock > /mnt/sdcard/recovery.img
Let me know if you still have questions.
I had already tried it .it's BML :/
Congrates to you
Sent from my iris 406Q using XDA Free mobile app
shimp208 said:
To extract your stock recovery what you can do is the following to determine which partition is the recovery partition. From terminal emulator or adb shell, go to the /cache/recovery directory and look for a file called log or last_log if you cd into the /cache/recovery directory you can read the log file with the cat command: cat last_log. In the log file you will see a list of the partitions on your device. One of these will be your recovery partition, remember which partition block is your recovery partition and then run the command:
Code:
cat /dev/block/yourrecoveryblock > /mnt/sdcard/recovery.img
Let me know if you still have questions.
Click to expand...
Click to collapse
thanks for the info! i got the Recovery.img but would you happen to know if this site is not in use anymore? http://builder.clockworkmod.com/ i get 404s after i have uploaded it and i try to see mine in the que.
Trozzul said:
thanks for the info! i got the Recovery.img but would you happen to know if this site is not in use anymore? http://builder.clockworkmod.com/ i get 404s after i have uploaded it and i try to see mine in the que.
Click to expand...
Click to collapse
Clockworkmod recovery builder website has been hit and miss recently. Overall I would strongly recommend taking a look at this guide here that will teach you the basics of porting Clockworkmod Recovery to a new device, you will also learn a lot more doing it this way, as well as it being easier to fix any issues.
shimp208 said:
Clockworkmod recovery builder website has been hit and miss recently. Overall I would strongly recommend taking a look at this guide here that will teach you the basics of porting Clockworkmod Recovery to a new device, you will also learn a lot more doing it this way, as well as it being easier to fix any issues.
Click to expand...
Click to collapse
i have to use Ubuntu? could i not use the command prompt since the codes looks like you can use them there. Could i format one of my old computers and setup Ubuntu there?
Trozzul said:
i have to use Ubuntu? could i not use the command prompt since the codes looks like you can use them there. Could i format one of my old computers and setup Ubuntu there?
Click to expand...
Click to collapse
You have to use Linux or OSX but Ubuntu is highly recommended. You can't use command prompt as the Windows architecture isn't designed to build and cross compile for the architecture Android is based on. Yes, you could format your old computer and install Ubuntu on that and proceed from there.
Sent from my SCH-I535 using XDA Premium 4 mobile app
shimp208 said:
You have to use Linux or OSX but Ubuntu is highly recommended. You can't use command prompt as the Windows architecture isn't designed to build and cross compile for the architecture Android is based on. Yes, you could format your old computer and install Ubuntu on that and proceed from there.
Sent from my SCH-I535 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Cool, i will try my best to figure out how to get Ubuntu on this old thing, from looking it up looks like a simple process. could you recommend a good way to learn some basic commands like that guide asks for? i am using codecademy right now for some basic java and html stuff i know you need to know some of that stuff. its a single core 512mb of ram old XP computer, i dont know the system requirements for Ubuntu.
Trozzul said:
Cool, i will try my best to figure out how to get Ubuntu on this old thing, from looking it up looks like a simple process. could you recommend a good way to learn some basic commands like that guide asks for? i am using codecademy right now for some basic java and html stuff i know you need to know some of that stuff. its a single core 512mb of ram old XP computer, i dont know the system requirements for Ubuntu.
Click to expand...
Click to collapse
Your machine meets the minimum specs for Ubuntu (Barley) you could also check out Xbuntu or Lubuntu as well, make sure you use a 64-bit version as Android building requires that. Keep in mind with those specs you should be able to build it will just take a while to compile. For learning the basics of the Linux command line, this is a great guide just ignore the parts about Windows Power Shell (Or don't ignore them and learn twice as much!). The system requirements for Ubuntu can be found here as well for your reference. Android building does't really deal with HTML, it does deal with Java but as always the more you know the better because it just makes it easier to learn from there.
shimp208 said:
Your machine meets the minimum specs for Ubuntu (Barley) you could also check out Xbuntu or Lubuntu as well, make sure you use a 64-bit version as Android building requires that. Keep in mind with those specs you should be able to build it will just take a while to compile. For learning the basics of the Linux command line, this is a great guide just ignore the parts about Windows Power Shell (Or don't ignore them and learn twice as much!). The system requirements for Ubuntu can be found here as well for your reference. Android building does't really deal with HTML, it does deal with Java but as always the more you know the better because it just makes it easier to learn from there.
Click to expand...
Click to collapse
im pretty sure that computer i have is 32bit, so im screwed?
Trozzul said:
im pretty sure that computer i have is 32bit, so im screwed?
Click to expand...
Click to collapse
Is the operating system installed 32-bit or is the the CPU itself in your computer a 32-bit processor because if it's just a 32 -bit operating system you can still install the 64-bit version. But if it's a 32-bit processor then I'm afraid your out of luck. What you can do however is setup Ubuntu in a virtual machine on your main computer using Virtualbox.
shimp208 said:
Is the operating system installed 32-bit or is the the CPU itself in your computer a 32-bit processor because if it's just a 32 -bit operating system you can still install the 64-bit version. But if it's a 32-bit processor then I'm afraid your out of luck. What you can do however is setup Ubuntu in a virtual machine on your main computer using Virtualbox.
Click to expand...
Click to collapse
i was aware of the virtual machine ( still dont know how to do it lol) and i sorta didnt want to use it on my main computer i feel like to me it would be easier to just start linux on another computer. uh how would i tell if the processor on it is 32bit?
Trozzul said:
i was aware of the virtual machine ( still dont know how to do it lol) and i sorta didnt want to use it on my main computer i feel like to me it would be easier to just start linux on another computer. uh how would i tell if the processor on it is 32bit?
Click to expand...
Click to collapse
With Virtualbox you can setup Windows and Linux side-by-side and the good thing is if you mess something up in Virtualbox you regular windows installation is unaffected, I would highly recommend checking out this video walk though guide on how to install Ubuntu 14.04 LTS in Virtualbox. You can find out if you have a 32-bit processor or 64-bit processor by going to Accessories -> System Tools -> System Information (Or just search for System Information), then look at the System Type entry if it says x64-based PC you have a 64-bit processor if it says x86-based PC you have a 32-bit processor.
shimp208 said:
With Virtualbox you can setup Windows and Linux side-by-side and the good thing is if you mess something up in Virtualbox you regular windows installation is unaffected, I would highly recommend checking out this video walk though guide on how to install Ubuntu 14.04 LTS in Virtualbox. You can find out if you have a 32-bit processor or 64-bit processor by going to Accessories -> System Tools -> System Information (Or just search for System Information), then look at the System Type entry if it says x64-based PC you have a 64-bit processor if it says x86-based PC you have a 32-bit processor.
Click to expand...
Click to collapse
ill try to post back soon, i will try out virtualbox but im going to try to still get ubuntu on another computer i own, the other one ended up being x86 based. im sure the new one is 64-bit but it needs some work on it. thanks for the help so far!
Trozzul said:
ill try to post back soon, i will try out virtualbox but im going to try to still get ubuntu on another computer i own, the other one ended up being x86 based. im sure the new one is 64-bit but it needs some work on it. thanks for the help so far!
Click to expand...
Click to collapse
No problem buddy happy to help out, let me know how it goes!
shimp208 said:
No problem buddy happy to help out, let me know how it goes!
Click to expand...
Click to collapse
alright installed Ubuntu on one of my many computers, gonna try to build a setup a build environment, i have 75 gigs free on my hard drive, i heard the android source needs 100GB? could i put another hard drive in my computer thats 80gigs and would work?
Trozzul said:
alright installed Ubuntu on one of my many computers, gonna try to build a setup a build environment, i have 75 gigs free on my hard drive, i heard the android source needs 100GB? could i put another hard drive in my computer thats 80gigs and would work?
Click to expand...
Click to collapse
My apologizes for getting back to you so late @Trozzul I just finished with my finals the other day and didn't get home till much latter then anticipated hence the delay. While you could put in another 80 GB hard drive I would recommend picking up at least a 250 GB Hard Drive (They can be found online for about $30-$40), as that way you can be sure you won't run out of room and can have your main build environment all on one drive. But you can try it with the setup you have now and you can probably get away with it. As always let me know of any questions you have happy to help :highfive:.