yashsingh1/xdaforums huggingface dataset:
[Android General] pndwal:
[MENTION=9720847]AeonFlux1603[/MENTION]

Our LOS ROM supports addon.d backup functionality (allows system apps not integrated in ROM to survive dirty flash - see quote below), so Gapps will survive a dirty ROM flash and users will not normaly need to flash GApps again with any LOS update.

However, I keep system fresh by regularly integrating system (incl. GApp) updates into system, and I've noticed that integrated updated GApps can misbehave / crash after dirty flashing a ROM without flashing GApps, and I need to flash GApps just to fix the few that have been updated and integrated. It seems addon.d script (system/addon.d/70-gapps.sh) is created / installed by GApps package, and is not updated when integrating system app updates into /system (at least using Apps2SD to do it), meaning it doesn't survive dirty ROM flash properly.

Tip: Unless you integrate them, updated system apps will be in internal (user), and deactivated original will be retained in system. This means that ordinarily, over time, much internal (user) space is wasted as internal space fills up with Google Apps that were originally installed to System partition. The original deactivated apps are all still in /system too, effectively rendering this space useless.

This is a big problem for old stock devices that haven't had an official major ROM update from OEM for a while, and doubly so for those with limited internal memory (common in older devices). Users are left with no choice other than uninstalling system / GApp updates in order to have space for user apps that can't / won't install to SD (adopted memory).

With root, one is set free from the space-hogging character of these updates as there is the ability to integrate them into /system, which sends the files back to where they really should have been installed were it not for lack of root rights.

Alternatively, simply having TWRP allows latest GApps to be installed periodically, which also solves the problem (and may be better than integrating after-the-fact as this will leave a correct addon.d script). This is important on any device with limited internal storage.

To integrate updates into system I have been using Apps2SD (convert to system app function). I tried a stand-alone app (System cleaner 2) to do this, but it messed up system apps. Went back to Apps2SD for this, and it has always integrated updates without problems (apart from adjusting addon.d script).

Apps2SD has other functions still useful to, eg. it can remove unwanted system apps (bloat apps), also Fix Device Lag (Trim partitions), etc, and now correctly sees a native adopted storage setup.

From OpenGApps Wiki:

https://github.com/opengapps/opengapps/wiki/FAQ

Sidepoint Headsup: There is good info in this FAQ re. need to install Google Clock, Google Keyboard, and Google Camera in initial clean install only. PW
[Android General] DeblaGaming:
Hey, thanks but no it didn't help.

I get the error NAND and UFS not found (i have heard that it can be an MB problem but it can also be something else)

Best Regards

