[DEV][WiP][Python3] AndroPy - Library - It's like chatting with your phone! - Android Software Development

AndroPy
a python3 library to communicate with your phone
INTRODUCTION
Hey there! In relation to THIS library written in JAVA :silly: I decided to write another library in Python3.
I try to reach the same functionality as that JAVA lib and maybe even more. "Why Python3?" you may ask..
Because it's the language I love the most, it's platform-independent and has got a beautiful syntax.
It's in early stage and there are only some functions working right now which I will explain in another block.
Click to expand...
Click to collapse
FEATURES
Install ADB-binary (only working on linux 64-bit for now)
Reboot (system, recovery, bootloader)
Execute shell commands and get output-lines as a list
Get list of connected devices
Get build.prop as a dictionary
Click to expand...
Click to collapse
EXAMPLES
I included a function called example wich will be automatically executed if you run adb_util.py.
It shows what you can do with that library. The installer isn't fully working yet, only in Linux 64bit systems.
In order to use adb_util.py the adb-binary has to be in ~/.andropy/bin.
Click to expand...
Click to collapse
Install adb via installer.py on Linux 64-bit machines
Just execute it like:
Code:
python3 installer.py
Click to expand...
Click to collapse
Show content of /sdcard
Code:
import andropy
with andropy.ADBInterface() as ai:
print(ai.exec_shell_cmd("ls /sdcard/"))
Get screen-resolution
Code:
import andropy
with andropy.ADBInterface() as ai:
build_props = ai.get_build_props()
print(build_props['ro.device.screen_res'])
Samle output from adb_util.py
Code:
[email protected]:~/src/andropy$ python3 adb_util.py
# Welcome to AndroPy #
----------------------
Number of devices detected: 1
Number of your downloaded apps: 41
Your phone's CPU: 1.7 GHz quad-core
Your phone's model: HTC m7ul
SOURCE
https://github.com/tehmk/andropy
But as I mentioned it isn't nearly ready yet. Some of you maybe know how to use it in this state.
I will add features and more detailed instructions step by step.
Click to expand...
Click to collapse

hey saw this pop up in the portal. after a quick glance this can become a good concept for users, such as timed logs, or a function to dump information (build prop, kmsg, logcat, bugreport, tombstones, you get the idea)
I'd like to bring your attention to this though. the prop parser
Code:
def get_build_props(self):
build_props = {}
out = subprocess.check_output([ADB_EXE, "shell",
"cat /system/build.prop"],
universal_newlines=True)
self.check_output(out)
for line in out.split('\n'):
if line == '':
continue
prop = line.split('=')
if not prop[0].startswith('#'):
build_props[prop[0]] = prop[1]
return build_props
you don't need to fetch the whole build prop (for most of the time). this is an extra function that you can use
Code:
def get_prop(self, prop):
out = subprocess.check_output([ADB_EXE, "shell",
"getprop", "{}".format(prop)])
self.check_output(out)
return out
if you need any other help or tips, feel free to ping me on freenode, or drop a message here

This is great. Thank you. Will be using and might contribute.

Seems like I've started a trend here. Lol

Beatsleigher said:
Seems like I've started a trend here. Lol
Click to expand...
Click to collapse
seems so. I've got the base layer of a python package that plugs directly into the adb server. none of these wrappers needed

Related

[unofficial][linux3.4][native][tarchive][multirom]ArchLinuxARM release for N7 2013

