yashsingh1/xdaforums huggingface dataset:
[Android General] charlestek:
[MENTION=5919159]Tzul[/MENTION]

When I received my first tablet I tried a bunch of brightness apps from Google Play and none of them seemed to work.

In fact, if you go into the MediaTek MiraVision app and choose a custom profile and try to change the brightness in MiraVision, it will not work either.

It is as if the settings the apps were supposed to change was immutable because it was blocked by what ever other setting or who knows what got screwed up.

So supposedly the CurveFish app sets or unsets something and once that is done, probably all the other brightness apps then would work as well.

Since you dug into this for your brightness dynamic range disabling patch on Kitkat and Lollipop, you would know the internal settings best.
[Android General] Tzul:
[MENTION=7184758]charlestek[/MENTION] You don't need any brightness app. Other than CF.lumen. ;)

The brightness you can change in Android is the LCD backlight brightness. What Android ultimately ends up doing is writing a value between 1 (lowest brightness) and 255 (highest brightness) into the virtual file /sys/class/leds/lcd-backlight/brightness (yes, that's the Linux SysFS again). This invokes the kernel driver which then makes the changes to the hardware.

Brightness apps will simply use Android's API to change that backlight brightness, i.e. they can't do anything new. Or they'll create a fullscreen overlay that basically acts like a translucent filter/foil, which has the disadvantage that it actually brightens dark parts of the screen, as explained in my previous link (just compare the status and navigation bar in these Dimly screenshots). Or they'll actually access the framebuffer somehow and tweak the RGB values, which is what CF.lumen with its root driver does. Again, this won't have an effect on the backlight brightness, but it'll scale the RGB values so that the screen appears to be darker (or tinted red, or whatever, with black staying black, which the overlay method can't achieve).
[Android General] adrian1216:
Guys, Could you tell me how to repack boot.img? I used ./unpack_ramdisk boot.img but i received mkdir: ramdisk: File exists

gunzip: ../boot.img: not in gzip format.
[Android General] Tzul:
[MENTION=7114808]adrian1216[/MENTION] What are you planning to do?

I don't know this unpack_ramdisk tool you're using, but the name indicates that it's intended for ramdisks, yet you're feeding it the entire boot image. Try extracting the ramdisk from the boot image first. Easy to do with a hex editor, for example.

MediaTek boot/recovery images also have a special MediaTek header in front of the kernel and ramdisk, maybe that tool can't handle them.
[Android General] charlestek:
[MENTION=5919159]Tzul[/MENTION]

Thank you for explaining the brightness internals. But I don't need a brightness app (since the brightness in my second Tab 2 A10 worked fine, it became irrelevant for me), and my comments were specifically geared toward the strange bug that rumbla and a bunch of people in the Tab 2 A8 post and my Tab 2 A10 post experienced OEM stock from Lenovo and it is more than a few people that have this issue. We had discussed this before in the Lenovo forums. Since you never had your tab with this problem, and since I never had the capacity to go look into the virtual file (or was aware of it) while I was puzzling over why the brightness would not work it is hard to say what is/was going on.

Given my symptoms and 1) I did try several different google play apps which normally should change brightness, but did not and 2) Since the Miravision stock app did not change the brightness, it would appear that neither the normal brightness slider, or the Miravision app or the google play apps could set the /brightness file, or something else is/was amiss.
[Android General] rumbla:
Installed all these "dimming" apps.

Curvefish have basically the same effect than the stock "Brightness Level Slider".

CF.lumen (by chainfire!) is a good app and I will use it instead of Twilight.

About Dimly, seems the only one that can turn almost completely "black" my screen.

For now, I will keep CF.lumen and Dimly....eventually I may not need Dimly anymore.

Gonna try using these tonight...with Dolby ATMOS custom settings :)

EDIT:

About my "bug". I'm not sure it is really a bug. The stock brightness level slider works....it's just that the lowest setting is not low enough for my taste :)
[Android General] Tzul:
[MENTION=7184758]charlestek[/MENTION] Yeah, after writing my post, I remembered that you first had a tablet with broken brightness control.

If Android can't affect the backlight brightness, it's no surprise that apps can't either, as they're using Android's API.

It would have been interesting to know if you could have changed the brightness on that tablet by doing

echo 123 > /sys/class/leds/lcd-backlight/brightness

with a terminal or ADB shell, but first that requires root, and second you weren't aware of it at that time.

