yashsingh1/xdaforums huggingface dataset:
[Android General] a.raul:
Let's explain how to modify framework-res.apk Samsung Oreo

I want to explain my procedure, which is the one that is not giving me any problem of any kind, it may be that other DEV, do it differently.

framework-res.apk

We decompiled framework-res.apk

We will see that the names of some folders have been renamed eliminating the term -v ...

Go to res / values ​​/ styles.xml and delete the next line, one of the 2, the one we want, since they are identical

<item name="dropdownListPreferredItemHeight">@dimen/tw_dropdown_list_item_height</item> ## Delete line

We save and close, and compile,

We have compiled the framework-res.apk, we are going to rename it so as not to get mixed up, for example framework-res_mod0_compilado.apk.

Now we have to use framework-res.apk and framework-res_mod0_compilado.apk, we open both with 7zip.

Copy the framework-res_mod0_compilado.apk the folder res and resources.arsc in framework-res.apk

With this we will have prepared the framework-res.apk for future modifications and we will not have any problem in decompilation and compilation.

In future modifications, just copy / paste what has been modified.

If it influences resources.arsc of course what has been modified, but, if the modification influences an * .xml,

we will just pass that * .xml in in the corresponding folder, we will avoid fix.

I leave descriptive images of the steps, for better understanding.

Regards y spankys
[Android General] AbrahamGC:
ENABLE LANDSCAPE MODE ON TW (SMALI WAY)

I know we can do it modding cscfeatures, here is the way to do it via smali.

Tested on Note 8 running 8.0

1- Decompile TouchWizHome_2017.apk

2- Open smali/com/android/launcher3/LauncherFeature.smali

3- Find .method public static supportRotationSetting()Z

4- And replace it;

​

From:
.method public static supportRotationSetting()Z
.locals 1

sget-boolean v0, Lcom/android/launcher3/LauncherFeature;->sSupportRotationSetting:Z

return v0
.end method

To:
.method public static supportRotationSetting()Z
.locals 1

const/4 v0, 0x1

return v0
.end method

Then on TW settings u will see this :

Hope it helps :good:
​
[Android General] AbrahamGC:
DOUBLE TAP TO SLEEP ON STATUSBAR (ROMCONTROL OPTIONAL)

This feature is on our ROMs but disabled by default.... tested on Oreo but i used on Nougat too.

1- Decompile SystemUI

2- Open smali/com/android/systemui/KnoxStateMonitor$CustomSdkMonitor.

3- Find .method public isStatusBarDoubleTapEnabled()Z

Replace from:

.method public isStatusBarDoubleTapEnabled()Z
.locals 1

iget-boolean v0, p0, Lcom/android/systemui/KnoxStateMonitor$CustomSdkMonitor;->mKnoxCustomDoubleTapState:Z

return v0
.end method

To:

.method public isStatusBarDoubleTapEnabled()Z
.locals 2

const-string v0, "double_tap_statusbar"

const/4 v1, 0x1

invoke-static {v0, v1}, Lcom/android/wubydax/GearUtils;->getDbIntForKey(Ljava/lang/String;I)I

move-result v1

return v1
.end method

The mod now is by default true (enabled), so RC is optional, here is the code :

<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:title="Double tap to sleep"
android:key="double_tap_statusbar"
android:defaultValue="true" />

Now recompile and enjoy :good:
​
[Android General] AbrahamGC:
ENABLE LOCKSCREEN ROTATION (ROMCONTROL OPTIONAL)

This mod it's Being the same from MM, now just changed the location...

1- Decompile/baksmali SystemUI.apk

2- Open smali/com/android/systemui/Rune.smali

3- Find .method public static shouldEnableKeyguardScreenRotation(Landroid/content/Context;)Z

Replace from:

.method public static shouldEnableKeyguardScreenRotation(Landroid/content/Context;)Z
.locals 2

const-string/jumbo v0, "lockscreen.rot_override"

const/4 v1, 0x0

invoke-static {v0, v1}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z

move-result v0

if-nez v0, :cond_0

invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v0

