Allowing non market apps to be installed on locked down phones (backflip) - Android Software/Hacking General [Developers Only]

Hey guys,
My uncle works for Motorola and gave me a prototype phone (which I believe will be called the Motorola Sage, and it's model number is MB508. This thread isn't really about that, I can't post pictures because I don't want to get anyone in trouble). This phone is an AT&T phone, complete with AT&T startup screen, uninstallable AT&T apps and of course the inability to install non-market apps. Also it's running Android 2.1.
Now, I seem to have default root access to this phone. I'm assuming the file system is very similar to that of the Backflip (which I was previously using until I received this one). From what I've read and learned from poking around in /system/etc, non-market apps are blocked by two config files. These are:
/system/etc/motorola/com.android.providers.settings/secure.mkitso
Code:
# cat secure.mkitso
cat secure.mkitso
location_providers_allowed=network,gps
wifi_on=0
data_roaming=1
bluetooth_on=0
install_non_market_apps=0
usb_mass_storage_enabled=1
and
/system/etc/motorola/com.motorola.android.providers.settings/settings.mkitso
Code:
# cat settings.mkitso
cat settings.mkitso
mms_maximum_message_size=614400
auto_scan_on_flip=true
sms_pref_key_emailgateway_num=121
Single_Digit_Dial_Enabled=True
roaming_icon=0
dun_enable=1
force_only_market_apps=1
Bluetooth_Dun_Enabled=true
mms_x_wap_profile_url=http://uaprof.motorola.com/phoneconfi/MotoMB51/profile/MotoMB511.rdf
sms_pref_key_to_email=1
Okay, now it would seem that it's a simple matter of changing the values for "force_only_market_apps" to 0, and "install_non_market_apps" to 1. I did this, and let me quickly tell you how I did it.
- Make /system writable: mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
- Copy mkitso files to sdcard
- Edit mkitso files using Notepad++, changing the values as stated above
- Copy mkitso files back to their original directories
- chmod 644 to the files in order to keep their original permissions
- Make /system read only again: mount -o remount,ro -t yaffs2 /dev/block/mtdblock4 /system
- Restart the phone
However, this did not work, as I still get the warning when I try to install a non-market app.
I was wondering if anyone had any ideas on this, as when the Backflip gets rooted this is one thing that I'm sure we would like to know.

Have you tried adb install? I've heard that works on Backflops. You could download the app to your PC,and install it using "adb install PATH/TO/APP.APK"

Thanks, I know that I can use adb to install non market apps, but I was looking at how to change this setting on the phone. Since I have root on my phone, I figured it was possible.

Check out some of these terminal apps found in /system/bin/ directory of the backflip.Maybe they will help you.
Code:
modemlog
chown
check_prereq
dumpsys
qmuxd
rild
dd
port_bridge
installd
minipadut
vmstat
vold
ioctl
mm-audio-native-test
lsmod
id
mm-adec-omxamr-test
notify
getevent
hciattach
dhcpcd
service
cat
system_server
linker
mm-vdec-omxh264-test
mm-adec-omxevrc-test
wpa_supplicant
netstat
mm-adec-omxmp3-test
ls
wipe
iwpriv
stop
log
mm-vdec-omxmp4-test
top
bt_init
app_process
kill
dumpcrash
iwspy
tcmd_engine
sleep
port-bridge
input
chmod
flash_image
wfa_dut
monkey
dmesg
umount
dalvikvm
sh
sync
ptf
mm-jpeg-dec-test
ime
diag_klog
route
ln
batch
fuel_gauge
iwlist
bugreport
insmod
hcid
svc
rmmod
servicemanager
iwgetid
debuggerd
test_diag
am
renice
applypatch
ps
watchprops
sendevent
reboot
mount
mm-adec-omxQcelp13-test
pm
start
ping
busybox
toolbox
df
touchpad
mediaserver
setconsole
loc_api_app
setprop
logwrapper
rm
dvz
hd
ifconfig
rmdir
printenv
getprop
mm-venc-omx-test
fsck_msdos
iwconfig
iftop
bt_downloader
akmd2
sdptool
disp_util
mm-aenc-omxamr-test
newfs_msdos
gzip
cmp
iwevent
mv
smd
mmclog
mknod
mm-adspsvc-test
bt_test_exec
dexopt
date
set_grp_id
i2c
tcmd_sql
recovery
dumpstate
netcfg
surfaceflinger
mkdir
dbus-daemon
mm-adec-omxaac-test
schedtest
mm-jpeg-enc-test
logcat
mm-aenc-omxaac-test
schedtop
fmradio
EDIT:Also there does not seem to be a com.android.providers.settings in /system/etc/motorola/ only com.motorola.android.providers.settings and the file located in that directory is named secure.mkitso and the market app setting is set up like this:install_non_market_apps=0
So there is a slight difference in how the devices are set up and maybe a bit less security on the backflip =)

Thanks for your suggestion, but if you read above I changed the mkitso files without any changes in the behavior of the phone .

I was thinking that since I changed the settings files and they didn't do anything, maybe they will be applied during a hard reset. I'll try that sometime this weekend and report on the results.
The reason I'm asking for help is because I believe that once the Backflip gets rooted, we will need to know how to disable this setting.

I doubt you have root unless it came already rooted (you did make up some **** about a prototype) I honestly think this wont be a hard issue to tackle or work around when root is achieved on the Lackflip...yes I did Lackflip on purpose because of how crippled it is..so spend your time ANNONYMOUSLY sending www.endgadget.com some nice shiney pics of your supposed prototype codnamed:
"Motorola Sage"

I'm not sure why you're so aggressive, Honestly77. I'm able to "su" in shell and I'm able to modify files in the /system folder, so unless I'm mistaken (which I very well might be), then I believe I have root on the phone.
It is a prototype phone for testing, so it coming rooted isn't too farfetched at all.
When the Backflip does get rooted yes, this will be an easier issue to solve, but I'm trying now. If we're able to figure it out now then no time will have to be devoted to it when the Backflip is rooted.

Alright, I just did a hard reset and it activated a menu toggle under Settings -> Applications -> "Unknown Sources: Allow install of non-Market applications" which can be checked or unchecked.
To summarize, if you have root on your phone, edit secure.mkitso and settings.mkitso and change the variables, then you need to hard reset the phone.

