Intro
I wanted to make a thread to document kernel development activities that we're doing. So far, this Ouya forum has been a great place to view what it takes to start developing for a new device!
First of all, alsutton over on GitHub posted the kernel source. It can be found here https://github.com/ouya/ouya_1_1-kernel.
XDA University has some great articles to get started:
http://xda-university.com/as-a-developer/getting-started-building-a-kernel-from-source
http://xda-university.com/as-a-developer/adding-features-to-your-kernel
Things noticed about the stock kernel so far:
-it's cpu governor seems to be permanently set to "performance" (1600Mhz all the time). There might be a way to override this, but in the voltage control app, I wasn't able to change anything (frequency or governor)
Wish List:
-Access to set more governors (could help the Ouya's fan stay off during menu surfing)
-Overclocking (we have a fan...let's break 2Ghz because we need moar hertz. Might help speed up some emulators)
Need more info:
-If we ever overlock, we need a way to view temperature to make sure we're not frying our Ouyas. Just a guess, but it's probably a file we can read from in /dev or /proc
-Just a blind guess after reading the XDA University article on adding overclocking, but SOURCE/arch/arm/mach-tegra/tegra3_clocks.c might be a place to look. It seems to have clock frequency tables. Other devs that have made tegra 3 kernels might know the appropriate files to edit
boot.img details
As an FYI,
for most android devices, the kernel resides in it's own partition on the device. When flashing a new kernel, a new boot.img is flashed to the partition. The boot.img file includes a header, the kernel image (pre-compiled), and the ramdisk. On boot, the kernel takes control and uses the ramdisk files to get things started. The rest of the partitions (including system, data, cache) are mounted and the Android OS is booted (from system).
Here's one way to take a boot.img and dissect it in order to view the ramdisk contents.
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
Here's another way as well (thanks, professorpoptarts)
http://forum.xda-developers.com/showthread.php?t=1890912
May I suggest not to try to overclock past known safe values of 1.9ghz?
As for the kernel....it is not set to be at 1.6ghz all the time... its set differently and actually stays and floats at 1ghz until utilization kicks in at to 1.6ghz
You wont be able to change any of these values until you compile your own kernel with the correct voltage/clock settings in place.
-----edit------
To add to that in respects to the 1-1.6ghz range it actually only utilizes those 2 cpu states ( from what I've recorded )
HTCdemon said:
May I suggest not to try to overclock past known safe values of 1.9ghz?
As for the kernel....it is not set to be at 1.6ghz all the time... its set differently and actually stays and floats at 1ghz until utilization kicks in at to 1.6ghz
You wont be able to change any of these values until you compile your own kernel with the correct voltage/clock settings in place.
-----edit------
To add to that in respects to the 1-1.6ghz range it actually only utilizes those 2 cpu states ( from what I've recorded )
Click to expand...
Click to collapse
What are you using to record? I have been using "system panel".
Sent from my SCH-I535 using xda premium
just fyi, I was looking at the init.rc for the 264 OTA, just in case a rom gets flashed that didn't remove this we could always disable the recovery flash at the boot level.
service flash_recovery /system/etc/install-recovery.sh
class main
oneshot
for any other aspiring kernel devs out there:
https://github.com/invisiblek/AnyKernel/tree/ouya
(fyi: this is on the branch named ouya of that repo, make your you add: -b ouya to your git clone or you'll get the branch for a different device)
just throw your zImage in kernel/ and your modules in modules/
make sure when you compile your kernel, you add -fno-pic to your KBUILD_CFLAGS_MODULE in Makefile in the root of your kernel source
otherwise it wont load the modules
wewt!
Just curious.....is anyone else having issues compiling the latest commit?
I reverted back to the previous commit but it still breaks.
Build machine hasnt changed.
Code:
drivers/dma/timb_dma.c: In function 'td_tx_status':
drivers/dma/timb_dma.c:521: error: 'last_complete' undeclared (first use in this function)
drivers/dma/timb_dma.c:521: error: (Each undeclared identifier is reported only once
drivers/dma/timb_dma.c:521: error: for each function it appears in.)
drivers/dma/timb_dma.c:521: error: 'last_used' undeclared (first use in this function)
drivers/dma/timb_dma.c:513: warning: unused variable 'td_chan'
make[2]: *** [drivers/dma/timb_dma.o] Error 1
make[1]: *** [drivers/dma] Error 2
make: *** [drivers] Error 2
HTCdemon said:
Just curious.....is anyone else having issues compiling the latest commit?
I reverted back to the previous commit but it still breaks.
Build machine hasnt changed.
Code:
drivers/dma/timb_dma.c: In function 'td_tx_status':
drivers/dma/timb_dma.c:521: error: 'last_complete' undeclared (first use in this function)
drivers/dma/timb_dma.c:521: error: (Each undeclared identifier is reported only once
drivers/dma/timb_dma.c:521: error: for each function it appears in.)
drivers/dma/timb_dma.c:521: error: 'last_used' undeclared (first use in this function)
drivers/dma/timb_dma.c:513: warning: unused variable 'td_chan'
make[2]: *** [drivers/dma/timb_dma.o] Error 1
make[1]: *** [drivers/dma] Error 2
make: *** [drivers] Error 2
Click to expand...
Click to collapse
Fine here
Now if I just had a working Ouya....we could make some cool stuff =P
Back with a new problem...
Code:
06-29 18:41:21.260: D/WifiService(322): setWifiEnabled: true pid=584, uid=10018
06-29 18:41:21.270: E/WifiHW(107): Failed to open wlan fw path param (No such file or directory)
06-29 18:41:21.270: E/SoftapController(107): Softap fwReload - failed: -1
06-29 18:41:21.270: E/WifiStateMachine(322): Failed to reload STA firmware java.lang.IllegalStateException: command '9 softap fwreload wlan0 STA' failed with '400 9 Softap operation failed (No such file or directory)'
06-29 18:41:21.270: W/CommandListener(107): Failed to retrieve HW addr for wlan0 (No such device)
06-29 18:41:21.270: D/CommandListener(107): Setting iface cfg
06-29 18:41:21.270: E/WifiStateMachine(322): Unable to change interface settings: java.lang.IllegalStateException: command '11 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 11 Failed to set address (No such device)'
06-29 18:41:21.280: V/WifiSetupActivity(584): Setting content visible: true
06-29 18:41:21.280: E/wpa_supplicant(986): nl80211: Could not add multicast membership for scan events: -2 (No such file or directory)
06-29 18:41:21.280: E/wpa_supplicant(986): Failed to initialize driver 'nl80211'
06-29 18:41:21.280: E/wpa_supplicant(986): wlan0: Unsupported driver 'nl80211'
06-29 18:41:21.370: E/WifiStateMachine(322): Failed to start supplicant!
Anyone else having issues with this?
edit:
Looks like it's not loading any modules at all... I had no problems previously with older kernels till 328....anyone know what im missing?
My main issue here, and something I'd like to see done.
The Ouya seems to get hot sometimes during long durations of gameplay, could we put together a method on getting the fan boosting cool air through the device once it gets hot? Or would that be something hardware related as the Ouya can't say; "I'm hot, pour some water on me"?
If this was useful to you, I can only ask of a favor!
Check out my YouTube channel!
http://WWW.YouTube.com/user/TheDarkRosary
Subscribe if you will!
HTCdemon said:
Back with a new problem...
Code:
06-29 18:41:21.260: D/WifiService(322): setWifiEnabled: true pid=584, uid=10018
06-29 18:41:21.270: E/WifiHW(107): Failed to open wlan fw path param (No such file or directory)
06-29 18:41:21.270: E/SoftapController(107): Softap fwReload - failed: -1
06-29 18:41:21.270: E/WifiStateMachine(322): Failed to reload STA firmware java.lang.IllegalStateException: command '9 softap fwreload wlan0 STA' failed with '400 9 Softap operation failed (No such file or directory)'
06-29 18:41:21.270: W/CommandListener(107): Failed to retrieve HW addr for wlan0 (No such device)
06-29 18:41:21.270: D/CommandListener(107): Setting iface cfg
06-29 18:41:21.270: E/WifiStateMachine(322): Unable to change interface settings: java.lang.IllegalStateException: command '11 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 11 Failed to set address (No such device)'
06-29 18:41:21.280: V/WifiSetupActivity(584): Setting content visible: true
06-29 18:41:21.280: E/wpa_supplicant(986): nl80211: Could not add multicast membership for scan events: -2 (No such file or directory)
06-29 18:41:21.280: E/wpa_supplicant(986): Failed to initialize driver 'nl80211'
06-29 18:41:21.280: E/wpa_supplicant(986): wlan0: Unsupported driver 'nl80211'
06-29 18:41:21.370: E/WifiStateMachine(322): Failed to start supplicant!
Anyone else having issues with this?
edit:
Looks like it's not loading any modules at all... I had no problems previously with older kernels till 328....anyone know what im missing?
Click to expand...
Click to collapse
Im getting the exact same problems on a stock OUYA bougth today
lsmod on the adb shell shows the following :
[email protected]:/ $ lsmod
lsmod
cfg80211 179175 0 - Live 0x00000000
inv_mpu_ak8975 3937 0 - Live 0x00000000
inv_mpu_kxtf9 6865 0 - Live 0x00000000
mpu3050 36222 2 inv_mpu_ak8975,inv_mpu_kxtf9, Live 0x00000000
Click to expand...
Click to collapse
I wish i had an Ouya.... i would be all over this
Ouya-XD said:
My main issue here, and something I'd like to see done.
The Ouya seems to get hot sometimes during long durations of gameplay, could we put together a method on getting the fan boosting cool air through the device once it gets hot? Or would that be something hardware related as the Ouya can't say; "I'm hot, pour some water on me"?
If this was useful to you, I can only ask of a favor!
Check out my YouTube channel!
http://WWW.YouTube.com/user/TheDarkRosary
Subscribe if you will!
Click to expand...
Click to collapse
sure through some code already published there are multiple ways to impliment thermal throttling
although that could impact game play
im sure there are also ways to open the unit and have it trigger a fan
im sure you also could make custom heatsink for the unit for those hardcore Overclockers
you wanna look in
tegra3_clocks.c
tegra3_dvfs.c
tegra3_thermal.c
tegra3_throttle.c
cpu-tegra3.c
and a few others
you can improve the GPU clocks and add governors easily as well as change between slab/slub/slob/slqb
this would be something really fun to play with ill try to save up for an ouya
Is this project still active? I would love to contribute in any way possible to an overclocked kernel, but I have never done any kernel development before.
BUS DR1V3R said:
Is this project still active? I would love to contribute in any way possible to an overclocked kernel, but I have never done any kernel development before.
Click to expand...
Click to collapse
I'm waiting till I can afford an ouya then I can code up some stuff
Sent from my SCH-R970 using xda premium
mybook4 said:
Things noticed about the stock kernel so far:
-it's cpu governor seems to be permanently set to "performance" (1600Mhz all the time). There might be a way to override this, but in the voltage control app, I wasn't able to change anything (frequency or governor)
Click to expand...
Click to collapse
Just for reference, I have two Ouya's. One came clocked (retail version) at 1.6, the other came (Kickstarter) clocked at 1.7.
Related
Hi there.... yeah, Im a newb too in this business, but the only one thing that I know, that the DEVS gett pissed off when we report bugs without LOGCATs
We dont understand it but they do SO LETs hear them and do it like we should do it.
Every time when you get into the thread and post something like "aaaaaa, the power button doesent work, or Play Store wont open...", this is just a cup of crapy words for the devs (correct me if Im wrong).
Of course theres a ADB version for doing logs, but I think for the START, this one is just fine.
Click to expand...
Click to collapse
What is logcat?
Logcat is the command to view the internal logs of the Android system. Viewing logs is often the best way to diagnose a problem, and is required for many issues. This way you'll find out what apps are doing in the background without you noticing.
Advantages of Logcat
Debugging
Debug your apps. Find error stacktraces. See what your phone is saying about you behind your back. It's all there in the system log, aka logcat!
Click to expand...
Click to collapse
DOWNLOAD APP
I was googleing around and I found the best app for doing it for us newbs.
Download the FREE app called CATLOG.
Click to expand...
Click to collapse
HOW TO USE IT
After you installed it, RUN it and click the options button, there youll get a record options. Click on the record button and let it run in the background. If you had problems with Play Store, just run the PS again and when the ERROR comes, the CATLOG recorder is recording. After you did that, just go back to the app, hit the options key and press STOP RECORDING. There you GO, you have a .txt catlog of your problem.
This is just a example with the PLAY STORE fc...
Use some file manager or something like that so you can go into your sdcard / catlogs / and there should be your TXT saved log. Now just select it, press on share and put it on the FORUM or the DEVs mail. It depends on each developer. (Correct me again if Im wrong.)
Click to expand...
Click to collapse
Hope it helps out!
DO IT PEOPLE !
Heres is the more advanced but not so hard way to LOGCAT!
All credits goes to paxChristos who made this awesome tutorial HOW TO LOGCAT!
Original post: http://forum.xda-developers.com/showthread.php?t=1726238
paxChristos said:
Here's how to use logcat:
There are two main ways to do a logcat, within android, and through adb.
Logcat within android can be done one of two ways, through a Logcat app:
Here are two good examples are either: aLogcat or Catlog
I prefer catlog, because in my opinion it has a little bit nicer UI. Both of these programs can dump their logs to a txt file, which is very useful for debugging. Or, you can do it in terminal emulator (same rules as running through adb(see below))
From Moscow Desire:
On the other hand, using adb to run logcat, in my opinion is much more useful, because you can start using it when android boots (i.e. once the boot animation appears.)
The code for logcat to output to a file is
Code:
adb logcat > name of problem.txt
you can also do
Code:
adb logcat -f name of problem.txt
how I prefer to do it is this way:
Code:
adb logcat -v long > name of problem.txt
with the -v flag & the long argument, it changes output to long style, which means every line of logcat will be on its own line (makes it a little neater, imo)
Note: When outputting to a file, you will see a newline, but nothing printed, this is normal. To stop logcat from writting to a file, you need to press ctrl+c.
Here's where using logcat (via adb makes life really easy)
Lets say you find a problem you're having after looking at a logcat.
For example:
When I was trying to use a different ramdisk, wifi wouldn't work so I got a logcat that's almost 1300 lines long (a lot of stuff happens in the background)
So if you are searching for an error in the logcat file (it's always e/ for error, f/ for fatal. Those are the two main things that will break a system.)
Code:
D/dalvikvm( 871): GC_CONCURRENT freed 472K, 6% free 10224K/10823K, paused 1ms+6ms
V/AmazonAppstore.DiskInspectorServiceImpl( 871): Available blocks: 21981, Block size: 4096, Free: 90034176, Threshold: 5242880, withinThreshold? true
D/AmazonAppstore.UpdateService( 871): Received action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
W/AmazonAppstore.UpdateService( 871): Confused about why I'm running with this intent action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
D/dalvikvm( 890): GC_CONCURRENT freed 175K, 4% free 9375K/9671K, paused 2ms+3ms
V/AmazonAppstore.ReferenceCounter( 871): Reference (MASLoggerDB) count has gone to 0. Closing referenced object.
E/WifiStateMachine( 203): Failed to reload STA firmware java.lang.IllegalStateException: Error communicating to native daemon
V/AmazonAppstore.UpdateService( 871): runUpdateCommand doInBackground started.
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateCommand( 871): Not updating key: digitalLocker from: 1334228488057
V/AmazonAppstore.UpdateService( 871): Finished UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: serviceConfig
V/AmazonAppstore.MASLoggerDB( 871): performLogMetric: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
V/AmazonAppstore.MASLoggerDB( 871): onBackgroundTaskSucceeded: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
W/CommandListener( 118): Failed to retrieve HW addr for eth0 (No such device)
D/CommandListener( 118): Setting iface cfg
D/NetworkManagementService( 203): rsp
D/NetworkManagementService( 203): flags
E/WifiStateMachine( 203): Unable to change interface settings: java.lang.IllegalStateException: Unable to communicate with native daemon to interface setcfg - com.android.server.NativeDaemonConnectorException: Cmd {interface setcfg eth0 0.0.0.0 0 [down]} failed with code 400 : {Failed to set address (No such device)}
W/PackageParser( 203): Unknown element under : supports-screen at /mnt/asec/com.android.aldiko-1/pkg.apk Binary XML file line #16
D/wpa_supplicant( 930): wpa_supplicant v0.8.x
D/wpa_supplicant( 930): random: Trying to read entropy from /dev/random
D/wpa_supplicant( 930): Initializing interface 'eth0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant( 930): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): ctrl_interface='eth0'
D/wpa_supplicant( 930): update_config=1
D/wpa_supplicant( 930): Line: 4 - start of a new network block
D/wpa_supplicant( 930): key_mgmt: 0x4
(mind you, that's 29 lines out of 1300ish, just for example)
I then could do the following with logcat:
Code:
adb logcat WifiStateMachine:E *:S -v long > name of problem.txt
and this will only print out any errors associated with WifiStateMachine, and anything which is fatal, which makes it about a million times easier to figure out what's going on!
In WifiStateMachine:E, the :E = to look for Errors, the full list of options is as follows:
V — Verbose (lowest priority)
D — Debug
I — Info (default priority)
W — Warning
E — Error
F — Fatal
S — Silent (highest priority, on which nothing is ever printed)
You can replace the :E with any other letter from above to get more info.
In order to filter out anything other than what you are looking for (in this case, WifiStateMachine) you must put a *:S after your last command (i.e. WifiStateMachine:E ThemeChoose:V ... ... AndroidRuntime:E *:S)
Sources: http://developer.android.com/tools/help/logcat.html
http://developer.android.com/tools/help/adb.html
Update for windows users:
Thank go to FuzzyMeep Two, Here's what he's posted for windows
(If you used his tool, here's his post, thank him for his work!)
Click to expand...
Click to collapse
Adding some LogCats for CM10 nightly
Powerbutton
http://forum.xda-developers.com/showpost.php?p=33593548&postcount=1130
no sound - poor in/out sound on CALLs
http://forum.xda-developers.com/showpost.php?p=33630013&postcount=1395
blinking screen on "screen off"
http://forum.xda-developers.com/showpost.php?p=33629455&postcount=1391
Hope it helps!
Good thread.
My favourite app for logs on the go is Lumberjack.
For logcatting at the PC I think "adb logcat" via cmd / terminal is better than an app (see torq1337's second post).
What's important: A normal logcat can be useless in some cases.
For audio, calls and anything else radio related you should add a radio logcat as well. (adb logcat -b radio).
If you got a bsod, kernel panic, or sth else that results in a bsod or phone restarting than you should post the last_kmsg.
Get it with Lumberjack or manually in the Terminal by typing "su" and "cat /proc/last_kmsg > /sdcard/last_kmsg.txt"
Dont forget to logcat
I updated my previous post now.
I am posting again to push this thread as I personally belive that most people are unable to do so because that some people out there in our nation don't have maps and that I belive that our education people who are flashing custom ROMs should know how to give developers some valid feedback - and you can learn how to logcat in 5 minutes.
tonyp said:
I updated my previous post now.
I am posting again to push this thread as I personally belive that most people are unable to do so because that some people out there in our nation don't have maps and that I belive that our education people who are flashing custom ROMs should know how to give developers some valid feedback - and you can learn how to logcat in 5 minutes.
Click to expand...
Click to collapse
Im gonna cry xDxDxDxD
Sent from my LG-P990 using xda app-developers app
Hi, maybe you would like to include my tool as well, AIOlog, as it not only logs logcat(with the -b radio for radio issues as well), but dmesg, kmsg and last_kmsg as well
tonyp said:
If you got a bsod, kernel panic, or sth else that results in a bsod or phone restarting than you should post the last_kmsg.
Get it with Lumberjack or manually in the Terminal by typing "su" and "cat /proc/last_kmsg > /sdcard/last_kmsg.txt"
Click to expand...
Click to collapse
What /proc/last_kmsg? (It doesn't appear to exist, on my phone at least.)
withoutwings said:
What /proc/last_kmsg? (It doesn't appear to exist, on my phone at least.)
Click to expand...
Click to collapse
It would be removed in a restart but still, you can retrieve the /proc/kmsg instead(better than none, I suppose, just more work for the devs )
wcypierre said:
It would be removed in a restart but still, you can retrieve the /proc/kmsg instead(better than none, I suppose, just more work for the devs )
Click to expand...
Click to collapse
No, /proc/kmesg is reset upon a restart. The whole point of last_kmesg is in the case of a crash, it is there upon the next boot so you can find out what happened. But on CM10 it doesn't appear to exist. I read somewhere this could mean the RAM Console isn't set up properly?
Hi,
I am building my new CM9 rom for Shakira but on linux mint 14 I have a big problem with this error :
http://pastebin.com/kpprcWcA
I used MiniCM surouces
pastebin not open :S
frameworks/base/media/libstagefright/OMXCodec.cpp:2546: warning: enumeral mismatch in conditional expression: '<anonymous enum>' vs 'OMX_COLOR_FORMATTYPE'
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec:nEvent(OMX_EVENTTYPE, OMX_U32, OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3333: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec:nCmdComplete(OMX_COMMANDTYPE, OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3513: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'bool android:MXCodec::flushPortAsync(OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3828: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec::drainInputBuffers()':
frameworks/base/media/libstagefright/OMXCodec.cpp:3963: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In function 'const char* android::colorFormatString(OMX_COLOR_FORMATTYPE)':
frameworks/base/media/libstagefright/OMXCodec.cpp:5427: warning: comparison between 'enum OMX_COLOR_FORMATTYPE' and 'enum OMX_QCOM_COLOR_FORMATTYPE'
make: *** [out/target/product/shakira/obj/SHARED_LIBRARIES/libstagefright_intermediates/OMXCodec.o] Error 1
make: *** Waiting for unfinished jobs....
[email protected] ~/cm9 $
This is error code
I had a similar problem except that I did not want to load at all
"frameworks / base / media / libstagefright / OMXCodec.cpp: In member function 'bool android :: eek: MXCodec :: flushPortAsync (OMX_U32)'"
and stopped and also used to use Linux, so we tried it on ubuntu and there was no problem with you more, but this is different ...
can do it on ubuntu like me
I do not want to install a new system ...
Everything can be solved without re installation - I know this from experience!
Does anyone else have any other ideas?
Have a look here Soniakos
Try using make -j1
Ubuntu rullez i know it
Yeah Thanks !
I build CM9
surouces for my CM9 is posted on my team github
github.com/MimiTeam
Hey cool,
What solved the error?
Not working yet !
I thinked working but I see this error now :/
Soniakos said:
frameworks/base/media/libstagefright/OMXCodec.cpp:2546: warning: enumeral mismatch in conditional expression: '<anonymous enum>' vs 'OMX_COLOR_FORMATTYPE'
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec:nEvent(OMX_EVENTTYPE, OMX_U32, OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3333: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec:nCmdComplete(OMX_COMMANDTYPE, OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3513: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'bool android:MXCodec::flushPortAsync(OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3828: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec::drainInputBuffers()':
frameworks/base/media/libstagefright/OMXCodec.cpp:3963: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In function 'const char* android::colorFormatString(OMX_COLOR_FORMATTYPE)':
frameworks/base/media/libstagefright/OMXCodec.cpp:5427: warning: comparison between 'enum OMX_COLOR_FORMATTYPE' and 'enum OMX_QCOM_COLOR_FORMATTYPE'
make: *** [out/target/product/shakira/obj/SHARED_LIBRARIES/libstagefright_intermediates/OMXCodec.o] Error 1
make: *** Waiting for unfinished jobs....
[email protected] ~/cm9 $
This is error code
Click to expand...
Click to collapse
No this is not error... This is only warning....
The real error here:
Code:
target thumb C++: libstagefright <= frameworks/base/media/libstagefright/SurfaceMediaSource.cpp
frameworks/base/media/libstagefright/OMXCodec.cpp:2351:2: error: #endif without #if
and here:
Code:
frameworks/base/media/libstagefright/OMXCodec.cpp:2340: error: 'kRequiresStoreMetaDataBeforeIdle' was not declared in this scope
I hope how this help If not, I will see your repos, but first try to fix you..
Ok but now I installed Ubuntu 10.04 (On this I created my first rom Ice Elite CM9) on this Ubuntu I haven't errors...
And now I have some next problems but now with libusbx :/
I installed Ubuntu and I want to install flashtool... but I have a error with libusb, but I installed in termianl is :
[email protected]:/home/zodex/ft# ./FlashTool
Running as root.
JAVA_HOME not set. Using default value : ./x10flasher_lib/linjre64
Libusb not found. Minimum libusb version is 1.0.14
It can be downloaded on http://www.libusbx.org
Can you help me now ?
Soniakos said:
Ok but now I installed Ubuntu 10.04 (On this I created my first rom Ice Elite CM9) on this Ubuntu I haven't errors...
And now I have some next problems but now with libusbx :/
I installed Ubuntu and I want to install flashtool... but I have a error with libusb, but I installed in termianl is :
[email protected]:/home/zodex/ft# ./FlashTool
Running as root.
JAVA_HOME not set. Using default value : ./x10flasher_lib/linjre64
Libusb not found. Minimum libusb version is 1.0.14
It can be downloaded on http://www.libusbx.org
Can you help me now ?
Click to expand...
Click to collapse
http://www.libusbx.org
Visit the site, download the source, then build lubusbx
install it then restart pc...
I installed this :/
But error is :/
And I have next error :
[email protected]:~/cm9$ repo init -u git://github.com/zodex/android.git -b ics
fatal: git 1.7.2 or later required
OMG ! Why errors ?
Soniakos said:
I installed this :/
But error is :/
And I have next error :
[email protected]:~/cm9$ repo init -u git://github.com/zodex/android.git -b ics
fatal: git 1.7.2 or later required
OMG ! Why errors ?
Click to expand...
Click to collapse
needed newer version of git...
sudo apt-get install git-core
if says how the latest version installed:
https://launchpad.net/~git-core/+archive/candidate
install 1.8 from here
I have error !
Bro help me please...
make: *** [out/target/product/shakira/obj/SHARED_LIBRARIES/libstagefright_intermediates/OMXCodec.o] Error 1
make: *** Waiting for unfinished jobs....
This is not like me ...
Can u help me ?
In frameworks/base/media/libstagefright/OMXCodec.cpp find this: (Line 2337-2351)
Code:
#if !defined(QCOM_LEGACY_OMX) && !defined(STE_HARDWARE)
if ((mFlags & kStoreMetaDataInVideoBuffers)
#else
if (!(mQuirks & kRequiresStoreMetaDataBeforeIdle)
&& (mFlags & kStoreMetaDataInVideoBuffers)
#endif
&& portIndex == kPortIndexInput) {
LOGW("Trying to enable metadata mode on encoder");
err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
if (err != OK) {
LOGE("Storing meta data in video buffers is not supported");
return err;
}
}
#endif
Then replace with this:
Code:
#ifndef QCOM_LEGACY_OMX if ((mFlags & kStoreMetaDataInVideoBuffers)
&& portIndex == kPortIndexInput) {
LOGW("Trying to enable metadata mode on encoder");
err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
if (err != OK) {
LOGE("Storing meta data in video buffers is not supported");
return err;
}
}
#endif
Very Thanks bro !
Sorry bro's but I have new problem :/
in console :
running: java -Xmx512m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpNRP2MT out/target/product/shakira/cm_shakira-ota-eng.zodex.zip
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2798)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:111)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:178)
at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:135)
at java.util.zip.ZipOutputStream.write(ZipOutputStream.java:289)
at com.android.signapk.SignApk.copyFiles(SignApk.java:422)
at com.android.signapk.SignApk.main(SignApk.java:490)
ERROR: signapk.jar failed: return code 1
make: *** [out/target/product/shakira/cm_shakira-ota-eng.zodex.zip] Error 1
I know... This is java problem but I can't fix it :/
Can you help me ?
You can get OOM errors if you don't have a big enough swap partition when compiling.
Use 6GB swap on a build machine..
Your error may be from something else, i'm just pointing out another possible cause..
Anyone ever attempted to kang Keymaster Firmware from a different device? I have tried the firmware from bacon, hammerhead, and g3. I have tried with and without the TARGET_KEYMASTER_WAIT_FOR_QSEE flag.
See these commits:
https://github.com/blastagator/cm_d...mmit/a50026b03824e65e852dc975e369f89a6e8e33a6
https://github.com/blastagator/them...mmit/b5951a58a4df5cabc8f928fae2476629cc73b1fa
https://github.com/blastagator/LGG2_Kernel/commit/655b64e43cbcd4550671cadf8bc19b6c495b3190
The result is always the same in dmesg:
Code:
[0][4371: keystore]QSEECOM: qseecom_load_app: App (keymaster) does'nt exist, loading apps for first time
[0][4371: keystore]QSEECOM: qseecom_load_app: scm_call failed resp.result unknown, -12
[0][4371: keystore]QSEECOM: qseecom_ioctl: failed load_app request: -14
This is the only related thing I've found:
http://androidforums.com/threads/beta-4-4-2-stock-kitkat.952314/
Very old and no answer.
I suspect the firmware might be signed to the device type and thus we might be SOL, but I was bored and messing around. Alternatively, perhaps the kernel is missing something. I looked for commits that may be missing from qseecom.c and smc.c, but nothing jumped out at me.
Figured I'd post a dev thread and maybe we can find an answer.
edit: This is my cheat sheet to myself, so far, for how to add hardware crypto to a device:
Code:
Needed commits:
Probable problem: G2 has no keymaster firmware, need to borrow someone else's
See this commit:
https://github.com/blastagator/themuppets_proprietary_vendor_lge/commit/b5951a58a4df5cabc8f928fae2476629cc73b1fa
g2-common/g2-common-vendor-blobs.mk
+ vendor/lge/g2-common/proprietary/vendor/firmware/keymaster/keymaster.b00:system/vendor/firmware/keymaster/keymaster.b00 \
+ vendor/lge/g2-common/proprietary/vendor/firmware/keymaster/keymaster.b01:system/vendor/firmware/keymaster/keymaster.b01 \
+ vendor/lge/g2-common/proprietary/vendor/firmware/keymaster/keymaster.b02:system/vendor/firmware/keymaster/keymaster.b02 \
+ vendor/lge/g2-common/proprietary/vendor/firmware/keymaster/keymaster.b03:system/vendor/firmware/keymaster/keymaster.b03 \
+ vendor/lge/g2-common/proprietary/vendor/firmware/keymaster/keymaster.mdt:system/vendor/firmware/keymaster/keymaster.mdt \
And, actually put the files in that folder, so they get copied.
CRUCIAL: MUST match this name and path!!! (Other things like keymaste.mdt and such are for if the files are in the modem)
Also, symlinks are NOT needed if we put the file into proprietary like this!
Device commit:
https://github.com/blastagator/cm_device_lge_g2-common/commit/a50026b03824e65e852dc975e369f89a6e8e33a6
BoardConfig
+# Encryption / Keymaster
+TARGET_HW_DISK_ENCRYPTION := true
+TARGET_KEYMASTER_WAIT_FOR_QSEE := true
+
NOTE: Not sure about wait_for_qsee --- MAYBE needed????
g2.mk
+# Keystore
+PRODUCT_PACKAGES += \
+ keystore.msm8974
+
Note: The resulting /system image will have TWO keystore files, this is correct
I checked a bacon image to confirm there are supposed to be two. One labeled msm8974 & one labeled default
Probable needed kernel changes:
Config
-# CONFIG_DM_REQ_CRYPT is not set
+CONFIG_DM_REQ_CRYPT=y
-# CONFIG_CRYPTO_DEV_QCRYPTO is not set
+CONFIG_CRYPTO_DEV_QCRYPTO=y
If dm-req-crypt.c doesn't build, need this commit:
https://github.com/blastagator/LGG2_Kernel/commit/50ddb1a013065cefa35151e9ded72aadcd210611
(platform: msm: Fix compile when CONFIG_PFT is not set)
include/linux/pft.h
-static inline int pft_get_key_index(struct inode *inode, u32 *key_index,
+static inline int pft_get_key_index(struct bio *bio, u32 *key_index,
blastagator said:
Anyone ever attempted to kang Keymaster Firmware from a different device?
Click to expand...
Click to collapse
Maybe, you have to add something like this:
https://github.com/CyanogenMod/andr...mmit/595cf776441389d147f4b4e7ec316aa02d74d14e
Rangell11 said:
Maybe, you have to add something like this:
https://github.com/CyanogenMod/andr...mmit/595cf776441389d147f4b4e7ec316aa02d74d14e
Click to expand...
Click to collapse
That is for if the firmware is in the /modem partition. I know it's finding the firmware because if I remove the files the error messages go away and the keystore service crashes without a specific error.
I've also insured permissions 0644 on the files and I've put selinux in permissive to see if that would help, but same errors.
blastagator said:
I've also insured permissions 0644 on the files and I've put selinux in permissive to see if that would help, but same errors.
Click to expand...
Click to collapse
Like this??
http://review.cyanogenmod.org/#/c/155981/
Did you try this?
http://review.cyanogenmod.org/#/c/137146/
PS:
I think our G2 not support TARGET_KEYMASTER_WAIT_FOR_QSEE flag.
http://review.cyanogenmod.org/#/c/102410/
Rangell11 said:
Like this??
http://review.cyanogenmod.org/#/c/155981/
Click to expand...
Click to collapse
After clean boot I used "setenforce 0" to see if it would load after that. (keystore service keeps repeatedly attempting to load in the background and can be seen with 'dmesg'.) Disabling enforcing should have solved any selinux problem, but the same error persisted.
Rangell11 said:
Did you try this?
http://review.cyanogenmod.org/#/c/137146/
Click to expand...
Click to collapse
Keymaster is in the system partition and not the modem partition (for my tests anyway), so this wouldn't be needed. I will say the contact was not 'context=ubject_r:firmware_file:s0', it was listed as a regular system file, however, in permissive mode this should not matter. Maybe I will try another test when I have some time where the ROM is compiled permissive and the files have the correct context.
I don't think it is this issue though, as the keymaster firmware is found and qseecomd is attempting to load it.
Rangell11 said:
PS:
I think our G2 not support TARGET_KEYMASTER_WAIT_FOR_QSEE flag.
http://review.cyanogenmod.org/#/c/102410/
Click to expand...
Click to collapse
Thanks. I did some testing and tried both, no luck with either.
Looks like there are at least a couple updates to scm that I could try:
https://github.com/dorimanx/DORIMANX_LG_STOCK_LP_KERNEL/commits/master/arch/arm/mach-msm/scm.c
https://github.com/dorimanx/DORIMANX_LG_STOCK_LP_KERNEL/commits/master/drivers/misc/qseecom.c
Will try updating kernel when I have some free time.
edit: Pulled in a bunch of kernel changes and compiled the boot image to be permissive:
https://github.com/blastagator/LGG2_Kernel/commits/cm-13.0
Still the same error codes.
Code:
[ 0.480347 / 01-01 00:00:00.473] QSEECOM: qseecom_probe: support_bus_scaling=0x1
[ 0.480356 / 01-01 00:00:00.473] QSEECOM: qseecom_probe: disk-encrypt-pipe-pair=0x2
[ 0.480365 / 01-01 00:00:00.473] QSEECOM: qseecom_probe: file-encrypt-pipe-pair=0x0
[ 0.480374 / 01-01 00:00:00.473] QSEECOM: qseecom_probe: qsee-ce-hw-instance=0x0
[ 0.480382 / 01-01 00:00:00.473] QSEECOM: qseecom_probe: qseecom.appsbl_qseecom_support = 0x0
[ 0.480421 / 01-01 00:00:00.473] QSEECOM: qseecom_probe: secure app region addr=0x7b00000 size=0x500000
[ 3.174366 / 01-13 05:47:06.160] init: Starting service 'qseecomd'...
[ 3.207945 / 01-13 05:47:06.193] init: Starting service 'keystore'...
[ 3.221661 / 01-13 05:47:06.206] warning: `qseecomd' uses 32-bit capabilities (legacy support in use)
[ 3.476387 / 01-01 05:47:06.146] QSEECOM: qseecom_load_app: App (keymaster) does'nt exist, loading apps for first time
[ 3.476494 / 01-01 05:47:06.146] QSEECOM: qseecom_load_app: scm_call failed resp.result unknown, -12
[ 3.476511 / 01-01 05:47:06.146] QSEECOM: qseecom_ioctl: failed load_app request: -14
[ 3.477964 / 01-01 05:47:06.146] init: Service 'keystore' (pid 275) exited with status 1
[ 3.477985 / 01-01 05:47:06.146] init: Service 'keystore' (pid 275) killing any children in process group
The last 5 lines just repeat indefinitely.
.
blastagator said:
After clean boot I used "setenforce 0" to see if it would load after that. (keystore service keeps repeatedly attempting to load in the background and can be seen with 'dmesg'.) Disabling enforcing should have solved any selinux problem, but the same error persisted.
Click to expand...
Click to collapse
Do you know why they did not use this change for our G2?
http://review.cyanogenmod.org/#/c/89419/
http://review.cyanogenmod.org/#/c/89418/
Rangell11 said:
Do you know why they did not use this change for our G2?
http://review.cyanogenmod.org/#/c/89419/
http://review.cyanogenmod.org/#/c/89418/
Click to expand...
Click to collapse
qcrypto is currently disabled, so there wouldn't be a need to apply similar patches to the current kernel, unless HW encryption were figured out.
I added those two commits, but I doubt this is the issue.
@blastagator
I've pushed my keymaster to Github: https://github.com/GalaticStryder/hardware_qcom_keymaster
This is the one we use on bacon and onyx on AOSPA builds.
Backporting 3.10 qseecom isn't needed and probably will break the APIs the blobs were compiled for. I'm gonna test this on nougat as well right now.
I'd actually ask for your help on AOSPA, I've got a semi-working RIL and some other great stuff to play with but I can't get the built-in kernel to boot after flashing, only boots when flashing my kernel externally.
The image is bumped, the mkbootimg was revisited twice but there's no go. I don't want to ship a prebuilt image to workaround this. I've tried CM14 kernel with my GCC 4.9 patches for androidkernel- toolchain and Lambda as well.
GalaticStryder said:
@blastagator
I've pushed my keymaster to Github: https://github.com/GalaticStryder/hardware_qcom_keymaster
This is the one we use on bacon and onyx on AOSPA builds.
Backporting 3.10 qseecom isn't needed and probably will break the APIs the blobs were compiled for. I'm gonna test this on nougat as well right now.
I'd actually ask for your help on AOSPA, I've got a semi-working RIL and some other great stuff to play with but I can't get the built-in kernel to boot after flashing, only boots when flashing my kernel externally.
The image is bumped, the mkbootimg was revisited twice but there's no go. I don't want to ship a prebuilt image to workaround this. I've tried CM14 kernel with my GCC 4.9 patches for androidkernel- toolchain and Lambda as well.
Click to expand...
Click to collapse
Without going too far OT, do you have a thread for the AOSPA you're working on? Curious what manifest you're using.
re: keymaster - I pulled the blobs from Bacon and it looks like the cm-13 nightlies use the latest hardware_qcom_keymaster. I don't think there have really been any big changes to the API. I could be wrong though!
blastagator said:
Without going too far OT, do you have a thread for the AOSPA you're working on? Curious what manifest you're using.
re: keymaster - I pulled the blobs from Bacon and it looks like the cm-13 nightlies use the latest hardware_qcom_keymaster. I don't think there have really been any big changes to the API. I could be wrong though!
Click to expand...
Click to collapse
I'm making progress using everything from CAF and patching the needed parts on demand.
The stuff AOSPA already has in their Github I'm sending to Gerrit: https://gerrit.aospa.co/#/q/status:open
The parts I needed to dive deeper I've forked or created the repos manually: https://github.com/GalaticStryder
My next step is to "decommonize" the power package to be able to hint impulse instead of ondemand and to update MSM8974 code that is two years old.
The only problem I'm facing is that the otapackage seems to flash the boot.img in a bad manner, causing boot certification problem. If I manually flash the boot.img after the otapackage it works like a charm, the problem is somewhere in the boot flashing script part of the ota_from_target_files python script, might be pushing the boot.img using imgdiff and causing the bootloader to refuse due to mismatching certification inside the boot sector. This is my hypothesis but it might be what is happening.
GalaticStryder said:
I'm making progress using everything from CAF and patching the needed parts on demand.
The stuff AOSPA already has in their Github I'm sending to Gerrit: https://gerrit.aospa.co/#/q/status:open
The parts I needed to dive deeper I've forked or created the repos manually: https://github.com/GalaticStryder
My next step is to "decommonize" the power package to be able to hint impulse instead of ondemand and to update MSM8974 code that is two years old.
The only problem I'm facing is that the otapackage seems to flash the boot.img in a bad manner, causing boot certification problem. If I manually flash the boot.img after the otapackage it works like a charm, the problem is somewhere in the boot flashing script part of the ota_from_target_files python script, might be pushing the boot.img using imgdiff and causing the bootloader to refuse due to mismatching certification inside the boot sector. This is my hypothesis but it might be what is happening.
Click to expand...
Click to collapse
Well beyond the scope of my dive into android fun. Wish I could help! What is your ultimate goal? Paranoid Android?
It is also very exciting to see the push of Android stuff into the mainline kernel. Hope for the future!
Realized additional blobs for qseecom:
https://github.com/blastagator/them...mmit/09bc989cdb0db9bc47f7501dbf36be2a155ca168
Also, updated boardconfig since the bacon qseecomd supports TARGET_KEYMASTER_WAIT_FOR_QSEE
https://github.com/blastagator/cm_d...mmit/6ca7cd8835afa57ebec9b47fc56514d87ee95e34
Building now. Not sure if I can test tonight, but fingers crossed, maybe it will work!
No luck. Still the same errors:
Code:
12-31 23:22:39.385 2697 2697 I keystore: Found keymaster0 module Keymaster QCOM HAL, version 3
12-31 23:22:39.385 2697 2697 I SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 122: Creating device
12-31 23:22:39.385 2697 2697 D SoftKeymaster: system/keymaster/soft_keymaster_device.cpp, Line 123: Device address: 0xb6b64000
12-31 23:22:39.386 2697 2697 D QCOMKeyMaster: keymaster app is loaded
12-31 23:22:39.386 2697 2697 D QCOMKeyMaster: keymaster app got loaded at attempt number 0
12-31 23:22:39.386 2697 2697 D QSEECOMAPI: : QSEECom_get_handle sb_length = 0x2000
12-31 23:22:39.386 2697 2697 D QSEECOMAPI: : App is not loaded in QSEE
12-31 23:22:39.392 2697 2697 E QSEECOMAPI: : Error::Load image request failed ret = -1, errno = 14
12-31 23:22:39.392 2697 2697 E QSEECOMAPI: : Error::Loading image failed with ret = -1
12-31 23:22:39.393 2697 2697 D QSEECOMAPI: : QSEECom_get_handle sb_length = 0x2000
12-31 23:22:39.393 2697 2697 D QSEECOMAPI: : App is not loaded in QSEE
12-31 23:22:39.393 2697 2697 E QSEECOMAPI: : Error::Cannot open the file /firmware/image/keymaste.mdt
12-31 23:22:39.393 2697 2697 E QSEECOMAPI: : Error::Loading image failed with ret = -1
12-31 23:22:39.393 2697 2697 E QCOMKeyMaster: Loading keymaster app failed
12-31 23:22:39.393 2697 2697 E keystore: Error opening keystore keymaster0 device.
12-31 23:22:39.393 2697 2697 E keystore: keystore keymaster could not be initialized; exiting
Guessing there is some sort of signature check that is matching the expected device to the keymaster firmware file. Unfortunately qseecomapi and keymaster are closed source, so it is kind of a guessing game...
Code:
/**
* @brief Open a handle to the QSEECom device.
*
* - Load a secure application. The application will be verified that it is
* secure by digital signature verification.
* Allocate memory for sending requests to the QSAPP
*
* Note/Comments:
* There is a one-to-one relation for a HLOS client and a QSAPP;
* meaning that only one app can communicate to a QSAPP at a time.
*
* Please note that there is difference between an application and a listener
* service. A QSAPP must be loaded at the request of the HLOS,
* and all requests are orginated by the HLOS client.
* A listener service on the otherhand is started during start-up by a
* daemon, qseecomd.
*
* A HLOS application may create mutiple handles to the QSAPP
*
* @param[in/out] handle The device handle
* @param[in] fname The directory and filename to load.
* @param[in] sb_size Size of the shared buffer memory for sending requests.
* @return Zero on success, negative on failure. errno will be set on
* error.
*/
int QSEECom_start_app(struct QSEECom_handle **clnt_handle, const char *path,
const char *fname, uint32_t sb_size);
Perhaps something in one of the .prop files could be changed to trick the app into passing a device check, but again, this is all very speculative.
blastagator said:
Anyone ever attempted to kang Keymaster Firmware from a different device? I have tried the firmware from bacon, hammerhead, and g3. I have tried with and without the TARGET_KEYMASTER_WAIT_FOR_QSEE flag.
The result is always the same in dmesg:
Code:
[0][4371: keystore]QSEECOM: qseecom_load_app: App (keymaster) does'nt exist, loading apps for first time
[0][4371: keystore]QSEECOM: qseecom_load_app: scm_call failed resp.result unknown, -12
[0][4371: keystore]QSEECOM: qseecom_ioctl: failed load_app request: -14
Click to expand...
Click to collapse
Hello @blastagator,
were you able to fix that Keymaster Issue , if so mind telling us how ?
Because , iam facing similar issues in YU4711 (jalebi)
sooorajjj said:
Hello @blastagator,
were you able to fix that Keymaster Issue , if so mind telling us how ?
Because , iam facing similar issues in YU4711 (jalebi)
Click to expand...
Click to collapse
No. Tried several things with no luck.
What is a keymaster firmware?
And what is it good for?
wq0913562 said:
What is a keymaster firmware?
And what is it good for?
Click to expand...
Click to collapse
Maybe this config is need for porting firmware from different devices.
wq0913562 said:
What is a keymaster firmware?
And what is it good for?
Click to expand...
Click to collapse
cryerenable said:
Maybe this config is need for porting firmware from different devices.
Click to expand...
Click to collapse
No, it is used to enable hardware backed keystore (i.e. hardware accelerated encryption)
blastagator said:
No, it is used to enable hardware backed keystore (i.e. hardware accelerated encryption)
Click to expand...
Click to collapse
hello
i'm facing a similar problem on my lineage 13 port for the lg stylo 2 plus the qseecomapi is keeping looking for the keymaste.mdt file
E QSEECOMAPI: Error::Cannot open the file /firmware/image/keymaste.mdt errno = 2
E QSEECOMAPI: Error::Loading image failed with ret = -1
Click to expand...
Click to collapse
and our device does not have one do you know how to bybass this, ty.
messi2050 said:
hello
i'm facing a similar problem on my lineage 13 port for the lg stylo 2 plus the qseecomapi is keeping looking for the keymaste.mdt file
and our device does not have one do you know how to bybass this, ty.
Click to expand...
Click to collapse
I got frustrated with it. Only other idea I had was to port all common blobs from similar device and see if that works.
blastagator said:
I got frustrated with it. Only other idea I had was to port all common blobs from similar device and see if that works.
Click to expand...
Click to collapse
Are you still active?
Just found this. Not sure if it can help.
http://bits-please.blogspot.de/2016/06/extracting-qualcomms-keymaster-keys.html
https://android.googlesource.com/platform/hardware/qcom/keymaster/+/master
Maybe I'll give it a try to port keymaster now that we have updated 3.4.113 kernel...
Hi All,
Need some help in getting my wifi and bluetooth back to normal. It's over a month now and all my attempts have failed! I would really appreciate some ideas here. Thank you, and sorry for long thread.
Phone info:
Samsung galaxy S6 SM-G920T (T-Mobile), firmware version: NRD90M.G920TUVS6FRC1, stock OS with root and TWRP recovery
Situation:
Bluetooth does not turn ON at all
Wifi takes a long time to turn ON, and only way to turn it ON is from settings (quick access tile does not work)
Wifi does not remember any password
All other functions work correctly, and the phone is now lightning fast after factory reset
Details and Steps Taken:
Rooted my phone a month ago, and started changing config. Took OS and app backup only, but no EFS/other partition backup.
Turned OFF "Allow OEM Unlock" - don't ask why
This (I believe) resulted in WIFI not remembering passwords, so after reviewing potential solutions, I changed "Secure.Storage" value in build.prop to "0"
Took backup of WPA_supplicant.conf and deleted the file
Problem was not resolved, and I had to restart the phone
Restart resulted in FRP lock - to resolve this I re-installed the OS from stock firmware from Sammobile; Yet - no luck on wifi and bluetooth, error still persisted
I reviewed the system log and found tons of errors (listed below). Based on errors, I tried:
Copying libbluetooth_jni.so library file to '/system/lib' and '/system/vendor/lib' folders
Changing 'semGetAllowBluetoothMode' value to "True" - this reduced some errors (refer below)
Validating file / folder permissions for the /efs partition - they seem to be appropriate, but I cannot confirm since there is no reference
I have also tried using SmartSwitch - but it doesn't recognize phone in download mode. It backups the apps, etc. though
Also wiped the system partition once using TWRP, and re-imaged. Yet no luck.
My hunch currently for these errors is:
The /efs permissions became incorrect or partition became corrupt due to some configuration I performed
The system lost its encryption key when the "OEM unlock" was disabled, and thus cannot read any files from the /system and /efs partition (the device was NOT encrypted, but I am thinking /efs is always encrypted by system - correct me if I am wrong)
System log snippets:
Bluetooth Related Log:
Bluetooth GATT service:
Code:
BtGatt.GattService: [GSIM LOG]: gsimLogHandler: null, msg: MESSAGE_LOAD_PREF
Bluetooth Adapter Service:
Code:
BluetoothAdapterService: onProfileServiceStateChanged() serviceName=com.android.bluetooth.gatt.GattService, state=12, Message sending
semGetAllowBluetoothMode:
Resolved this error by updating the value to "True" in build.prop. Was this the right fix, or is it supposed to get value = 2.
Code:
DevicePolicyManagerService: semGetAllowBluetoothMode - value retunrs : 2
Wifi error log:
Code:
WifiHW : ##################### set firmware type 0 #####################
WifiHW : ==========[WIFI] SEMCO MODULE ===========
WifiHW : TEMP_FAILURE_RETRY complete
NetworkManagement: wifiFirmwareReload Error reloading wlan0 fw in STA mode: event = 200 208 Softap operation succeeded
WifiMonitor: killSupplicant p2ptrue init.svc.wpa_supplicant=unknown init.svc.p2p_supplicant=unknown
WifiHW : supplicant_name : p2p_supplicant
WifiHW : Unable to open connection to supplicant on "@android:wpa_wlan0": No such file or directory
WifiWatchdogStateMachine: Unhandled message { when=0 what=135173 arg1=2 target=com.android.internal.util.StateMachine$SmHandler } in state NotConnectedState
WifiMonitor: startMonitoring(wlan0) failed!
WifiStateMachine: Failed to setup control channel, restart supplicant
WifiHAL : wifi_event_loop: Read after POLL returned 4, error no = 0
WifiHAL : wifi_cleanup: Read after POLL returned 4, error no = 2
WifiHAL : Event processing terminated
NetworkManagement: wifiFirmwareReload Error reloading wlan0 fw in STA mode: event = 200 219 Softap operation succeeded
NetworkManagement: wifiFirmwareReload Error reloading wlan0 fw in STA mode: event = 200 229 Softap operation succeeded
NetworkManagement: wifiFirmwareReload Error reloading wlan0 fw in STA mode: event = 200 240 Softap operation succeeded
NetworkManagement: wifiFirmwareReload Error reloading wlan0 fw in STA mode: event = 200 248 Softap operation succeeded
WifiHAL : wifi_event_loop: Read after POLL returned 4, error no = 11
NetworkManagement: wifiFirmwareReload Error reloading wlan0 fw in STA mode: event = 200 256 Softap operation succeeded
WifiStateMachine: Failed 6 times to start supplicant, unload driver
WifiStateMachine: sendErrorBroadcast code:10
WifiController: WifiControllerWifi turn on failed
Hi everyone, I'm having issues with compiling Magisk from a fresh environment. Has anyone had success building the latest Magisk, if so, what did your environment look like? Here is what I did...
Fresh Docker Ubuntu Instance
Installed Python3.7
Installed Android SDK Tools
Installed "ndk-bundle" "platform-tools" from sdkmanager
Downloaded/Extracted latest FrankeNDK
Set ANDROID_HOME to sdk path, and ANDROID_NDK_HOME to FrankeNDK path
Full clone w/submodule of Magisk Repo
Setup config.prop
python3 build.py -v binary
However this always produces the same linker error:
Code:
[armeabi-v7a] Executable : busybox
[armeabi-v7a] SharedLibrary : libsqlite.so
/root/dev/android/FrankeNDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/.[x86] SharedLibrary : libsqlite.so
./../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi-v7a/objs/sqlite/stubs/sqlite3_stub.o:1:3: invalid character
/root/dev/android/FrankeNDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi-v7a/objs/sqlite/stubs/sqlite3_stub.o:1:3: syntax error, unexpected $end
/root/dev/android/FrankeNDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi-v7a/objs/sqlite/stubs/sqlite3_stub.o: not an object or archive
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libsqlite.so] Error 1
make: *** Waiting for unfinished jobs....
/root/dev/android/FrankeNDK/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: ./obj/local/x86/objs/sqlite/stubs/sqlite3_stub.o:1:3: invalid character
/root/dev/android/FrankeNDK/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: ./obj/local/x86/objs/sqlite/stubs/sqlite3_stub.o:1:3: syntax error, unexpected $end
/root/dev/android/FrankeNDK/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: ./obj/local/x86/objs/sqlite/stubs/sqlite3_stub.o: not an object or archive
collect2: error: ld returned 1 exit status
make: *** [obj/local/x86/libsqlite.so] Error 1
make: Leaving directory `/root/dev/android/Magisk/native'
Build binary failed!
I opened an issue on GitHub:1167 and TJW indicated that the linker is missing flags -flto. However, I didn't mess with anything and the default file of /native/jni/Application.mk:APP_LDFLAGS := -flto contains those flags. Is there anything else I could try to get the build to work? Thanks