const v1, 0x7f05000b

invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getBoolean(I)Z

move-result v0

:goto_0
return v0

:cond_0
const/4 v0, 0x1

goto :goto_0
.end method

To:

.method public static shouldEnableKeyguardScreenRotation(Landroid/content/Context;)Z
.locals 2

const-string v0, "agc_keyguard_rotation"

const/4 v1, 0x1

invoke-static {v0, v1}, Lcom/android/wubydax/GearUtils;->getDbIntForKey(Ljava/lang/String;I)I

move-result v0

return v0
.end method

The mod is enabled by default, so RC is optional:

<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:title="Lockscreen rotation"
android:defaultValue="true"
android:key="agc_keyguard_rotation"
app:packageNameToKill="com.android.systemui"
app:isSilent="true" />

Recompile and done :D
​
[Android General] a.raul:
TOGGLE COLORINVERSION

This mod tries to change the piece of "monster" that we have in the switches and have access to the activation and deactivation, at least we think, no? [MENTION=7393522]AbrahamGC[/MENTION]

Download the zip attached to the post

We decompilate SystemUI.apk

Go to the drawable folder and copy/paste the *.xml attachments in the zip

Go to the drawable-xxxhdpi folder and copy/paste the *.png from the zip

Go to res/values/strings.xml and look for the line, and add ColorInversion

<string name="quick_settings_tiles_default">Wifi,....[COLOR="Blue"]ColorInversion[/COLOR]</string>

We search in public.xml, in my case it's

<public type="drawable" name="ic_invert_colors_disable_animation" id="0x7f0801f4" />
<public type="drawable" name="ic_invert_colors_enable_animation" id="0x7f0801f6" />

Go to ColorInversionTile.smali and look for the ids of public.xml (0x7f0801f6 and 0x7f0801f4), change id in red for the blue line...

const v1, 0x7f0801f6 ## <public type="drawable" name="ic_invert_colors_enable_animation" id="0x7f0801f6" />

const v2, [COLOR="Red"]0x7f0801f3[/COLOR] [COLOR="Blue"]## cambiar por <public type="drawable" name="ic_invert_colors_enable_animation" id="0x7f0801f6" />[/COLOR]

invoke-direct {v0, p0, v1, v2}, Lcom/android/systemui/qs/tileimpl/QSTileImpl$AnimationIcon;-><init>(Lcom/android/systemui/qs/tileimpl/QSTileImpl;II)V

iput-object v0, p0, Lcom/android/systemui/qs/tiles/ColorInversionTile;->mEnable:Lcom/android/systemui/qs/tileimpl/QSTileImpl$AnimationIcon;

new-instance v0, Lcom/android/systemui/qs/tileimpl/QSTileImpl$AnimationIcon;

const v1, 0x7f0801f4 ## <public type="drawable" name="ic_invert_colors_disable_animation" id="0x7f0801f4" />

const v2,[COLOR="Red"] 0x7f0801f5[/COLOR] [COLOR="Blue"]## cambiar por <public type="drawable" name="ic_invert_colors_disable_animation" id="0x7f0801f4" />[/COLOR]

