Slide 1

Slide 1 text

σβΠϯͷ࣮૷Λ ղମ͢Δٕज़ AndroidΤϯδχΞ σβΠϯ෦ #1

Slide 2

Slide 2 text

(σβΠϯΛޠΔલʹ...) 
 ΤϯδχΞͳΒ࣮૷Ͱ͖ͳ͍ͱͶʂ

Slide 3

Slide 3 text

σβΠϯͷ࣮૷Λղମ͢Δͱ͸ʁ ৭ΜͳΞϓϦͷσβΠϯɾϨΠΞ΢τ͕
 ͲͷΑ͏ʹ૊·Ε͍ͯΔͷ͔Λௐ΂Δ

Slide 4

Slide 4 text

ղମ͢ΔͨΊʹ • ೔ࠒ͔Β৭ΜͳΞϓϦʹ৮ΕΔ • ৭ΜͳδϟϯϧͷΞϓϦʹ৮ΕΔ • ղମಓ۩Λͯͳ͚ͣΔ

Slide 5

Slide 5 text

࿩͢಺༰͸
 ࣗ਎͕࡞͍ͬͯͳ͍ΞϓϦʹ
 ରͯ͠ͷΞϓϩʔν

Slide 6

Slide 6 text

σβΠϯͷߏ଄Λղମ͢Δ • Show layout bounds • ϨΠΞ΢τͷڥքΛදࣔ͢Δ • ϨΠΞ΢τͷߏ଄͕ͳΜͱͳ͘Θ͔Δ

Slide 7

Slide 7 text

Show layout bounds

Slide 8

Slide 8 text

Show layout bounds • adb͔Β༗ޮʹ͢Δ adb shell setprop debug.layout true

Slide 9

Slide 9 text

Show layout bounds • ϨΠΞ΢τͷߏ଄͕ͳΜͱͳ͘Θ͔ΔͷͰศར • Ͱ΋ӅΕͯΔView΍ࡉ͔͍ߏ଄͕Θ͔Βͳ͍ • Android Device MonitorͷLayout Inspectorͷศརʂ

Slide 10

Slide 10 text

σβΠϯͷߏ଄Λղମ͢Δ • ը໘ͷີ౓Λมߋ͢Δ • จࣈͷαΠζΛมߋ͢Δ • ͋͑ͯϨΠΞ΢τ่͕Εͦ͏ͳ͜ͱΛ΍ͬͯΈΔ • ૝ఆ֎ͷը໘΍จࣈαΠζʹͲ͏ରԠ͍ͯ͠Δ͔ݟΔ

Slide 11

Slide 11 text

ը໘ͷີ౓ɾจࣈͷαΠζΛ
 มߋ͢Δ Accessibility → Font size → Largest Accessibility → Display size → Largest or Display → Font size → Largest Display → Display size → Largest

Slide 12

Slide 12 text

ը໘ͷີ౓ɾจࣈͷαΠζΛ
 มߋ͢Δ

Slide 13

Slide 13 text

ը໘ͷີ౓Λมߋ͢Δ • adb shell͔Β΋มߋͰ͖ΔΑʂ • ઃఆ஋ͷ্ݶ͕ͳ͍ͷͰɺ΍͹͍ੈք͕ݟΕΔ • Լݶ஋͸͋Δʂ → 72

Slide 14

Slide 14 text

ը໘ͷີ౓Λมߋ͢Δ // ີ౓Λมߋ͢Δ adb shell wm density 800 // ݩʹ໭͢ adb shell wm density reset

Slide 15

Slide 15 text

จࣈͷαΠζΛมߋ͢Δ • adb shell͔Β΋มߋͰ͖ΔΑʂ • ઃఆ஋ͷ্ݶ͕ͳ͍ͷͰɺ΍͹͍ੈք͕ݟΕΔ adb shell settings put system font_scale 1.3

Slide 16

Slide 16 text

ը໘ͷີ౓ɾจࣈͷαΠζΛ
 มߋ͢Δ ݶք͸ͳ͍

Slide 17

Slide 17 text

ը໘ͷີ౓ɾจࣈͷαΠζΛ
 มߋ͢Δ ͨͩ͠ յΕͦ͏

Slide 18

Slide 18 text

σβΠϯͷߏ଄Λղମ͢Δ • View HierarchyΛdump͢Δ • adb shell dumpsys activity top • dump͍ͨ͠ը໘Λ։͍࣮ͯߦ

Slide 19

Slide 19 text

dumpsys activity top

Slide 20

Slide 20 text