ps i have a thread you can help me here (https://xdaforums.com/thinkpad-tablet/general/help-lenovo-tab-3-a8-tb3-850m-booting-t3906326)

~DeblaGaming
[Android General] pndwal:
Sorry to hear that.

Have you done memory tests in sp flash tool? Does sp flash seem to connect properly? Did you possibly delete any critical partitions using sp flash tool? Did you use format function? PW
[Android General] AeonFlux1603:
GApps cannot come included with LineageOS builds due to licensing restrictions which apply to the LineageOS development team. These licensing restrictions in no way apply to third party distributions of LineageOS or other AOSP builds -- i.e., the ported LOS 14.1 for the 850F. For members who do not want the Pico GApps package, root access can be used to uninstall the minimal core GApps in less than 2 minutes, with a simple root file manager or system app uninstaller.

I'd like to have just $1 for every port ROM here on XDA that comes with a GApps package preinstalled. I could invite PW and [MENTION=8548258]wezroot2k[/MENTION] on a 10-day cruise to the Bahamas -- and I could get a new laptop. Mine is junk. :mad:
[Android General] pndwal:
Sorry. Just trying to help here.

I was taking the following official statements at face value, and assumed 'other vendors' and "LineageOS" would naturally cover any public distribution of LOS or other ROMs:

"Due to licensing restrictions, these apps do not come pre-installed with ROMs other than those from vendors that are part of the Open Handset Alliance and must be installed as a sideload package by the user themselves."

"Due to licensing restrictions, these apps cannot come pre-installed with LineageOS and must be installed separately."

I did read also that integrated GApps is fine for ROMs for 'personal use', but not if publicly distributed.

I agree that there are many ROMs here on XDA that come with a GApps package preinstalled (though likely more without), and while I'm no lawyer I'd say these 'small fry' distributions will likely never be targeted for including proprietary Google-branded applications.

However, aside from technical correctness, I see other advantages in having GApps free updates to our LOS ROM, for much the same reasons as I prefer a ROM free of audio mods etc.

For example, with LOS addon.d backup functionality existing Gapps will survive a dirty ROM flash so users do not need to flash GApps again with LOS update. This means no reverting is needed with every update if users have chosen a different GApps package, as well as a much smaller ROM update package. - This is a real advantage to users like myself who have only mobile data with monthly limits.

Perhaps another option would be to provide a minimal ROM as well as one with all OPs preferred features.

Hope we can kick about ideas like this here as no doubt we won't always agree, but a discussion shouldn't hurt.

Hope all your efforts with this are going well. Can't wait! PW

P.S. If you can come up with a better scheme I'm definitely up for that trip to Bahamas. All best with laptop too. :)
[Android General] AeonFlux1603:
Absolutely, I'll list a bare-bones ROM as well as a featured build with root, GApps, the entire works. I've been reading a lot lately on the /e/ fork of LOS, which is a comprehensive alternative to Google -- the microG fork, I believe it's called. It seems to be quite popular, especially among the growing populace of Android enthusiasts who are pro-privacy and anti-Google. I'd love to be able to say that we will have use of the GApps add-on script when flashing updates, but I'm not too confident that the OTA update feature of LOS will ever work on our port. As of now, the function appears extremely complex. However, I am scripting any update packages for this ROM so that dirty flashing is an option.

Correct, these third-party port ROM distributions will likely never be targeted for violating any guidelines. The main reason that the LineageOS dev team cannot include GApps is that their device trees, source code, commits, etc, cannot include proprietary source code from Google. As third party individuals porting ROMs for unofficially supported devices, we are not required to submit source code (with the exception of the kernel); thus we are breaking no rules. If, however, we were a development team and were building and maintaining an AOSP or CAF based fork of custom Android ROM (e.g. Dirty Unicorns, SlimROM, Bliss ROM, etc), we would be prohibited from including GApps. This very subject has come under scrutiny recently at Android Central. The mods there eventually determined that including GApps in a port is not a recommended practice, but that is isn't prohibited in third-party distribution scenarios such as ports and unofficial builds. I feel certain that the mods at XDA would prohibit the inclusion of GApps in these type ROMs if any laws or licensing guidelines were violated. People have been doing it for years. One thing is for certain. Every single time I've ever ported a ROM and included GApps, people become extremely upset over it. That is without fail. So, when I do include a package, it's always Pico GApps and can be removed with root access in a matter of minutes. Packages like Super GApps and ever Stock GApps are very robust with content, and also install the Google dialer framework system-wide, which can be problematic to uninstall in its entirety. The more I learn about the microG /e/ fork of LOS, the more I see why including GApps isn't necessarily a good option. More and more Android users are steering away from Google based apps and features.

Your recommendation of including a minimal ROM in downloads is a good idea, and I will definitely do that in future. I have lots to iron out on our ROM, but it is getting there.
[Android General] pndwal:
Yes, I read the original XDA article re Gaël Duval, his '/e/ foundation', and de-Googling phones with interest too. ( https://www.xda-developers.com/e-google-free-lineageos-fork-nexus-oneplus-xiaomi/ ) It's eye opening to see how much info. is leaked to / collected by Google by stock apps, and even by subsystem. I would certainly be interested in trying, evaluating, testing /e/. (I posted re this here: https://xdaforums.com/android/help/to-root-huawei-y500-t2923318/page633 post #6324)

Pretty sure now addon.d is working fine.

Don't think OTA ever works on unofficial builds of LOS. Guess it requires dedicated servers etc.

Inerestingly, Google's first altercation re proprietary apps was not with LOS, but with Steve Kondik when Cyanogenmod was pretty much a one man operation (despite his claim that it had 30,000 active installations). Most commentators at the time agreed that Google had a perfect right to order cease-and-desist despite appearing to be shooting themselves in the foot.

Google did however take time to explain their position in 2009 saying (in part) - "We make some of these apps available to users of any Android-powered device via Android Market, and others are pre-installed on some phones through business deals. Either way, these apps aren't open source, and that's why they aren't included in the Android source code repository. Unauthorized distribution of this software harms us just like it would any other business, even if it's done with the best of intentions." https://android-developers.googleblog.com/2009/09/note-on-google-apps-for-android.html (-see whole article here). https://www.androidcentral.com/google-discusses-cease-desist-order-cyanogenmod

All your ideas for TB3-850F development sound great by the way. Many thanks for doing the ironing. :) PW
[Android General] pndwal:
Great to have you back on board here. I'm sure this will excite someone else.

Could this buildable kernel help progress to O / LOS15.1? - sorry if its a dumb question. :) PW
[Android General] pndwal:
Many thanks for the detailed reply.