Regards and...
[Android General] okashi1993:
thanks for guild but i have problem , what is rom control and i read more topic :((
[Android General] Albe96:
SystemUI Compilation Error Fix!

​

Some of you may got SystemUI error compilation error on Oreo SystemUI.Like I've got while I was modding a SystemUI from S9 Ports.

This is the error-->

Recompiling "SystemUI.apk" With Original Signature, using original "AndroidManifest.xml"

in work area "_WorkArea1", using "apktool_2.3.2.jar"

With Tickle My Android 15.3.0.1

(tinyurl.com\ticklemyandroid)

----------------

Installed Framework File(s):

framework-res.apk [1.apk]

----------------

I: Using Apktool 2.3.2

I: Smaling smali folder into classes.dex...

I: Smaling smali_classes2 folder into classes2.dex...

I: Building resources...

W: ERROR: 9-patch image C:\Users\PRATIK\Downloads\TickleMyAndroid\_WorkArea1\_working\SystemUI.apk\res\drawable-xxxhdpi\pip_dismiss_scrim.9.png malformed.

W: No marked region found along edge.

W: Found along left edge.

W: ERROR: Failure processing PNG image C:\Users\PRATIK\Downloads\TickleMyAndroid\_WorkArea1\_working\SystemUI.apk\res\drawable-xxxhdpi\pip_dismiss_scrim.9.png

brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\PRATIK\AppData\Local\Temp\brut_util_Jar_263024460294097589.tmp, p, --forced-package-id, 127, --min-sdk-version, 26, --target-sdk-version, 26, --version-code, 20171030, --version-name, 8.0.0, --no-version-vectors, -F, C:\Users\PRATIK\AppData\Local\Temp\APKTOOL7435757061244629601.tmp, -0, arsc, -0, webp, -0, qmg, -0, arsc, -I, C:\Users\PRATIK\Downloads\TickleMyAndroid\_WorkArea1\Frameworks\1.apk, -S, C:\Users\PRATIK\Downloads\TickleMyAndroid\_WorkArea1\_working\SystemUI.apk\res, -M, C:\Users\PRATIK\Downloads\TickleMyAndroid\_WorkArea1\_working\SystemUI.apk\AndroidManifest.xml]

----------------

Recompile Not Successful!

How To Fix-->

You Can Simply Fix By Replacing The PNG Attached.Just Replace It In Directory.And You're Good To Go! :)​
[Android General] Josevega:
well followed this steps from someone in my spanish discussion rom and gave it a try at the end i got OEM unlock without waiting 7 days and thought it would be nice to share

1 download lastest fully stock firmware and flash through Odin

2 change date and time 8 days before

3check for ota and wait until it says that you're on latest version , check if ota date is set to the date you set(without rebooting)

4 reboot and check for ota again (it will take from 1 to 2 mins) go back and check if date changed

5 reboot again and enable developer option, oem unlock will be there(you may need to wait up to 1 hr for it to show)

6 flash twrp as you should normally do and install the atached zip without rebooting to system until you flash it

7 enjoy oreo BL :D

Thanks to [MENTION=6911575]BlackMesa123[/MENTION] for his rmm state bypass zip

Original zip post : https://xdaforums.com/samsung-a-ser...root-january-security-patch-sm-t3739225/page3
[Android General] BlackMesa123:
You could at least link my post/credit me and my team... ?
[Android General] ashyx:
Agreed.
[Android General] Josevega:
Sorry mate had a that Zip a long time ago and didn't remembered the usernames will edit post, can you PM the Original post ?
[Android General] AbrahamGC:
https://xdaforums.com/showpost.php?p=75360965&postcount=22
[Android General] BlackMesa123:
https://xdaforums.com/showpost.php?p=75360965&postcount=22

Anyway my team mates tried that long time ago (before I released my zip lol) without success, so for now we can't say that workaround works for sure, Samsung isn't that stupid to make affect a BL lock by simply changing Date in Settings, so for now it's a big "Question mark"
[Android General] Josevega:
It really is working been trying it with some users and myself and it worked for then , will check if more users have succes with this method for now it has worked with 4 users that tried (that I know )
[Android General] ashyx:
If it does it soon won't be. Samsung will patch it.
[Android General] _alexndr:
[MENTION=8108390]Josevega[/MENTION]

Besides, despite you edited your post already, you probably haven't noticed that there is the updated version of [MENTION=6911575]BlackMesa123[/MENTION]'s fix which supports S9/S9+. Since you posted this guide in "Android Development and Hacking > Android General" - IMHO it is really important to put just link to [MENTION=6911575]BlackMesa123[/MENTION]'s post containing updated version, which works in ALL Samsung devices (instead of attach previous/old ZIP which may lead S9 users to serious problems)
[Android General] jack allen:
Im not sure if this is in the op i have looked twice now so i apolagize now for asking is there a zip for adding reboot to recovery on the power menu. Thank you.
[Android General] ragassagar:
Thank you Dev.. I am kind of new to this :)
[Android General] Eleo:
You need 7zip file manager to open it. I opened it, converted to zip and sharing in both attachment and gdrive link.

