yashsingh1/xdaforums huggingface dataset:
[Moto 360 2015] andrewhair:
Does anyone else have issues playing music downloaded to the watch through bluetooth headphones? My watch seems to be playing music through the bluetooth phone profile instead of the music profile because it sounds horrible! It skips and has a lot of static. If I connect to a bluetooth speaker it is fine, but I haven't had any luck with headphones. Trying to decide if it's software related or if I should just exchange it. Didn't have this issue with the Huawei watch.
[Moto 360 2015] kookahdoo:
Works fine with my Bose Bluetooth over the ears.

Sent from my Nexus 6
[Samsung Captivate Glide] AlaskaLinuxUser:
Thanks to these people for their time and knowledge!

As with any project, it starts somewhere, and I want 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 this site. 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 - http://whiteboard.ping.se/Android/Debian – 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 - http://www.wdowiak.me/anX11phone/ - This gentleman had some great material on starting Linux after starting Android and running Linux on top of Android.

Ivan Davidov - http://minimal.linux-bg.org/ - The tutorials on setting up minimalistic Linux environments and boot script examples were priceless.
[Samsung Captivate Glide] AlaskaLinuxUser:
Optional Instructions

Optional instructions:

If you want to, head over to the Debian Jessie download page and download the arm version of the DVD's 1 and/or 2. In this post I describe how you can rip these cd's to set up a personal repository, one that you can strictly control all of the packages, which may be useful at this time.

Here are the links for the DVD's:

http://cdimage.debian.org/debian-cd/8.2.0/armhf/iso-dvd/debian-8.2.0-armhf-DVD-1.iso

http://cdimage.debian.org/debian-cd/8.2.0/armhf/iso-dvd/debian-update-8.2.0-armhf-DVD-1.iso

Then, on your computer:

~$ cd {to your download directory}
~$ mkdir disk1
~$ mkdir disk2
~$ sudo mount ./debian-8.2.0-armhf-DVD-1.iso ./disk1
~$ sudo mount ./debian-update-8.2.0-armhf-DVD-1.iso ./disk2
~$ mkdir repo1
~$ mkdir repo2
~$ cd disk1
~$ find . -name *deb -exec mv '{}' ../repo1/ \;
~$ cd ..
~$ cd disk2
~$ find . -name *deb -exec mv '{}' ../repo2/ \;
~$ cd ..
~$ sudo umount ./disk1
~$ sudo umount ./disk2
~$ rmdir ./disk1
~$ rmdir ./disk2
~$ cd repo1
~$ sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
~$ cd ..
~$ cd repo2
~$ sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
~$ cd ..

Now you can copy those files to your external sdcard, mount it and add these custom repositories to your /etc/apt/sources.list.

Enjoy!
[Samsung Captivate Glide] steadfasterX:
Really great to see that! Please continue working on this I like the idea :) maybe I participate instead of trying to port ubuntu touch...

In the meanwhile keep up your work and thanks for sharing!

-----
[Samsung Captivate Glide] AlaskaLinuxUser:
Thanks!

Thanks xdajog!

I also tried to port Ubuntu Touch, but the recovery drive is too big for the standard size. I broke down the recovery image and tried to shrink it, I could make it smaller, but I could not get it small enough. Then I attempted to change the pit and re-partition, but ended up having to recover the phone. That is when I started working on this project.

I appreciate the encouragement, and I will be posting more soon! I hope :)
[Samsung Captivate Glide] AlaskaLinuxUser:
20151102 update.

Just a quick post on the updates. The first post has been updated with new links to the new files, and the change log gives the basics. Here is a little more detail:

Essentially I was able to add support for the /dev/input/event7 (soft keys) and /dev/input/event2 (the physical buttons).

Now the front soft keys work:

Menu - essentially the right click menu of whatever the mouse pointer is on.

Home - clears the desktop, pressing this again will reveal all of your windows again.

Back - I used this as the switch between desktops.

Search - This now brings up the xfce app finder.

The volume keys now are bound with "amixer set Master 5dB+" or "amixer set Master 5dB-" to adjust the volume.
[Samsung Captivate Glide] AlaskaLinuxUser:
20151106 update.

Just a few things added in this update:

Created new shutdown.sh and reboot.sh scripts and linked them to a launcher menu on the panel. It was needed to make sure the system is properly shut down, including the chrooted android system.