This is not an Android project so I don't feel that posting it in the Android Development forum would be appropriate.
ArchLinuxARM for the flo (2013 Nexus 7) - Native Boot with MultiROM
This is only tested on the Wi-Fi version. With a kernel swap, it should work on the deb (LTE) tablet, though mobile data is highly unlikely to work.
Big thanks to crondog at github for the initial porting work. https://github.com/crondog/arch-flo
Working:
3D Acceleration (OpenGL ES 3.0, Mesa) - can be unstable, however.
Wi-Fi (with NetworkManager)
Bluetooth
Audio
Installation
MultiROM must already be installed, and you must already have a hardboot-capable kernel installed as well.
You will need a Terminal Emulator or ADB Shell to install.
This assumes that arch_flo_20141210_multirom.tar.gz is in the root of your internal storage (/data/media/0).
Code:
su
tar -C /data/media/0/multirom/roms -xpzvf /data/media/0/arch_flo_20141210_multirom.tar.gz
Logging in
The username is "arch" and the password is "archlinux". Change the password ASAP.
For root, the username is "root" and the password is also "root". CHANGE THE PASSWORD ASAP!
You'll probably want to enable the On-Screen Keyboard (onboard) and set your Session to "MATE" up in the top right corner.
Downloads
MultiROM hierarchy tarchive: https://drive.google.com/file/d/0B4WUjKii92l2X1F1LVhsaG5DbUE/view?usp=sharing
Kernel Source: https://github.com/willcast/kernel_flo
Also available for:
Samsung Galaxy S III LTE: http://forum.xda-developers.com/gal...unofficial-port-archlinuxarm-release-t2969290
HP TouchPad: http://forum.xda-developers.com/hp-touchpad/other/unofficial-archlinuxarm-release-hp-t2969310
Nexus 10: http://forum.xda-developers.com/nexus-10/general/unofficial-archlinuxarm-release-nexus-10-t2969450
HTC HD2: http://forum.xda-developers.com/hd2-ubuntu/development/unofficial-archlinuxarm-htc-hd2-t2970483
looks interesting will give it a crack and see how it goes
thanks for the work. it boots impressingly fast.
castrwilliam said:
You'll probably want to enable the On-Screen Keyboard (onboard) and set your Session to "MATE" up in the top right corner.
Click to expand...
Click to collapse
if I activate the onboard keyboard ist shows at the bottom of the login screen. login works without password. when beeing logged in the keyboard is gone. I can see the keyboard symbol on the left besinde the speaker symbol but tapping on it doesn't trigger anything. also changing any options in the control center -> onboard settings have no effects. logging in without keyboard activated and then control center -> onboard settings has no effects either.
I cannot "adb shell" due to lack of permissions
Code:
# adb devices
List of devices attached
???????????? no permissions
and I'm not owning a bluetooth keyboard. so right now I can only play minesweeper - oh wait, it's not installed...
is there any way to rotate the screen as its really annoying having it in portrait all the time
Toby0897 said:
is there any way to rotate the screen as its really annoying having it in portrait all the time
Click to expand...
Click to collapse
Yeah it is in the monitor options but it's worthless since Xorg crashes when changing the rotation
Great stuff!
I would remove the KDE plasma etc packages as that desktop seemed to unusable. (Due to broken hw acceleration?).
what's next?
Hi, I'm having a big trouble...
While I'm trying to do the installation (by adb shell or terminal emulator, both of them) and I enter the command posted in the OP it says:
127|[email protected]:/ # tar -C /data/media/0/multirom/roms -xpzvf /data/media/0/arch_flo_20141210_multirom.tar.gz
tmp-mksh: tar: not found
What can I do to resolve this error? I really would like to install it on my Nexus 7
Thanks in advance!
hugomc92 said:
Hi, I'm having a big trouble...
While I'm trying to do the installation (by adb shell or terminal emulator, both of them) and I enter the command posted in the OP it says:
127|[email protected]:/ # tar -C /data/media/0/multirom/roms -xpzvf /data/media/0/arch_flo_20141210_multirom.tar.gz
tmp-mksh: tar: not found
What can I do to resolve this error? I really would like to install it on my Nexus 7
Thanks in advance!
Click to expand...
Click to collapse
You will need to install busybox for tar to work
daringblaze said:
You will need to install busybox for tar to work
Click to expand...
Click to collapse
Thank you very much!! That make tar to work!!
Gonna try archLinux ASAP!!
Thanks!
updates
Hi, great stuff!
After installing it, I tried to update arch (
Code:
sudo pacman -Syu
) but this resulted in a blank screen upon boot. I assume that this is due to updated packages overwriting parts of the OS that were installed manually, but I don't know what or where. Would you have any ideas of what packages would be responsible for this, so that I know not to upgrade them?
Thanks!
computer-whisperer said:
this resulted in a blank screen upon boot. I assume that this is due to updated packages overwriting parts of the OS that were installed manually, but I don't know what or where. Would you have any ideas of what packages would be responsible for this, so that I know not to upgrade them?
Thanks!
Click to expand...
Click to collapse
Make sure you ignore xorg and mesa stuff. Add
Code:
IgnorePkg = glu mesa mesa-dri mesa-libgl xorg-server-common xorg-server-devel xorg-fonts-misc xproto libdrm
IgnoreGroup = xorg
to /etc/pacman.conf.
The list probably contains some extra entries, but works for me
It took xda 2 years, but they finally did it.
In all seriousness, props to you. I've been waiting for this for along time.
castrwilliam said:
Downloads
MultiROM hierarchy tarchive: https://drive.google.com/......
Click to expand...
Click to collapse
Hi castrwilliam, would you mind sharing what step you went through to create arch_flo_20141210_multirom.tar.gz ?
Great work guys! I was looking for this for a really long time and i am writing this on my n7 with linux but i have a few questions:
1. is it possible to overclock(and how) because my n7 runs on 1.89ghz and 477mhz gpu in android with elementalx kernel and it would be nice to have some more power
2. can the screen be rotated so the hardware buttons are on top (i saw a post saying it chrashes but i cant even find the setting xD) because it would be alot easier to use the OTG cable
And thank you guys for making this happen, i love linux on the note 10.1 and im so glad to have this run it too(would be maaad if it can be overclocked )
Thank you for this wonderful package!
I recently updated all packages ) and iam trying to fix the issue without reinstall (challenge accepted)
It seems that the xorg-server 1.17 is the problem. I compiled. Freedreno and the freedreno mesa 10.3 and libdrn packages without success. The xserver is segfaulting when it loads libexa.so.
Now i try to downgrade to 1.16 . ive read that the xf86-video-freedreno-git package is not working with flo. Is that correct? Did youbuild this packages with modificationa?
I believe this is why i love arch. Its like lego for nerds or something
castrwilliam said:
This is not an Android project so I don't feel that posting it in the Android Development forum would be appropriate.
ArchLinuxARM for the flo (2013 Nexus 7) - Native Boot with MultiROM
This is only tested on the Wi-Fi version. With a kernel swap, it should work on the deb (LTE) tablet, though mobile data is highly unlikely to work.
Big thanks to crondog at github for the initial porting work. https://github.com/crondog/arch-flo
Working:
3D Acceleration (OpenGL ES 3.0, Mesa) - can be unstable, however.
Wi-Fi (with NetworkManager)
Bluetooth
Audio
Installation
MultiROM must already be installed, and you must already have a hardboot-capable kernel installed as well.
You will need a Terminal Emulator or ADB Shell to install.
This assumes that arch_flo_20141210_multirom.tar.gz is in the root of your internal storage (/data/media/0).
Code:
su
tar -C /data/media/0/multirom/roms -xpzvf /data/media/0/arch_flo_20141210_multirom.tar.gz
Logging in
The username is "arch" and the password is "archlinux". Change the password ASAP.
For root, the username is "root" and the password is also "root". CHANGE THE PASSWORD ASAP!
You'll probably want to enable the On-Screen Keyboard (onboard) and set your Session to "MATE" up in the top right corner.
Downloads
MultiROM hierarchy tarchive: https://drive.google.com/file/d/0B4WUjKii92l2X1F1LVhsaG5DbUE/view?usp=sharing
Kernel Source: https://github.com/willcast/kernel_flo
Also available for:
Samsung Galaxy S III LTE: http://forum.xda-developers.com/gal...unofficial-port-archlinuxarm-release-t2969290
HP TouchPad: http://forum.xda-developers.com/hp-touchpad/other/unofficial-archlinuxarm-release-hp-t2969310
Nexus 10: http://forum.xda-developers.com/nexus-10/general/unofficial-archlinuxarm-release-nexus-10-t2969450
HTC HD2: http://forum.xda-developers.com/hd2-ubuntu/development/unofficial-archlinuxarm-htc-hd2-t2970483
Click to expand...
Click to collapse
What's NOT working
Hello, is there some instruction howto run (native) arch on nexus 4? I see only for n7, n10...
castrwilliam said:
This is not an Android project so I don't feel that posting it in the Android Development forum would be appropriate.
ArchLinuxARM for the flo (2013 Nexus 7) - Native Boot with MultiROM
This is only tested on the Wi-Fi version. With a kernel swap, it should work on the deb (LTE) tablet, though mobile data is highly unlikely to work.
Big thanks to crondog at github for the initial porting work. https://github.com/crondog/arch-flo
Working:
3D Acceleration (OpenGL ES 3.0, Mesa) - can be unstable, however.
Wi-Fi (with NetworkManager)
Bluetooth
Audio
Installation
MultiROM must already be installed, and you must already have a hardboot-capable kernel installed as well.
You will need a Terminal Emulator or ADB Shell to install.
This assumes that arch_flo_20141210_multirom.tar.gz is in the root of your internal storage (/data/media/0).
Code:
su
tar -C /data/media/0/multirom/roms -xpzvf /data/media/0/arch_flo_20141210_multirom.tar.gz
Logging in
The username is "arch" and the password is "archlinux". Change the password ASAP.
For root, the username is "root" and the password is also "root". CHANGE THE PASSWORD ASAP!
You'll probably want to enable the On-Screen Keyboard (onboard) and set your Session to "MATE" up in the top right corner.
Downloads
MultiROM hierarchy tarchive: https://drive.google.com/file/d/0B4WUjKii92l2X1F1LVhsaG5DbUE/view?usp=sharing
Kernel Source: https://github.com/willcast/kernel_flo
Also available for:
Samsung Galaxy S III LTE: http://forum.xda-developers.com/gal...unofficial-port-archlinuxarm-release-t2969290
HP TouchPad: http://forum.xda-developers.com/hp-touchpad/other/unofficial-archlinuxarm-release-hp-t2969310
Nexus 10: http://forum.xda-developers.com/nexus-10/general/unofficial-archlinuxarm-release-nexus-10-t2969450
HTC HD2: http://forum.xda-developers.com/hd2-ubuntu/development/unofficial-archlinuxarm-htc-hd2-t2970483
Click to expand...
Click to collapse
Having my favourite distro on my pocket is very exciting so thank you very much...
I have to carry only a development lamp server so using a pacman tip I revert to a base, base-devel system removing everything about xorg and DE.
Now I connect using ssh but I've noticed that the tablet screen is simply blank: no tty, no text console.
There is a way to have a text only console at boot to make a login (may be using an usb keyboard) when device is not connected?
Hello, I have some trouble when I boot.
config: rastapop 5.1.1 (AOSP based) + last multirom v32A + Kernel w/ kexec-hardboot patch (Stock 5.1.1)
Installing archlinux correctly from the terminal emulator. Load it --> black screen (about 6seconds) --> Google Logo forever
Someone know what I can do for make it work ?
Cool I will give it a try.

VRTV Free for Cardboard 3.0 open beta

Hi XDA! I'm the developer of VRTV, a video player for Cardboard. I'm running an open beta of my latest release, and I was hoping I could get some feedback here. Hope this doesn't count as me spamming. The app is free, with a banner ad, but there is a paid version available.
Anyway, here's a small description of the news in 3.0 beta:
Big news:
Uses libVLC backend, with support for replacing the decoding library.
Regular 2D video player UI.
Configurable bluetooth controls.
Smaller news:
Support for 220/270 degree panoramas.
Audio track selection.
Guess video config from filename.
Setting for phones/headset in reverse landscape configuration.
Like MX Player, I've disabled support for DTS/AC3, but you can build and load your own libvlcjni.so from the libvlc source code if you are not under the jurisdiction of software patents. To get the correct version I recommend using the same source as I used to build the version that's distributed with the app. Link below.
The other big new thing in 3.0 is that I've implemented a simple "normal" video player UI, so ideally you would get by with VRTV for all your videos and can set it as the default video player. Something that's been bugging me with VRTV for a while (and with most other players I believe). Uncheck "VR Player" to use the regular player.
I use the beta functionality in the Play Store, so to join, click the appropriate link below to join the beta with your Google account, then find VRTV in the Play Store to update to the beta.
https://play.google.com/apps/testing/se.chai.vrtv.free
https://play.google.com/apps/testing/se.chai.vrtv (requires buying/owning the paid version)
Follow the link below to get the source code for libvlc used in VRTV. Let me know if you would be willing to help me test loading a self-built library!
https://github.com/svenhenrik/vlc_vrtv_1.7.x
Any feedback is valuable, and if you have the ability to provide logs for crashers I will love you forever! Especially Nougat seems to be a bit troublesome, and I don't have a device to test with myself.
Hi Sven,
I bought the pro app in the Play store and I am willing to build my own libvlcjni.so. From all the players I have tried so far your app had the best results for non-VR 3D-movies by far.
I will install an Ubuntu on an usb stick tonight and have a couple of questions since I am not familiar with developing in Linux.
- Will it compile correctly under 64-it linux?
- What settings do I have to change to enable AC3/DTS?
- Do I need the Android SDK or just the libraries mentioned at https://wiki.videolan.org/AndroidCompile/?
So I will just do a
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install zlib1g:i386 libstdc++6:i386 libc6:i386
sudo apt-get install automake ant autopoint cmake build-essential libtool \ patch pkg-config protobuf-compiler ragel subversion unzip git
git clone https://github.com/svenhenrik/vlc_vrtv_1.7.x
./compile.sh --release -l -a armeabi-v7a
Copy the new libvlcjni.so to data/app/se.chai.vrtv-1/lib
?
Thank you for your help.
OK, I ran into a couple of issues (some URLs where additional packages were being fetched were dead, you need to use NDK 10e because newer versions are missing the required release.txt, you need to install Oracle Java and set the JAVA_HOME variable).
ColinMacLaren said:
OK, I ran into a couple of issues (some URLs where additional packages were being fetched were dead, you need to use NDK 10e because newer versions are missing the required release.txt, you need to install Oracle Java and set the JAVA_HOME variable).
Click to expand...
Click to collapse
Hi, so sorry for not checking in here sooner to help. Did you manage to get it all to compile? Let me know if you have more questions, I'll check a little more often
I'll update the patch later today with the new contrib links. I really should upgrade VLC since they released a new version recently, I used the one that was released when I started adding support.
I'll add the part about needing NDK r10e to the instructions, thanks!
ColinMacLaren said:
- What settings do I have to change to enable AC3/DTS?
Click to expand...
Click to collapse
Missed this part. You basically want to revert my changes relating to the a52 library. These are the modifications I've made:
- Make sure to use the last tested SHA of VLC instead of the latest checkout, to get some stability in what VRTV is using.
- Disable GPL, and fix building without GPL libraries (all changes relating to -lmad and -lpostproc
- Disable a52, in both the vlc build script and in the ffmpeg config.
The latter two are mixed and spread over two commits unfortunately so you can't just revert them.
https://github.com/svenhenrik/vlc_vrtv_1.7.x/commit/39bfc574661484f3d6e6f4371c1582aec57dbe35
Here you need to remove the --disable-a52 lines and add back the linker flag -la52 that was removed.
https://github.com/svenhenrik/vlc_vrtv_1.7.x/commit/961142382010ef3bb74028163cd66e11244d139a
Remove the --disable-decoder lines the patch added to vlc/contrib/src/ffmpeg/rules.mak
I think I might have had to add --enable-a52 to the compile script to get it to pick up the changes when rebuilding, try that if it doesn't download the a52 contrib lib or doesn't link.
By the way, the latest beta supports reading zip:ed libvlcjni.so files (make sure it's the only file in the archive).
Also gave this a shot. The developer still hasn't updated the source with new links to libraries, but I managed to get it to build and load after some tinkering.
If anyone else wants AC3/DTS support but can't build it themselves, PM me, new account so I can't post links.
Where do I put the zipped library and what are the naming restrictions?
ColinMacLaren said:
Where do I put the zipped library and what are the naming restrictions?
Click to expand...
Click to collapse
Haven't tried zip, but if you pick "load library" in the menu in VRTV you get a file browser so just put the file anywhere on the phone.
Instructions
A paid customer and also joined the Beta testing team.. Want to say thank you for this great Video player. Took me a while to land on it after trying so many VR players.
Two questions.
Are there better instructions anywhere?
1.) How / where to find Codec's for this? Trying to play .MKV files (no audio)
UPDATE: used VLC codec, thanks..
2.) Is there a way to have the filename syntax , pre-configure settings on video type, VR DOME etc.., so it starts without having the non-3D menu first ? Does this make sense?
​Using;
Note 5 -Samsung Gear VR​, streaming videos from Local NAS
sounds cool. will give it a try
Cool. Will give it a try
[WIP] Docker Build Steps
This isn't working but I thought I'd post anyone, I will edit when I figure out what I'm missing.
If you already have a build environment setup these steps may or may not be helpful, but here's what I did to build the library file with docker:
Code:
# Grab a docker image that's has the NDK and SDK install for you
docker pull dbndev/android-ndk-r12b-build-samples
# Grab the source for building VRTV's VLC Lib, and checkout the version before any changes were made
git clone https://github.com/svenhenrik/vlc_vrtv_1.7.x
cd vlc_vrtv_1.7.x
git checkout 58181046e79112450a3362df7195cc35dd332096
# EDIT compile.sh, otherwise gradle don't download, the url changed, and redirect isn't caught. Note change xxxx to http, I can't post links with my account
# ORG: GRADLE_URL=xxxx://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-all.zip
# NEW: GRADLE_URL=xxxx://downloads.gradle.org/distributions/gradle-${GRADLE_VERSION}-all.zip
docker run -it --rm -v $(pwd):/build_vlc -w /build_vlc dbndev/android-ndk-r12b-build-samples bash
# Install needed tools and setup the environment for building
apt-get update
apt-get install zlib1g:i386 libstdc++6:i386 libc6:i386
apt-get install automake ant autopoint cmake build-essential libtool patch pkg-config protobuf-compiler ragel subversion unzip git
export ANDROID_SDK=/opt/android-sdk-linux
export ANDROID_NDK=/opt/android-ndk-r12b
echo "r10 (64-bit)" > $ANDROID_NDK/RELEASE.TXT
./compile.sh --release -l -a armeabi-v7a
exit
There should now be a libvlcjni.so around xKB in the root of the vlc_vrtv_1.7.x directory, copy to android and enjoy audio!
Here's the error I'm having now, it looks like I'm trying to build a 32bit library on a 64bit OS, and looks like I need to set some other envs to get past this.
Code:
configure: error: in `/build_vlc/vlc/contrib/contrib-android-arm-linux-androideabi/fribidi':
configure: error: C compiler cannot create executables
See `config.log' for more details
../../contrib/src/fribidi/rules.mak:26: recipe for target '.fribidi' failed
make: *** [.fribidi] Error 77
contribs: make failed
Getting the same thing on mac when trying the following. Hope someone know's how to fix this issue.
Code:
------ NATIVE MAC ------
Download Android studio
Configure / SDK Manager / SDK Tools / NDK
Open the vlc_vrtv_1.7.x folder (maybe not needed who knows...)
echo "r10 (64-bit)" > $HOME/Library/Android/sdk/ndk-bundle/RELEASE.TXT
brew install automake ant cmake libtool patchutils pkg-config protobuf ragel subversion
ANDROID_SDK=$HOME/Library/Android/sdk ANDROID_NDK=$HOME/Library/Android/sdk/ndk-bundle ./compile.sh --release -l -a armeabi-v7a
Hi.
Also using the paid version and I really like the app, it's the best yet!
Two things I'd like to see and it would be even better:
1. support for web streams. Youtube, vimeo, etc.
2. automatic switch off for locked view when browsing your videos in app. It's impossible to click on the X when the image follows your head.
- Mik
Version 3.2 beta / vc61
Not sure what happened since last update, but the back button does not exit from VRTV back to anymore. The only way to exit player is through VR mode and clicking on the small X on top left side.
Also, Gear VR controls don't seem to work anymore.
Also there is a serious drift now.
Future function; a way to save settings or backup settings. I lost my config of my gamepad controls and can't get them back.
---------- Post added at 11:50 AM ---------- Previous post was at 11:37 AM ----------
ColinMacLaren said:
Hi Sven,
I bought the pro app in the Play store and I am willing to build my own libvlcjni.so. From all the players I have tried so far your app had the best results for non-VR 3D-movies by far.
I will install an Ubuntu on an usb stick tonight and have a couple of questions since I am not familiar with developing in Linux.
- Will it compile correctly under 64-it linux?
Click to expand...
Click to collapse
An actual 64bit Android support would be cool, not sure if it would be needed if Hardware support works... just an idea that was triggered from above.
Hi. I am just a noob in this, but please help me. I love VRTV player, but I can't
in VR mode in cinema choose another video to play. Have to pull off my phone, go to another movie tapping it, then pull phone back and watch. very uncomfortable.
Wilsonb said:
A paid customer and also joined the Beta testing team.. Want to say thank you for this great Video player. Took me a while to land on it after trying so many VR players.
Two questions.
Are there better instructions anywhere?
1.) How / where to find Codec's for this? Trying to play .MKV files (no audio)
UPDATE: used VLC codec, thanks..
2.) Is there a way to have the filename syntax , pre-configure settings on video type, VR DOME etc.., so it starts without having the non-3D menu first ? Does this make sense?
​Using;
Note 5 -Samsung Gear VR​, streaming videos from Local NAS
Click to expand...
Click to collapse
Hi, can you explain how did you install VLC coded? Thanks.
--- deleted by user ---
Reason. This has been answered in the very first post of this thread.
I have a nexus 5X and I can't find a good setup to have a quality like in another app.
Trying to play with shader and opengl 3.0 or Vertex hq, but I can't reproduce a good image quality.
What do you suggest ?
Envoyé de mon Nexus 5X en utilisant Tapatalk
Could you revert back the exit behavior as it was 4-5 revisions ago? If it was launched using a File Manager, then backing out brought it back the the app that launched it, instead of now it exits to the launcher.
Hope this make sense. I was able to select movies while closing one eye using my file manager.
This would be important at least until SMB authentication is working.
Thanks
Wilsonb said:
Could you revert back the exit behavior as it was 4-5 revisions ago? If it was launched using a File Manager, then backing out brought it back the the app that launched it, instead of now it exits to the launcher.
Hope this make sense. I was able to select movies while closing one eye using my file manager.
This would be important at least until SMB authentication is working.
Thanks
Click to expand...
Click to collapse
What is your rendering settings plz ?
Envoyé de mon ONEPLUS A5000 en utilisant Tapatalk

