[Q] ROM Development - Touch Pro2, Tilt 2 Android General

There were quite a few builds around I have noticed, however with Tiad gone, there only seems to be the basic FRX* and GBX0A.
Even though I never liked "Tiad's" builds, I noticed quite a few things. With little/no coding experience (as far as I can tell) he was just modifying parts of code, causing problems, etc. But still making some huge UI changes that never seemed to have issues.
I have quite a bit of coding experience but never anything for mobile devices I would like to have a look and compile some builds, teaching myself basically.
So I have two questions regarding this:
1: Do the devs use an IRC or something? I would love to sit in on development and see how they work (without interrupting them of course ).
2: Is there some kind of 'cooking' software or a suite that has been put together, like some of the stuff I have seen in the Windows section for this device? Where do I start? I have seen the Chef Central but it is a bit 'full on' and seems to be a mess. I want to be device specific, if possible. Do I use THIS?
Oh and considering I own a RHOD110 (GSM) I am up for testing pretty much anything you guys want me to.
Who knows, by the time android is working I might be up for releasing public builds, and of course NO INCLUDED PAID APPS

ryannathans said:
There were quite a few builds around I have noticed, however with Tiad gone, there only seems to be the basic FRX* and GBX0A.
Even though I never liked "Tiad's" builds, I noticed quite a few things. With little/no coding experience (as far as I can tell) he was just modifying parts of code, causing problems, etc.
I have quite a bit of coding experience but never anything for mobile devices I would like to have a look and compile some builds, teaching myself basically.
So I have two questions regarding this:
1: Do the devs use an IRC or something? I would love to sit in on development and see how they work (without interrupting them of course ).
2: Is there some kind of 'cooking' software or a suite that has been put together, like some of the stuff I have seen in the Windows section for this device? Where do I start? I have seen the Chef Central but it is a bit 'full on' and seems to be a mess. I want to be device specific, if possible. Do I use THIS?
Oh and considering I own a RHOD110 (GSM) I am up for testing pretty much anything you guys want me to.
Who knows, by the time android is working I might be up for releasing public builds, and of course NO INCLUDED PAID APPS
Click to expand...
Click to collapse
Kernel Dev: http://htc-linux.org/wiki/index.php?title=IRC
Userland Dev: http://xdandroid.com/wiki/Chat
Steps for building stuff: http://forum.ppcgeeks.com/android-t...modules-tinboot-nand-boot-more-beginners.html
You can also find steps for building userland at xdandroid.com

Specifically, for building xdandroid - http://xdandroid.com/wiki/Getting_the_Source
If you follow those instructions, you will basically be able to build your own FRX05/GBX0A equivalents.
That's how I got started on my GPS quest.
Note that in terms of IRC channels, the two links above will eventually just take you to Freenode, so you can just go over to #htc-linux and #xdandroid on freenode. Activity seems to be highest in United States evening times. It can be quite dead at other times, as occasional people who have popped in to ask questions have discovered.
In terms of what goes into the mainline xdandroid codebase - ideally I would assume the devs wish to integrate whatever they can, however, I can see the following valid reasons to diverge:
1) Replacing large parts of the user interface (Sense, heavily themed builds) - This was one of the things tiad8 did and honestly not a part of his work that I had any problems with.
2) Situations where there is a free but binary-only component that replaces one of our open source components - Not ideal but sometimes a necessary evil for the end user. However, I think the mainline devs would appreciate knowing the situations in which this is done, either for the purposes of reverse engineering the component in question, finding a source tree for the component in question (sometimes possible), or just knowing whether or not a fix can be integrated upstream. - tiad8 would often grab stuff from random places without documenting it which annoyed a lot of people
Trying to minimize the deltas between "cooked" builds and what one might call the "baseline" build is probably what is best for all of us - only diverge when there is a clear rationale for it, and when there isn't a good reason for divergence, try to get stuff mainlined.
Also to note - when running from SD it isn't exactly "ROM" development, and the nice thing about running from SD is that it's a lot easier to make tweaks to userland since the key userland files are all in a normal ext2 filesystem.
Oh yeah - HIGHLY beneficial if you've got a 64-bit Linux box like I do!
Edit: If you read my GPS testing thread, you'll see some of the lessons learned on my journey, including a few useful tips like bind-mounting specific libs that you're working on.

