yashsingh1/xdaforums huggingface dataset:
[RAZR i Android Development] Hazou:
Experimental Cyanogenmod

Hello all,

oke, here it is. I finally got cyanogenmod (CM10,1) building and working with our SMI. This means that it boots and u can control it.

Before u download the zip. Always make sure to make a backup of your current rom. Second thing is, i cant be hold responsible for the things you do. If the phone dies after using this rom it is not my fault, it is yours because of unlocking and flashing the rom. It works on mine for testing.

Now the list what does work:

- Cellular (data)

- The rom itself :P

- smooth

What doesn't work:

- SDCard

- Partitions (data, cache-dalvik) aren't mounted well which results in force close of some apps

- Wifi

- Bluetooth

- Sound

- Sometimes a red border show along side the side of the screen

To get root access working for the phone. reboot again in recovery and use 'fix permissions'. Than restart the phone and ask for root rights in your app. (@burnsyboo)

Google Drive CM SMI

So, now the actual debugging begins. I have spend hours after hours on this project. I am no developer, i am just curious on how android works and how it builds. All i did was learning myself how it all works and now i finally know a bit about it. I will update my github in the next days. The github with the cyanogenmod (CM10.1) sources will build a working rom. I encourage all people to have a try. If u got something let me and everybody now so we will finally get a fully working cyanogenmod rom! Have fun, but make priorities!

Hazou
[RAZR i Android Development] anerik:
Looks good! Could those bugs be lib problems? I've looked through the zip and found out for example that there is no vold.fstab (the thing to mount both sd and internal)... Or is it all kernel?
[RAZR i Android Development] Hazou:
- sdcard i dunno what it is. there is somewhere a permission problem i think

- partitions is in the ramdisk. I am working on thsi one

- Wifi, some wifi firmwares are not placed corretly or arent good in the source

- bluetooth kernel Using omars latest one

- Sound libs and hal's

- red border libs and source

That is what i know

This version has the sdcard mount in the ramdisk. I had one with a vold.fstab, but that didnt do the thing either. But i will replace it if it helps ;)
[RAZR i Android Development] anerik:
Ohh kk, i'm installing now to test it (: remember if using twrp to delete the format system line before

edit: just read your latest answer, i'll try my best to see if i can come up with some of the easy fixes
[RAZR i Android Development] leonelsr:
I think the top priority for now is having your working copy on GitHub, so we can all try and tinker by ourselves... Right?

I'm looking for ways to help and support this development in the near future.
[RAZR i Android Development] mcpaddington:
Couldn't some of the problems be fixed by replacing files with the RazrM?
[RAZR i Android Development] Blue1904:
Just getting Bootloop all the time... How can i enter recovery? :confused:
[RAZR i Android Development] anerik:
Hmm just replacing some libs but still nothing. The no-sound thing happened to me once when i was trying to port dsp, i just fixed i back putting audio_effects stock, soundfx libs, and deleting audio effects in vendor/etc, but this would break dsp
[RAZR i Android Development] arison1988:
What you think about a clean dev thread about it with github etc that would clean this mess

Gesendet von meinem XT890 mit Tapatalk
[RAZR i Android Development] Hazou:
Nope it wont ;)

Adb works when u are in a bootloop. just type 'adb reboot recovery'.

If that wont help. reset your device by holding all 4 hardware buttons like 10sec and hold volume down and power after it. Just like booting in bootloader'

Does it matter now that dsp breaks :P If we got a fix for sound than we can clear it out.

I know that our device used for audio some of the following files: libaudio, alsa.smi, audio.s2dp, everything in hal that has something to do with audio, libasound maybe more?

Yep, wil do this when i got github fully up and running and maybe when the partitions are loaded correctly
[RAZR i Android Development] anerik:
Everything in hal that has something to do with audio, the soundfx folder, some conf files in etc and vendor, and i don't know if something else. Could the changes Omar made to where the alsa files are saved cause this?
[RAZR i Android Development] Blue1904:
Hey Hazou! Thank you, it helped! Hope your CM is ''stable'' (or nearly a daily driver) soon. i'm full of hope! ;)
[RAZR i Android Development] mcpaddington:
Flashing not working on either twrp or cwm for me.
[RAZR i Android Development] anerik:
Delete the format system line
[RAZR i Android Development] mcpaddington:
Cheers got it flashed, won't boot past bootloader unlocked screen though.
[RAZR i Android Development] anerik:
Well did you format the system yourself before flashing?
[RAZR i Android Development] mcpaddington:
Spoke too soon, worked :)
[RAZR i Android Development] jacbarahona72:
Factory Reset is necessary and change the binary to cm10.1 gapps (do not know if it was necessary, I did)