I hope this is the end of it.

https://drive.google.com/file/d/1zguUTqSGV9SY3_x5xytLQONRoMDrMyEv/view?usp=sharing
[Android General] baruaberger:
Thanks.Now i got it and i think this will be end now and i apologies to all of you if anybody got disturbance for me.Thanks to all.
[Android General] ragassagar:
[MENTION=7393522]AbrahamGC[/MENTION] Hey, Sorry to trouble you again, but how do i add double click power button to turn on flashlight to framework-res.apk?
[Android General] Josevega:
Can anyone please link me to the gearutils guide , I've been trying to add but can't find how or where to get it
[Android General] AbrahamGC:
https://xdaforums.com/showpost.php?p=67930675&postcount=8317
[Android General] Alex-V:
Samsung added some lines again on the s9+ ..(write from mobile at this time..maybe I can add the lines tommorow) but the mod is still working. Thanks for this.
[Android General] diphons:
Show Touch Key Light Duration on Display Settings

Decompile SecSettings.apk

go to smali/com/samsung/android/settings/display/SecDisplaySettings.smali

Find key "touch_key_light"

before tap_to_wake

and remove red line

const-string/jumbo v24, "touch_key_light"

move-object/from16 v0, p0

move-object/from16 v1, v24

[COLOR="Red"]invoke-virtual {v0, v1}, Lcom/samsung/android/settings/display/SecDisplaySettings;->removePreference(Ljava/lang/String;)V[/COLOR] [COLOR="DeepSkyBlue"]#Remove this[/COLOR]

:cond_a
invoke-virtual/range {p0 .. p0}, Lcom/samsung/android/settings/display/SecDisplaySettings;->getResources()Landroid/content/res/Resources;

move-result-object v24

invoke-static/range {v24 .. v24}, Lcom/samsung/android/settings/display/SecDisplaySettings;->isTapToWakeAvailable(Landroid/content/res/Resources;)Z

move-result v24

if-eqz v24, :cond_1e

const-string/jumbo v24, "tap_to_wake"

Done

Save and recompile SecSettings

Tested on Stock S7E and Port S9Plus

guide for recompile SecSettings

https://xdaforums.com/showpost.php?p=76259533&postcount=40
[Android General] inspired55:
Is there a way to do this with out rom control. On an oreo based rom. I've tried not excluding next alarm toggle and the smali rom control mods and I end up with a black screen. Also I tried building exactly as the guide says figuring my lock screen would work but not able to engage but still end up with black lock screen.
[Android General] Josevega:
If you're getting black screen is because you're not doing it right if you want to use it without rc search for the key and change the value from 0x0 to 0x1 , but this isn't the reason why you're getting black screen
[Android General] edzamber:
Check ids mate
[Android General] inspired55:
What do you mean key and change value from 0x0 to 0x1. Where do I search for this key. Black screen problem solved. Now just need to engage . Thanks

---------- Post added at 08:12 AM ---------- Previous post was at 08:10 AM ----------

What do you mean key and change value from 0x0 to 0x1. Where do I search for this key. Black screen problem solved. Now just need to engage . Thanks
[Android General] AbrahamGC:
Search this :

const-string v2, "next_alarm_toggle"

const/4 v3, 0x0 ### Replace 0x0 with 0x1

Then the mod is enabled by default :good:
[Android General] Grouxho:
Modded Screen Recorder apk and SystemUI Tile - PIE - OREO (Updated 16/01/2019)

Well, since adding the custom tile to screen recorder is getting some issues depending on if your kernel is permissive / enforcing and if you are in odex / deodex + core -oj i have made a tile for samsung screen recorder. In this way this is compatible with odex and deodex roms.

GUIDE

1.- Download Attached rar

2.- Decompile SystemUI.apk

3.- From rar take the smali (GrxScreenRecordTile.smali) and place it in smali/com/systemui/qs/tiles

