Firefly Open Source Community

   Login   |   Register   |
New_Topic
12
New Topic
Print Previous Topic Next Topic

How to write recovery command to misc.img at Android?

107

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
107

How to write recovery command to misc.img at Android?

Posted at 12/22/2014 14:35:23      View:7748 | Replies:11        Print      Only Author   [Copy Link] 1#
I upload custom RK3288 Android image and linux image to the Firefly for dual OS. But, there is some problem "switch system" in custom Android firmware. The custom Android image is not Firefly official image. When I connect to PC with "adb shell", "reboot recovery" command works well for switching Android to Linux. So I'd like to know how to write "recovery command" to misc.img that is /dev/block/mtd/by-name/misc at Android without PC.
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/23/2014 09:32:54        Only Author  2#
Do  a hexdump of misc.img, and you'll find the magic word:
  1. $ hexdump -C rkst/Image/misc.img
  2. 00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
  3. *
  4. 00004000  62 6f 6f 74 2d 72 65 63  6f 76 65 72 79 00 00 00  |boot-recovery...|
  5. 00004010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
  6. *
  7. 00004040  72 65 63 6f 76 65 72 79  0a 2d 2d 77 69 70 65 5f  |recovery.--wipe_|
  8. 00004050  61 6c 6c 00 00 00 00 00  00 00 00 00 00 00 00 00  |all.............|
  9. 00004060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
  10. *
  11. 0000c000
Copy the code

Please refer to https://bitbucket.org/T-Firefly/firefly ... 0462265ae6

There's a command to write misc partition:

  1. (echo -n boot-recovery | busybox dd bs=16k seek=1 conv=sync; busybox dd if=/dev/zero bs=16k count=1) > /dev/block/mtd/by-name/misc
Copy the code



Reply

Use props Report

107

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
107
Posted at 12/23/2014 12:13:03        Only Author  3#

In addition, I'd like to know how to setup "switch system" at Android power menu with "(echo -n boot-recovery | busybox dd bs=16k seek=1 conv=sync; busybox dd if=/dev/zero bs=16k count=1)??> /dev/block/mtd/by-name/misc". I don't know how to put script at Android's switch system menu. Please let let me know how to put recovery command script that you told me. I'm using custom Android. So, where can I modify system file to switching system?









Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/23/2014 17:54:52        Only Author  4#

Check the commit already mensioned above.

https://bitbucket.org/T-Firefly/firefly ... 0462265ae6



This commit a based on the fact that misc partition is writable by all users:

diff --git a/system/core/init/devices.c b/system/core/init/devices.c
index 537627e..88287ef 100644
--- a/system/core/init/devices.c
+++ b/system/core/init/devices.c
@@ -188,7 +188,7 @@ static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid)
     /* Default if nothing found. */
     *uid = 0;
     *gid = 0;
-    return 0600;
+    return 0666;
}

static void make_device(const char *path,


It's somewhat ugly. Please follow the factory reset code in Setting.
Reply

Use props Report

52

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
52
Posted at 11/13/2024 17:42:00        Only Author  5#
Check out the latest design of women's Sandals online at ECS. Explore the best quality sandals for women online at ECS. Get your favorite sandals online across Pakistan at the best prices.
Reply

Use props Report

70

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
70
Posted at 11/13/2024 17:43:30        Only Author  6#
Discover the newest styles of shoes for women! Browse a wide variety of fashionable and affordable shoes that are ideal for any occasion, ranging from beautiful heels to comfy flats. Get the top women's shoes online right now to upgrade your wardrobe.
Reply

Use props Report

61

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
61
Posted at 11/13/2024 19:00:38        Only Author  7#
Gulaal stands out as one of the women clothing brands in pakistan. Experience the perfect blend of tradition and contemporary style with our latest collections.
Reply

Use props Report

28

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
28
Posted at 11/13/2024 19:20:54        Only Author  8#
Ammara Khan - Discover luxury dresses and formal wear from Pakistan. Explore a wide range of Pakistani luxury formals and indulge in luxury clothing options.
Reply

Use props Report

54

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
54
Posted at 11/13/2024 20:06:09        Only Author  9#
Cloud Nexus Lab provides specialized NetSuite solutions for UK businesses, helping to streamline operations with cloud-based ERP systems. Our team offers customized NetSuite implementation, support, and optimization services to enhance business performance and ensure smooth scalability.
Reply

Use props Report

46

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
46
Posted at 7 day before        Only Author  10#
Find the perfect bridal dresses for your special day in Pakistan at Mushq Pk. Discover a stunning collection of Pakistani bridal dresses, including options for barat. Shop online and make your dream wedding a reality.
Reply

Use props Report

Return to List
12
You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list