Long boot fix for CyanogenMod - Nexus 9 General

I think that i have found the cause of 5 minute boot time on CyanogenMod that is discussed in official CM thread in development forum. Unfortunately i can not post there, so i will post here in hope that someone notices and reposts into that thread.
The loop is caused by this line of code:
https ://github.com/CyanogenMod/android_system_core/blob/cm-12.1/init/devices.c#L1081
I guess that this code tries to wait for /system to be mounted. It checks if it's mounted by checking whether /system/etc/firmware exists. That directory simply does not exist in flounder's system image. I am not sure whether the condition is wrong, or the directory should actually exist or some firmware file the system is searching for is missing.
Doing this
Code:
touch /system/etc/firmware
fixes the long boot and ANR dialog on boot up. Also you can put this
Code:
#!/sbin/sh
. /tmp/backuptool.functions
if [ "$1" == "restore" -a ! -e "$S/etc/firmware" ]; then
touch "$S/etc/firmware"
fi
into /system/addon.d/50-long-boot-fix.sh and make it executable to make the fix persistent across system updates. Or, better, notify someone who can actually fix this.

Come on people, 76 views and no one with 10+ posts bothered to post a link into this thread? Nexus 9 is now removed from the list of devices to receive nightly builds because of this bug. I know that i can fill a bug report in CM bug tracker, but i think Nexus 9 is maintained by someone from outside of CM team, so it might not be the best place to notify the maintainer.
Someone, please post a link into that thread.