4.- From rar take the png (grx_screen_recorder.png) and place it in res-drawables

5.- To avoid ****lagsungwiz analytics error log line when pressing the tile edit res - values - arrays and look for this array

<string-array name="tile_ids">

6.- For PIE: Add the following string to res-values-strings.xml

<string name="quick_settings_screen_recorder_label">Screen Record</string>

(For oreo, although it should exist, check it, just in case)

and add these 4 lines at the end of the array

<item>GrxScreenRecorder</item>
<item>888</item>
<item>8888</item>
<item>8888</item>
</string-array>

ok, ui done.

7.- From rar take screenrecorder apk and put it in priv-app/ScreenRecorder.apk)

Enabling the Tile

- For clean install roms the best way is to add the tile to SystemUI. In res-values-strings you will find

<string name="quick_settings_tiles_default">Wifi,SoundMode,Bluetooth,RotationLo ....

Then add to it

<string name="quick_settings_tiles_default">[B]GrxScreenRecord,[/B]Wifi,SoundMode,Bluetooth,RotationLo ....

- If you want to add it on an already installed rom you can do it easily by adding the tile name to your csc

<CscFeature_SystemUI_ConfigDefQuickSettingItem>Wifi,SilentMode,Bluetooth,RotationLock,Flashlight,AirplaneMode,PowerSaving,MobileData,Performance,BlueLightFilter,WifiHotsp

so, just add it to that line

<CscFeature_SystemUI_ConfigDefQuickSettingItem>[B]GrxScreenRecord,[/B] Wifi,SilentMode,Bluetooth,RotationLock,Flashlight,AirplaneMode,PowerSaving,MobileData,Performance,BlueLightFilter,WifiHotsp

you could also to try the first method (adding it to the ui string) and through any settings editor removing the key "sysui_qs_tiles" in settings secure and rebooting..

Modded Apk

This apk has got the Extra mods i add always to it and some more because in new samsung apk they removed some features:

- Switch to Stop/do not stop recording when screen is off or we are in lockscreen

- Set recording time limit

- Switch to show/hide recording time

- Frame Color (it also works now in devices with navigation bar)

- Customize floating button: circle color, button color and recording time text color

I have also added code to start/stop the recording when you press the tile, according to its current state. Of course long press on tile will drive you to settings.

In the rar you will also find the original apk, so you can easily find out how i added the mods comparing both apks with any tool (winmerge, clonespy, etc.)

You can also use original apk with the tile, but you will only be able to start the recording i guess..

Enjoy.

-
[Android General] Eleo:
Unfortunately the attached rar documents reveal "404 not found" error but screenshots show up. Could you upload rar documents elsewhere too?

Thanks for your contribution:good:
[Android General] Grouxho:
Weird, i can downloadi it..anyway, i have added a mega link.
[Android General] agabey_42:
very good. but, I can not modify the settings file. when I try to re-compile it gives an error. What is your suggestion?

(easy apk tool or BatchApkTool )
[Android General] Blackball:
A log would help ;)

Gesendet von meinem BKL-L04 mit Tapatalk
[Android General] starbucks2010:
Hi, I tried this method but I got stuck in bootloop. The problem is core-oj.jar modification (I checked by replacing modded files 1 by 1). Can you please have a look at the attached core-oj files (original and modded one) maybe there is a missing step or I don't do things correctly. I flashed them in TWRP by mounting the system partition, deleting the existing file and copying the modded one in /system/framework folder.

I use a G965F S9+ with TGP deodex ROM.

Is there any log I can collect/check during the bootloop?

Thank you in advance for your support.
[Android General] diphons:
#

my step..

Use Latest Tickle My Android and select apktool v.2.3.1

#

decompile SecSettings.apk

Go to res / values ​​/ styles.xml and delete the following line :

<item name="dropdownPreferenceStyle">@style/SettingsDropdownPreference</item> ## Delete line

#

mod you want and recompile

#

Afer recompile complete..

open SecSettings "ori" and SecSettings "recompile" with Winrar..

open "res" on both