MiraVision is something else entirely. Its "brightness" setting doesn't change the backlight brightness. MiraVision is all about tweaking RGB values, similar to CF.lumen's root driver.
[Android General] charlestek:
[MENTION=7268959]rumbla[/MENTION]

Ah, I see. It was hard to tell from your description, and in fact I had an OEM bug, which has been reported by others, sliding the brightness slider from one side to the other did really not change the brightness at all

and doing a flash recovery to the original image did not fix the problem either. Somewhere in this forum which Tzul can cite, Tzul has a patch for the dynamic range autobrightness that chews up a lot of battery, primarily in Lollipop, but also KitKat.

Tzul, I'm sure can give you the reference to that if you want to try that as well.
[Android General] Tzul:
[MENTION=7268959]rumbla[/MENTION] Like I wrote, CF.lumen should be capable of doing what Dimly does, and better. Just go to one of the filter modes, e.g. Master filter mode for immediate effect, choose the "Custom" filter (Manual channel adjustment), and set the RGB sliders to the same value each, e.g. 0.5, or 0.25. That'll significantly darken the screen.

Custom filter might require the paid Pro version of CF.lumen (which I have), I'm not sure...

Edit: oh, and disable AAL, if you haven't already.
[Android General] hackwerk:
[MENTION=7268959]rumbla[/MENTION]: Why not first upgrade/update?! You seem to have a lot of bugs/complaints, while you are in an old OS, on a tab that had a LOT of issues (and fixes in updates)! And did you try my suggestion? Lux Lite? Thats my choice.
[Android General] Tzul:
[MENTION=2268917]hackwerk[/MENTION] I just tried both Lux Lite and Dimly. Both of them offer quick access to "negative" brightness values, i.e. darkening the screen below the lowest backlight brightness. More user-friendly than achieving the same effect in CF.lumen. Lux Lite is also nice if you want to use the camera as ambient light sensor and have the backlight brightness adjusted automatically.

However, both Lux Lite and Dimly use the inferior overlay method for their "bluelight filter" / "astronomer mode", i.e. for tinting the screen red. CF.lumen (with root driver) beats them easily there.
[Android General] charlestek:
[MENTION=7268959]rumbla[/MENTION]

All I can say is that you must have incredible ears. It's not like the postage stamp speakers in the Tab can move a lot of air, or the audio amp is very powerful, and on top of that the speakers are backward firing.
[Android General] rumbla:
I really have zero issues with KitKat, right now.

The only problems I had, were volume_lowest_level and brightness_lowest_level and I believe that installing Lollilop wouldn't fix those automagically.

Anyway, I just installed Lux Lite and yes, it permits to get the brightness to almost "black" like Dimly and CF.lumen (through the Custom Setting, like Tzul suggested) do.
[Android General] adrian1216:
I have to make this tablet bootable on charge detection. I think that only way is to make change in init.rt file (where charge class is called). Or maybe you know which file is responsible for battery animation when tablet is plugged to charge but not turned on....? playlpm is not available in /system/bin location.
[Android General] hackwerk:
Little bit offtopic: Can/howdo we change the boot logo and/or animation? Would like to put a picture there, or even a rotating pic... :)
[Android General] Tzul:
There's not that much (active) bloatware. To get rid of most, just delete the directory /system/appjar with a custom recovery or a file manager with root. That should free up about 300 MB on the system partition. But most of those apps weren't even active to begin with (because they were for other regions, e.g. Japanese apps for Japan).

You're in luck then, no messing around with the boot image required. :)

Please read my list of supported Fastboot commands.

You'll see that MediaTek (or Lenovo) implemented an "oem" command called "off-mode-charge". That's exactly what you're looking for!

Start the tablet in Fastboot mode (hold Power+VolumeUp key, wait for the menu, then use VolumeDown key to select "Fastboot" and use VolumeUp key to confirm). Connect USB. Get a Fastboot client for your PC and run "fastboot oem off-mode-charge 0". That'll make the tablet boot into Android when you connect USB while it's off. To enable off-mode-charging again, simply use "fastboot oem off-mode-charge 1".

The bootloader graphics in the "logo" partition are stored in a raw format, with a little proprietary header by MediaTek. I think there are some tools that can extract and rebuild the logo graphics, but I can't tell you specifics.