While much of this is honesty over my head, it will hopefully be of use to [MENTION=9720847]AeonFlux1603[/MENTION] and [MENTION=8548258]wezroot2k[/MENTION].

[MENTION=8548258]wezroot2k[/MENTION] has high hopes of getting Project Treble compatibility and progressing to O using a combination a new / modified recovery and FiSH exploit (see his first post on p50), and would no doubt appreciate any advice or help to do this.

Love the idea of unlocking extra ability with custom kernel and hope we can get there. I reached the conclusion we were at a dead end until this is achieved also (- eg LG K4 needed custom kernel to increase clock speeds). Would be great to get processor's full potential, especially if we really have mt8161p SOC as Lenovo officially states.

Hope you can continue to work on / help with buildable kernel, serial port driver etc. PW

P.S. Your handle is quite the misnomer. You appear to be thinking right outside the box. :)
[Android General] limited_imagination:
I have been fiddling with the “make menuconfig” settings, and changing the configurations a little more from the way the defconfig default file set them up originally in the Lenovo published source code.

I then ran a new compile process with the new .config file, which worked again successfully to create an Image.gz-dtb file.

I attach the new .config file, and the log file that shows all the scary errors. For those of you playing along at home, you can replace the .config file in the source code that I posted on Google Drive, and compile it all with this new .config file. It has the configurations set a little closer to the actual chips in my device, even if it still throws scary errors during the compile.

What the hell, how bad could the errors actually be, if the Image.gz-dtb file still gets built, right? :)

The accelerometer is now set as the MC3XXX, which is what “Device Info HW” reports for my stock US market device. Also, according to “Device Info HW”, the camera drivers used in my device are the 5 MP Hynix HI545, the 2 MP OmniVision OV2680, and also the 2 MP SuperPix SP2509. The original defconfig file in the source code defined two completely different cameras from the ones actually used on my device, so I just changed them in the current .config file attached here. There were source folders available in the tree to cover the HI545 and OV2680, but not the SP2509. So I have now set the menuconfig up for the HI545 and OV2680, and then generated this new new .config file, and we will see what happens. I don’t need a 2 MP selfie camera on this device anyway...

As I get closer to compiling a potentially useable boot.img file, I am starting to look at what is required to flash a ROM to the TB3-850F, and I see that it’s not as simple as just using the TWRP recovery. Looks like I would have to use the MTK SP Flash Tool, which first demands that I have a scatter file to map the ROM partitions.

I set up the SP Flash Tool ver. 5.1824 on my PC, and tried to make a backup of my TB3-850F firmware first, before doing anything stupid (ie. like flashing this new hacked up Image.gz-gtb file that gives all those log warnings & errors...)

However, the SP Flash Tool did not want to “read back” the firmware on my device. It gave me this error:

I suspect this problem occurred because I used a scatter file that does not correspond to my actual stock ROM build. I used the scatter file from the stock ROM that PW linked previously here, which was hosted at the Russian Lenovo forums.