Enviado desde mi GT-I8190
[RAZR i Android Development] RatonMerino:
Good Work.

I can't wait for the first release, i need my phone for daily use that's why i can't test this release, but i hope that you guys make a good work on it.

Cheers from Mexico.:laugh:
[RAZR i Android Development] MobyDick92:
Really Nice!

Some other points:

-Rotation works also!

-Camera starts but crashes because of no SD mounted..
[RAZR i Android Development] rexet:
Finaly!!!!

Great job mate!
[RAZR i Android Development] mcpaddington:
The red frame issue is just a dev tool, it can be fixed by changing "ro.build.type=eng" to "ro.build.type=userdebug". Then the user taps on Build number 5 times in the settings to unlock the developer options.
[RAZR i Android Development] Hazou:
Ty, i totally forgot that one :D Had type=eng enabled for more debugging.
[RAZR i Android Development] jacbarahona72:
GAPPS

[MENTION=4479363]Hazou[/MENTION]

Install Gapps changing the binary and cause FC on the keyboard and others google App (it should be mentioned for the lack of the SD card?)

work

Themes Chooser

Nav bar and Pie control .....

etcétera, etcétera

SDCARD Internal and External can be read from the TWRP File manager and from the PC, from there I can install the applications (I use Android Commander)

thanks for your effort

edit: [MENTION=5103965]Omar-Avelar[/MENTION] Yes, I imagine it but I need to know all about development and I refrained from commenting about the libraries, because they are developers issues you handled very well and the fear of saying very foolish

edit2: You can see in the phone the information from SDInternal in /data/media/0/
[RAZR i Android Development] Omar-Avelar:
Congrats man, good work :p, I will fix the bluetooth thing in the Kernel once I am back home (~2 weeks) for you to use on the ROM.

Btw I had some stuff I had identified as things that could be re-used on the phone, maybe you can start taking a look at parts (here). Mainly under prebuilt and blobs and I put some description on what they are on some here, I am uncertain at which point things will or could start breaking.

Btw did you get this booting with houdini ARM translation on the fly enabled or is that for the future? I will gladly try to help on what I can once I get back some free time!, and good job again :cool:

---------- Post added at 01:54 PM ---------- Previous post was at 01:49 PM ----------

To what I know flashing gapps will break stuff since the libs contained in those packages are 100% ARM binaries, we would need to reorganize things to go under /system/lib/arm/ and eventually would need to have houdini going to make use of the gapps packages. But he's going in the right direction :).

Explanation: Thing is that the ROM will have a native keyboard library that should work, but the one that gapps incldues has the swype gestures and other stuff -- however it is is for ARM arch and it will leave you without a native x86 library since it is replacing the one that lives in /system/lib.
[RAZR i Android Development] Hazou:
It will be mentioned when i will release a new version in a new topic for further development, so we get a clean topic.

The rom can read the sdcard. The media libs does have a read on my whatsapp and my photo's, if u see the logcat from thee phone. So the sdcard is mounted, but doesnt have the right permissions to get into or be mounted for the camera etc. Hope we can get it fixed soon.

Ty omar, It would sort of fix the Bluetooth. But as of my knowledge, the wifi needs to be fixed first before the bluetooth can work. It uses the same firmware if i recall correctly from the sources.

Indeed, the gapps will break some apps because of them being ARM based. This rom is build for development purposes so dont expect gapps to be working :P And google play is working, so gapps aren't the priority.

will have a look into your prebuilt/blobs folder. I am watching your repo always for kernel changes that u are making, and for SMI files.

For the sound. It can be an easy fix ( i think so :P). I think if we replace those files and some more we can get far:

I used in the build the sound files for board msm8960 because the are similar to the mfld files. Not that much though because they dont work :P

- libs/hw/alsa.smi.so

- libs/hw/audio.s2dp.so

- libs/hw/audio.primary.so

- libs/hw/audio.primary.smi.so

- libs /hw/audio.usb.default.so

- libs/hw/audio_policy.default.so

- libs/hw/audio_policy.so

- libs/saoundfx

- libs/libasound.so

- libs/libtinyalsa.so

and some files in etc that have a link to sound.

Than check logcat for missing files from sound ;)

