Follow up: Using your i927 as a Debian “Chatter” Phone

I have adapted some work that I did a while back on the Samsung Captivate Glide (i927), the official post, etc, can be found here:

I also made a post about this earlier, which you can read here:

So, if you read the post the other day, and downloaded and turned your i927 into a Debian Linux computer, you probably need to know some of these things below. These are some things that were still a work in progress that need to be addressed on the i927 Debian “Chatter” phone….

Phone specific things to do: (Wow this is a big list!)

GPS – I have put FoxtrotGPS and gpsd in the image. I know that /dev/ttyHS0 is the GPS output, but it appears that the GPS is of course off, because it has not been started yet. I either need to echo the appropriate digits into the /sys files, or tell the chrooted Android to turn it on. I also found that it relies on gpsd, and uses standard output to it, which is a huge plus for a Linux phone.

Phone calls/text messaging/radio control – I have not even started on that. My goal was to run a chrooted Android environment and “tell it” from Debian to make a phone call or send and receive messages.

Bluetooth – The module for the bluetooth is already loaded, and I have put the bluez and other bluetooth tools on the phone, I just cannot figure out how to connect to it. It may be powered off also.

Wifi – The modules for this are in the /android/lib/modules directory, but once I insmod them, it does not appear as a connection. I believe that I need to do some sort of mknod to create a node or socket to connect to it, or have the chrooted Android turn it on.

Camera – I have not even looked at this yet.

Accelerometer/compass – I have not even looked at this yet.

Slide switch – I am hoping to use xranr and event input to rotate the screen and change the resolution if you slide out the keyboard.

[CODE]Available devices:
/dev/input/event0: STMPE_keypad – The physical keyboard.
/dev/input/event1: mpu-accel
/dev/input/event2: sec_key – Physical keys – Volume +/- and power.
/dev/input/event3: sec_touchscreen – The touchscreen input.
/dev/input/event4: proximity_sensor – Sensor that turns off the screen when your face is against it.
/dev/input/event5: light_sensor – Ambient light sensor to control screen brightness and keyboard lights.
/dev/input/event6: HALL – Opening the slide out keyboard.
/dev/input/event7: sec_touchkey – front face soft keys – home, back, search, menu.
/dev/input/event8: compass_sensor[/CODE]

Linux specific things to do: (Wow, this is also a big list!)

lspci – lspci does not work, which hampers the ability to figure out control of some of the devices. This is a problem (I think) with the kernel / arm hardware and the way the arm ARCH is set up. It uses AMBA.

lsusb – Fixed!
– I also got an OTG cable and can plug stuff in and see it show up with lsusb!

Audio – Pulse audio fails, so I replaced it with alsa. While alsa does work, it has the uniqe problem of turning off the path to device when there is no sound playing. Currently, if you want to listen to music, you open a music player, start the music, open the alsa volume mixer, set the path to SPK_HP, and adjust the volume as desired. Once the song or play list is done, pressing play again will yield no sound until you go to the volume mixer and choose SPK_HP again.

Init – Systemd is the standard init for Debian Jessie, but it causes too many problems on the phone. It either needs to be redone, or replaced. Currently, I am using the rc.local script to start some selected services, as a userspace init, so to speak.

Dbus – dbus can be started after you enter the X window environment, e.g. after the chrooted Android is done starting. I don’t know that it is working properly.

Graphics – Currently Debian is just drawing straight to the frame buffer, it would be nice to get the nVidia drivers working for 3d acceleration.

Chrooted Android specific problems: (Not as big of a list.)

ADB – Fixed, ADB now works to connect to the chrooted Android from your computer using ADB as usual.

AM – The activity manager cannot start because we have stolen /dev/graphics/fb0 for the Debian x-server, so you cannot access the AM. If the AM can get up and running, then it would be possible to script orders to it, such as make phone calls, start wifi, etc.

SurfaceFlinger – SF is waiting for the /dev/graphics/fb0 to become available. It would be beneficial to have it “start” without it, perhaps to a virtual frame buffer, which requires a new kernel, or user-space tools like xvfb.

If you have any ideas or thoughts on how to do these things, or if you would like to tackle one of these projects, please let me know! I’d be happy to post your work and let everyone know that you came up with the solution!

As with any project, it starts somewhere, and I want to take the time to thank the following individuals for their prior work that I used as the basis of this project. These individuals may not know that their tools were used here, but I would like to thank them for posting their knowledge and or files or programs for people like me to be able to read and use:

XDA developer bubor – Seriously, this person has a lot of great material on XDA. I borrowed their TWRP recovery.img.
XDA developer mdubb2341 – I used this person’s Bio360Rom as the chrooted Android environment, due to it’s small size and resource requirements (e.g. no zRam).
Mikael Q Kuisma – [url][/url] – This guy helped tremendously with the breakdown of the boot.img and hijacking init to do what I want instead. He explains how to start Linux then Android, and use your Android phone with Linux underneath.
Eryk Wdowiak – [url][/url] – This gentleman had some great material on starting Linux after starting Android and running Linux on top of Android.
Ivan Davidov – [url][/url] – The tutorials on setting up minimalistic Linux environments and boot script examples were priceless.

I think tomorrow, or the next day, I will post about how to add the repositories to your phone. After that, hopefully I can start presenting how you can do this to any Android phone.

Linux – keep it simple.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s