Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
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!!