yashsingh1/xdaforums huggingface dataset:
[Galaxy Tab 10.1 Android Development] Temu:
BL will set LR to PC+4/2 and we can use LR to return to the next instruction. But, I think we need to be careful here since BL will overwrite the LR of the caller. Hopefully it already have its LR on the stack, but it is a dangerous assumption. Further I would like to have the original instruction intact in order to decode it. I think patching the instruction is a no go in the end. But the exception routine should be able to push the PC forward an instruction, I guess you already do that when emulated the load and stores. Further, if one manages to trick the user-space program to dlopen the neon-helpers, then one could redirect the the user-space program to the helper and prepare it with a proper LR and INSN bytes for decoding. Then the helper should be able to BR <lr> back to program when instruction is done. This need some more thinking... :)
[Galaxy Tab 10.1 Android Development] mop09737:
New 1310 Rom

I installed this rom with 7.0 pico gaps, and so far so good, no problems.

Thank you very much. ::o:good:
[Galaxy Tab 10.1 Android Development] dihoc:
After a few week using your rom, decatf, my tab runs very smoothly. Thank you for that. I have found 2 things though,

1) The stock browser freezes. I can use Firefox instead. It is not a problem.

2) The battery does not show correct percentage of completion. I charged my tab overnight when its battery was down to 20%. It was still at 20% mark the next morning. But when I switched to the older rom, i.e., Omni 5.1, I saw that the battery was full charged.
[Galaxy Tab 10.1 Android Development] memiselfandi:
Hey decatf,

Having fun playing with this ROM. Followed instructions to install and it seems to be working a treat. Thanks.

Apologies if this has been asked before, I have tried searching but can't find the answer. I finally got round to rooting my P7510 to play with overclocking CPU and GPU and some of the other kernel features you mention. I've installed Kernel Adiutor and I guess some of the kernel features you mention are just there and not configurable, but do you recommend any app(s) to modify those which can be changed.

Thanks again for bringing my old faithful SGT up to date.

Cheers

Sean
[Galaxy Tab 10.1 Android Development] decatf:
It did require pushing the PC forward. Within the exception handler it's operating in kernel mode. So it's not in the context of the userspace application anymore. The exception handling is in arch/arm/kernel/traps.c. Particularly do_undefinstr(). In this mode there is a view of the CPU state, registers, PC, stack, and all. It seems we have a bit of control over what happens from this context.

I had a crack at it and was able to assign the PC to another address. We hit the kernel trap then point PC to a new address. I put the instruction that caused the exception in a regular ARM register. Then in the user-space function it is manually popped before returning.

Right now I am using an ugly way to dlopen a lib early on in application launch then load the custom function address to one of the emulated NEON registers. In the kernel exception it reads the address from this register every time. It's not good but enough to plumb out a demo.

Here is the what the exception handler and user-space lib look like:

Kernel exception handler:

unsigned long __user *pc = (unsigned long __user *)regs->ARM_pc;
unsigned long __user *sp = (unsigned long __user *)regs->ARM_sp;
uint32_t rx;
uint32_t rx_val;

// Push R7 to the stack
// NOTE: The userspace instruction handler is reponsible for restoring R7
rx = 7;
rx_val = regs->uregs[rx];
regs->ARM_sp -= 4;

sp = (unsigned long __user *)regs->ARM_sp;
put_user(rx_val, sp);

// store the unhandled instruction
regs->uregs[rx] = instr;

// BL user_func
regs->ARM_pc = user_func;

Custom userspace function:

handler_asm_func:
push	{r0, lr}

bl	handler_c_func