PW, I don’t have the link handy, but I bet you know what I am talking about. That one is for build TB3-850F_S100030_161209_ROW, for the European market. However, my own device currently has a different US market ROM, which is build TB3-850F_S100031_171010_ROW. So I suspect the scatter files are different, and caused this SP Flash Tool error.

Can anyone easily point me to a scatter file that corresponds which my particular firmware build, ie. TB3-850F_S100031_171010_ROW ?

Or is there another reason for this error, unrelated to the scatter file?

Thanks.
[Android General] pndwal:
Well, there is no 00031 complete ROM, unless you flashed [MENTION=527869]motojunkie[/MENTION]'s with OTAs incorporated. His is TWRP flashable, so you can compile ROMs that way for MT.

00030 is latest stand alone and if your device is TB3-850F that flashtool setup should work. [Did you plug in USB after setting download with device powered off, and while holding down vol - when flashing?]

Most of us had that build updated by ota to 00031 (171010) before LOS (I think the European ROM may in fact be universal), and I used the included flashtool recently with no problems. Check on right that its not pointing to some other scatter file you used recently. PW

Edit: sorry - rushing before. Just realised you were talking about read back. I haven't done this, but can confirm flashing that ROM works fine.

I've done backups using TWRP after flashing with fastboot. Our TWRP can backup the following partitions: proinfo, nvram, protect-f, protect-s, uboot, para, Boot, Recovery, logo, secro, tee, frp, nvdata, System, System Image, Cache, and Data.

I'm guessing, but you may need vol - trick for sp tool readback as it seems this is needed for vcom driver to work.
[Android General] pndwal:
[MENTION=5522475]limited_imagination[/MENTION]

I've edited reply above. PW
[Android General] pndwal:
[MENTION=5522475]limited_imagination[/MENTION]

I've now had time to play with sp flash tool again, and can confirm I get same error as you if I just plug in USB.

However, as with download mode, if I hold down vol - while plugging USB (powered off of course) I get "readback OK" and vcom connects (so scatter, download agent etc are fine for this mode too).

Same for memory test (detects external ram and emmc, no nand flash or ufs. RAM test is ok).

I'm lost as to how to configure address start and length for ROM file readback, but as help says 'aligning to 512' for emmc (using multiples of 512) generates files of proportional size correctly.

I suspect vol - trick is needed for vcom connection because we cannot disconnect battery easily, and help says that for USB, both battery and cable should ordinarily be 'pulled out' initially.

Thanks to [MENTION=5003632]stonedpsycho[/MENTION] for vol - trick.