Houdini should be working. I got a positive respons from the library. I just haven't tested it yet.
[RAZR i Android Development] tb110188:
Already using this amazing work, but i can't install any app using adb nor any other kind of helper lyne Andrid Commander. But i can tell that some of the 4.4 goodies like the launcher and new e-mail app are working flawless, just on my poor data connection and Gapps is working too, just altered their libs to be installed on the /system/lib/arm folder, but the no-sound is bothering me and con't access my Sdcard too. So far, great work and i hope we will see a daily driver as soon as Motorola promises us with more lies about KitKat...
[RAZR i Android Development] marvxxx:
My congrats AS well. I wanna add that fullscreenmode works. Statusbar is hidden. Automatic brightness doesnt work.

Beides it boots like hell and is flawless. DSP dies not FC. Cm status bar and battery/signal options Workshops AS well. When SD card can be read most things are good to go.....beide sound ;) but who needs trat...lol
[RAZR i Android Development] arison1988:
I think it wouldnt be so hard to port cm 10.2 vor even 11 when we finished that work. P
[RAZR i Android Development] marvxxx:
I dont get you guys. I'm greatful to HV a cm ROM with 4.2.2. And I appreciate the hard work of Hazou. Thanks to his ongoing research we are in hope for a cm. Kudos to him n hopefully less ppl that never seem to be satisfied...
[RAZR i Android Development] Deep-Knight:
Hi. i would like to test & help to get this project finally done :). I have some experinces at building custom roms. Anyone has a download link ? The one posted here before does not work for me (cm_smi-ota-eng.patrick.zip)...

Thanks

---> Update : Got the file. Thank you...
[RAZR i Android Development] marvxxx:
It worked for me. Just tap the blue arrow in the lower right corner. This starts the download....it appears after tapping the big black arrow
[RAZR i Android Development] anerik:
I'll try this out now. For me the partitions and sdcard bugs are the fix-asap bugs, unfortunately i have no idea what to do to fix any of those
[RAZR i Android Development] Hazou:
AH :good:

I have some ideas for the partitions and sdcard. But need some time.
[RAZR i Android Development] anerik:
kk, i have absolutely no idea in that area. Just checking out files to copy and hopefully fix sound
[RAZR i Android Development] Setarcos:
Hi, [MENTION=4479363]Hazou[/MENTION]

When I tried to init a repo with your android.git, I ran into problems. It seems your default.xml has extra blank line at top and has duplicated "aosp" remote, which confused my version of repo.
[RAZR i Android Development] Hazou:
Oh, nice that u noticed it. I had it setup at my work, so didn't had the time for it to fully test it. Will fix it tonight if possible.

The blanc line can be ignored. The aosp repository needs to be deleted. Search on the top for the second line with name:aosp and delete the 2 lines. If all looks good it has no problem anymore.

Edit: fixed it
[RAZR i Android Development] Setarcos:
Trying to build from source with no success.

I used

lunch cm_smi-userdebug

to choose my target. It gave me a warning like this:

Dependencies file not found, bailing out.

When I ran make, it failed with following message.