The Android boot animation is /system/media/bootanimation.zip, as usual. The "shutanimation" is also there. Those zip archives are uncompressed and are expected to contain certain files. I won't go into details here, because they're well documented elsewhere, you should easily find guides on how to modify or create these.

Correction: the tablet actually uses mp4 video files rather than the traditional zip file animations! "start.mp4" and "poweroff.mp4", also in /system/media/.
[Android General] charlestek:
On a related note, I seem to remember an issue that if the tablet is off and I plug in a charger and then later unplug the charger without paying attention to the screen ( I had the tablet screen covered with a leather case) that somehow the tablet gets turned on, which is not desirable for me. I did that a couple times and turned the tablet on a day later only to find the battery discharged because I thought that once the tablet was off, it wouldn't turn on by itself by any means.
[Android General] suhridkhan:
wow that's a very nice feature. It makes this tablet a good candidate for using as a in car gps/media center. The tablet will automatically start when the car is started.
[Android General] King Mustard:
The above is what I'm trying to do.

I do the following:

My tablet is off.

SP Flash Tool is open.

LenovoTab2A10-70_Android5_scatter.txt is selected in "Scatter-loading File"

Download Only is selected.

Recovery is ticked.

I hit Download.

I plug in the tablet.

SP Flash Tools shows me the following:

Any ideas?
[Android General] loner.:
You need to load the scatter file, hit the green line to the right of the recovery file name.
[Android General] Old faithful:
If you could give me some pointers on what to look for to reduce that blasted hyper saturation in KitKat, I'd love to know. It's the only thing that really bothers me about the KitKat version of Miravision.

---------- Post added at 22:50 ---------- Previous post was at 22:36 ----------

I'm really surprised how many of you have brightness issues with this tablet... As for myself it's only a tad bright in pitch darkness and needs all the light it can get in a brightly lit conference room... I wonder if that isn't a hardware issue (blacklight type or batch run)

BUT... Doesn't anyone beside me have issues with overly saturated pictures? Only on Lollipop are the colors decent for me... Then again I'm used to working with10-bit-hardware, calibrated LCDs with every device in the chain setup for the sRGB color space...
[Android General] Old faithful:
Just a quick question - I previously installed Xposed successfully on Lollipop, now I can't seem to make it work on KitKat - Anyone here with KitKat got it to work?
[Android General] Old faithful:
Well, it seems that the

only

module I really care for, Holo Themer, doesn't work, because many others work just fine :(

That's why I thought it wasn't working ...

Does anyone know of another way to have dark baground / light text on the UI level?
[Android General] Tzul:
Sorry, still haven't looked into Miravision, I keep it disabled ("Standard") and hope it doesn't waste too many system resources that way.

I doubt that your backlight is noticeably weaker. I regret selling my colorimeter a while ago, otherwise I would have made some brightness and color measurements already.

Believe me, compared to the lowest brightness of a Barnes & Noble Nook HD+, a tablet specifically made for reading, the lowest brightness on this Lenovo is still way too bright for comfortable reading in darkness.

Well, I guess not too many people are sticking with Kitkat. ;)

I didn't notice any differences in saturation, but I didn't specifically look for that either. Again, pity I don't have my colorimeter anymore. My PC monitor is also calibrated, but to AdobeRGB (because it has a wide gamut backlight).

I suppose it doesn't work because of the customizations the Lenovo made to their Kitkat firmware.

You might be able to undo Lenovo's changes by decompiling the framework-res.apk system file and modify the relevant contents, like the styles.xml file that should specify the default colors, for example. I've never done that myself, but read a bit about it in some guides/tutorials.
[Android General] Old faithful:
Yeah, it works fine in Lollipop... Just not so in KitKat...

Under Lollipop 'Material' White, I can fully understand your suffering. Typing this in Tapatalk (editor is black on white) even at the minimum setting is truly painful in bed, while reading (inverted, white on black) is perfectly fine.

The problem to me is not the backlight, it's that unbearable 'Material' black on white. In a few years when these idiots designers find themselves with reduced dark vision from having been blinded by that glare after for so many years, they'll realize their folly.

I do mainly because there's more white on black, much better for my eyesight ;)

I also run wide gamut monitors - but they are both set up to sRGB color space, so with the wide gamut I get 100% gamut coverage. Perfect for working online :)

Thanks! I'll have a look :)
[Android General] lion567:
TWRP 3.0 arm64 for A10-70F and A10-70L with 5.0.1 ROM