hey met3ora, I too have a backflop, I am currently trying to sell my soul to obtain some sort of root or even simple control over the device, I have 2 questions for you...
1: using the config files and other software availible on this forum, would it be possible to obtain a workaround to be able to install apps from sd? I'm sure you are well aware that the backflip has no memory and won't even allow market apps to be installed via sd.
my second question (its ok if you don't want to answer as we will find out soon enough)
is: the moto sage, how does it compare to the backflip? no specifics needed just, is it better?
Iv'e seen the photos of the sage that appeared a couple weeks ago and it looks good, just incase we need it you should copy the system files as I'm sure the one AT&T will give us will be on lockdown as well. Thanks!

Honestly77 said:
I doubt you have root unless it came already rooted (you did make up some **** about a prototype) I honestly think this wont be a hard issue to tackle or work around when root is achieved on the Lackflip...yes I did Lackflip on purpose because of how crippled it is..so spend your time ANNONYMOUSLY sending www.endgadget.com some nice shiney pics of your supposed prototype codnamed:
"Motorola Sage"
Click to expand...
Click to collapse
THis thread is old but it still helped me with a bravo. Thanks OP.
And to this guy above, wtf, why be such a douche? You are also clearly an idiot or you would know that engineering models always have root.
Calling the OP a liar was way out of line and you should apologize.

Related

RC30 can forcibly update your phone

Code:
long now = SystemClock.elapsedRealtime();
long nextPrompt = getNextPromptTime(intent, now);
if (nextPrompt == 0) {
Log.i(TAG, "Installing overdue OTA update without prompting");
installUpdate();
return;
}
Basically, getNextPromptTime determines the prompt interval and number of prompts to show. So Google can potentially never prompt and just install without asking permission.
If you want to keep root access, I highly recommend doing the following to disable OTA updates:
Go to a root prompt.
Type the following:
# mount -oremount,rw /dev/block/mtdblock3 /system
# cd system
# cd etc
# cd security
# mv otacerts.zip otacerts.zip.bak
# mv cacerts.bks cacerts.bks.bak
That should disable cert checking by disabling (renaming) all the certs on the device. Someone please verify, but I'm pretty sure those are the certs that are checked.
Alternatively, you can follow the instructions to mod your recovery and boot images:
http://forum.xda-developers.com/showthread.php?t=443041
I have confirmed that leaving a shroot/suroot laying around will not work, as Google formats the system partition and resets all permissions upon an update:
Code:
format SYSTEM:
set_perm 0 3004 02755 SYSTEM:bin/ping
In addition, it is not possible to put the shroot/suroot in another partition besides system, as those are all reverted to noexec or nosuid upon reboot.
Code:
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8 0 0
Anyone know where the underlying update code is? I've only seen the Java front end (/packages/apps/Updater).
How do I know if I did this right?
Keep in mind I know next to nothing about Linux.
Ive done it to mine and have yet to see an update
Might want to move telnetd to something, so an app doesnt call it and get root, if you dont want the patch. Also copy sh to something so you can get root, and remove the permissions on sh
Not sure if suid on sh is needed for anything, so beware...
moving telnetd is not necessary, moving cacerts is dumb
Moving telnetd is not necessary, because telnetd does not become root, nor is it setuid root. The bug was that a root shell was listening on the keyboard (so if you type reboot on your phone while the android is pulsing or after you boot - the phone reboots)
Moving the cacerts will make ALL SSL stuff to work incorrectly because you no longer have a list of trusted root authorities.
The only good long-term solution is to reflash your recovery... etc
hmm
the updates are downloaded to /cache what if we touch "nameofupdatefile" or lock down /cache completely and that may prevent updates
or
or we could create a script that kills the update app, deletes any zip files every couple minutes in /cache
My phone gave me an update notification, I immediately killed the com.android.update process then cd /cache ; rm signed-RC30-from-RC29-fat.1582cace.zip then sudo busybox touch signed-RC30-from-RC29-fat.1582cace.zip then rebooted, and so far no more update notification or update process started
Did it, I will inform you what happened....
for some reason signed-RC30-from-RC29-fat.1582cace.zip got deleted, possibly ln -s /dev/null signed-RC30-from-RC29-fat.1582cace.zip will work
RyeBrye said:
Moving telnetd is not necessary, because telnetd does not become root, nor is it setuid root. The bug was that a root shell was listening on the keyboard (so if you type reboot on your phone while the android is pulsing or after you boot - the phone reboots)
Moving the cacerts will make ALL SSL stuff to work incorrectly because you no longer have a list of trusted root authorities.
The only good long-term solution is to reflash your recovery... etc
Click to expand...
Click to collapse
The recovery and boot images both get replaced by patches.
Incidentally, I haven't been prompted yet to update. Has anyone else who followed my instructions gotten prompted? I'll be able to work on a patched update when I get back to work, I've got several G1s at my disposal.
@koush
I did the modifications you mentioned at the begin of the thread, now I want to update to RC30 with the jesus method. Is it necessary to undo the changes I made with your method ? If yes, what do I have to do exactly ?
thanks a lot
PAO1908 said:
@koush
I did the modifications you mentioned at the begin of the thread, now I want to update to RC30 with the jesus method. Is it necessary to undo the changes I made with your method ? If yes, what do I have to do exactly ?
thanks a lot
Click to expand...
Click to collapse
You shouldn't have to, since Jesus has a full update, but you should anyways just to be safe.
Basically, just move the files back:
# mount -oremount,rw /dev/block/mtdblock3 /system
# cd system
# cd etc
# cd security
# mv otacerts.zip.bak otacerts.zip
# mv cacerts.bks.bak cacerts.bks
thanks koush, I will try it !
Why just don't change the update-script of an update to remove any unwanted lines, like formatting root? Why doesn't it work?
Koush said:
You shouldn't have to, since Jesus has a full update, but you should anyways just to be safe.
Click to expand...
Click to collapse
I prefer "JF" as the shorthand for my nick. Just FYI . I'm not Spanish, and I'm not "The Man".
all worked ok, thanks JF
JesusFreke said:
I prefer "JF" as the shorthand for my nick. Just FYI . I'm not Spanish, and I'm not "The Man".
Click to expand...
Click to collapse

Preferences Ownership issues?

I have been using JF 1.43 for a few months and loved it. Seeing that Cupcake became mainstream, I took the plunge two days ago and have been having issues. I tried JF 1.51, then a mod, then theDudes, all with some problems. I tried wiping and keeping apps in regular memory just for testing. I finally got a clean install using TheDudesCupcake which worked ok for me. When I pushed my preferences back using adb, it just hung on the "android" screen.
I was getting annoyed at myself for not understanding what was going on . The confounding problem was that the set of prefs that I was restoring had adb disabled, so I couldn't get a logcat to see what was really happening.
Long story shorter...
After some more fresh installs, I think what I have sorted out is that all of my preferences files lost their correct ownership. I found that when I had a program that was crashing, I would log in to an adb shell, use ps to see what user the app was running as, for example app_82. Then, I would chown app_82.app_82 for the directory within /data/data. I would then to it recursively since busybox doesn't have -R for chown by issuing the command chown app_82.app_82 /data/data/com.android.weather/cupcake/* and then chown app_82.app_82 /data/data/com.android.weather
It fixes programs that were having problems accessing their sqlite3 DBs which was the clue in the logs that led me to this solution.
As I am going through I see that it improves the performance and error rate of programs by doing this. Obviously core functionality doesn't have the same ease of repair.
Is this the wrong thing to do here? Is there a better way to restore files after an upgrade so that this doesn't happen again?
I saw that someone wrote a python script to fix these permissions, though I don't understand where they got python to run on Android in the first place. Is there a shell script that can parse an app's uid and fix its supplemental files accordingly?
I tried searching, but may not have used good keywords about this issue.
Any help/advice/info would be appreciated.
The answer
This guy has a python scirpt that nicely spits out a shell script to fix all of them
http://blog.elsdoerfer.name/2009/05/25/android-fix-package-uid-mismatches/
Code:
"""Parse Android's /data/system/packages.xml file and spits out
shell code to fix UIDs.
This helps you fix "Package x.y.z has mismatched uid: 10089 on disk, 10079
in settings" errors.
"""
from xml.dom import minidom
xmldoc = minidom.parse('packages.xml')
packages = xmldoc.getElementsByTagName('package')
ignored = []
for package in packages:
try:
userId = package.attributes['userId'].value
is_shared = False
except KeyError:
userId = package.attributes['sharedUserId'].value
is_shared = True
# do not touch permissions of shared apks (they userid always seems to be 1000)
if not is_shared:
print "busybox chown %s:%s %s" % (userId, userId, package.attributes['codePath'].value)
for subdir in ('', 'databases', 'shared_prefs'): # note we don't touch lib/
print "busybox chown %s %s:%s /data/data/%s/%s" % (
'-R' if subdir else '', userId, userId, package.attributes['name'].value, subdir)
Essentially, you can use adb pull to pull /data/system/packages.xml locally, run this python script on it, and then send each command back. One way to do this on *NIX is
Code:
adb pull /data/system/packages.xml . ; python fix.txt | xargs adb shell

Ash as login shell

Hi All,
The Ash shell provides a few advantages over the Android default sh shell such as command history and cursor handling at the prompt. There are other benefits, but these are the first that come in most handy (to me).
The following tutorial will get you ash as the login shell with as yet no ill effects:
Note: that in my case, I'm using my android2sd construct and thus this modification is being done to my active overlay profile setup, thus to undo it I can simply boot into "safe\\normal" mode and undo the changes without possibly locking me out of the console should it have failed (which it didn't) But you can edit the Android /system/bin/sh file in this manner directly.
Ash as Login Shell:
OK, make the /system fs read-write:
mount -o remount,rw /system
Click to expand...
Click to collapse
Note: that the fs type is not needed, and in my case is not yaffs but ext3, Android will figure it out proper.
Next,
cp -a /system/bin/sh /system/bin/sh0
Click to expand...
Click to collapse
(this is for backup purposes and allows us to undo the change if so desired, or delete it if no longer needed).
Note: I'm using JF1.51 roms, so busybox ash is available as /system/xbin/bb/ash, so that is what I am using here; use ash however you are able to access it.
echo "#!/system/xbin/bb/ash">/system/bin/sh
echo "/system/xbin/bb/ash \[email protected]">>/system/bin/sh
Click to expand...
Click to collapse
Please note the use of (redirect\\overwrite)> and (redirect\\append)>>.
This will overwrite sh with a script to load the desired shell, executing any command-line arguments passed, and preserve the permissions of the original sh file. You can manually set the permissions the same as they are for our sh0 backup if the permissions (root.shell)(0755) don't seem to keep.
Finally reset the read-only state of /system:
mount -o remount,ro /system
Click to expand...
Click to collapse
Now if you shell-in\\telnet-in you should get the ash prompt which unlike the Android sh default prompt, includes the present working directory(pwd) ie: '/#' instead of just '#'.
Note: A reboot should not cause the loss of the modification, but if does, copy the new sh script to your /data/local/bin location or something and copy it back via boot script or something.
Shell Scripts:
If you're like me, you discovered that Android didn't need the interpreter declaration comment in scripts, and thus may not have used them...Well, you will need to update your scripts to include them by adding something similar to the following as the first line of your scripts:
#!/system/xbin/bb/ash
Click to expand...
Click to collapse
Again, please note that I am using JF1.51 roms and the location of the busybox ash shell is what I'm listing; put the full location to the shell you intend to use as this location.
Without the interpreter declaration, ash simply complains 'not found' at the first command, as ash doesn't know how to interpret the script, and doesn't seem to default to the login shell.
Hope someone finds this helpful!
sweet. This is going to be very useful
BAM. thats sexy. i just did this on CM3.6.7.1. works like a charm.
scratches head. i'm lost. what does this do and how does this make my g1 better?
temporizer said:
scratches head. i'm lost. what does this do and how does this make my g1 better?
Click to expand...
Click to collapse
im not sure about the other features, but the one i installed it for is to have your working directory in front of ur prompt. ex:
Code:
/# cd /sdcard
/sdcard # cd /system/sd
/system/sd #
etc...
EDIT: Also, if you use ConnectBot, you'll notice with the regular sh, if u scroll up with tracball, you get BS characters on the prompt. with THIS one, when you scroll up, you get last command entered. VERY handy for when you mistype one character on a long-ass command.
I love you
Couldn't you do this?
Code:
mv /system/bin/sh /system/bin/sh0
ln -s /system/xbin/bb/ash /system/bin/sh
great job, i'm going to get ash working on my G1 (CM-3.6.7.1)
Thanks.
kanstin said:
Couldn't you do this?
Code:
mv /system/bin/sh /system/bin/sh0
ln -s /system/xbin/bb/ash /system/bin/sh
Click to expand...
Click to collapse
I tried this and it worked even after a reboot...
Sweet, I love the scroll back with trackball in the terminal!!! Me thinks this should get absorbed into the next Cyan release.
kanstin said:
Couldn't you do this?
Code:
mv /system/bin/sh /system/bin/sh0
ln -s /system/xbin/bb/ash /system/bin/sh
Click to expand...
Click to collapse
Yes, I reckon you could. Though I had done a few experiments where the symlink failed, but I'm fairly sure it was do to the link: /system/xbin/bb/ash -->../busybox and /system/bin/../busybox not existing...so I did it via script. Many ways to skin a cat they say.
Thank you all... this is fricken awesome!!
temporizer said:
scratches head. i'm lost. what does this do and how does this make my g1 better?
Click to expand...
Click to collapse
It gives a more advanced shell for when you use the command line interface or telnet into your G1. If you don't use the command line a lot, it won't help you.
As for specific benefits to the advanced version, it was listed in the first post.
Hi,
imho this is rather a hack that exposes you to the risk at least on CM to loose your
shell during boot as xbin.sqf the compressed squashfs filesystem containing
busybox is mounted rather late in the boot process. A cleaner solution would be to
move busybox to system/bin and link it to sh. That way you ensure that sh will
always be accessible during boot and also later on, thus not interfering with
further developments. A alternative could be to compile a standalone version
of busybox containing only ash (for size reasons, as size in /system/bin is precious)
copy that to /system/bin and link sh to it.
Seems to work fine on Dude's. Not really sure how it should open, but I type "ash" at the prompt and I get the /$ and /# if superuser. I also get the command history by rolling the trackball, which is a very nice feature.
Can i install this without using my PC?
temporizer said:
Can i install this without using my PC?
Click to expand...
Click to collapse
Should work using terminal.
Tried it on JACHero 2.7.1
I tried the hard link one and I get a read only fs error on the first move command. What should I chmod to get past that?
mugafuga said:
I tried the hard link one and I get a read only fs error on the first move command. What should I chmod to get past that?
Click to expand...
Click to collapse
Do this first before the mv and the symlink.
mount -o remount,rw /system
farmatito said:
Hi,
imho this is rather a hack that exposes you to the risk at least on CM to loose your
shell during boot as xbin.sqf the compressed squashfs filesystem containing
busybox is mounted rather late in the boot process. A cleaner solution would be to
move busybox to system/bin and link it to sh. That way you ensure that sh will
always be accessible during boot and also later on, thus not interfering with
further developments. A alternative could be to compile a standalone version
of busybox containing only ash (for size reasons, as size in /system/bin is precious)
copy that to /system/bin and link sh to it.
Click to expand...
Click to collapse
Is this in any way accurate? I dedicate my g1 to cyan's roms and wouldn't want anything to hinder any of the goodness that is cyanogenMod. Advice?
Load ash when terminal is started?
temporizer said:
Is this in any way accurate? I dedicate my g1 to cyan's roms and wouldn't want anything to hinder any of the goodness that is cyanogenMod. Advice?
Click to expand...
Click to collapse
Safest method will be to change to ash shell once terminal app is started (same as typing "ash" to switch shell from sh to ash). I don't know how to do it in android (in linux you could add it to your login script).
So if someone knows how to execute a command when we login using the terminal app, then switching to ash shell would work without fear of breaking any other functionality.