No private recovery resources for TARGET_DEVICE smi
build/core/tasks/kernel.mk:59: ***************************************************************
build/core/tasks/kernel.mk:60: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:61: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:62: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:63: * source repository to kernel/motorola/smi
build/core/tasks/kernel.mk:64: * See http://wiki.cyanogenmod.org/w/Doc:_integrated_kernel_building
build/core/tasks/kernel.mk:65: * for more information *
build/core/tasks/kernel.mk:66: ***************************************************************
make: *** No rule to make target `hardware/intel/wrs_omxil_core/core/src/Android.mk'. Stop.
[RAZR i Android Development] GalaxyUser:
Very very good work [MENTION=4479363]Hazou[/MENTION] !

Ok, i want to extract boot.img with Dsixda Kitchen to do some test with porting MIUI, LewaOS, Sense 5, Touchwizz etc ...

I know CM 10.1 is in very early state but i want to see if it's even possible to boot/port something on our Razr i.

But when i want to extract it fails because "there is no magic header" in boot.img.

I don't know how to fix it and the problem is boot.img, not the kitchen. Can you help me ? Thanks...

GalaxyUser
[RAZR i Android Development] Hazou:
Apply the patch folder. And it will work

Edit: sry, just realised i made a mistake in the patch folder. Will fix it asap.

RAZR I doesn't use a normal boot.img it uses an custom one. Look on the forum. Somewhere there is an extractor for it.
[RAZR i Android Development] Setarcos:
Thanks. I noticed the patch problem, and patched the files manually. However, still no luck.

system/core/libcorkscrew/arch-x86/backtrace-x86.c:24:22: fatal error: ucontext.h: No such file or directory

Edit: comment the "include ucontext.h" line out fixs above error.

PS, my patching script is a bit cleaner.

#!/bin/sh

#EXTRAFLAG="--dry-run -R"
echo "Patching files"
if [ -d "../../../../bootable/recovery/minuitwrp" ]
then
echo "Found TWRP recovery, applying TWRP patch"
cat twrp_0001.patch | patch -d ../../../../bootable/recovery/ $EXTRAFLAG
else
echo "Found CWM recovery, applying CWM patch"
cat cwm_0001.patch | patch -d ../../../../bootable/recovery/ $EXTRAFLAG
fi

echo "patching external/powertop/"
cat external_powertop.patch | patch -d ../../../../external/powertop/ $EXTRAFLAG

echo "patching frameworks/base/"
cat frameworks_base.patch | patch -d ../../../../frameworks/base/ -p1 $EXTRAFLAG

echo "patching hardware/intel/libva/"
cat hardware_intel_libva.patch | patch -d ../../../../hardware/intel/libva/ -p1 $EXTRAFLAG

echo "patching hardware/intel/libva/"
cat hardware_intel_wrs_omxil_core.patch | patch -d ../../../../hardware/intel/wrs_omxil_core/ -p1 $EXTRAFLAG

Edit2:

Still no luck building the image. It complains about missing "device/motorola/smi-plus/smi-modules/crda/keys-ssl.c"

Edit 3:

Fix above issue by pull "keys-ssl.c" from cyanogenMod's
[RAZR i Android Development] Hazou:
Ty for the update script. I can't code well myself, I us things from anywhere on the internet. ;)

But for the errors, I thought I had fixes them all and had them ready upstream. But clearly not if u get all those errors. Will see what I can do.
[RAZR i Android Development] Setarcos:
I finally got everything in place and finished the building. However the phone stucked at first boot. adb works, and seems dalvik keept SIGSEGV for SurfaceFlinger. I did format the data partation before flashing, no idea where to go now.
[RAZR i Android Development] Hazou:
Rename the gralloc.mrst.so to gralloc.sc1.so, that will fix it

On my end, I have fixed the internal storage mounting. The sdcard mounting is difficult. It is mounted, but only adb can go in it. Not even the terminal. No app can see its content. Strange. There are still some permission problems here and there.
[RAZR i Android Development] anerik:
Any lucks on that partitions bug?
[RAZR i Android Development] tb110188:
I was seeing the partitions on my Razr and on my Xoom and the permissions are totally wrong, i think is something with the file init.common.rc and init.smi.rc, as on the Xoom the last have the entries to mount the folder with proper ownership and permissions and the first one do the same with the /external folder. But i can't edit them as they don't accept any edit i gave them.
[RAZR i Android Development] GalaxyUser:
Perhaps change

persist.sys.usb.config=adb

to

persist.sys.usb.config=mass_storage,adb (or mtp idk)

and change this:

mkdir /storage/sdcard0 0000 system system

to

mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard0 0000 system system

then change storage XML by JB 4.1.2 one with change values as /mnt/ to /storage.
[RAZR i Android Development] anerik:
Or delete the first 2 lines since we don't have msc... With sound i pulled a logcat and checked out, there were some libs missin in hw and lib folder... didn't look further
[RAZR i Android Development] Hazou:
About the sound, hope u will get far. Then search for the correct sources and we can implement them in the rom.

About the storage, I know some permissions aren't good at the moment, but which I dunno. Can u send me the Xoom files. The Xoom has exactly what we need.

The other partitions are now mounted correctly, only the external sdcard remains to be mounted correctly.
[RAZR i Android Development] anerik:
I'll look into the sound. Glad you figured out the partitions and storaging permissions thing. Any news on wifi?
[RAZR i Android Development] Hazou:
After I fix the sdcard, or when I don't have a clue anymore I will look at the WiFi. But data works luckily so I don't have a problem at the moment :)
[RAZR i Android Development] anerik:
That's good! I'm sure the wifi is easy to fix anyways, like the sound
[RAZR i Android Development] Hazou:
Should be, right libs and config files on the right place ;)
[RAZR i Android Development] pangyaaaaaa:
Very good work@ Hazou ! thanks
[RAZR i Android Development] tb110188:
OK, here is the Xoom init files i think they can help us to figure how to make the SD Card work...
[RAZR i Android Development] cupioscire:
Nope. I think you have to change it to

mkdir /storage 0751 root sdcard_r

Or am I wrong?

Gesendet von meinem XT890 mit Tapatalk
[RAZR i Android Development] tb110188:
The Correct is

mkdir /storage 0550 root sdcard_r
mkdir /storage/sdcard0 0075 system sdcard_rw

According to my Xoom mount points, someone could see how it mounts on the RAZR i Stock Rom...
[RAZR i Android Development] Hazou:
Already tried those suggestions. I am now trying to get a working init for 4.2 and a vold for 4.2 with changes for our device working. They mount the sdcard so there should be the answer. So far init works. Now vold...

Edit: Got internal and external working now. New build uploaded!!

For those who want to know how. I used the 'storage' information from android.googlesource.com, implemented in our rom (init.sc1.rc). Made new init (Did a diff off CM and Moto sources, added the missing things, still a bit messy)), old was from 4.1.2 now it is upgraded to 4.2.2 so it supports the new lines in init. And it works. Now the wifi, sound and gapps x86.
[RAZR i Android Development] marvxxx:
Gold work man. I just wanna note that the camera now wohnt Start while it was in first build. Also i tried to install playsore and services w/o luck. Besides trat its superfast.....Rocks

Gesendet von meinem XT890 mit Tapatalk
[RAZR i Android Development] tb110188:
Also i can't even use my DirectoryBind as i aways used on stock anymore, besides why don't let the external SDcard as SDcard0 and the internal just for the apps???
[RAZR i Android Development] Burn02:
Could you make a short review of what work/does not work? :)

I am a little bit losted. :)
[RAZR i Android Development] Hazou:
hmm, it works on my phone, maybe i did something wrong when i repackaged the zip with a new boot.img. Will look into it someday

I too found it a bid odd, but because of the new mounting way i couldnt change it back in the first place. But i will keep looking for an opening to get it back.

What doesnt work:

- terminal? no idea why

- playstore, need the x86 version and some other files

- wifi, not the correct files

- bluetooth, Same as wifi

- sound, not the correct files

The rest of it works or we didnt test it yet
[RAZR i Android Development] MobyDick92:
GPS doesn't work ;)

Edit:

Rest is really fine.

Would use the rom as a daily driver if the sound would work, but a phone without the option to call someone is useless ;)
[RAZR i Android Development] Burn02:
Thank's a lot for the review. :)
[RAZR i Android Development] mcpaddington:
Can you update the repo?
[RAZR i Android Development] Hazou:
Oh, forgot that one. Had to disable it :P

In the weekend someday
[RAZR i Android Development] chuckiebronco:
Wow, impressive progress in short time! Keep up the GREAT work, love to try out this weekend! :good:
[RAZR i Android Development] hotpokets:
Sorry for my noobiness but, in order to try this cm rom, how can a backup of my current rom be done?

Enviado de meu XT890 usando Tapatalk
[RAZR i Android Development] totex71:
Do a backup of all partitions through twrp or cwm. Them restore again when done testing cm.
[RAZR i Android Development] fards:
really really well done hanzou,

I dropped out at the end of October as I had to give the razr to my missus as she broke her dumbphone and the razr was (I quote "not doing anything just sitting there)

so I can't even get away with building/installing it to help out!

best of luck with it, and again really really well done. :cowboy:
[RAZR i Android Development] Hazou:
Ty!

We can really use all the help from anyone. CM for razr i is coming somewhere now. Only the wifi and sound are the problems now. Wifi can be fixed i think, but sound will be a huge problem. Will update this post somewhere tonight or so, so maybe someone has some ideas. I am sort of stuck at the moment for sound. There are no sources for medfield audio around that work (or i cant find them). And i dont know enough about android, audio and ALSA. Maybe u and others have some ideas :)

Hazou
[RAZR i Android Development] YaPeL:
Sorry if this is too obvious and you already did it, but, did you take a look at the intel open source center? thats the port from Intel to android 4.2.2 kernel 3.8
[RAZR i Android Development] GalaxyUser:
Here ?

http://cateee.net/lkddb/web-lkddb/SND_MFLD_MACHINE.html
[RAZR i Android Development] Hazou:
Looked in both off them, nice find anyway. The android-ia is only useful for the houdini support in dalvik, and other places but cant implement them yet. Otherwise it has no particular extras in comparison with CM. Especially because it has no medfield (x86-atom) support. If it had oh god, GOLD.

The other one is kernel related. We already use it. The problem is i need the source for the library part of it. e.g. audio.primary.(?).so, audio.policy.(?).so for medfield_audio, IntelALSASSP, IntelALSAIFX. Those are the sound cards on our board. And the chance that i can code/write one myself is small, or someone must know a lot about ALSA audio. But i don't.

Hazou