Finally I've managed to build arm64 (aarch64) version of TWRP 3.0 from actual sources.

I've packed two images for F and L versions. Difference only in kernel (I've include kernel from corresponding ROMs - S120 for F and S115 for L ) and in device name, model and fingerprint in default.prop.

I've tested both on my A10-70L with 5.0.1 ROM (A10-70L_S000115_160119_ROW) - both runs smoothly - kernel version doesn't make much sence. Backup folders differs based on model.

Images on Google drive - 11Mb each:

recovery-TWRP_300-0_A10-70F_arm64_lion567.img Control sums for the image:

MD5: b6e909ea04a92ff3ae4dd1565bc311f5

SHA1: 2cb8243140a3b097abd58795dbc51402cf98f3ad

recovery-TWRP_300-0_A10-70L_arm64_lion567.img Control sums for the image:

MD5: 2e920ca4ff8d99bc330921fa0d166a28

SHA1: d0d1f13e8275f1ca5fd0cfff032a1ab512ade038
[Android General] Tzul:
[MENTION=5469284]lion567[/MENTION] Great! So, did you find out what caused the incomplete system/data backup problem?

I uploaded a tweaked version here (for the A10-70F and A10-70L), hope you don't mind. Added the latest kernels for each, added my recovery.fstab (partition names), added tzdata (to kill the "__bionic_open_tzdata" error messages with certain shell commands), made the partition list in Install->Image use all available screen space, added Advanced->Install SuperSU button, integrated the complete SuperSU v2.52 again, added ntfsfix and ntfs-3g binaries so that NTFS formatted storage can be mounted...
[Android General] hajkan:
Hi [MENTION=5469284]lion567[/MENTION]

So what are the pros of using the latest build you made over the one mentioned in the first post? Do you know if your build supports sncrypted backups and encrypted partitions?
[Android General] adrian1216:
[MENTION=5919159]Tzul[/MENTION] thank you for yor help. Boot on charge works as expected, thank you.

Generally superUser is enough to make my app doing some kind of things on tablet. But I wonder about alternative.

