yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] wollac11:
Hi there, I know I am bumping up an old thread, sorry about that!

I am trying to build a ROM for the G1 with a CM9 base that is fairly usable and provides a Lollipop look and feel. I don't have much experience with kernel development so ICS is going to be as modern as I can hope to have as a base right now it would seem (unless anyone else has had some progress on Jelly Bean or KitKat or something and kept it secret from the world!). I am assuming at this point that all development here has stopped however perhaps if you are unable to continue you might be able to point me in the right direction.

Naturally I want to obtain the best experience possible so I want to use the best of what we have to far for the Dream as for the base of this ROM. As I understand it, the following things do not work on any ICS+ rom for the Dream at present:

Camera / Camcorder

Bluetooth?

These things don't work or are not present in BananaSandwich but DO work with this:

Bluetooth? (OP states it turns on which is more than I've seen in BananaSandwich)

ADB

710mhz overlock

other ICS performance tweaks in kernel?

And finally these things which work only in BananaSandwich:

Hardware Acceleration

Firstly, could you please could you confirm whether my understanding here is correct (in terms of what works with each). And, if so, are there sufficient sources available such that I could compile a ROM and kernel that would allow me to have hardware acceleration, working adb and the 710mhz overclock?

And finally, I have the latest cm9 source synced and only after having done so did I notice that you have a forked repository which perhaps I should have used instead since there is no device tree for the dream with the cm9 source (breakfast dream fails to find a repository). Can I build CM9 from those sources using the device tree from your repository or am I better just start with a repo sync of yours in a new directory? My phone is currently running a self-modified version of BannaSandwich (only done using kitchen for apk replacements with mods on the systemui etc nothing major) so once I have the device specific config setup I should be able to pull the proprietary blobs from there and get going.

I will also just note that I am not trying in anyway to pretend like I have the answer to any of the major issues with the G1 or that I have the skills to make it a good daily driver or anything like that (it's an ancient phone and expectations should be limited anyway!). I just fancied digging it out for a project to see how close of a Lollipop style experience I can bring to it. I've been able to get some way with mods using Android Kitchen and APKTool etc such as a skinned systemUI, newer core apps, material design Google apps etc but I really need to start from scratch with a new source build and do this properly if I want it to be worthwhile.

Thanks for any help you may be able to give with this. As you can likely tell I have never complied a ROM for an unsupported device such as the Dream/G1 before so I am not really used to having so few resources available and could do with a nudge in the right direction to get started ;)
[G1 Android Development] tvall:
I believe you are right about whats working and whats not. I never got to actually test bluetooth, but it does claim to turn on.

there are only a few changes in the kernel for this rom. i forget what they all are, but they are minimal.

starting from pure cm9 and manually fetching our individual repos would probably be quite a pain. you need the device files, plus other repos that we hacked up to make build. you can do a repo init in the directory you already synced cm9 to save you some downloading. use the uniteddev repo instead of my personal one as thats where the latest development happened.

i havent even used my g1 in about 8 months, but i'd be happy to dust it off and help with any questions or anything you have.

have fun!
[G1 Android Development] tvall:
double post?

double post........

double post!

double post :(
[G1 Android Development] AndDiSa:
[MENTION=2881708]wollac11[/MENTION] I do not want to delude you, but I tried to build and run ICS for G1 some years ago. It booted, but the G1 had too low memory to run all the processes started on ICS. Even with KSM and swap enabled the performance will be much to low for a daily driver.

Because of that I've dropped development and I built an Ice Creamed Gingerbread version.
[G1 Android Development] wollac11:
Thanks for your reply, I appreciate it. I had assumed that only the device files would be needed and was planning on just adding the device folder by adding a local manifest with the device path (on the UnitedDev repo) and then syncing. But if that alone won't work then I guess I'll just have to sync with the whole uniteddev repository.

My main concerns with this are that this particular ROM has never actually booted in my device for some reason and also that this ROM contains no hardware acceleration and so I figured that if I based on the UnitedDev repository I would have the same issues automatically with any builds made from that source. FYI: The MTD partitions are set up correctly and I was able to get it all to flash fine but it never boots. Other ICS ROMS boot fine and in the case of such as BannaSandwich also has hardware acceleration. Edit: managed to get it booting, just not using the kernel (ezterry's kernel + ics patches) provided in the OP. That kernel would not boot so I had to use a different one.

What actually breaks the hardware acceleration on this ROM? Is it just the kernel and/or proprietary blobs used or are there other things in the device or ROM configuration? For example, if I were to pull the proprietary files from my device which is running CM9 with HWA, used the source from UnitedDev repo to build the ROM including these proprietary files and then used the kernel provided with BannaSandwich, would I have working HWA?

---------- Post added at 01:11 PM ---------- Previous post was at 01:02 PM ----------

Thanks! I'm very aware performance is never going to be great on this ancient phone. That said, I've had my G1 running ICS in various shapes and forms over the past year or so and am able to get it to quite a stable state. I have been using ICS exclusively on this device over this period and it is certainly "usable". I actually have been able to run many of the latest Google apps with it too (see my video here: https://www.youtube.com/watch?v=20waboZCmTo)
[G1 Android Development] thinhx2:
Stuck logo tmobile g1 :(
[G1 Android Development] HTCDreamOn:
Did you use custom mtd? Make sure you read the instructions.
[G1 Android Development] thinhx2:
Yes,i read the instructions. But only stuck logo tmobile g1 :(. 1 rom ics is banana sandwich booted :)
[G1 Android Development] HTCDreamOn:
Try again without gapps
[G1 Android Development] thinhx2:
Thank bro,i will try tomorrow. I htx dream is charging 1y% bartery. And bro have save cm10 4.1 for htx dream?
[G1 Android Development] tvall:
Laying on the couch trying to ignore a massive headache while seeing how I can fix the keyboard. Devs get sick too, but this one is too determined to get this working to let sickness get in the way. Sometimes.
[G1 Android Development] tvall:
here's a slimmed latinime.apk that shouldn't be cut off. English only to save space too. A whole ~10mb smaller http://db.tt/rLliMcbr
[G1 Android Development] :
haha dedication
[G1 Android Development] DJBhardwaj:
Are you compiling ICS 4.0.3 ?
[G1 Android Development] pauldacheez:
Uh. The two MediaFire links for the CustomMTD zips are broken, giving me a big useless red button that says "Authorize Download".
[G1 Android Development] tvall:
4.0.4 actually. Latest cm9 code

It's mediafire. And mediafire is having issues today. I'll upload somewhere else later.
[G1 Android Development] DJBhardwaj:
Misplaced keyboard was a bug in 4.0.3

So, it should be fixed when you compile 4.0.4
[G1 Android Development] DJBhardwaj:
Your device is an ARMv6, right?
[G1 Android Development] pauldacheez:
Rapidshare, MediaFire, I can't tell the difference when I'm half-asleep. >~>

I'll check back and download those two things tomorrow, then. [lumbers over to bed]
[G1 Android Development] tvall:
I am 99% sure its an issue with the overlay files. I'm using modified cm7 files that I change as needed. All cm9 ports I've looked at had an xml about size that cm7 doesn't have
[G1 Android Development] Infinimint:
All the APK's can be slimmed if you remove all other translations and resolutions :D or at least just resolutions.
[G1 Android Development] tvall:
Yeah. Other resolutions is probably a good idea to strip out. I'll work on that tomorrow. In addition to the audio issue. Have you found anything that would help with that?
[G1 Android Development] Infinimint:
Take these 3 files from EZGB/CM or any working rom:

AudioPara_TMUS_DREA.csv.gz

AudioPara_TMUS_SAPP.csv.gz

AudioPara_VODA_SAPP.csv.gz

They're located in /system/etc/.audio (it's a hidden folder).

Copy the whole folder in /system/etc/.audio in your rom.

Add this to the end of your updater-script:

if file_getprop("/tmp/nfo.prop","sysboard") == "trout"
then
ui_print("system/etc/.audio/AudioPara_TMUS_DREA.csv.gz");
run_program("/sbin/sh","-c",
concat("busybox gzip -dc ",
"/system/etc/.audio/AudioPara_TMUS_DREA.csv.gz > ",
"/system/etc/AudioPara4.csv"));
else
if file_getprop("/tmp/nfo.prop","smisize") == "64"
then
ui_print("system/etc/.audio/AudioPara_TMUS_SAPP.csv.gz");
run_program("/sbin/sh","-c",
concat("busybox gzip -dc ",
"/system/etc/.audio/AudioPara_TMUS_SAPP.csv.gz > ",
"/system/etc/AudioPara4.csv"));
else
ui_print("system/etc/.audio/AudioPara_VODA_SAPP.csv.gz");
run_program("/sbin/sh","-c",
concat("busybox gzip -dc ",
"/system/etc/.audio/AudioPara_VODA_SAPP.csv.gz > ",
"/system/etc/AudioPara4.csv"));
endif;
endif;
run_program("/sbin/sh","-c","sleep 2; sync");
set_perm(0, 0, 0644, "/system/etc/AudioPara4.csv");

Test it and see if that works.
[G1 Android Development] tvall:
Oh, I completely forgot about that. When I built I just touched AudioPara4.csv to make it build. Was going to replace it when I actually got it working but completely forgot. Thanks! Ill try tomorrow
[G1 Android Development] Infinimint:
Btw, don't forget to delete the AudioPara.csv that's already in /system/etc

;)
[G1 Android Development] tvall:
I'm going to just adb push the right one to test if it works. If it does ill figure out how to add it to the source and rebuild. Might as well add autokernel in at the same time (alpha2). Then I just want to strip down the rom and call it stable (alpha3). Getting hw acceleration and camera working is required for me to call it beta or rc
[G1 Android Development] tvall:
Ellen is working on a cm7 theme so she doesn't want me messing with her phone today. I'll add audio and kernel stuff to the source and build today, but I can't test till tomorrow. Do you guys want me to release the untested build that might fix it and fixes stuff I needed to do anyway, or do you want me to test first?
[G1 Android Development] :
I'd be more than happy to test :)
[G1 Android Development] tvall:
Could you install the rom then push a good AudioPara4.csv to see if it fixes audio?
[G1 Android Development] Unrelashade:
Hi guys,

kudos for making cm9 work! However, can someone please post a video to provide other a look at the performance of the rom? If you could include it in the OP that would be perfekt :)

Regards
[G1 Android Development] tvall:
That was asked already. I would gladly do that, but my main phone is running ics. The only bug left for it is the video camera. I have a nice video camera, but I don't have a charger for it.

Edit: 17 minutes till video is up on YouTube. My channel is tvallproductions. Enjoy
[G1 Android Development] tvall:
https://www.youtube.com/watch?v=TPFcB-kdE2o&feature=youtube_gdata_player

My voice sounds weird, I'm still sick.

(Note: the build in the video is the latest code with a few changes to the zip and a few files pushed to the rom after boot. It's similar to alpha1 but may function slightly different)
[G1 Android Development] Infinimint:
I commented on the vid :)
[G1 Android Development] tvall:
Just saw. I'm going to say some stuff here that I commented there so people don't have to read YouTube comments for the info

I tried fixing the audio. No luck. Gonna logcat it later.

In the video I didn't have any performance settings changed. If you tune those right, it could run smoother, I'm just lazy
[G1 Android Development] :
Just flashed onto 32B mt3g. It runs decently only after adding this zram script:

#!/system/bin/sh
# script adapted from EZTerry

zsize=24
swappiness=30

#prepare vm subsystem
echo 1 > /proc/sys/vm/drop_caches
echo $swappiness > /proc/sys/vm/swappiness
echo 1 > /proc/sys/vm/page-cluster
echo 120 > /proc/sys/vm/vfs_cache_pressure

#setup compcache
echo 1 > /sys/block/zram0/reset
echo $(($zsize * 1024 * 1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon /dev/block/zram0

exit 0

disabled all animations, force GPU rendering, turn off surface dithering, and enable 16bit transperancy.. It still needs further tweaking because the launcher keeps closing (set it to 0 in ramdisk).. But otherwise, it is pretty good for alpha build :)

For audio, as a dirty/cheap fix, I would try to take an audio hw file from a working hero ICS build and then replace it for now as a flashable addon..
[G1 Android Development] tvall:
Thanks. Have you tried the zram setting in performance settings?

I'll work on the audio tomorrow (hopefully.. my girlfriend recently learned how to make cm7 themes. I have 3 computers, but only one monitor)
[G1 Android Development] :
Oh i overlooked those settings lol. I think running at default 18% should be good
[G1 Android Development] tvall:
I never messed with zram so I set it to 18% and it seemed to help. I still havent tested the rom with gapps installed. that'll likely hurt a lot.

Since you seem more awake than me, and you have the rom currently installed, could you do me a favor and push the audio libs from a hero port and see if it works? And could you test an install with gapps?
[G1 Android Development] :
Yeah, sure :)

EDIT: Btw, home button *might* work after you flash gapps.. when I compiled AOSP froyo builds for HD2/Dream, I had the same problem with the home button until I installed gapps. Just something I noticed..

and also, do you mind if I made a repack of the rom ?
[G1 Android Development] Infinimint:
In the video he mentioned that he had fixed the home button.
[G1 Android Development] tvall:
I don't mind of you repack it, if you fix stuff I'd actually really like that. Less work for me. :)
[G1 Android Development] mahroze:
id be more than happy to test this :D
[G1 Android Development] Infinimint:
Go for it, it's awesome ;)
[G1 Android Development] roalex:
This Camera Hal might work on G1 as well.
[G1 Android Development] brainiac.cm:
This device is ARM 11, so you will have to look to githubs of developers with the same architecture. That's how ErwinP solved problem with HTC Wildfire. You can replace Trebuchet's apk with any other alternative launcher, and it will be flawless. You did great job for our phones.
[G1 Android Development] Shano56:
I'm impressed. I may try this tonight ;)

edit: doesnt work. installation aborted. how do i get error to save to sd card? D:
[G1 Android Development] danielgek:
dust finished sync and ready to build ;D
[G1 Android Development] mahroze:
i flashed just like you said but it says installation failed

E: Missing file:

system/media/video/Disco.480p.mp4​

E:Verification failed

Installation aborted
[G1 Android Development] tvall:
The zips are not signed. Sign yourself or flash with clockworkmod. I'll release an update soon with some small bugs fixed. (Adding autokernel, fixed keyboard, signed zip)
[G1 Android Development] rukin5197:
So this is what you were talking about :D

GREAT job!
[G1 Android Development] mahroze:
so how do i sign the zip files???
[G1 Android Development] tvall:
Google search.
[G1 Android Development] pauldacheez:
It's much easier to just toggle signature checking in ClockworkMod Recovery before you flash. As much as you may like Amon_RA's recovery, it doesn't have that feature, so you'll either need to flash CWM or sign the zip yourself.

---------- Post added at 04:29 PM ---------- Previous post was at 03:42 PM ----------

When I try to flash the ROM itself through CWM 2.5.0.7, I get:

assert failed: getprop("ro.product.device") == "trout" || getprop("ro.product.device") == "trout"
getprop("ro.product.device") == "sapphire" || getprop("ro.product.device") == "sapphire"

I'm on a 32B Dream.
[G1 Android Development] tvall:
I know about that, it'll be fixed in the next update. I'd release it now but I want to actually fix some stuff first
[G1 Android Development] :
http://uniteddev.com/wordpress/files/update-cm-9.0.0-RC0-dream_sapphire-UNOFFICIAL-alpha1.1.zip
[G1 Android Development] pauldacheez:
CWM flashes that, but when I try booting it gets stuck at the ol' Android logo that's been around since Cupcake.
[G1 Android Development] tvall:
can you get a logcat? how long have you been waiting for it to boot? (first boot takes forever, feels like it gets stuck.wait at least 10 minutes, maybe more. a logcat would help)
[G1 Android Development] pauldacheez:
I've been waiting quite a while; it's obviously not going to get itself unstuck, so...

http://pastebin.com/7BGxr62C

It's nearly 4000 lines, but that's just it loopin' over and over again. Odexing (/zipaligning?) is failing because of the lack of space on the NAND, I see.

(I don't know why I didn't think of logcatting before. I'm losing my touch...)
[G1 Android Development] tvall:
what sizes did you use for custommtd? i tend to use 140 40 for this rom
[G1 Android Development] pauldacheez:
I'm using 150 40... Should /system be bigger or smaller? I can't tell. >~>

Edit: I'm bootin' with 140 40 now, and my logcat looks a LOT happier.
[G1 Android Development] tvall:
so... did it boot?
[G1 Android Development] pauldacheez:
It did! But now all I see is a neverending stack of force-close warnings for Trebuchet and com.android.phone. I also saw Contacts and com.android.acore.

Oh well, at least it booted!

...Once. Now it's stuck at the Android logo and logcat's stuck at "waiting for device".
[G1 Android Development] mahroze:
same thing happened here
[G1 Android Development] b1czu:
Tryto set mtd to 120 40 and it should boot without errors.
[G1 Android Development] tvall:
The problem there is lack of ram (I assume) if you can get into the performance settings select everything that'll help with ram (zram, ksm, etc) and overclock. Then it might run better
[G1 Android Development] b1czu:
I tried it 1h ago and the problem was in too small data partiton. There was only 119 used on system so i've cut system to 120 in mtd and now it boots ok.
[G1 Android Development] tvall:
I'm assuming that's with a g1, right?

Soon I'm going to slim lots of stuff out of the rom. Mainly images for different resolutions, and most translations to try and make it fit in the stock partitions. Will I succeed? Probably not..
[G1 Android Development] b1czu:
Yes, I've tested it only on my old G1 :)
[G1 Android Development] flyers00:
Nice job Tvall, my G1 boots up but low space error message. Look forward to seeing how this rom progresses. If you need a tester, please let me know. Keep up the good work
[G1 Android Development] AndDiSa:
You could try to enable zram/ksm directly within the build.props. I've done so (sources should be commited to my repo (ads-ics branch)). But I doubt it will help much for the G1. :(
[G1 Android Development] Infinimint:
New Links:

alpha0: http://uniteddev.com/wordpress/file....0.0-RC0-dream_sapphire-UNOFFICIAL-signed.zip

mtdpartmap.txt:http://uniteddev.com/wordpress/files/roms/CM9/mtdpartmap.txt
[G1 Android Development] SlashSpeed:
That's the same Alpha as the old one in the first post right? Just a new link?
[G1 Android Development] pauldacheez:
Yep, slight path change - that /roms/cm9/ wasn't there before.
[G1 Android Development] psicop:
im getting an error when trying to install

i have attached the log file
[G1 Android Development] pauldacheez:
Read through the last few pages of this thread. Specifically, you should look for the alpha1.1.zip and the MTD recommendations (120 40).
[G1 Android Development] tvall:
Well... the internet at home is out (someone forgot to pay the bill :rolleyes:), and I build this rom on a build server I have access to. So.. no updates until someone decides to pay the bill
[G1 Android Development] tonker83:
I must say I am amazed at this. The G1 really is the little engine that could. My gf had a g1 till not to long ago when it finally fell apart after all the abuse it took from her lol. Anyway keep it up, this phone will never die hah.
[G1 Android Development] mastermind777:
The alpha1 does not flash on my G1, giving an error:

Installing update...
assert failed: getprop("ro.product.device") == "trout" || getprop("ro.build.product") == "trout" || getprop("ro.product.device") == "sapphire" || getprop("ro.build.product") == "sapphire"
E:Error in /sdcard/update-cm-9.0.0-RC0-dream_sapphire-UNOFFICIAL-alpha1.zip (Status 7)
Installation aborted.

The link to the alpha1.1 on page 9 is broken. Can anyone post an alpha1.1 mirror?
[G1 Android Development] pauldacheez:
I have a copy on my G1's SD card, but someone in my house stole my G1, so I'll upload it somewhere for you once I catch the goddamn thief.
[G1 Android Development] dw9906:
Good job tvall!
[G1 Android Development] shaooas:
Is this ROM works for HTC MAGIC 32A device ?

I would like to try this ROM:cool:

cheers
[G1 Android Development] whoshotjr2006:
thank you sir for your work, hope you dont mind that i ported it, and please do look at the hero, eris and heroc forums for a few added touches for ics on our older devices
[G1 Android Development] lbcoder:
Interesting.

Seems to me from reading a bunch of comments in this thread, that there is a severe limitation on this system image as a result of limited internal storage space.

I took a quick peek at the image, and the first thing that strikes me very clearly is that this image is NOT ODEX'ed.

There is a lot of confusion regarding the use of ODEX files in a system image. There is, in fact, no downside to their use, EXCEPT that it will prevent you from modification of contents of /system/framework/, which virtually nobody does anyway, so it is irrelevant.

Basically, when you have a system image that has NOT been ODEX'ed, you end up effectively with multiple copies of 'classes.dex' for each application.

In a non-ODEX'ed system image, all of the archives in /system/app/ and /system/framework/ contain a file 'classes.dex', which is basically the java code for those archives. Upon first boot, the classes.dex file is extracted, optimized, and stored in /data/dalvik-cache, so you effectively have TWO COPIES. One in the application archive, one in /data/dalvik-cache/.

When you ODEX a system image, you perform this optimization IN ADVANCE, and store the ODEX file right beside the application archive. NOT ONLY THAT, but you also DELETE the classes.dex file from the archive, since it is then redundant.

So the effect of ODEX'ing a system image, is that the system partition will be marginally bigger, the data partition will be DRASTICALLY smaller, and firstboot will be FAR FAR faster (since it won't be running dexopt to generate dalvik-cache).
[G1 Android Development] Infinimint:
Interesting, I knew that it was better performance-wise to keep it ODEXed, but I wasn't sure as to why. Thanks for the info.
[G1 Android Development] SlashSpeed:
Here's the "new" link to Alpha 1.1:

http://uniteddev.com/wordpress/files...L-alpha1.1.zip

Thanks, Sonny1908. :)
[G1 Android Development] pauldacheez:
I still haven't retrieved my G1, so thanks, SlashSpeed.
[G1 Android Development] Infinimint:
Hahaha clever bastard ;)

Maybe I'll setup a seperate folder for testing xD
[G1 Android Development] ldrifta:
im a ghost ghost ghost
[G1 Android Development] Infinimint:
Lolwut?