copy all folder with "-v*" ori to recompile

#

for example

on ori "animator-ldrtl-v11" and recompile only "animator-ldrtl" without "-v*"

copy all folder with "-v*" to recompile

" * " value after -v

-v11

-v21

etc....

then on "res" recompile will be:

animator-ldrtl

animator-ldrtl-v11

etc..

#

close Winrar and copy to system

This Step work on framework-res, SecSettings and SystemUI

#Make Backup first before executions

#Semoga Berhasil :)
[Android General] Er. Aditya:
Did u get the latest smali/baksmali as said by the guide
[Android General] starbucks2010:
Yep, I installed the 2.2.5 version from here.

I forgot to mention that I replaced the classes.dex from the modded jar into the original jar and then I flashed it.

Thank you.
[Android General] BlackMesa123:
I said SmaliEx and even linked it in the post. Read the next time...
[Android General] starbucks2010:
I read it. I tried the SmaliEx too - still same result - bootloop.

I did more tests and it might me a problem of TickleMyAndroid. I just decompiled/recompiled core-oj.jar and flash it but the phone still didn't boot.

Can you advise me please what tool I can use to decompile/recompile that .jar?

Thank you.
[Android General] diphons:
Try this step

Open core-oj.jar with Winrar

copy classes.dex to same folder with baksmali/smali

open command promp on contain folder baksmali/smali

(shift + Right click) select command promp

and type the code on cmd

Code baksmali/smali core-oj.jar

baksmali

java -jar baksmali-2.2.5.jar d classes.dex -a 26 -o classes

there will be classes folder

smali

java -Xmx512M -jar smali-2.2.5.jar a classes -a 26

out of smali is "out.dex"

rename out.dex to classes.dex, replace classes.dex ori with recompile using Winrar

this code work for me, with baksmali/smali v2.2.5

#Backup first before excecutions

#Semoga Berhasil :)
[Android General] starbucks2010:
You da man !!! It worked. Now I have to see if it works for what I want (SamsungInCallUI modded not displaying the interface while calling or being called)

Thank you very much.
[Android General] Josevega:
Which is the correct way to sign a system APK in Linux ? , I've done the signature disable mod and booted but when I install an APK with my personal signature it force closes
[Android General] Zulfi:
Are you going to make mode for fullscren caller ID in feature?

Thanks
[Android General] ragassagar:
[MENTION=4985020]Grouxho[/MENTION] Dev, any guide to add more than 3 or 4 fingers in Fingerprint scanner settings?
[Android General] Grouxho:
Actually i do not know, i have never tried it, sorry. I do not even know how many are the maximun. Have you had a look into the integers.xml in secsettings just in case there is one related to it?
[Android General] thereassaad:
BUT I DONT SEE THE BLUE HERE [emoji23][emoji23][emoji23] .

IT'S SOOOOO

NICE ..

[emoji52]??
[Android General] sielhadi:
Hi guys you're awesome developers but why you didn't create a flash mods for galaxy s9 like you did for s8 and s7 ?
[Android General] msubhani:
Thank you sir very nice feature.
[Android General] Eleo:
Flashable zips are old methods: they take up too much space in sdcard and are not "on-the-fly"

:angel:
[Android General] diphons:
There maybe some ui crassing (on boot fresh rom), when changing xml to png

you can use this to fix it
[Android General] Grouxho:
Yes. What i do is to decompile ui, i remove the xml and add the png. I compile. Then i open with winrar the ori and compled app. I remve from ori the xml. Then i drag from compiled the whole res folder and resources. Winrar without compression better. And no problem. Thanks i will add link to your zip when i am on pc tomorrow. Much easier

Enviado desde mi SM-G960F mediante Tapatalk
[Android General] diphons:
yes.. i update new icon for Night Light bro..
[Android General] henrylife:
<com.wubydax.romcontrol.v2.prefs.MySeekBarPreference
android:title="Native Blur Amount"
android:key="b_ga_panel_blur"
app:maxValue="35"
app:minValue="0"
android:defaultValue="10"/>

for Rom Control