-
Notifications
You must be signed in to change notification settings - Fork 21
/
genmonke
executable file
·148 lines (119 loc) · 5.86 KB
/
genmonke
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/bin/bash
[ -z "$1" ] && echo "usage: ./genmonke <targetdir>" && echo "e.g.: ./genmonke disass" && exit 1
[ -z "$BASE" ] && BASE="base"
if ! cd $1; then
exit 1
fi
Files=$(git diff $BASE --name-only)
# patches dir
rm -rf ../patches
mkdir ../patches
#
# gen patch files
#
for File in $Files
do
Path=../patches/$(echo $File | sed 's/\//./g;s/smali_classes[0-9]\.//; s/smali\.//').patch
echo $File
git diff --minimal $BASE $File | sed '/^index /d' > $Path
done
#
# Organize
#
cd ../patches
# Watch Parties
mkdir watchparties
mv com.amazon.identity.* watchparties/.
mv tv.twitch.android.feature.theatre.watchparty.* watchparties/.
mv tv.twitch.android.shared.amazon.login.* watchparties/.
# Anon Chat
mkdir anonchat
mv tv.twitch.android.shared.chat.ChatViewPresenter.smali.patch anonchat/.
mv 'tv.twitch.android.shared.messageinput.impl.ChatMessageInputViewDelegate$State.smali.patch' anonchat/.
mv tv.twitch.android.shared.chat.observables.ChatConnectionController.smali.patch anonchat/.
# Stream Settings
mkdir stream-settings
mv res.layout.stream_settings_fragment.xml.patch stream-settings/.
mv tv.twitch.android.feature.theatre.common.StreamSettingsViewDelegate.smali.patch stream-settings/.
mv res.layout-v22.stream_settings_fragment.xml.patch stream-settings/.
# Glide Modules
mkdir glide
mv com.bumptech.glide* glide/.
mv tv.twitch.android.shared.ui.elements.span.UrlDrawable.smali.patch glide/.
mv 'tv.twitch.android.shared.ui.elements.GlideHelper$generateGlideRequestListener$1.smali.patch' glide/.
mv tv.twitch.android.shared.ui.elements.GlideHelper.smali.patch glide/.
# Sleep Timer
mkdir sleeptimer
mv res.layout.bottom_player_control_overlay_widget.xml.patch sleeptimer/.
mv res.layout-v22.bottom_player_overlay_controls.xml.patch sleeptimer/.
mv res.layout.bottom_player_overlay_controls.xml.patch sleeptimer/.
mv tv.twitch.android.shared.player.overlay.RxBottomPlayerControlOverlayViewDelegate.smali.patch sleeptimer/.
mv tv.twitch.android.shared.player.overlay.databinding.BottomPlayerOverlayControlsBinding.smali.patch sleeptimer/.
mv tv.twitch.android.shared.player.overlay.BottomPlayerControlOverlayViewDelegate.smali.patch sleeptimer/.
# Emotes
mkdir emotes
mv tv.twitch.android.shared.emotes.network.EmoteApiImpl.smali.patch emotes/.
mv tv.twitch.android.shared.chat.chomments.ChommentMessageFactory.smali.patch emotes/.
mv tv.twitch.android.shared.chat.chomments.ChommentModelDelegate.smali.patch emotes/.
mv tv.twitch.android.util.EmoteUrlUtil.smali.patch emotes/.
mv tv.twitch.android.shared.ui.elements.span.GlideChatImageTarget.smali.patch emotes/.
mv tv.twitch.android.shared.ui.elements.span.GlideChatImageCustomTarget.smali.patch emotes/.
mv tv.twitch.android.shared.emotes.utils.AnimatedEmotesUrlUtil.smali.patch emotes/.
mv tv.twitch.android.sdk.ChatController.smali.patch emotes/.
mv tv.twitch.android.shared.chomments.impl.ChommentsFetcherImpl.smali.patch emotes/.
mv tv.twitch.android.shared.chat.ChatMessageDelegate.smali.patch emotes/.
mv tv.twitch.android.shared.chat.messagefactory.* emotes/.
# Emote Card
mkdir emotecard
mv tv.twitch.android.models.emotes.EmoteCardModel.smali.patch emotecard/.
mv tv.twitch.android.models.emotes.EmoteCardModel\$GenericEmoteCardModel.smali.patch emotecard/.
mv tv.twitch.android.models.emotes.EmoteCardType\$GenericEmoteCardType\$Global.smali.patch emotecard/.
mv tv.twitch.android.shared.chat.emotecard.EmoteCardPresenter.smali.patch emotecard/.
# Emote Picker and Autocomplete
mkdir picker
mv 'tv.twitch.android.shared.messageinput.impl.autocomplete.EmoteAutoCompleteMapProvider$1.smali.patch' picker/.
mv tv.twitch.android.shared.emotes.emotepicker.EmotePickerPresenter.smali.patch picker/.
# Settings
mkdir settings
mv 'tv.twitch.android.shared.ui.menus.SettingsPreferencesController$SettingsPreference.smali.patch' settings/.
mv tv.twitch.android.models.settings.SettingsDestination.smali.patch settings/.
mv tv.twitch.android.settings.* settings/.
mv tv.twitch.android.app.consumer.DaggerTwitchApplication_HiltComponents_SingletonC\$ActivityCImpl.smali.patch settings/.
# Settings bottom
mkdir settings-bottom
mv res.layout-v22.chat_settings_bottom_sheet.xml.patch settings-bottom/.
mv res.layout.chat_settings_bottom_sheet.xml.patch settings-bottom/.
mv tv.twitch.android.shared.chat.settings.entry.ChatSettingsViewDelegate.smali.patch settings-bottom/.
# Split Chat
mkdir splitchat
mv tv.twitch.android.core.adapters.AbstractTwitchRecyclerViewAdapter.smali.patch splitchat/.
mv tv.twitch.android.shared.chat.adapter.ChannelChatAdapter.smali.patch splitchat/.
# Updater
mkdir updater
mv tv.twitch.android.feature.viewer.main.MainActivity.smali.patch updater/.
mv 'tv.twitch.android.feature.viewer.main.navigation.PersistentBannerPresenter$PersistentBanners.smali.patch' updater/.
# Bits fix
mkdir bits
mv tv.twitch.android.shared.bits.* bits/.
# Subs fix
mkdir subs
mv tv.twitch.android.shared.chat.chatuserdialog.ChatUserDialogPresenter.smali.patch subs/.
mv tv.twitch.android.feature.theatre.common.PlayerCoordinatorPresenter.smali.patch subs/.
mv tv.twitch.android.feature.theatre.metadata.ExtendedPlayerMetadataViewDelegate.smali.patch subs/.
mv tv.twitch.android.models.social.ChatUser.smali.patch subs/.
mv tv.twitch.android.shared.billing.RxBillingClient.smali.patch subs/.
mv tv.twitch.android.shared.subscriptions.SubscriptionPresenterFactory.smali.patch subs/.
mv tv.twitch.android.shared.subscriptions.SubscriptionFlowProvider.smali.patch subs/.
# Auto-redeem
mkdir autoredeem
mv tv.twitch.android.shared.community.points.viewdelegate.CommunityPointsButtonViewDelegate.smali.patch autoredeem/.
# Deleted Messages
mkdir deletedmsgs
mv 'tv.twitch.android.shared.chat.util.ChatUtil$Companion.smali.patch' deletedmsgs/.
# Other UI patches
mkdir ui
mv res.mipmap-anydpi-v26.ic_launcher.xml.patch ui/.
mv res.layout.settings_logout_footer.xml.patch ui/.
# DevTools
mkdir devtools
mv tv.twitch.android.feature.viewer.main.navigation.ToolbarPresenter.smali.patch devtools/.