# kernel trap pushed R7 to stack then called this func
# Restore things before returning:
# 1. load R7 from stack
# 2. shift the stack contents up
# 3. increment the SP
ldr	r7, [sp, #8]
ldr	r0, [sp, #4]
str	r0, [sp, #8]
ldr	r0, [sp, #0]
str	r0, [sp, #4]
add	sp, #4

pop	{r0, pc}
[Galaxy Tab 10.1 Android Development] Temu:
Sounds like progress. I wish I had some time helping out. Tried to use your manifest but i need to learn repo to get it working. I guess I need to edit your manifest so that it fetches the gits from github.

Meanwhile, what do you think the about the cost for making the detour into the exception handler for every NEON instr? Is it acceptable? I can see that you push a few words to the user-stack, is that costly? I trying to figure out a way to avoid the undef_exception everytime for a given addr. If we are lucky the function containing the NEON pushes LR in its prologue and then we could replace the NEON instruction with bl <addr>. Before returning the control back to user-space, we need to put the original instr in some kind of struct in the helper lib context, mapping the address in LR with and instruction. That would make the cost minimal..

/BR Temu
[Galaxy Tab 10.1 Android Development] Ftoni:
GT-P7510 Wifi

Hello,

Installed new build using twrp3020-20160911.tar and build AOSP-7.0-p4wifi-20161013 with open_gapps-arm-7.0-pico-20161019. I had a small Error message concerning browser app but it installed and I could connect to google play store.

Installed Non Neon Kodi including PVR Simple Client and ist works. What does not work are widgets like clock even if you install apps like weather etc. but who cares....

Great job I'm happy whith thatl....Thank you.....:):):cool::cool:
[Galaxy Tab 10.1 Android Development] AndroidianoSr:
Xposed work on this rom?
[Galaxy Tab 10.1 Android Development] jaibar:
When xposed will be available for Android 7 / Nougat, it will probably work on this ROM.

Until then, no xposed for any N/7 ROM...
[Galaxy Tab 10.1 Android Development] AndroidianoSr:
Nice rom but i've problem with widget, they disappearing after reboot
[Galaxy Tab 10.1 Android Development] jacky03:
Hey，who knows why it didnt had clock widget[emoji21]

通过我的 GT-P7510 上的 Tapatalk发言
[Galaxy Tab 10.1 Android Development] AndroidianoSr:
Widgets disappearing when reboot my device
[Galaxy Tab 10.1 Android Development] jacky03:
Ok,when the xposed support Nougat.I will flash aosp 7.0

Quickly xposed[emoji18]

通过我的 GT-P7510 上的 Tapatalk发言
[Galaxy Tab 10.1 Android Development] Dunaev190655:
widgets

Help! Who knows why the missing widgets:(
[Galaxy Tab 10.1 Android Development] jacky03:
Saw it on #114/#115

通过我的 GT-P7510 上的 Tapatalk发言
[Galaxy Tab 10.1 Android Development] eturk01:
thanks to dev(s) for your work on this!!

would you say this ROM is more responsive, faster, than stock?

was just handed an old tablet and even reset, super slow & unusable.

cheers!
[Galaxy Tab 10.1 Android Development] jacky03:
Oh,yes

Cheers..

通过我的 GT-P7510 上的 Tapatalk发言
[Galaxy Tab 10.1 Android Development] decatf:
No

Anything is possible. I never have sim card in though.

Link to commit?
[Galaxy Tab 10.1 Android Development] ps.m:
Could it be, that I have some hardware problem with my device, since your device does not boot with error?
[Galaxy Tab 10.1 Android Development] decatf:
I don't know. If it only happens the first boot then maybe something timed out. The first boot is always slow anyways.
[Galaxy Tab 10.1 Android Development] Alexanderfedson:
@ decatf there is one problem that I face . I flashed your room from 5.0 to 7.0 I was just expecting my Bluetooth keyboard to connect with tab. It detects other Bluetooth phones but not any input devices. Can you help ?
[Galaxy Tab 10.1 Android Development] denso_89:
hw codec or media framework making problems
[Galaxy Tab 10.1 Android Development] rokami:
wifi 5G ... not working
[Galaxy Tab 10.1 Android Development] jknara:
Discharges when the power is turned off.
[Galaxy Tab 10.1 Android Development] aamadorj:
This is an issue related with hardware, according to this post from the dev a while ago:

Remember to search the thread to avoid clutter.
[Galaxy Tab 10.1 Android Development] jknara:
WiFi signal is weak.

WiFi signal is weak. Especially, 5G is not caught. Youtube sound and screen do not match. Please let me know the solution.
[Galaxy Tab 10.1 Android Development] xda_DD:
I am using 7.1.2 (20171005) on GT-P7510.

Having problem with Magisk 18 (and 17.3) - tablet won't boot,

stuck at Samsung logo. But Magisk 17.2 works.

Has anyone succeeded in upgrading Magisk beyond 17.2 on Galaxy Tab 10.1 ?
[Galaxy Tab 10.1 Android Development] jrobbom5:
I had the same problem, needed to go back to 17.1

It's not unexpected, the amount of software that will run on these things keeps dwindling all the time. I'm amazed that decatf has managed to squeeze as much life out of them as he has! :)
[Galaxy Tab 10.1 Android Development] decatf:
This should work: Magisk-v18.0-p75xx.zip

The difference in this modified Magisk is that I removed the code below. Looks like some sort kernel hacks for newer devices. It probably isn't needed for this device.

https://github.com/topjohnwu/Magisk/blame/v18.0/scripts/boot_patch.sh#L150-L158
[Galaxy Tab 10.1 Android Development] jrobbom5:
Nice, thanks for squeezing that little bit more :cool:
[Galaxy Tab 10.1 Android Development] xda_DD:
Yes, it works. Thank you!
[Galaxy Tab 10.1 Android Development] Sp33dFr34k85:
Very nice ROM, got this tablet basically for free and thought I'd try an upgrade to this (seemingly popular) ROM :)

Got only one real important issue here, the video/audio seems to be running out of sync after a while. Is there anything I can do about that?
[Galaxy Tab 10.1 Android Development] ricmck:
Failure to set up

Hi The ROM and G apps installed fine.. Upon booting the setup wizard crashes. I can not get past the "set up as new screen".

I tried new downloads and reinstalling. I get the same error P4 WiFi version "GT-P7510"

Any suggestions?

Thanks

Rick
[Galaxy Tab 10.1 Android Development] ricmck:
I used the 7.1.2 Gapps and it looks like it worked :)
[Galaxy Tab 10.1 Android Development] Andreatheflyer:
Cannot install ROM

Hi guys,

I tried several times this procedure but I can't update the ROM.

I have a GT-P7500/p4. Root is done via Kingo. I tried different versions of both ClockWork and TWRP recoveries but when comes the time to install the zip file with AOSP ROM it does not work.

The TWRP just stays there with the progress scrolling bar and nothing happens even after several hours.

The CWM says "set metadata some changes failed" and abort installation with error status 7. I read somewhere that this is related with the "assert" lines section in the update script file, but this file in the AOSP ROM does not have any assert entry.

What am I doing wrong? :confused:

thanks. Andrea.
[Galaxy Tab 10.1 Android Development] bierma32:
[MENTION=9650962]Andreatheflyer[/MENTION]

Can you post a Recovery log from TWRP after to try the flashing .

Which Tab did you have P 7500 or P 7510

Which TWRP Version did you tried ?

Have done a full / clean wipe ?
[Galaxy Tab 10.1 Android Development] decatf:
[MENTION=9650962]Andreatheflyer[/MENTION]

And @ anyone else getting stuck while installing in TWRP.

In TWRP.

1. Go to Mount

2. Check the Cache, System, and Data partition.

3. Go to Advanced > Terminal

4. Run:

fstrim -v /data
fstrim -v /system
fstrim -v /cache
[Galaxy Tab 10.1 Android Development] Andreatheflyer:
I don't know exactly how to handle the twrp log in this case because once the installing process start there is nothing else i can do except forcing a reboot by holding the power button. However, the last line it prints out is:

"Target: samsung/GT-P7500/GT-P7500:4.0.4/IMM76D/XXLQ8:user/release-Keys"

then it stays there without further progress, despite the progress bar below keeps scrolling.

I have a P7500, wifi+cellular. And I use the p4 release accordingly.

I tried different versions of the twrp, and of cwm as well. Now i'm using the latest twrp that comes with the app.

Yes, i did a wipe of everything except storage (cache, system, dalvik, user) in the advanced wipe menu.

I tried also all the releases of the aosp 7.1 but none comes to a success. Instead I tried the previous aosp 6.0 marshmallow and worked like a charm.

---------- Post added at 10:02 PM ---------- Previous post was at 09:57 PM ----------

Am i supposed to do this after the wipe and before installing the zip file?

---------- Post added at 10:13 PM ---------- Previous post was at 10:02 PM ----------

Am i supposed to do this after the wipe and before installing the zip file?
[Galaxy Tab 10.1 Android Development] Andreatheflyer:
Happy new year

I tried this. The commands went fine but still no luck with installation.

Also, in aosp 6 some apps crash on startup: facebook (lite works), wechat, snapchat.
[Galaxy Tab 10.1 Android Development] decatf:
Oh well. I have rarely encountered the freezing but running trim resolved it. There hasn't been any other explanations for why it is happening for some users.

It is expected that many apps won't work. This device is very old and app developers don't support it anymore.
[Galaxy Tab 10.1 Android Development] C0rn3j:
Would you be so kind and rebuild the ROM, if only for the security patches?

Thanks for supporting this device so long.
[Galaxy Tab 10.1 Android Development] Andreatheflyer:
Is it the correct order 1) Wipe, 2) Trim, 3) Install? Or i'm doing something wrong?
[Galaxy Tab 10.1 Android Development] decatf:
That's the right order.
[Galaxy Tab 10.1 Android Development] seangibbz:
Screen orientation bug on P7500R

One small bug I've noticed is that the screen appears upside down (rotated 180°) on my device once the OS fully boots.

The "Samsung Galaxy" and "android" boot logos display with the correct orientation during boot.

I'm using a GT-P7500R (Canadian variant of the p4 / GT-P7500) if that helps.

The ROM works as expected otherwise.

--

Update: I tried setting the system build.prop "ro.sf.hwrotation" value to 180.

The "Samsung Galaxy" boot logo rendered correctly, but "android" boot logo rendered upside down".

Once fully booted, the OS rendered correctly (right-side up).

However, touch input did not match the screen. i.e., touch input responded as though the screen was still rotated 180 degrees, severely impacting usability.

I managed to reset hwrotation back to 0, which made the screen upside-down again, but at least touch input matches again.
[Galaxy Tab 10.1 Android Development] decatf:
Is the screen rotation upside down on other ROMs?
[Galaxy Tab 10.1 Android Development] seangibbz:
It seems to just be this ROM. I tried the Oreo ROM, and that one was correctly oriented (however, it ran much slower than the Nougat ROM).

I've seen some android apps aimed at setting the orientation, so I'll give that a try and report back.
[Galaxy Tab 10.1 Android Development] geparrd:
I just installed nougat on the gt-p7500 according to your instructions, it's all right, I'm thrilled, thank you very much ...

During testing, I notice problems, the chrome can not work, the RAM memory is too busy, and maybe it has to do with it ... 1 GB of RAM seems to be insufficient for this exhibition on an older tab...:D

I have huavei g-700 on jb 4.2.1 applications that work on it do not work on gt-p7500 with nougat-how to understand it ...
[Galaxy Tab 10.1 Android Development] eggsy13:
Awesome. Found this useful in 2019. thumps up
[Galaxy Tab 10.1 Android Development] Duvel999:
Use light app versions. Than this Rom runs smoothly. Firefox focus , etc not chrome
[Galaxy Tab 10.1 Android Development] ercan3firat:
thank you
[Galaxy Tab 10.1 Android Development] vkmaxx:
Where we can download newer 7.1.2 build?
[Galaxy Tab 10.1 Android Development] magyarlatin:
bootloop

I have tried all the versions available and it does not go over the android boot screen, it always gets stucked in a bootloop, tried with TWRP 2.X and 3.X and still the same results, coming from Stock ROM 4.0.4, what am I doing wrong?

My steps are the following: coping the files to the internal storage, flashing the recovery, wipe dalvik, cache system, data and then flashing the custom ROM.

Thank you in advance for the help.
[Galaxy Tab 10.1 Android Development] xda_DD:
Could you take a look and adjust Magisk 18.1 code too please ?
[Galaxy Tab 10.1 Android Development] HarK0nNeN:
Kernel recommendation?

I like to give thanks to decatf for the hardwork for 7.1.2 asop! Flashed it on to my P7500 and its working! however it is quite laggy/slow, interface wise and also i just tried playing youtube and the graphics/video was also very laggy. Also tried to root with phh's SuperUser, but doesn't seem to work at all, will try another method. TWRP didn't work for me to load the rom, had to adb sideload with gapps

I haven't flashed a rom since version 4.0.4 so its all quite new for me to flash custom rom/kernels again.

I checked that I am running Kernel 3.1, is it recommended to flash to a better kernel? stable with most features available? Could anyone direct me to some kernels which are pretty good for this tab?

Thanks in advance!
[Galaxy Tab 10.1 Android Development] bierma32:
Have you tried to over clock CPU ,but you need Root access.

SuperSu works fine for me, at the Start post you will find a magisk Version special for this Tab.
[Galaxy Tab 10.1 Android Development] HarK0nNeN:
Thanks, ill look into magisk, but im probably more keen into what kernel would probably be best at the moment.
[Galaxy Tab 10.1 Android Development] ps.m:
ftp://83.65.242.238/p4/

but keep in mind that it's a fork of decatf's version and could have the same but also some other bugs
[Galaxy Tab 10.1 Android Development] ps.m:
Hello Decatf,

have seen, that you updated your github repo for 7.1.2 using parts of android-security.

I have synced it (clean repo) and tried to build it, patching it to use openjdk.

It fails due to some API difference.

I ran make update-api even I dislike it, after that it fails due to some dependencies.

Have you built it already or is it work in progress?

Thanks
[Galaxy Tab 10.1 Android Development] decatf:
I've built and tested it. I just never got around to uploading the builds.

The last time I compiled it was February 22, 2019. I did not use any local repos. Everything was synced as is from the manifests on my github repo.
[Galaxy Tab 10.1 Android Development] ps.m:
This is what I get:

Starting build with ninja

ninja: Entering directory `.'

[ 0% 1/26012] Checking API: checkpublicapi-current

FAILED: /bin/bash -c "(( /android/aosp/my-p4/out/host/linux-x86/bin/apicheck -JXmx1024m -J"classpath /usr/lib/jvm/java-8-openjdk-amd64/bin/../lib/tools.jar:/android/aosp/my-p4/out/host/linux-x86/framework/doclava.jar:/android/aosp/my-p4/out/host/linux-x86/framework/jsilver.jar" -error 2 -error 3 -error 4 -error 5 -error 6 -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18 -error 19 -error 20 -error 21 -error 23 -error 24 -error 25 -error 26 -error 27 frameworks/base/api/current.txt /android/aosp/my-p4/out/target/common/obj/PACKAGING/public_api.txt frameworks/base/api/removed.txt /android/aosp/my-p4/out/target/common/obj/PACKAGING/removed.txt || ( cat build/core/apicheck_msg_current.txt ; exit 38 ) ) ) && (mkdir -p /android/aosp/my-p4/out/target/common/obj/PACKAGING/ ) && (touch /android/aosp/my-p4/out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp )"

/android/aosp/my-p4/out/target/common/obj/PACKAGING/public_api.txt:24642: error 4: Added public method android.net.wifi.WifiManager.stopWifiDriver()

******************************

You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:

1) You can add "@hide" javadoc comments to the methods, etc. listed in the

errors above.

2) You can update current.txt by executing the following command:

make update-api

To submit the revised current.txt to the main Android repository,

you will need approval.

******************************

ninja: build stopped: subcommand failed.

build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed

make: *** [ninja_wrapper] Error 1
[Galaxy Tab 10.1 Android Development] decatf:
Well I've upload the ROMs for February 2019 security patch level.

I've never encountered this. For some reason compiling this ROM now depends on openjdk 7 even though Android 7 should be dependent on openjdk 8. I installed it months ago and forgot why. Maybe because of something changed when I rebased on to the android-security branches.

The openjdk-7 package I'm using is from this ppa. https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa

The repos were synced prior to compile.
[Galaxy Tab 10.1 Android Development] ps.m:
android-security (and the whole unlegacy project for samsung galaxy tab 2) compiles within the same environment, so there is nothing wrong with openjdk 8 generally. This might mean, that some part of the sources that are specific to this device make it fail. The ppa version of the package is not really recommended...
[Galaxy Tab 10.1 Android Development] decatf:
I don't know what's going on then. One option is to apply the patches from my repos on to unlegacy. I only have the compatibility requirements to make the android work on this device. In frameworks/base there are the set of substratum patches.

All of my patches should be applied on top of the base branch. There should be nothing buried far inside the commit history. You can diff against the base branch if you wish.
[Galaxy Tab 10.1 Android Development] decatf:
What make command are you running?

I added that stop wifi driver command but the build has never stopped due to API breakage. I thought it shouldn't matter anyways because it's an internal API.

To compile I'm I running:

make otapackage

I guess could try to revert these.

https://github.com/Decatf/platform_frameworks_base/commit/63419eaeebe91fe50109b2b077b0a2383c54c886

https://github.com/Decatf/android_f...mmit/51fb801e682e8bfc10af7c62d3cadeba9224d607

The story with these two commits is that turning off second CPU core while wifi chip is running can make the device hard lock. The kernel will turn off secondary CPU cores when powering off. So did this to turn wifi from userspace before the kernel starts to shut down.
[Galaxy Tab 10.1 Android Development] ps.m:
If I do not apply the substratum patches, what remains for compatibility (out of vendor/decatf - also for old/non-neon webview - and the device specific directories)? I would want to strip the changes down to the minimum...

I made earlier a diff from your sources compared to plain aosp, but there were too many changes so I could not decide what is really needed.
[Galaxy Tab 10.1 Android Development] ps.m:
Well, the make target (otapackage) is important, thanks for asking, without it the build fails (with the earlier presented failure)

I had some settings to build successfully lineageos in the same environment, this makes it fail building plain aosp and yours.

The 2 mentioned patches do not have to be reverted.

Anyway, I am interested in the minimally needed changes for this device (without substratum, I know also about signature spoofing that I use), the diffs on frameworks for ex. is huge...

I consider some other changes more relevant (for ex. providing a "clear all" button if you want to remove all background running apps (aosp lets this button appear only if you have only one app left in the queue)

Signature spoofing is though welcome, I am using fdroid instead of other "stores" and try to avoid the overhead of gapps.

I have currently tested both p4-user and p4-userdebug targets, the only thing that I do not understand is, why magisk fails, superuser works...
[Galaxy Tab 10.1 Android Development] decatf:
This probably isn't needed.

https://github.com/Decatf/android_libcore/commit/67713f963484278719a40284a763ef49b509c347

The "optimization" commits in bionic can be skipped. The non-NEON changes are required.

There are some patches for fs_mgr and e2fsprogs the following repos. I can't remember what these are for. It might have been f2fs related or recovery related. You could try to skip them but something might break. If it does then you know it's required.

platform_system_core

android_system_vold

android_external_e2fsprogs

Everything else is required.