[Work In Progress] Install Ubuntu 16.04.3 Nexus 9

DON'T FORGET TO HIT THE THANKS BUTTON
!!!DISCLAIMER!!!!
You are solely responsible for whatever shtuff happens to your device by installing either of the two files to your device.
!!!DISCLAIMER END!!!
So this still needs a lot of work but I am providing a working boot.img and root filesystem archive for all Nexus 9 variants? (not sure needs others to test and confirm).
Will be edited as things start working
What's working:
WiFi. (Must use 'nmcli dev wifi con "SSID" password "passwd" ')
GPU @ anywhere from 900-2000 FPS
Sound works just needs reconfiguring
Screen rotation works best with minimal issues as desktop taskbar widgets command to turn clockwise into landscape:
Code:
sudo xrandr -o right; sudo xinput set-prop 7 "Evdev Axis Inversion" 0, 1; sudo xinput set-prop 7 "Evdev Axes Swap" 1
&
Code:
sudo xrandr -o right; sudo xinput set-prop 7 "Evdev Axis Inversion" 0, 0; sudo xinput set-prop 7 "Evdev Axes Swap" 0
For normal portrait orientation
However DO NOT USE THE DISPLAY SETTINGS TO ROTATE IT MESSES UP THE LOGIN ROTATION AND SCREEN GOES BLACK AND SOMETIMES SHOW BACK UP IN LANDSCAPE AND WILL NOT DEFAULT BACK INTO PORTRAIT ORIENTATION. SO YOU MUST DO IT MANUALLY!!!!! See screenshot below
Swipe gestures (Chromium-browser only).
Bluetooth: WORKING!!! Install package bluetooth-touch and set this command into a shell script or enter manually the ENTIRE string:
Code:
brcm_patchram_plus --enable_hci --use_baudrate_for_download --scopcm=0,2,0,0,0,0,0,0,0,0 --baudrate 3000000 --patchram /lib/firmware/bcm4354.hcd --no2bytes --enable_lpm --tosleep=50000 /dev/ttyTHS2
Also using a Bluetooth audio sink works by itself without keyboard connected. I've found it still needs work but, connecting to a keyboard still flawless in its function file transfer locks it up when sending not receiving. Pairing and connecting are all good but functionality of Bluetooth is down to one device at a time for best results
What's not working:
Cameras (Neither front nor rear camera works at all. Needs work).
NFC? (I have no idea how to check for this. Needs work).
Probably other things I missed.
What you will need:
Any Nexus 9 with an unlocked bootloader & latest TWRP recovery installed
USB keyboard
OTG cable
Instructions:
MAKE A BACKUP! Just in case.
1.) Enter into recovery go to wipe and format Data partition as Ext4
2.) Reboot into recovery and with the boot.img and rootfs on a flash drive or, push them to device via ADB.
3.) Go to terminal command in recovery issue the commands: cd /data; mkdir linux; cd linux
4.) tar xvjf /sdcard/rootfs.tar.bz2 -C /data/linux
5.) Flash N9boot.img with install image in TWRP Install submenu.
6.) Reboot into the new Linux system.
7.) If the Kernel panics and boot loops, go back into recovery and format the data partition again it will ask are you sure type yes & repeat steps 2-4
You will need to use a USB keyboard & OTG cable to install the necessary packages and connect to WiFi/Bluetooth.
It's much easier to install on device than in a chroot environment as I have had problems in the past. And some people have different favorite Desktop Environment's. However Gnome and KDE both do not work correctly and crash.
Fluxbox, Mate, XFCE, LXDE, all work as they should with Lightdm.
If there's anything I missed you can add it below, PM me and ask, whatever and I'll try to answer as soon as I am able.
If you are interested in building the entire thing from start to finish here are the original sources
https://forum.xda-developers.com/nexus-9/general/guide-linux-nexus-9-t2985958
https://forum.xda-developers.com/nexus-9/general/guide-linux-nexus-9-t2985958/page14
And thanks to @sonicadvance1 for his original guide & @Vartom for his work on porting some of the necessary Kernel drivers. And @Vartom again for his contributions to the Bluetooth and everything else to get us this far :good::good::good::good::good::good::good::good:
Xubuntu-Desktop Preinstalled 21.5 Drivers 1GB username=ubuntu password=ubuntu
https://drive.google.com/open?id=0B8NgGANYGMhOZS1OenNzZl94bEE
rootfs base only necessary packages root password=toor
https://drive.google.com/file/d/0B8NgGANYGMhOMjVObElVVnBWamM/view?usp=drivesdk
boot.img
https://drive.google.com/open?id=0B8NgGANYGMhOZXAwZHVrUUotZ0k
In order to get the preinstalled to fix login if having issues use the command as root in virtual terminal Ctrl+Alt+F1/F2, etc
Code:
chown ubuntu:ubuntu /home/ubuntu
.
This should fix the login issues, if you want you can create a different user and remove the premade user using these commands as root in virtual terminal.
Code:
deluser username
adduser username
addgroup username adm
addgroup username sudo
Additionally if you have an error when running glxgears there is a fix
Code:
xauth list
It should output something similar to this
Code:
localhost.localdomain/unix:0 MIT-MAGIC-COOKIE-1 a4f6256398303725763c5595f404afbb
You will need to export the display and add that MIT-MAGIC-COOKIE you got from xauth list
Code:
export DISPLAY=":0"; xauth add $DISPLAY . a4f6256398303725763c5595f404afbb
This should fix the display error.
And finally,
Enjoy Ubuntu on your Nexus 9
Video of it booting
https://youtu.be/PIGm47pwzj0
Booted fine.... However a username and password would help...lol
---------- Post added at 10:30 PM ---------- Previous post was at 09:45 PM ----------
andyroidking said:
Booted fine.... However a username and password would help...lol
Click to expand...
Click to collapse
Found the root password in the other thread. toor
Now on to getting wifi up so i can get a de installed....
Reserved
andyroidking said:
Booted fine.... However a username and password would help...lol
---------- Post added at 10:30 PM ---------- Previous post was at 09:45 PM ----------
Found the root password in the other thread. toor
Now on to getting wifi up so i can get a de installed....
Click to expand...
Click to collapse
sk1tch said:
Ha! Sorry I updated the guide above to include that little tidbit of info. Sweet I'm excited to read it worked so far. Hope the guide is simple enough for everybody who wants to try it out
Click to expand...
Click to collapse
Yeah now that I got wifi working I'm off to study how to get xfce4 installed. Everyone says Arch is hard but I'll tell you their repo's are extensive. Now I have to learn about ppa's...
Also, I'm over 50 and because we have a 2048 x 1536 display everything is very tiny making all of this more of a challenge... I tried a couple things to bump the font size but they don't work....
andyroidking said:
Yeah now that I got wifi working I'm off to study how to get xfce4 installed. Everyone says Arch is hard but I'll tell you their repo's are extensive. Now I have to learn about ppa's...
Also, I'm over 50 and because we have a 2048 x 1536 display everything is very tiny making all of this more of a challenge... I tried a couple things to bump the font size but they don't work....
Click to expand...
Click to collapse
I knew you were old school. I did get Arch Linux running on the original guide but it was choppy at best and only ran in the framebuffer but this was the aarch64 version. I do think it could be done because it's my preferred distro these days as well. I think we'd have to change a few things in the CPIO init scripts.. You know point to what it needs but, that's a little too advanced for me.
Also try setting a custom dpi in the settings menu if you're using XFCE I know there's the option there
and to install it you need to uncomment all the extra repos in /etc/apt/sources.list then do apt update && apt install xubuntu-desktop
it should look like in the picture
Well, I'm stuck. X won't start... I'll have to pull the log and see what up. Unfortunately I'm back to work tonight so it will be a while before I get to play again. Don't fret, I'll be back. :silly:
Edit: Pulled logs:
As root user:
https://pastebin.com/3bJE7HkJ
As reg user:
https://pastebin.com/ZVBrCAuM
They look the same to me...
andyroidking said:
Well, I'm stuck. X won't start... I'll have to pull the log and see what up. Unfortunately I'm back to work tonight so it will be a while before I get to play again. Don't fret, I'll be back. :silly:
Edit: Pulled logs:
As root user:
https://pastebin.com/3bJE7HkJ
As reg user:
https://pastebin.com/ZVBrCAuM
They look the same to me...
Click to expand...
Click to collapse
They look identical to me as well. Um try apt install xorg xubuntu-desktop lightdm-gtk-greeter.
then reboot it should automatically enable it with systemd while installing
Error 404
The links to the downloads are no longer working.
sk1tch said:
They look identical to me as well. Um try apt install xorg xubuntu-desktop lightdm-gtk-greeter.
then reboot it should automatically enable it with systemd while installing
Click to expand...
Click to collapse
I'll give that a shot. Sounds like solid advice. Probably not until Thursday or Saturday. Busy week kids back to school
a such...
humannequin777 said:
The links to the downloads are no longer working.
Click to expand...
Click to collapse
I fixed the links but the rootfs.tar.bz2 is down as I am uploading a preinstalled image archive with the XFCE4 DE w/ onscreen keyboard, still ironing out Bluetooth made good progress so hopefully I will have that finished soon
Cameras are not included in the kernel. I did not check their performance in this kernel.
Linux Inside... Nice. Well I found a few minutes and got this far.... https://imgur.com/a/VuDEN Xauthority issue? I'll check into it later. I assume suspend doesn't work? I tried once but didn't want to crash it right now. also changed scroll bar width... easier to tap. Border width is next.
Scroll bar width:
Open the .gtkrc-2.0 file, add the following to a new line starting at the bottom of the file:
Code:
style "myscrollbar"
{
GtkScrollbar::slider-width=XX
}
class "GtkScrollbar" style "myscrollbar"
How's the performance ?
Can I use it as a desktop?
Yes indeed it does work as a desktop I got screen rotation down to two three command scripts with desktop widgets. Most things work as of now Bluetooth sucks no matter what I do but, touchscreen works fine WiFi works fine no Cameras yet Sound only through headset. Hardware acceleration works at anywhere from 800 FPS - 2000 FPS. Videos like on YouTube stutter a little if you are doing other things while watching. Swipe gestures work in Chromium browser only. (Still working on installing multifunction swipe gestures) Your best bet would be to buy one of those $11 Micro-B USB wired tablet keyboards or just use the Onboard keyboard if its already in a rugged case or whatever. Those two green arrows at the top of the desktop are my rotate widgets
andyroidking said:
Linux Inside... Nice. Well I found a few minutes and got this far.... https://imgur.com/a/VuDEN Xauthority issue? I'll check into it later. I assume suspend doesn't work? I tried once but didn't want to crash it right now. also changed scroll bar width... easier to tap. Border width is next.
Scroll bar width:
Open the .gtkrc-2.0 file, add the following to a new line starting at the bottom of the file:
Click to expand...
Click to collapse
Yes there is an .Xauthority error when I flashed it as well that was why I said it's difficult to make a working install and that it was easier to install on device but either try chown ubuntu:ubuntu /home/ubuntu as root and it may fix your issue or you have to create a new user
Vartom said:
Cameras are not included in the kernel. I did not check their performance in this kernel.
Click to expand...
Click to collapse
I added the configs for the camera to my custom config to no avail... I dont have a headset jack debug cable so I can't see what going on during boot
sk1tch said:
I added the configs for the camera to my custom config to no avail... I dont have a headset jack debug cable so I can't see what going on during boot
Click to expand...
Click to collapse
Porting the cameras was not 100% complete. Therefore, simply adding lines to the config is not enough.
---------- Post added at 02:14 PM ---------- Previous post was at 02:08 PM ----------
Porting the cameras was not 100% complete. Therefore, simply adding lines to the config is not enough.
For bluetooth work, you need to download the corresponding firmware.
with some similar string
exec /usr/sbin/brcm_patchram_plus --enable_hci --use_baudrate_for_download --scopcm=0,2,0,0,0,0,0,0,0,0 --baudrate 3000000 --patchram /lib/firmware/bcm4324.hcd --no2bytes --enable_lpm --tosleep=50000 /dev/ttyTHS2
this can be added to the nvwifibt.conf config file.
Vartom said:
Porting the cameras was not 100% complete. Therefore, simply adding lines to the config is not enough.
---------- Post added at 02:14 PM ---------- Previous post was at 02:08 PM ----------
Porting the cameras was not 100% complete. Therefore, simply adding lines to the config is not enough.
For bluetooth work, you need to download the corresponding firmware.
with some similar string
exec /usr/sbin/brcm_patchram_plus --enable_hci --use_baudrate_for_download --scopcm=0,2,0,0,0,0,0,0,0,0 --baudrate 3000000 --patchram /lib/firmware/bcm4324.hcd --no2bytes --enable_lpm --tosleep=50000 /dev/ttyTHS2
this can be added to the nvwifibt.conf config file.
Click to expand...
Click to collapse
So just add this too the sbin config file??
sk1tch said:
So just add this too the sbin config file??
Click to expand...
Click to collapse
brcm_patchram_plus this package was not found. Add it to the fast failed.