Debian on droid 2 / droid 2 global

First off, This is probably in the wrong space, simply because I haven't reached my proper post count. (Too much of a lurker, sorry) but I think I've found something that will make fellow D2 / D2G smile, and I couldn't help but share this.
Here is where I got the idea from:
http://forum.xda-developers.com/showthread.php?t=962974
Unfortunately, the debian-img.zip link is no longer functional (at least it was the last time I checked). No big deal, you can get it from here: Debian-img.zip.
Download that, and make sure you have your Android sdk tools installed. You will need root and busybox. Connect phone to computer, memory card mode, create folder called debian, and unpack the debian-img.zip file into the debian folder on the sdcard. When complete, switch it to charge only mode and now for the fun to begin.
Open the command prompt, navigate to sdk\tools folder, and type adb devices. If you don't see your phone listed as a device (will be a bunch of letters and numbers) switch it to pc mode, run adb devices again.
Once it shows up, type the following:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mmcblk1p21 /system
export bin=/system/bin
export img=/sdcard/debian/debian.img
export mnt=/data/local/debian
mkdir /data/local/debian
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox mount -t ext3 -o loop,noatime,nodiratime $img $mnt
busybox mount -t devpts devpts $mnt/dev/pts
busybox mount -t proc proc $mnt/proc
busybox mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
busybox mount --bind /sdcard $mnt/sdcard
busybox chroot $mnt /bin/bash
if ps -Al | grep vnc > /dev/null
then
echo "vnc detected"
else
export USER=root
rm -r /tmp
mkdir /tmp
vncserver -geometry 854x480
fi
exit
mount -o remount,ro -t yaffs2 /dev/block/mmcblk1p21 /system
You can't just copy/paste that whole block of code due to the busybox commands. Copy and paste one at a time. I also found that you can't make a script with that code either (please prove me wrong!) and have it work on the droid2 or d2g without errors.
Once you put in the last command, hit ctrl+c, and then open AndroidVNC, using the following data (similar to the debondroid thread):
nickname: debian
Password: password
Address: localhost
Port: 5901
Then connect!
Issues:
I have found that not only can't I use a script, I also cannot use a terminal emulator or even connectbot to put in the commands line by line. I am unsure why, but this only seems to work when I use the adb shell through a computer/usb connection.
You may have issues using USB SDCARD mode after you have run this code. This is fixed by rebooting the phone (as this causes debian to stop being run, and the img is being run off the sdcard, which is mounted with busybox into the system). Otherwise, all other phone functions work perfectly.
A neat little bonus: I found that I am able to access the internet through a browser in debian using nothing more than my 3g data connection.
Feel free to comment! Especially if someone out there can get these commands to work as a script. Enjoy!
im dieing to get this running, i have D2G running miui ics, first i cant download debian-img.zip, it wont complete download. after searching and downloading debian arm iso and renaming img i try your instructions and get hung up at
busybox mount -t ext3 -o loop,noatime,nodiratime $img $mnt
any help would be apperciated thank you
It's possible the latest ICS leak could be the problem (I had only tried this on an old Fission build, stock (both) and CM7). However, sometimes when I would reset the phone and run the commands again, it would throw me an error in the same spot you're having. It was wierd (as it JUST worked). I flashed to a different ROM to see what was up and it was happy again--but only through one power cycle. There might be a spot in this code I'm missing, but the error it throws acts as if I were trying to mount the img in the wrong loop block. This could be to the loop block already having the residual data (from the forced shutdown of the phone not allowing a tru closure of Debian), and if that's the case It would make sense if we could wipe that loop block (del and recreate it) through ADB. I haven't had time, but I'll look into it tonight.
As for the img, I'll also look into that tonight (on my phone currently).
I really apperciate the speedy reply, I'm not showing ext2 or ext3 on miui ics, do you know of a working GB rom that debian works with. I really apperciate your work in getting this going, I'm surprised its not developed by more people as the idea of having a desktop computer in your pocket is appealing. Thanks again
That's the beauty of this workaround: D2/D2G doesn't have ext3 support. That's why I had to use this method and frankly could be one of the reasons that there are those out of the blue errors that don't make sense. I need time so I can get screenshots up (to prove I'm not lying), but this will work with the img file linked.
For a good GB build, you can try the latest CM7 build at rootzwiki, or the stock GB update.
I tried again and almost everything went smoothly until i punched in "fi" and it gave me an "Unknown hz value! <80> Assume 100." i finished the instructions and tried to fire up androidvnc and tried to connect and i get " VNC connection failed! localhost" so im going to try and attach a bmp of my cmd window. i am looking into the unkown hz value but so far am stumped. "change ext of file to bmp or png"
also im assuming the debian img which i was able to successfully download is a arm distro?
omg it worked!!!! i redid the steps like i had done i was still getting vnc connection error, then i changed the address in vnc from "localhost" to "127.0.0.1" and it works!!! thanks man
jlhaehl said:
I tried again and almost everything went smoothly until i punched in "fi" and it gave me an "Unknown hz value! <80> Assume 100." i finished the instructions and tried to fire up androidvnc and tried to connect and i get " VNC connection failed! localhost" so im going to try and attach a bmp of my cmd window. i am looking into the unkown hz value but so far am stumped. "change ext of file to bmp or png"
also im assuming the debian img which i was able to successfully download is a arm distro?
Click to expand...
Click to collapse
Debian img is indeed for ARM. And I haven't seen that error at all before, so I don't know what to tell you. Was working on school projects all night and just ran out of time, so didn't get to fire it up for screenshots, but it looks like you got it to work.
The next thing I'm gonna try is to put it in script form, and I think the solution is to put the busybox parts into a seperate script (android seems to like parsing the scripts all at once, so this borks the busybox commands).
I noticed that its busybox killing the script as well, good luck on compiling one that is compatable i will do wht i can on my end though i dont expect it to be much, thank you for putting this up, one more notch android has over the big apple

[Q] Polaroid 8" Tablet PTAB8000 ICS 4.0.3

Ok, so a friend of mine bought 3 of these things from Kohls on Black Friday as Christmas presents for her kids and has asked me to help set them up as kid friendly devices. Unfortunately they don't come with any Gapps installed and I'm having difficulty installing any of them including the Play Store. I'm also running into problems installing simple games like Angry Birds. In fact very few of the APK's that I have backed up from my other Android devices seem to want to install on these tablets. I also can't find any forums on here or anywhere else evening addressing these devices yet. I'm wondering if there's some kind of generic udate.zip I can use for these things that isn't device specific? A little while back I was able to install an update.zip on a Zeki tablet that enabled me to finally install all the Gapps and maximize it's potential. But then again those things come rooted out of the box and the update was Zeki specific, so...
Anyways, please if anyone can help? This could be your chance to be the first to help unlock the potential of these devices.
Rooting PTAB8000
This is NOT my work, it is from mbellot at FreakTab, but it worked great for me.
Rooting is easy, market is nearly as easy. Here is the original thought process.
Here it is, modified the way I have done it (a couple times), broken into logical chunks.
1. C:\ADB> adb shell
2. [email protected]:/ $ mv /data/local/tmp /data/local/tmp.bak
3. [email protected]:/ $ ln -s /data /data/local/tmp
4. [email protected]:/ $ exit
5. C:\ADB> adb reboot
This gives you write access to /data for the next set of steps.
6. C:\ADB> adb wait-for-device
7. C:\ADB> adb shell
8. [email protected]:/ $ echo ro.kernel.qemu=1 >/data/local.prop
9. [email protected]:/ $ exit
10. C:\ADB> adb reboot
This puts you into a "debug" mode of sorts, the LCD will be black after the boot logo comes and goes.
11. C:\ADB> adb wait-for-device
12. C:\ADB> adb remount
remount succeeded
13. C:\ADB> adb push su /system/bin/su
518 KB/s (22364 bytes in 0.042s)
14. C:\ADB> adb shell
15. [email protected]:/ # chown root.shell /system/bin/su
16. [email protected]:/ # chmod 06755 /system/bin/su
17. [email protected]:/ # rm /system/xbin/su
rm failed for /system/xbin/su, No such file or directory
18. 255|[email protected]:/ # ln -s /system/bin/su /system/xbin/su
19. [email protected]:/ # exit
The chown and chmod in steps 15 and 16 are critical to su working properly.
20. C:\ADB> adb push Superuser.apk /system/app/.
3923 KB/s (843503 bytes in 0.209s)
At this point you can install market files. You need to do it before you remove the local.prop file since the PTAB8000 refuses to run adb in root mode or allow remounting. You can use this as a starting point for installing market, but I would suggest you grab the latest ICS gapps and replace the files. Also, market/play is not vending.apk in ICS, its phonesky.apk.
Once you're done with su and market you need to make your tablet boot normal again.
21. C:\ADB> adb shell
22. [email protected]:/ # rm /data/local.prop
23. [email protected]:/ # rm /data/local/tmp
24. [email protected]:/ # mv /data/local/tmp.bak /data/local/tmp
25. [email protected]:/ # exit
26. C:\ADB> adb reboot
Finished.
Thanks.
HD Brian said:
This is NOT my work, it is from mbellot at FreakTab, but it worked great for me.
Rooting is easy, market is nearly as easy. Here is the original thought process.
Here it is, modified the way I have done it (a couple times), broken into logical chunks.
1. C:\ADB> adb shell
2. [email protected]:/ $ mv /data/local/tmp /data/local/tmp.bak
3. [email protected]:/ $ ln -s /data /data/local/tmp
4. [email protected]:/ $ exit
5. C:\ADB> adb reboot
This gives you write access to /data for the next set of steps.
6. C:\ADB> adb wait-for-device
7. C:\ADB> adb shell
8. [email protected]:/ $ echo ro.kernel.qemu=1 >/data/local.prop
9. [email protected]:/ $ exit
10. C:\ADB> adb reboot
This puts you into a "debug" mode of sorts, the LCD will be black after the boot logo comes and goes.
11. C:\ADB> adb wait-for-device
12. C:\ADB> adb remount
remount succeeded
13. C:\ADB> adb push su /system/bin/su
518 KB/s (22364 bytes in 0.042s)
14. C:\ADB> adb shell
15. [email protected]:/ # chown root.shell /system/bin/su
16. [email protected]:/ # chmod 06755 /system/bin/su
17. [email protected]:/ # rm /system/xbin/su
rm failed for /system/xbin/su, No such file or directory
18. 255|[email protected]:/ # ln -s /system/bin/su /system/xbin/su
19. [email protected]:/ # exit
The chown and chmod in steps 15 and 16 are critical to su working properly.
20. C:\ADB> adb push Superuser.apk /system/app/.
3923 KB/s (843503 bytes in 0.209s)
At this point you can install market files. You need to do it before you remove the local.prop file since the PTAB8000 refuses to run adb in root mode or allow remounting. You can use this as a starting point for installing market, but I would suggest you grab the latest ICS gapps and replace the files. Also, market/play is not vending.apk in ICS, its phonesky.apk.
Once you're done with su and market you need to make your tablet boot normal again.
21. C:\ADB> adb shell
22. [email protected]:/ # rm /data/local.prop
23. [email protected]:/ # rm /data/local/tmp
24. [email protected]:/ # mv /data/local/tmp.bak /data/local/tmp
25. [email protected]:/ # exit
26. C:\ADB> adb reboot
Finished.
Click to expand...
Click to collapse
HD Brian,
I'm going to say thanks because I'm sure everything you just posted is probably going to be very clear to quite a few people that understand all of that. So thank you for helping out. Unfortunately though for me, I got lost. Though I've been tinkering with android and windows mobile devices for about 3 years now, I've actually never done any ADB editing and not sure I fully understand how to do it.
Personally I'm not too concerned about modifying these things too much because they are for someone else's kids, and I've found a way to work around rooting and using Gapps to be able to install the apps they're needing. And before I hand these things back over to be wrapped for Christmas I'm going to make a video showing what I've done to maximize the out of box potential of these things.
But on that note, I'm going to make a request of you if you don't mind. Considering you seem to know how to easily achieve the task, I was wondering if you'd be willing to make and post a Youtube video that takes people through the steps. I know it might be time consuming, but after all we are all here to help each other out. And I'm sure that the people who actually own these devices would really appreciate it. At this point I haven't been able to find any videos on how to mod this tablet yet and the only forums that I've found discussing these things are the one you mentioned and this one here.
So I hope you'll be willing to help other owners out, and I appreciate you taking the time to respond.
Thanks
I had been thinking about reloading the stock rom and doing the root all again as a refresher for myself, but I have never done a YouTube video before. I will try to find the time to do it and them I will post the link here.
For anyone still having issues with rooting and getting the play store on this device I have just made a script to automate the whole process.
filedropper [dot] com / polaroidaio
Note ADB drivers are required.
TeODH4 said:
For anyone still having issues with rooting and getting the play store on this device I have just made a script to automate the whole process.
filedropper [dot] com / polaroidaio
Note ADB drivers are required.
Click to expand...
Click to collapse
Thanks! I was able to run this script, it read the tablet, I asked it to root and install gapps, it said it completed but when the device restarts, I see the polaroid logo twice, then the screen goes black and just sits there forever. I was able to re-install factory and boot it back up so that was good. But didn't know if you had any ideas on what was wrong with my device. I'm using a brand new stock Polaroid PTAB8000 ICS 4.0.3. Windows 7, freshly installed Android Development Kit from today to get my ADB.
smokethrower2 said:
Thanks! I was able to run this script, it read the tablet, I asked it to root and install gapps, it said it completed but when the device restarts, I see the polaroid logo twice, then the screen goes black and just sits there forever. I was able to re-install factory and boot it back up so that was good. But didn't know if you had any ideas on what was wrong with my device. I'm using a brand new stock Polaroid PTAB8000 ICS 4.0.3. Windows 7, freshly installed Android Development Kit from today to get my ADB.
Click to expand...
Click to collapse
Any luck with this script yet? Also, how were you able to flash back to factory?
Wanted to add, got the same black screen so I booted to recovery and did factory reset which got me back to square 1. I install the getjar app store and did a search for gmail. when it came up i downloaded it, and during the installation it also installed the "Google Play" store. I was getting a few errors but after turning sync on and using the store for a bit they all cleared up so far. Now I have google play and gmail apps on the tab.
BigT504 said:
Wanted to add, got the same black screen so I booted to recovery and did factory reset which got me back to square 1. I install the getjar app store and did a search for gmail. when it came up i downloaded it, and during the installation it also installed the "Google Play" store. I was getting a few errors but after turning sync on and using the store for a bit they all cleared up so far. Now I have google play and gmail apps on the tab.
Click to expand...
Click to collapse
Sorry about the black screen issue guys there was an issue with the code. I've also completely rewritten the application in c++. All features should work without issues now.
You can download the software here: mediafire [dot] com/?o2864kb92hcc0hb (sorry i can't post links yet, I'll work on getting some posts done...)
1) Download RAR file
2) Extract RAR file
3) Run PolaroidAIO.exe
4) Enable USB debugging and Stay awake
5) Drivers are included in this release if needed
6) Enjoy your fully rooted tablet with the Play Store and Google Services Framework.
If anyone is intrested in the source code let me know and I will post it as well...
Have fun guys!
---------- Post added at 09:58 AM ---------- Previous post was at 09:26 AM ----------
smokethrower2 said:
Thanks! I was able to run this script, it read the tablet, I asked it to root and install gapps, it said it completed but when the device restarts, I see the polaroid logo twice, then the screen goes black and just sits there forever. I was able to re-install factory and boot it back up so that was good. But didn't know if you had any ideas on what was wrong with my device. I'm using a brand new stock Polaroid PTAB8000 ICS 4.0.3. Windows 7, freshly installed Android Development Kit from today to get my ADB.
Click to expand...
Click to collapse
There was a bug in the old code, same thing happend to mine after i did a factory reset to try and replicate your situation. Try the updated version 1.2 and let me know if u face any simular issues.
---------- Post added at 10:14 AM ---------- Previous post was at 09:58 AM ----------
Dossey said:
HD Brian,
I'm going to say thanks because I'm sure everything you just posted is probably going to be very clear to quite a few people that understand all of that. So thank you for helping out. Unfortunately though for me, I got lost. Though I've been tinkering with android and windows mobile devices for about 3 years now, I've actually never done any ADB editing and not sure I fully understand how to do it.
Personally I'm not too concerned about modifying these things too much because they are for someone else's kids, and I've found a way to work around rooting and using Gapps to be able to install the apps they're needing. And before I hand these things back over to be wrapped for Christmas I'm going to make a video showing what I've done to maximize the out of box potential of these things.
But on that note, I'm going to make a request of you if you don't mind. Considering you seem to know how to easily achieve the task, I was wondering if you'd be willing to make and post a Youtube video that takes people through the steps. I know it might be time consuming, but after all we are all here to help each other out. And I'm sure that the people who actually own these devices would really appreciate it. At this point I haven't been able to find any videos on how to mod this tablet yet and the only forums that I've found discussing these things are the one you mentioned and this one here.
So I hope you'll be willing to help other owners out, and I appreciate you taking the time to respond.
Thanks
Click to expand...
Click to collapse
Hey I just wanted to point out that you can indeed use root and remount /system. if you have proper root. which my AIO application will test for you as well. Here's what you do to remount /system as r/w:
Code:
C:\dev\adb>adb shell
[email protected]:/ $ su
su
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]:/ # chmod 777 /system
chmod 777 /system
[email protected]:/ # chmod 777 /system/app
chmod 777 /system/app
[email protected]:/ # exit
exit
[email protected]:/ $ exit
exit
C:\dev\adb>adb push sample.apk /system
/app/sample.apk
12 KB/s (187 bytes in 0.015s)
C:\dev\adb>adb shell
[email protected]:/ $ su
su
[email protected]:/ # chmod 755 /system/app
chmod 755 /system/app
[email protected]:/ # chmod 755 /system
chmod 755 /system
[email protected]:/ # mount -o remount,ro /system
mount -o remount,ro /system
[email protected]:/ #
I was able to get the play store on with the first upload and then by following a couple of steps from aother tutorial, but I can't seem to get any apps in the Play Store to open or download. I keep getting a "device is not compatible" message. I've tried the DPI play store and also messed around with LCD Density Monitor but haven't had any luck. If someone could help tackle this problem as well as get netflix up and running, I would be extremely grateful. This seems like a pretty awesome tablet, it just needs to be let free.
I feel I should also add, for anyone considering doing this, that once you have the Play Store installed, at least in my experience; if you have it hooked up to a PC via the USB and try to install anything, it goes ape sh** and starts trying to force close and kicks a whole bunch of errors. It doesn't seen to do anything, but it's annoying as hell. I haven't tried it yet with it plugged into the charger, and it doesn't do it nearly as much when you have it unplugged, but it's just another one of those quirks that I'm sure will be fixed in due time.
TeODH4 said:
Sorry about the black screen issue guys there was an issue with the code. I've also completely rewritten the application in c++. All features should work without issues now.
You can download the software here: mediafire [dot] com/?o2864kb92hcc0hb (sorry i can't post links yet, I'll work on getting some posts done...)
1) Download RAR file
2) Extract RAR file
3) Run PolaroidAIO.exe
4) Enable USB debugging and Stay awake
5) Drivers are included in this release if needed
6) Enjoy your fully rooted tablet with the Play Store and Google Services Framework.
If anyone is intrested in the source code let me know and I will post it as well...
Have fun guys!
---------- Post added at 09:58 AM ---------- Previous post was at 09:26 AM ----------
There was a bug in the old code, same thing happend to mine after i did a factory reset to try and replicate your situation. Try the updated version 1.2 and let me know if u face any simular issues.
---------- Post added at 10:14 AM ---------- Previous post was at 09:58 AM ----------
Hey I just wanted to point out that you can indeed use root and remount /system. if you have proper root. which my AIO application will test for you as well. Here's what you do to remount /system as r/w:
Code:
C:\dev\adb>adb shell
[email protected]:/ $ su
su
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]:/ # chmod 777 /system
chmod 777 /system
[email protected]:/ # chmod 777 /system/app
chmod 777 /system/app
[email protected]:/ # exit
exit
[email protected]:/ $ exit
exit
C:\dev\adb>adb push sample.apk /system
/app/sample.apk
12 KB/s (187 bytes in 0.015s)
C:\dev\adb>adb shell
[email protected]:/ $ su
su
[email protected]:/ # chmod 755 /system/app
chmod 755 /system/app
[email protected]:/ # chmod 755 /system
chmod 755 /system
[email protected]:/ # mount -o remount,ro /system
mount -o remount,ro /system
[email protected]:/ #
Click to expand...
Click to collapse
Just to be sure you may want to run the updated script because there was alot of garbage left behind by 1.0. which 1.2 will clean up.
1) Select "Remove Google Applications and Framework"
2) When done, select "Un-Root Device"
3) Finally select "Root Device and Install Google Applications, and Framework"
This will clean up the garbage left behind by 1.0 and might help with some of your issues.
I am aware that some apps are showing up as un-supported, I'm pretty sure its an issue with build.prop. I'm looking into it right now. Are you having issues with all the apps on the play store? or just some of them like netflix, angry birds, etc? Also can you elaborate on what errors you are getting? I think i need to find an updated version of google services framework, I've noticed when the market upgrades to the play store it will crash quite a few times during the updates, and then gets better but does crash from time to time. Don't hurt functionality but it is very annoying.
If you find any info on any of this please be sure to share. I'll try and get an updated release out tonight that takes care of at least some of these issues... At least we are making progress...
I downloaded the files from location listed above but it my anti virus primped me for a Trojan virus... Is this not a secure release?
psctornado said:
I downloaded the files from location listed above but it my anti virus primped me for a Trojan virus... Is this not a secure release?
Click to expand...
Click to collapse
This is a secure release, it probably doesn't like all the files embedded into the exe... I can re-upload it un-packed if you like.
No it's ok I thought I would ask. So the big issue is the play store?
psctornado said:
No it's ok I thought I would ask. So the big issue is the play store?
Click to expand...
Click to collapse
Yes, the protected applications do not show up, or if you try to use the web site, and send an app to your device it will say unsupported, I'm going to take a look at my build.prop in a little bit and see if i cant get the full market working. From what I can tell its google blocking the apps because this is a non google supported device. which is why we needed to load the play store in the first place, if you run AIO 1.2 you will at least get all Googles app's working... Gmail, etc. I will have an update out soon to fix the play store issues, and hopefully fix the crashing gapps service...
Okay. I don't have the tablet with me right now, but when I do, I'll redo everything. Also, I was able to get Netflix to work by downloading it from Amazon's App store and everything "seemed" to work. I'll have to try more testing when I get the tablet back. As far as the Play store goes, it just says that it has stopped working and has to close, and when I hit okay, the error goes away but it stays open. I'll get the exact verbatim when it pops up again. Other than that, nice work and hopefully we can work out the kinks.
TeODH4 said:
Just to be sure you may want to run the updated script because there was alot of garbage left behind by 1.0. which 1.2 will clean up.
1) Select "Remove Google Applications and Framework"
2) When done, select "Un-Root Device"
3) Finally select "Root Device and Install Google Applications, and Framework"
This will clean up the garbage left behind by 1.0 and might help with some of your issues.
I am aware that some apps are showing up as un-supported, I'm pretty sure its an issue with build.prop. I'm looking into it right now. Are you having issues with all the apps on the play store? or just some of them like netflix, angry birds, etc? Also can you elaborate on what errors you are getting? I think i need to find an updated version of google services framework, I've noticed when the market upgrades to the play store it will crash quite a few times during the updates, and then gets better but does crash from time to time. Don't hurt functionality but it is very annoying.
If you find any info on any of this please be sure to share. I'll try and get an updated release out tonight that takes care of at least some of these issues... At least we are making progress...
Click to expand...
Click to collapse
rysimpson318 said:
Okay. I don't have the tablet with me right now, but when I do, I'll redo everything. Also, I was able to get Netflix to work by downloading it from Amazon's App store and everything "seemed" to work. I'll have to try more testing when I get the tablet back. As far as the Play store goes, it just says that it has stopped working and has to close, and when I hit okay, the error goes away but it stays open. I'll get the exact verbatim when it pops up again. Other than that, nice work and hopefully we can work out the kinks.
Click to expand...
Click to collapse
If the play store is just crashing then i would most definitely recommend using 1.2 to clean things up and reload the playstore, you may even want to go as far as to do a factory reset after you un-install and un-root... Well for some reason build.prop doesn't seem to change anything on the market, I'm downloading an updated gapp for 4.0.3 maybe that will take care of some issues under the hood.
TeODH4 said:
If the play store is just crashing then i would most definitely recommend using 1.2 to clean things up and reload the playstore, you may even want to go as far as to do a factory reset after you un-install and un-root... Well for some reason build.prop doesn't seem to change anything on the market, I'm downloading an updated gapp for 4.0.3 maybe that will take care of some issues under the hood.
Click to expand...
Click to collapse
So are you saying a clean install will remedy the issue?what is the 1.2 download link?
psctornado said:
So are you saying a clean install will remedy the issue?what is the 1.2 download link?
Click to expand...
Click to collapse
Sorry for the late response, but it should fix some of the issues. See the thread below for more info on current bugs...
I will now be posting all project updates and downloads here: http://forum.xda-developers.com/showthread.php?t=2066041
BigT504 said:
Any luck with this script yet? Also, how were you able to flash back to factory?
Click to expand...
Click to collapse
I haven't tried the new version yet since I don't have my laptop with me right now but I'll try it later. To reset back to factory after getting stuck on the black screen follow this sites direction. You will need a micro SD card. southerntelecom dot com / polaroidsupport / firmware /firmware_guide_ptab8000 dot html then download the files for your model and then put them on the SD card and insert the SD card in the tablet. Then to start the factory reset hold down volume down and power at the same time until you see the update screen come up. I believe that is what it said. It should explain it all in the link. If my link won't post since I'm new just Google ptab8000 firmware and click on the link for a southerntelecom firmware site.

Categories

Resources