Also purged and re-installed lsusb, and now it works. After plugging anything into the OTG cable, they will show up on lsusb and things like a mouse are added as /dev/input/event8.

Several failed attempts, but much was learned about the GPS, particularly the use of gpsd. I can now link gpsd to the GPS, however I still need to turn power for the GPS on. However, the Activity Manager for Android is not up and running because Surface Flinger fails to start due to /dev/graphics/fb0 or fb1 being in use by the X server for Debian.
[Samsung Captivate Glide] AlaskaLinuxUser:
20151109 update.

One of the principle problems with the phone setup was the lack of udev support, which is very important in Debian Jessie.

The problem with udev was the lack of "devtmpfs" file system support in the kernels for the Samsung i927.

So after *many* painful attempts, I was able to load a computer with Ubuntu 12.04, download all of the source code, and compile a custom kernel for the i927. This kernel includes devtmpfs and a few other Linux related things.

The output of uname -a:

Linux localhost 3.1.10 #2 SMP PREEMPT Mon Nov 9 11:25:41 AKST 2015 armv7l GNU/Linux

And after remaking a boot image, I flashed it to the phone, and to my surprise, this time it worked! Perhaps tomorrow I can update the top post with the new boot image.

It caught me by surprise also because it re-arranged the order of /dev/input/event#'s moving the touchscreen to 1, where before it was 2, but that was easily overcome by editing /etc/X11/xorg.conf.

I do not know that my new kernel is "better" overall, but it is more "useful" as it includes the devtmpfs support needed to continue with this project.
[Samsung Captivate Glide] AlaskaLinuxUser:
New Kernel.

Still having trouble fine tuning the kernel to be just right, which is why I have not updated the top post with this information yet, but for those interested, here it is.

The new kernel:

http://www.mediafire.com/download/orkbt7kcx16z0or/20151110ALUboot.img

Flash the boot.img with Odin to the LNX partition.

Edit the xorg.conf file /etc/X11/xorg.conf with the following. The reason for this is that the new kernel has a different order of "events" for device inputs.

Section "ServerLayout"
Identifier "Layout0"
Screen "Screen0"
InputDevice "touchscreen" "CorePointer"
InputDevice "keyboard"
InputDevice "mediakeys"
InputDevice "frontkeys"
EndSection

Section "Monitor"
Identifier "Monitor0"
ModelName "Monitor Model"
DisplaySize 800 480
EndSection

Section "InputDevice"
Identifier "touchscreen"
Driver "evdrv"
Option "Device" "/dev/input/event2"
Driver "multitouch"
EndSection

Section "InputDevice"
Identifier "keyboard"
Driver "evdev"
Option "Device" "/dev/input/event0"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "keyboard"
Driver "evdev"
Option "Device" "/dev/input/event8"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "mediakeys"
Driver "evdev"
Option "Device" "/dev/input/event3"
EndSection

Section "InputDevice"
Identifier "frontkeys"
Driver "evdev"
Option "Device" "/dev/input/event7"
EndSection

Section "Device"
Identifier "Card0"
Driver "fbdev"
Option "fbdev" "/dev/graphics/fb0"
Option "Rotate" "left"
Option "VertRefresh" "60"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
DefaultDepth 16
SubSection "Display"
Depth 16
EndSubSection
EndSection

Otherwise, your touchscreen will not function.
[Samsung Captivate Glide] AlaskaLinuxUser:
Phone is broken.

Unfortunately, my spare Captivate Glide finally bit the dust. :crying:

Regardless of what rom/software I put on it, it cannot sustain itself for more than a minute or so before it simply stops working. The screen turns grainy, gets lines through it, and then it reboots itself. Perhaps if I get another phone or motherboard I can continue working on this further.
[Samsung Captivate Glide] steadfasterX:
bad news. Nevertheless thanks for all your work!

The problem you describing may because of the power button. There is a known issue which is also with my dev phone (and others out there). Whenever I press it after the phone booted up it will crash the same way then yours. To be able to develop I avoid using the power button ;) to do so I use the highest display timeout value and if I need to wake up the phone I use an adb command to do so.

.
[Samsung Captivate Glide] AlaskaLinuxUser:
Tim241, sorry, I didn't watch this forum anymore, but I will be glad too if you want to ask questions.

Yes, I can tell you how to port this to another device, but I cannot guarantee success. What device do you wish to port it too?