Entropy512 said:
Specifically, for building xdandroid - http://xdandroid.com/wiki/Getting_the_Source
If you follow those instructions, you will basically be able to build your own FRX05/GBX0A equivalents.
That's how I got started on my GPS quest.
Note that in terms of IRC channels, the two links above will eventually just take you to Freenode, so you can just go over to #htc-linux and #xdandroid on freenode. Activity seems to be highest in United States evening times. It can be quite dead at other times, as occasional people who have popped in to ask questions have discovered.
In terms of what goes into the mainline xdandroid codebase - ideally I would assume the devs wish to integrate whatever they can, however, I can see the following valid reasons to diverge:
1) Replacing large parts of the user interface (Sense, heavily themed builds) - This was one of the things tiad8 did and honestly not a part of his work that I had any problems with.
2) Situations where there is a free but binary-only component that replaces one of our open source components - Not ideal but sometimes a necessary evil for the end user. However, I think the mainline devs would appreciate knowing the situations in which this is done, either for the purposes of reverse engineering the component in question, finding a source tree for the component in question (sometimes possible), or just knowing whether or not a fix can be integrated upstream. - tiad8 would often grab stuff from random places without documenting it which annoyed a lot of people
Trying to minimize the deltas between "cooked" builds and what one might call the "baseline" build is probably what is best for all of us - only diverge when there is a clear rationale for it, and when there isn't a good reason for divergence, try to get stuff mainlined.
Also to note - when running from SD it isn't exactly "ROM" development, and the nice thing about running from SD is that it's a lot easier to make tweaks to userland since the key userland files are all in a normal ext2 filesystem.
Oh yeah - HIGHLY beneficial if you've got a 64-bit Linux box like I do!
Edit: If you read my GPS testing thread, you'll see some of the lessons learned on my journey, including a few useful tips like bind-mounting specific libs that you're working on.
Click to expand...
Click to collapse
Sweet, yeah I will definitely be having a look at all resources. I DO have a 64bit Linux box, what is so beneficial? Can I achieve the same with a 64bit Virtual PC (providing I can allocate 4gb+ RAM which shouldn't be a problem on my beast )?
When I change or include anything I definitely want to include a list of all sources and information available to make sure the use is aware of what is going on. I never really like 'closed-source' development, as some of you may have seen with the Gaming Association I founded (all our mods are open source ).
Thanks, I will post again here if I need anything.

I think some of the prebuilt tools are 64-bit binaries. It's likely possible to get it working on a 32-bit box, but all of the documentation I've seen either strongly recommends/requires 64.
A VM should work fine - I think a few people are using that approach. Memory requirements aren't too bad unless you're doing a make -j4 on a quadcore - then you might drive into swap with a 4GB machine (I have...)

Entropy512 said:
I think some of the prebuilt tools are 64-bit binaries. It's likely possible to get it working on a 32-bit box, but all of the documentation I've seen either strongly recommends/requires 64.
A VM should work fine - I think a few people are using that approach. Memory requirements aren't too bad unless you're doing a make -j4 on a quadcore - then you might drive into swap with a 4GB machine (I have...)
Click to expand...
Click to collapse
I have an i5 750 OCed to 4Ghz, it is in fact a quad. Only 4GB RAM atm but very soon i will have 8
It is running a git clone command, downloaded 40 mb already and it is only 5%, oh great... xD haha

Trying to download and getting this error.
Code:
[email protected] ~ $ sudo apt-get install git build-essential gnupg flex bison gperf libsdl-dev esound zip curl libwxgtk2.6 libc6-dev-i386 g++-multilib lib32z1-dev lib32ncurses5-dev java-common openjdk-6-jdk sun-java5-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev'
Note, selecting 'libwxgtk2.6-0' for regex 'libwxgtk2.6'
Note, selecting 'libwxgtk2.6-dbg' for regex 'libwxgtk2.6'
Note, selecting 'libwxgtk2.6-dev' for regex 'libwxgtk2.6'
Note, selecting 'libwxgtk2.6-0-python' for regex 'libwxgtk2.6'
E: Unable to locate package libc6-dev-i386
E: Unable to locate package lib32z1-dev
E: Unable to locate package lib32ncurses5-dev

ryannathans said:
Trying to download perquisites and getting this error.
Click to expand...
Click to collapse
Have you tried to add a repository
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
?

still getting the same error, however, when updating the list of updates, quite a few 'ign' or 'fail' but still most 'hit'.
Is everyone getting this error? It is happening on all my machines..

Don't remember encountering that error when I was getting set up...
I'm on Ubuntu 10.10 - you?

Entropy512 said:
Don't remember encountering that error when I was getting set up...
I'm on Ubuntu 10.10 - you?
Click to expand...
Click to collapse
Linux Mint 10 Gnome
Derived from Ubuntu 10.10, therefore both depositories should work.
Do you know what depository it is from?

From what I remember, I only had to add special repos for Java 5.
I do remember that back when I did it, there were some libs missing from the install directions in the wiki, that caused my build to bomb. I had to do some googling to find out what they were, and I THINK they were the ones you are having a problem with... hmm. Lemme do some more poking.
Edit: Try the prerequisites setup hints at http://source.android.com/source/download.html

Entropy512 said:
From what I remember, I only had to add special repos for Java 5.
I do remember that back when I did it, there were some libs missing from the install directions in the wiki, that caused my build to bomb. I had to do some googling to find out what they were, and I THINK they were the ones you are having a problem with... hmm. Lemme do some more poking.
Edit: Try the prerequisites setup hints at http://source.android.com/source/download.html
Click to expand...
Click to collapse
First repository worked but the other failed.
Code:
[email protected] ~ $ sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner"
Error: 'deb-src http://archive.canonical.com/ubuntu lucid partner' invalid
I just removed -src and it accepted it, however I still get the same error with apt-get install as i did before

ill just install ubuntu instead...
and SAME error D:

Weird... I need to run out the door soon, but when I get home (going to be fairly late tonight) I'll try to look at my current repo setup.

Entropy512 said:
Weird... I need to run out the door soon, but when I get home (going to be fairly late tonight) I'll try to look at my current repo setup.
Click to expand...
Click to collapse
thanks Entropy

Uh yeah... anyway so what happened with that?

Entropy512 said:
Try the prerequisites setup hints at http://source.android.com/source/download.html
Click to expand...
Click to collapse
That's how I got the error.
I went on to...
Code:
sudo apt-get update
sudo apt-get install sun-java6-jdk
Things seem to be working fine for me.
Will post if anything changes... Ubuntu 10.10 x64
Getting errors about the update commands but repo is running fine. and javac points to where I tell it to via:
Code:
sudo update-java-alternatives -s java-1.5.0-sun
I suggest you continue to advance the installation until you run into a build problem, That will make an issue easier to resolve. Also... These issues should be posted/googled in a linux forum relevant to your distro.

Avid Droidery said:
Uh yeah... anyway so what happened with that?
Click to expand...
Click to collapse
Entropy helped me over IRC
libwxgtk2.6 could not be found via apt-get but libwxgtk2.6-0 was found and installed/works perfectly
should this be updated on the wiki?

ryannathans said:
should this be updated on the wiki?
Click to expand...
Click to collapse
I give you and Entropy my thanks and the thumbs up! As for your question, I am sure this is an installation issue specific to a certain platform. This would be relevant knowledge to any Wiki engaged in the topic.
- Keep up the great work!

Related

Development Linux Distro

I was curious if any of the dev gurus had a nice Linux setup that they could make a Android Development distro from?
I keep running into repo issues when trying to set up my system. This led me to go.....'why isn't there a precompiled dev distro??'
If there is....please point me towards it, as I have been searching, but if it exist it's in a deep dark part of the internet I'm yet to discover.
Thanks
(ps. I wanted to make a clockwork recovery for an unsupported device.)
I keep running into repo issues when trying to set up my system.
Click to expand...
Click to collapse
I think the best Idea is to set up an Ubuntu based system at the moment.
With fedora based distros (fuduntu) I allways get some issues as well.
Some month ago I ran into a site that provided some Ubuntu based virtual box images with the Android SDK installed, but as it changes alot lately I don't think it's up to date, and I can't find it anymore anyway.
Maybe the guides aren't accurate anymore??
The distro I tried was the newest Ubuntu, but with everything I attempted to install I would get permission issues and sometimes the links to repo's weren't live any longer..
Perhaps what I should ask is 'Where can I find an accurate, reliable guide to setting up my linux distro for dev use?'
eh, I'm not completely dumb to Linux, but I require a bit of assistance :/
Ya, Ubuntu is kinda mandatory considering the way the kernel in AoS forked from it. Ubuntu is a common one, should be able to do what you need off the USB bootable even.
Really depends on your hardware setup. I've been playing around with a portable Puppy lately - something I can use at work and on my ancient semi-sandbox laptop. If you like I can put a vanilla package together for you.
There is a distro from 2010 made by a beginning builder specifically for linux/android developers. I haven't used it but it may be worth a go: http://www.simply-android.com/discu...oid-developers-have-their-own-linux-distro/p1

[DEV TUT] Building Kernels and Android Sources

Dear Community,
Please read the following before starting on reading on.After lots of requests I decided its time to provide every oncoming developer with a short guide on how to start developing for our beloved Mimmi (most stuff applies also for Robyn or other Android devices).
I'd also like to get a few words passed on what actually in most cases developing is, so let's start with the basics:
There is different ways of developing there is people like Cyanogen Mod which provide you with a bunch of changes to the original Android source code which enables new features, adds hardware support or make things easier for specific device developers. However these people at Cyanogen are often not fully recognized so please make sure to thank these people as well. Besides that there are ports of similiar devices which will not be explained in this tutorial but also these developers usually put a lot of effort into their roms however since the source is already compiled changes are usually of a cosmetic nature. In this tutorial however you will find the basics on how to compile kernel or android from source in order to build your own changes into your own rom, which btw would have never been possible without the developers porting xrecovery or cwm to our devices so please give these people a big thumbs up as well after reading on.
What do I need/Environment set up
Most people have issues on setting up a the heart of your Developer Carreer, the Environment. What I strongly advise is to have at least a bit knowledge of the main usuage of Linux Distributions and also programming languages. Without these you will most likely fail at one stage or another to make a successful build.
So lets evaluate what you need :
Linux Distro (i.e. any Ubuntu should do well)
a VM or native Linux
quite a bit of Linux skills and programing skills
Time and a high tolerance of frustration
Sufficent RAM (at least 4 GB, more is advised otherwise use native Linux)
If you know how to install a native Linux Distribution you can probably skip this part, I will explain how to use a VM to fill the basic needs and keep your development area seperated from you most likely otherwise needed productive platform.
The following Steps are just keywords, if you want to develop you will need to inform yourself how to achieve all this yourself, there's lots of tutorials out there.
Step 1: Download a VM and a Linux Distro
Step 2: Install VM Software (i.e. VirtualBox or VMWare Server)
Step 3: Install the Linux Distro in VM (you'll need at least 6 GB Swap and 50 GB or More HD space to have enough room for experiments/seperate syncs/etc...)
Step 4: Figure out if you installed 32 Bit or 64 Bit (you'll need this later)
Step 5: Boot your new VM based Linux Distro
Step 6: Set up a Share Mount between your host and your VM
Step 7: download the Android Source/Cyanogen Source of your desire (i.e. : repo http://**** -b gingerbread) into a folder for you desire (the folder should represent your ROM's/Kernel name)
Building a Kernel
Building a Kernel is one of the easier parts considering the full source code is available for download. Sony Erricson Open Source Dev Website is providing fully funtional Kernel sources usually in the tar.gz format. Download the source code and extract it, or if you use a git based repository clone or checkout the project into a folder of your desire.
The next step, is not mandatory but advised to sync the entire Android repo/CyanogenRepo as the repo also provides the Cross Compiler toolchain which is needed to compile for your device.
Once everything is finished downloading you should check the following path in the Android repo : platform/linux-x86(orx64)/prebuilt/toolchain/arm-eabi-4.4.3/bin/ this is the cross compiler we will use to build the kernel itself, its vital to have the compiler present, the version number maybe different though.
Lets start with the building process itself:
Code:
cd kernelfolder
cp arch/arm/configs/semc_mimmi_defconfig .config (the command maybe change to copy another default config file, it creates a file in the root of the kernel folder called ".config"
ARCH=arm make menuconfig (this will bring up the kernel configuration menu for arm devices)
In the Menu Config you can change/add features to the Kernel once you are done safe the kernel config. Now your Kernel is ready to be compiled:
Code:
ARCH=arm CROSS_COMPILE=/pathtoandroid_source/platform/linux-x86(x64)/prebuilt/toolchain/arm-eabi-4.4.3/bin/arm-eabi- make -j4
This will start a compile with 4 Jobs using the Architecture ARM and the Cross Compiler arm-eabi from the Android Source Repo. Once finished you'll find your Image in your kernel folder under arch/arm/boot/Image. Now you'll need to build your own ramdisk this is covered here at xda as well azuzu has also build a tool available to download.
Follow the instructions to create the kernel.sin which now can be flashed with Flashtool. Changes to Kernel source will now be available to your compiled Kernel. How to change the Kernel source is beyond this tutorial but programmers in C will have fun there.
Building Android from Source
Now lets get started with the more advanced part and the most frustrating part in the beginning. The easiest way to build for the mimmi would be to sync the Cyanogen Gingerbread source code. Which can be checked out using the repo binary (see tutorials on googles website also which packages for which architecture (x86 or x64) are addionally needed also the correct java version is important)
Now lets cut to the chase.
Code:
repo sync -u http://github.com/CyanogenMod/... -b gingerbread (or froyo or another branch you would like to check out)
once your repo is synced (you could also add "-j8" to enhance the speed of the repo command, it will take quite a while) you are almost ready to start. If you synced an AOSP source you will have the get your device and hardware libraries ready first. This means you will have to port i.e. the device project and hardware project (mimmi and msm7227-common folders from CM and also hardware folder from CM) to the AOSP source. It makes sense to port these to your AOSP source since they are the most complete so far. For Camera libraries you can sync from doixanhs repo the libcamera-5mp.
Now lets get a short overview over the Android source, it contains of various folders:
frameworks
device
vendor
hardware
platform
external
These are the most interesting, frameworks folder holds a bunch of android libraries and files which provide the functionality however often you will need to change a few things here and there since the mimmi is unique in its hardware. Everything you change will need to be approved with the following command:
Code:
make update-api
This will add all the functions, variables or anything else to the current-api.xml and ensure its available at build time.
The device folder holds device specific files, build-configs and so on. Lets look at some of the important files:
Code:
device/semc/mimmi/overlay/frameworks/base/res/res/values/config.xml/power.xml
The two xmls hold configurations of the build process which are device specific either LightSensorWarmupTime and so on the full list is in the root folder of frameworks/base/res/res/values/config.xml <-- any part you feel you need to change copy the lines from there and change in you device specific config.xml.
Now to another file:
Code:
device/semc/msm7227-common/BoardConfig.mk
This files olds the device sepecific configurations for the ARM, WLAN, etc.
Look at all the files in mimmi and msm7227-common and figure out what they do, google of course will guide you on that.
Also take a look in the:
Code:
vendor/cyanogen/products/
folder and find the mimmi config and get familiar with this as well. Nobody will be able to help unless you face specific issues. Developing is learning by doing and a lot of self teaching and the will to understand all of this yourself. We can't teach but you can learn. Specific questions however are usually proudly answered by most devs if they have already figured it out.
Lets start building now, first you'll need to get your lunch command to know which devices have makefiles (I always do it to be sure)
Code:
source build/envsetup.sh
This will now add all the known devices to your lunchcombo (the devices are usually definied in the vendorsetup.sh pointing to the makefiles)
Code:
lunch
Will get you the list of available devices and will wait for user input to select the device you want to build, choose the mimmi.
Code:
make -j4
This will start the building process with 4 jobs.
Now its time to get a coffee. Usually you will have a bunch of different issues on this part but the CM source is pretty good and you might be lucky there.
Now lets look at typicial errors:
Code:
symbol not found : means a variable in used in the code has not been defined, before its use this one is a tricky one
try to locate the source file and find the line the compiler is complaining about. Now check in the framework usually in
res/res/values or layout look for the type of the erros (String or array) and look in the corresponding xml if the variable
is present. Now look in vendor/cyanogen/overlay if your variable is also declared there and so on.
Code:
function not found/function of incompatible types : also a tricky one, you might sync a repo and made local changes to
a file and suddenly your functions another file calls are not present or have changed, find the differences between them and
think about how it has changed, maybe add the function again or maybe another function does the job now. you will need
to locate the changes compare them and you should be fine again
Code:
No Rule to make target: this one is usually due to a missing/incomplete Makefile you might need to add manually or
if you don't need it anyway the easiest would be to delete the not building folder
Once your source has finished compiling you will find you system image in:
Code:
out/products/mimmi/system/
As of now unfortunately its still missing a few files here and there. Compare ROMs and Compare what might needs to be added. However I advise not switch libraries around its best to use your own libraries. However sometimes you will face issues when doing this so start with the files created there and just add the recovery and ramdisk to your rom. Now observe via adb if everything is running. This will take time and add one missing lib after another one and reboot, after each (like grallocs or librils or fm libs and so). This is basically a debugging part of the job.
You will now add one by one more functionality, but keep in mind to use logcat to see what goes wrong, maybe some stuff can be changed in the source rather then randomly adding stuff.
also this one just in case.
Hey there c: As always, you come surprising everyone with your stuff haha Good job on this one, I think it is always good to have some tutorials from the people who build specifically for our Mimmi's
Before reading this, I wanted to get started on developing and I went to Android's official developers site, I did some steps, now I have the complete source of Android here (I use Ubuntu 10.04, the LTS version... Dunno if telling you that it is LTS ver. really matters, but just in case) andthe whole environment ready to build. Now, reading at this, I realize I don't have 4Gb of RAM on this "old" (2007..) notebook. Anyways, the thing is: I followed the steps listed here, but when I wrote this command-
Code:
$ make -j4
-the terminal started to execute files, or something... I'll add a screenshot at the end about this. It has been 3 days since that, and the terminal is still doing the same. I know developing requires a lot of patience, but... 3 days? Is this normal?? I have looked through the Internet for problems with this command, but no one seems to have talked about it.
Thanks for your time, work and effort for the community, we really appreciate it c: Bye!
Link to the Screenshot:
http://i259.photobucket.com/albums/hh313/link_4ever/Screenshot.png
The 'make -j4' uses 4 threads to compile everything, if your notebook does not have at least an hyperthreading-technology enabled CPU, well, that's to expect when building an entire OS, plus you don't have sufficient RAM, I do have 2GB and a DualCore CPU and it takes at least 1 hour to compile an average desktop kernel with that same command. I have not tried to compile android, but I think that it will take at least 4 hours to compile everything. Just my thought.
RozenTensai said:
The 'make -j4' uses 4 threads to compile everything, if your notebook does not have at least an hyperthreading-technology enabled CPU, well, that's to expect when building an entire OS, plus you don't have sufficient RAM, I do have 2GB and a DualCore CPU and it takes at least 1 hour to compile an average desktop kernel with that same command. I have not tried to compile android, but I think that it will take at least 4 hours to compile everything. Just my thought.
Click to expand...
Click to collapse
Thank you for your answer! Just ten minutes ago, the 'make' command finished ! And about my notebook, it is just like yours: 2Gb RAM and Dual-Core CPU, I'm not sure but I think it runs at 2,8 GHz. And also, like I said earlier, I know developing takes time. I know how slow processes can be, in fact, there were commands previously that took 1 hour or more to finish their tasks. 1 hour, 4 hours, it's ok but... 3 days? Isn't it a bit too much xd?? Now I'm afraid to turn off the computer because I don't want to compile that thing again hahaha
the "-j" option depends on the number of (virtual) cores you have.
get the number:
Code:
grep processor /proc/cpuinfo | wc -l
if you have native linux and like to work on the machine I recommend do lower the number at least -1 otherwise get a coffee and keep hands off the build process
b
make -j4, lol. Many people do not have. 4 cores on the processor
paul-xxx said:
make -j4, lol. Many people do not have. 4 cores on the processor
Click to expand...
Click to collapse
This parameter refers to threads instead of hardware cores
Sp4rrow said:
This parameter refers to threads instead of hardware cores
Click to expand...
Click to collapse
ok. probably a mistake. but still. I always use 2. it brought to me the best results
I use j6
And also j refers to jobs everybody may change to what they want. For kernel i build with j12.
If you know better like it seems you always do write it down.
Sent from my U20i using xda premium
I can't find any 2.1.1.A.0.6 Sources. Link to the sources you use slade?
http://developer.sonyericsson.com/cws/devworld/search-downloads/opensource?cc=gb&lc=en
should be:
x10_x10mini_X10minipro_x8_eclair_2.1.A.0.435.tar.gz
Stock Kernel with only CWM5 installed...
Slade i want some help from you. how can i embed CWM5 in the stock kernel without any other changes to it??
i want a stock kernel with nothing changed in it only CWM5 installed in it. how this can be done???
i forgot to say the most important thing!: Thank you very much for your work and effort Slade
I just came to the configuration menu of the kernel. i see there are options predefined for the mimmi, but how can i optimize it more, there are soooo many options, and to tell the truth i don't have a clue what they do

[DEV][CM9][HOWTO] Build CM9 From Scratch!

It's time. As offered previously for the Nook Color and HP Touchpad...
A Build CM9-for-NookTablet Walkthrough
What is this?
This document provides instructions for developers to build a complete Cyanogenmod 9 update.zip for the Nook Tablet aka "acclaim" (and more theoretically the newer 512MB model, aka "elation") from source code. The instructions require a Linux computer and appropriate tools (discussed below).
It is important to emphasize that CM9 is a work in progress and if you try it you will be building/using something in mid-development. Things may break and/or not work at any time. Read below, the build instructions, and the relevant licenses for additional info and disclaimers.
Hopefully, for those developers who are interested and willing to take the risks, this can be a fun and educational experiment. And hopefully more developers will help chrmhoffman, kuzma30, mik_os, and others improve CM and the 3.0 kernel.
So does this build use the new, experimental 3.0 kernel then?
Update: At first, I mentioned that 2.6.35 was also supported, but apparently this will require additional files that aren't currently installed. So for now, yes, it uses the 3.0 kernel, which may not be compatible with the newer 512MB NTs. Although it is not confirmed one way or the other, as it has not been tested on these devices.
The configuration uses the experimental 3.0 kernel, which is built on-the-fly from the latest source code.
Unless you really want to take some risks, if you have a newer-model 8GB/512MB Nook Tablet (aka "elation"), the 3.0 kernel build is not for you...yet! It may boot, it may not. It has not been tested by any of the developers with that device, and as of this writing there are known kernel issues with the 512MB. (So actually, this is a good opportunity for developers to try it and contribute.) The 3.0 kernel development thread has more on this.
Any further discussion below assumes the 3.0 configuration, as the 2.6.35 branch isn't as up-to-date and isn't really being maintained. 3.0 is the future!
These instructions are for Linux. How do I build on Windows/Mac/etc?
If you have Mac or Windows or something else, you may consider installing a virtual machine such VirtualBox (which is free). Then run Linux, say a Ubuntu distribution, as a guest from your host computer. This allows you to "sandbox" your development environment, and gives an opportunity to learn about Linux with actual hands-on experience, all without reformatting your computer...
CM9 can also be built on Mac natively, either in Snow Leopard or Lion. Instructions for building (CM7) on a Mac can be found on the CyanogenMod wiki.
A few modifications need to be made to those instructions for CM9 & Lion, but such instructions aren't hard to find.
Will my build actually be usable?
CM9 (and the acclaim port) is in active development, and when you do a build from the latest source, you are using a bleeding-edge build of whatever happens to be in the repositories at the time. There is no guarantee it will work in any capacity. It may actually cause terrible damage. So only try at your own risk, and assume responsibility for your actions. If you find a bug, help fix it.
It is critical that you understand the risks before trying this and fully back up your system before trying any build. It is equally important to have a bootable SD standing by so that you can restore your device to a known good version if something goes terribly wrong, which may actually happen. Hopelessly staring at a non-booting device is never fun. There are other threads about recovering hosed acclaim systems, so I will leave you to finding and understanding them and preparing yourself for solving such problems. You should always assume the worst will happen, so be prepared.
Speaking personally, I don't have either model of NT and have never run CM9 on one, so can not attest to its usability per se. You should consider this a work in progress full-of-bugs until told otherwise.
Which bootloader is this using?
Cyanoboot, based on u-boot. The full github repo w/history (rather than raw files) is now available as well. Special credit to bauwks for fixing the locked bootloader design flaw.
Will this build result in a working update.zip suitable for use with ClockWorkMod recovery?
The build process has been modified to generate a fully flashable update.zip, but, as, with everything else, nothing is guaranteed.
Does this create a build for SD Card or for EMMC (internal storage)?
EMMC.
I'm stuck! I've been at it for hours. Something isn't working. Where can I get help?
If you have never built an operating system before-- this may be a good way to learn, provided you accept the risks and consequences of trying. This and other forum threads may be a good place to look for help. Also try IRC.
You are also able to leave comments in the walkthrough document itself. If you have a tip that might help others, post it there. If I get a chance, I'll take the best of them and incorporate it into the doc.
Does this build ClockworkMod recovery too?
It should. Check the $OUT directory for two files-- recovery.img and recovery.img.sdcard. The recovery.img file is (hopefully) flashable via fastboot:
fastboot flash recovery recovery.img
The recovery.img.sdcard can be renamed to recovery.img and put on your sdcard.
Can I build twrp2 instead of ClockWorkMod?
TWRP2, in case you're not familiar with it, is an alternative recovery image created by Team Win, particularly user dees_troy. It can be used for flashing update.zip files and making/restoring backups, among other things.st
The 3.0 build configuration currently contains the needed settings for a twrp build. You will just need to replace the ~/android/system/bootable/recovery repo with twrp's source code. You can do this by adding the following lines to your local_manifest.xml file:
<remove-project name="CyanogenMod/android_bootable_recovery"/>
<project name="TeamWin/Team-Win-Recovery-Project" path="bootable/recovery" remote="gh" revision="master" />
You can then repo sync (per the instructions) and then do this command to rebuild the recovery using twrp2.
mka recoveryimage
The recovery.img and recovery.img.sdcard files in $OUT should now contain the latest twrp2. (If it doesn't, try clearing out the recovery-related files in $OUT, including $OUT/obj/RECOVERY_EXECUTABLES)
Please direct twrp2-related questions and solutions to the twrp2 thread, not here.
Who do I thank?
Thanks to chrmhoffmann, mik_os, kuzma30, cyanogen, arcee, nemith, Texas Instruments, Barnes & Noble, and all the other devs, testers, and contributors, of which there are many. And special thank to bauwks, who made this all possible.
For this walkthrough in particular, big thanks to chrmhoffmann as well as eyeballer for testing. Everyone-- go find a thread by these people and thank them.
Who do I blame?
Yourself. Only yourself.
To whom do I donate?
Not to me. You can donate to any of the above if you feel like it. I do suggest considering a donation to the Electronic Frontier Foundation, who among other noble activities are fighting to keep "jailbreaking" and its Android phone and tablet equivalents legal. Your Android devices are full-fledged computers. Don't let corporate or government special interests take away the right to mess with your own possessions as you wish.
Finally, good luck. We're all counting on you. If and when you have problems, post them, and hopefully others will help find a solution.
Developers are needed. Enquire within.
-ft
(twitter)
-----
How To Build CM9 for Nook Tablet From Source
(Google Doc... or is it Google Drive now?)
And one more thing...
If I think of something to add, I'll put it here.
Good stuffs. I'll give it a try later in the week. I have everything set up. Going to be fun testing.
Im planning on doing this too. Thanks for making a guide, although I'll probably be in the IRC within 5 minutes of starting with questions
Sent from my Team A CM9 Alpha 0.03 Nook Tablet
Thank you very much for putting this together!
I am testing on an 8GB nook.
I can verify that the cwm and twrp2 recovery images boot with the 3.0 kernel, however CM9 fails to boot, it hangs on a blank screen with the backlight on and eventually just reboots. I am not able to get it to connect via usb to print logcat so I don't think it is getting very far.
Do you happen to have any instructions for tapping into the serial on these devices to see what is going on?
Also, with the new cwm it will not mount the sdcard through the menu. If I open a shell within cwm recovery I can mount it fine, except it is read-only.
In case it is useful, here is a dmesg from cwm:
http://pastebin.com/0fkyuSwe
arcon2600 said:
Also, with the new cwm it will not mount the sdcard through the menu. If I open a shell within cwm recovery I can mount it fine, except it is read-only.
In case it is useful, here is a dmesg from cwm:
http://pastebin.com/0fkyuSwe
Click to expand...
Click to collapse
Ah, this is very interesting! It's similar behavior to twrp.. a mounting issue with sdcard... wonder if this means the kernel is somehow not letting it mount, or if the problem is with recovery.fstab...
New patch, there shouldn't be a gpio_wp pin assigned to begin with...
Also, this is tested on my 8GB, I don't have a 16GB to test with.
diff --git a/arch/arm/mach-omap2/board-nooktablet.c b/arch/arm/mach-omap2/board-nooktablet.c
index de38b5c..a10dd93 100644
--- a/arch/arm/mach-omap2/board-nooktablet.c
+++ b/arch/arm/mach-omap2/board-nooktablet.c
@@ -684,7 +684,7 @@ static struct omap2_hsmmc_info mmc[] = {
.mmc = 1,
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA | MMC_CAP_1_8V_DDR,
// .gpio_cd = -EINVAL,
- .gpio_wp = 4,
+ .gpio_wp = -EINVAL,
.nonremovable = false,
// .no_off_init = true,
#ifdef CONFIG_PM_RUNTIME
Build environment ready but cannot use repo command
HI! i would love to build a zip with the new kernel but i cannot use the repo command in the terminal in Linux Mint latest build. I have downloaded Android SDK and all the required build libraries and set up all the directories. i have the NTsparkkernel folder in the android directory. Could anyone offer some advice on how to apt-get (the REPO module) so I can build the zip. Thank you for your time. Bruce
about repo
C64assembly said:
HI! i would love to build a zip with the new kernel but i cannot use the repo command in the terminal in Linux Mint latest build. I have downloaded Android SDK and all the required build libraries and set up all the directories. i have the NTsparkkernel folder in the android directory. Could anyone offer some advice on how to apt-get (the REPO module) so I can build the zip. Thank you for your time. Bruce
Click to expand...
Click to collapse
The repo command is actually something you get from Google. It's not in the apt-get repositories.
To install the repo script:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
The repo binary will be in ~/bin and you can add this to your path if you like.
Confirmed by chrmhoffmann and committed. Thank you!
Thank you for this guide. I've compiled stuff before, but built my first Android from source last night. Although the build from that time has random reboots (the nature of the beast).
I'll be building quite a bit I think
Damn see I'm just porting right now I wanna build from source but my PC isn't Linux friendly yet I'm waiting on a tb internal so I can set up and learn this but it just looks so complicated and idk why. I feel once I learn it probably be easy as hell. Thanks Fattire
__________________________________________________
Sent from my SPH-L700-GNEX-using Tapatalk 2
Danrarbc said:
Thank you for this guide. I've compiled stuff before, but built my first Android from source last night. Although the build from that time has random reboots (the nature of the beast).
I'll be building quite a bit I think
Click to expand...
Click to collapse
Hey congrats and welcome to the club!
Cannot Make the bacon...
Hey Fattire! Thank you for your guide. I was able to finally download the source for cm9 and add the 3.0 kernel repository. I have everything in one folder. I am new to Linux and had to add a Path command to get Repo Sync to work correctly. Once I got the Repos I ran into another problem trying to issue command cd ~/android/system/vendor/cm , then enter “./get-prebuilts”. The Make Bacon and or Croot <enter> brunch acclaim does nothing either. It seems I am missing somthing here. Maybe a different distro of Linux besides Mint would work better for me... getting close to building (i hope). Thanks!
I have to issue PATH=~/bin:$PATH every time I repo sync.
C64assembly said:
Hey Fattire! Thank you for your guide. I was able to finally download the source for cm9 and add the 3.0 kernel repository. I have everything in one folder. I am new to Linux and had to add a Path command to get Repo Sync to work correctly. Once I got the Repos I ran into another problem trying to issue command cd ~/android/system/vendor/cm , then enter “./get-prebuilts”. The Make Bacon and or Croot <enter> brunch acclaim does nothing either. It seems I am missing somthing here. Maybe a different distro of Linux besides Mint would work better for me... getting close to building (i hope). Thanks!
Click to expand...
Click to collapse
I use Ubuntu here I started with 10.04 LTS since it was the the build used and supported by Googles build instructions. Yous should still be able to do it though.
Did you initialize the build environment using ". build/envsetup.sh" at android/system (it looks like is the base of your source from your post)
Yes. Thank you for your advice KeithN. I am going to start from scratch. I might just put Ubuntu 10.04 on my comp tonight if I cannot get it to build properly.
I'm going for Ubuntu 12.04 command-line. If that doesn't go well, I'll go for 10.04 as well.
I built mine on 12.04 (Xubuntu, but that doesn't matter so much).
I added a debian sqeeze apt repository to get sun-java6-jdk, then used -f install when it complained because one of it's dependencies exists in Ubuntu but not that same version #. Commented out the repository after it installed so I don't get more debian packages on accident. For everything else I think it was just following the guide as-is.
C64assembly said:
I am new to Linux and had to add a Path command to get Repo Sync to work correctly.
Click to expand...
Click to collapse
Yes, I had recommended doing that. The PATH=$PATH:~/bin command will ensure that no matter what directory you type "repo", it'll know where to find the file.
C64assembly said:
Once I got the Repos I ran into another problem trying to issue command cd ~/android/system/vendor/cm , then enter “./get-prebuilts”. The Make Bacon and or Croot <enter> brunch acclaim does nothing either. It seems I am missing somthing here. Maybe a different distro of Linux besides Mint would work better for me... getting close to building (i hope). Thanks!
I have to issue PATH=~/bin:$PATH every time I repo sync.
Click to expand...
Click to collapse
Instead of entering it every time, you can add that PATH statement so that it's automatically invoked when you open a new Terminal window.
Just add the line to an "invisible" file (it's invisible because it starts with a period (.) and won't show up in a normal listing) called .bashrc in ~/.bashrc (the ~ is a shortcut for your home directory, or /home/youraccountname/). The hidden .bashrc file will probably exist already. Just add the statement to the end.
Keithn said:
Did you initialize the build environment using ". build/envsetup.sh" at android/system (it looks like is the base of your source from your post)
Click to expand...
Click to collapse
This is right. Try this:
$ cd ~/android/system
$ . build/envsetup.sh
(the $ represents the prompt and should not be typed. For the second command, it's literally a period followed by a space followed by build/envsetup.sh)
I am using the latest 12.04 ubuntu, fwiw.
I know this is for CM9, but any help would be appreciated (trying aokp). I had issues with the packaging of the .zip it looks like. I was able to build for my fascinate so I know the source will build. Any suggestions?
Output

SU for Android on ChromeOS

This is a cross-post from a reddit thread I started, but this is probably a more appropriate location for it.
I have been trying to modify files in the system folder for the Android container on the Asus Flip so I can install SuperSu, but have run into some problems.
The system folder is contained in a squashfs image on the chromebook at /opt/google/containers/android/system.raw.img. Mounted squashfs images appear to not support read-write access. I have been able to unsquash the image, add the SuperSU apk to the /system/priv-app folder and su to the /system/xbin folder, and remake the image. This boots, but SuperSU force closes as soon as it starts.
To make tinkering easier, I've tried building a writable image using dd and mkfs. I placed it in a location that has rw access and modified the /etc/init/android-ureadahead.conf script which mounts it to enable rw access. Unfortunately though it won't boot. The boot logs for the android container show a litany of SELinux errors for different things that it could not set context, operation not permitted. I can post the exact log if necessary. Some googling led me to find that the SELinux security context attributes weren't being replicated in my image, so I tried mounting with context and fscontext options equal to the contexts from the original image, but I get the same problem.
If anyone has any ideas I'd be especially grateful.
lionclaw said:
This is a cross-post from a reddit thread I started, but this is probably a more appropriate location for it.
I have been trying to modify files in the system folder for the Android container on the Asus Flip so I can install SuperSu, but have run into some problems.
The system folder is contained in a squashfs image on the chromebook at /opt/google/containers/android/system.raw.img. Mounted squashfs images appear to not support read-write access. I have been able to unsquash the image, add the SuperSU apk to the /system/priv-app folder and su to the /system/xbin folder, and remake the image. This boots, but SuperSU force closes as soon as it starts.
To make tinkering easier, I've tried building a writable image using dd and mkfs. I placed it in a location that has rw access and modified the /etc/init/android-ureadahead.conf script which mounts it to enable rw access. Unfortunately though it won't boot. The boot logs for the android container show a litany of SELinux errors for different things that it could not set context, operation not permitted. I can post the exact log if necessary. Some googling led me to find that the SELinux security context attributes weren't being replicated in my image, so I tried mounting with context and fscontext options equal to the contexts from the original image, but I get the same problem.
If anyone has any ideas I'd be especially grateful.
Click to expand...
Click to collapse
Wayyyy out of my area of expertise, but here's my (completely novice) best guess.
>All Chromebooks are write-protected with a screw on the motherboard
>Putting a Chromebook in developer mode allows for some tinkering ie things like chroots, and on the asus flip, the ability to install apks from unknown sources.
>Unscrewing the write-protect screw allows for the ability to completely install a new operating system or dual boot setup.
>Maybe you need to do that before you're able to accomplish root access?
My other idea would be to try and figure out a way of doing a systemless root?
Also, total aside but since this is the only thread I've found on XDA about this device, I think chroots are theoretically possible now without the need to be in developer mode via Android apps (even without root on Android). Download the GIMP port from the Play Store to see what I'm talking about. Playing around with that for a few minutes really made me wish that it didn't use emulated mouse/keyboard in it's implementation. Also, it appears that apt-get is broken, but regardless it might interest someone out there looking for a project.
back from the dead, any progress on this?
I have been able to successfully root the Android image on my Asus Flip.
I built a blank image with dd in /usr/local, formatted it with mkfs, mounted it to a folder, mounted the original system.raw.img to a folder, copied the files across, placed *all* the SuperSU files listed as 'required' in the SuperSU update-binary in the relevant places in /system in my new image, set permissions & contexts for those files, edited arc-system-mount.conf and arc-ureadahead.conf to point to the new image and, finally, patched /etc/selinux/arc/policy/policy.30 with the SuperSU sepolicy patching tool in order to boot my rooted Android instance with selinux set to enforcing.
I have created a couple of scripts which more-or-less fully automate this procedure, which can be downloaded from nolirium.blogspot.com. Please feel free to download, open the scripts in a text editor to check them out, and try them out if you like. Only tested on Asus Flip, though.
I seem to be unable to post attachments at the moment so I will just add the descriptions here, I could probably post the entire scripts here too if anyone wants. Feel free to let me know what you think.
DESCRIPTIONS:
1-3.sh
Combines the first three scripts listed below.
01Makecontainer.sh
Creates an 900MB filesystem image in /usr/local/Android_Images, formats it, then copies Android system files therein.
02Editconf.sh
Modifies two system files: arc-system-mount.conf - changing the mount-as-read-only flag and replacing the Android system image location with a new location; and arc-ureadahead.conf - again replacing the Android system image location. Originals are renamed .old - copies of which are also placed in /usr/local/Backup.
03Androidroot.sh
Mounts the previously created Android filesystem image to a folder, and copies SuperSU files to the mounted image as specified in the SuperSU update-binary.
04SEpatch.sh
Copies an SELinux policy file found at /etc/selinux/arc/policy/policy.30 to the Downloads folder, opens an Android root shell for the SuperSU policy patching command to be entered, then copies the patched policy back to the original location. A copy of the original policy.30 is saved at /etc/selinux/arc/policy/policy.30.old and /usr/local/Backup/policy.30.old
Uninstall.sh
Removes the folder /usr/local/Android_Images and attempts to restore the modified system files arc-system-mount.conf and arc-ureadahead.conf.
ok so two questions, one do you think this would work on the Acer r13 convertable? and 2 where can I find the actual instructions/scripts
keithkaaos said:
ok so two questions, one do you think this would work on the Acer r13 convertable? and 2 where can I find the actual instructions/scripts
Click to expand...
Click to collapse
The R13 has a 64-bit Mediatek processor, right?
I have added a version for ARM64, but I haven't tested it.
You can find the instructions and scripts at nolirium.blogspot.com
ya, its a mediatek. and thanks ill go see if i can find it
---------- Post added at 03:31 AM ---------- Previous post was at 02:58 AM ----------
wow, ok. i can do this but im not sure i want to.. after reading the possible problems i may run into. Im going to be getting the G. Home in a couple weeks and i gotta keep things running smooth. This seems like going a tad too far then i need to. The other day i had action launcher going and it looked pretty damn good but i really want to try and get the action3.apk that i have put into the pri-app folder or whatever the chromebook uses i found the syst folder but cant access it. Im wondering if i make the machine writable it would work but im afraid of losing my updates, as long as i could do them manualy, i guess that would be cool. Also since im already going on... has anyone found a way to disable the dev boot screen without tinkering with the physical chromebook yet?
SuperSU on Chromebook
Hey there I love this post but unfortunately im on the mediatek (well not unfortunately cause i love it) but i do really want super su .. But i found this other post that i tried out but i am having a problem executing the scripts. When i go to run the first one, it says can not open "name of script" but the dev takes a pretty cool approach. Im still new to Chrome OS but thanks for the post and if you have any advice on executing scripts id love to hear it!! http://nolirium.blogspot.com/
I'm guessing the above post was moved from another thread...
Anyway, it turns out that zipping/unzipping the files in Chrome OS's file manager sets all the permissions to read-only. Apologies! sudo chmod+x *scriptname* should fix it...
Regarding OS updates, I actually haven't had a problem receiving auto-updates with software write-protect switched off; the main possible potential issue I could imagine arising from the procedure I outlined would involve restoring the original conf files if both sets of backups get deleted/overwritten. This seems unlikely, but in that case either manually editing the files to insert the original string (/opt/google/containers/android/system.raw.img), or doing a powerwash with forced update might be necessary in order to get the original Android container booting again.
I don't think anyone's found a way to shorten/disable the dev boot screen without removing the hardware write-protect screw - from what I've read, the flags are set in a part of the firmware which is essentially read-only unless the screw is removed. Perhaps at some point the Chrome OS devs will get fed up of reading reports from users whose relatives accidentally reset the device by pressing spacebar, and change the setup. Here's hoping.
Hey just jumpig in the thread right quick to see if these instructions are old or what-- got a chromebook pro and the notion of having to update a squashed filesystem every timeto install su seems like a pain..
Is there any kind of authoritative documentation/breakdown regarding what Chromeos is mounting where before I start breaking things? Also anyone happen to know if there's a write-protect screw anywhere in the chromebook plus/pro?
Other questions:
* adbd is running, but is not accessible from adb in the (linux) shell, which shows no devices. Do I need to access adb from another device (i'm short a usb c cable right now) or can I use adb (which is there!) on the chrome side to access adbd on the android side?
* Anyone know if adb via tcp/ip is available? Don't see it in the android settings.
Hey,
There's no real documentation AFAIK, the thing is that ARC++ is a bit of a moving target, as it's so actively being developed/reworked. For instance, with the method described earlier in the thread - it started off being possible to just swap out a file location in arc-ureadahead.conf, then they changed it to arc-setup-conf, and now, since a few CrOS versions ago, the rootfs squashfs image is mounted in a loop fashion via the /usr/sbin/arc-setup binary instead, making an overview of the setup somewhat opaque to the casual observer.
I was kind of hoping to implement a kind of hybrid systemless root style setup myself, but unfortunately I haven't really managed to find the time to sit down and fully figure out a few parts of the puzzle, in particular relating to minijail and working with namespaces. So, I'm still using the method mentioned in posts above for my rooting needs at the moment, the only significant changes being that at the moment I'm replacing /opt/google/containers.android.system.raw.img with a symlink to my writeable rooted rootfs img, and also that in recent CrOS versions the mount-as-read only and debuggable flags can be found in /etc/init/arc-setup-env ("Environment variables for /usr/sbin/arc-setup").
In general though, one can kind of get an idea of what's going on in the default setup by reading through the various /etc/init/arc-* Chrome OS upstart jobs (and their logs in /var/log). Though, like I say, things keep changing around somewhat with every CrOS update, as the implementation 'improves'. As time goes by, and the subsystem matures, it'll certainly be interesting to see what other approaches are possible relating to customizing Android on Chrome OS.
There should definitely be a write protect screw somewhere on the motherboard for the Samsungs, but so far I haven't come across any pics showing exactly which screw it is. So far, no-one seems to have been brave/foolhardy enough to fully tear down their own machine and locate the screw!
Regarding adb, on my device I found the following in arc-setup-env:
# The IPV4 address of the container.
export ARC_CONTAINER_IPV4_ADDRESS=100.115.92.2/30
adb 100.115.92.2 (in Chrome OS's shell) works fine for me, the authorisation checkbox pops up and then good to go. su works fine through adb as expected. There's also a useful little nsenter script in Chrome OS to get into the android shell; /usr/sbin/android-sh, which I've been using in my script to help patch SE linux.
I actually just updated my rooting scripts recently to support 7.1.1, though I've only tested on my own Armv7 device (Flip C100).
I'll attach them to this post in case anyone wants to take a look. There's a readme in the zip, some more details can also be found here and below
EDIT: Fixed the SE Linux issue occurring with the previous version I uploaded (it was launching daemonsu from u:r:init:s0 instead of u:r:supersu:s0).
Anyone considering giving them a spin should bear in mind that the method does involve creating a fairly large file on the device as a rooted copy of the android rootfs. (1GB for arm, 1.4GB for Intel). There's a readme in the zip but the other couple of important points are that:
a) The SuperSU 2.82 SR1 zip also needs to be downloaded and extracted to ~/Downloads on the Chromebook.
b) Rootfs verification needs to be off. The command to force this is:
Code:
sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --force --partitions $(( $(rootdev -s | sed -r 's/.*(.)$/\1/') - 1))
or the regular command to do it is:
Code:
sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification
c) If, subsequent to running the scripts, there's a problem loading Android apps (e.g. after a powerwash or failed install), the command to restore the original rootfs image is:
Code:
sudo mv /opt/google/containers/android/system.raw.img.bk /opt/google/containers/android/system.raw.img
Hey this is a great response.. thanks!
Nolirum said:
Hey,
There's no real documentation AFAIK, the thing is that ARC++ is a bit of a moving target, as it's so actively being developed/reworked. For instance, with the method described earlier in the thread - it started off being possible to just swap out a file location in arc-ureadahead.conf, then they changed it to arc-setup-conf, and now, since a few CrOS versions ago, the rootfs squashfs image is mounted in a loop fashion via the /usr/sbin/arc-setup binary instead, making an overview of the setup somewhat opaque to the casual observer.
Click to expand...
Click to collapse
verity
Yeah playing with it now, I'm looking at these /etc/init/arc-*-conf files... I see that the /dev/loop# files are being set up... (more below)
Nolirum said:
I was kind of hoping to implement a kind of hybrid systemless root style setup myself, but unfortunately I haven't really managed to find the time to sit down and fully figure out a few parts of the puzzle, in particular relating to minijail and working with namespaces. So, I'm still using the method mentioned in posts above for my rooting needs at the moment, the only significant changes being that at the moment I'm replacing /opt/google/containers.android.system.raw.img with a symlink to my writeable rooted rootfs img, and also that in recent CrOS versions the mount-as-read only and debuggable flags can be found in /etc/init/arc-setup-env ("Environment variables for /usr/sbin/arc-setup").
Click to expand...
Click to collapse
Sorry not sure what you mean by "hybrid systemless root style setup"? I take it you're modifying the startup script and replaced the squashfs file in /opt... my concern about doing it was whether they were implementing some kind of dm-verity equivalent to the squashfs file to make sure it hasn't been tampered with (say, by adding /sbin/su or whatever) or whether it's safe to replace that file.. Sounds like you're saying it is? (update: I guess that's what rootfs verification does, and we can turn it off....)
Also you mean arc-setup.conf:
env ANDROID_DEBUGGABLE = 0
right?
Nolirum said:
In general though, one can kind of get an idea of what's going on in the default setup by reading through the various /etc/init/arc-* Chrome OS upstart jobs (and their logs in /var/log). Though, like I say, things keep changing around somewhat with every CrOS update, as the implementation 'improves'. As time goes by, and the subsystem matures, it'll certainly be interesting to see what other approaches are possible relating to customizing Android on Chrome OS.
Click to expand...
Click to collapse
I hadn't realized the boot was still in flux-- I'd have figured they'd worked that out by now...
Nolirum said:
There should definitely be a write protect screw somewhere on the motherboard for the Samsungs, but so far I haven't come across any pics showing exactly which screw it is. So far, no-one seems to have been brave/foolhardy enough to fully tear down their own machine and locate the screw!
Click to expand...
Click to collapse
Heh.. not gonna be me..
Nolirum said:
Regarding adb, on my device I found the following in arc-setup-env:
# The IPV4 address of the container.
export ARC_CONTAINER_IPV4_ADDRESS=100.115.92.2/30
adb 100.115.92.2 (in Chrome OS's shell) works fine for me, the authorisation checkbox pops up and then good to go. su works fine through adb as expected. There's also a useful little nsenter script in Chrome OS to get into the android shell; /usr/sbin/android-sh, which I've been using in my script to help patch SE linux.
Click to expand...
Click to collapse
Cool-- adb connect 100.115.92.2 does indeed work I was gonna use netcat to open port 5555 in chromeos and pipe it through, but looks like nc isn't here and I'm not yet ready to start changing the FS..though probably will be soon... btw any idea which partitions get overwritten when chrome it does it's updates? Will /root and /etc get overwritten, for example... would a "powerwash" overwrite it or can you get easily get into an unbootable state on these things?
It's also kind of strange that adb is listening to port 30 at that (internal?) bridge address by default witho no UI to turn it off.. and it's inaccessible from outside.. i wonder if there's an easy way to change the bridge to share the same IP as the actual interface...
Final thought-- I'd love to build that system image myself soup-to-nuts, but I can't find any "caroline" device tree set up... do you or anyone else happen to know if there's a standalone AOSP device tree for the chromebooks? It would be cool to have a mashup AOSP/lineageos if such a think could be possible-- I'm guessing chromiumos is just taking the android tree, building it and then adding it into their build... I Haven't build chromiumos for many years now so I can't even begin to imagine how this android build integrates with the whole emerge thing they had going.. but I bet it takes a while
Nolirum said:
I actually just updated my rooting scripts recently to support 7.1.1, though I've only tested on my own Armv7 device (Flip C100).
Click to expand...
Click to collapse
Cool I'll take a look at these scripts.
So I haven't yet run the scripts-- just looking through them-- I noticed the section starting:
if [ -e /etc/init/arc-setup-env ]; then
echo "Copying /etc/init/arc-setup-env to /usr/local/Backup"
This doesn't exist on the x86 CB Pro. There's an arc-setup.conf that sets up the environment variables though. It sets WRITABLE_MOUNT to 0, but then so does arc-system-mount.conf
Not sure if these are different between x86 and ARM or if it's just in the latest update.. but figured I'd let you know. Wanna throw thse scripts up on github somewhere? (Or I can do it) and we can maybe look at keeping them up to date and/or standardizing them? It wouldn't be hard to determine if it's running on ARM or x86_64 (uname -i for example)..
fattire said:
So I haven't yet run the scripts-- just looking through them-- I noticed the section starting:
if [ -e /etc/init/arc-setup-env ]; then
echo "Copying /etc/init/arc-setup-env to /usr/local/Backup"
This doesn't exist on the x86 CB Pro. There's an arc-setup.conf that sets up the environment variables though. It sets WRITABLE_MOUNT to 0, but then so does arc-system-mount.conf
Not sure if these are different between x86 and ARM or if it's just in the latest update.. but figured I'd let you know. Wanna throw thse scripts up on github somewhere? (Or I can do it) and we can maybe look at keeping them up to date and/or standardizing them? It wouldn't be hard to determine if it's running on ARM or x86_64 (uname -i for example)..
Click to expand...
Click to collapse
Oh, the arc-setup-env thing is intentional. There does appear to be another issue with the x86 version though. I've written up a detailed response to your previous post; it's in a text file at the moment so I'll copy it over and format it for posting here with quotes etc now - should only take a few minutes. Yeah, sticking them on github might be a good idea; I've been meaning to create an account over there anyway.
Yeah, so... Regarding the scripts, since I've put them up here for people to download - I should mention that the first person to test them (aside from me) has reported that something's not working right (I'm waiting for confirmation but I think he tried out the x86 version). It's likely either an error on my part when copying across from my Arm version, or perhaps something not working right with conditionals, meant to deal with the various OS versions ('if; then' statements, I mean). Once I find out more, I'll edit my earlier post...
fattire said:
Sorry not sure what you mean by "hybrid systemless root style setup"? I take it you're modifying the startup script and replaced the squashfs file in /opt... my concern about doing it was whether they were implementing some kind of dm-verity equivalent to the squashfs file to make sure it hasn't been tampered with (say, by adding /sbin/su or whatever) or whether it's safe to replace that file.. Sounds like you're saying it is?
Click to expand...
Click to collapse
Oh, sorry for being a bit vague - I just mean perhaps implementing a kind of systemless root à la Magisk/SuperSU (from what I understand of how these work) - avoiding the need to actually replace files in /system. Since I'm mainly just using su for the privileges rather than actually wanting to write to /system, I had the idea that perhaps a sort of overlay on e.g. xbin and a few other locations, rather than actually rebuilding the whole of /system, might be an interesting approach....
Yep, I've been replacing /opt/google/containers/android/system.raw.img with a symlink to my modified image lately. Works fine... I think they've been focused on just getting the apps working properly, maybe something like dm-verity is still to come.
Although, one of the cool things with Chromebooks IMO is that once the Developer Mode (virtual) switch has been flipped, the system's pretty open to being hacked around with. I think a large part of the much-trumpeted "security" of the system is thanks to the regular mode/Dev mode feature, once in Dev Mode with verified boot disabled on the rootfs, we can pretty much do what we want (I like the message that comes up in the shell when entering the first command I posted under the spoiler - it literally says "YOU ARE ON YOUR OWN!").
So yeah, with Dev Mode switched off, verified boot switched on, we can't even get into the shell (just the walled-off 'crosh' prompt), making the system indeed rather secure (but, for some of us, rather limited).
fattire said:
Also you mean arc-setup.conf:
env ANDROID_DEBUGGABLE = 0
right?
Click to expand...
Click to collapse
That's what I mean by a moving target, lol. On my device the Canary channel is at Chrome OS version 61; I think they started to move out some ARC++ (the acronym stands for Android Runtime on Chrome, version 2, if anyone's wondering, btw) environment variables to a separate file in version 60, or maybe 61. Problems with being on the more 'bleeding edge' channels include:
#Sometimes stuff gets broken as they commit experimental changes.
#Any updates sometimes overwrite rootfs customizations; the higher the channel - the more frequent the updates occur.
#Some of the stuff that gets updated, may later get reverted.
And so on...
fattire said:
I hadn't realized the boot was still in flux-- I'd have figured they'd worked that out by now...
Click to expand...
Click to collapse
Yeah you'd think so. Honestly, the more I use CrOS the more it seems like a (very polished) work-in-progress to me. Though, I guess most modern OSs are also works-in-progress though. (I don't mean the former statement in a critical way; I'm very happy that new features keep getting added to the OS - Android app support being a perfect case in point, that was a lovely surprise, greatly extending the functionality of my Chromebook).
fattire said:
Cool-- adb connect 100.115.92.2 does indeed work I was gonna use netcat to open port 5555 in chromeos and pipe it through, but looks like nc isn't here and I'm not yet ready to start changing the FS..though probably will be soon...
Click to expand...
Click to collapse
Netcat's not there but socat, which I haven't any experience with but have seen described as a "more advanced version of netcat", is listed in /etc/portage/make.profile/package.installable, meaning that adding it to CrOS is supported, and as simple as:
Code:
sudo su -
dev_install #(sets up portage in /usr/local)
emerge socat
I tried socat out and it seems to work, might be interesting to play around with.
fattire said:
btw any idea which partitions get overwritten when chrome it does it's updates? Will /root and /etc get overwritten, for example...
Click to expand...
Click to collapse
Theres a question. I forget some of the exact details now (gleaned from browsing the developer mailing lists and the documentation on chromium.org), but from what I do remember and my experiences tinkering, I can say:
The auto-update model uses kernel/rootfs pairs, e.g. at the moment my device is booting from partition 2 (KERN-A) with the rootfs being partition 3 (ROOTFS-B). My understanding is that with the next OS update pushed to my device, CrOS will download the deltas of the files to be changed, and apply the changes to partitions 4 and 5 (KERN-B and ROOTS-B), setting new kernel GPT flags (priority=, tries=, successful=), which will, post-reboot, let the BIOS know that 4 and 5 will form the new working kernel/rootfs pair. Then the following update will do the same, but with partitions 2 and 3, and so on and so forth, alternating pairs each time. It's a pretty nifty system, and I think something similar might be happening with new Android devices from version O onward (?).
So partitions 2,3,4,5 are fair game for being overwritten (from the perspective of the CrOS updater program). Partition 1, the 'stateful partition') is a bit special, in addition to a big old encrypted file containing all of the userdata (/home/chronos/ dir?), it also has some extra dirs which get overlaid on the rootfs at boot. If you have a look in /mnt/stateful/, there should also be a dir called 'dev_image', which (on a device in Dev mode) gets mounted up over /usr/local/ at boot. As I mentioned above, if you do
Code:
sudo su -
dev_install
you can then emerge anything listed in /etc/portage/make.profile/package.installable (not a great deal of stuff admittedly, compared to Gentoo), which gets installed to subdirs in /usr/local/. So I think stuff in partition 1; /mnt/stateful/, should be safe from being overwritten with an OS update. I think crouton chroots get put there by default.
Most of the other partitions don't really get used, and shouldn't get touched by the updater, here's a design doc on the disk format, and here's a Reddit post (from a Google/Chromium employee) mentioning dual booting from partitions 6 and 7.
fattire said:
would a "powerwash" overwrite it or can you get easily get into an unbootable state on these things?
Click to expand...
Click to collapse
It's not too hard to mess up the system and get it into an unbootable state, lol. The "powerwash" just seems to remove user data, mainly. If you change up (the contents of) some files in /etc, or /opt, for example, then powerwash, normally they won't get restored to their original state (unless you also change release channel).
But, as long as the write-protect screw's not been removed and the original BIOS overwritten, it's always possible to make a recovery USB in Chrome's Recovery Utility on another device, and then restore the entire disk image fresh (this does overwrite all partitions). Another thing that I did was make a usb to boot into Kali; I was experimenting with the cgpt flags on my internal drive and got it into an unbootable state, but was still able to boot into Kali with Ctrl+U, and restore the flags manually from there. (To successfully boot from USB, it was essential to have previously run the enable_dev_usb_boot or crossystem dev_boot_usb=1 command in CrOS). I understand also that the BIOS type varies with device release date and CPU architecture, and that Intel devices may have some extra potential BIOS options ('legacy boot').
fattire said:
It's also kind of strange that adb is listening to port 30 at that (internal?) bridge address by default with no UI to turn it off.. and it's inaccessible from outside.. i wonder if there's an easy way to change the bridge to share the same IP as the actual interface...
Click to expand...
Click to collapse
I think I saw something related to this on the bug tracker. If I come across any info, I'll let you know...
fattire said:
Final thought-- I'd love to build that system image myself soup-to-nuts, but I can't find any "caroline" device tree set up... do you or anyone else happen to know if there's a standalone AOSP device tree for the chromebooks? It would be cool to have a mashup AOSP/lineageos if such a think could be possible-- I'm guessing chromiumos is just taking the android tree, building it and then adding it into their build... I Haven't build chromiumos for many years now so I can't even begin to imagine how this android build integrates with the whole emerge thing they had going.. but I bet it takes a while
Click to expand...
Click to collapse
Yeah, I haven't built Chromium OS or anything, but apparently, there's an option to create a 'private' overlay for the build, which doesn't get synced with the public stuff.
I think that the higher-ups at Google might be still umming and ahing as to whether or not to make source code available for the Android container, it's certainly not been made public yet. Actually, I remember seeing a Reddit post from a Google/Chromium employee mentioning this.
"That article is a little misleading in terms of open source. While the wayland-server and services that communicate with the ARC++ container are open source, the actual ARC++ container is not."
Perhaps they're waiting to see how similar implementations of Android within a larger Linux setup (e.g. Anbox) fare.
There doesn't seem to be too much that differs from AOSP in the ARC++ container - a few binaries and bits and pieces linking the hardware to the container (e.g. the camera etc), maybe some stuff related to running in a container with the graphics being piped out to Wayland?, and so on.
Oh, I was searching the bug tracker for something else, and just saw this (quoted below). Looks like it might be possible to run AOSP based images on CrOS soon!
arc: Implement android settings link for AOSP image
Reported by [email protected], Today (72 minutes ago)
Status: Started
Pri: 1
Type: Bug
M-60
When ARC started without the Play Store support there is no way for user to activate Android settings. We need implement corresponded section that has
Title: Android settings:
Link: Manage android preferences:
Inner bug: b/62945384
Click to expand...
Click to collapse
Great response! I read it once and I'll read it again in more detail then will probably have questions For whatever it may be worth, my only experience with chromiumos was building the whole thing maybe 4 years ago for my original 2011 Samsung "snow" Chromebook-- and making a bootable USB (or was it an SDcard?) to run it on (with a modified firmware that did... something I can't remember.. i think it was basically a stripped down uboot and I remember adding a simple menu or something-- I think I was trying to bypass that white startupscreen or something..). However, after doing this a few times to play with it, I realized that Chromiumos without the Chrome goodies kinda sucks and I promptly forgot everything and went back to stock.
I did have it re-partitioned to run linux as a dual boot from the SD slot or something-- I remember using that cgpt thing to select the different boot modes and vaguely recall the way it would A/B the updates (which "O" is now doing)... but anyhoo I was using the armhf ubuntu releases with the native kernel and ran into all kinds of sound issues and framebuffer only was a little crappy so...
I'm gonna re-read in more detail soon and I'm sure I'll have questions-- one of which will be-- assuming that most stuff is the same on x86 vs arm, why are there two scripts? How do they differ?
ol. On my device the Canary channel is at Chrome OS version 61; I think they started to move out some ARC++ (the acronym stands for Android Runtime on Chrome, version 2, if anyone's wondering, btw) environment variables to a separate file in version 60, or maybe 61.
Click to expand...
Click to collapse
This is the -env file I'm missing, I presume?
I think that the higher-ups at Google might be still umming and ahing as to whether or not to make source code available for the Android container, it's certainly not been made public yet. Actually, I remember seeing a Reddit post from a Google/Chromium employee mentioning this.
Click to expand...
Click to collapse
It looks from the response that the gapps portion might be what's in question-- just like ChromiumOS vs Chrome has all the proprietary bits taken out?
Here's what I'd ideally like to see:
* Rooted Android, with a toggle switch to hide su in settings a la lineage (requires a kernel patch something like this one) + settings changes from lineageos
* adb access from outside the device-- critical for quickly testing apks from android studio w/o a cable. Basically put the chromebook in a "device mode" where adb is passed through... I'm going to see if I can pipe adb through with socat as you suggest...
* what else... I dunno watch this space.
An update from a couple of guys that have tested out the scripts on Intel: It seems to be that while they are able to launch daemonsu manually (with daemonsu --auto-daemon), it apparently does not seem to be getting launched at boot.
I am waiting for some more information on this. Previously, for Marshmallow, the script was setting up the app_process hijack method in order to to launch daemonsu at boot; to support Nougat I changed it to instead create an .rc file with a service for daemonsu, and add a line to init.rc importing it. This works for me, and from what I can gather, it copied/created all files successfully on the testers devices, too, so I'm not sure at this point what the issue is there.
Edit: Fixed the issue. I updated my previous post with further details.
fattire said:
I realized that Chromiumos without the Chrome goodies kinda sucks and I promptly forgot everything and went back to stock.
Click to expand...
Click to collapse
lol yeah. True, that.
fattire said:
...assuming that most stuff is the same on x86 vs arm, why are there two scripts? How do they differ?
Click to expand...
Click to collapse
It's literally just two things that differ: the few lines where we copy the su binary over e.g.
/x86/su.pie → /system/xbin/su, daemonsu, sugote
vs
/armv7/su → /system/xbin/su, daemonsu, sugote
...and also the size of the created container. The x86 container is about 30 percent larger than the Arm one.
I had a little look at how to determine the CPU architecture programmatically on Chrome OS a while back, but couldn't seem to find a reliable way of doing this, at least not without maybe getting a bunch of people with different CrOS devices to run something like, as you mentioned, uname -i (which returns 'Rockchip' on my device, uname -m (which returns 'armv7'), or such similar, and collating the results. It was just easier to do separate versions for x86/arm, rather than introduce more conditionals (with potential for errors). I'm certainly not averse to adding a check for $ARCH, and thus standardizing the script, as long as it's reliable.
fattire said:
This is the -env file I'm missing, I presume?
Click to expand...
Click to collapse
Yep! It's just the same few envs as in the .confs, moved into a new file. I'm fairly confident that the script's conditionals deals with them OK.
fattire said:
It looks from the response that the gapps portion might be what's in question-- just like ChromiumOS vs Chrome has all the proprietary bits taken out?
Click to expand...
Click to collapse
Yeah, although the respondant there perhaps doesn't seem to realise that he's talking to a Google/Chromium dev, the way he responds. Not that that makes anything he says in his post is necessarily less valid, though.
fattire said:
Here's what I'd ideally like to see:
* Rooted Android, with a toggle switch to hide su in settings a la lineage (requires a kernel patch something like this one) + settings changes from lineageos
* adb access from outside the device-- critical for quickly testing apks from android studio w/o a cable. Basically put the chromebook in a "device mode" where adb is passed through... I'm going to see if I can pipe adb through with socat as you suggest...
Click to expand...
Click to collapse
Interesting... I agree, those would both be useful additions to the functionality of ARC++...
Quick question-- has Samsung provided the source for the GPL components (including the kernel, obviously)? I looked here but didn't see anything...? Previously the kernel was included along with the chromium source and there was like a kernel and kernel-next repository.. but this was like five years ago. I think the codename for the samsung chromebook pro is called caroline... let me quickly see if I can find a defconfig in the chromium source...
Back.. nothing here in the chromeos-4.4 branch. Nothing here either in the master branch. Maybe I'm looking in the wrong branches-- master is probably mainline kernel. Also the directories.. it took me five minutes to realize it wasn't going to be in arch/arm - force of habit I guess. I'll keep looking unless anyone knows. This "chromium-container-vm-x86" one seems to have dm_verity as an unused option. Ah, this is looking promising.
...and... here!
So it would seem that this would be built as part of the chromiumos build system, which seemed to be half gentoo five years ago building out of a chroot and was kind of a pain to set up... still, I'm guessing that since it's got that weird script to make the defconfig, what you could do is use google's chromiumos build script to make the kernel image (with whatever changes you want), then, assuming that it doesn't care if you replace the kernel, just throw it over the right Kernel A/B partition and see if it boots and starts up chromeos... it's weird cuz the kernel has to do double-duty for chromeos and android.. but I bet you can just replace it and it would work fine...
I had a cursory go at building a couple of kernel modules for my Flip C100 a while back - I didn't get too far though, lol. People do seem to have had success building their own kernels and running them with Chrome OS though, as with most things I suppose it's just how much time/effort you're willing to put in.
I think I used this and maybe this, from the crouton project to guide me.
From what I remember, I just got fed up of all the arcane errors/config choices. I remember that even though I'd imported my current device config from modprobe configs, there were then such an incredibly long string of hoops/config choices to have to go through one by one, to then be confronted with various errors (different every time ISTR) that I think I just thought "screw this". I think there were some other issue with the Ubuntu version I was using at the time as well. I know that sort of stuff's kind of par for the course with kernel compilation, but I was mainly only doing it so I could edit xpad in order to get my joypad working, in the end I found a different solution.
It shouldn't be too much hassle though, in theory I guess.... Oh, also, in order to get a freshly built kernel booting up with the CrOS rootfs, in addition to the gpt flags, I think you might have to sign it, too? (just with the devkeys & vbutil_kernel tool provided on the rootfs), some info here, and here.
From what I remember, the build system would do whatever key signing was necessary.... although I do now remember you're right there was some manual step when I was building the kernel, but I can't remember if that's because of MY changes or that was just part of the build process.
I I just dug out the old VM (Xubuntu) I was using to build and, well, let's just say I'll be doing a LOT of ubuntu updates before I can even realistically look at this. I do kinda recall setting up the environment was a huge pain so I'm going to see if I can just update the 5 year old source, target the pro and just build the kernel image and see what pops out the other end. At least I won't have to deal with the cross compiler, though I think it should hopefully take care of that itself.
Interesting to see that those crouton projects have emerged (no pun intended) so I'll check them out too while ubuntu updates itself
Thanks for the github links.. I'm going to go read that wiki.
Update: Looked at it-- funny they just stripped out the chromeos-specific parts they needed rather than emerge everything which is smart. My only question is now that Android is involved, there's that script I linked to earlier that seems to say "if you want Android support you'll need these bits too"-- wonder if the same config scripts apply, and if there are any other device tree considerations as well...
I may play a bit and see how smoothly it goes.. Unfortunately I don't have unlimited time either :/
Also, please do let me know if you put the scripts on github and I can send you pull requests if I come up with anything.
Update: Finally updated like 3 major versions of ubuntu... the "depot_tools" repo had its last commit in 2013, so I updated that. Wow, this is so much clearer than previous docs... it looks like something called gclient is used now, which I configured with:
gclient config --spec 'solutions = [
{
"url": "https://chromium.googlesource.com/chromium/src.git",
"managed": False,
"name": "src",
"deps_file": ".DEPS.git",
"custom_deps": {},
},
]
'
that let me do gclient sync --nohooks --no-history ...which i think is updating the ancient source. I probably should have just started over, but anyway... we'll see what happens.
Update again: After updating with this new gclinet tool, it appears that the old repo sync method is still required as described here. That hasn't changed after all, so now I'm going to go through this old method, which will probably completely overwhelm my storage as it's downloading with history.. but anyway, in case anyone is trying this-- looks like the whole chroot/repo sync thing may still be how it's done... the /src directory described above may only be for building just the browser, not the whole OS...
...and here it is. I will have zero room to actually build anything tho, but hey.
* [new branch] release-R58-9334.B-caroline-chromeos-3.18 -> cros/release-R58-9334.B-caroline-chromeos-3.18
Note to self: use cros_sdk --enter to actually get in the chroot. Then:
~/trunk/src/scripts $ ./setup_board --board=caroline
to set up the build for caroline. Then to build:
./build_packages --board=caroline --nowithdebug
Useful links:
* Building ChromiumOS
* [URL="http://www.chromium.org/chromium-os/how-tos-and-troubleshooting/portage-build-faq"]eBuild FAQ
[/URL]

Running Flash Tool on Linux.

The installation instructions for the Linux-based are minimal, and give very little guidance on precisely what is required. There is no specification of which distros or versions it is supposed to be compatible with, but it definitely does not run on Ubuntu 14.04 (which is still current and supported until this time next year).
The application is clearly not statically linked, and running it on Ubuntu 14.04 fails to execute after failing to load libpng16.so.16, which was not introduced until much later in the Ubuntu release cycle.
Q1: Is the flash tool known to run on any particular release of Ubuntu?
Q2: Which distro and release was it developed on/released for originally?
Q3: Would it not make more sense for it to be statically linked (as Nokia did for the maemo-flasher which still works with the N900 'phone to this day, despite the end of official support about 7 years ago)?
Q4: Who do I need to take these other queries up with at Planet? There seems woefully little proper contact information.
cain.mosni said:
The installation instructions for the Linux-based are minimal, and give very little guidance on precisely what is required. There is no specification of which distros or versions it is supposed to be compatible with, but it definitely does not run on Ubuntu 14.04 (which is still current and supported until this time next year).
The application is clearly not statically linked, and running it on Ubuntu 14.04 fails to execute after failing to load libpng16.so.16, which was not introduced until much later in the Ubuntu release cycle.
Q1: Is the flash tool known to run on any particular release of Ubuntu?
Q2: Which distro and release was it developed on/released for originally?
Q3: Would it not make more sense for it to be statically linked (as Nokia did for the maemo-flasher which still works with the N900 'phone to this day, despite the end of official support about 7 years ago)?
Q4: Who do I need to take these other queries up with at Planet? There seems woefully little proper contact information.
Click to expand...
Click to collapse
Ubuntu 14.04 sounds unreasonably old to me to be complaining about this, but you make a fair point that the issue could be avoided altogether. I'm also used to rolling release and having the latest kernel on most devices, though. I still just have Android on my Gemini due to difficulties finding info and files on this whole process. I run GNU/Linux myself, so hopefully I'll manage to figure out the flasher without needing to borrow a Windows machine.
From what I've gathered, there's a public file for setting up Android/Debian dual-boot, but I don't see anything about having Debian as the only OS, and it seems files for builds of the other distros with support (Sailfish, Ubuntu, postmarketOS) are private. Support for them is lacking right now, but I still found it frustrating to think I had a lot of choices and then see that I was a bit misled. It'd be nice if I could find an IRC channel dedicated to the Gemini so I could discuss this with knowledgeable people in a more fast-paced manner.
soundtoxin said:
Ubuntu 14.04 sounds unreasonably old to me to be complaining about this, but you make a fair point that the issue could be avoided altogether.
Click to expand...
Click to collapse
The whole point about the Ubuntu LTS releases is that they ARE LTS (long-term support - stable but supported for up to 5 years), so it's perfectly reasonable to still be running it.
I've since tried on Ubuntu 16.04, and same problem.
I'm also used to rolling release and having the latest kernel on most devices, though. I still just have Android on my Gemini due to difficulties finding info and files on this whole process. I run GNU/Linux myself, so hopefully I'll manage to figure out the flasher without needing to borrow a Windows machine.
From what I've gathered, there's a public file for setting up Android/Debian dual-boot, but I don't see anything about having Debian as the only OS, and it seems files for builds of the other distros with support (Sailfish, Ubuntu, postmarketOS) are private. Support for them is lacking right now, but I still found it frustrating to think I had a lot of choices and then see that I was a bit misled.
Click to expand...
Click to collapse
That is irritating. As is the woeful lack of meaningful support.
Progress
Progressing...
Having cloned the Github source, it is now compiled and fully operational on both 16.04 LTS (xenial) and 14.04 LTS (trusty) .
git clone the source from Github - dguidipc/SP-Flash-Tool-src (board will not allow me, as a new user, to post the full link)
Install dependencies
qt4-dev-tools
libqtwebkit4
libqtwebkit-dev
alter the make configuration for the location of qmake
Code:
cd ${gitrepo}/SP-Flash-Tool-src/Build/
#backup the original build config just in case
f=build-linux.mk; cp -vp ${f} `date --reference=${f} "+${f}-%Y%m%d%H%M%S"`
In
Code:
build-linux.mk
change the path config for
Code:
qmake
to read:
Code:
QMAKE := /usr/bin/qmake
compile
Code:
cd ${gitrepo}/SP-Flash-Tool-src/
make
Binary will be in
Code:
../_Output
along with the object modules and a supporting shell script.
cain.mosni said:
Progressing...
[*]alter the make configuration for the location of qmake
Click to expand...
Click to collapse
No longer required. The linux I tweaked the linux build file to detect when it's on Ubuntu, and that tweak is now incorporated in the official source.

Categories

Resources