dumpsys activity top • View.GONEͱ͔ͰݟΕͳ͍View΋Θ͔Δ • ಈతʹView͕มΘͬͨΓ͠ͳ͚Ε͹ؙݟ͑ • Viewͷid͕Θ͔ΔͷͰΰχϣΰχϣͰ͖Δ • Ͱ΋ࡉ͔͍ଐੑͷઃఆ͕Θ͔Βͳ͍

Slide 21

Slide 21 text

σβΠϯͷߏ଄Λղମ͢Δ • apkΛղମ͢Δ • ࠷ऴखஈ? • ࠷ऴฌث?

Slide 22

Slide 22 text

apkΛղମ͢Δπʔϧ • apktool ⚡ • dex2jar • aapt

Slide 23

Slide 23 text

୺຤͔ΒapkΛͬ͘͞ͱҾͬ͜ൈ͘ • ૉ੖Β͍͠هࣄ͋Γ·͢ʂ • dumpsys activity activitiesͱpecoͰ
 ΰχϣΰχϣͯ͠୺຤͔ΒapkΛ؆୯ʹҾͬ͜ൈ͘ • https://qiita.com/operandoOS/items/ 6fa77037560e52d11352

Slide 24

Slide 24 text

apkΛղମ͢Δπʔϧ ղମํ๏͸… Ͷʁ

Slide 25

Slide 25 text

ղମ͢ΔͱखʹೖΔ΋ͷ • ϦιʔεҰࣜ • ϨΠΞ΢τϑΝΠϧ΋ؚΉ • jar • ೉ಡԽ͞Εͯͳ͍ͱؙݟ͑ • ೉ಡԽා͘ͳ͍͍ͩ͡ΐ͏Ϳ

Slide 26

Slide 26 text

໨తͷϨΠΞ΢τϑΝΠϧΛௐ΂Δ ͦͷ1 • લʹ঺հͨ͠dumpsys activity topͰ
 ϦιʔεIDͷ໊લ͸Θ͔Δ • ͋ͱ͸ID͕࢖༻͞Ε͍ͯΔϨΠΞ΢τΛௐ΂Δ͚ͩ • grepͰ΋͍͍͠ɺΤσΟλʔͷݕࡧͰ΋͍͍

Slide 27

Slide 27 text

໨తͷϨΠΞ΢τϑΝΠϧΛௐ΂Δ 
 ͦͷ2 • ϦιʔεID͔Βௐ΂Δ • jarΛΰχϣΰχϣͯ͠ݟΔͱϦιʔεID͕Θ͔Δ • ίʔυ্ͷϦιʔεIDΛ16ਐ਺ʹม׵͢Δ • ݩ͸10ਐ਺ɻํ๏͸ԿͰ΋͍͍ͷͰม׵͢Δ • 16ਐ਺Խͨ͠IDͰݕࡧ͢Δ • res/values/public.xmlΛݕࡧ͢Δͱݟ͔ͭΔ

Slide 28

Slide 28 text

໨తͷϨΠΞ΢τϑΝΠϧΛௐ΂Δ 
 ͦͷ3 • ͦͷ2ͱ్த·Ͱಉ͡ • aaptΛ࢖ͬͯௐ΂Δ aapt d resources base.apk | grep 7f0a0020

Slide 29

Slide 29 text

໨తͷϨΠΞ΢τϑΝΠϧΛௐ΂Δ 
 ͦͷ3 • ͜Μͳײ͡ͰҾ͔͔ͬΔ

Slide 30

Slide 30 text

apkΛղମ͢Δ • ϨΠΞ΢τϑΝΠϧ͕ݟΕΔͷͰͺͳ͍ • ೉ಡԽ͞Εͯͳ͚Ε͹Custom View΋Θ͔Δ

Slide 31

Slide 31 text

σβΠϯͷߏ଄Λղମ͢Δ • ݟͨ͜ͱͳ͍σβΠϯͷ࣮૷Λґཔ͞ΕͨΒ
 ʮ͜ͷσβΠϯɺͲͷΞϓϦͱ͔Ͱ͋Γ·ͨ͠ʁʯ
 Λฉ͘ • mazikore daizi • ͔ͦ͜Βࠓ·Ͱ঺հͨ͠ղମज़Λ࢖͏

Slide 32

Slide 32 text

·ͱΊ • ղମͯ͠σβΠϯͷ࣮૷ͷࢀߟʹ͢Δ • ؾʹͳͬͨσβΠϯΛղମͯ͠ΈͯͶʂ • ղମ͜Θ͘ͳ͍ʂ

Slide 33

Slide 33 text

Thanks!!