Also, everything I did I wrote in my blog, which is in my signature. I will gladly answer questions here or there.

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com/
[Samsung Captivate Glide] AlaskaLinuxUser:
Okay, so the next thing we need are some ROMs to break down the boot image from. What ROMs are available for your phone?

Older is better, stock or custom is okay.

Preferably Android 2.3.* is best because it uses the least amount of processing power and ram.

Android 4.4+ will not work as well, as you will not be able to " hold " onto the screen. It is okay that it is older Android, since you will not actually see the Android part, you are just using it to initialize firmware, etc.

What we will do, as I can explain in more detail as we go along, is break down the boot image and make our own init script that will start Debian Linux. Then Debian will be the boss. Debian will start Android, but Debian will control the screen and inputs.

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com/
[Samsung Captivate Glide] AlaskaLinuxUser:
Bummer. So, we can still proceed, but we may have screen trouble with 4.4. Do you want to continue?

-AlaskaLinuxUser https://thealaskalinuxuser.wordpress.com
[Samsung Captivate Glide] AlaskaLinuxUser:
Great attitude! Let's try!

Okay, so first things first, STEP 1: downloads!

Download these things:

http://www.mediafire.com/download/zl80gh0t310trla/unpack-bootimg.pl

http://www.mediafire.com/download/xdmd278n17gm58h/unmkbootimg

http://www.mediafire.com/download/byf0tw4ga2mqtw0/repack-bootimg.pl

http://www.mediafire.com/download/7cmi548pzetc6c4/mkbootimg

And download CM11, if you have not already.

I am using Linux, Ubuntu 14.04. I did this previously from Debian Wheezy, so any Linux should work. You can also use a VM, virtualbox, etc. if you are on a Windows computer.

STEP 2: Unzip!

Go ahead and unzip the CM11 that you downloaded. Preferably in its very own folder. For my work, I made a folder called "playground" in my home directory to play around in. I will reference the "playground" meaning the main folder with everything in it. Now, in the playground, make a new folder called "bootimage". In the playground folder, copy the boot.img file to the bootimage folder.

STEP 3: Tools setup!

Copy the downloaded above tools into a new folder called "tools" in the playground folder. Open a terminal here and give these files executable permissions and copy them again to the bootimage folder:

