[R&D] Writing custom Gear 2 roms, starting with the source. - Samsung Gear 2

As the most of you probably know the Gear 2's sources are released by Samsung over here: http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=r381
Are there amongst you who already started the development of custom software for this device or who have experience with Tizen's source code?
What I want to know right now:
How do I compile these sources?
Found information:
I found this guide (https://source.tizen.org/documentat...ctions/creating-tizen-images-scratch-one-page) which describes how to compile Tizen from scratch.
[UPDATE: 21/6/14] So we figured out you need a 32 bit Ubuntu install to be able to compile these files.
How can I push the compiled code to the Gear 2?
Found information:
Probably the tools provided with the Tizen SDK have the ability to create a rom package which we can deploy (Am I right here?) to the Smartwatch with Odin (http://forum.xda-developers.com/gal...08-2013-odin-3-09-odin-1-85-versions-t2189539). For the people unfamiliar with flashing watches (like me), here is how you set the watch in download mode: https://www.youtube.com/watch?v=EXT7kr3j2Ac.
Where do I have to start modding these sources to eventually be able to create an open platform for the Gear 2?
All help is appreciated!
Thanks

We probably have to see if we can even flash anything without modifications

CovXX said:
We probably have to see if we can even flash anything without modifications
Click to expand...
Click to collapse
This weekend I'm going to experiment with the source to see if I can compile it. I'll keep ya updated on the progress!

Corstian said:
This weekend I'm going to experiment with the source to see if I can compile it. I'll keep ya updated on the progress!
Click to expand...
Click to collapse
have you made any progress ??? even at emulated level ????

gav-collins1983 said:
have you made any progress ??? even at emulated level ????
Click to expand...
Click to collapse
I was stuck on compiling the source. My Ubuntu installation gives errors which say that it can't execute binary files. Also, on my primary PC I don't have enough free space on my hard disk to install Ubuntu. So after a while other stuff came through and I stopped trying around.
Whatsoever, I still have Gear 2 which is useless to me and you just motivated me to continue the journey
Btw, all help is appreciated

Corstian said:
I was stuck on compiling the source. My Ubuntu installation gives errors which say that it can't execute binary files. Also, on my primary PC I don't have enough free space on my hard disk to install Ubuntu. So after a while other stuff came through and I stopped trying around.
Whatsoever, I still have Gear 2 which is useless to me and you just motivated me to continue the journey
Btw, all help is appreciated
Click to expand...
Click to collapse
I have linux kali set up. On a vm on one of my machines. But I've only just started to learn linux. And my god there is a lot to learn. Once I get my wireless adaptor running in kali. Which I've had a little trouble with. And not a lot of time . I can maybe help. Even if it means installing Ubuntu onto another of my laptops . I just feel a little useless not knowing all the jargon for Linux as yet. Cmd is complicated even with Google help. I have a windows 7 a windows 8 and an Xp machine if it helps

gav83collins said:
I have linux kali set up. On a vm on one of my machines. But I've only just started to learn linux. And my god there is a lot to learn. Once I get my wireless adaptor running in kali. Which I've had a little trouble with. And not a lot of time . I can maybe help. Even if it means installing Ubuntu onto another of my laptops . I just feel a little useless not knowing all the jargon for Linux as yet. Cmd is complicated even with Google help. I have a windows 7 a windows 8 and an Xp machine if it helps
Click to expand...
Click to collapse
Practically the only thing you have to know is how the commands within the terminal works. Also, I can recommend you to already start downloading the source from the Samsung Opensource site (Search for SM-R380) as the download is very slow (1.3 Gb at 40 Kb/s). With the source, a guide is provided which exactly tells you how to compile it. Read this guide very carefully when trying to set up your environment!
Furtheron, once we're able to compile it all we can try to modify the source. I really don't know your coding skills but please notice this isn't a project to learn how to code. But for now, lets try to compile it all.

I'm out camping in the sticks at the moment. But once um home il look into it

ok dude im home, and im downloading, the sm-r380 --- sm r381 source code, i have the standalone sbd, but im gonna need the sdk too i imagine, so il grab that too, now to wait
edit.....
oh i see windows 8 isnt supported, this is my main machine, my win 7, is my wired media centre into my tv/av reciever......
gonna try running in compatibility for win 7 on my win 8 machine, fingers crossed, if not, il create a second linux vm, next to kali, ubuntu of course

gav83collins said:
ok dude im home, and im downloading, the sm-r380 --- sm r381 source code, i have the standalone sbd, but im gonna need the sdk too i imagine, so il grab that too, now to wait
edit.....
oh i see windows 8 isnt supported, this is my main machine, my win 7, is my wired media centre into my tv/av reciever......
gonna try running in compatibility for win 7 on my win 8 machine, fingers crossed, if not, il create a second linux vm, next to kali, ubuntu of course
Click to expand...
Click to collapse
I'd STRONGLY recommend you to run Ubuntu (12.04) for your build environment to prevent unnecessary hassle.
I'm downloading and installing an Ubuntu 12.04 AMD64 build. I guess, and hope, that the errors I got during my first time trying were because I used a x86 build of Ubuntu.

Corstian said:
I'd STRONGLY recommend you to run Ubuntu (12.04) for your build environment to prevent unnecessary hassle.
I'm downloading and installing an Ubuntu 12.04 AMD64 build. I guess, and hope, that the errors I got during my first time trying were because I used a x86 build of Ubuntu.
Click to expand...
Click to collapse
, ive had no errors installing the sdk i just toubleshooted compatibility first, and updating the repos, was pretty straight forward, i too am on an amd 64 bit windows,,,,,,,
what issues have you had, did you try the windows sdk b4 u installed linux
im still waiting on my source to download, after 6 hours waiting we had a power shortage here in western australia, typically my luck, ive restarted

gav83collins said:
, ive had no errors installing the sdk i just toubleshooted compatibility first, and updating the repos, was pretty straight forward, i too am on an amd 64 bit windows,,,,,,,
what issues have you had, did you try the windows sdk b4 u installed linux
im still waiting on my source to download, after 6 hours waiting we had a power shortage here in western australia, typically my luck, ive restarted
Click to expand...
Click to collapse
The problem isn't in installing the Tizen SDK. The problem is in compiling the Tizen source code and the dependencies needed to do this. I have attached the contents of the "HOW_TO_BUILD" file so you can see the steps needed to compile the Tizen source you are currently trying to download.
HOW_TO_BUILD
System requirement (Strongly recommended)
* OS: Ubuntu 12.04 or newer
Installing Development Tools in Ubuntu
* Open the source list by using text editor.
$ sudo vi /etc/apt/sources.list
* Add Tizen tools repository to the source list.
deb http://download.tizen.org/tools/latest-release/Ubuntu_12.04 /
* Resynchronize the package index files from the sources specified in the source list by executing the following command:
$ sudo apt-get update
* Install a development tool by executing the following command:
$ sudo apt-get install gbs
Build root strap setup
* Download build rootstrap and unpack into home directory
$ sudo tar xfz {build rootstrap name} --same-owner
* Change root to the build rootstrap
$ sudo chroot standard-armv7l
* Change account to abuild
$ su abuild
Building a package
* Source packages are in the /home/abuild/rpmbuild/SRPMS
* Build a package with rpmbuild
$ cd /home/abuild/rpmbuild/SRPMS
$ rpmbuild --rebuild {src.rpm name}
* You can find binary rpms in /home/abuild/rpmbuild/RPMS
Install a package
* rpm -ivh {src.rpm name}
* if {src.rpm name} is already installed : rpm -ivh --force {src.rpm name}

Corstian said:
The problem isn't in installing the Tizen SDK. The problem is in compiling the Tizen source code and the dependencies needed to do this. I have attached the "HOW_TO_BUILD" file so you can see the steps needed to compile the Tizen source you are currently trying to download.
HOW_TO_BUILD
System requirement (Strongly recommended)
* OS: Ubuntu 12.04 or newer
Installing Development Tools in Ubuntu
* Open the source list by using text editor.
$ sudo vi /etc/apt/sources.list
* Add Tizen tools repository to the source list.
deb http://download.tizen.org/tools/latest-release/Ubuntu_12.04 /
* Resynchronize the package index files from the sources specified in the source list by executing the following command:
$ sudo apt-get update
* Install a development tool by executing the following command:
$ sudo apt-get install gbs
Build root strap setup
* Download build rootstrap and unpack into home directory
$ sudo tar xfz {build rootstrap name} --same-owner
* Change root to the build rootstrap
$ sudo chroot standard-armv7l
* Change account to abuild
$ su abuild
Building a package
* Source packages are in the /home/abuild/rpmbuild/SRPMS
* Build a package with rpmbuild
$ cd /home/abuild/rpmbuild/SRPMS
$ rpmbuild --rebuild {src.rpm name}
* You can find binary rpms in /home/abuild/rpmbuild/RPMS
Install a package
* rpm -ivh {src.rpm name}
* if {src.rpm name} is already installed : rpm -ivh --force {src.rpm name}
Click to expand...
Click to collapse
thanks, but thats ubuntu, unless absolutley neccessary, i want to use windows 8, i dont think my machine will handle ubuntu with my linux kali on a vm, and all my cloud, n media editing software aswell, il just configure the enviroment variables to make it work..........hows your compiling going

gav83collins said:
thanks, but thats ubuntu, unless absolutley neccessary, i want to use windows 8, i dont think my machine will handle ubuntu with my linux kali on a vm, and all my cloud, n media editing software aswell, il just configure the enviroment variables to make it work..........hows your compiling going
Click to expand...
Click to collapse
Well crap! So I've installed Ubuntu 12.04 AMD64 as VM (Which runs pretty amazing btw) and I still have the same errors. Le me trying to dig deeper into the operating system to find the problem of this all. (I'm also not really into UNIX OS's) Turns out I / we all need a 32 bit operating system to be able to use the binary files.
Running the file xargs command on the xargs file gave this result:
Code:
xargs: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.25, stripped
Whatsoever, I gotta start downloading a 32 bit Ubuntu 12.04 iso.

Corstian said:
Well crap! So I've installed Ubuntu 12.04 AMD64 as VM (Which runs pretty amazing btw) and I still have the same errors. Le me trying to dig deeper into the operating system to find the problem of this all. (I'm also not really into UNIX OS's) Turns out I / we all need a 32 bit operating system to be able to use the binary files.
Running the file xargs command on the xargs file gave this result:
Code:
xargs: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.25, stripped
Whatsoever, I gotta start downloading a 32 bit Ubuntu 12.04 iso.
Click to expand...
Click to collapse
again thats ubuntu, with windows 64 win 8, you can runx86 0n 64 bit, dynamically, and also sys compat to any previous version, if you get errors, change the correct enviroment variable path
you do your way, il try mine, between us, we should get somewhere
i gotta be honest reading up on this app making, standalone, or otherwise, is blowing my mind, im not the brightest spark

gav83collins said:
again thats ubuntu, with windows 64 win 8, you can runx86 0n 64 bit, dynamically, and also sys compat to any previous version, if you get errors, change the correct enviroment variable path
you do your way, il try mine, between us, we should get somewhere
i gotta be honest reading up on this app making, standalone, or otherwise, is blowing my mind, im not the brightest spark
Click to expand...
Click to collapse
So I tried multiple editions of Ubuntu and still no luck in compiling the source. How's it going on Windows?

Corstian said:
So I tried multiple editions of Ubuntu and still no luck in compiling the source. How's it going on Windows?
Click to expand...
Click to collapse
My source download keeps failing. Can you mirror it to a fat er site
Like Google drive . Your own and share the folder to me. Australian Internet is ****. I'm currently dev testing the gear 2 Cam app on the s3 s5 and s5 over multiple android versions and builds 4.1.2, 4.2.2, 4.3, 4.4.x - aosp, Aokp, miui, cyanogen. Slim. Pa etc

When running the command "su abuild", I got the error message "bash: /bin/su: cannot execute binary file".
I use a vm of ubuntu 12.04 64bit.

Related

help porting a linux program to the android

hi all
i have created a custom rom for myself because i want to add a linux program: scanmem
i have copied the file in system/xbin
using this guide http://lukasz.szmit.eu/2009/12/making-your-own-rooted-android-rom.html on step6 for su command
the problem is that doesn't work ...
when i open a terminal in my desire and type :
su
scanmem
i receve this message:
scanmem: 1: syntax error: "(" unexpected
any help, suggestion ? scanmem is compiled for i386 32bit
kiokoman said:
any help, suggestion ? scanmem is compiled for i386 32bit
Click to expand...
Click to collapse
There's your problem.
Code:
[email protected]:/tmp$ file busybox
busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.14, stripped
[email protected]:/tmp$
If you don't have the source, time and a cross-compiler, you have a problem It's also Little Endian from memory.
This is the busybox binary I tested in case you want to strip it down: http://benno.id.au/blog/2007/11/14/android-busybox
i found a lot of information with google
http://www.kbrandt.com/2009/06/how-to-cross-compile-the-bash-shell-for-android-15.html
i have the source maybe i can compile for arm
kiokoman said:
i found a lot of information with google
http://www.kbrandt.com/2009/06/how-to-cross-compile-the-bash-shell-for-android-15.html
i have the source maybe i can compile for arm
Click to expand...
Click to collapse
Precisely. You should also check the dependencies (if any) and make sure you cross-compile those too.
jayshah said:
Precisely. You should also check the dependencies (if any) and make sure you cross-compile those too.
Click to expand...
Click to collapse
oh my god
depends on libc6 and readline6, i have to cross-compile half gnu/linux
out of my hand
Shame :/
Why did you need it anyway? Perhaps there is another way for what you want to achieve.
jayshah said:
Shame :/
Why did you need it anyway? Perhaps there is another way for what you want to achieve.
Click to expand...
Click to collapse
i think it was an easy program to port and with a frontend for android I would have used it as the first cheats system like cheat engine for pc
I made this. I compile scanmem fo my android phone (p500) from sourses.
He even gets up and running, but not quite.
Opt for a process (pid command)
It finds regions of memory. But during the search, crashes ". bus Error"
Maybe it's because of the specificity of an android, or due to the fact that I had to change all calls to readline lib, because otherwise the project will not compile.
I will continue to watch and understand ...
Done. Scanmem works fine on my phone.

[java][debian][armv6][jre1.6][jdk 7] [jdk 8]

woo, I found this gem on a search and ended up at talk.maemo.org in the n900 section.
oracle released an armv6/armv7 headless 1.6 jre binary set! way back in april, but I hadn't seen it until today.
works in debian squeeze on my armv6 (msm7627) optimus v... it runs, but I haven't put it through its paces yet for any real testing.
I thought someone might enjoy this since for a long time it was really hard to find a jre for arm debian except for icedtea, which isn't as compatible with some things as the oracle release hopefully is.
here is the post including a download link for the jre.
another post by the same user points to an arm-friendly java7 download as well.
thank you Fabry.
official Oracle java jdk now released for ARM Linux!
download page
editbsolete.
since the sun java6 jdk is available for download to arm devices through debian apt-get, but it has a set of binaries which won't work on the armv6, someone enterprising might be able to patch the jre binaries into the jdk for a usable armv6 jdk.
/end edit
edit:
to use the 1.6 jre...
download it from Oracle
copy it to /opt in your armel debian install (or chroot)
untar it there
Code:
cd /opt
tar -xzvf ejre-1_6_0_25-fcs-b06-linux-arm-vfp-eabi-headless-14_apr_2011.tar.gz
ln -s /opt/java/ejre1.6.0_25/bin/java /usr/bin/java
thank you Dak.
after that, you should be able to use java at the command line.
further down in the first linked thread are instructions for linking the jre to fennec, probably adaptable to iceweasel.
edit:
newer JDK!
JDK 8 (with JavaFX) for ARM Early Access
for armv6 hard float applications. Installation instructions for the Raspberry Pi are linked from that page. You have to accept a license agreement.
I know this was quite a long time ago, but you state that sun-java6-jdk is in debian repositories for arm, but I am not finding it.
Is there a download link for sun-java6-jdk on arm?
Hope you see this.
Take care man. And thanks for the great info!
DiehlC said:
I know this was quite a long time ago, but you state that sun-java6-jdk is in debian repositories for arm, but I am not finding it.
Is there a download link for sun-java6-jdk on arm?
Hope you see this.
Take care man. And thanks for the great info!
Click to expand...
Click to collapse
It showed up back then when google searching for the package, but apt-get won't bring it in because of the jre dependency it can't fulfill.
they must've realized and removed it.
It may be possible to get the x86 .deb and repack it with the jre binaries or something... I actually had it installed on some chroot on my android phone to try building the android emulator on-device (which eventually worked, but the dang thing wouldn't boot in qemu.)
I'll dig around and see if I've still got it, but no guarantees.
bigsupersquid said:
It showed up back then when google searching for the package, but apt-get won't bring it in because of the jre dependency it can't fulfill.
they must've realized and removed it.
It may be possible to get the x86 .deb and repack it with the jre binaries or something... I actually had it installed on some chroot on my android phone to try building the android emulator on-device (which eventually worked, but the dang thing wouldn't boot in qemu.)
I'll dig around and see if I've still got it, but no guarantees.
Click to expand...
Click to collapse
I reolize this topic is a bit older but thought it would be worth letting you all know that installing orical's Java is way easier on Android running Linux. I've been at it awile and have a script set up to fully install the soft float version of JDK 7 and am working on a downloader script (it is actually a tall order reliably downloading the source from orical reliably) to incorperate in when debugged. Eventually I'll be testing/writing one for hard float versions too but for now you all can find what has been tested as working with "Debian Kit" from here https://github.com/S0AndS0/Debian-Kit-Mods check the readme for how to modify for your preferred version of Java and enjoy
Update 02272014- the java downloading script I mentioned earlier is now ready for testing; you may use it to download jre or jdk either hard float or soft float (4 options) and the installer script has been updated for soft float jdk version 7u51. I'll be working on making the download script call up the installer scripts today too
Update 03032014- try the "ARM_Linux_Mods" script in the above github; it will step you through the download and installation of Java JDK soft or hard float.
bigsupersquid said:
woo, I found this gem on a search and ended up at talk.maemo.org in the n900 section.
oracle released an armv6/armv7 headless 1.6 jre binary set! way back in april, but I hadn't seen it until today.
works in debian squeeze on my armv6 (msm7627) optimus v... it runs, but I haven't put it through its paces yet for any real testing.
I thought someone might enjoy this since for a long time it was really hard to find a jre for arm debian except for icedtea, which isn't as compatible with some things as the oracle release hopefully is.
here is the post including a download link for the jre.
another post by the same user points to an arm-friendly java7 download as well.
thank you Fabry.
official Oracle java jdk now released for ARM Linux!
download page
editbsolete.
since the sun java6 jdk is available for download to arm devices through debian apt-get, but it has a set of binaries which won't work on the armv6, someone enterprising might be able to patch the jre binaries into the jdk for a usable armv6 jdk.
/end edit
edit:
to use the 1.6 jre...
download it from Oracle
copy it to /opt in your armel debian install (or chroot)
untar it there
Code:
cd /opt
tar -xzvf ejre-1_6_0_25-fcs-b06-linux-arm-vfp-eabi-headless-14_apr_2011.tar.gz
ln -s /opt/java/ejre1.6.0_25/bin/java /usr/bin/java
thank you Dak.
after that, you should be able to use java at the command line.
further down in the first linked thread are instructions for linking the jre to fennec, probably adaptable to iceweasel.
edit:
newer JDK!
JDK 8 (with JavaFX) for ARM Early Access
for armv6 hard float applications. Installation instructions for the Raspberry Pi are linked from that page. You have to accept a license agreement.
Click to expand...
Click to collapse
I'm working on AOSP. I copied all extracted tar file to somewhere inside system folder. When I type
Code:
java -version
It says:
Code:
/system/bin/sh: java: No such file or directory
But it exist!
In other side, I typed
Code:
ln -s /system/ejre1.6.0_25/bin/java /usr/bin/java
and it said:
Code:
4 /system/linux_arm_sflt/jre/bin/java 4 /system/bin/java
What should I do now?
UPDATE:
When I run java directly Or symbolink), it says:
Code:
/system/bin/sh: java: can't execute: Permission denied
And when I run it with busybox, it says:
Code:
java: applet not found
UPDATE:
Even when I root my device, I get above errors.
dr_jacky_2005 said:
thank you Dak.
after that, you should be able to use java at the command line.
further down in the first linked thread are instructions for linking the jre to fennec, probably adaptable to iceweasel.
edit:
newer JDK!
JDK 8 (with JavaFX) for ARM Early Access
for armv6 hard float applications. Installation instructions for the Raspberry Pi are linked from that page. You have to accept a license agreement.
I'm working on AOSP. I copied all extracted tar file to somewhere inside system folder. When I type
It says:
But it exist!
In other side, I typed
and it said:
What should I do now?
UPDATE:
When I run java directly Or symbolink), it says:
And when I run it with busybox, it says:
UPDATE:
Even when I root my device, I get above errors.
Click to expand...
Click to collapse
you have to run Java in a Linux chroot.
Android shell can't handle it (system/bin/sh is definitely Android path)
bigsupersquid said:
you have to run Java in a Linux chroot.
Android shell can't handle it (system/bin/sh is definitely Android path)
Click to expand...
Click to collapse
What do you mean by run it in a Linux chroot?
If you means run it after type SU command, I did.
I root my device, then I can use su command in shell.
But if you means something else, please explain more in detail.
Thanks.
dr_jacky_2005 said:
What do you mean by run it in a Linux chroot?
If you means run it after type SU command, I did.
I root my device, then I can use su command in shell.
But if you means something else, please explain more in detail.
Thanks.
Click to expand...
Click to collapse
here's an example of how to use a chroot for Nexus 10
you can also look up lil debi, linuxonandroid, and variations of "chroot (debian, Ubuntu) on Android" with Google, for more information.
bigsupersquid said:
here's an example of how to use a chroot for Nexus 10
you can also look up lil debi, linuxonandroid, and variations of "chroot (debian, Ubuntu) on Android" with Google, for more information.
Click to expand...
Click to collapse
All of these installed a virtual Linux that can access with VNC!
But I want to put java binary and its libraries in my Android source, and compile it; then run my jar file with for wxampel installed terminal amulator.apk, or from PC (adb shell command).
Is that possible?
dr_jacky_2005 said:
All of these installed a virtual Linux that can access with VNC!
But I want to put java binary and its libraries in my Android source, and compile it; then run my jar file with for wxampel installed terminal amulator.apk, or from PC (adb shell command).
Is that possible?
Click to expand...
Click to collapse
probably not. the Java binary relies on Linux libraries, like libc instead of bionic. not seen anything about running Java under Android except for their dalvik java.
bigsupersquid said:
probably not. the Java binary relies on Linux libraries, like libc instead of bionic. not seen anything about running Java under Android except for their dalvik java.
Click to expand...
Click to collapse
Do you mean if I install a buildroot on my device, or pure linux from first (there is no android on my device anymore), then I can use JRE for armv7 and run a jar with GUI?
dr_jacky_2005 said:
Do you mean if I install a buildroot on my device, or pure linux from first (there is no android on my device anymore), then I can use JRE for armv7 and run a jar with GUI?
Click to expand...
Click to collapse
I've not had tons of luck getting Linux to run natively on devices, but if you can do it, yes that should work.
i like enlightenment as gui (e17) for debian on mobile device, if you're going that way.

[Q&A] How to build/modify your own linux image for eMMC install Debian sample inside

[Q&A] How to build/modify your own linux image for eMMC install Debian sample inside
This thread is for help and support with all linux distributions instalable in eeepad asus transformer. I will explain how to build your own image file or modify existing one in order to use lilstive OLife script.
As ubuntu is the most popular distro, please, all de questions related with ubuntu post them in lilstevie's thread.
You can install any distribution with arm architecture support, but you'll need to make some tweaks in the image in order to work propperly. As my experience in linux is most of it related with debian is the distro i will give the best support, but i'll try to answer every question you ask.
I've chosen debian armHardFloat port instead of debian armel fore many reasons, you can read about this port here:
http : //wiki. debian.org/ArmHardFloatPort
This port is still young so right now there are packages still unaviable to install but they are entering in wheeze day to day. If you preffer to use armel instead or armhf you can always do, you will loose improvement but you will have (at the time of writting this) less packages aviable. In the future (not far away) it will be the best option.
Building your own image:
There are many ways to create a image file but because we are going to need qemu in order to debootstrap the instalation the easiest way to create it is with qemu-img
Code:
qemu-img create debian-armhf.img 400M
I have only given 400M of space because is going to be a minimal instalation without desktop enviroment, it could be smaller but, just in case, that's the size i've chosen. The transfer with OLife it will be faster if the image is smaller.
When you boot for your first time you will find an error because there is no valid MSDOS partition table, this is ok, nothing happens because of that but if you want to avoid it use fdisk to create a partition table
Code:
fdisk debian-armhf.img
we need now to give format to the filesistem:
Code:
mkfs.ext4 debian-armhf.img
It will ask if you really want to do because it's not an ordinary partition and you have to type "s" to proceed
Now whe have ready the image and we have to mount it in some folder to install debian in it:
Code:
mount -o loop debian-armhf.img debian
asuming debian as the created folder for that.
We are ready to debootstrap de instalation:
Code:
debootstrap --verbose --arch armhf --foreign --include=btrfs-tools,locales,kbd,wpasupplicant wheezy debian http://ftp.de.debian.org/debian
this will make the first step to install wheezy armhf, --foreing parameter is because the target architecture is different from the host one and it's going to stop before de second-stage, it will include the packages btrfs-tools locales and kbd, you can add as many as you want but it will be always faster if you install them manually once installed in the transformer. I didn't install ssh server because i have a dock, but if you don't have it will be needed to complete the instalation with a remote shell, but you can also install packages later with chroot after the second stage.
In order to be able to chroot we will need qemu-user-static, with armhf it's needed 1.0 version with armel it's not necesary, it can be any version not too old. Also if you have an i386 system it's recomendable to install an amd64 kernel to do chroot or debootstrap will fail configuring cron. Actually i think in this sample image there is anacron instead of cron because there was an issue i thought it was related with that but later twb found out the problem was another different and now it's solved.
we will add qemu-arm-static to the instalation to be able to chroot
Code:
cp /usr/bin/qemu-arm-static debian/usr/bin/
we chroot to the new enviroment:
Code:
chroot debian
and execute the second stage of debootstrap:
Code:
./debootstrap/debootstrap --second-stage
After finish the instalation we will set the root password
Code:
passwd
and now it's ready, you can make tweaks, install packages (as ssh if you need it) or whatever you want, but you will have to add a repository to /etc/apt/sources.list in order to install any packages.
In this image and debootstrap proccess i've used german repositories because are the fastest for me, but you can use another one, right now it's neede also experimental repository to have working touch screen, but as soon xserver-xorg-input-evdev with full multitouch support enters sid as it won't be necesary
example of /etc/apt/sources.list
Code:
http://ftp.de.debian.org/debian unstable main contrib non-free
http://ftp.de.debian.org/debian experimental main contrib non-free
I have already installed in this image necesary packages for that and experimental repositories won't interfiere unless you pass the parameter for apt-file so you can forget about this if you want, but if you are building your own image apt-get install -t experimental xserver-xorg will do the work.
we have ready now our image but it need some files and tweaks to make everithing work in the eepad.
From here you can apply this to any arm image you want to test.
(all the files needed are in the attached file files.tar.gz in the rigth folders)
we need to add modules and firmware, i've extracted them from lilstive ubuntu.img
strictly necesary are:
Code:
/lib/firmware/nvram.txt
/lib/firmware/brcm/*
but you may need another ones if you are going to use external hardware, that's on you.
there are also two folder in /lib/modules one is for the asus kernel and the other one for chrome os kernel, i suggest to add both of them because it's just a bit space and you will be able to use the image with both kernels.
In order to make wifi work i've made /etc/modprobe.d/options.conf file with some parameters found in one of the threads of lilstevie and /etc/modules with the modules to load.
You will also need to configure /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf all this files are in the attached files.tar.gz but wpa_supplicant.conf is not because it depends of each ones wifi, but there is a wpa_supplicant.conf.example and you can always google for it a bit. If you don't have a dock make sure you do this correctly or you won't be able to connect to the internet and ssh device to continue instalation easily
if you want to be able to use adb (wich is really usefull if you for example did not correctly configure wpa_supplicant) you will have tu add also "/usr/bin/adbd" and /etc/init.d/adbd"
I've modify the original init.d script to avid LSB tags missing warning error, it's not really necesary rsyslog as previous service started but ... it works.
In order to make adb service start automatically we will execute (inside the chroot of course)
Code:
update-rc.d /etc/init.d/adb defaults
This may be different in non debian based distributions, but you can always ln manually to rcX.d
Finally, there is the "bug" it has made me think something was wrong and change cron with anacron, when you boot it appears to stop booting starting a service (cron, dbus, deppending what you have installed) but it isn't you can login pressing ctrl + alt + F2 (touchpad key),
we think it's related with the bootloader and default tty as 7 or something like that.
As workaround add in /etc/rc.local "chvt 1" (without quotes) just before exit 0 line
Because there is not oem-installation like in ubuntu after the first boot there are a couple of things to do, we have to resize the image to fit the partition, change password, configure locales and xorg keyboard-layout (if you have more than one locales) add an user and include in relevant groups and maybe more in the future so i've made a postinstalation.sh script included in /usr/bin:
Code:
#!/bin/sh
echo "Making online resize of the root partition"
partition=`mount -l | grep " / " | awk '{print $1}'`
resize2fs $partition
echo "changing root password"
passwd
echo "configure locales"
dpkg-reconfigure locales
echo "configure xserver keyboard layout"
dpkg-reconfigure keyboard-configuration
echo "configure localtime"
dpkg-reconfigure tzdata
echo "Please anter a user name"
read username1
adduser $username1
echo "adding user to relevant groups"
adduser $username1 audio
adduser $username1 video
adduser $username1 netdev
adduser $username1 plugdev
adduser $username1 bluetooth
adduser to bluetooth will fil because there is not installed any bluetooth manager so there is not bluetooth group yet, and remeber tu use OLife script to inject bluetooth firmware in order to have bluetooth working.
And that's it i think i haven't miss anything but i will update this when needed. You can now install your image with lilstevie's OLife script, you will have to rename it to ubuntu.img from now. If everithing went ok you can now install the desktop enviroment you prefer, on screen keyboard or whatever you like.
I haven't test network manager and i've only tested kde-netbook, but there are still broken dependencies and it's a bit slow. This will improve as soon as we have hardware acceleration (if we ever do), and armhf port goes ahead.
Lilstevie is going to host my images and maybe OLife script will have more options in the future, but from now you can download from here:
http://dl.dropbox.com/u/60048492/debian-armhf.img.tar.gz
(md5sum inside)
http://dl.dropbox.com/u/60048492/files.tar.gz
All credits and many thanks for lilstevie and twb for all the help they gave me.
I will apreciate any correction not only in this process but also in my english grammar/ortography
Please, any mod or admin can correct the word modufy in the title?
reserved
Thanks
Following your instructions, I can finally replace ubuntu with debian, which resides my home laptops, office desktop, and now, on my tablet as well. Unfortunately debian has no "onboard" package... and it's rather inconvenient without a dock.
Thanks anyway for bring debian to this tablet.
boseliquid said:
Following your instructions, I can finally replace ubuntu with debian, which resides my home laptops, office desktop, and now, on my tablet as well. Unfortunately debian has no "onboard" package... and it's rather inconvenient without a dock.
Thanks anyway for bring debian to this tablet.
Click to expand...
Click to collapse
What has onboard that haven't other onscreen keyboards? i haven't ever tried onboard and i just tried a couple of onboard keyboards in debian, i also did managed to load it automatically in login screen, But i did never went deeper, like "only appear if the focus is in textbox" or something like that.
Anyway i has to be easy to rebuild that package for debian or just install it from ubuntu. What do you exactly need?
onboard onboard
Onboard has keys that simulate middle-click and right-click of mouse. I tried to install ubuntu's deb file, but runs into problem with dependencies. Compiling the source on the tablet led to error related to gdk/gdk.h which i couldn't figure out how to resolve.
Onboard respond better than others, e.g. xvkbd and florence both have run-away key presses, i.e. a string of letters appear even for a quick single tap on a key.
Also, onboard integrates nicely with lightdm. I used xdm plus florence to log in (the screen keyboard hides most of xdm's GUI).
With fluxbox, debian seems faster than ubuntu+fluxbox on the tablet. That's why onboard is nice since fluxbox menu requires right-clicking on the desktop. Fortunately, fluxbox keys are easily configurable, so i still can shutdown by pressing some key combination.
Hopefully lilstevie has the time to work on hardware acceleration, which would then allows to dump android completely.
boseliquid said:
Onboard has keys that simulate middle-click and right-click of mouse. I tried to install ubuntu's deb file, but runs into problem with dependencies. Compiling the source on the tablet led to error related to gdk/gdk.h which i couldn't figure out how to resolve.
Onboard respond better than others, e.g. xvkbd and florence both have run-away key presses, i.e. a string of letters appear even for a quick single tap on a key.
Also, onboard integrates nicely with lightdm. I used xdm plus florence to log in (the screen keyboard hides most of xdm's GUI).
With fluxbox, debian seems faster than ubuntu+fluxbox on the tablet. That's why onboard is nice since fluxbox menu requires right-clicking on the desktop. Fortunately, fluxbox keys are easily configurable, so i still can shutdown by pressing some key combination.
Hopefully lilstevie has the time to work on hardware acceleration, which would then allows to dump android completely.
Click to expand...
Click to collapse
Ok, i'll give it a look and if i can i will build a debian package in order to include it in the image
I've managed to build a couple of packages for onboard. You can't imagine how much crap it's in building dependencies, mono, unity and so many things, so i've removed appindicator dependency because i don't think it's going to be really necesary. The true is that i don't have so much time right now so,
Can you please test it and tell me if you have any problem? I can try to rebuild another older version in order to avoid unity crap and those things without messing the code, but if this works well it's the eassiest solution.
You have to install both packages, the other dependencies are instalable from debian oficial repository, at least i haven't got any problem installing it in my building environment.
http://dl.dropbox.com/u/60048492/onboard_0.95.1-1_all.deb
http://dl.dropbox.com/u/60048492/python-virtkey_0.60.0-1_armel.deb
arch of python-virtkey is armel instead of armhf
Almost there... but obtained the following error msg:
Unpacking onboard (from onboard_0.95.1-1_all.deb) ...
dpkg: dependency problems prevent configuration of onboard:
onboard depends on python-virtkey (>= 0.60.0); however:
Package python-virtkey is not installed.
onboard depends on python-gconf; however:
Package python-gconf is not installed.
dpkg: error processing onboard (--install):
dependency problems - leaving unconfigured
Thanks again.
boseliquid said:
Almost there... but obtained the following error msg:
Unpacking onboard (from onboard_0.95.1-1_all.deb) ...
dpkg: dependency problems prevent configuration of onboard:
onboard depends on python-virtkey (>= 0.60.0); however:
Package python-virtkey is not installed.
onboard depends on python-gconf; however:
Package python-gconf is not installed.
dpkg: error processing onboard (--install):
dependency problems - leaving unconfigured
Thanks again.
Click to expand...
Click to collapse
python-virtkey is provided in my previous post, just install it, after that
#apt-get install -f
will resolve and install automatically pending dependencies.
I've already tried and it works.
EDIT: i have been working in the suppose you are runnin debian armel and not armhf
To get bluetooth working, you need an armhf build of brcm_patchram_plus.
Thankfully it's GPL'd, so here's a copy.
Hi,
I'm having a bit of trouble getting Debian on my TF101 using OLiFE.
I'm forced to use the android/Ubuntu dual-boot option, but that's another story.
Basically, there's a kernel panic and I can't see the entire screen without it rebooting one second later. I am able to flash my TF101 properly without bricking (it's a B60), but everytime I boot it up as my default OS, I get that rebooting screen.
NothingMuchHereToSay said:
Hi,
I'm having a bit of trouble getting Debian on my TF101 using OLiFE.
I'm forced to use the android/Ubuntu dual-boot option, but that's another story.
Basically, there's a kernel panic and I can't see the entire screen without it rebooting one second later. I am able to flash my TF101 properly without bricking (it's a B60), but everytime I boot it up as my default OS, I get that rebooting screen.
Click to expand...
Click to collapse
Kernel panic kinda implies the problem is with the kernel, not with Debian. If you're using the 3.1 kernel, try the 2.6 one by lilstevie. Whichever kernel you're using, you're better off seeking help in one of the kernel-specific threads.
rdnetto said:
Kernel panic kinda implies the problem is with the kernel, not with Debian. If you're using the 3.1 kernel, try the 2.6 one by lilstevie. Whichever kernel you're using, you're better off seeking help in one of the kernel-specific threads.
Click to expand...
Click to collapse
Could or couldn't it may also be a problem with initramfs and boot parameters. I now because i experienced it. So if you give us more information, better, try to record a video of the bootloop and pass it slowly to see the error, i did that and it worked for me
Franks Tools-new modified Ubuntu install
Hello i dont know if this is right thread,i like to ask you advanced users for some help.I wanna install ubuntua via new modified Franks tools by kenshin,released few days ago,i cannot find exact answer what i need to progress.
My questions are: How can i made nvflashable files system.img boot.img recovery.img and others to use franks tools? how to obtain these images?
2.) and if i will use those images that can be found here on forum can i then just flash for example Revolution HD rom? ,or does it destroy my installation of ubuntu via franks tools?
because i know that there is little play with partitions so i am not sure if i can flash any rom after use of franks tools dual boot option.thank you for help
shaola said:
Could or couldn't it may also be a problem with initramfs and boot parameters. I now because i experienced it. So if you give us more information, better, try to record a video of the bootloop and pass it slowly to see the error, i did that and it worked for me
Click to expand...
Click to collapse
I did everything stock and did exactly what you said to do for Debian, though I used the armel architecture and the adb wouldn't work with an error.
By everything stock, I mean that I didn't alter anything from the OLiFE folder except adding the ubuntu.img file.
NothingMuchHereToSay said:
I did everything stock and did exactly what you said to do for Debian, though I used the armel architecture and the adb wouldn't work with an error.
By everything stock, I mean that I didn't alter anything from the OLiFE folder except adding the ubuntu.img file.
Click to expand...
Click to collapse
The original kernel from OLiFE didn't work for me - I had a boot loop. Try manually compiling the lilstevie kernel, or using a kernel from Jhinta's kernel thread.
The packed kernels (CWM zips) for Ubuntu will work exactly the same under Debian. (or at least in the direct mount case - I don't know about loop mount)
i can't get wifi up ... could someone help?
it is shown in iwlist wlan0 scan but i can't find an network ...
while boot it sends many intervals and abort this progress with givin' up.
i just copied li/firmware file from olife.img und files from this thread over it ...
anyone could help please?
NoDiskNoFun said:
i can't get wifi up ... could someone help?
it is shown in iwlist wlan0 scan but i can't find an network ...
while boot it sends many intervals and abort this progress with givin' up.
i just copied li/firmware file from olife.img und files from this thread over it ...
anyone could help please?
Click to expand...
Click to collapse
what are you uing to scan? this driver ony supports wpasupplicant, not iw nor iwconfig
hi,
i installed the ubuntu image with olife on my transformer. i don't like ubuntu very much, i prefer debian which i run debian on my computer as well. i stumbled over this thread so i wondered what's the status of debian on our transformer.
can anyone tell me whats currently working.
hanswurschtus said:
hi,
i installed the ubuntu image with olife on my transformer. i don't like ubuntu very much, i prefer debian which i run debian on my computer as well. i stumbled over this thread so i wondered what's the status of debian on our transformer.
can anyone tell me whats currently working.
Click to expand...
Click to collapse
The same as in ubuntu. But you may need some tweeks. Depends of the kernel you are using. nvidia has released also a beta of the nvidia drivers for armhf and not only armel so you may use armhf or armel with jintha's kernel and have almost everithung working.

[GUIDE][HACK]Cross Compiling for OSX on Linux with AOSP

Hi Folks
I wasn't sure where this should belong but as it is a bit of an Hack this forum is probably the most appropriate
Introduction
This short tutorial will show you how to patch the Android Build System to allow you to cross-compile Android AOSP host tools ( adb, fastboot etc ) for OSX using a linux based machine. This is something Google said was impossible or at the very least unsupported.
Assumptions
You have a linux based machine and working copy of the AOSP source tree.
You can/have successfully compile(d) a full Android Release from this tree.
A basic idea of how the Android Build System works is beneficial.
Getting Started
I've set-up a git repository which contains a binary copy of the OSX SDK 10.6 and the apple-darwin10-gcc cross compiler. So first things first. open a terminal and set the root of the AOSP sources tree to the current directory.
STAGE 1: Copy the OSX SDK
Step 1.
Clone the repo with the SDK and toolchain
Code:
git clone https://github.com/trevd/android_platform_build2.git build2
Step 2.
Create /Developer directory at your filesystem root, this is a known location for the SDKs
Code:
sudo mkdir /Developer
sudo chown $USER.$USER /Developer
Step 3.
Copy and unpack the SDK package
Code:
cp build2/osxsdks10.6.tar.gz /Developer
cd /Developer
tar -zxvf osxsdks10.6.tar.gz
rm osxsdks10.6.tar.gz
cd - # back to aosp root
STAGE 2 : Swapping the Toolchain
This is where the fun begins :laugh:
The Android Build system has the majority of the infrastructure in place already to build for OSX, the only problem is that you need OSX to build for OSX. However we can remedy that with a couple of dirty hacks :laugh:.
The prebuilts/gcc/darwin-x86 directory contains a toolchain compatible with osx ( mach-o binaries ). We are going to swap this for a linux compatible ( elf ) executables.
Step 4:
Copy and unpack the elf compatible darwin cross toolchain
Code:
cp build2/i686-apple-darwin-4.2.1.tar.gz prebuilts/gcc/linux-x86/host
cd prebuilts/gcc/linux-x86/host
tar -zxvf i686-apple-darwin-4.2.1.tar.gz
cd - # back to aosp root
Step 5:
Remove the mach-o binaries and symlink the elf binaries in it's place
Code:
cd prebuilts/gcc
rm -rf darwin-x86
ln -s linux-x86 darwin-x86
cd - # back to aosp root
Step 6:
We also need to replace the mach-o version of the ccache executable which live in the prebuilt/misc directory
Code:
cd prebuilts/misc
rm -rf darwin-x86
ln -s linux-x86 darwin-x86
cd - # back to aosp root
STAGE 3: Patching the build system .mk files
We need to patch a couple of files in the build directory namely the build/core/combo/HOST_darwin-x86.mk the main crux of this is swapping the ar tool for libtool so static libraries can be created without error.
Code:
patch -p1 < build2/build.patch
If the patch has been applied successfully you should see the following
Code:
patching file system/core/adb/Android.mk
patching file build/core/combo/HOST_darwin-x86.mk
patching file build/core/combo/select.mk
patching file build/core/envsetup.mk
patching file build/envsetup.sh
You are now ready to cross compile!! :good: ..... well not quite, but nearly.... here's why!
The Android Build System will attempt to build both the Target and Host files for most modules so I'd advise using a lunch option which already has a full target built for it or alternatively you can build the generic sdk using the following commands at the AOSP source tree root.
Code:
. build/envsetup.sh
lunch sdk-eng
make sdk
This will stop target dependency errors occurring when you build individual modules.
NOW we're ready to cross compile.
STAGE 4: Building Modules
At present module build is very much a piecemeal process. To build adb for example we need to build the dependencies first. This is not too onerous as most host modules have very few dependencies.
Building adb
adb has dependencies on the following libraries
Code:
external/zlib
external/openssl
system/core/liblog
system/core/libcutils
system/core/libzipfile
I've found the easiest way to compile the dependencies is to navigate to each directory in turn an use to "mm" build system command to compile the individual module. the commands I run to compile adb are as follows.
From AOSP Source Root
Code:
cd external/zlib
USE_DARWIN=true mm -j8
cd ../openssl
USE_DARWIN=true mm -j8
croot # go back to the AOSP root
cd system/core/liblog
USE_DARWIN=true mm -j8
cd ../libcutils
USE_DARWIN=true mm -j8
cd ../libzipfile/
USE_DARWIN=true mm -j8
cd ../adb
USE_DARWIN=true mm -j8
All being well you should now have and adb binary located at out/host/darwin-x86/bin/adb. running the file command on this binary should produce the following output
Code:
adb: Mach-O executable i386
Conclusion
Although this method is a little rough and ready, it should produce the desired results if you need to cross compile for OSX. The eventual goal would be to compile a full OSX Android SDK on linux in a similar manner to the way the windows-sdk is currently compiled. This requires more investigation as compiling the windows sdk on linux employs a little bit of trickery on the part of the build system.
Final Notes and FAQs:
Why can't I just type make <module> from the root?
Doing this triggers building of additional modules such as LLVM and clang which are to deployed out/host/darwin-x86/bin the build system then attempts to use binary later on. These are obviously built for the Mach-o architecture and as such are incompatible with the linux. This results in a build error which can and would be resolved by the above mentioned trickery ( see conclusion )
I use OSX binaries (along with Windows and my native Linux) in one of my projects. Thanks, I have always relied on finding compiled binaries elsewhere. Lack of an OSX aapt held up an update at one point.
One of those things that you don't really use until you need it, but I will try to remember to give it a shot. I don't have any doubt that it works.
mateorod said:
I use OSX binaries (along with Windows and my native Linux) in one of my projects. Thanks, I have always relied on finding compiled binaries elsewhere. Lack of an OSX aapt held up an update at one point.
One of those things that you don't really use until you need it, but I will try to remember to give it a shot. I don't have any doubt that it works.
Click to expand...
Click to collapse
Thanks. Yes this really is an edge case. Hopefully It will help some folks out.
Regarding aapt in particular.... It's perfectly possible to build aapt, however, we need to do some slight of hand with the clang and clang++ executables as libpng on which aapt depends uses these 2 binaries as part of it's build process.
Here's the build list and the clang trick if you want to try it some time.
Code:
build/libs/host
external/expat
external/zlib
system/core/liblog
system/core/libcutils
mkdir out/host/darwin-x86/bin
cp out/host/linux-x86/bin/clang out/host/darwin-x86/bin
cp out/host/linux-x86/bin/clang++ out/host/darwin-x86/bin
external/libpng
frameworks/base/libs/androidfw
frameworks/native/libs/utils
frameworks/base/tools/aapt
I started off with a clean out/host/darwin-x86 directory so I didn't miss any dependencies.
like I mentioned the clang "swap out" is something the make win_sdk option does automatically so with it a little more research I should be able to get the mac build to do the same but you'll have to "fill yer boots" with the ghetto method for now
For reference here's a link to the sdk building instructions http://tools.android.com/build which describes how to cross compile the windows sdk on linux ( in case anyone was wondering what the hell i'm on about)
My use case has come up
I will be cross-compiling for OSX today...specifically with aapt in mind. I will report back, but I fully expect it to work as described.
mateorod said:
My use case has come up
I will be cross-compiling for OSX today...specifically with aapt in mind. I will report back, but I fully expect it to work as described.
Click to expand...
Click to collapse
Cheers Man!
Hopefully no bitrot has crept in since april and now. I know I've changed my OS version since to Lubuntu 13.04, not like the OS version really matters any.
mateorod said:
but I fully expect it to work as described.
Click to expand...
Click to collapse
Then you Sir, are either Drunk or a Fool! LOL Keep expectations Quantum and only decided when the result is observed a'la Schrodinger Cat
okay...So I was trying to compile SlimRom (so as to get an OSX aapt binary with the SlimRom changes) and things did not necessarily go as planned. There were enough changes to the SlimRom android_build that your build/build.patch does not apply cleanly. I spent some time and tried to modify the patch so that it would work for both SlimRom, AOSP and probably others, but each android_build repo has some differences in surrounding the HOST_AR line, so commenting that just was not portable between flavors. Not cool.
Anyway, turns out that this method does not quite work out of the box for non-AOSP versions (not that you claimed that it did). I got some unfamiliar errors related to (I believe) some OSX toolchains. But in both times I tried this, I actually had to pretty immediately swap out of that flavor and so I was unable to do much debugging. (I keep all the flavors I build {CM, AOKP, SlimRom, PAC, PA, OpenPDroid, etc, etc, etc} all layered in one android/system/jellybean directory. It saves a ton of space, but only allows me to do one thing at a time.)
So the only feedback I have is nothing...I even formatted my hard drive in-between and forgot to put up a paste, so the errors are currently lost to history.
Things that I noticed, for better or worse
You recommend putting the SDKs in the root dir. I believe the documentation is recommending the Developer be placed in home (as per the SDK/ADT bundle docs).
You might want a
Code:
mv android_platform_build2 build2
line. I normally wouldn't bother, but it looks like you are trying to post a line-by-line guide.
I would put the recommendation that a full build be available to the out folder (or a built generic sdk) right at the top, since it is a preliminary step. I had to revert my handwritten changes, then build, then reapply the changes and rebuild since I thought it needed a clean out dir.
Did you have any trouble with git reverting the toolchain swap? On two separate machines, I had to go so far as to delete .repo/projects/prebuilts/gcc/* and prebuilts/gcc/darwin-x86/arm/arm-eabi-4.6. It kept complaining of that the project in the .repo folder was a bad match. No amount of git trickery (which I am not terrible at) let me back out more easily.
I am willing to try again...but I have some other small things to attend to first. It is an admirable hack you have here sir. I will return to it soon and report back once more.
mateorod said:
okay...So I was trying to compile SlimRom (so as to get an OSX aapt binary with the SlimRom changes) and things did not necessarily go as planned. There were enough changes to the SlimRom android_build that your build/build.patch does not apply cleanly. I spent some time and tried to modify the patch so that it would work for both SlimRom, AOSP and probably others, but each android_build repo has some differences in surrounding the HOST_AR line, so commenting that just was not portable between flavors. Not cool.
Anyway, turns out that this method does not quite work out of the box for non-AOSP versions (not that you claimed that it did). I got some unfamiliar errors related to (I believe) some OSX toolchains. But in both times I tried this, I actually had to pretty immediately swap out of that flavor and so I was unable to do much debugging. (I keep all the flavors I build {CM, AOKP, SlimRom, PAC, PA, OpenPDroid, etc, etc, etc} all layered in one android/system/jellybean directory. It saves a ton of space, but only allows me to do one thing at a time.)
So the only feedback I have is nothing...I even formatted my hard drive in-between and forgot to put up a paste, so the errors are currently lost to history.
Things that I noticed, for better or worse
You recommend putting the SDKs in the root dir. I believe the documentation is recommending the Developer be placed in home (as per the SDK/ADT bundle docs).
You might want a
Code:
mv android_platform_build2 build2
line. I normally wouldn't bother, but it looks like you are trying to post a line-by-line guide.
I would put the recommendation that a full build be available to the out folder (or a built generic sdk) right at the top, since it is a preliminary step. I had to revert my handwritten changes, then build, then reapply the changes and rebuild since I thought it needed a clean out dir.
Did you have any trouble with git reverting the toolchain swap? On two separate machines, I had to go so far as to delete .repo/projects/prebuilts/gcc/* and prebuilts/gcc/darwin-x86/arm/arm-eabi-4.6. It kept complaining of that the project in the .repo folder was a bad match. No amount of git trickery (which I am not terrible at) let me back out more easily.
I am willing to try again...but I have some other small things to attend to first. It is an admirable hack you have here sir. I will return to it soon and report back once more.
Click to expand...
Click to collapse
Hi
Thanks for this, It sounds like you've suffered an exercise in frustration there. I wasn't aware that "SlimRom" had a different aapt ( just out of general ignorance and not having paid any attention )
SDK - My Tree last time I used this was /Developer directory in the root - I think It comes from what the toolchain is expecting, I just gave it what it wants
mv android_platform_build2 build2 - Yep I did mean that it's the git clone line which wants changing
Code:
git clone https://github.com/trevd/android_platform_build2.git build2
SDK Recommendation - I shall move that to the top, even though it is already in there, It should probably be highlighted better and possible it's own "Stage"
Reverting the toolchain - Ahh , It appears I work slightly different from most in this respect. I have a general mistrust of SCM's ( I lost too much code on too many different SCM's, Probably through my own inability to use them correctly but ) what I do to revert to change is
Code:
cd prebuilts/gcc/darwin-x86/host/
rm -rf i686-apple-darwin-4.2.1
repo sync i686-apple-darwin-4.2.1
You can do this "trick" on any project in the source tree it's only on rare occasions where I screwed up badly that I have to delete anything in .repo/projects but I also have my distro in their own individual directories with there own full git trees, which is a massive waste of space and has a ton of redundancy due to the AOSP repositories being mirror by every single one but switching between them is a lot easier
If SlimRom's changes are localized to aapt, I'd be more inclined to drop it into the AOSP build and try that... If you have a link to slimrom's frameworks/base repository I'll grab it and try it myself.
On a final note there's a "full version" of the HOST_darwin make file in the build2/core/combo directory the changes to envsetup.mk and select.mk are minimal and can easily be applied manually. You don't need to patch the adb makefile if your not building it.
Again Thanks for the feedback

[Completed] Unpacking and repacking system.img error

Hello, I'm trying to unpack and repack a system.img file using cygwin and the "simg2img" and "make_ext4fs" binary file. I am using cygwin because Linux is too much for VirtualBox and I have a bootcamped Mac so I don't have a lot of space on my Windows partition. My problem is when I run this: $./simg2img system.img sys.raw it returns with this -bash: ./simg2img: cannot execute binary file: Exec format error I really don't understand why this is happening and I checked the Ubuntu forums many times but I still cannot find anything.
http://forum.xda-developers.com/showthread.php?t=1588461
^^ Trying to follow that guide.
Thanks in advance
ethanscooter said:
Hello, I'm trying to unpack and repack a system.img file using cygwin and the "simg2img" and "make_ext4fs" binary file. I am using cygwin because Linux is too much for VirtualBox and I have a bootcamped Mac so I don't have a lot of space on my Windows partition. My problem is when I run this: $./simg2img system.img sys.raw it returns with this -bash: ./simg2img: cannot execute binary file: Exec format error I really don't understand why this is happening and I checked the Ubuntu forums many times but I still cannot find anything.
http://forum.xda-developers.com/showthread.php?t=1588461
^^ Trying to follow that guide.
Thanks in advance
Click to expand...
Click to collapse
Hello,
Funny you mention that thread. Because this post is in it:
does any one knows how to do it on cygwin? can you give me a full detail of the steps on how to set this thing up in cygwin.
Click to expand...
Click to collapse
cygwin cannot run native linux excute file without rebuild from source ~
Click to expand...
Click to collapse
So. Time to look at the real problem. How can Linux be too much for Virtualbox when you can run a full Windows OS on the other side of bootcamp?
Linux doesn't have that serious of system requirements, especially if you skip the GUI. Skip Ubuntu for sure, in favour of Puppy Linux, Lubuntu or even Debian (with issuing the boot parameter - by pressing tab - and then typing "desktop=lxde" if you need to install a GUI at all). Do all of this in the Mac side of bootcamp where you will have more resources. Virtualbox should handle it well, even if it's a little slow.
Adapt as you go (e.g. RAM allocation can be as little as 64MB for console only, but in reality, squeeze out as much as you can afford to):
> App Development Forums > Development Tools > IDEs, Libraries, & Programming Tools > [GUIDE] VirtualBox Set-Up (MORE TO COME!)
Hope this helps, and good luck!
joel.maxuel said:
Hello,
Funny you mention that thread. Because this post is in it:
So. Time to look at the real problem. How can Linux be too much for Virtualbox when you can run a full Windows OS on the other side of bootcamp?
Linux doesn't have that serious of system requirements, especially if you skip the GUI. Skip Ubuntu for sure, in favour of Puppy Linux, Lubuntu or even Debian (with issuing the boot parameter - by pressing tab - and then typing "desktop=lxde" if you need to install a GUI at all). Do all of this in the Mac side of bootcamp where you will have more resources. Virtualbox should handle it well, even if it's a little slow.
Adapt as you go (e.g. RAM allocation can be as little as 64MB for console only, but in reality, squeeze out as much as you can afford to):
> App Development Forums > Development Tools > IDEs, Libraries, & Programming Tools > [GUIDE] VirtualBox Set-Up (MORE TO COME!)
Hope this helps, and good luck!
Click to expand...
Click to collapse
Hello, I actually installed LINUX on actual hardware on another computer, my only problem was repacking the image I could not flash the repacked image which I have turned into a tar file with cygwin in ODIN it would fail. Also I meant it was too much because it was slow and I didn't have enough space thats why I mentioned the dualboot setup I only have 5gb free.
ethanscooter said:
Hello, I actually installed LINUX on actual hardware on another computer, my only problem was repacking the image I could not flash the repacked image which I have turned into a tar file with cygwin in ODIN it would fail. Also I meant it was too much because it was slow and I didn't have enough space thats why I mentioned the dualboot setup I only have 5gb free.
Click to expand...
Click to collapse
I would avoid cygwin at all steps. It's only good for routine commands (I used to use it to do "ls -lR" dumps of my CD archives), not for special projects. NTFS is a whole different beast than ext4, and it sounds like the permissions you have vs. the permissions you are supposed to get don't match up. So Odin is refusing to cooperate.
Good news that you have a different computer to run GNU/Linux on. FWIW, the missing information was how much disk space was left on the OSX end of things, which is why I suggested VirtualBox "on the Mac side".
Back to the drawing board, but it looks like you have the resources to get something successful this time.
If not, and Linux was used in all the steps, can always sort out the problem in the guide you originally linked by asking there.
Hope this helps.

Categories

Resources