WiFi monitor mode

OK, I don't think this thread will get any attention, but I want to document it anyway. All this should work on other devices with qcom WiFi drivers.
TL;DR:
Grab iwpriv binary somewhere (i've got my here: https://github.com/kriswebdev/android_wireless_tools/tree/master/bin)
adb push iwpriv /data/local/tmp/
adb shell su -c chmod +x /data/local/tmp/iwpriv
Code:
#!/system/bin/sh
ip link set wlan0 down
sleep 1
echo 4 > /sys/module/wlan/parameters/con_mode
sleep 2
ip link set wlan0 up
/data/local/tmp/iwpriv wlan0 monitor 1
/data/local/tmp/iwpriv wlan0 MonitorModeConf 9 40 1 111 0
And enjoy your airodump output
NO PACKET INJECTION! (stubbed out in driver, removed previously?)
If you don't receive any packets, issue "/data/local/tmp/iwpriv wlan0 monitor 1" again.
How does this all work?
Some time ago I discovered these strings in wlan_hal_msg.h: (they appeared in google):
Code:
...
/* Monitor Mode */
WLAN_HAL_ENABLE_MONITOR_MODE_REQ = 302,
WLAN_HAL_ENABLE_MONITOR_MODE_RSP = 303,
WLAN_HAL_DISABLE_MONITOR_MODE_REQ = 304,
WLAN_HAL_DISABLE_MONITOR_MODE_RSP = 305,
...
Then I unscrambled some indirections:
WLAN_HAL_ENABLE_MONITOR_MODE_REQ to WDI_MON_START_REQ in WDI_2_HAL_REQ_TYPE
WDI_MON_START_REQ sent in WDI_ProcessMonStartReq <— actual message sents here!
Called from "Request Processing Array" in function WDI_MonStartReq
Wrapped in WDA_ProcessMonStartReq, which is called in WDA_McProcessMsg by message WDA_MON_START_REQ
Which message is posted by wlan_hdd_mon_postMsg if (MON_MODE_START == pMonCtx->state)
Which is called in __iw_setint_getnone with sub_cmd = WE_SET_MONITOR_STATE
Which is set by iw_priv cmd "monitor"
And then figured out that driver works in different modes:
(vos_types.h)
Code:
/// Concurrency role. These are generic IDs that identify the various roles
/// in the software system.
typedef enum
{ /*ON linux maintain 1-1 corespondence with device_mode_t in hdd*/
VOS_STA_MODE=0,
VOS_STA_SAP_MODE=1, //to support softAp mode . This is misleading. It means AP MODE only.
//The constant name has historical reason
VOS_P2P_CLIENT_MODE,
VOS_P2P_GO_MODE,
VOS_MONITOR_MODE,
VOS_FTM_MODE = 5,
VOS_IBSS_MODE,
VOS_P2P_DEVICE,
VOS_MAX_NO_OF_MODE
} tVOS_CON_MODE;
Mode can be changed by "con_mode" module parameter.
(idk why they reinvented the wheel and not used the default "iw dev wlan0 set mode monitor")
Combined all this and... got a kernel panic. You may get it too. Main reasons are:
- You have not disabled WiFi before changing the mode
- The sleep time after disabling interface is short
- Driver is old. Yes, you can get crashes on some kernels. If you are, flash AGNi.
After successful switching you'll get a working monitor (check this with tcpdump -i wlan0), but with ethernet packets instead of radiotap, so airodump will not work. Luckily, this giant crappy driver can work with radiotap, but you need to configure it. This is done by another iwpriv call:
MonitorModeConf: <channel> <bandwidth> <crccheck> <filter> <conversion_required>
Filter: 3 decimal numbers
least to most: management packets, control packets, data packets
Conversion: 1 - ARPHRD_ETHER (802.3 packets), 0 - ARPHRD_IEEE80211_RADIOTAP (802.11 packets)
(again don't know why they implemented these calls instead of default ioctl's for channel switch, etc. This makes airodump unable to switch channels)
As a result you may get something like on a screenshot
Happy sniffing!
Who said it will not be an interesting , I my self appreciated your effort to bring this up. Kudos to you friend.
Crayvolt said:
Who said it will not be an interesting , I my self appreciated your effort to bring this up. Kudos to you friend.
Click to expand...
Click to collapse
Thanks. I wanted to say that kenzo development is almost dead, we've lost official LOS and keep losing devs.... So it's most likely we'll not see working packet injection (cuz devs who know driver's internals better than me are left), and, possibly, a wrapper library implementing the default ioctl's (like channel switch) used in most programs.
i understand, hopefully we can have new devs. who will continue
This is a perfect news. At least if this device became obsolete, it should still be useful to be a portable linux pen test device, if possible. Anyway, awesome job mate. Very much appreciated
Sent from my Note 3 using XDA Labs
you dont have permission to capture on that device sokect operation not permitted
aldhi said:
This is a perfect news. At least if this device became obsolete, it should still be useful to be a portable linux pen test device, if possible. Anyway, awesome job mate. Very much appreciated
Sent from my Note 3 using XDA Labs
Click to expand...
Click to collapse
Thank you. I forgot to say that monitor mode requiers support from firmware (there's some code in driver that checks for it). Kenzo guys are lucky because we have it enabled . There's also sta+monitor mode (so you can have working wifi connection while sniffing), but it also requiers support from firmware and kenzo's fw compiled without it. I forgot how to enable it, but i think you need to issue "iwpriv wlan0 monitor 1" in default con_mode and check dmesg - there will be a string that says it's not supported (if it is not).
And if someone is interested, our wireless chip is wcn3680b, simmilar one (or same, idk) can be found in nexus 4 (mako)
cerg2010cerg2010 said:
Thank you. I forgot to say that monitor mode requiers support from firmware (there's some code in driver that checks for it). Kenzo guys are lucky because we have it enabled . There's also sta+monitor mode (so you can have working wifi connection while sniffing), but it also requiers support from firmware and kenzo's fw compiled without it. I forgot how to enable it, but i think you need to issue "iwpriv wlan0 monitor 1" in default con_mode and check dmesg - there will be a string that says it's not supported (if it is not).
And if someone is interested, our wireless chip is wcn3680b, simmilar one (or same, idk) can be found in nexus 4 (mako)
Click to expand...
Click to collapse
Can you ziping code and flashable instal on twrp?
Khimin said:
Can you ziping code and flashable instal on twrp?
Click to expand...
Click to collapse
There's nothing to install except iwpriv binary... But OK, I'll try to create a magisk module with enable/disable scripts.
cerg2010cerg2010 said:
There's nothing to install except iwpriv binary... But OK, I'll try to create a magisk module with enable/disable scripts.
Click to expand...
Click to collapse
Thx, im waiting
Khimin said:
Thx, im waiting
Click to expand...
Click to collapse
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
cerg2010cerg2010 said:
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
Click to expand...
Click to collapse
Thx dude
thank you you are awsome +thumbsup
---------- Post added at 08:49 AM ---------- Previous post was at 08:03 AM ----------
filter expresion syntax error using command tcpdump -i wlan0
help please
---------- Post added at 09:05 AM ---------- Previous post was at 08:49 AM ----------
can you help me?
cerg2010cerg2010 said:
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
Click to expand...
Click to collapse
Is it safe to flash with magisk in note 5 pro ?
cerg2010cerg2010 said:
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
Click to expand...
Click to collapse
@cerg2010 Tried to flash with magisk in note 5 pro. System apps are not working after disabling the module from magisk it returned to normal. Any solution for this ?
Perinban Parameshwaran said:
@cerg2010 Tried to flash with magisk in note 5 pro. System apps are not working after disabling the module from magisk it returned to normal. Any solution for this ?
Click to expand...
Click to collapse
Please understand that I don't have any "note 5 pro". You can send me logcat and I can try to identify the problem or ask your ROM developer to take a look (if it's not MIUI lol). Anyway, that's just scripts, so you can copy them to /data/local/tmp or /system/bin manually.
Lol I'm a n00b what does this do? Is this a packet sniffer or something?
Op_Flashpoint said:
Lol I'm a n00b what does this do? Is this a packet sniffer or something?
Click to expand...
Click to collapse
Sort of. It makes your sniffer to work - you will be able to capture raw WiFi packets from your device without any dongles.
plis whats rom u use ¿
cerg2010cerg2010 said:
Ok, I made it quickly!
Source: https://github.com/cerg2010cerg2010/qcmon
There's 2 scripts, run them from shell:
monen - enables monitor mode (you can specify configuration in the parameters, see system/xbin/monen)
mondis - disables monitor mode. You can use your wifi connection again.
Click to expand...
Click to collapse
thank you man, monitor mode now working on my poco F1, using its module magisk + aircrack-ng

Need help building a SM-T555 (gt510lte) LineageOS ROM

Dear all,
I am trying to build a LineageOS 17.1 ROM for the Galaxy Tab A 9.7 (gt510lte) SM-T555.
Using the repos of @retiredtab and aala27's repos I managed to build a config that resulted in a buildable LineageOS that I could install and that shows the Lineage boot animation but crashes/reboots after a while.
Fyi, my forks for the GT510LTE (SM-T555) I currently maintain here: https://github.com/blizzard4591?tab=repositories
Questions to @retiredtab:
- What is your current local_manifest/roomservice? I could not locate this in your Github and used one posted by aala27 in a different thread, but it might be "off".
- Did you extract the required proprietary files by hand from stock ROMs or is there an automated way? I have "SM-T555_1_20190103084053_we4a668guy_fac" with T555XXU1CQHA/T555XXU1CRG1 that I know works on my T555.
- The repo "vendor-samsung-gt5note10wifi" in your Github only contains a branch for Lineage 18.1, is that intentional?
Sadly, I am a total noob in the area of building Lineage, so I might miss some obvious things!
I am willing to put in some time and effort to make this work, but I just do not know enough to do it efficiently.
If you can spare the time for a few hints, I believe I can make some progress!
Cheers
Update 1:
My image is working, i.e. it boots and gives a stable system.
Problem: Bluetooth does not work and crashes a lot, I have no clue what the problem is.
Problem: Audio is not working, I see a lot of "audio_route: unable to find path 'low-latency-playback speaker'
The system settings dialog is missing the "Android Patchlevel" information - is this expected? I am building using "repo sync, breakfast gt510lte, brunch gt510lte" - is this correct? I am just an idiot.
Update 2:
Bluetooth and Audio are working, SELinux is not, so permissive it is for now.
Builds available on request.
RandomAndroidTinkerer said:
- What is your current local_manifest/roomservice? I could not locate this in your Github and used one posted by aala27 in a different thread, but it might be "off".
Click to expand...
Click to collapse
It was there before, but I think after the switch to Xenforo on Dec 1, 2020, it might have gotten lost. It's there now and what I use to generate 17.1 for T550.
RandomAndroidTinkerer said:
- Did you extract the required proprietary files by hand from stock ROMs or is there an automated way? I have "SM-T555_1_20190103084053_we4a668guy_fac" with T555XXU1CQHA/T555XXU1CRG1 that I know works on my T555.
Click to expand...
Click to collapse
No, I just used what's in at https://github.com/Galaxy-MSM8916. Having said that, I found that for the SM-T350, it was missing some very important files so I grabbed those from stock.
RandomAndroidTinkerer said:
- The repo "vendor-samsung-gt5note10wifi" in your Github only contains a branch for Lineage 18.1, is that intentional?
Click to expand...
Click to collapse
gt5note10wifi is for the P550, not T550. You shouldn't be using that as the *.mk files won't copy the correct blobs for your device.
RandomAndroidTinkerer said:
Update 1:
My image is working, i.e. it boots and gives a stable system.
Problem: Bluetooth does not work and crashes a lot, I have no clue what the problem is.
The system settings dialog is missing the "Android Patchlevel" information - is this expected? I am building using "repo sync, breakfast gt510lte, brunch gt510lte" - is this correct?
Click to expand...
Click to collapse
Congrats on getting a bootable stable system. For bluetooth, you are probably missing a bluetooth blob. Look in your adb logcat (see below) for red messages that are bluetooth related. It might say something like "missing libbt-nv.so".
Missing Android Patchlevel means you don't have a property declared in your *.mk file. Right now, I can' t remember what it is, but I will look for it.
Instead of brunch, I do
Code:
TARGET_BUILD_TYPE=debug TARGET_BUILD_VARIANT=eng make -j2 bacon
This makes an engineering build that starts adb logcat immediately. That way, you can see all the messages as soon as the device boots. It helps a lot in troubleshooting stuck at boot animation problems.
The -j2 indicates how many CPU cores I have. If you have more, say 4, then -j4.
Once you solved all your problems and if you want to share your ROM, then do a brunch which is userdebug by default (for me, I just do a make -j2 bacon).
For adb logcat, I find
Code:
adb logcat -C | nl
helpful. It color codes the log so anything in red (error) needs attention. Nl numbers the log so it's easier to remember where you error messages are vs a timestamp.
For the Android patch level, show me a screenshot so I exactly what you mean.
RandomAndroidTinkerer said:
Problem: Audio is not working, I see a lot of "audio_route: unable to find path 'low-latency-playback speaker'
Click to expand...
Click to collapse
Try not to edit your initial post because I didnt' see the audio problem. Just make a new one so that I see new responses.
The audio problem is likely you don't have the correct definition in mixer_paths.xml. aala27 had the exact same problem. It's likely this
[UNOFFICIAL][ROM] LineageOS 17.1 for Galaxy Tab A 9.7[SM-P550]
NOTE: There is no S-pen support. If you need S-pen, DO NOT USE THIS ROM. I am not responsible for lost data, identity theft, lost money, security vulnerabilities, bricked devices or any other hardware or software malfunctions that comes as a...
forum.xda-developers.com
For SM-T550, the line inside mixer_paths.xml looks like
Code:
<path name="low-latency-playback speaker">
<ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia5" value="1" />
</path>
You can see above, I have a path name that matches 'low-latency-playback speaker' exactly. Your mixer_paths.xml probably doesn't have this defined so you get no audio.
BTW, all the info I'm giving wasn't available via search engine when I first started. It's extremely frustrating to troubleshoot when I first started. Even now, I have problems with audio over bluetooth and stuttering audio over bluetooth for two platforms that both worked perfectly on the previous last major revision on Android.
Thank you so much; I know how hard this kind of initial research is!
Regarding the audio issues:
I tried that already, as you can see in https://github.com/blizzard4591/android_device_samsung_gt510lte/tree/lineage-17.1/configs/audio I used the config files from my stock image (I had assumed they would work, but they do not - why?) and then added said speaker there, but no luck, it still has the same error message. What am I misunderstanding?
Regarding Bluetooth:
Thanks to you tip, I added the libbt-nv.so module, but this did not change the situation.
I am now building a debug/eng build, but in the log I still see no messages of missing drivers/firmware/SOs. You can find my Logcat attached - could you take a look and tell me whether I am missing something? Should there be messages?
How did you find out that you were missing BLOBs?
RandomAndroidTinkerer said:
I tried that already, as you can see in https://github.com/blizzard4591/android_device_samsung_gt510lte/tree/lineage-17.1/configs/audio I used the config files from my stock image (I had assumed they would work, but they do not - why?) and then added said speaker there, but no luck, it still has the same error message. What am I misunderstanding?
Click to expand...
Click to collapse
You need to check the actual rom image to see if the mixer_paths.xml is correct. Do
Code:
adb pull /system/vendor/etc/mixer_paths.xml
and compare if the two are the same.
RandomAndroidTinkerer said:
Regarding Bluetooth:
Thanks to you tip, I added the libbt-nv.so module, but this did not change the situation.
Click to expand...
Click to collapse
I only guessed at what might be missing. The logs will tell who what's missing.
RandomAndroidTinkerer said:
You can find my Logcat attached - could you take a look and tell me whether I am missing something?
Click to expand...
Click to collapse
I see no log attached. Zip the log and then attach it.
You need to check the actual rom image to see if the mixer_paths.xml is correct. Do
Code:
adb pull /system/vendor/etc/mixer_paths.xml
and compare if the two are the same.
Click to expand...
Click to collapse
Yes, the file was incorrect, I guess the path
Code:
$(LOCAL_PATH)/configs/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml
did not resolve to where it should, I changed that, once the build is done I will check.
I see no log attached. Zip the log and then attach it.
Click to expand...
Click to collapse
Interesting, I can see it, but I attached it as ZIP!
The log you attached is missing all the bootup sequence. You need to start adb logcat as soon as the device boots.
Audio
=====
Your mixer_paths.xml should be in /vendor/etc. /system/vendor is usually a link to /vendor. From my P550.
Code:
$ adb shell
gt5note10wifi:/ # ls -al vendor
lrw-r--r-- 1 root root 14 2008-12-31 17:00 vendor -> /system/vendor
If you are using the 17.1 msm8916-common repo, see lines 80 to 83
android_device_samsung_msm8916-common/msm8916.mk at lineage-17.1 · Galaxy-MSM8916/android_device_samsung_msm8916-common
Common MSM8916 tree for Samsung devices. Contribute to Galaxy-MSM8916/android_device_samsung_msm8916-common development by creating an account on GitHub.
github.com
may be overwriting your stock mixer_paths. I would comment out lines 80 to 83 as a test.
Bluetooth
=========
You have tons of errors with your bluetooth. If you view your logcat in color, these are all in red.
Code:
04-01 13:19:22.910 1212 1212 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-01 13:19:22.911 1212 1212 F DEBUG : LineageOS Version: '17.1-20210401-UNOFFICIAL-gt510lte'
04-01 13:19:22.911 1212 1212 F DEBUG : Build fingerprint: 'samsung/gt510ltexx/gt510lte:7.1.1/NMF26X/T555XXU1CQI8:user/release-keys'
04-01 13:19:22.911 1212 1212 F DEBUG : Revision: '8'
04-01 13:19:22.911 1212 1212 F DEBUG : ABI: 'arm'
04-01 13:19:22.912 1212 1212 F DEBUG : Timestamp: 2021-04-01 13:19:22+0200
04-01 13:19:22.912 1212 1212 F DEBUG : pid: 866, tid: 1203, name: bt_hci_thread >>> com.android.bluetooth <<<
04-01 13:19:22.912 1212 1212 F DEBUG : uid: 1002
04-01 13:19:22.912 1212 1212 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
04-01 13:19:22.912 1212 1212 F DEBUG : Abort message: '[0401/131922.772914:FATAL:hci_layer_android.cc(119)] Check failed: btHci != nullptr.
When it crashes hard like above, there's no way bluetooth will work.
Again, if you are using the 17.1 msm8916-common repo, it's missing the bluetooth entries for manifest.xml and msm8916.mk.
For the manifest.xml you need something like
Code:
<hal format="hidl">
<name>android.hardware.bluetooth</name>
<transport arch="32+64">passthrough</transport>
<version>1.0</version>
<interface>
<name>IBluetoothHci</name>
<instance>default</instance>
</interface>
</hal>
For msm8916.mk, you need
Code:
# Bluetooth
PRODUCT_PACKAGES += \
[email protected]
[Sorry for the delay]
Okay, I think I ironed out most of the issues.
What is confirmed working:
- WLAN
- Bluetooth
- Audio
- GPS (though the initial fix took 30min+...)
What does not work
- SELinux
WLAN:
I see a messages like
wificond: No Offload Service available
wificond: Offload HAL not supported
wificond: Failed to get NL80211_ATTR_EXT_FEATURES
Click to expand...
Click to collapse
Is that an issue? I don't know...
I see a lot of messages from the PowerHAL:
QTI PowerHAL: Failed to acquire lock.
Click to expand...
Click to collapse
I already tried https://review.statixos.com/c/android_device_essential_mata/+/1626/1 but that apparently was not enough.
SELInux:
I added the policies by https://github.com/VirsysElectron/android_device_samsung_gt510wifi and made them work, but it seems they are not really working.
Example:
I/init ( 233): type=1400 audit(0.0:4): avc: denied { mounton } for path="/firmware-modem" dev="mmcblk0p25" ino=27 scontext=u:r:init:s0 tcontext=ubject_r:tmp_root_mount_file:s0 tclass=dir permissive=1
I/e2fsck ( 253): type=1400 audit(0.0:5): avc: denied { read } for name="mmcblk0p13" dev="tmpfs" ino=7580 scontext=u:r:fsck:s0 tcontext=ubject_r:efs_block_device:s0 tclass=blk_file permissive=1
I/e2fsck ( 253): type=1400 audit(0.0:6): avc: denied { open } for path="/dev/block/mmcblk0p13" dev="tmpfs" ino=7580 scontext=u:r:fsck:s0 tcontext=ubject_r:efs_block_device:s0 tclass=blk_file permissive=1
I/e2fsck ( 253): type=1400 audit(0.0:7): avc: denied { write } for name="mmcblk0p13" dev="tmpfs" ino=7580 scontext=u:r:fsck:s0 tcontext=ubject_r:efs_block_device:s0 tclass=blk_file permissive=1
I/e2fsck ( 253): type=1400 audit(0.0:8): avc: denied { ioctl } for path="/dev/block/mmcblk0p13" dev="tmpfs" ino=7580 ioctlcmd=127c scontext=u:r:fsck:s0 tcontext=ubject_r:efs_block_device:s0 tclass=blk_file permissive=1
I/init ( 1): type=1400 audit(0.0:9): avc: denied { relabelfrom } for name="rmt_storage" dev="debugfs" ino=6571 scontext=u:r:init:s0 tcontext=ubject_r:debugfs_rmt:s0 tclass=dir permissive=1
I/init ( 1): type=1400 audit(0.0:10): avc: denied { relabelfrom } for name="rmts" dev="debugfs" ino=6574 scontext=u:r:init:s0 tcontext=ubject_r:debugfs_rmt:s0 tclass=file permissive=1
Click to expand...
Click to collapse
I declare
/firmware-modem(/.*)? ubject_r:tmp_root_mount_file:s0
Click to expand...
Click to collapse
in device/samsung/gt510lte/sepolicy/file_contexts, but it is not applied:
dr-xr-x--- 3 system drmrpc ubject_r:vfat:s0 16384 1970-01-01 01:00 firmware-modem
Click to expand...
Click to collapse
And I really do not know enough about SELinux to effectively engage this.
@retiredtab: How did you solve SELinux in your builds for the T550?
RandomAndroidTinkerer said:
- GPS (though the initial fix took 30min+...)
Click to expand...
Click to collapse
That seems like a really long time. Did you go outside to do the GPS reading? Sometimes it makes a difference if you are in or outside. You should do an adb logcat while testing out GPS. It might show some clues as to why it takes so long.
With the P550 and using GPStest from
GPSTest | F-Droid - Free and Open Source Android App Repository
An app for testing GPS and GNSS capabilities of a device
f-droid.org
I get a lock in 48 seconds by the window.
RandomAndroidTinkerer said:
What does not work
- SELinux
Click to expand...
Click to collapse
You need to read posts 202 and beyond at
[ROM][SM-T350][UNOFFICIAL][crDroidAndroid-10.0][v6.17][ANDROID 10] Galaxy Tab A 8.0
Finally this thread is back :)
forum.xda-developers.com
I list the tools that you can use to help build selinux policies. As I wrote in the other thread, do you blindly trust the policies generated by the tools? I'm not an expert so I don't know and it's highly dependent on each hardware device.
I built an image with selinux enforcing as a test sometime in March and while it works, I'm not confident and ready to release that. In addition, each device will require it's own set of selinux policies. What might work for the P550 may not work on the T555 due to differences in hardware (LTE, S-pen).
Building the correct selinux policies is an iterative exercise. Wipe everything on your device, format data. Install the ROM only. You grant the initial batch of policies, reboot, look at logs, grant some more and repeat until they are gone. You should do this with the ROM only. Don't load gapps, games, apps, etc and then run selinux.
RandomAndroidTinkerer said:
Is that an issue? I don't know...
Click to expand...
Click to collapse
I see them in my own builds and so far there's been no problem.
RandomAndroidTinkerer said:
I see a lot of messages from the PowerHAL:
Click to expand...
Click to collapse
Same as above.
RandomAndroidTinkerer said:
I already tried https://review.statixos.com/c/android_device_essential_mata/+/1626/1 but that apparently was not enough.
Click to expand...
Click to collapse
You will find through experience and more building that what works for one platform may not work for another. It's highly dependent on the device and code specific to that device.
RandomAndroidTinkerer said:
SELInux:
I added the policies by https://github.com/VirsysElectron/android_device_samsung_gt510wifi and made them work, but it seems they are not really working.
Click to expand...
Click to collapse
In order to boot selinux enforcing, you need to remove line 140 from
android_device_samsung_msm8916-common/BoardConfigCommon.mk at lineage-17.1 · blizzard4591/android_device_samsung_msm8916-common
Common MSM8916 tree for Samsung devices. Contribute to blizzard4591/android_device_samsung_msm8916-common development by creating an account on GitHub.
github.com
Also, I'm not an expert in selinux, but I don't know why you would permit untrusted_app.te, untrusted_app_25.te and untrusted_app_27.te?
retiredtab said:
That seems like a really long time. Did you go outside to do the GPS reading? Sometimes it makes a difference if you are in or outside. You should do an adb logcat while testing out GPS. It might show some clues as to why it takes so long.
With the P550 and using GPStest from
GPSTest | F-Droid - Free and Open Source Android App Repository
An app for testing GPS and GNSS capabilities of a device
f-droid.org
I get a lock in 48 seconds by the window.
Click to expand...
Click to collapse
I think it was just the initial, first fix, and yes, I was not in the best position. Now that it knows where and when it is, a new fix even inside takes a couple of seconds. I used the same tool, also from F-Droid
retiredtab said:
You need to read posts 202 and beyond at
[ROM][SM-T350][UNOFFICIAL][crDroidAndroid-10.0][v6.17][ANDROID 10] Galaxy Tab A 8.0
Finally this thread is back :)
forum.xda-developers.com
I list the tools that you can use to help build selinux policies. As I wrote in the other thread, do you blindly trust the policies generated by the tools? I'm not an expert so I don't know and it's highly dependent on each hardware device.
I built an image with selinux enforcing as a test sometime in March and while it works, I'm not confident and ready to release that. In addition, each device will require it's own set of selinux policies. What might work for the P550 may not work on the T555 due to differences in hardware (LTE, S-pen).
Building the correct selinux policies is an iterative exercise. Wipe everything on your device, format data. Install the ROM only. You grant the initial batch of policies, reboot, look at logs, grant some more and repeat until they are gone. You should do this with the ROM only. Don't load gapps, games, apps, etc and then run selinux.
Click to expand...
Click to collapse
I had to load Magisk and LiveBoot to even get the early-boot log. Using ADB logcat I was unable to get a log from "system start" - the adb process would hang and wait for the device to be fully booted. Even afterwards, no messages from boot. I had USB debugging enabled, default USB conf "file transfer", etc.
Any ideas what I am doing wrong?
retiredtab said:
I see them in my own builds and so far there's been no problem.
Same as above.
You will find through experience and more building that what works for one platform may not work for another. It's highly dependent on the device and code specific to that device.
In order to boot selinux enforcing, you need to remove line 140 from
android_device_samsung_msm8916-common/BoardConfigCommon.mk at lineage-17.1 · blizzard4591/android_device_samsung_msm8916-common
Common MSM8916 tree for Samsung devices. Contribute to blizzard4591/android_device_samsung_msm8916-common development by creating an account on GitHub.
github.com
Also, I'm not an expert in selinux, but I don't know why you would permit untrusted_app.te, untrusted_app_25.te and untrusted_app_27.te?
Click to expand...
Click to collapse
Good catch - I simply copied the policies from VirsysElectron to start, but since they do not really work, I don't think I will continue much on this path. I share your opinion on old drivers and the greater picture. I had hoped the old policies would work for most of the basics, but they do not.
RandomAndroidTinkerer said:
I had to load Magisk and LiveBoot to even get the early-boot log.
Click to expand...
Click to collapse
For an eng build, there's no need for Magisk and LiveBoot to get an adb logcat. Part of the eng parameters is that it enables adb right away.
For developing selinux policies, you leave it in permissive first, develop the policies as I stated and then when you think you are done, then enable selinux enforcing. More at
Validating SELinux | Android Open Source Project
source.android.com
RandomAndroidTinkerer said:
Good catch - I simply copied the policies from VirsysElectron to start,
Click to expand...
Click to collapse
And that's the problem right there. It's so easy to kang or copy someone else's work today (legal or illegal) that some don't bother to check if it's right in the first place. I'm not saying VirsysElectron code is wrong, he may have a good reason why those files are generated.
I also fall into that boat. I use the public open source repos, but there's no way that I have the expertise or time to check everything in the repo for errors, security vulnerabilities, code correctness, etc.
retiredtab said:
For an eng build, there's no need for Magisk and LiveBoot to get an adb logcat. Part of the eng parameters is that it enables adb right away.
Click to expand...
Click to collapse
No, that is the problem - it did not. I am using eng-builds and, as I described, adb did not work, and I have no clue why.
retiredtab said:
For developing selinux policies, you leave it in permissive first, develop the policies as I stated and then when you think you are done, then enable selinux enforcing. More at
Validating SELinux | Android Open Source Project
source.android.com
Click to expand...
Click to collapse
I read that and some other introductions to SELinux, I get the general idea and concept - but as shown in my example, the labeling rule
/firmware-modem(/.*)? u: object_r :tmp_root_mount_file:s0
Click to expand...
Click to collapse
is not applied, I did not find anything that would tell me why or how to debug such an issue.
retiredtab said:
And that's the problem right there. It's so easy to kang or copy someone else's work today (legal or illegal) that some don't bother to check if it's right in the first place. I'm not saying VirsysElectron code is wrong, he may have a good reason why those files are generated.
Click to expand...
Click to collapse
I started writing my own policies from scratch (its somewhere in the repo history), but I first wanted to get my bearings, see how things work - ideally from a known, working starting point - which was a good idea, as otherwise the issue mentioned above regarding the labeling rule that does not get applied would have cost me much more sanity than just questioning someone else's code
Hello RandomAndroidTinkerer
I also own a T555, currently with TWRP 3.3.1 and LineageOS 16.0 from Virsys( 20191231). It's very stable, except the SIM didn't work.
Am of course interested in your image and would like to test it out. Which TWRP version do you use ?
Friendly greetings
Schaagi
Hallo RandomAndroidTinkerer,
thank you very much for your work and of course thanks for retiredtab and the others for their work This is my first post here and I you are the only one I found who builded an actual image. I'm very interested in testing your build. Could you send me an link, please? Thank you and bye bye.
Hi, I applied for an uploader account at AndroidFileHost, once this is granted I will upload a current build.
Current engineering build is up: https://www.androidfilehost.com/?w=files&flid=324776
I am using TWRP 3.1.0 from here.
Be kind on the feedback
RandomAndroidTinkerer said:
Current engineering build is up: https://www.androidfilehost.com/?w=files&flid=324776
I am using TWRP 3.1.0 from here.
Click to expand...
Click to collapse
For fun, I tried it on the P550 and not surprisingly, it doesn't boot. It doesn't even out adb logcat.
LineageOS also builds it's own recovery.img as another recovery option to TWRP. It's not as user friendly and lacks some features, but it's functional.
Thank you so much for your image - I am very excited to test it. Feedback follows in the next days.

Categories

Resources