I'd like to make my app signed as system app and install it in /system/app/ location as default. There http://stackoverflow.com/questions/3635101/how-to-sign-android-app-with-system-signature is described how to do it. But is required to have system (ROM) key to sign app and to make it as system app. Is it possible to rebuild stock ROM and receive system key to sign and make my app system, or I have to use some kind of Custom Rom like Cyanogenmod. I d like to to do in app operations like stoping another packages <uses-permission android:name="android.permission.FORCE_STOP_PACKAGES"/> (especially com.android.settings), and also adb shell pm clear my.wonderful.app.package . Thanks for help in advance.
[Android General] lion567:
Not yet :(

Arm64 version of TWRP doesn't suffer from this issue from the beginning (2.8.7.0).

I'm build armeabi (32-bit) version with omnirom-5.1 source tree to see if this can help.

You are welcome! :good:

I hope you don't miss additional system_image emmc partition for sparse image flashing? ;)

BTW how do you get rid of annoing "tzdata" warnings?

IMHO there are two main diffs:

- languages support

- support for flashing sparse ext4 images from SP FlashTool ROMs - most usefull for system.img (System Image item in partitions list for image flashing) - now anybody can upgrade to new ROM version without PC by downloading archive with ROM for SP FlashTool directly to tablet SD, unpacking it, renaming *.bin to *.img and flashing required images via TWRP Install Image.

I hope it should, but I don't test either of them. There is dedicated "encryption" tab in Backup page.
[Android General] rumbla:
Wanted to post just a little update on my issues.

CF.lumen works great.

Sure, it's not the most user-friendly app when it comes to simply tweak brightness, but that's not a big problem anyway.

I will use it, from now on

Note that I had a couple of system-crashes using it. Most likely due to other apps handling the screen, like Dimply/LuxLite, while CF.lumen service was active.

The DolbyATMOS setting to level the sounds was giving me that ULTRALOUD volume. Turning it off solved the issue.

Thank you!

See ya when I will upgrade to Lollypop...
[Android General] Tzul:
Good luck. I was wondering if maybe overheating had something to do with it, because I saw my CPU temperature rise to 60°C and higher when the incomplete backups happened. With the working versions, CPU temperature always stayed a bit lower, around 55°C. Could be wrong, it's just a guess.

Oops, I missed that. Just fixed it.

And I also fixed USB mass storage support!

You configured it correctly, but the button did not show up in the "Mount" menu.

This is the reason - TW_HAS_EXTERNAL is never set before, so it returns a value of 0, and TW_HAS_USB_STORAGE gets set to 0, disabling USB mass storage.

I wonder if that's a bug in the TWRP source, because "TW_HAS_EXTERNAL" is used nowhere else in the entire source... In my opinion, lines 802 to 805 should just be removed.

Some commands like "ls -l" need timezone data to properly convert and display timestamps. That data is expected in /system/usr/share/zoneinfo/tzdata. But by default, the /system partition is not mounted, so that file cannot be found. My solution is simple: include the file in the ramdisk, so it's always there, whether /system is mounted or not. :)

[MENTION=5336215]hajkan[/MENTION] Encryption (password protection) for backups is supported by default. You can tell that it's supported when openaes is included in the ramdisk.

However, encrypted Android filesystem is not supported. You can tell because /sbin/libcryptfslollipop.so is missing, for example.

TWRP needs to be compiled with "TW_INCLUDE_CRYPTO := true" (see here), in order to supported encrypted Android filesystem.
[Android General] lion567:
bzfox has reported correct backup/restore with my last TWRP 3.0 32-bit build. May be it was some incompatibility between TWRP 3.0 sources from android-6.0 branch and rest of omni source tree from android-4.4 branch?

I'm going to restore KK on my tablet and test backup/restore with 32-bit TWRP build.

Yes, correct, this one was commented out in my BoardConfig.mk.
[Android General] BoredDude:
Hi there, just received this wonderfull device yesterday and i'm loving it

thank you so much for the contributions you've made, but i have a little problem.

When i'm watching a youtube video sometimes it catches up with the buffering and it saysThere was a problem while playing. Touch to retry" , video starts again but even if the buffer goes normal the mistake keeps coming up every 10 seconds or so.

Even thought my first bet was my ****ty internet it isn't the cause of the problem, and it has also happened that playing some games it pauses and then continues.

I haven't touched the recovery, only rooted with kingroot and installed greenify.

hope you can help me out!
[Android General] clsA:
Did you take all the OTA updates before rooting? wifi was pretty crappy on the first versions of Lollipop
[Android General] dylix:
So Im having a few issues trying to flash twrp on this. I've tried using the directions for smart flash, selected the proper scatter file, did the recovery check box, and the .img file location..

it just times out using this program

I also tried flashing via fastboot the .img file to recovery partition.. I got no errors, but the screen just gave me how long it took to transfer the file, no further information..

Any ideas? I've rooted,custom modded all my other tablets, phones in the past with no issues. so i'm not quite sure why its not working for me if it is for others. ;\

i have pics, but it wont let me post the links...

****EDIT*****

ok fixed.. apparently i was using sp flash v5.1524.. found a new v5.1548 and worked as expected :D yay
[Android General] BoredDude:
yes, i have the a10-70f_S000121_151222_row.
[Android General] dylix:
Are there no custom roms for this device? I am having quite a bit of trouble locating any..
[Android General] Tzul:
We obviously don't have Lenovo's private key and probably will never obtain it. And it shouldn't be necessary for this anyway. Can't you just sign your app with the common "test key", or whatever other third-party-apps are using?

Besides, apps in /system/app/ do not have special system privileges anymore, the apps that need them must be placed in /system/priv-app/ since Android 4.4 or so.

No surprise there. Making custom firmwares for MediaTek devices has traditionally been problematic (because of their refusal to share all required source code). It's been getting a bit better in recent times. I've heard that there's an unofficial CyanogenMod 12.1 for the Elephone P6000, for example, which is based on similar MediaTek hardware (the first Carliv custom recoveries we had for this tablet were actually adapted from P6000 ones, apparently).

There are no custom firmwares until someone starts porting one... and that can take quite a bit of experience and effort.

I use youtube on my tablet quite a bit, and have never experienced this problem. Can you rule out that Greenify or something else you installed is causing it?
[Android General] Famf9983:
Hello guys! My only issue with this tablet at the moment is that I can't add another user. I've installed TWRP and rooted. Running on latest lollipop build.

My question is if it is necessary to install xposed? And if anyone can point me in the right direction to enable multiple users. Thanks for any help and thank you OP for all your hard work :good:
[Android General] Listy2021:
http://repo.xposed.info/module/com.anton111111.xposed.multiusers :good: