Guide logcat, links and some tools. 17-1-13 - Android

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I did a small search on how to logcat and fix the problems found. I thought wy dont put this in a thread sow others can find some good links and info on 1 place. I mainly put in the links and info i found using the search option: ¨logcat¨
Yes use the search option first before you go and ask things.
This thread/post is alsow just great for my self to haha. I´ll post it in my main thread and be able to find this good stuff fast.
Here go´s my small guide i put to gether reading on XDA. This will go about logcat bootloop and logcat on device.
Sow i almost got my cm9 rom working.. But still get a bootloop.:crying:
I start the command when the bootanimation starts. Ore it wont work. ADB needs to be started on the device.(To be clear on this i start terminal in Linux.) This is the command i use to start logcat:
adb logcat *:E, *:W > errandwarn.txt
For me the file is made in the home dir.:good:
-To stop running a logcat you can use the option: control + C stops adb log.
Logcat on you´re device:
This can be usefull if you have Android running.
Download terminal if you dont have one.
type this in your terminal emulator :
adb logcat -v long > name of problem.txt
If you managed to get the logcat you could google the errors in it. Ore post on XDA if you cant find all the answars.. Probably a post about logcat might be best to ask!?
I made a new thread my self here:http://forum.xda-developers.com/showthread.php?p=36808921#post36808921
I wanted to see if i get respons this way and hopefully fix my problems.
Guides:
http://forum.xda-developers.com/showthread.php?t=2143254
http://forum.xda-developers.com/showthread.php?p=42139279
[GUIDE] Installing ADB/SDK and How to make a logcat: http://forum.xda-developers.com/showthread.php?t=1616059
guide How To Logcat: http://forum.xda-developers.com/showthread.php?t=1726238
guide: http://forum.xda-developers.com/showthread.php?t=1123129
Guide and tool. Logcat on pc ore device: http://forum.xda-developers.com/showthread.php?t=1987232
Logcat enable/disable Application: http://forum.xda-developers.com/showthread.php?t=1355331
[Article]Workaround for grep and Logcat, dmesg, and last_kmsg on Windows: http://forum.xda-developers.com/showthread.php?t=2076377
Tools:
logcat reader. This is for WIndows: http://forum.xda-developers.com/showthread.php?t=1618882
All in One Android Logger. For Windows and Linux: http://forum.xda-developers.com/showthread.php?p=32994107
There should be a lot more nice tools but i did not look into it more for now. Post some links if you like!
If there are any other nice guide and tools to use i really would like to ad them here. Sow please let me know

Some fixes on commen problems.
Space for me.. If posible some info on how to fix some commen problems.
To early to bumb haha
Problem 1 dpi setting:
W/SurfaceFlinger( 1042): ro.sf.lcd_density not defined, using 160 dpi by default.
Fix:
the values =120,140,160,180,200,220,240 for changing
You can use lcddensity.apk (root user) for this.
you must be added this ro.sf.lcd_density=240 in build.prop at the end.
I have this in my device.mk:
PRODUCT_PROPERTY_OVERRIDES += \
ro.product.locale.language=nl \
ro.product.locale.region=NL \
ro.system.hdmi_max_resolution=fullhd \
ro.system.hdmi_active=true \
ro.system.composite_active=true \
persist.sys.composite_resize=3 \
ro.system.component_active=false \
tcc.output.component_mode=0 \
ro.system.hdmi_portable=true \
ro.opengles.version=131072 \
persist.sys.timezone=Europe/Amsterdam \
tcc.hdmi.720p.fixed=0 \
tcc.video.call.enable=0 \
tcc.only.play.mode=1 \
tcc.show.video.fps=0 \
tcc.hwc.disable=0 \
dalvik.vm.dexopt-flags=m=y \
dalvik.vm.dexopt-data-only=1 \
ro.sf.lcd_density=240
Ore you can ad this in buid.prop of you´re already build rom.
Problem 2 write failed:
E/dalvikvm( 1914): Zip inflate: write failed: Bad file number
E/dalvikvm( 1914): Unable to extract+optimize DEX from '/system/framework/services.jar'
E/dalvikvm( 1914): Dex cache directory isn't writable: /data/dalvik-cache
E/dalvikvm( 1914): Dex cache directory isn't writable: /data/dalvik-cache
Fix:
-put:
dalvik.vm.dexopt-data-only=1 in build.prop ore in buildfile: *_device.mk
Look ad PRODUCT_PROPERTY_OVERRIDES += \ of answar 1.
-Wipe dalvik?
I did not see the error again. Im not sure if the reason for this error is 100% fixed.
Link: http://forum.cyanogenmod.org/topic/...t-cm-6-nightly-tests/page__st__-20#entry20228
Problem 3 missing file:
E/Sensors ( 1375): couldn't find 'compass' input device
E/Sensors ( 1375): open error.
E/Sensors ( 1375): AccelSensor: gsenportrait ()
E/Sensors ( 1375): couldn't find 'lightsensor-level' input device
E/Sensors ( 1375): couldn't find 'proximity' input device
W/UsageStats( 1375): Usage stats version changed; dropping
W/PackageManager( 1375): Library not found: /system/framework/com.google.widevine.software.drm.jar
Fix:
-add permission com.google.widevine.software.drm.xml to system/etc/permissions/ Continue to see logcat. Put com.google.widevine.software.drm.jar in framework folder.(com.google.widevine.software.drm.jar needed for gapps?)
I do change this stuf in my make files/device folder. In the file *.device.mk again! Could dump those 2 files in a already build rom and repack i gues.
-flash gapps..?
- I did not have the file com.google.widevine.software.drm.jar in my stock rom.. Strange.
-There seem to be more problems in this problem part but this is what i fixed sow far..

Related

[DEV] Ubuntu Touch (Preview) for Huawei Mediapad

