forked from mer-hybris/hybris-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixup-mountpoints
executable file
·1211 lines (1160 loc) · 66.4 KB
/
fixup-mountpoints
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/sh
# Fix up mount points device node names.
#
# /data needs to be mounted in initrd, but there is no udev that early,
# which means there is no /dev/block/platform/*/by-name/* (or bootdevice).
# This file is a map from the "by-name" path to /dev/mmcblkMpN.
# It also serves dhd to convert fstab and *.rc mount entries to systemd units,
# because at that boot stage there is still no udev "by-name" paths, even when
# systemd starts to execut the "*.mount" units.
DEVICE=$1
shift
echo "Fixing mount-points for device $DEVICE"
case "$DEVICE" in
"kirin"|"mermaid")
sed -i \
-e 's block/bootdevice/by-name/LTALabel mmcblk0p7 ' \
-e 's block/bootdevice/by-name/TA mmcblk0p1 ' \
-e 's block/bootdevice/by-name/abl_a mmcblk0p20 ' \
-e 's block/bootdevice/by-name/abl_b mmcblk0p21 ' \
-e 's block/bootdevice/by-name/apdp mmcblk0p48 ' \
-e 's block/bootdevice/by-name/appslog mmcblk0p63 ' \
-e 's block/bootdevice/by-name/bluetooth_a mmcblk0p40 ' \
-e 's block/bootdevice/by-name/bluetooth_b mmcblk0p41 ' \
-e 's block/bootdevice/by-name/boot_a mmcblk0p38 ' \
-e 's block/bootdevice/by-name/boot_b mmcblk0p39 ' \
-e 's block/bootdevice/by-name/cdt mmcblk0p24 ' \
-e 's block/bootdevice/by-name/cmnlib64_a mmcblk0p27 ' \
-e 's block/bootdevice/by-name/cmnlib64_b mmcblk0p28 ' \
-e 's block/bootdevice/by-name/cmnlib_a mmcblk0p25 ' \
-e 's block/bootdevice/by-name/cmnlib_b mmcblk0p26 ' \
-e 's block/bootdevice/by-name/ddr mmcblk0p55 ' \
-e 's block/bootdevice/by-name/devcfg_a mmcblk0p29 ' \
-e 's block/bootdevice/by-name/devcfg_b mmcblk0p30 ' \
-e 's block/bootdevice/by-name/devinfo mmcblk0p47 ' \
-e 's block/bootdevice/by-name/diag mmcblk0p64 ' \
-e 's block/bootdevice/by-name/dip mmcblk0p46 ' \
-e 's block/bootdevice/by-name/dpo mmcblk0p50 ' \
-e 's block/bootdevice/by-name/dsp_a mmcblk0p44 ' \
-e 's block/bootdevice/by-name/dsp_b mmcblk0p45 ' \
-e 's block/bootdevice/by-name/frp mmcblk0p58 ' \
-e 's block/bootdevice/by-name/fsc mmcblk0p3 ' \
-e 's block/bootdevice/by-name/fsg mmcblk0p6 ' \
-e 's block/bootdevice/by-name/fsmetadata mmcblk0p62 ' \
-e 's block/bootdevice/by-name/hyp_a mmcblk0p16 ' \
-e 's block/bootdevice/by-name/hyp_b mmcblk0p17 ' \
-e 's block/bootdevice/by-name/keymaster_a mmcblk0p22 ' \
-e 's block/bootdevice/by-name/keymaster_b mmcblk0p23 ' \
-e 's block/bootdevice/by-name/keystore mmcblk0p61 ' \
-e 's block/bootdevice/by-name/limits mmcblk0p52 ' \
-e 's block/bootdevice/by-name/logfs mmcblk0p54 ' \
-e 's block/bootdevice/by-name/misc mmcblk0p60 ' \
-e 's block/bootdevice/by-name/modem_a mmcblk0p42 ' \
-e 's block/bootdevice/by-name/modem_b mmcblk0p43 ' \
-e 's block/bootdevice/by-name/modemst1 mmcblk0p4 ' \
-e 's block/bootdevice/by-name/modemst2 mmcblk0p5 ' \
-e 's block/bootdevice/by-name/msadp mmcblk0p49 ' \
-e 's block/bootdevice/by-name/oem_a mmcblk0p67 ' \
-e 's block/bootdevice/by-name/oem mmcblk0p67 ' \
-e 's block/bootdevice/by-name/oem_b mmcblk0p68 ' \
-e 's block/bootdevice/by-name/persist mmcblk0p2 ' \
-e 's block/bootdevice/by-name/pmic_a mmcblk0p18 ' \
-e 's block/bootdevice/by-name/pmic_b mmcblk0p19 ' \
-e 's block/bootdevice/by-name/rddata mmcblk0p74 ' \
-e 's block/bootdevice/by-name/rdimage_a mmcblk0p65 ' \
-e 's block/bootdevice/by-name/rdimage_b mmcblk0p66 ' \
-e 's block/bootdevice/by-name/rpm_a mmcblk0p14 ' \
-e 's block/bootdevice/by-name/rpm_b mmcblk0p15 ' \
-e 's block/bootdevice/by-name/sec mmcblk0p56 ' \
-e 's block/bootdevice/by-name/splash mmcblk0p51 ' \
-e 's block/bootdevice/by-name/ssd mmcblk0p57 ' \
-e 's block/bootdevice/by-name/sti mmcblk0p59 ' \
-e 's block/bootdevice/by-name/storsec mmcblk0p31 ' \
-e 's block/bootdevice/by-name/system_a mmcblk0p71 ' \
-e 's block/bootdevice/by-name/system mmcblk0p71 ' \
-e 's block/bootdevice/by-name/system_b mmcblk0p72 ' \
-e 's block/bootdevice/by-name/toolsfv mmcblk0p53 ' \
-e 's block/bootdevice/by-name/tz_a mmcblk0p12 ' \
-e 's block/bootdevice/by-name/tz_b mmcblk0p13 ' \
-e 's block/bootdevice/by-name/tzxfl_a mmcblk0p36 ' \
-e 's block/bootdevice/by-name/tzxfl_b mmcblk0p37 ' \
-e 's block/bootdevice/by-name/tzxflattest_a mmcblk0p34 ' \
-e 's block/bootdevice/by-name/tzxflattest_b mmcblk0p35 ' \
-e 's block/bootdevice/by-name/userdata mmcblk0p73 ' \
-e 's block/bootdevice/by-name/vendor_a mmcblk0p69 ' \
-e 's block/bootdevice/by-name/vendor mmcblk0p69 ' \
-e 's block/bootdevice/by-name/vendor_b mmcblk0p70 ' \
-e 's block/bootdevice/by-name/xbl_a mmcblk0p10 ' \
-e 's block/bootdevice/by-name/xbl_b mmcblk0p11 ' \
-e 's block/bootdevice/by-name/xfl_a mmcblk0p32 ' \
-e 's block/bootdevice/by-name/xfl_b mmcblk0p33 ' \
-e 's block/bootdevice/by-name/xflkeystore mmcblk0p8 ' \
-e 's block/bootdevice/by-name/xflkeystorebak mmcblk0p9 ' \
"$@"
;;
"pioneer"|"discovery"|"voyager")
sed -i \
-e 's block/bootdevice/by-name/LTALabel mmcblk0p7 ' \
-e 's block/bootdevice/by-name/Qnovo mmcblk0p75 ' \
-e 's block/bootdevice/by-name/TA mmcblk0p1 ' \
-e 's block/bootdevice/by-name/abl mmcblk0p20 ' \
-e 's block/bootdevice/by-name/apdp mmcblk0p52 ' \
-e 's block/bootdevice/by-name/appslog mmcblk0p73 ' \
-e 's block/bootdevice/by-name/bluetooth_a mmcblk0p40 ' \
-e 's block/bootdevice/by-name/boot mmcblk0p38 ' \
-e 's block/bootdevice/by-name/cdt mmcblk0p24 ' \
-e 's block/bootdevice/by-name/cmnlib64 mmcblk0p27 ' \
-e 's block/bootdevice/by-name/cmnlib mmcblk0p25 ' \
-e 's block/bootdevice/by-name/ddr mmcblk0p59 ' \
-e 's block/bootdevice/by-name/devcfg mmcblk0p29 ' \
-e 's block/bootdevice/by-name/devinfo mmcblk0p51 ' \
-e 's block/bootdevice/by-name/diag mmcblk0p74 ' \
-e 's block/bootdevice/by-name/dip mmcblk0p50 ' \
-e 's block/bootdevice/by-name/dpo mmcblk0p54 ' \
-e 's block/bootdevice/by-name/dsp_a mmcblk0p44 ' \
-e 's block/bootdevice/by-name/frp mmcblk0p62 ' \
-e 's block/bootdevice/by-name/fsc mmcblk0p3 ' \
-e 's block/bootdevice/by-name/fsg mmcblk0p6 ' \
-e 's block/bootdevice/by-name/fsmetadata mmcblk0p72 ' \
-e 's block/bootdevice/by-name/hyp mmcblk0p16 ' \
-e 's block/bootdevice/by-name/keymaster mmcblk0p22 ' \
-e 's block/bootdevice/by-name/keystore mmcblk0p67 ' \
-e 's block/bootdevice/by-name/limits mmcblk0p56 ' \
-e 's block/bootdevice/by-name/logfs mmcblk0p58 ' \
-e 's block/bootdevice/by-name/mdtp mmcblk0p48 ' \
-e 's block/bootdevice/by-name/mdtpsecapp mmcblk0p46 ' \
-e 's block/bootdevice/by-name/misc mmcblk0p64 ' \
-e 's block/bootdevice/by-name/modem_a mmcblk0p42 ' \
-e 's block/bootdevice/by-name/modemst1 mmcblk0p4 ' \
-e 's block/bootdevice/by-name/modemst2 mmcblk0p5 ' \
-e 's block/bootdevice/by-name/msadp mmcblk0p53 ' \
-e 's block/bootdevice/by-name/oem_a mmcblk0p68 ' \
-e 's block/bootdevice/by-name/persist mmcblk0p2 ' \
-e 's block/bootdevice/by-name/pmic mmcblk0p18 ' \
-e 's block/bootdevice/by-name/rddata mmcblk0p77 ' \
-e 's block/bootdevice/by-name/rdimage mmcblk0p65 ' \
-e 's block/bootdevice/by-name/rpm mmcblk0p14 ' \
-e 's block/bootdevice/by-name/sec mmcblk0p60 ' \
-e 's block/bootdevice/by-name/splash mmcblk0p55 ' \
-e 's block/bootdevice/by-name/ssd mmcblk0p61 ' \
-e 's block/bootdevice/by-name/sti mmcblk0p63 ' \
-e 's block/bootdevice/by-name/storsec mmcblk0p31 ' \
-e 's block/bootdevice/by-name/system mmcblk0p78 ' \
-e 's block/bootdevice/by-name/toolsfv mmcblk0p57 ' \
-e 's block/bootdevice/by-name/tz mmcblk0p12 ' \
-e 's block/bootdevice/by-name/tzxfl mmcblk0p36 ' \
-e 's block/bootdevice/by-name/tzxflattest mmcblk0p34 ' \
-e 's block/bootdevice/by-name/userdata mmcblk0p76 ' \
-e 's block/bootdevice/by-name/vendor mmcblk0p70 ' \
-e 's block/bootdevice/by-name/xbl mmcblk0p10 ' \
-e 's block/bootdevice/by-name/xfl mmcblk0p32 ' \
-e 's block/bootdevice/by-name/xflkeystore mmcblk0p8 ' \
-e 's block/bootdevice/by-name/xflkeystorebak mmcblk0p9 ' \
"$@"
;;
"ghost")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p23 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p38 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p40 ' \
-e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p25 ' \
-e 's block/platform/msm_sdcc.1/by-name/pds mmcblk0p28 ' \
"$@"
;;
"lux")
sed -i \
-e 's block/bootdevice/by-name/boot mmcblk0p31 ' \
-e 's block/bootdevice/by-name/system mmcblk0p41 ' \
-e 's block/bootdevice/by-name/cache mmcblk0p40 ' \
-e 's block/bootdevice/by-name/userdata mmcblk0p42 ' \
-e 's block/bootdevice/by-name/modem mmcblk0p1 ' \
-e 's block/bootdevice/by-name/persist mmcblk0p29 ' \
-e 's block/bootdevice/by-name/fsg mmcblk0p23 ' \
-e 's block/bootdevice/by-name/recovery mmcblk0p32 ' \
"$@"
;;
"victara")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p22 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p31 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p39 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p38 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p37 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p34 ' \
-e 's block/platform/msm_sdcc.1/by-name/pds mmcblk0p27 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p33 ' \
"$@"
;;
"pico")
sed -i \
-e 's null null ' \
-e 's block/mmcblk0p3 mmcblk0p3 ' \
-e 's block/mtdblock4 mtdblock4 ' \
-e 's block/mmcblk0p2 mmcblk0p2 ' \
"$@"
;;
"alice")
sed -i \
-e 's block/mmcblk0p38 mmcblk0p38 ' \
-e 's block/platform/hi_mci.0/by-name/userdata mmcblk0p40 ' \
-e 's block/mmcblk0p34 mmcblk0p34 ' \
-e 's block/platform/hi_mci.0/by-name/misc mmcblk0p19 ' \
-e 's block/platform/hi_mci.0/by-name/boot mmcblk0p27 ' \
-e 's block/platform/hi_mci.0/by-name/recovery mmcblk0p28 ' \
"$@"
;;
"kinzie")
sed -i \
-e 's block/bootdevice/by-name/fsg mmcblk0p24 ' \
-e 's block/bootdevice/by-name/modem mmcblk0p1 ' \
-e 's block/bootdevice/by-name/persist mmcblk0p34 ' \
-e 's block/bootdevice/by-name/userdata mmcblk0p48 ' \
-e 's block/bootdevice/by-name/system mmcblk0p47 ' \
-e 's block/bootdevice/by-name/cache mmcblk0p46 ' \
-e 's block/bootdevice/by-name/recovery mmcblk0p37 ' \
-e 's block/bootdevice/by-name/boot mmcblk0p36 ' \
-e 's block/bootdevice/by-name/bluetooth mmcblk0p18 ' \
"$@"
;;
"titan")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p29 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p38 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p36 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p35 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p32 ' \
-e 's block/platform/msm_sdcc.1/by-name/pds mmcblk0p26 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p31 ' \
"$@"
;;
"thea")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p22 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p30 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p42 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p40 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p41 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p33 ' \
-e 's block/platform/msm_sdcc.1/by-name/pds mmcblk0p27 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p32 ' \
"$@"
;;
"suzu")
sed -i \
-e 's block/bootdevice/by-name/DDR mmcblk0p16 ' \
-e 's block/bootdevice/by-name/FOTAKernel mmcblk0p42 ' \
-e 's block/bootdevice/by-name/LTALabel mmcblk0p2 ' \
-e 's block/bootdevice/by-name/Qnovo mmcblk0p46 ' \
-e 's block/bootdevice/by-name/TA mmcblk0p1 ' \
-e 's block/bootdevice/by-name/aboot mmcblk0p20 ' \
-e 's block/bootdevice/by-name/abootbak mmcblk0p21 ' \
-e 's block/bootdevice/by-name/apdp mmcblk0p37 ' \
-e 's block/bootdevice/by-name/apps_log mmcblk0p44 ' \
-e 's block/bootdevice/by-name/boot mmcblk0p22 ' \
-e 's block/bootdevice/by-name/cache mmcblk0p24 ' \
-e 's block/bootdevice/by-name/cmnlib mmcblk0p33 ' \
-e 's block/bootdevice/by-name/cmnlibbak mmcblk0p35 ' \
-e 's block/bootdevice/by-name/config mmcblk0p27 ' \
-e 's block/bootdevice/by-name/devcfg mmcblk0p31 ' \
-e 's block/bootdevice/by-name/devinfo mmcblk0p23 ' \
-e 's block/bootdevice/by-name/diag mmcblk0p45 ' \
-e 's block/bootdevice/by-name/dpo mmcblk0p39 ' \
-e 's block/bootdevice/by-name/dsp mmcblk0p13 ' \
-e 's block/bootdevice/by-name/fsg mmcblk0p17 ' \
-e 's block/bootdevice/by-name/hyp mmcblk0p11 ' \
-e 's block/bootdevice/by-name/hypbak mmcblk0p12 ' \
-e 's block/bootdevice/by-name/keymaster mmcblk0p34 ' \
-e 's block/bootdevice/by-name/keymasterbak mmcblk0p36 ' \
-e 's block/bootdevice/by-name/keystore mmcblk0p26 ' \
-e 's block/bootdevice/by-name/limits mmcblk0p29 ' \
-e 's block/bootdevice/by-name/mcfg mmcblk0p32 ' \
-e 's block/bootdevice/by-name/modem mmcblk0p3 ' \
-e 's block/bootdevice/by-name/modemst1 mmcblk0p14 ' \
-e 's block/bootdevice/by-name/modemst2 mmcblk0p15 ' \
-e 's block/bootdevice/by-name/mota mmcblk0p30 ' \
-e 's block/bootdevice/by-name/msadp mmcblk0p38 ' \
-e 's block/bootdevice/by-name/oem mmcblk0p28 ' \
-e 's block/bootdevice/by-name/persist mmcblk0p25 ' \
-e 's block/bootdevice/by-name/rdimage mmcblk0p43 ' \
-e 's block/bootdevice/by-name/rpm mmcblk0p7 ' \
-e 's block/bootdevice/by-name/rpmbak mmcblk0p8 ' \
-e 's block/bootdevice/by-name/s1sbl mmcblk0p40 ' \
-e 's block/bootdevice/by-name/s1sblbak mmcblk0p41 ' \
-e 's block/bootdevice/by-name/sbl1 mmcblk0p5 ' \
-e 's block/bootdevice/by-name/sbl1bak mmcblk0p6 ' \
-e 's block/bootdevice/by-name/sec mmcblk0p18 ' \
-e 's block/bootdevice/by-name/splash mmcblk0p19 ' \
-e 's block/bootdevice/by-name/ssd mmcblk0p4 ' \
-e 's block/bootdevice/by-name/system mmcblk0p52 ' \
-e 's block/bootdevice/by-name/tz mmcblk0p9 ' \
-e 's block/bootdevice/by-name/tzbak mmcblk0p10 ' \
-e 's block/bootdevice/by-name/tzs1attest mmcblk0p47 ' \
-e 's block/bootdevice/by-name/tzs1attestbak mmcblk0p48 ' \
-e 's block/bootdevice/by-name/tzs1sbl mmcblk0p49 ' \
-e 's block/bootdevice/by-name/tzs1sblbak mmcblk0p50 ' \
-e 's block/bootdevice/by-name/userdata mmcblk0p51 ' \
"$@"
;;
"moto_msm8960_jbbl")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/aboot mmcblk0p5 ' \
-e 's block/platform/msm_sdcc.1/by-name/abootBackup mmcblk0p12 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p31 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p36 ' \
-e 's block/platform/msm_sdcc.1/by-name/carriercust mmcblk0p35 ' \
-e 's block/platform/msm_sdcc.1/by-name/cdrom mmcblk0p38 ' \
-e 's block/platform/msm_sdcc.1/by-name/cid mmcblk0p28 ' \
-e 's block/platform/msm_sdcc.1/by-name/devtree mmcblk0p30 ' \
-e 's block/platform/msm_sdcc.1/by-name/dhob mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p24 ' \
-e 's block/platform/msm_sdcc.1/by-name/hob mmcblk0p20 ' \
-e 's block/platform/msm_sdcc.1/by-name/kpan mmcblk0p33 ' \
-e 's block/platform/msm_sdcc.1/by-name/logo mmcblk0p29 ' \
-e 's block/platform/msm_sdcc.1/by-name/mbl mmcblk0p19 ' \
-e 's block/platform/msm_sdcc.1/by-name/misc mmcblk0p26 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst1 mmcblk0p17 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst2 mmcblk0p18 ' \
-e 's block/platform/msm_sdcc.1/by-name/padA mmcblk0p9 ' \
-e 's block/platform/msm_sdcc.1/by-name/padB mmcblk0p16 ' \
-e 's block/platform/msm_sdcc.1/by-name/pds mmcblk0p27 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p22 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p32 ' \
-e 's block/platform/msm_sdcc.1/by-name/rpm mmcblk0p6 ' \
-e 's block/platform/msm_sdcc.1/by-name/rpmBackup mmcblk0p13 ' \
-e 's block/platform/msm_sdcc.1/by-name/sbl1 mmcblk0p2 ' \
-e 's block/platform/msm_sdcc.1/by-name/sbl2 mmcblk0p3 ' \
-e 's block/platform/msm_sdcc.1/by-name/sbl2Backup mmcblk0p10 ' \
-e 's block/platform/msm_sdcc.1/by-name/sbl3 mmcblk0p4 ' \
-e 's block/platform/msm_sdcc.1/by-name/sbl3Backup mmcblk0p11 ' \
-e 's block/platform/msm_sdcc.1/by-name/sp mmcblk0p25 ' \
-e 's block/platform/msm_sdcc.1/by-name/ssd mmcblk0p23 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p37 ' \
-e 's block/platform/msm_sdcc.1/by-name/tombstones mmcblk0p34 ' \
-e 's block/platform/msm_sdcc.1/by-name/tz mmcblk0p7 ' \
-e 's block/platform/msm_sdcc.1/by-name/tzBackup mmcblk0p14 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p39 ' \
-e 's block/platform/msm_sdcc.1/by-name/utags mmcblk0p8 ' \
-e 's block/platform/msm_sdcc.1/by-name/utagsBackup mmcblk0p15 ' \
"$@"
;;
"griffin")
sed -i \
-e 's block/bootdevice/by-name/aboot sdb12 ' \
-e 's block/bootdevice/by-name/abootbak sdb13 ' \
-e 's block/bootdevice/by-name/apdp sdc6 ' \
-e 's block/bootdevice/by-name/bluetooth sda11 ' \
-e 's block/bootdevice/by-name/boot sda17 ' \
-e 's block/bootdevice/by-name/cache sda19 ' \
-e 's block/bootdevice/by-name/carrier sda9 ' \
-e 's block/bootdevice/by-name/cid sda4 ' \
-e 's block/bootdevice/by-name/cmnlib sdb16 ' \
-e 's block/bootdevice/by-name/cmnlib64 sdb18 ' \
-e 's block/bootdevice/by-name/cmnlib64bak sdb19 ' \
-e 's block/bootdevice/by-name/cmnlibbak sdb17 ' \
-e 's block/bootdevice/by-name/customize sda8 ' \
-e 's block/bootdevice/by-name/ddr sdb23 ' \
-e 's block/bootdevice/by-name/devcfg sdb8 ' \
-e 's block/bootdevice/by-name/devcfgbak sdb9 ' \
-e 's block/bootdevice/by-name/dip sdc5 ' \
-e 's block/bootdevice/by-name/dpo sdc8 ' \
-e 's block/bootdevice/by-name/dsp sdc1 ' \
-e 's block/bootdevice/by-name/frp sda7 ' \
-e 's block/bootdevice/by-name/fsc sdd1 ' \
-e 's block/bootdevice/by-name/fsg sdc4 ' \
-e 's block/bootdevice/by-name/hw sdc3 ' \
-e 's block/bootdevice/by-name/hyp sdb10 ' \
-e 's block/bootdevice/by-name/hypbak sdb11 ' \
-e 's block/bootdevice/by-name/keymaster sdb14 ' \
-e 's block/bootdevice/by-name/keymasterbak sdb15 ' \
-e 's block/bootdevice/by-name/kpan sda10 ' \
-e 's block/bootdevice/by-name/logo sda18 ' \
-e 's block/bootdevice/by-name/logs sdb24 ' \
-e 's block/bootdevice/by-name/metadata sdd2 ' \
-e 's block/bootdevice/by-name/misc sda5 ' \
-e 's block/bootdevice/by-name/modem sda16 ' \
-e 's block/bootdevice/by-name/modemst1 sda12 ' \
-e 's block/bootdevice/by-name/modemst2 sda13 ' \
-e 's block/bootdevice/by-name/msadp sdc7 ' \
-e 's block/bootdevice/by-name/oem sdc9 ' \
-e 's block/bootdevice/by-name/persist sda3 ' \
-e 's block/bootdevice/by-name/pmic sdb2 ' \
-e 's block/bootdevice/by-name/pmicbak sdb3 ' \
-e 's block/bootdevice/by-name/prov sdb20 ' \
-e 's block/bootdevice/by-name/provbak sdb21 ' \
-e 's block/bootdevice/by-name/recovery sda14 ' \
-e 's block/bootdevice/by-name/rpm sdb4 ' \
-e 's block/bootdevice/by-name/rpmbak sdb5 ' \
-e 's block/bootdevice/by-name/sec sdb22 ' \
-e 's block/bootdevice/by-name/sp sdc2 ' \
-e 's block/bootdevice/by-name/ssd sda6 ' \
-e 's block/bootdevice/by-name/system sda15 ' \
-e 's block/bootdevice/by-name/tz sdb6 ' \
-e 's block/bootdevice/by-name/tzbak sdb7 ' \
-e 's block/bootdevice/by-name/userdata sda20 ' \
-e 's block/bootdevice/by-name/utags sda1 ' \
-e 's block/bootdevice/by-name/utagsBackup sda2 ' \
-e 's block/bootdevice/by-name/xbl sdb1 ' \
"$@"
;;
"eva")
sed -i \
-e 's block/platform/hi_mci.0/by-name/3rdmodem mmcblk0p35 ' \
-e 's block/platform/hi_mci.0/by-name/3rdmodemnvm mmcblk0p14 ' \
-e 's block/platform/hi_mci.0/by-name/3rdmodemnvmbkp mmcblk0p15 ' \
-e 's block/platform/hi_mci.0/by-name/boot mmcblk0p28 ' \
-e 's block/platform/hi_mci.0/by-name/cache mmcblk0p36 ' \
-e 's block/platform/hi_mci.0/by-name/cust mmcblk0p40 ' \
-e 's block/platform/hi_mci.0/by-name/dfx mmcblk0p34 ' \
-e 's block/platform/hi_mci.0/by-name/dts mmcblk0p30 ' \
-e 's block/platform/hi_mci.0/by-name/fastboot mmcblk0p5 ' \
-e 's block/platform/hi_mci.0/by-name/frp mmcblk0p4 ' \
-e 's block/platform/hi_mci.0/by-name/fw_hifi mmcblk0p27 ' \
-e 's block/platform/hi_mci.0/by-name/fw_lpm3 mmcblk0p3 ' \
-e 's block/platform/hi_mci.0/by-name/hisitest0 mmcblk0p37 ' \
-e 's block/platform/hi_mci.0/by-name/hisitest1 mmcblk0p38 ' \
-e 's block/platform/hi_mci.0/by-name/hisitest2 mmcblk0p41 ' \
-e 's block/platform/hi_mci.0/by-name/misc mmcblk0p20 ' \
-e 's block/platform/hi_mci.0/by-name/modem mmcblk0p31 ' \
-e 's block/platform/hi_mci.0/by-name/modem_dsp mmcblk0p32 ' \
-e 's block/platform/hi_mci.0/by-name/modem_dtb mmcblk0p33 ' \
-e 's block/platform/hi_mci.0/by-name/modem_om mmcblk0p18 ' \
-e 's block/platform/hi_mci.0/by-name/modemnvm_backup mmcblk0p10 ' \
-e 's block/platform/hi_mci.0/by-name/modemnvm_factory mmcblk0p6 ' \
-e 's block/platform/hi_mci.0/by-name/modemnvm_img mmcblk0p11 ' \
-e 's block/platform/hi_mci.0/by-name/modemnvm_system mmcblk0p12 ' \
-e 's block/platform/hi_mci.0/by-name/modemnvm_update mmcblk0p21 ' \
-e 's block/platform/hi_mci.0/by-name/nvme mmcblk0p7 ' \
-e 's block/platform/hi_mci.0/by-name/oeminfo mmcblk0p8 ' \
-e 's block/platform/hi_mci.0/by-name/persist mmcblk0p16 ' \
-e 's block/platform/hi_mci.0/by-name/recovery mmcblk0p29 ' \
-e 's block/platform/hi_mci.0/by-name/recovery2 mmcblk0p22 ' \
-e 's block/platform/hi_mci.0/by-name/reserved1 mmcblk0p17 ' \
-e 's block/platform/hi_mci.0/by-name/reserved2 mmcblk0p23 ' \
-e 's block/platform/hi_mci.0/by-name/secure_storage mmcblk0p13 ' \
-e 's block/platform/hi_mci.0/by-name/sensorhub mmcblk0p26 ' \
-e 's block/platform/hi_mci.0/by-name/splash mmcblk0p9 ' \
-e 's block/platform/hi_mci.0/by-name/splash2 mmcblk0p19 ' \
-e 's block/platform/hi_mci.0/by-name/system mmcblk0p39 ' \
-e 's block/platform/hi_mci.0/by-name/teeos mmcblk0p24 ' \
-e 's block/platform/hi_mci.0/by-name/trustfirmware mmcblk0p25 ' \
-e 's block/platform/hi_mci.0/by-name/userdata mmcblk0p42 ' \
-e 's block/platform/hi_mci.0/by-name/vrl mmcblk0p1 ' \
-e 's block/platform/hi_mci.0/by-name/vrl_backup mmcblk0p2 ' \
"$@"
;;
"matisse" | "matissewifi" | "matisse3g" | "matisselte")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p23 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p26 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p2 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst1 mmcblk0p12 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst2 mmcblk0p13 ' \
-e 's block/platform/msm_sdcc.1/by-name/apnhlos mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/efs mmcblk0p11 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p24 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p14 ' \
"$@"
;;
"FP2")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p13 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p20 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p16 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p14 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst1 mmcblk0p11 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst2 mmcblk0p12 ' \
-e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p17 ' \
-e 's block/platform/msm_sdcc.1/by-name/fsc mmcblk0p18 ' \
-e 's block/platform/msm_sdcc.1/by-name/dbi mmcblk0p3 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p8 ' \
"$@"
;;
"onyx")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p7 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p27 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p28 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p14 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
"$@"
;;
"bullhead")
sed -i \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/DDR mmcblk0p28 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/aboot mmcblk0p8 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/abootbak mmcblk0p14 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/apdp mmcblk0p17 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/boot mmcblk0p37 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/cache mmcblk0p40 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/cmnlib mmcblk0p33 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/cmnlibak mmcblk0p35 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/config mmcblk0p16 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/devinfo mmcblk0p43 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/dpo mmcblk0p19 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/fsc mmcblk0p20 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/fsg mmcblk0p27 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/grow mmcblk0p46 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/hyp mmcblk0p6 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/hypbak mmcblk0p12 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/imgdata mmcblk0p29 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/keymaster mmcblk0p32 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/keymasterbak mmcblk0p34 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/keystore mmcblk0p44 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/laf mmcblk0p31 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/limits mmcblk0p15 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/metadata mmcblk0p30 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/misc mmcblk0p23 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/modem mmcblk0p1 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/modemst1 mmcblk0p25 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/modemst2 mmcblk0p26 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/msadp mmcblk0p18 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/oem mmcblk0p36 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/persist mmcblk0p24 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/persistent mmcblk0p42 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/pmic mmcblk0p2 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/pmicbak mmcblk0p10 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/recovery mmcblk0p38 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/rpm mmcblk0p7 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/rpmbak mmcblk0p13 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/sbl1 mmcblk0p3 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/sbl1bak mmcblk0p9 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/sdi mmcblk0p5 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/sec mmcblk0p22 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/ssd mmcblk0p21 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/system mmcblk0p41 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/tz mmcblk0p4 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/tzbak mmcblk0p11 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/userdata mmcblk0p45 ' \
-e 's block/platform/soc.0/f9824900.sdhci/by-name/vendor mmcblk0p39 ' \
"$@"
;;
"hammerhead")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p16 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p25 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p28 ' \
"$@"
;;
"mako")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p20 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p23 ' \
"$@"
;;
"grouper")
sed -i \
-e 's block/platform/sdhci-tegra.3/by-name/APP mmcblk0p3 ' \
-e 's block/platform/sdhci-tegra.3/by-name/CAC mmcblk0p4 ' \
-e 's block/platform/sdhci-tegra.3/by-name/UDA mmcblk0p9 ' \
-e 's block/platform/sdhci-tegra.3/by-name/MSC mmcblk0p5 ' \
-e 's block/platform/sdhci-tegra.3/by-name/LNX mmcblk0p2 ' \
-e 's block/platform/sdhci-tegra.3/by-name/SOS mmcblk0p1 ' \
"$@"
;;
"tilapia")
sed -i \
-e 's block/platform/sdhci-tegra.3/by-name/APP mmcblk0p3 ' \
-e 's block/platform/sdhci-tegra.3/by-name/CAC mmcblk0p5 ' \
-e 's block/platform/sdhci-tegra.3/by-name/UDA mmcblk0p10 ' \
-e 's block/platform/sdhci-tegra.3/by-name/MSC mmcblk0p6 ' \
-e 's block/platform/sdhci-tegra.3/by-name/LNX mmcblk0p2 ' \
-e 's block/platform/sdhci-tegra.3/by-name/SOS mmcblk0p1 ' \
"$@"
;;
"i9305" | "encore" | "n7000" | "n7100" | "i9300" | "anzu" | \
"coconut" | "haida" | "hallon" | "iyokan" | "mango" | "phoenix" | \
"satsuma" | "smultron" | "urushi" | "zeus" | "jenad")
# Untested for other revisions of Samsung GT-S6500:
# | "jena" | "trebon")
sed -i \
-e 's /block/ / ' \
"$@"
;;
"shieldtablet")
sed -i \
-e 's block/platform/sdhci-tegra.3/by-name/APP mmcblk0p14 ' \
-e 's block/platform/sdhci-tegra.3/by-name/CAC mmcblk0p15 ' \
-e 's block/platform/sdhci-tegra.3/by-name/UDA mmcblk0p24 ' \
-e 's block/platform/sdhci-tegra.3/by-name/MSC mmcblk0p16 ' \
-e 's block/platform/sdhci-tegra.3/by-name/LNX mmcblk0p13 ' \
-e 's block/platform/sdhci-tegra.3/by-name/SOS mmcblk0p11 ' \
"$@"
;;
"p3100" | "p3110" | "p3113" | "p5100" | "p5110" | "p5113" | "espressowifi" | "espresso3g" | "i9100g")
sed -i \
-e 's block/platform/omap/omap_hsmmc.1/by-name/DATAFS mmcblk0p10 ' \
-e 's block/platform/omap/omap_hsmmc.1/by-name/KERNEL mmcblk0p5 ' \
-e 's block/platform/omap/omap_hsmmc.1/by-name/FACTORYFS mmcblk0p9 ' \
-e 's block/platform/omap/omap_hsmmc.1/by-name/EFS mmcblk0p1 ' \
-e 's block/platform/omap/omap_hsmmc.1/by-name/CACHE mmcblk0p7 ' \
"$@"
;;
"maguro")
sed -i \
-e 's block/platform/omap/omap_hsmmc.0/by-name/system mmcblk0p10 ' \
-e 's block/platform/omap/omap_hsmmc.0/by-name/cache mmcblk0p11 ' \
-e 's block/platform/omap/omap_hsmmc.0/by-name/userdata mmcblk0p12 ' \
-e 's block/platform/omap/omap_hsmmc.0/by-name/misc mmcblk0p5 ' \
-e 's block/platform/omap/omap_hsmmc.0/by-name/boot mmcblk0p7 ' \
-e 's block/platform/omap/omap_hsmmc.0/by-name/recovery mmcblk0p8 ' \
-e 's block/platform/omap/omap_hsmmc.0/by-name/sbl mmcblk0p2 ' \
-e 's block/platform/omap/omap_hsmmc.0/by-name/xloader mmcblk0p1 ' \
-e 's block/platform/omap/omap_hsmmc.0/by-name/radio mmcblk0p9 ' \
-e 's block/platform/omap/omap_hsmmc.0/by-name/efs mmcblk0p3 ' \
"$@"
;;
"cheeseburger")
sed -i \
-e 's block/bootdevice/by-name/LOGO sde18 ' \
-e 's block/bootdevice/by-name/abl sde16 ' \
-e 's block/bootdevice/by-name/ablbak sde17 ' \
-e 's block/bootdevice/by-name/apdp sde31 ' \
-e 's block/bootdevice/by-name/bluetooth sde24 ' \
-e 's block/bootdevice/by-name/boot sde19 ' \
-e 's block/bootdevice/by-name/boot_aging sde20 ' \
-e 's block/bootdevice/by-name/cache sda3 ' \
-e 's block/bootdevice/by-name/cdt sdd2 ' \
-e 's block/bootdevice/by-name/cmnlib sde27 ' \
-e 's block/bootdevice/by-name/cmnlib64 sde29 ' \
-e 's block/bootdevice/by-name/cmnlib64bak sde30 ' \
-e 's block/bootdevice/by-name/cmnlibbak sde28 ' \
-e 's block/bootdevice/by-name/config sda12 ' \
-e 's block/bootdevice/by-name/ddr sdd3 ' \
-e 's block/bootdevice/by-name/devcfg sde39 ' \
-e 's block/bootdevice/by-name/devinfo sde23 ' \
-e 's block/bootdevice/by-name/dip sde14 ' \
-e 's block/bootdevice/by-name/dpo sde33 ' \
-e 's block/bootdevice/by-name/dsp sde11 ' \
-e 's block/bootdevice/by-name/frp sda6 ' \
-e 's block/bootdevice/by-name/fsc sdf4 ' \
-e 's block/bootdevice/by-name/fsg sdf3 ' \
-e 's block/bootdevice/by-name/fw_4g9n4 sde45 ' \
-e 's block/bootdevice/by-name/fw_4j1ed sde43 ' \
-e 's block/bootdevice/by-name/fw_4t0n8 sde46 ' \
-e 's block/bootdevice/by-name/fw_8v1ee sde44 ' \
-e 's block/bootdevice/by-name/hyp sde5 ' \
-e 's block/bootdevice/by-name/hypbak sde6 ' \
-e 's block/bootdevice/by-name/keymaster sde25 ' \
-e 's block/bootdevice/by-name/keymasterbak sde26 ' \
-e 's block/bootdevice/by-name/keystore sda5 ' \
-e 's block/bootdevice/by-name/limits sde35 ' \
-e 's block/bootdevice/by-name/logdump sde40 ' \
-e 's block/bootdevice/by-name/logfs sde37 ' \
-e 's block/bootdevice/by-name/md5 sdf5 ' \
-e 's block/bootdevice/by-name/mdtp sde15 ' \
-e 's block/bootdevice/by-name/mdtpsecapp sde12 ' \
-e 's block/bootdevice/by-name/mdtpsecappbak sde13 ' \
-e 's block/bootdevice/by-name/minidump sde47 ' \
-e 's block/bootdevice/by-name/misc sda4 ' \
-e 's block/bootdevice/by-name/modem sde10 ' \
-e 's block/bootdevice/by-name/modemst1 sdf1 ' \
-e 's block/bootdevice/by-name/modemst2 sdf2 ' \
-e 's block/bootdevice/by-name/msadp sde32 ' \
-e 's block/bootdevice/by-name/oem_dycnvbk sda7 ' \
-e 's block/bootdevice/by-name/oem_stanvbk sda8 ' \
-e 's block/bootdevice/by-name/param sda9 ' \
-e 's block/bootdevice/by-name/persist sda2 ' \
-e 's block/bootdevice/by-name/pmic sde8 ' \
-e 's block/bootdevice/by-name/pmicbak sde9 ' \
-e 's block/bootdevice/by-name/recovery sde22 ' \
-e 's block/bootdevice/by-name/reserve sdd1 ' \
-e 's block/bootdevice/by-name/reserve1 sda10 ' \
-e 's block/bootdevice/by-name/reserve2 sda11 ' \
-e 's block/bootdevice/by-name/rpm sde1 ' \
-e 's block/bootdevice/by-name/rpmbak sde2 ' \
-e 's block/bootdevice/by-name/sec sde7 ' \
-e 's block/bootdevice/by-name/splash sde34 ' \
-e 's block/bootdevice/by-name/ssd sda1 ' \
-e 's block/bootdevice/by-name/sti sde38 ' \
-e 's block/bootdevice/by-name/storsec sde41 ' \
-e 's block/bootdevice/by-name/storsecbak sde42 ' \
-e 's block/bootdevice/by-name/system sde21 ' \
-e 's block/bootdevice/by-name/toolsfv sde36 ' \
-e 's block/bootdevice/by-name/tz sde3 ' \
-e 's block/bootdevice/by-name/tzbak sde4 ' \
-e 's block/bootdevice/by-name/userdata sda13 ' \
-e 's block/bootdevice/by-name/xbl sdb1 ' \
-e 's block/bootdevice/by-name/xblbak sdc1 ' \
"$@"
;;
"bacon")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p14 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p28 ' \
"$@"
;;
"ace")
sed -i \
-e 's block/platform/msm_sdcc.2/by-num/p25 mmcblk0p25 ' \
-e 's block/platform/msm_sdcc.2/by-num/p26 mmcblk0p26 ' \
-e 's block/platform/msm_sdcc.2/by-num/p27 mmcblk0p27 ' \
-e 's block/platform/msm_sdcc.2/by-num/p28 mmcblk0p28 ' \
"$@"
;;
"flo"|"deb")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p4 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p14 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p22 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p30 ' \
-e 's block/platform/msm_sdcc.1/by-name/radio mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p4 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p25 ' \
-e 's block/platform/msm_sdcc.1/by-name/misc mmcblk0p24 ' \
"$@"
;;
"yuga")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p17 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p24 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p25 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p26 ' \
-e 's block/platform/msm_sdcc.1/by-name/LTALabel mmcblk1 ' \
"$@"
;;
"z3c" | "sirius")
# Z3 compact is also called "aries" | "d5803" in aosp (called z3c in cm12.1)
# Z2 is also called "d6503" in aosp (called sirius in cm12.1)
# untested for "amami" | "leo" | "tianchi")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/DDR mmcblk0p17 ' \
-e 's block/platform/msm_sdcc.1/by-name/FOTAKernel mmcblk0p16 ' \
-e 's block/platform/msm_sdcc.1/by-name/LTALabel mmcblk0p18 ' \
-e 's block/platform/msm_sdcc.1/by-name/TA mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/aboot mmcblk0p5 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_aboot mmcblk0p11 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_dbi mmcblk0p10 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_rpm mmcblk0p12 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_s1sbl mmcblk0p9 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_sbl1 mmcblk0p8 ' \
-e 's block/platform/msm_sdcc.1/by-name/alt_tz mmcblk0p13 ' \
-e 's block/platform/msm_sdcc.1/by-name/apps_log mmcblk0p22 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p14 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p24 ' \
-e 's block/platform/msm_sdcc.1/by-name/dbi mmcblk0p4 ' \
-e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst1 mmcblk0p19 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst2 mmcblk0p20 ' \
-e 's block/platform/msm_sdcc.1/by-name/ramdump mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/rpm mmcblk0p6 ' \
-e 's block/platform/msm_sdcc.1/by-name/s1sbl mmcblk0p3 ' \
-e 's block/platform/msm_sdcc.1/by-name/sbl1 mmcblk0p2 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p23 ' \
-e 's block/platform/msm_sdcc.1/by-name/tz mmcblk0p7 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p25 ' \
"$@"
;;
"kis3")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p12 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p13 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p7 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p16 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p14 ' \
"$@"
;;
"m7spr")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/adsp mmcblk0p16 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p35 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p38 ' \
-e 's block/platform/msm_sdcc.1/by-name/carrier mmcblk0p30 ' \
-e 's block/platform/msm_sdcc.1/by-name/cdma_record mmcblk0p28 ' \
-e 's block/platform/msm_sdcc.1/by-name/control mmcblk0p25 ' \
-e 's block/platform/msm_sdcc.1/by-name/devlog mmcblk0p22 ' \
-e 's block/platform/msm_sdcc.1/by-name/dsps mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/extra mmcblk0p27 ' \
-e 's block/platform/msm_sdcc.1/by-name/local mmcblk0p26 ' \
-e 's block/platform/msm_sdcc.1/by-name/misc mmcblk0p19 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem_st1 mmcblk0p20 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem_st2 mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/pdata mmcblk0p24 ' \
-e 's block/platform/msm_sdcc.1/by-name/radio mmcblk0p33 ' \
-e 's block/platform/msm_sdcc.1/by-name/radio_config mmcblk0p17 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p36 ' \
-e 's block/platform/msm_sdcc.1/by-name/reserve mmcblk0p31 ' \
-e 's block/platform/msm_sdcc.1/by-name/reserve_1 mmcblk0p18 ' \
-e 's block/platform/msm_sdcc.1/by-name/reserve_2 mmcblk0p32 ' \
-e 's block/platform/msm_sdcc.1/by-name/reserve_3 mmcblk0p34 ' \
-e 's block/platform/msm_sdcc.1/by-name/skylink mmcblk0p29 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p37 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p39 ' \
"$@"
;;
"t6")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/adsp mmcblk0p16 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p37 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p41 ' \
-e 's block/platform/msm_sdcc.1/by-name/carrier mmcblk0p32 ' \
-e 's block/platform/msm_sdcc.1/by-name/cdma_record mmcblk0p30 ' \
-e 's block/platform/msm_sdcc.1/by-name/control mmcblk0p27 ' \
-e 's block/platform/msm_sdcc.1/by-name/devlog mmcblk0p24 ' \
-e 's block/platform/msm_sdcc.1/by-name/dsps mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/extra mmcblk0p29 ' \
-e 's block/platform/msm_sdcc.1/by-name/local mmcblk0p28 ' \
-e 's block/platform/msm_sdcc.1/by-name/misc mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem_st1 mmcblk0p22 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem_st2 mmcblk0p23 ' \
-e 's block/platform/msm_sdcc.1/by-name/pdata mmcblk0p26 ' \
-e 's block/platform/msm_sdcc.1/by-name/radio mmcblk0p34 ' \
-e 's block/platform/msm_sdcc.1/by-name/radio_config mmcblk0p17 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p38 ' \
-e 's block/platform/msm_sdcc.1/by-name/reserve mmcblk0p33 ' \
-e 's block/platform/msm_sdcc.1/by-name/reserve_1 mmcblk0p20 ' \
-e 's block/platform/msm_sdcc.1/by-name/reserve_2 mmcblk0p35 ' \
-e 's block/platform/msm_sdcc.1/by-name/reserve_3 mmcblk0p36 ' \
-e 's block/platform/msm_sdcc.1/by-name/reserve_4 mmcblk0p40 ' \
-e 's block/platform/msm_sdcc.1/by-name/skylink mmcblk0p31 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p39 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p42 ' \
-e 's block/platform/msm_sdcc.1/by-name/wcnss mmcblk0p18 ' \
"$@"
;;
"wt88047")
sed -i \
-e 's block/bootdevice/by-name/userdata mmcblk0p30 ' \
-e 's block/bootdevice/by-name/boot mmcblk0p22 ' \
-e 's block/bootdevice/by-name/system mmcblk0p23 ' \
-e 's block/bootdevice/by-name/modem mmcblk0p1 ' \
-e 's block/bootdevice/by-name/modemst1 mmcblk0p13 ' \
-e 's block/bootdevice/by-name/modemst2 mmcblk0p14 ' \
-e 's block/bootdevice/by-name/persist mmcblk0p25 ' \
"$@"
;;
"find5")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p19 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p18 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p20 ' \
"$@"
;;
"cancro")
sed -i \
-e 's block/platform/msm_sdcc.1/by-name/DDR mmcblk0p4 ' \
-e 's block/platform/msm_sdcc.1/by-name/aboot mmcblk0p7 ' \
-e 's block/platform/msm_sdcc.1/by-name/bk1 mmcblk0p8 ' \
-e 's block/platform/msm_sdcc.1/by-name/bk2 mmcblk0p11 ' \
-e 's block/platform/msm_sdcc.1/by-name/bk3 mmcblk0p15 ' \
-e 's block/platform/msm_sdcc.1/by-name/bk4 mmcblk0p17 ' \
-e 's block/platform/msm_sdcc.1/by-name/bk5 mmcblk0p18 ' \
-e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p19 ' \
-e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p24 ' \
-e 's block/platform/msm_sdcc.1/by-name/dbi mmcblk0p6 ' \
-e 's block/platform/msm_sdcc.1/by-name/fsc mmcblk0p14 ' \
-e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p16 ' \
-e 's block/platform/msm_sdcc.1/by-name/logo mmcblk0p10 ' \
-e 's block/platform/msm_sdcc.1/by-name/misc mmcblk0p9 ' \
-e 's block/platform/msm_sdcc.1/by-name/modem mmcblk0p22 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst1 mmcblk0p12 ' \
-e 's block/platform/msm_sdcc.1/by-name/modemst2 mmcblk0p13 ' \
-e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p21 ' \
-e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p20 ' \
-e 's block/platform/msm_sdcc.1/by-name/rpm mmcblk0p2 ' \
-e 's block/platform/msm_sdcc.1/by-name/sbl1 mmcblk0p1 ' \
-e 's block/platform/msm_sdcc.1/by-name/ssd mmcblk0p5 ' \
-e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p23 ' \
-e 's block/platform/msm_sdcc.1/by-name/tz mmcblk0p3 ' \
-e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p25 ' \
"$@"
;;
"gemini")
sed -i \
-e 's block/bootdevice/by-name/aboot sde23 ' \
-e 's block/bootdevice/by-name/abootbak sde24 ' \
-e 's block/bootdevice/by-name/apdp sde5 ' \
-e 's block/bootdevice/by-name/bk1 sda3 ' \
-e 's block/bootdevice/by-name/bk10 sdf2 ' \
-e 's block/bootdevice/by-name/bk11 sdf4 ' \
-e 's block/bootdevice/by-name/bk12 sdf6 ' \
-e 's block/bootdevice/by-name/bk2 sda8 ' \
-e 's block/bootdevice/by-name/bk3 sda10 ' \
-e 's block/bootdevice/by-name/bk4 sdd2 ' \
-e 's block/bootdevice/by-name/bk5 sdd5 ' \
-e 's block/bootdevice/by-name/bk6 sde4 ' \
-e 's block/bootdevice/by-name/bk7 sde29 ' \
-e 's block/bootdevice/by-name/bk8 sde30 ' \
-e 's block/bootdevice/by-name/bk9 sde40 ' \
-e 's block/bootdevice/by-name/bluetooth sde26 ' \
-e 's block/bootdevice/by-name/boot sde36 ' \
-e 's block/bootdevice/by-name/cache sda13 ' \
-e 's block/bootdevice/by-name/cdt sdd3 ' \
-e 's block/bootdevice/by-name/cmnlib sde19 ' \
-e 's block/bootdevice/by-name/cmnlib64 sde21 ' \
-e 's block/bootdevice/by-name/cmnlib64bak sde22 ' \
-e 's block/bootdevice/by-name/cmnlibbak sde20 ' \
-e 's block/bootdevice/by-name/cust sde38 ' \
-e 's block/bootdevice/by-name/ddr sdd4 ' \
-e 's block/bootdevice/by-name/devcfg sda4 ' \
-e 's block/bootdevice/by-name/devcfgbak sda5 ' \
-e 's block/bootdevice/by-name/devinfo sde1 ' \
-e 's block/bootdevice/by-name/dip sde25 ' \
-e 's block/bootdevice/by-name/dpo sde2 ' \
-e 's block/bootdevice/by-name/dsp sde32 ' \
-e 's block/bootdevice/by-name/frp sda7 ' \
-e 's block/bootdevice/by-name/fsc sdf1 ' \
-e 's block/bootdevice/by-name/fsg sde28 ' \
-e 's block/bootdevice/by-name/hyp sde13 ' \
-e 's block/bootdevice/by-name/hypbak sde14 ' \
-e 's block/bootdevice/by-name/keymaster sde17 ' \
-e 's block/bootdevice/by-name/keymasterbak sde18 ' \
-e 's block/bootdevice/by-name/keystore sda6 ' \
-e 's block/bootdevice/by-name/lksecapp sde7 ' \
-e 's block/bootdevice/by-name/lksecappbak sde8 ' \
-e 's block/bootdevice/by-name/logo sde31 ' \
-e 's block/bootdevice/by-name/mdtp sde34 ' \
-e 's block/bootdevice/by-name/misc sda9 ' \
-e 's block/bootdevice/by-name/modem sde35 ' \
-e 's block/bootdevice/by-name/modemst1 sdf3 ' \
-e 's block/bootdevice/by-name/modemst2 sdf5 ' \
-e 's block/bootdevice/by-name/msadp sde6 ' \
-e 's block/bootdevice/by-name/oops sda11 ' \
-e 's block/bootdevice/by-name/persist sda12 ' \
-e 's block/bootdevice/by-name/pmic sde9 ' \
-e 's block/bootdevice/by-name/pmicbak sde10 ' \
-e 's block/bootdevice/by-name/recovery sde37 ' \
-e 's block/bootdevice/by-name/reserve sdd1 ' \
-e 's block/bootdevice/by-name/rpm sde11 ' \
-e 's block/bootdevice/by-name/rpmbak sde12 ' \
-e 's block/bootdevice/by-name/sec sde3 ' \
-e 's block/bootdevice/by-name/splash sde33 ' \
-e 's block/bootdevice/by-name/ssd sda1 ' \
-e 's block/bootdevice/by-name/sti sde27 ' \
-e 's block/bootdevice/by-name/switch sda2 ' \
-e 's block/bootdevice/by-name/system sde39 ' \
-e 's block/bootdevice/by-name/tz sde15 ' \
-e 's block/bootdevice/by-name/tzbak sde16 ' \
-e 's block/bootdevice/by-name/userdata sda14 ' \
-e 's block/bootdevice/by-name/xbl sdb1 ' \
-e 's block/bootdevice/by-name/xblbak sdc1 ' \
"$@"
;;
"gts210ltexx"|"gts210wifi")
sed -i \
-e 's block/platform/15540000.dwmmc0/by-name/BOOT mmcblk0p9 ' \
-e 's block/platform/15540000.dwmmc0/by-name/CACHE mmcblk0p20 ' \
-e 's block/platform/15540000.dwmmc0/by-name/EFS mmcblk0p3 ' \
-e 's block/platform/15540000.dwmmc0/by-name/SYSTEM mmcblk0p19 ' \
-e 's block/platform/15540000.dwmmc0/by-name/USERDATA mmcblk0p22 ' \