$ cd ~/playground/tools
$ chmod 777 ./*
$ cp ./ ../bootimage

We copy this twice so we have backups of the tools in case we delete them accidentally.

STEP 4: Unpack the boot image!

Open a terminal and go to the bootimage folder, and start typing:

$ cd ~/playground/bootimage
$ ./unmkbootimg ./bootimage

You will see some output in the terminal that looks *kind of* like this:

$ ./unmkbootimg ./boot.img
unmkbootimg version 1.2 - Mikael Q Kuisma <kuisma@ping.se>
Kernel size 2992704
Kernel address 0x10008000
Ramdisk size 2196028
Ramdisk address 0x11000000
Secondary size 0
Secondary address 0x10f00000
Kernel tags address 0x10000100
Flash page size 2048
Board name is ""
Command line ""
This image is built using standard mkbootimg
Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz -o new_boot.img
---------------

Whatever it says, copy and paste it, hand type it, screenshot, whatever it takes, write the output down, because this is the key to re-making your boot image! I recommend that you post the output here on XDA so we can look at it together.

Then, unpack it like so:

$ ./unpack-bootimg.pl ./boot.img

You should see something *like* this:

$ ./unpack-bootimg.pl ./boot.img
kernel written to ./boot.img-kernel.gz
ramdisk written to ./boot.img-ramdisk.cpio.gz
7607 blocks

extracted ramdisk contents to directory ./boot.img-ramdisk/

You will now have folders and files to play with. After you report back the outcome of this, we will make our init script and continue on.

Good luck! I will wait for your reply!
[Samsung Captivate Glide] AlaskaLinuxUser:
No problem! I just hadn't heard from you in a while.
[Samsung Captivate Glide] NyxTheDarkness:
Hey uh, I tried following your instructions but I'm stuck on step 9.

From what I can tell from a ton of debugging, it gets stuck at this line.

/sbin/busybox mount -t ext4 -o noatime,nodiratime,errors=panic /dev/mmcblk1p2 /mnt/root

It seems to be unable to mount it, I've no idea why though because I have no way of seeing any results aside from 'phone boots up' or 'phone loops' which makes debugging a bit hard heh.

Mounting it in Android and recovery (TWRP) works just fine so I'm pretty certain that '/dev/mmcblk1p2' is the right address and I've tried to mount the fat32 partition of the sd card so I could redirect the output of the mount command to a file but mounting the fat32 partition fails as well.

Maybe it's the population of /dev that's failing?

/sbin/busybox mdev -s

I tried manually creating the node as well to see if that'd help fix anything

/sbin/busybox mknod /dev/logs b 179 33

Alas, it didn't work for unknown reasons or of course, mdev and mknod could have worked but the mount failed for other unknown reasons. No idea and as far as I can think, no way of figuring it out to my knowledge.

P.s

My phone is the HTC One m8, earliest Android version I could find was 4.4, Cyanogenmod 11. 64 GB class 10 micro SD Card

P.p.s

Thank you for making such a comprehensive guide! :D

p.p.p.s

It's 12:26am and I'm so very very tired. I spent at about 9 hours on this wow
[Samsung Captivate Glide] AlaskaLinuxUser:
Sorry, I didn't watch this thread due to inactivity. If you put [MENTION=7026648]AlaskaLinuxUser[/MENTION] in your post, then I will get notified of your post.

When you followed the guide, and made your boot image, did you use the output you got when unpacking it, or did you use the output I told [MENTION=6985215]tim241[/MENTION] to use? That command was specific to his phone. Hit me back and we can try to work through it.

Sweet, sounds great, I will check it out Monday!
[Samsung Captivate Glide] NyxTheDarkness:
Yes, I used the output I got when unpacking the image and I also recompiled mkbootimg with the modifications to adjust the ramdisk, kernel, and second address.

unmkbootimg version 1.2 - Mikael Q Kuisma <kuisma@ping.se>
Kernel size 7216880
Kernel address 0x8000
Ramdisk size 379315
Ramdisk address 0x2008000
Secondary size 0
Secondary address 0xf00000
Kernel tags address 0x1e00000
Flash page size 2048
Board name is ""
Command line "console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3"

*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00208100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************

Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x1dfff00 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 ehci-hcd.park=3 androidboot.selinux=permissive' -o new_boot.img
---------------

I can confirm that the first init script in the ramdisk is being run as well because the phone doesn't reboot until this line and by placing a sleep command before it, telling the phone to sleep for say 60 seconds, the time until the phone reboots changes to 60 seconds.

/sbin/busybox mount -t ext4 -o noatime,nodiratime,errors=panic /dev/mmcblk1p2 /mnt/root

/sbin/busybox sleep 60
[Samsung Captivate Glide] AlaskaLinuxUser:
Good detective work with the sleep command.

Just to be sure, did you try checking sleep 60 after the sdcard is mounted? If it still waits 60 seconds to boot, then the mounting is not the problem.

If it still instant reboots, then, what we know so far:

1. You did a good job making the boot image, because it runs busybox commands.

2. Your init and busybox scripts are working.

3. It fails when mounting your external sdcard.

Notice the command for mounting the sdcard says "errors=panic", when it properly mounts, the card has an issue and the kernel panics. I think if it didn't mount at all, the system would " hang" indefinitely.

You can prove/disprove that by removing the line to mount the sdcard. If the system hangs indefinitely, then we know that you original problem happens just after mounting the card. If the system reboots, then we know your original problem is that it never mounted the card.

This is really important.

This could stem from a slew of things. Does your kernel support ext2/3/4? Perhaps you should change the partition type.

The card reads on your computer, right? Good.
[Samsung Captivate Glide] NyxTheDarkness:
Yes, I tried after the mount command as well and it didn't take an extra 60 seconds to boot.

If my memory's correct, I tried removing the 'errors=panic' part as well and after that, it just froze up on the HTC bootloader screen. I'm not certain though so I'll need to test that again tomorrow because I unfortunately don't have my phone with me right now.

I believe it supported ext4 because I booted into the same rom that I had unpacked and went through the init list manually through 'adb shell', all the commands executed without any errors using the same busybox binary included in the ramdisk including when it mounts. The only error was, attempting to switch root, because it wasn't pid 1 which made sense.

What other file systems are there to try that would work? Fat32 wouldn't really work due to file permissions not being supported right?

Yes the card reads just fine on my computer.
[Samsung Captivate Glide] AlaskaLinuxUser:
Great work. I think you are really really close to cracking this problem!

A couple of thoughts/options:

1. Use a smaller sdcard/partition. If you are using the same busybox binary I used so long ago, it was written for 8 GB sdcards. It *should* not matter, but using smaller sdcard or partitions may help.

2. Use a more modern busybox. One that supports all the latest and greatest file sizes/types, ram, etc. I was limited by boot partition space of 5mb. But you probably have upwards of 10 mb of space to work with.

3. Use ext2 partitions. There is less overhead than ext4, in case it is a weird issue with resources. You are correct, you cannot use fat, vfat, fat32,fat16,fat anything, nfts, etc.

4. Use your internal data partition instead of the external sdcard. I have done that on my i927 and a tablet before.

5. Edit your script to first mount the internal data partition of your phone and log errors to it while you run the mount command for your external sdcard. Or at least have it "ls /dev >> /mnt/data partition/dev.txt" so you can verify that your partitions are seen correctly. You can use this trick to log anything you need to know.

6. Change the mount options, like noatime, etc., to make sure none of those conflict.

I will try to think of some other options.
[Samsung Captivate Glide] AlaskaLinuxUser:
That's great! I am glad you are making progress. So, a couple of thoughts.

#1. The scripts I was using in that last build would not let Android finish on purpose, because I didn't want the screen conflict, as Debian was using the screen with a GUI. It has been so long, I would have too look it all over again, but you should check it.

#2. If Android doesn't boot, it is usually because you need to point to Android normal boot init scripts.

How that helps.
[Samsung Captivate Glide] AlaskaLinuxUser:
If Android is it finishing the boot anyways, you could uncomment the lines and have Debian use the screen, then you would have the GUI.
[Xperia Z5 Compact Q&A, Help & Troubleshooting] GEM0816:
Boot need to verify Google account，I have connected to the Internet, but the input Google account number and password after, some step, and jump back let me enter Google account, is this why?
[Xperia Z5 Compact Q&A, Help & Troubleshooting] masi0:
this is google security

you probably changed the password when you did hard reset your phone - wait 72 hours as per google and try again
[Samsung Galaxy Gear] The-GapZ:
Hey Guys,

yesterday i got my Galaxy Gear 1 and with the newest Update the watch works fine. When I got a message I also got an Notification on my Watch.

But then I went back from Tizen to Android and installed the NullROM.

Now I dont get any notifications. I can pear my Devices but after the pair process, my Samsung Gear APK for the Watch is crashing.

On my S6 Edge i got CarHDRom. Do I need an Downgrade for the App on my S6 ?

Can someone help me ?
[P3600 General] Sailorboy:
Can someone please HELP. I have the French version of the spv m700. With SFR but it is in French and I need to change it to English. Is this possible and if so, How? Many thanks

Sailorboy
[Xperia Z5 General] BR4DOKYBrazil:
Currently has the Xperia Z2 and I will exchange it for Xperia Z5. Maybe this weekend I'll buy.

I wonder of you the first batches of the device are coming defective and what kind of defect!

It is better to wait for the new batch?

Tks!
[Xperia Z5 General] zippy01:
Mine is fine but if it is faulty then get it replaced ?
[Xperia Z5 General] BR4DOKYBrazil:
I got mine in another country, that is, there is no guarantee with Sony, just to the store, but it will be very difficult to replace the device.

I wonder why you have chosen the Xperia Z5 instead of Premium! I am still in doubt.
[Xperia Z5 General] zippy01:
I choose the standard z5 because it's only marginally bigger than my XZ premium is to big for me
[Xperia Z5 General] BR4DOKYBrazil:
I also think the Premium too big! Just think of him by the battery! A larger screen requires more battery!
[Xperia Z5 General] itsjustJOH:
Well, usually with Sony (dunno bout the other manufacturers), the first batch comes with some defect/s. You have to check personal reviews, here in XDA and other forums.
[Xperia Z5 General] BR4DOKYBrazil:
I'm looking for, but I'm not finding anything about it.
[Xperia Z5 General] Snaqejack:
My Z5 works perfectly, haven't encountered any problem with it.

Sent from my Sony Xperia Z5
[Xperia Z5 General] gamer649:
I think I've got one of the first few batch phones as mine was built on the 40th week of 2015. I haven't experienced any faults with mine. Yeah it got hot when I was first setting it up but that was it. My Z2 heated more than this phone.