This is a port of Ubuntu Touch (Preview) for Huawei Mediapad tablet (s7-30xx).
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Keep in mind that:
- its experimental;
- not for daily use;
- only for developers;
- dont try install it if you have no skills at least in working with adb;
- you have to do a nandroid before installing;
- dont blame anyone for broken device
How to install (almost everything the same as for other cm9-10.1 releases):
1. Install twrp/cwm recovery.
2. Make factory reset.
3. Install the device specific part for Ubutnu.
4. Install the generic Ubuntu part.
5. Install dpi fix.
6. Reboot
7. Open terminal at PC, connect tablet via usb cable to it and enter the following commands:
Code:
adb root
Code:
adb shell
Code:
ubuntu_chroot shell
If you want to see GUI then type:
Code:
ubuntu-session
--- Enjoy the testing! --- (or not enjoy )
Download links:
- Device specific part: http://www.mediafire.com/download.php?71147ctm19763n8.
- Generic Ubuntu part: http://cdimage.ubuntu.com/ubuntu-to...c-demo/quantal-preinstalled-phablet-armhf.zip;
- DPI fix: http://www.mediafire.com/download.php?g8granxnx1q2iqt.
Working:
- Ubuntu Touch OS;
- Touchscreen;
- Display;
- ADB;
- Wifi (with manual config).
Some bad screenshots:
Nice
Is working/not working this or more things don't work?
Question : What Works?
Answer : As this is a Developer Build, dont expect much to work. The items that have been confirmed to work are;
Touchscreen
Sound (over speakers)
Display
Internet Browser
WiFi (No WPS)
Camera (Front and Back)
Video Player
ADB
Screen Brightness Controls
Automatic Brightness
Speech Driven HUD (Yes, it works)
GSM Voice (No APN Settings)
The SideStage Seems to be working
Question : What Does Not Work?
Answer : As this is a developer build, dont expect things to work properly, here are a few things that are not working
3G/4G Data
Audio Out via Headphones
HDMI
Bluetooth
Most Applications and Menus
Charging Indicator
Software Center (Note : You can install simple shell applications via apt-get install … once inside the chroot)
Most applications are placeholders
MMS
CDMA Connections
SIM Storage
Auto Rotation (Or any rotation for that matter)
Random Crashes when swiping
Notifications (All of them are placeholders)
Most Applications that do function are web apps like m.gmail.com.
NFC
Click to expand...
Click to collapse
Screenshots
Wow, this is great too bad there is no networking, otherwise it is pretty neat
One bug is that the keyboard is too big for the screen (see messaging screenshot below).
Here are screenshots via ddms:
OMG!!! Thank you!!! Can we expect more of ubuntu touch for mediapad beyond a developer preview?
Sent from my Huawei MediaPad using xda app-developers app
That was a very quick try, so dont wait too much from it. Besides ubuntu touch in very very early stage of developing.
For keyboard Its needed to adjust ubuntu-session, i havent done it in proper way.
Please don't stop developing for the Mediapad.
By the way i have been able to setup wireless connection (to open access point, cant do it for wpa2)
To do it you need from
Code:
adb shell
perform the following:
Code:
insmod /system/lib/modules/dhd.ko firmware_path=/system/etc/wifi/rtecdc-bcm4329.bin nvram_path=/system/etc/wifi/nvram-bcm4329.txt
Then go to chroot shell via
Code:
ubuntu_chroot shell
and then setup wireless connection from there (in linux way from terminal
For example:
Code:
mount -t proc proc /proc
ifconfig wlan0 up
iwconfig wlan0 mode managed
iwconfig wlan0 essid your_ssid
dhclient wlan0
or something like that.
will this work on s7-931u?
Sent from my GT-I9000 using xda app-developers app
bobo1337 said:
will this work on s7-931u?
Click to expand...
Click to collapse
Not. This build are compatible only for MediaPad S7-30*u/w
Hello, i have tried to get ubuntu touch running, but my screen stays black.
when typing ubuntu-session in adb I see two lines in response:
ubuntu-session
Redirecting output to local session logs
does not look that bad, but my screen stays black all the time
and i can not connect to the device via adb anymore.
any idea what is going on? I used the daily build from 8.03
thx and greetings
Hi
I have tried to flash one more time, here is the log of the first call of ubuntu-session after flash:
Code:
[email protected]:/ # ubuntu_chroot shell
ubuntu_chroot shell
[email protected]:/# ubuntu-session
ubuntu-session
Redirecting output to local session logs
/usr/bin/ubuntu-session: line 21: /home/phablet/.ubuntu-session/logs/ubuntu-sess
ion.log: No such file or directory
Error, do this: mount -t proc proc /proc
grep: /proc/cpuinfo: No such file or directory
Device=
Starting session bus
Started pulseaudio with pid 398 (0 secs start delay)
Started maliit-server with pid 403 (0 secs start delay)
/usr/bin/ubuntu-session: line 122: 403 Segmentation fault ${service[1]} $
arguments &>"$HOME/.ubuntu-session/logs/$binary.log"
Started qml-phone-shell with pid 410 (2 secs start delay)
Got Shell pid = 410
Started chewie_messaging_populate_menu with pid 415 (0 secs start delay)
Started friends-service with pid 420 (0 secs start delay)
/usr/bin/ubuntu-session: line 122: 410 Segmentation fault ${service[1]} $
arguments &>"$HOME/.ubuntu-session/logs/$binary.log"
Started manage-address-books.py with pid 443 (2 secs start delay)
Started ofono-setup with pid 483 (12 secs start delay)
Stopping services...
Stopping pulseaudio
/usr/bin/ubuntu-session: line 38: kill: (398) - No such process
Stopping maliit-server
/usr/bin/ubuntu-session: line 38: kill: (403) - No such process
Stopping qml-phone-shell
/usr/bin/ubuntu-session: line 38: kill: (410) - No such process
Stopping chewie_messaging_populate_menu
Stopping friends-service
Stopping manage-address-books.py
/usr/bin/ubuntu-session: line 38: kill: (443) - No such process
Stopping ofono-setup
Killing session bus...
Session stopped.
[email protected]:/#
Can anybody tell me what went wrong?
Killigrew said:
Hi
I have tried to flash one more time, here is the log of the first call of ubuntu-session after flash:
Code:
[email protected]:/ # ubuntu_chroot shell
ubuntu_chroot shell
[email protected]:/# ubuntu-session
ubuntu-session
Redirecting output to local session logs
/usr/bin/ubuntu-session: line 21: /home/phablet/.ubuntu-session/logs/ubuntu-sess
ion.log: No such file or directory
Error, do this: mount -t proc proc /proc
grep: /proc/cpuinfo: No such file or directory
Device=
Starting session bus
Started pulseaudio with pid 398 (0 secs start delay)
Started maliit-server with pid 403 (0 secs start delay)
/usr/bin/ubuntu-session: line 122: 403 Segmentation fault ${service[1]} $
arguments &>"$HOME/.ubuntu-session/logs/$binary.log"
Started qml-phone-shell with pid 410 (2 secs start delay)
Got Shell pid = 410
Started chewie_messaging_populate_menu with pid 415 (0 secs start delay)
Started friends-service with pid 420 (0 secs start delay)
/usr/bin/ubuntu-session: line 122: 410 Segmentation fault ${service[1]} $
arguments &>"$HOME/.ubuntu-session/logs/$binary.log"
Started manage-address-books.py with pid 443 (2 secs start delay)
Started ofono-setup with pid 483 (12 secs start delay)
Stopping services...
Stopping pulseaudio
/usr/bin/ubuntu-session: line 38: kill: (398) - No such process
Stopping maliit-server
/usr/bin/ubuntu-session: line 38: kill: (403) - No such process
Stopping qml-phone-shell
/usr/bin/ubuntu-session: line 38: kill: (410) - No such process
Stopping chewie_messaging_populate_menu
Stopping friends-service
Stopping manage-address-books.py
/usr/bin/ubuntu-session: line 38: kill: (443) - No such process
Stopping ofono-setup
Killing session bus...
Session stopped.
[email protected]:/#
Can anybody tell me what went wrong?
Click to expand...
Click to collapse
I got issue same you,still can't solve.
chok_thewa said:
I got issue same you,still can't solve.
Click to expand...
Click to collapse
I tried to launch Ubuntu on my MediaPad
It's work onli in wire-to-pc mode. When I disconnect a Usb-wire - I have a blank screen.
Any plans on future work on it? I read that late may build should be for daily use so I finally managed to try it. I used latest raring build but I had no luck with getting GUI working :/
Can I boot directly in, or is this Chroot only?
The install instructions include a chroot, but is that what ubuntu ends up running in? Is it possible to run without loading android into ram as well?
Thanks.

[TUTORIAL] How to create a C++ Qml Ubuntu Touch Application from start to end

How to create a C++ Qml Ubuntu Touch Application from start to end (now with easy setup)
(Including packaging and creating your own ppa)
Important! Only use lowercase for your project name otherwise your gonna have a lot of problems
I created a branch for easy access but I recommend you still read the tutorial.
So to create the basic environment you can use the following (with the rename.sh you change all the important values)
Code:
bzr branch lp:~hansueli-burri/+junk/CreateYourProject
cd CreateYourProject/
./rename.sh
1. Things you need before we start
Create a Lauchpad Account (https://launchpad.net)
Create your OpenPGP key (Needed for packaging)
Sign the Ubuntu Code of Conduct (Needed to create a PPA)
Register an SSH Key (https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair) (Needed for uploading to lauchpad)
Install the Ubuntu SDK (http://developer.ubuntu.com/get-started/gomobile/)
2. How to start your Project?
Well the default templates didn't work for me so we create a custom project.
2.1. Create a new Folder (with the name of your project)
In my case apcalc-qml
2.2. Create a subfolder for your QML-files and a subfolder for your c++ files
In my case qml and cpp
2.3. Now we create a new Project-file
In my case apcalc-qml.pro
That looks something like this (When you create a new class it should be added automaticly if not you have to add it your self, like the applicationdata class)
apcalc-qml.pro
Code:
[COLOR="Purple"]QT[/COLOR] += qml quick
[COLOR="Green"]# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
# MOBILITY +=
#C++ source files[/COLOR]
[COLOR="Purple"]SOURCES[/COLOR] += cpp/main.cpp\
cpp/applicationdata.cpp\
[COLOR="Green"]#C++ header files
[/COLOR][COLOR="Purple"]HEADERS[/COLOR] += cpp/applicationdata.h
[COLOR="Green"]#Path to the libraries...
[/COLOR][COLOR="Purple"]INCLUDEPATH[/COLOR] += $$PWD\
$$PWD/../../../../usr/lib
[COLOR="Purple"]DEPENDPATH[/COLOR] += $$PWD/../../../../usr/lib
[COLOR="Green"]#Path to "other files" in this case the QML-Files
[/COLOR][COLOR="Purple"]OTHER_FILES[/COLOR] += \
qml/main.qml\
qml/basicCalc/*.qml
2.4. Now we should create the C++, Source, Header and QML files.
main.cpp
Code:
[COLOR="Blue"]
#include [COLOR="Green"]<QtGui/QGuiApplication>[/COLOR]
#include [COLOR="Green"]<QGuiApplication>[/COLOR]
#include [COLOR="Green"]<QQuickView>[/COLOR]
#include [COLOR="Green"]<QtQml/qqmlcontext.h>[/COLOR]
#include [COLOR="Green"]<stdio.h>[/COLOR]
#include [COLOR="Green"] "applicationdata.h"[/COLOR]
[/COLOR]
[COLOR="Olive"]int [/COLOR]main([COLOR="Olive"]int[/COLOR] argc, [COLOR="Olive"]char[/COLOR] *argv[])
{
[COLOR="Purple"]QGuiApplication[/COLOR] app(argc, argv);
[COLOR="Purple"]QQuickView[/COLOR] view;
[COLOR="Purple"]ApplicationData[/COLOR] data;
[COLOR="Green"] //Resize Mode so the content of the QML file will scale to the window size[/COLOR]
view.setResizeMode([COLOR="Purple"]QQuickView[/COLOR]::[COLOR="Purple"]SizeRootObjectToView[/COLOR]);
[COLOR="Green"] //With this we can add the c++ Object to the QML file[/COLOR]
view.rootContext()->setContextProperty([COLOR="Green"]"applicationData"[/COLOR], &data);
[COLOR="Green"] //Resolve the relativ path to the absolute path (at runtime)[/COLOR]
[COLOR="Olive"]const[/COLOR] [COLOR="Purple"]QString[/COLOR] qmlFilePath= [COLOR="Purple"]QString[/COLOR]::fromLatin1([COLOR="Green"]"%1/%2"[/COLOR]).arg([COLOR="Purple"]QCoreApplication[/COLOR]::applicationDirPath(), "qml/main.qml");
view.setSource([COLOR="Purple"]QUrl[/COLOR]::fromLocalFile(qmlFilePath));
[COLOR="Green"] //For debugging we print out the location of the qml file[/COLOR]
[COLOR="Purple"]QByteArray[/COLOR] ba = qmlFilePath.toLocal8Bit();
[COLOR="Olive"]const char[/COLOR] *str = ba.data();
printf([COLOR="Green"]"Qml File:%s\n"[/COLOR],str);
[COLOR="Green"] //Not sure if this is nessesary, but on mobile devices the app should start in fullscreen mode[/COLOR]
[COLOR="Blue"]#if[/COLOR] defined([COLOR="Purple"]Q_WS_SIMULATOR[/COLOR]) || defined([COLOR="Purple"]Q_OS_QNX[/COLOR])
view.showFullScreen();
[COLOR="Blue"] #else[/COLOR]
view.show();
[COLOR="Blue"] #endif[/COLOR]
[COLOR="Olive"]return[/COLOR] app.exec();
}
main.qml
Code:
import QtQuick 2.0
[COLOR="Olive"]import[/COLOR] Ubuntu.Components 0.1
[COLOR="Olive"]import[/COLOR] [COLOR="Green"]"basicCalc"[/COLOR]
[COLOR="Olive"]import[/COLOR] QtQuick.Window 2.0
[COLOR="Purple"]MainView[/COLOR] {
[COLOR="Green"] //objectName for functional testing purposes (autopilot-qt5)[/COLOR]
[COLOR="Sienna"]objectName[/COLOR]: [COLOR="Green"]"mainView"[/COLOR]
[COLOR="Sienna"]applicationName[/COLOR]: [COLOR="Green"]"apcalc-qml"[/COLOR]
[COLOR="Sienna"]automaticOrientation[/COLOR]:true;
[COLOR="Sienna"]width[/COLOR]: units.gu(60);
[COLOR="Sienna"]height[/COLOR]: units.gu(100);
[COLOR="Sienna"]id[/COLOR]:root
[COLOR="Purple"]Tabs[/COLOR] {
[COLOR="Sienna"]objectName[/COLOR]: [COLOR="Green"]"Tabs"[/COLOR]
[COLOR="Sienna"]ItemStyle.class[/COLOR]: [COLOR="Green"]"new-tabs"[/COLOR]
[COLOR="Sienna"]anchors.fill[/COLOR]: parent
[COLOR="Sienna"] id[/COLOR]:mainWindow;
[COLOR="Purple"]Tab[/COLOR] {
[COLOR="Sienna"]objectName[/COLOR]: [COLOR="Green"]"Calculator"[/COLOR]
[COLOR="Sienna"]title[/COLOR]:[COLOR="Green"] "Calculator"[/COLOR]
[COLOR="Sienna"]page[/COLOR]:[COLOR="Purple"]BasicCalc[/COLOR]{
[COLOR="Sienna"]width[/COLOR]: root.width;
[COLOR="Sienna"]height[/COLOR]: root.height-root.header.height;
[COLOR="Sienna"]anchors.top[/COLOR]: parent.top;
[COLOR="Sienna"]anchors.topMargin[/COLOR]: root.header.height;
[COLOR="Sienna"]onToCalculateChanged[/COLOR]: {
[COLOR="Green"] //access to the c++ Object [/COLOR]
result=[COLOR="Blue"]applicationData[/COLOR].calculate(toCalculate);
}
}
}
}
}
applicationdata.h
Code:
[COLOR="Blue"]#ifndef[/COLOR] APPLICATIONDATA_H
[COLOR="Blue"]#define APPLICATIONDATA_H
#include[/COLOR] [COLOR="Green"]<QObject>[/COLOR]
[COLOR="Olive"]class[/COLOR] [COLOR="Purple"]ApplicationData[/COLOR] : [COLOR="Olive"]public[/COLOR] [COLOR="Purple"]QObject[/COLOR]
{
[COLOR="Blue"] Q_OBJECT[/COLOR]
[COLOR="Olive"]public[/COLOR]:
[COLOR="Olive"]explicit[/COLOR] [COLOR="Purple"]ApplicationData[/COLOR]([COLOR="Purple"]QObject[/COLOR] *parent = [COLOR="Blue"]0[/COLOR]);
[COLOR="Purple"] Q_INVOKABLE QString [/COLOR]calculate([COLOR="Purple"]QString[/COLOR]) [COLOR="Olive"]const[/COLOR];
[COLOR="Olive"]signals[/COLOR]:
[COLOR="Olive"]public slots[/COLOR]:
};
[COLOR="Blue"]#endif[/COLOR] // APPLICATIONDATA_H
applicationdata.cpp
Code:
[COLOR="Blue"]#include[/COLOR] [COLOR="Green"]"applicationdata.h"[/COLOR]
[COLOR="Purple"]ApplicationData[/COLOR]::[COLOR="Purple"]ApplicationData[/COLOR]([COLOR="Purple"]QObject[/COLOR] *parent) :
[COLOR="Purple"]QObject[/COLOR](parent)
{
}
[COLOR="Purple"]QString ApplicationData[/COLOR]::calculate([COLOR="Purple"]QString[/COLOR] command) [COLOR="Olive"]const[/COLOR] {
[COLOR="Green"] // Some Logic comes here[/COLOR]
[COLOR="Olive"]return[/COLOR] command;
}
Those were the important files.
Never forget to mark your functions as Q_INVOKABLE otherwise you can't access them from within the qml file.
You can have a look at the other qm files at http://bazaar.launchpad.net/~hansueli-burri/+junk/apcalc-qml/files
Before you can build your project we have to edit the build properties and add a custom build and clean up step. It should look something like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
3. Packaging
Lets start with the easy things.
3.1. Create an App icon
Call it something like <YourProjectName>64.png
We will use this in the Desktop file.
3.2. Create a bin file <YourProjectName>.bin
It's a very simple textfile containing something like this, and nothing more.
Code:
/usr/share/<YourProjectName>/<YourBinaryName>
The Binary name will most probably be the same as your project name.
But It can be whatever you want because we create it in the rules file manually.
3.3. Create a desktop file
Here you got an example how to do it.
Code:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=<YourProjectName>
Exec=/usr/share/<YourProjectName>/<YourBinaryName>
Icon=/usr/share/<YourProjectName>/<YourProjectName>64.png
StartupNotify=true
X-Ubuntu-Touch=true
X-Ubuntu-StageHint=SideStage
3.4.Debian packaging
First you create the debian folder in your project folder, containing the following files
changelog
control
copyright
install
compat
rules
and a Subfolder called source containing a file called format
The content of the format file should be:
Code:
3.0 (native)
The other files should contain the following. (for the original files go to http://bazaar.launchpad.net/~hansueli-burri/+junk/apcalc-qml/files/head:/debian/)
changelog
Here you can document your changes, changelog entries look something like:
Code:
<YourProjectName (0.1) raring; urgency=low
* initial release
-- <Full OpenPGP Identifier (Full name and email address)> Sat, 4 April 2013 00:00:00 +0200
for more information google it.
control
Here you put your build dependencies, dependencies for running your application, your homepage, discription and so on.
I think all the Build-Depends listed bellow are nessesary to successfully compile and build the qt5 qml project but correct me if I'm wrong.
Code:
Source: [COLOR="Gray"]<YourProjectName>[/COLOR]
Priority: extra
Maintainer: [COLOR="Gray"]<Full OpenPGP Identifier (Full name and email address)> [/COLOR]
Build-Depends: debhelper (>= 9),
qtbase5-dev,
qtdeclarative5-dev,
qt5-default,
[COLOR="Gray"]<YourBuildDependencies>[/COLOR]
Standards-Version: 3.9.4
Section: misc
Homepage: [COLOR="Gray"]<YourHomePage>[/COLOR]
Package: [COLOR="Gray"]<YourPackageName>[/COLOR]
Section: misc
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends},
qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
qtdeclarative5-qtquick2-plugin,
[COLOR="Gray"] <YourRunningDependencies>[/COLOR]
Description: [COLOR="Gray"]<YourShortDescription>
<YourLongDescription>[/COLOR]
copyright
Here you put licencing information mine looks like this
Code:
Format: http://dep.debian.net/deps/dep5
Upstream-Name: [COLOR="Gray"]<YourPackageName>[/COLOR]
Source:
Files: *
Copyright: 2013 [COLOR="Gray"]<YourName>[/COLOR]
License: GPL-3.0
Files: debian/*
Copyright: 2013 [COLOR="Gray"]<YourName>[/COLOR]
License: LGPL-3.0
License: GPL-3.0
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 3 of the License.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License can be found in "/usr/share/common-licenses/GPL-3".
License: LGPL-3.0
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in "/usr/share/common-licenses/LGPL-3".
Install
If someone knows what this is needed for please tell me, cause I don't know, but with the following content everything will work;
Code:
usr/share/applications
usr/bin
usr/share/[COLOR="Gray"]<YourProjectName>[/COLOR]
compat
It just contains an 8, I also don't know why.
Code:
8
rules
This is a rather important file. Because here we define some of the logic to deploy the package.
Mine looks like this. You have to add all the files that need to be copied.
To understand what it does:
The content of $(CURDIR)/debian/tmp/usr/share/<YourProjectName> for example will be copied to /usr/share/<YourProjectName> when you install the package.
Code:
[COLOR="Blue"]#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Work-around for some machines where INSTALL_ROOT is not set properly by
# dh_auto_install[/COLOR][COLOR="DimGray"]
[COLOR="MediumTurquoise"]override_dh_auto_install:[/COLOR]
dh_auto_install -- INSTALL_ROOT=$([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp
[COLOR="Blue"]# Workaround a bug in that debhelper package version[/COLOR]
[COLOR="MediumTurquoise"]override_dh_install:[/COLOR]
[COLOR="DarkRed"]mkdir[/COLOR] -p $([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp/usr/share/applications/
[COLOR="DarkRed"]mkdir[/COLOR] -p $([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp/usr/bin/
[COLOR="DarkRed"]mkdir[/COLOR] -p $([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp/usr/share/apcalc-qml/
[COLOR="DarkRed"]mkdir[/COLOR] -p $([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp/usr/share/apcalc-qml/
[COLOR="DarkRed"]cp[/COLOR] apcalc-qml.desktop $([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp/usr/share/applications/
[COLOR="DarkRed"]cp[/COLOR] apcalc-qml $([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp/usr/share/apcalc-qml/apcalc-qml
[COLOR="DarkRed"]cp[/COLOR] *.png $([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp/usr/share/apcalc-qml/
[COLOR="DarkRed"]cp[/COLOR] apcalc-qml.bin $([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp/usr/bin/apcalc-qml
[COLOR="DarkRed"]cp[/COLOR] -r qml/ $([COLOR="SeaGreen"]CURDIR[/COLOR])/debian/tmp/usr/share/apcalc-qml/
dh_install --sourcedir=debian/tmp --fail-missing
[COLOR="MediumTurquoise"]%:[/COLOR]
dh [email protected][/COLOR]
4. Upload everything to Lauchpad
You can push (upload) personal branches (those not related to a project) with the following command:
bzr push lp:~YOUR_LAUNCHPAD_NAME/+junk/BRANCHNAME
(... more information if requested)
5. Create a recipe and test it
5.1. Setup pbuilder
First of you need to install pbuilder and modify or create ~/.pbuilderrc
Code:
# Codenames for Debian suites according to their alias. Update these when
# needed.
UNSTABLE_CODENAME="saucy"
TESTING_CODENAME="saucy"
STABLE_CODENAME="raring"
STABLE_BACKPORTS_SUITE="$STABLE_CODENAME-backports"
# List of Debian suites.
DEBIAN_SUITES=($UNSTABLE_CODENAME $TESTING_CODENAME $STABLE_CODENAME
"unstable" "testing" "stable")
# List of Ubuntu suites. Update these when needed.
UBUNTU_SUITES=(“saucy",”raring" "quantal" "precise" "oneiric" "natty" "lucid" "hardy")
# Mirrors to use. Update these to your preferred mirror.
DEBIAN_MIRROR="ftp.us.debian.org"
UBUNTU_MIRROR="mirrors.kernel.org"
# Optionally use the changelog of a package to determine the suite to use if
# none set.
if [ -z "${DIST}" ] && [ -r "debian/changelog" ]; then
DIST=$(dpkg-parsechangelog | awk '/^Distribution: / {print $2}')
# Use the unstable suite for Debian experimental packages.
if [ "${DIST}" == "experimental" ]; then
DIST="unstable"
fi
fi
# Optionally set a default distribution if none is used. Note that you can set
# your own default (i.e. ${DIST:="unstable"}).
: ${DIST:="$(lsb_release --short --codename)"}
# Optionally change Debian codenames in $DIST to their aliases.
case "$DIST" in
$UNSTABLE_CODENAME)
DIST="unstable"
;;
$TESTING_CODENAME)
DIST="testing"
;;
$STABLE_CODENAME)
DIST="stable"
;;
esac
# Optionally set the architecture to the host architecture if none set. Note
# that you can set your own default (i.e. ${ARCH:="i386"}).
: ${ARCH:="$(dpkg --print-architecture)"}
NAME="$DIST"
if [ -n "${ARCH}" ]; then
NAME="$NAME-$ARCH"
DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
fi
BASETGZ="/var/cache/pbuilder/$NAME-base.tgz"
DISTRIBUTION="$DIST"
BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"
BUILDPLACE="/var/cache/pbuilder/build/"
if $(echo ${DEBIAN_SUITES[@]} | grep -q $DIST); then
# Debian configuration
MIRRORSITE="http://$DEBIAN_MIRROR/debian/"
COMPONENTS="main contrib non-free"
if $(echo "$STABLE_CODENAME stable" | grep -q $DIST); then
EXTRAPACKAGES="$EXTRAPACKAGES debian-backports-keyring"
OTHERMIRROR="$OTHERMIRROR | deb http://www.backports.org/debian $STABLE_BACKPORTS_SUITE $COMPONENTS"
fi
elif $(echo ${UBUNTU_SUITES[@]} | grep -q $DIST); then
# Ubuntu configuration
MIRRORSITE="http://$UBUNTU_MIRROR/ubuntu/"
COMPONENTS="main restricted universe multiverse"
else
echo "Unknown distribution: $DIST"
exit 1
fi
5.2. How to use pbuilder?
Create a base environment for Ubuntu raring
Code:
sudo DIST=raring pbuilder create
Update a base environment for Ubuntu raring
Code:
sudo DIST=raring pbuilder update
Build package for Ubuntu raring
Code:
sudo DIST=raring pbuilder build <working-dir>/<application_name>.dsc
5.3. Content of the recipe
It can be as simple as this.
Code:
# bzr-builder format 0.3 deb-version 0.1~{revno}
lp:~YOUR_LAUNCHPAD_NAME/+junk/BRANCHNAME
(... more information if requested)
6. Create PPA
Now you just need to create your ppa as explaind on launchpad.
Important by default your ppa will not build for arm. you have to ask a question on launchpad to request that your ppa will be build for arm as well.
(... more information if requested)
Sweet! Thank you!!
Sent from my LG-LS970 using xda app-developers app
Awesome work! I was waiting for this kind of tutorial.
thanks for that!:good:
Awesome work! I was waiting for this kind of tutorial.
thanks for that!
Click to expand...
Click to collapse
I was waiting on a tutorial as well, but nobody seed to be intrested in creating one
Can I use Java language for creating program?
imax27 said:
Can I use Java language for creating program?
Click to expand...
Click to collapse
Please no.
BTW no, really, Ubuntu (luckily) supports only C++ and C languages
Sent from my Nexus 4 using xda premium
Hi guys, how can I pack this into .click package for Ubuntu Touch?

[Linux] Take screenshots from Recovery with FFMPEG

​
Thanks to people behind FFMPEG, @makers_mark and his thread "[TOOL][WIN]Take screenshots of Aroma and Recovery v1.1" to gave us the correct command line in his script, and gave us the ability of taking screenshot from recovery on Linux.
I - Requirements
1 - ADB installed on your computer
Get the Android SDK
2 - Correct Nexus 5 USB ID's
Create android USB rules with your favorite text editor
Kubuntu :
Code:
sudo kate /etc/udev/rules.d/51-android.rules
Click to expand...
Click to collapse
Ubuntu :
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
Click to expand...
Click to collapse
Copy/Paste theses lines, and save it
Don't forget to change OWNER="your ubuntu username" with your Ubuntu/Linux username
### Google Nexus 5
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0666", OWNER="your ubuntu username"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee1", MODE="0666", OWNER="your ubuntu username"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0666", OWNER="your ubuntu username"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee3", MODE="0666", OWNER="your ubuntu username"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee4", MODE="0666", OWNER="your ubuntu username"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee5", MODE="0666", OWNER="your ubuntu username"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee6", MODE="0666", OWNER="your ubuntu username"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d001", MODE="0666", OWNER="your ubuntu username"
Click to expand...
Click to collapse
3 - FFMPEG
To convert your raw framebuffer file into a *.png image file
Here, we will not install anything. We will just run the FFMPEG's executable to do what we want.
in this way, it does not affect our system.
Static FFmpeg builds said:
If you don't have time/will/knowledge to compile FFmpeg yourself and you just
want to download-and-run FFmpeg, then you've come to the right place!
This directory contains latest static builds of FFmpeg for testing purposes.
That means you can just download and run the executable.
Click to expand...
Click to collapse
3.1 - Download FFMPEG from ffmpeg.gusari.org
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Depending of your distro :
64x : ffmpeg.static.64bit.latest.tar.gz
32x : ffmpeg.static.32bit.latest.tar.gz
3.2 Unarchive it where you want
I choose "/home/kowalski/.android/screenshot/ffmpeg.static.64bit.latest/"
​
II - Go into your recovery, plug yor Nexus 5 with the USB cable to your computer
III - Get your raw framebuffer file
In your console/terminal, enter the command
Code:
adb pull /dev/graphics/fb0 "your/directory/the_name_of_the_screenshot.raw"
I choose "/home/kowalski/.android/screenshot/raw/"
Code:
adb pull /dev/graphics/fb0 "/home/kowalski/.android/screenshot/raw/screenshot_01.raw"
​
See the result in console/terminal
​
See the result on your computer
​
IV - Go to the FFMPEG directory
In your console/terminal, enter the command
Code:
cd "FFMPEG directory"
For me :
Code:
cd /home/kowalski/.android/screenshot/ffmpeg.static.64bit.latest/
​
Then, in your console/terminal, enter the command
according your directories, you have to change :
"your/directory/the_name_of_the_screenshot.raw"
and
"your/directory/the_name_of_the_screenshot.png"
Click to expand...
Click to collapse
./ffmpeg -loglevel debug -hide_banner -f rawvideo -vcodec rawvideo -pix_fmt rgb565 -s 1088x1920 -i "your/directory/the_name_of_the_screenshot.raw" -vf crop=1080:1920:0:0 -y "your/directory/the_name_of_the_screenshot.png"
For me :
Code:
./ffmpeg -loglevel debug -hide_banner -f rawvideo -vcodec rawvideo -pix_fmt rgb565 -s 1088x1920 -i "/home/kowalski/.android/screenshot/raw/screenshot_01.raw" -vf crop=1080:1920:0:0 -y "/home/kowalski/.android/screenshot/png/screenshot_01.png"
​
See the result on your cumputer
​
See the result on your cumputer
​
Some screenshots I made with this method :
​
Note 1 : The fact that English is not my native language, any help to correct it, will be appreciated.
Note 1 : The fact that I don't know very well FFMPEG's command line, I have two errors (but it works !) :
[rawvideo @ 0x3e0f360] Invalid buffer size, packet size 65536 < expected frame_size 4177920
Error while decoding stream #0:0: Invalid argument
Click to expand...
Click to collapse
[image2 @ 0x3e0fca0] Could not get frame filename number 2 from pattern '/home/kowalski/.android/screenshot/png/screenshot_01.png' (either set updatefirst or use a pattern like %03d within the filename pattern)av_interleaved_write_frame(): Invalid argument
Click to expand...
Click to collapse
Any help to correct these errors, will be appreciated.
First!
Thanks for this feature
Sent from my Nexus 5 using XDA Premium 4 mobile app
Or, you can use philz recovery, go to philz settings, GUI preferences & set it however you want. I have mine set to "slide left" & bingo, a screenshot in/of recovery. Just saying.
Sent from my Nexus 5 using Xparent BlueTapatalk 2
ikslawlok said:
Note 1 : The fact that English is not my native language, any help to correct it, will be appreciated.
Note 1 : The fact that I don't know very well FFMPEG's command line, I have two errors (but it works !) :
Any help to correct these errors, will be appreciated.
Click to expand...
Click to collapse
If you change your command to:
Code:
./ffmpeg -loglevel fatal -hide_banner -f rawvideo -vcodec rawvideo -pix_fmt rgb565 -s 1088x1920 -i "/home/kowalski/.android/screenshot/raw/screenshot_01.raw" -vf crop=1080:1920:0:0 -y "/home/kowalski/.android/screenshot/png/screenshot_01.png"
By interchanging `-loglevel debug` with `-loglevel fatal` you will only receive console messages to inform you of program stopping (fatal) errors. If you still want to see more output from the ffmpeg console, which by the way is all written to stderr, you may try `-loglevel verbose` which is the same as not setting a loglevel at all. Using `-loglevel debug` shows everything in the console.
aheeejd said:
Or, you can use philz recovery, go to philz settings, GUI preferences & set it however you want. I have mine set to "slide left" & bingo, a screenshot in/of recovery. Just saying.
Sent from my Nexus 5 using Xparent BlueTapatalk 2
Click to expand...
Click to collapse
With all due respect, the reasons a person would find him/herself wanting to take a screenshot while in recovery mode are very limited. You have themers, people writing tutorials, and maybe someone who can't describe what may be going on in there situation. Having said that, having a screenshot option in just one of those recoveries isn't a viable solution for someone who made a theme for twrp, or .... you get the point.
Side note: back when the OP was searching for a way to pull his screenshot, it didn't even work in Philz because the stride wasn't properly accounted for in fb2png until this commit on 3/22/14.
Thank you makers_mark
TWRP now includes screenshot feature. So it is a best way to do it.

Exchange the remote control from 2 tv boxes

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I have 2 android tvboxes and i want to exchange them the remote controls.
1) H9x3 with Slimbox firmware
2) VONTAR X3 with Slimbox firmware
I have the 2 files remote.conf. I tried to copy the files on /etc folder but are read only. Also there is not remote.conf files in /etc folder.
Has anyone any idea how i do that ?
Unfortunately, it's much more difficult than just copying the remote.conf files but not impossible. I've just done the same thing. Firstly, you need to be rooted. Secondly, you need to have access to the box via adb, Thirdly, you need to use a root file explorer like X-plore which is included in slimbox fw. Have a look here:
H96 MAX X3 (S905X3) [Android] - 4PDA
H96 MAX X3 (S905X3) [Android], [TV Box][Amlogic S905X3]
4pda.ru
You will definitely need a couple of hours if not more.
Thanks i will give a try. At first glance, I think the most difficult part is that it is in Russian language.
Just use Google translate. I can help you with the files for my remote to get a better idea of how they should look like.
That would be helpful.
In /vendor/etc/init/hw/init.amlogic.rc I added this line:
Code:
service remotecfg1 /vendor/bin/remotecfg -c /vendor/etc/remote_tanix.cfg -t /vendor/etc/remote_tanix.tab -d
class main
oneshot
seclabel u:r:remotecfg:s0
I added remote_tanix.cfg and remote_tanix.tab in /vendor/etc with 644 rights. remote_tanix.cfg is basically the same as remote.cfg. remote_tanix.tab was created using dmesg output after pressing the buttons on a Tanix remote which I wanted to use with my h96 max x3 box.
I think that something is wrong with my remote.tab file or something missing.
I have these errors when push buttons from remote control
Code:
[ 1175.201851] <3>[ [email protected]] meson-remote ff808040.rc: invalid custom:0xbd42df00
[ 1175.202336] <3>[ [email protected]] meson-remote ff808040.rc: cur_custom is nulll
[ 1175.207881] <3>[ [email protected]] meson-remote ff808040.rc: no valid key to handle
[ 1208.559821] <3>[ [email protected]] meson-remote ff808040.rc: invalid custom:0xf906df00
[ 1208.560346] <3>[ [email protected]] meson-remote ff808040.rc: cur_custom is nulll
[ 1208.565872] <3>[ [email protected]] meson-remote ff808040.rc: no valid key to handle
Code:
HOME -> 0xbd42df00
OK -> 0xf906df00
I used remote-0xfа00.tab from 4pda.ru seems are same remote control
Your remote code is df00 but the code of the remote tab you downloaded is fа00 assuming 0xfа00 in the file name is remote code. Check if you have 0x42 and 0x06 in the tab file. I'm positive you won't find them because otherwise you wouldn't have that error if your tab file was correct.
Perfect, you are right. I changed ff00 with df00 and detected the remote control.
I have found all buttons codes.
I think the only i must found, is the key number (2,3,4,etc.). How can i found them ?
Code:
0x54 2 #1
0x16 3 #2
0x15 4 #3
0x50 5 #4
0x12 6 #5
0x11 7 #6
0x4c 8 #7
0x0e 9 #8
0x0d 10 #9
0x0c 11 #0
If i use the following code, it will work ?
Code:
0xdf1a KEY_UP
0xdf48 KEY_DOWN
0xdf47 KEY_LEFT
0xdf07 KEY_RIGHT
Code:
0x54 2 #1
0x16 3 #2
0x15 4 #3
0x50 5 #4
0x12 6 #5
0x11 7 #6
0x4c 8 #7
0x0e 9 #8
0x0d 10 #9
0x0c 11 #0
This should work fine according to your button codes.
You can find the Linux codes in /root/vendor/usr/keylayout/Vendor_0001_Product_0001.kl
Linux key for number 1 is 2 etc.
Code:
0xdf1a KEY_UP
0xdf48 KEY_DOWN
0xdf47 KEY_LEFT
0xdf07 KEY_RIGHT
No. You erase 2 characters after 0x and replace them with the next 2.
Code:
0x1a 103 #KEY_UP
0x48 108 #KEY_DOWN
0x47 105 #KEY_LEFT
0x07 106 #KEY_RIGHT
Finally i did it. It was a bit time consuming but the result pleased me.
Thank you very much for your help !!
I will upload the 2 files if anyone want them in the future.
Also, the remote control df00 to work the 2 buttons APPLICATION_SWITCH & MEDIA_PLAY_PAUSE, i did add the line
Code:
key 0 MOUSE
in /root/vendor/usr/keylayout/Vendor_0001_Product_0001.kl
I don't know why it needed that line, but without this line, didn't detect these 2 buttons.
hello, how can i fix Enter in external keyboard, like this
Post in thread '[v7.5] Aidan's ROM [S905X] [ATV 7.1.2] (Lag & Bloat Free, Pre Rooted, Samba & Miracast) [TV NETFLIIX] 2021 Update!' https://forum.xda-developers.com/t/...tv-netfliix-2021-update.4104869/post-87228333
1) In /vendor/etc/init/hw/init.amlogic.rc add this
Code:
service remotecfg1 /vendor/bin/remotecfg -c /vendor/etc/remote.cfg -t /vendor/etc/remote_df00.tab -d
class main
oneshot
seclabel u:r:remotecfg:s0
2) Add the files remote.cfg and remote_df00.tab in /vendor/etc with 644 rights.
3) in /root/vendor/usr/keylayout/Vendor_0001_Product_0001.kl add the line
Code:
key 0 MOUSE
4) Reboot and test
vag13 said:
1) In /vendor/etc/init/hw/init.amlogic.rc add this
Code:
service remotecfg1 /vendor/bin/remotecfg -c /vendor/etc/remote.cfg -t /vendor/etc/remote_df00.tab -d
class main
oneshot
seclabel u:r:remotecfg:s0
2) Add the files remote.cfg and remote_df00.tab in /vendor/etc with 644 rights.
3) in /root/vendor/usr/keylayout/Vendor_0001_Product_0001.kl add the line
Code:
key 0 MOUSE
4) Reboot and test
Click to expand...
Click to collapse
ok thank you very much
vag13 said:
1) In /vendor/etc/init/hw/init.amlogic.rc add this
Code:
service remotecfg1 /vendor/bin/remotecfg -c /vendor/etc/remote.cfg -t /vendor/etc/remote_df00.tab -d
class main
oneshot
seclabel u:r:remotecfg:s0
2) Add the files remote.cfg and remote_df00.tab in /vendor/etc with 644 rights.
3) in /root/vendor/usr/keylayout/Vendor_0001_Product_0001.kl add the line
Code:
key 0 MOUSE
4) Reboot and test
Click to expand...
Click to collapse
I did what was written, the result did not see a negative control
Resim Yükle, Herkesle Paylaş - resimyukle.io
resimyukle.io
If I give you a teamviewer id, can you connect remotely and help?
IMG_20220805_001250
Image IMG_20220805_001250 hosted in IM.GE - Free Image Hosting - Upload Image & Share
im.ge
IMG_20220805_001354
Image IMG_20220805_001354 hosted in IM.GE - Free Image Hosting - Upload Image & Share
im.ge
I think that your remote is not same with mine.
Try to connect via adb and find the correct code of your remote https://forum.xda-developers.com/t/exchange-the-remote-control-from-2-tv-boxes.4265345/post-84891999
sarigol45 said:
If I give you a teamviewer id, can you connect remotely and help?
IMG_20220805_001250
Image IMG_20220805_001250 hosted in IM.GE - Free Image Hosting - Upload Image & Share
im.ge
IMG_20220805_001354
Image IMG_20220805_001354 hosted in IM.GE - Free Image Hosting - Upload Image & Share
im.ge
Click to expand...
Click to collapse
Sorry, i don't use teamviewer.
The remote is working on slimbox atv 12.2 rom, can you check if I upload these files here?
Can you edit these files? I uploaded the working files.
root/vendor/etc
root/vendor/etc/init/hw
root/vendor/usr/keylayout
slimbox 12.2.rar
drive.google.com

General Screen mirroring tool SCRCPY now supports WSA's Android 13 with clipboard access

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you think the Windows app SCRCPY is a useful tool you should read on, otherwise leave ...
At 1st look inside here:
Screen mirroring tool scrcpy now supports Android 13 with clipboard access
Controlling your phone from a computer gets easier
www.xda-developers.com
Then ...
Worthwhile to know that
1. Root access is not required.
2. WSA w/ Android 13 image doesn't allow wirelessly USB debugging:
3. The communication between the server (WSA emulator in this case) and client (desktop computer) is done via a socket over an adb tunnel. The server streams H.264 video of the device screen, passing it to the client to decode and display it, without buffering in order to minimize latency. The mouse and keyboard events are captured and transmitted to the server, which injects them to the Android device.
To get SCRCPY work with WSA ( Android 13 image ) you've to use a wrapper script like the one printed below ( DOS-coded ) this because SCRCPY app by default tries to connect to TCP port 5037..
@echo off & setlocal ENABLEDELAYEDEXPANSION
if ERRORLEVEL 1 ( echo FATAL: Cannot enable delayed expansion & pause & exit /B 1 )
::
:: 1. Check if WSA emulator is already up.
set "wsa_svc=WsaService.exe"
for /F "tokens=1 delims= " %%t in ('tasklist /FI "IMAGENAME eq !wsa_svc!" 2^>nul ^| findstr /I /C:"!wsa_svc!"') do (
set "proc=%%t"
if NOT "!proc!"==[] ( goto :done_wsa_check )
)
echo FATAL: WSA is not running & pause & exit /B 1
:done_wsa_check
::
:: 2. Get desktop's horizontal screen resolution.
for /f "tokens=* delims=" %%@ in ('wmic path Win32_VideoController get CurrentHorizontalResolution /format:value') do (
for /f "tokens=2 delims==" %%# in ("%%@") do ( set "HRES=%%#" )
)
:: 3. Restart ADB.
(
adb kill-server & adb devices
) 2>nul >nul
:: 4. Connect the WSA emulator.
adb disconnect >nul & adb usb & adb connect 127.0.0.1:58526
:: 5 Run Windows app scrcpy
::
:: We limit both the width and height to some value (e.g. 1024):
:: the other dimension is computed to that the device aspect ratio is preserved.
::
scrcpy --max-size !HRES! --window-width 800 --window-height 600 --window-x 100 --window-y 100
if !errorlevel! NEQ 0 ( echo FATAL: Couldn't start SCRCPY & pause & exit /B 1 )
:: 6. Wait for scrcpy has terminated -
:: Ctrl+c in the terminal or closing the window are proper ways to close scrcpy.
:chck
timeout /t 15 /nobreak >nul
tasklist | findstr /I /C:"scrcpy" >nul && goto :chck || goto :end
:end
:: 7. Switch back to USB mode:
adb disconnect >nul & adb usb
endlocal
exit /B 0
Click to expand...
Click to collapse
and you'ld preferredly name it WSAScrCpy.BAT and put it into folder where you've extracted SCRCPY-win64-v1.25.ZIP to ( example location )
and then therein launch this .BAT-file
Example SCRCPY screenshots:
BTW: For your convenience the mentioned SCRCPY build and the draft of wrapper script ( WSAScrCpy.BAT ) are attached.
Enjoy the read?​
Then give me a Like.
All Assets:
Releases · Genymobile/scrcpy
Display and control your Android device. Contribute to Genymobile/scrcpy development by creating an account on GitHub.
github.com
谢谢分享。
Code:
adb shell pm set-home-activity "com.microsoft.launcher"
设置安卓默认桌面为微软桌面,需要先安装微软桌面,不然我这边打开会黑屏。
Mod translation: To set the Android default desktop as the Microsoft desktop, you need to install the Microsoft desktop first, otherwise the screen will be black when I open it here.
jwoegerbauer said:
View attachment 5811123
If you think the Windows app SCRCPY is a useful tool you should read on, otherwise leave ...
At 1st look inside here:
Screen mirroring tool scrcpy now supports Android 13 with clipboard access
Controlling your phone from a computer gets easier
www.xda-developers.com
Then ...
Worthwhile to know that
1. Root access is not required.
2. WSA w/ Android 13 image doesn't allow wirelessly USB debugging:
View attachment 5811355
3. The communication between the server (WSA emulator in this case) and client (desktop computer) is done via a socket over an adb tunnel. The server streams H.264 video of the device screen, passing it to the client to decode and display it, without buffering in order to minimize latency. The mouse and keyboard events are captured and transmitted to the server, which injects them to the Android device.
To get SCRCPY work with WSA ( Android 13 image ) you've to use a wrapper script like the one printed below ( DOS-coded ) this because SCRCPY app by default tries to connect to TCP port 5037..
and you'ld preferredly name it WSAScrCpy.BAT and put it into folder where you've extracted SCRCPY-win64-v1.25.ZIP to ( example location )
View attachment 5812457
and then therein launch this .BAT-file
Example SCRCPY screenshots:
View attachment 5811741
View attachment 5812597
BTW: For your convenience the mentioned SCRCPY build and the draft of wrapper script ( WSAScrCpy.BAT ) are attached.
Enjoy the read?​
Then give me a Like.
Click to expand...
Click to collapse
it don't record audio right ?, but some works in OBS works perfectly

Categories

Resources