Hope this helps, PW
[Android General] pndwal:
Did vol down trick get you past the errors and allow vcom connection in SP Flashtool? PW
[Android General] Stavros75:
It requires a permission to access and download the files. Is there something else i can do?
[Android General] pndwal:
Yes, OP here is gone (see post #339) and all his file links are broken.

This thread will continue to be a valuable resource regarding past progress with TB3-850F, and despite threads title, a general discussion on TB3-850F continues here for now. It lately relates to new LOS14.1.

For NEW THREAD For Stable & Near Bug Free TB3-850F LOS ROM, go here:

https://xdaforums.com/android/general/rom-lineageos-14-1-lenovo-tab-3-8-tb3-t3900320

For my re-posted Useful Stuff (Including UNLOCKING / ROOTING Instructions, latest stock ROM, how To Enter TWRP etc, see post #404, page 41 here.

Regards, PW
[Android General] pndwal:
Might be looking for download agent too. Anyway, well done.

Sorry to hear that. Hope you can.

Before you do that, research this:

On a previous lenovo tab I had similar problem. Solution was to disconnect battery (fairly easy on TB3-850F too) and this allowed SPFT to connect and flash. Hope it helps.

Incidentally, dropdown at top of this page gives you access to detailed Hardware Maintenance Manual, etc:

https://support.lenovo.com/us/en/solutions/pd104294

Perish the thought...

No, think he's speaking of broken links in OP that say 'you need an account with permission' for google drive. (Your link appears to work after selecting download without security scan due to large size.) Regards, PW
[Android General] pndwal:
Did you resurrect it? How far did you get? PW
[Android General] pndwal:
[MENTION=9720847]AeonFlux1603[/MENTION], [MENTION=8548258]wezroot2k[/MENTION]

Hi guys. Was our LOS14.1 SeLinux permissive out of the box, or was this a setting choice?

[MENTION=9720847]AeonFlux1603[/MENTION], I trust the ironing out 'bugs', tweaks, camera mod, and especially upstream source & up to date security patch level are all progressing nicely. Very much looking forward to next installment. :) PW
[Android General] wezroot2k:
It was out of the box right from the start.
[Android General] AeonFlux1603:
I wanted to take a moment and let you guys know that I haven't been abducted by aliens or smitten by the wrath of the Android Gods. I have, unfortunately, been under the weather with the stomach flu. Haven't had the flu in a number of years and it was much worse than I recall it being. But, I seem to be over the worst of it, and can now get back to the drawing board. I haven't yet read any of the latest posts, but will take a moment to do so and get caught up on things.
[Android General] wezroot2k:
OK sorry about that flu thing and welcome back good to know that you r over worst of it.

You have not miss nothing much but it good to read the posts from limited_imagination and PW conversation about the kernel of the 850f and the possible development of a custom kernel.

Also it would be nice to get an update on the next installment of the tweaks you are doing to the LOS custom ROM.
[Android General] AeonFlux1603:
Yeah I've just now really took the time to peruse the thread. [MENTION=5522475]limited_imagination[/MENTION], I am super pleased to see an individual of your skill and caliber helping out. Thank you very much for your interest and contributions. I've been very ill of late, with the stomach flu coming and going, then reoccurring to some degree. As the old cliche goes, I've truly been down for the count. [MENTION=7550078]pndwal[/MENTION] and [MENTION=8548258]wezroot2k[/MENTION], I hope you guys are doing well and are in good health and spirit.
[Android General] pndwal:
Yeah, I'm alive n kickin. Glad you're bouncing back too.

[MENTION=5522475]limited_imagination[/MENTION] seems to have bricked his tablet in persuit of custom kernel. Haven't heard if he's got it going again, but hope he hasn't had to do screen transplant to broken device as I think with right methods the dead device can be resurrected.

Hope your progress with LOS14.1 is going smoothly. Regards, PW
[Android General] wezroot2k:
Yea I alive and kicking also but PC Power Adapter gave way and died so with out a PC for the moment, but glad to hear that you are recouping well:good:
[Android General] pndwal:
Sorry to hear that. Prolific flu! - hope its not heading my way...

Well done! :good::good::good: :)

& I was just about to respond...

Some belated thoughts based on my limited experience:

I would always try SPFT Packaged with ROM first, - simply extract and run from within extracted folders without moving anything. But I would probably not have thought to mention that...

Normally, flashing kernel is done simply by flashing boot.img (contains kernel, ramdisk etc) from TWRP. (Your method may possibly have been flawed somehow.) Flashing stock boot.img this way is often done to fix boot problems, eg bad SU cleanup when unrooting, bad system mods, Magisk modules etc, and this method may have initially fixed your bad boot.img mod.

Also, may have been better to use stock boot.img. Don't forget that if rooted yours will also have been modified by whatever SU you used.

Glad it didn't come to that. However, having spare is like a good insurance policy too, and swapping out mainboard shouldn't prove too difficult either. - Note: I included a link for you to detailed Hardware Maintenance Manual for TB3-850 earlier (post #531) which would undoubtedly help.

That's the spirit! And one that will certainty benefit all of us too :good: . (But isn't the learning experience so much more rewarding when problems are resolved and you come out unscathed, if weary for it.)

Really looking forward to hearing of future exploits with TB3-850F Custom Kernel! :) Please keep tapdancing! Regards, PW

PS. Please don't forget to do full nandroid backup as soon as stock restored, OTA update applied, and TWRP installed (before further modding) if you haven't done this already. Then you will have backup of your unique partitions (incl. OEM info, SN, IMEI, Mac addresses for WiFi & BT, etc) not included with ROM, which can also be easily corrupted when modding (often when using SPFT reportedly) . Mammoth effort is required to restore these (special software, much patience etc) without full nandroid backup. PW