Exactly. This was actually mentioned in the official CM thread. Someone tried to submit a fix reverting this commit, but CM devs did not like it (see http ://review.cyanogenmod.org/#/c/106264/ ). I just looked through the diff and that if-goto-loop quickly caught my attention. And then i figured out that it may loop forever if that folder does not exist.
That cycle loops forever because it is not able to find a firmware file. I do not know whether it is ok or some file is actually missing. Creating an empty /system/etc/firmware file just makes it give up. It also logs which firmware file was not found when it gives up, but i did not find that line in both logcat and dmesg.
I think i will try to create a bug report in CM bug tracker today or tomorrow.

We could probably fix this through the device tree by adding that touch command to the init.

Well, as i have said, i have no idea what the real fix should be. I consider creating an empty /system/etc/firmware to be a temporary workaround. There might be some firmware files missing or maybe /system/etc/firmware should actually be e.g. a symlink to /vendor/firmware (this does not seem to make a lot of sense though). Does anyone know where to find that INFO() printed in this line:
https ://github.com/CyanogenMod/android_system_core/blob/cm-12.1/init/devices.c#L1089
I can not find it in dmesg or logcat.
Anyway, if you are going to fix it by just creating a file, then maybe better at least create an empty directory . Also i guess you can not really touch it in init, because /system is read only.
Should i report this to CM bug tracker?

awesome.
http://review.cyanogenmod.org/#/c/112675/
http://review.cyanogenmod.org/#/c/112678/
many thanks to @vovams

Great! Just installed 20151014 nightly and everything seems to be fine. Good job, guys!

Finally!!!! Few months later back to cm
WOW, THANKS TO THE GUY WHOM SUBMITTED THE BUG!!!!, fast boot time, last time 10min each reboot really annoying, im running fresh 2015-10-16 however the only thing i encountered which im fine is internal problem thing, although i have the the latest bootloader for nexus 9 (lmy48t)

HasnaCuz said:
WOW, THANKS TO THE GUY WHOM SUBMITTED THE BUG!!!!, fast boot time, last time 10min each reboot really annoying, im running fresh 2015-10-16 however the only thing i encountered which im fine is internal problem thing, although i have the the latest bootloader for nexus 9 (lmy48t)
Click to expand...
Click to collapse
Same here, no more long boot, but I always get the message internal problem also.
Enviado desde mi iPhone utilizando Tapatalk

HasnaCuz said:
WOW, THANKS TO THE GUY WHOM SUBMITTED THE BUG!!!!, fast boot time, last time 10min each reboot really annoying, im running fresh 2015-10-16 however the only thing i encountered which im fine is internal problem thing, although i have the the latest bootloader for nexus 9 (lmy48t)
Click to expand...
Click to collapse
You also need the latest vendor image. And there is a fix for it as well. I'll poke around and find you a link.
Sent from my Nexus 9

Related

[Dev] Call for test, ril wrapper for pppd, 18/11/2010: test kernel 2K and wrapper 0.7

Dear All,
I modified libhtc_ril_wrapper to possibly fix the pppd disconnection problem.
As I don't have 3G at home, I'd appreciate some feedback to help me diagnose potential issues with it.
WARNING, there are reports of crash at boot, do a backup of your whole android directory before trying this!
Don't run this if don't have adb and know how to use it.
See post #2 for history and more information
To keep the thread clean, please only report problems and try to avoid unnecessary talking about it.
Don't report problem without logs, it won't help.
This is highly experimental, don't use it if you don't know what you're doing.
To install, just rename your previous wrapper and copy the attached libhtc_ril_wrapper.so to the same location.
Here are the logs I need:
Code:
logcat -d -v time -b radio > /sdcard/pppd_radiolog.txt
logcat -d -v time -s pppd:v > /sdcard/pppd_mainlog.txt
dmesg > /sdcard/pppd_dmesg.txt
/bin/ifconfig > /sdcard/pppd_if.txt
ps > /sdcard/pppd_ps.txt
Please review pppd_radiolog.txt before posting, it could show some personal stuff like phone numbers, feel free to remove these lines or refrain to post them
Wait 20 seconds to let the wrapper relaunch pppd and check connection again. If it doesn't work, please send the logs.
Grab the three files from sdcard root and post them back here.
I'm also experimenting some kernel tuning that can be activated with this:
Code:
echo 8 8 > /proc/sys/vm/lowmem_reserve_ratio
echo 8192 > /proc/sys/vm/min_free_kbytes
Nothing conclusive yet, but it seems to help.
Thanks to Hastarin, I also attached his root package that includes wrapper with ppp options and tweaks.
Thanks,
LeTama
History
2010/11/24 Hastarin root package (ppp_tweaks_root.zip) added, it includes wrapper, ppp options and kernel tweaks.
2010/11/18 new kernel and wrapper v0.7
new test kernel with smd_tty trimmed to 2K.
wrapper fake data call list has now active=1
v0.6 - 2010/11/17
same as 0.5 without the stupid bug that trashed the code.
2010/11/16
Test kernel to diagnose the "tty_prepare_flip_string fail" error with high cpu usage, please check post here for detail
v0.5: delay changed for deactivate and fake data call list added.
v 0.4 - 2010/11/14
Changed tag to RIL_WRAP to improve log reading
Improved log messages
Signal tracking to try to find who kills wrapper monitor
Lower delay between AT commands
Sleep delays and sequence reworked
Tentative improvement to re-establish ppp
Tentative fix for wrapper monitor death with extra debug messages
Memory leak on deactivate fixed
v 0.3 - 2010/11/02
added network state detection to avoid doing ATD too early resulting in getting stuck.
changed nand handling, proper initialization for nand is now done by adding "nand_init" to wrapper command line in init.rc.
(Ex: service ril-daemon /system/bin/rild -l /system/lib/libhtc_ril_wrapper.so -- -d /dev/smd0 nand_init)
added a wrapper command line switch "rmnet_mode" for rmnet, "active" file in /etc/ppp is no longer used nor required for ppp.
v 0.2 - 2010/10/31, first release
restarts pppd when it dies
Troubleshooting
How to verify if wrapper is running:
In radio log (logcat -b radio -d), my wrapper write this at startup (do it quickly after boot, it disappears quite quickly over time):
Code:
----------- HTC Ril Wrapper v0.7 starting ------------
and you should have debug messages there starting with RIL_WRAP, not RILW.
Crash on boot (v0.2):
Check if your kernel command line in startup.txt has "nand_boot=0". If it still doesn't boot, try to remove any other option and only keep "nand_boot=0"
Troubleshooting crash on boot
Even if it crashes very early, it should be possible to grab early logs. To do that, start adb *before* starting android with this command:
adb logcat -b radio -v time
adb should say *waiting for device*, you can then start Android. Adb will show some logs before the device crashes. Please send me the logs if you are able to do so.
If you see [email protected]=0 in the log, it means that the wrapper thinks you are on nand, and that's why you device crashes.
pppd-fix
I saw in some logs that some are using Cass pppd-fix script with the wrapper. Cass script and wrapper are doing the same thing and are conflicting. So, if you have installed the pppd-fix, please remove it, it won't play nice with the wrapper.
Known issues
2010/11/14: pppd first launch fails after boot. wrapper catch it, however it would be nice to have it working the first time. It adds few seconds to re-establish data, so be patient!
2010/11/14: high cpu consumption. The issue comes from memory management in kernel, we still have to figure out what's happening.
2010/11/04: pppd monitor process seems to die from time to time. I don't know why yet, looking at the code it doesn't seem possible. I'll look into it and maybe release a new version with more debug traces. You can see it in terminal by doing a 'ps', it will show one of the rild as zombie ( Z instead of S just before process name). The easiest way to restart it is to do a data off/on.
Hi letama,
Currently i'm using ppp-fix. Can I contribute here? or I have to remove the script from init.rc then I reboot the device so I can contribute?
nice
try now
Hi LeTama,
thank you for your work.
It seems that your fix work. I don't notice any dropouts.
But that could be a reason of the issue that the phone does not start android.
It boots WM then haret and then it freezes on the black screen with the green HTC logo...
I use [UPD][BUILD][30.10.10] MDJ FroYo Revolution v.1.1 [kernel: hastarin R8] and after copying your file with ES explorer I've rebooted the phone and now it hangs on the htc screen after running haret...
But the good news are, the dropouts are gone
Sorry but I can't post logcat messages without booting android complete
Which build do you recommend?
funky81 said:
Hi letama,
Currently i'm using ppp-fix. Can I contribute here? or I have to remove the script from init.rc then I reboot the device so I can contribute?
Click to expand...
Click to collapse
Hi Funky81,
Well, it's better to remove ppp-fix as I do the same thing in the wrapper now. The way it's done in the wrapper is cleaner and should have the same effect.
You can just comment it in your init.rc if you want to keep it, but keeping it active could have side effects.
Crusoe86 said:
Hi LeTama,
thank you for your work.
It seems that your fix work. I don't notice any dropouts.
But that could be a reason of the issue that the phone does not start android.
It boots WM then haret and then it freezes on the black screen with the green HTC logo...
I use [UPD][BUILD][30.10.10] MDJ FroYo Revolution v.1.1 [kernel: hastarin R8] and after copying your file with ES explorer I've rebooted the phone and now it hangs on the htc screen after running haret...
But the good news are, the dropouts are gone
Sorry but I can't post logcat messages without booting android complete
Which build do you recommend?
Click to expand...
Click to collapse
You have adb on you pc ? You should be able to run adb even if android is not fully started.
With it, you can get logcat and even rename back the old wrapper to see if it starts booting again.
So far it's working very nice, I will be out and about today and will try to crash your masterpiece...
I just wanted to publicly say a big "THANKS" for helping everyone out with the PPP issues, you have always listened when I've popped in on the IRC and asked questions and relayed info from XDA. Thanks for your time and expertise. Your DEV work has not gone unnoticed!
Now get ready to fix the wrapper after we all crash it. Or read all the post on how your wrapper has made their microwave burn their popcorn and how their wifi can now communicate with the satellites....bla....bla.......
noellenchris said:
So far it's working very nice, I will be out and about today and will try to crash your masterpiece...
I just wanted to publicly say a big "THANKS" for helping everyone out with the PPP issues, you have always listened when I've popped in on the IRC and asked questions and relayed info from XDA. Thanks for your time and expertise. Your DEV work has not gone unnoticed!
Now get ready to fix the wrapper after we all crash it. Or read all the post on how your wrapper has made their microwave burn their popcorn and how their wifi can now communicate with the satellites....bla....bla.......
Click to expand...
Click to collapse
Hehe...that may not happen. At least for my copy. I am giving mine a thorough flogging with Speed Test and can't make the data freeze. And I'm seeing over 3000Kb/s HSDPA speeds...with the common, single APN settings. By the way, I'd like to thank both of you for your hard efforts.
testing...
testing now... thanks!
letama said:
You have adb on you pc ? You should be able to run adb even if android is not fully started.
With it, you can get logcat and even rename back the old wrapper to see if it starts booting again.
Click to expand...
Click to collapse
Sadly I got the same problem and it's the initial logo screen it's hanging at, not the boot animation, so no adb shell is possible. I did get you a dmesg via andlog though (attached).
Time to restore a copy of system.ext2 that I backed up before... Oh wait, I didn't. Oh well, time to restore the copy from the original build.
To anyone trying this I suggest first taking a copy of the system.ext2 from your Android folder, just in case. At least if you'd tweaked anything in it already (build.prop for example) like I had.
On the plus side I did setup a gscript with the commands you noted and test it before I rebooted the phone. From that I noticed I had some errors in my logs already. I've attached them in case they help. NOTE: This is on my kernel and it almost seems like your patch to hi/lo-mem and my patch to move ppp compression to hi-mem have countered each other. It's getting late here so I'll have to continue experiments tomorrow after work.
Hope this helps
Here you go. I had a disconnect and sync fail (Exchange Server).
And Another
Same as before
Dr Nicky said:
Here you go. I had a disconnect and sync fail (Exchange Server).
Click to expand...
Click to collapse
Dr Nicky said:
Same as before
Click to expand...
Click to collapse
crashes when your on exchange? were you doing anything else. Hmm, sounds like the same used to happen to me sometimes. But it's working ok now with this wrapper. Did you try to repush the wrapper on reboot?
hastarin said:
Time to restore a copy of system.ext2 that I backed up before... Oh wait, I didn't. Oh well, time to restore the copy from the original build.
Click to expand...
Click to collapse
Hastarin, you can mount the ext2 on your pc and replace the file ?
Your log show a modem crash, weird.
letama said:
Hastarin, you can mount the ext2 on your pc and replace the file ?
Your log show a modem crash, weird.
Click to expand...
Click to collapse
Yeah, mdeejay even sent me a whole build he had working with the wrapper and I got the same crash.
I'm back up and running now. Restored the original system.ext2 from the build and reapplied my few tweaks.
FYI I'm going to try the following in my init.rc
Code:
# Tweak inode caches
write /proc/sys/vm/vfs_cache_pressure 200
Based on this:
http://www.cyberciti.biz/faq/linux-page-allocation-failure-erro/
But now it's approaching 4am here and I really must sleep.
PS Giving up on testing your wrapper for now. It just really doesn't like me.
noellenchris said:
crashes when your on exchange? were you doing anything else. Hmm, sounds like the same used to happen to me sometimes. But it's working ok now with this wrapper. Did you try to repush the wrapper on reboot?
Click to expand...
Click to collapse
They were both forced repush. The only way I could get the radio back on line was to do a Hot Reboot.
Dr Nicky said:
Same as before
Click to expand...
Click to collapse
Thanks for the logs! Unfortunately, they are showing that the wrapper restarts pppd and it doesn't seem to go bad. Could you give me the dmesg also ?
Could you also show me /bin/ifconfig result ?
LeTama
I'm having the same issue as Hastarin - well, I've been using his latest kernel. Doesn't even boot.
Instead of restoring system.ext2, I just pushed an older lib and went back to the old method of restarting pppd.
My own logs for a dropout that just occurred (3G/H icon vanished while loading a web page). For me, the wrapper didn't work with Hastarin r8, but does with r7.7.
Thanks for looking into this!

[Q] Building CM7 for Kindle Fire

I'd post to the ROM section but I'm not yet sufficiently "priv'd" for that so figured I'd start here as it will also solve my problem of not having enough posts to post there.
I'm trying to generate my own CM7 update.zip using JackpotClavin's stuff so that I could try to work the sound and video issues (ultimately I'd like to get the bluetooth going as well but that may be solved by some of the kernel work that appears to already be underway)
I've got the build running in a fresh VM but I'm obviously missing something as when I flash my build it gets stuck in an boot loop on the Cyanogenmod splash screen (comes up, spins for s few seconds and then recycles)
I'm able to get into adb shell and flash back JackpotClavin's update.zip and recover fine but I'm trying to figure out what's wrong with my update.zip file (as a side note, I've also ordered the stuff to build myself a factory cable so if I really screw myself I can get back to the fastboot to put something workable back down)
So, the steps I've taken are:
-Setup a 64bit Ubuntu 11.10 environment
-downloaded the CM7 repo
-Copied the proprietary github repo to .../android/system/vendor/amazon/blaze
-Copied the device gitbub repo to .../android/system/device/amazon/blaze
-Did the copy of the cyanogen_blaze.mk to vendor/cyanogen/products/ and edited the androidproducts.mk in there too as specified per the ROM thread
I then did a "brunch blaze" after setting the build environment to fire off a build and it chewed for hours with no obvious errors (none that caused an exit of the build) at least and in the end I had an update-cm-7.2.0-RC0-blaze-KANG-signed.zip that seemed good.
I flashed that to the device and that's what got me in the boot loop. Anyone have any ideas on what I missed in generating the build?
Well enough spewing, if anyone can help to get me going that would be great and thanks to JackpotClavin for the work to date.
Can you get a logcat dump? Sounds like it's getting pretty far.
Sent from my Nexus S using XDA App
Will do, I copied it aside when it was stuck in the loop and will post when I'm done with the current task and get back to a place where I can get to the sdcard contents. JackpotClavin sent back a note saying that he added some clearing of a couple of the partitions into his version of the ROM and that might be the difference so I'm off trying that now. More in a bit.
awesome. very excited. keep up the good work guys.
whistlestop said:
I'd post to the ROM section but I'm not yet sufficiently "priv'd" for that so figured I'd start here as it will also solve my problem of not having enough posts to post there.
I'm trying to generate my own CM7 update.zip using JackpotClavin's stuff so that I could try to work the sound and video issues (ultimately I'd like to get the bluetooth going as well but that may be solved by some of the kernel work that appears to already be underway)
I've got the build running in a fresh VM but I'm obviously missing something as when I flash my build it gets stuck in an boot loop on the Cyanogenmod splash screen (comes up, spins for s few seconds and then recycles)
I'm able to get into adb shell and flash back JackpotClavin's update.zip and recover fine but I'm trying to figure out what's wrong with my update.zip file (as a side note, I've also ordered the stuff to build myself a factory cable so if I really screw myself I can get back to the fastboot to put something workable back down)
So, the steps I've taken are:
-Setup a 64bit Ubuntu 11.10 environment
-downloaded the CM7 repo
-Copied the proprietary github repo to .../android/system/vendor/amazon/blaze
-Copied the device gitbub repo to .../android/system/device/amazon/blaze
-Did the copy of the cyanogen_blaze.mk to vendor/cyanogen/products/ and edited the androidproducts.mk in there too as specified per the ROM thread
I then did a "brunch blaze" after setting the build environment to fire off a build and it chewed for hours with no obvious errors (none that caused an exit of the build) at least and in the end I had an update-cm-7.2.0-RC0-blaze-KANG-signed.zip that seemed good.
I flashed that to the device and that's what got me in the boot loop. Anyone have any ideas on what I missed in generating the build?
Well enough spewing, if anyone can help to get me going that would be great and thanks to JackpotClavin for the work to date.
Click to expand...
Click to collapse
lucky you... i can't even get my environment to boot. I have a core i5 w/ 16gb of ram.
Ok, not sure whether what Jackpot said helped or not. I did the following:
-I unzipped the update.zip that I generated
-I then edited .../META-INF/com/google/android/updater-script and added the lines
format("ext4", "EMMC", "/dev/block/mmcblk0p10");
format("ext4", "EMMC", "/dev/block/mmcblk0p11");
after the existing line below
format("ext4", "EMMC", "/dev/block/mmcblk0p9");
-I then zipped back up the directory to make an updated update.zip file and then copied it to the sdcard partition and went through the CWM recovery installation and booting again (as an aside, I'm going to look into making an edit to CWM for the near term until they fix things up to work with the touch screen and see if I can have it always boot to CWM and then just wait for 10sec and if no button presses then I'll continue the boot (not sure if that'll work but it would sure be a lot easier than all of the switching between the stock and CWM recovery images.
-I then flashed back the stock recovery image and rebooted and this time I got to the actual CM7 desktop but after a few seconds it reset and I was back at the CM7 loading screen (so like before but I seem to get to the login screen faster now such that I see it before the reset happens)
-I then captured the two attached files (the output from logcat and dmesg)
I'm going to go unzip my update.zip and Jackpot's update.zip and see if I can track down the difference there.
As always, any help is greatly appreciated.
pyrostic said:
lucky you... i can't even get my environment to boot. I have a core i5 w/ 16gb of ram.
Click to expand...
Click to collapse
Are you running Native or in a VM? I can point you at the pages I followed to get to where I'm at if that helps. I'm doing Ubuntu 11.10 64bit in Fusion on a Mac with 2GB and 2 cores and seem like I'm close. Post here if you want me to dump in the steps and links I used to get you farther.
No luck on the changes proposed by JackpotClavin. I'm pulling the repo's again and rebuilding overnight and will try again in the morning. I'm down to all of a couple of files that are different between my build and his so I'm close.
goodluck
Sent from my Kindle Fire using xda premium
whistlestop said:
No luck on the changes proposed by JackpotClavin. I'm pulling the repo's again and rebuilding overnight and will try again in the morning. I'm down to all of a couple of files that are different between my build and his so I'm close.
Click to expand...
Click to collapse
Hope this works.I'd love to have sounds and you tube working
Sent from my cm7 kindle fire using xda premium
Veritass said:
Hope this works.I'd love to have sounds and you tube working
Sent from my cm7 kindle fire using xda premium
Click to expand...
Click to collapse
Yep me too. That's why I figured I'd start the process of getting my own build going so that I could try to push the ball forward as JackpotClavin has finals the next few weeks. Build's done but I have not been able to test yet (the day job has gotten in the way) Maybe tonight if I get a chance (the new build is done and I've made the hand patches so just need to do the testing)
SUCCESS (at least in getting a build that mimics where JackpotClavin left off) I'm now off building a new version with a couple of possible flags thrown for the build that might help the sound and video issues. More in a bit...
whistlestop said:
SUCCESS (at least in getting a build that mimics where JackpotClavin left off) I'm now off building a new version with a couple of possible flags thrown for the build that might help the sound and video issues. More in a bit...
Click to expand...
Click to collapse
Success with sound?
Nope not yet but thats my current quest. Right now I just have what JackpotClavin has going (which of itself took me a few days to get working reliably) First try today on sound was a no go but I have another build going now so will check in the morning to see if I'm any closer.
Quick update as I'm heading out to work. Sound is working (at least I can play an MP3 and it plays) I'm going to test things out today and if everything sound wise seems to be working then I'll post the new update.zip tomorrow.
I'm now off to look at the video issue. I at least know that we're missing a library so now I need to see how to go about getting into place (not sure if I missed copying something from the original ROM or if I need to toggle some more flags to get it built)
Fantastic News.
Excellent work.
whistlestop said:
Quick update as I'm heading out to work. Sound is working (at least I can play an MP3 and it plays) I'm going to test things out today and if everything sound wise seems to be working then I'll post the new update.zip tomorrow.
I'm now off to look at the video issue. I at least know that we're missing a library so now I need to see how to go about getting into place (not sure if I missed copying something from the original ROM or if I need to toggle some more flags to get it built)
Click to expand...
Click to collapse
OMG if you post the update today im going to be so happy!
Couldn't be greater, keep up your good job, millions are waiting !
SOUND WORKS! he pm'ed me a beta test. as he doesnt want to release and brick peoples kindles. but It worked fine! Sound is on! wifi works. Video doesnt work still but you can watch youtube videos from the youtube app. havent tryed netflix yet. but so far its good!
That's freakin' awesome!! Major props to you guys.

Official Ubuntu Touch for Galaxy Tab 10.1 is here!

I've been following the progress on official Ubuntu Touch port to Galaxy Tab 10.1 for a while and today they have updated the wiki for a dedicated session and early build install instructions.
This is an early build, some things work, some things are unknown and wifi is work in progress.
Installation
1. Download the ubuntu preinstalled and the p4wifi specific cyanogenmod image from the unlock instruction section below.
2. Put both zip files onto your sdcard
3. Enter recovery mode and do a wipe data/factory reset
4. Flash in this order:
First the cyanogenmod image (e.g. cm-10.1-20130325-UNOFFICIAL-p4wifi.zip)
Then the ubuntu image (this may take a while)
5. reboot
fix screen pixel ratio (this will become obsolete once the config file is included by default):
1. download p4wifi.conf: http://ubuntuone.com/688wubidavYnvfKvBWV7cY
2. copy p4wifi.conf into /etc/ubuntu-session.d/
3. reboot
Unlocking instructions
link to images
1. Ubuntu stuff:
Current: http://cdimage.ubuntu.com/ubuntu-to...urrent/quantal-preinstalled-phablet-armhf.zip
2. CyanogenMod image:
Current: http://ubuntuone.com/6V0ZxZ8cqB2AGcF8nImrDV
*Note: I am not involved with the development and I do not own this project, for more details please go to the link below.
https://wiki.ubuntu.com/Touch/Devices/p4wifi
Thanks, friend! I'm gonna test it soon :good:
AW: Official Ubuntu Touch for Galaxy Tab 10.1 is here!
I tried it. Installation worked fine and the first start (reboot after install) also went fine. Can't test more things than boot up right now - no time so far. I'll have a look this evening.
But why are there already users exsisting an how do i log in?
Sent from my One S using xda app-developers app
They say it's a test-only version and you can only log in to guest account...
and if you read the ubuntu-part file's name it is "quantal-PREINSTALLED", which means it is an installed image of Ubuntu that was tested on some previous devices by Ubuntu devs...
it's my thought, though...
AW: Official Ubuntu Touch for Galaxy Tab 10.1 is here!
Yes. It's a tech demo. But it already looks nice. I hope development goes on quickly.
Sent from my One S using xda app-developers app
customromfan said:
Yes. It's a tech demo. But it already looks nice. I hope development goes on quickly.
Sent from my One S using xda app-developers app
Click to expand...
Click to collapse
I'm testing this now, but I cannot find /etc/ubuntu-session.d/
Wifi not working after returning image back to Cyanogenmod
I followed your instructions and got Ubuntu touch working. After playing around with it for a while I decided to go back to my Cyanogenmod rom. For some reason now I cannot turn on the wifi. It is the same image that was working before. Can you offer some advice or assistance?
Thanks
Can someone make a video of this running? I want to do it myself but can't find the 10.1's charger
GazaIan said:
Can someone make a video of this running?
Click to expand...
Click to collapse
I've installed it with no problems, just followed the instructions in the first post...
I'm now attempting to get screen pixel ratio fixed and wifi running, and then will upload a video to youtube (probably in the next few hours)
Sorry, but I just can't find etc\ubuntu-session.d\ and can't make a persistent local directory in /data/ ...
If anyone can help me with these problems, please tell me...
(I chmodded the userinit.sh file for wifi and tried to fix the screen pixel ratio, but couldn't find or create the directories to put them)...
I'll upload a video anyway...
Dingles666 said:
I followed your instructions and got Ubuntu touch working. After playing around with it for a while I decided to go back to my Cyanogenmod rom. For some reason now I cannot turn on the wifi. It is the same image that was working before. Can you offer some advice or assistance?
Thanks
Click to expand...
Click to collapse
Not sure why you're having this problem. Maybe try format everything before flashing back or use a nand backup if you have one?
I think we must put the p4wifi.conf into ubuntu-session.d folder in the quantal before we install the image, right?
The proof I can provide is that there are folders named ubuntu-session.d and data in the quantal, but they're extracted to somewhere else during installation...
Video coming soon...
arashtarafar said:
Sorry, but I just can't find etc\ubuntu-session.d\ and can't make a persistent local directory in /data/ ...
If anyone can help me with these problems, please tell me...
(I chmodded the userinit.sh file for wifi and tried to fix the screen pixel ratio, but couldn't find or create the directories to put them)...
I'll upload a video anyway...
Click to expand...
Click to collapse
My memory is a bit vague on this, but I think it's in the /ubuntu folder, as well as the rest of the filesystem. It confused the hell out of me when I had it on my Sensation, it seemed like there was an entire filesystem at the root of the storage, then another inside /ubuntu where everything seemed to be.
You could use the search in Nautilus to find it as well, just make sure it's searching all subdirectories
I had a problem adding the p4wifi.conf file to /etc/ubuntu-session.d/ folder. This is how I solved it.
My problem basically was that when using adb shell to access the device I was inside the android system. And you need to get inside the ubuntu-system.
My way to get shell access to the ubuntu-system was the following:
>adb root
>adb shell
You should now see something similar to [email protected]:/ #
Then enter:
>ubuntu_chroot shell
You should now see something similar to [email protected]:/#
You are now in the ubuntu-system.
to get the p4wifi.conf file into /etc/ubuntu-session.d I did the following:
>cd /etc/ubuntu-session.d
>echo -e "GRID_UNIT_PX=10\nQTWEBKIT_DPR=2.0\nFORM_FACTOR=\"tablet\"" | sudo tee p4wifi.conf
For some reason there is a space between " and tablet. This space should be removed! It seems as if the forum adds it when rendering my post.
Now for the changes to take effect you will need to reboot your device. You can do that by writing the following
>reboot
I hope this helped someone that just as me struggled to get the pixel-ratio fix applied to the system.
Thanks, my friend.
I'm gonna try this and then will upload a video...
if we can find the way to fix WiFi according to this post:
http://forum.xda-developers.com/showpost.php?p=38988110&postcount=44
it will be awesome!
thanks again
arashtarafar said:
Thanks, my friend.
I'm gonna try this and then will upload a video...
if we can find the way to fix WiFi according to this post:
http://forum.xda-developers.com/showpost.php?p=38988110&postcount=44
it will be awesome!
thanks again
Click to expand...
Click to collapse
Yeah I read about this post too, I'm a bit busy this week but maybe I'll try it out this weekend.
I finally fixed screen pixel ratio by flashing the .zip package linked in post 15 in this thread ... simply adb push it and flash using CWM (ubuntu won't erase CWM after being flashed)...
I'm now going to fix WiFi to upload a video that's worth seeing ...
arashtarafar said:
Thanks, my friend.
I'm gonna try this and then will upload a video...
if we can find the way to fix WiFi according to this post:
http://forum.xda-developers.com/showpost.php?p=38988110&postcount=44
it will be awesome!
thanks again
Click to expand...
Click to collapse
I have tried this but no success Please share if anyone solves the wifi-issue.
---------- Post added at 03:38 PM ---------- Previous post was at 03:33 PM ----------
Does iwlist work for anyone? For me it dosen't even recognise the command.
does 3G work on this?
3G doesn't work yet, but I'm testing the OS on my galaxy tab 3G
yeah, I too have tried putting userinit.sh file in /data/loca/ with no success... but note that you must put the file using ubuntu_chroot shell... did you try that?
maybe we can put the commands in afterflash-p4.zip and then flash it, like the way we solved the screen pixel ratio issue...
inform us if this method worked for you

Building Lineage OS 14.1 for Grouper - clang error

Hi everyone, I have decided to build LOS 14.1. I know builds already exist, but I thought I would like to do it myself to enable me to update to the latest sources easily.
I have taken @AndDiSa's kernel and device tree for AOSP-7.1.0, and modified them to be compatible (I believe anyway) with LOS sources.
However, when I build, I get a significant way through and then I get the error "clang++: error: unknown argument: "-mapcs" " (I have attached a screenshot of the actual terminal output - There was a lot of text I didn't understand above it)
I have searched and searched, but I cannot find any reference to this argument.
Any help would be much appreciated
Edit: By the way, if you want to see the sources, they are the grouper kernel and device trees on my github (https://github.com/thepiguy0)
@ThePiGuy probably you would like to have a look at my change request. This should help to solve the compile error
AndDiSa said:
@ThePiGuy probably you would like to have a look at my change request. This should help to solve the compile error
Click to expand...
Click to collapse
Thanks for the quick reply I have applied the patch now. I'll update you on the outcome
@AndDiSa following on from that, it does appear to have solved the compilation issue (it has now got further than it did last time). How come your fix hasn't been merged (I noticed that it was submitted last year)?
@ThePiGuy nobody felt responible to review and to merge the fix. I have had submitted two other changes. Not sure whether they are still needed to compile, ...
I have the impression the Nexus 7 is almost abandoned on LineageOS, but I might be wrong.
AndDiSa said:
@ThePiGuy nobody felt responible to review and to merge the fix. I have had submitted two other changes. Not sure whether they are still needed to compile, ...
I have the impression the Nexus 7 is almost abandoned on LineageOS, but I might be wrong.
Click to expand...
Click to collapse
It's a real shame, as LOS is generally one of the best ways to revive a device, and the nexus 7 2012 was immensely popular.
As for compiling, I have hit another error. It states that there is an unknown type name "aligned_u64" in the file if_packet.h which is located in the kernel, under include/linux/.
I have found the line, and it is under the hdr_v1 structure. How should I fix this? I have noticed that LOS default repos and your LOS branch have a different and much shorter version of this file
@ThePiGuy replace by "__aligned_u64" and it should compile as was already posted by @Charles IV
Hope the change works for you.
Most official Lineage development seems halted for grouper, although hazzer does seem to be doing a bit of meddling.
I also just bought a Nexus 7 for 5 LOSCoins, so maybe they're doing something with it
Charles IV said:
Hope the change works for you.
Most official Lineage development seems halted for grouper, although hazzer does seem to be doing a bit of meddling.
I also just bought a Nexus 7 for 5 LOSCoins, so maybe they're doing something with it
Click to expand...
Click to collapse
Your fix worked beautifully - I got to the packaging of the OS at the end (after modifying a few SEPolicies), and then something happened - it was so close
Edit: @AndDiSa any ideas?
@ThePiGuy looks as if you are trying to build the userimage formated as f2fs file system. I am not sure whether this is supported as I never changed there anything and, hostestly speaking, which is not of much use as you can always format the /data partition in recovery. If you have boot.img and system.img everything should be fine and you can flash them using fastboot.
AndDiSa said:
@ThePiGuy looks as if you are trying to build the userimage formated as f2fs file system. I am not sure whether this is supported as I never changed there anything and, hostestly speaking, which is not of much use as you can always format the /data partition in recovery. If you have boot.img and system.img everything should be fine and you can flash them using fastboot.
Click to expand...
Click to collapse
Ok I will do. I didn't change anything relating to the formatting of the userimage (not knowingly anyway), so I'm surprised that is has defaulted to that. Where would I change this to get it back to ext4?
@AndDiSa unfortunately once I flashed the System.img and boot.img, I got into a bootloop where it would show the google logo and unlocked padlock, flash and start again. Could it be due to outdated proprietary blobs? Would I be better off using unlegacy android blobs (they seem to be updated fairly frequently for such an old device)
@ThePiGuy I doubt that the blobs are the reason why ... If it remains on the Google start page it's an indication that there is either a kernel crash or that there are permission issues, i.e. your selinux configuration has some problems. Did you try to boot into TWRP directly and to have a look at /proc/last_kmsg ?
AndDiSa said:
@ThePiGuy I doubt that the blobs are the reason why ... If it remains on the Google start page it's an indication that there is either a kernel crash or that there are permission issues, i.e. your selinux configuration has some problems. Did you try to boot into TWRP directly and to have a look at /proc/last_kmsg ?
Click to expand...
Click to collapse
No I didn't (I'm very new to this - the only other thing I have built is for my G4, which just seemed to work without any issues)
Having had a look now, it looks like it is a kernel panic (I have attached the last_mksg with a .txt extension to get XDA to allow it)
@ThePiGuy which kernel sources do you use? I had similar issues years ago when I was trying to set up the Nougat-Kernel.
Can you please check whether you have the __BRILLO__ option set in system/core/init/Android.mk?
Code:
diff --git a/init/Android.mk b/init/Android.mk
index 67541b8..ff343e9 100644
--- a/init/Android.mk
+++ b/init/Android.mk
@@ -10,7 +10,7 @@ else
init_options += -DALLOW_LOCAL_PROP_OVERRIDE=0 -DALLOW_PERMISSIVE_SELINUX=0
endif
-init_options += -DLOG_UEVENTS=0
+init_options += -DLOG_UEVENTS=0 -D__BRILLO__
init_cflags += \
$(init_options) \
AndDiSa said:
@ThePiGuy which kernel sources do you use? I had similar issues years ago when I was trying to set up the Nougat-Kernel.
Can you please check whether you have the __BRILLO__ option set in system/core/init/Android.mk?
Code:
diff --git a/init/Android.mk b/init/Android.mk
index 67541b8..ff343e9 100644
--- a/init/Android.mk
+++ b/init/Android.mk
@@ -10,7 +10,7 @@ else
init_options += -DALLOW_LOCAL_PROP_OVERRIDE=0 -DALLOW_PERMISSIVE_SELINUX=0
endif
-init_options += -DLOG_UEVENTS=0
+init_options += -DLOG_UEVENTS=0 -D__BRILLO__
init_cflags += \
$(init_options) \
Click to expand...
Click to collapse
I have forked your kernel source (you can see my fork at https://github.com/thepiguy0/android_kernel_asus_grouper).
Unfortunately I can't see that file at all
@ThePiGuy that Android.mk is located in the system/core project in the init directory, not in the kernel.
AndDiSa said:
@ThePiGuy that Android.mk is located in the system/core project in the init directory, not in the kernel.
Click to expand...
Click to collapse
Ah yes I see it now. No I didn't have that option. I'll add it and see if it works
(Accidental duplicate post - see below)
@AndDiSa one thing that has just occurred to me - I have just noticed all the patches in your grouper manifest - will I need to apply all those patches if I use your sources?

I need a little bit of help porting crDroid 6 to the sm-t350

I need a little bit of help portingh crDroid 6 to the sm-t350. Nubianprince started then got pulled away by work. I have initalized the crdroid repo, but i when i run repo sync i think it only downloaded like, 300 mb. i do have an android pie enviroment, does repo link resources? i dont know what is going on there. I will upload my roomservice.xml. I had to remove a couple lines from the original and manually clone them because it keeped giving me an error. the original is here https://github.com/Nubianprince/local_manifests/blob/master/crdroid-ten.xml .
Currently i am using this device tree: https://github.com/Nubianprince/android_vendor_samsung_gt58wifi most custom roms i see are using this: https://github.com/Valera1978/android_device_samsung_gtaxlwifi . I have not seen any non sm-5xx devices using it though, so i hesitate to switch. i worked out a a couple errors of things being defined twice, and then built. but i think i am missing something as the build fails with this: FAILED: ninja: 'out/target/product/gt58wifi/root/init.usb.configfs.rc', needed by 'out/target/product/gt58wifi/ramdisk-recovery.cpio', missing and no known rule to make it
Is there a "quick fix" to provide this file? I am not actually sure what i am missing, or what creates it.
Any help would be appreciated.
This file "init.usb.configfs.rc" is missing from your device tree, somewhere in one of your files you have the path pointing to "init.usb.configfs.rc" which does not exist. Let me know if that makes sense.
nubianprince said:
This file "init.usb.configfs.rc" is missing from your device tree, somewhere in one of your files you have the path pointing to "init.usb.configfs.rc" which does not exist. Let me know if that makes sense.
Click to expand...
Click to collapse
Yes, it does make sense. I just don't know enough about the android environment to know where the file, or what is pointing to it, would / should be.
Okay. I believe there is a missing, or many many missing makefiles. I found the file and manually copied it to out, and then the build fails with another missing file. Rinse and repeat, there are a ton of files not being put where they should be. Now what to do with that information, i am not sure ??. I tried including a couple of the make files from android 9, but they didn't make any difference.
oh yeah, and if i do lunch instead of brunch it fails with a different file missing: FAILED: ninja: 'out/target/product/gt58wifi/system/addon.d/50-lineage.sh', needed by 'out/target/product/gt58wifi/verified_assembled_framework_manifest.xml', missing and no known rule to make it
it makes no sense adding files to the "out" folder, fix the issues in your "device" folder check your device.mk file
Wow. That was really awful. I don't even know what i was thinking there. What i was trying to say, is that i was manual copying the files to see if it was just one or two not being copied. I have been comparing the Pie and Q makefiles to try to determine what file was supposed to be copying it to out, but i cant find it in Pie, all i know for now is that it is being copied in Pie but not Q. For now I'm gonna' keep looking for the correct file.
lividhen99 said:
Wow. That was really awful. I don't even know what i was thinking there. What i was trying to say, is that i was manual copying the files to see if it was just one or two not being copied. I have been comparing the Pie and Q makefiles to try to determine what file was supposed to be copying it to out, but i cant find it in Pie, all i know for now is that it is being copied in Pie but not Q. For now I'm gonna' keep looking for the correct file.
Click to expand...
Click to collapse
What device tree are you using, do you have it on Github?
nubianprince said:
What device tree are you using, do you have it on Github?
Click to expand...
Click to collapse
I am just using the device trees (ten branch) on your GitHub. I haven't made any changes that have gotten me anywhere so i haven't committed my local changes to my GitHub.
That crdroid ten branch still need a lot of work, the last build I did when I was working on it was not getting past the logo
nubianprince said:
That crdroid ten branch still need a lot of work, the last build I did when I was working on it was not getting past the logo
Click to expand...
Click to collapse
I have been away for a while and haven't followed along, but the last week I spent compiling ROMs. I also tried compiling Android 10 using "stock" lineageos gt58wifi and I got stuck at the logo as well. I also tried another device from the msm8916 repository and got stuck at the logo.
The "stock" gt58wifi build, as we all know, has problems with audio, bluetooth, smart cover, etc, etc in all versions 14.1, 15.0, 16.0 and won't even boot with 17.1.
When I first compiled it, it would fail due an error with a config.xml file. I submitted a patch, like others, but haven't seen anything yet.
https://github.com/Galaxy-MSM8916/android_device_samsung_gt58wifi/pulls
nubianprince said:
That crdroid ten branch still need a lot of work, the last build I did when I was working on it was not getting past the logo
Click to expand...
Click to collapse
I'm working on SM-T560NU 17.1. It too was stuck at the boot logo. I built an eng build and found it was the hardware vibrator that was getting stuck in a loop. If you remove the vibrator hal from
/device/samsung/msm8916-common/manifest.xml
that should work on the SM-T350 because both platforms share the same msm8916 code?
I did build SM-T350 with 17.1 and was stuck at boot logo and gave up. However, I have not rebuilt it knowing this new information. I will try again with the above change in a few days?
So, as retiredtab has said, he got android 10 booting. But it has all the issues android 9 did: no camera, sound, Bluetooth, or Hal sensor (sort of, it can turn the device on but not off). The system ui is also a little funny on crdroid, not sure about lineage. I don't know how to fix these issues, or where the roots of the problems may lay. Do you have any suggestions for learning more about the android source code? I feel like the aosp docs are good, but you kind of have to know what you're looking for.
I think part of the problem with the SM-T350 is that there has never been a fully working build since day 1. Lineageos 14 had problems to begin with and they were never fixed and got carried over to 15, 16 and now 17. If stock Lineageos 16 was fully working, then getting it to work on 17 would be less of a challenge.
The most likely problem to no audio, camera, bluetooth etc is the Samsung proprietary blobs are not in the correct directories or the configuration blob files are pointing to the wrong directory.
When I face this problem, I find it helpful to look at a working roomservice.xml file and do comparisons.
If there is no working roomservice.xml like "stock" lineageos 14, 15, and 16 for the SM-T350, then I look at similar models. For example, the T550 is the bigger brother and it helps to look through it's roomservice.xml file for hints.
Remember that a compiler mainly checks for syntax errors, not semantic. If you make a typo, a compiler will flag that as an error, but if you write correct syntax, but put a file or files in directory ABC instead of XYZ, the compiler won't say anything.
Another thing that might help is doing a logcat of a working build and comparing it to a non working build. There might be a very obvious error message like "can't find audio.hw.msm8916 in directory /device/samsung/msm8916" or something like that.
Learning how to use tools like meld and diff help tremendously in finding file and directory differences in case you put the blobs in the wrong place. See
https://www.tecmint.com/compare-find-difference-between-two-directories-in-linux/
I used meld when troubleshooting the stuck at boot logo.
If you are a visual learner, I found the following youtube channel helping in learning the overall process of building ROMs.
https://www.youtube.com/c/AlaskaLinuxUserAKLU/videos
I think we have lineage 16 fully working. I think the part I'm having trouble with here is the difference between where the files are read from in Android Q vs P.
If I understood what you said incorrectly, please say so.

Categories

Resources